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.
122 lines
389 KiB
122 lines
389 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[155,6,7],{"+NIl":function(ct,$e,k){(function(U){U(k("VrN/"))})(function(U){"use strict";U.defineMode("stex",function(me,oe){"use strict";function ke(ie,z){ie.cmdState.push(z)}function xe(ie){return ie.cmdState.length>0?ie.cmdState[ie.cmdState.length-1]:null}function V(ie){var z=ie.cmdState.pop();z&&z.closeBracket()}function N(ie){for(var z=ie.cmdState,j=z.length-1;j>=0;j--){var I=z[j];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function D(ie,z,j){return function(){this.name=ie,this.bracketNo=0,this.style=z,this.styles=j,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var L={};L.importmodule=D("importmodule","tag",["string","builtin"]),L.documentclass=D("documentclass","tag",["","atom"]),L.usepackage=D("usepackage","tag",["atom"]),L.begin=D("begin","tag",["atom"]),L.end=D("end","tag",["atom"]),L.label=D("label","tag",["atom"]),L.ref=D("ref","tag",["atom"]),L.eqref=D("eqref","tag",["atom"]),L.cite=D("cite","tag",["atom"]),L.bibitem=D("bibitem","tag",["atom"]),L.Bibitem=D("Bibitem","tag",["atom"]),L.RBibitem=D("RBibitem","tag",["atom"]),L.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function W(ie,z){ie.f=z}function B(ie,z){var j;if(ie.match(/^\\[a-zA-Z@]+/)){var I=ie.current().slice(1);return j=L.hasOwnProperty(I)?L[I]:L.DEFAULT,j=new j,ke(z,j),W(z,we),j.style}if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/\\]/))return"tag";if(ie.match("\\["))return W(z,function(te,Ae){return $(te,Ae,"\\]")}),"keyword";if(ie.match("\\("))return W(z,function(te,Ae){return $(te,Ae,"\\)")}),"keyword";if(ie.match("$$"))return W(z,function(te,Ae){return $(te,Ae,"$$")}),"keyword";if(ie.match("$"))return W(z,function(te,Ae){return $(te,Ae,"$")}),"keyword";var se=ie.next();if(se=="%")return ie.skipToEnd(),"comment";if(se=="}"||se=="]"){if(j=xe(z),j)j.closeBracket(se),W(z,we);else return"error";return"bracket"}else return se=="{"||se=="["?(j=L.DEFAULT,j=new j,ke(z,j),"bracket"):/\d/.test(se)?(ie.eatWhile(/[\w.%]/),"atom"):(ie.eatWhile(/[\w\-_]/),j=N(z),j.name=="begin"&&(j.argument=ie.current()),j.styleIdentifier())}function $(ie,z,j){if(ie.eatSpace())return null;if(j&&ie.match(j))return W(z,B),"keyword";if(ie.match(/^\\[a-zA-Z@]+/))return"tag";if(ie.match(/^[a-zA-Z]+/))return"variable-2";if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/]/))return"tag";if(ie.match(/^[\^_&]/))return"tag";if(ie.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ie.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=ie.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?(ie.skipToEnd(),"comment"):"error"}function we(ie,z){var j=ie.peek(),I;return j=="{"||j=="["?(I=xe(z),I.openBracket(j),ie.eat(j),W(z,B),"bracket"):/[ \t\r]/.test(j)?(ie.eat(j),null):(W(z,B),V(z),B(ie,z))}return{startState:function(){var ie=oe.inMathMode?function(z,j){return $(z,j)}:B;return{cmdState:[],f:ie}},copyState:function(ie){return{cmdState:ie.cmdState.slice(),f:ie.f}},token:function(ie,z){return z.f(ie,z)},blankLine:function(ie){ie.f=B,ie.cmdState.length=0},lineComment:"%"}}),U.defineMIME("text/x-stex","stex"),U.defineMIME("text/x-latex","stex")})},"19Vz":function(ct,$e,k){(function(U){U(k("VrN/"))})(function(U){U.defineOption("placeholder","",function(D,L,W){var B=W&&W!=U.Init;if(L&&!B)D.on("blur",xe),D.on("change",V),D.on("swapDoc",V),U.on(D.getInputField(),"compositionupdate",D.state.placeholderCompose=function(){ke(D)}),V(D);else if(!L&&B){D.off("blur",xe),D.off("change",V),D.off("swapDoc",V),U.off(D.getInputField(),"compositionupdate",D.state.placeholderCompose),me(D);var $=D.getWrapperElement();$.className=$.className.replace(" CodeMirror-empty","")}L&&!D.hasFocus()&&xe(D)});function me(D){D.state.placeholder&&(D.state.placeholder.parentNode.removeChild(D.state.placeholder),D.state.placeholder=null)}function oe(D){me(D);var L=D.state.placeholder=document.createElement("pre");L.style.cssText="height: 0; overflow: visible",L.style.direction=D.getOption("direction"),L.className="CodeMirror-placeholder CodeMirror-line-like";var W=D.getOption("placeholder");typeof W=="string"&&(W=document.createTextNode(W)),L.appendChild(W),D.display.lineSpace.insertBefore(L,D.display.lineSpace.firstChild)}function ke(D){setTimeout(function(){var L=!1,W=D.getInputField();W.nodeName=="TEXTAREA"?L=!W.value:D.lineCount()==1&&(L=!/[^\u200b]/.test(W.querySelector(".CodeMirror-line").textContent)),L?oe(D):me(D)},20)}function xe(D){N(D)&&oe(D)}function V(D){var L=D.getWrapperElement(),W=N(D);L.className=L.className.replace(" CodeMirror-empty","")+(W?" CodeMirror-empty":""),W?oe(D):me(D)}function N(D){return D.lineCount()===1&&D.getLine(0)===""}})},"1eCo":function(ct,$e,k){(function(U){U(k("VrN/"))})(function(U){"use strict";var me={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},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};U.defineMode("xml",function(ke,xe){var V=ke.indentUnit,N={},D=xe.htmlMode?me:oe;for(var L in D)N[L]=D[L];for(var L in xe)N[L]=xe[L];var W,B;function $(b,q){function F(P){return q.tokenize=P,P(b,q)}var x=b.next();if(x=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?F(z("atom","]]>")):null:b.match("--")?F(z("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),F(j(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),q.tokenize=z("meta","?>"),"meta"):(W=b.eat("/")?"closeTag":"openTag",q.tokenize=we,"tag bracket");if(x=="&"){var Z;return b.eat("#")?b.eat("x")?Z=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):Z=b.eatWhile(/[\d]/)&&b.eat(";"):Z=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),Z?"atom":"error"}else return b.eatWhile(/[^&<]/),null}$.isInText=!0;function we(b,q){var F=b.next();if(F==">"||F=="/"&&b.eat(">"))return q.tokenize=$,W=F==">"?"endTag":"selfcloseTag","tag bracket";if(F=="=")return W="equals",null;if(F=="<"){q.tokenize=$,q.state=Ae,q.tagName=q.tagStart=null;var x=q.tokenize(b,q);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(F)?(q.tokenize=ie(F),q.stringStartCol=b.column(),q.tokenize(b,q)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ie(b){var q=function(F,x){for(;!F.eol();)if(F.next()==b){x.tokenize=we;break}return"string"};return q.isInAttribute=!0,q}function z(b,q){return function(F,x){for(;!F.eol();){if(F.match(q)){x.tokenize=$;break}F.next()}return b}}function j(b){return function(q,F){for(var x;(x=q.next())!=null;){if(x=="<")return F.tokenize=j(b+1),F.tokenize(q,F);if(x==">")if(b==1){F.tokenize=$;break}else return F.tokenize=j(b-1),F.tokenize(q,F)}return"meta"}}function I(b,q,F){this.prev=b.context,this.tagName=q,this.indent=b.indented,this.startOfLine=F,(N.doNotIndent.hasOwnProperty(q)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function se(b){b.context&&(b.context=b.context.prev)}function te(b,q){for(var F;;){if(!b.context)return;if(F=b.context.tagName,!N.contextGrabbers.hasOwnProperty(F)||!N.contextGrabbers[F].hasOwnProperty(q))return;se(b)}}function Ae(b,q,F){return b=="openTag"?(F.tagStart=q.column(),He):b=="closeTag"?ce:Ae}function He(b,q,F){return b=="word"?(F.tagName=q.current(),B="tag",he):N.allowMissingTagName&&b=="endTag"?(B="tag bracket",he(b,q,F)):(B="error",He)}function ce(b,q,F){if(b=="word"){var x=q.current();return F.context&&F.context.tagName!=x&&N.implicitlyClosed.hasOwnProperty(F.context.tagName)&&se(F),F.context&&F.context.tagName==x||N.matchClosing===!1?(B="tag",_e):(B="tag error",je)}else return N.allowMissingTagName&&b=="endTag"?(B="tag bracket",_e(b,q,F)):(B="error",je)}function _e(b,q,F){return b!="endTag"?(B="error",_e):(se(F),Ae)}function je(b,q,F){return B="error",_e(b,q,F)}function he(b,q,F){if(b=="word")return B="attribute",pe;if(b=="endTag"||b=="selfcloseTag"){var x=F.tagName,Z=F.tagStart;return F.tagName=F.tagStart=null,b=="selfcloseTag"||N.autoSelfClosers.hasOwnProperty(x)?te(F,x):(te(F,x),F.context=new I(F,x,Z==F.indented)),Ae}return B="error",he}function pe(b,q,F){return b=="equals"?Oe:(N.allowMissing||(B="error"),he(b,q,F))}function Oe(b,q,F){return b=="string"?ae:b=="word"&&N.allowUnquoted?(B="string",he):(B="error",he(b,q,F))}function ae(b,q,F){return b=="string"?ae:he(b,q,F)}return{startState:function(b){var q={tokenize:$,state:Ae,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(q.baseIndent=b),q},token:function(b,q){if(!q.tagName&&b.sol()&&(q.indented=b.indentation()),b.eatSpace())return null;W=null;var F=q.tokenize(b,q);return(F||W)&&F!="comment"&&(B=null,q.state=q.state(W||F,b,q),B&&(F=B=="error"?F+" error":B)),F},indent:function(b,q,F){var x=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+V;if(x&&x.noIndent)return U.Pass;if(b.tokenize!=we&&b.tokenize!=$)return F?F.match(/^(\s*)/)[0].length:0;if(b.tagName)return N.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+V*(N.multilineTagIndentFactor||1);if(N.alignCDATA&&/<!\[CDATA\[/.test(q))return 0;var Z=q&&/^<(\/)?([\w_:\.-]*)/.exec(q);if(Z&&Z[1])for(;x;)if(x.tagName==Z[2]){x=x.prev;break}else if(N.implicitlyClosed.hasOwnProperty(x.tagName))x=x.prev;else break;else if(Z)for(;x;){var P=N.contextGrabbers[x.tagName];if(P&&P.hasOwnProperty(Z[2]))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+V:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:N.htmlMode?"html":"xml",helperType:N.htmlMode?"html":"xml",skipAttribute:function(b){b.state==Oe&&(b.state=he)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var q=[],F=b.context;F;F=F.prev)F.tagName&&q.push(F.tagName);return q.reverse()}}}),U.defineMIME("text/xml","xml"),U.defineMIME("application/xml","xml"),U.mimeModes.hasOwnProperty("text/html")||U.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7ahc":function(ct,$e,k){"use strict";k.d($e,"a",function(){return He});var U=k("k1fw"),me=k("0Owb"),oe=k("+L6B"),ke=k("2/Rp"),xe=k("y8nQ"),V=k("Vl3Y"),N=k("tJVT"),D=k("OaEy"),L=k("2fM7"),W=k("q1tI"),B=k.n(W),$=k("VrN/"),we=k.n($),ie=k("p77/"),z=k.n(ie),j=k("c5Ni"),I=k.n(j),se=L.a.Option,te={labelCol:{span:4},wrapperCol:{span:20}},Ae={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"]};$e.b=function(ce){var _e=ce.callback,je=ce.onCancel,he=Object(W.useState)("python"),pe=Object(N.a)(he,2),Oe=pe[0],ae=pe[1];function b(F){ae(Ae[F][1])}function q(F){_e(F)}return B.a.createElement(V.a,Object(me.a)({},te,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:q}),B.a.createElement(V.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},B.a.createElement(L.a,{onChange:b},Object.keys(Ae).map(function(F){return B.a.createElement(se,{key:F,value:F},Ae[F][0])}))),B.a.createElement(V.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},B.a.createElement(He,{mode:Oe})),B.a.createElement("div",{className:"flex-container flex-end"},B.a.createElement(ke.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),B.a.createElement(ke.a,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function He(ce){var _e=ce.value,je=ce.onChange,he=ce.mode,pe=ce.options,Oe=pe===void 0?{}:pe,ae=Object(W.useRef)(),b=Object(W.useState)(),q=Object(N.a)(b,2),F=q[0],x=q[1];return Object(W.useEffect)(function(){if(F){function Z(P){var A=P.getValue();je&&je(A)}return F.on("change",Z),function(){F.off("change",Z)}}},[F,je]),Object(W.useEffect)(function(){F&&F.setOption("mode",he)},[F,he]),Object(W.useEffect)(function(){F&&((_e!==F.getValue()||_e==="")&&setTimeout(function(){F.setValue(_e||" ")},300))},[F,_e]),Object(W.useEffect)(function(){if(ae.current&&!F){var Z=we.a.fromTextArea(ae.current,Object(U.a)({mode:he,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Oe));x(Z)}},[ae.current,F]),B.a.createElement("div",{className:"my-codemirror-container"},B.a.createElement("textarea",{ref:ae}))}},"7ixt":function(ct,$e,k){"use strict";k.d($e,"a",function(){return oe});var U={adjustX:1,adjustY:1},me=[0,0],oe={left:{points:["cr","cl"],overflow:U,offset:[-4,0],targetOffset:me},right:{points:["cl","cr"],overflow:U,offset:[4,0],targetOffset:me},top:{points:["bc","tc"],overflow:U,offset:[0,-4],targetOffset:me},bottom:{points:["tc","bc"],overflow:U,offset:[0,4],targetOffset:me},topLeft:{points:["bl","tl"],overflow:U,offset:[0,-4],targetOffset:me},leftTop:{points:["tr","tl"],overflow:U,offset:[-4,0],targetOffset:me},topRight:{points:["br","tr"],overflow:U,offset:[0,-4],targetOffset:me},rightTop:{points:["tl","tr"],overflow:U,offset:[4,0],targetOffset:me},bottomRight:{points:["tr","br"],overflow:U,offset:[0,4],targetOffset:me},rightBottom:{points:["bl","br"],overflow:U,offset:[4,0],targetOffset:me},bottomLeft:{points:["tl","bl"],overflow:U,offset:[0,4],targetOffset:me},leftBottom:{points:["br","bl"],overflow:U,offset:[-4,0],targetOffset:me}},ke=oe},"8EBN":function(ct,$e,k){(function(U){U(k("VrN/"))})(function(U){"use strict";U.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 me=0;me<U.modeInfo.length;me++){var oe=U.modeInfo[me];oe.mimes&&(oe.mime=oe.mimes[0])}U.findModeByMIME=function(ke){ke=ke.toLowerCase();for(var xe=0;xe<U.modeInfo.length;xe++){var V=U.modeInfo[xe];if(V.mime==ke)return V;if(V.mimes){for(var N=0;N<V.mimes.length;N++)if(V.mimes[N]==ke)return V}}if(/\+xml$/.test(ke))return U.findModeByMIME("application/xml");if(/\+json$/.test(ke))return U.findModeByMIME("application/json")},U.findModeByExtension=function(ke){ke=ke.toLowerCase();for(var xe=0;xe<U.modeInfo.length;xe++){var V=U.modeInfo[xe];if(V.ext){for(var N=0;N<V.ext.length;N++)if(V.ext[N]==ke)return V}}},U.findModeByFileName=function(ke){for(var xe=0;xe<U.modeInfo.length;xe++){var V=U.modeInfo[xe];if(V.file&&V.file.test(ke))return V}var N=ke.lastIndexOf("."),D=N>-1&&ke.substring(N+1,ke.length);if(D)return U.findModeByExtension(D)},U.findModeByName=function(ke){ke=ke.toLowerCase();for(var xe=0;xe<U.modeInfo.length;xe++){var V=U.modeInfo[xe];if(V.name.toLowerCase()==ke)return V;if(V.alias){for(var N=0;N<V.alias.length;N++)if(V.alias[N].toLowerCase()==ke)return V}}}})},"9Bee":function(ct,$e,k){"use strict";var U=k("k1fw"),me=k("tJVT"),oe=k("q1tI"),ke=k.n(oe),xe=k("vg9a"),V=k("DlQD"),N=k.n(V),D=k("rUJ1");function L(p,w){var R=p.match(/^(\s+)(?:```)/);if(R===null)return w;var ne=R[1];return w.split(`
|
|
`).map(function(ye){var ee=ye.match(/^\s+/);if(ee===null)return ye;var ge=Object(me.a)(ee,1),le=ge[0];return le.length>=ne.length?ye.slice(ne.length):ye}).join(`
|
|
`)}var W=[],B=["<ul>"],$=new N.a.Renderer,we=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ie(){W.length=0,B=["<ul>"]}var z={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function j(p,w,R,ne){if(w>=p.length||p[w].level<=R)return w;var ye=p[w];ne.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),w++;var ee=[];return w=j(p,w,ye.level,ee),ee.length>0&&(ne.push("<ul>"),ee.forEach(function(ge){ne.push(ge)}),ne.push("</ul>")),ne.push("</li>"),w=j(p,w,R,ne),w}function I(){return j(W,0,0,B),B.push("</ul>"),B.join("")}var se={heading:function(w){var R=we.exec(w);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(w){var R=this.rules.block.fences.exec(w);if(R){var ne=R[0],ye=L(ne,R[3]||""),ee=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(ee)>=0){var ge=He(),le=ye;ye=ge,ce[ge]={type:"block",expression:le}}return{type:"code",raw:ne,lang:ee,text:ye}}}},te=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Ae=0,He=function(){return"__special_katext_id_".concat(Ae++,"__")},ce={};function _e(){return ce}function je(){Ae=0,ce={}}function he(p){return p=p.replace(te,function(w,R){var ne=He();return ce[ne]={type:"inline",expression:R},ne}),p}var pe=$.listitem;$.listitem=function(p){return pe(he(p))};var Oe=$.paragraph;$.paragraph=function(p){return Oe(he(p))};var ae=$.tablecell;$.tablecell=function(p,w){return ae(he(p),w)},$.code=function(p,w,R){var ne=(w||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"<p class='editormd-tex'>".concat(p,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(w,'">').concat(R?p:Object(D.escape)(p,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(R?p:Object(D.escape)(p,!0))+"</code></pre>"},$.heading=function(p,w,R){var ne=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return W.push({anchor:ne,level:w,text:p}),"<h"+w+' id="'+ne+'">'+p+"</h"+w+">"},N.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),N.a.use({tokenizer:se,renderer:$});var b=N.a,q=k("SJMd"),F=k("ulZh"),x=k.n(F),Z=k("m3rI"),P=k("Oy/b"),A=k("p5ED"),S=/<pre[^>]*>/g;function c(p){var w=document.createElement("div");return w.innerHTML=p,w.childNodes.length===0?"":w.childNodes[0].nodeValue}var s=$e.a=function(p){var w=p.value,R=w===void 0?"":w,ne=p.className,ye=p.showTextOnly,ee=p.showLines,ge=p.style,le=ge===void 0?{}:ge,re=p.stylesPrev,H=re===void 0?{}:re,J=String(R),m=Object(oe.useState)(""),O=Object(me.a)(m,2),v=O[0],Q=O[1],de=Object(oe.useMemo)(function(){try{var Ne=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,De=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ce=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;J=J.replace(Ne,"("+Z.a.API_SERVER+"/api/attachments/").replace(De,'"'+Z.a.API_SERVER+"/api/attachments/").replace(Ce,'"'+Z.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
|
|
`),J=J.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(Ye){}var Se=b(J),Je=_e();if(J.match(/\[TOC\]/)&&(Se=Se.replace("<p>[TOC]</p>",I()),ie()),Se=Se.replace(/(__special_katext_id_\d+__)/g,function(Ye,Ke){var it=Je[Ke],Qe=it.type,Ze=it.expression;return Object(P.renderToString)(c(Ze)||"",{displayMode:Qe==="block",throwOnError:!1,output:"html"})}),Se=Se.replace(/▁/g,"\u2581\u2581\u2581"),je(),ye){var Ge=document.createElement("div");return Ge.innerHTML=Se,Ge.innerText}return setTimeout(function(){return Te()},500),Se},[J]),K=Object(oe.useRef)();z.WebkitLineClamp=ee,ee&&(le=Object(U.a)(Object(U.a)({},le),z));function fe(Ne){var De=Ne.target;if(De.tagName.toUpperCase()==="A"){var Ce=De.getAttribute("href");if(Ce.indexOf("office")>-1)Ne.preventDefault(),Q(Ce);else if(Ce.startsWith("#")){Ne.preventDefault();var Se=document.getElementById(Ce.replace("#",""));Se&&Se.scrollIntoView(!0)}}}var Te=function(){var De,Ce=(De=K.current)===null||De===void 0?void 0:De.querySelectorAll("video");Ce==null||Ce.forEach(function(Se){if(Se.oncontextmenu=function(){return!1},Se.src.indexOf(".m3u8")>-1&&!Se.canPlayType("application/vnd.apple.mpegurl")){if(x.a.isSupported()){var Je=new x.a;Je.loadSource(Se.src),Je.attachMedia(Se)}}})};return Object(oe.useEffect)(function(){if(K.current&&de&&(de.match(S)&&window.PR.prettyPrint()),K.current)return K.current.addEventListener("click",fe),function(){K.current.removeEventListener("click",fe),je(),ie()}},[de,K.current,fe]),ke.a.createElement(ke.a.Fragment,null,ke.a.createElement("div",{ref:K,style:Object(U.a)({},le),className:"".concat(ne||""," markdown-body "),dangerouslySetInnerHTML:{__html:de}}),ke.a.createElement(A.a,{close:!0,data:v,type:v!=null&&v.length?"office":"",style:Object(U.a)({},H),onClose:function(){return Q("")}}))}},"9VGf":function(ct,$e,k){"use strict";k.d($e,"a",function(){return oe});var U=k("q1tI"),me=k.n(U);function oe(ke,xe){var V=Object(U.useRef)();Object(U.useEffect)(function(){V.current=ke}),Object(U.useEffect)(function(){function N(){V.current()}if(xe!==null){var D=setInterval(N,xe);return function(){return clearInterval(D)}}},[xe])}},"9ivq":function(ct,$e,k){},Bd2K:function(ct,$e,k){(function(U){U(k("VrN/"),k("osHv"))})(function(U){U.defineOption("autoCloseTags",!1,function(L,W,B){if(B!=U.Init&&B&&L.removeKeyMap("autoCloseTags"),!W)return;var $={name:"autoCloseTags"};(typeof W!="object"||W.whenClosing!==!1)&&($["'/'"]=function(we){return V(we)}),(typeof W!="object"||W.whenOpening!==!1)&&($["'>'"]=function(we){return ke(we)}),L.addKeyMap($)});var me=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["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 ke(L){if(L.getOption("disableInput"))return U.Pass;for(var W=L.listSelections(),B=[],$=L.getOption("autoCloseTags"),we=0;we<W.length;we++){if(!W[we].empty())return U.Pass;var ie=W[we].head,z=L.getTokenAt(ie),j=U.innerMode(L.getMode(),z.state),I=j.state,se=j.mode.xmlCurrentTag&&j.mode.xmlCurrentTag(I),te=se&&se.name;if(!te)return U.Pass;var Ae=j.mode.configuration=="html",He=typeof $=="object"&&$.dontCloseTags||Ae&&me,ce=typeof $=="object"&&$.indentTags||Ae&&oe;z.end>ie.ch&&(te=te.slice(0,te.length-z.end+ie.ch));var _e=te.toLowerCase();if(!te||z.type=="string"&&(z.end!=ie.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&se.close||z.string.indexOf("/")==ie.ch-z.start-1||He&&N(He,_e)>-1||D(L,j.mode.xmlCurrentContext&&j.mode.xmlCurrentContext(I)||[],te,ie,!0))return U.Pass;var je=typeof $=="object"&&$.emptyTags;if(je&&N(je,te)>-1){B[we]={text:"/>",newPos:U.Pos(ie.line,ie.ch+2)};continue}var he=ce&&N(ce,_e)>-1;B[we]={indent:he,text:">"+(he?`
|
|
|
|
`:"")+"</"+te+">",newPos:he?U.Pos(ie.line+1,0):U.Pos(ie.line,ie.ch+1)}}for(var pe=typeof $=="object"&&$.dontIndentOnAutoClose,we=W.length-1;we>=0;we--){var Oe=B[we];L.replaceRange(Oe.text,W[we].head,W[we].anchor,"+insert");var ae=L.listSelections().slice(0);ae[we]={head:Oe.newPos,anchor:Oe.newPos},L.setSelections(ae),!pe&&Oe.indent&&(L.indentLine(Oe.newPos.line,null,!0),L.indentLine(Oe.newPos.line+1,null,!0))}}function xe(L,W){for(var B=L.listSelections(),$=[],we=W?"/":"</",ie=L.getOption("autoCloseTags"),z=typeof ie=="object"&&ie.dontIndentOnSlash,j=0;j<B.length;j++){if(!B[j].empty())return U.Pass;var I=B[j].head,se=L.getTokenAt(I),te=U.innerMode(L.getMode(),se.state),Ae=te.state;if(W&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=I.ch-1))return U.Pass;var He,ce=te.mode.name!="xml"&&L.getMode().name=="htmlmixed";if(ce&&te.mode.name=="javascript")He=we+"script";else if(ce&&te.mode.name=="css")He=we+"style";else{var _e=te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(Ae);if(!_e||_e.length&&D(L,_e,_e[_e.length-1],I))return U.Pass;He=we+_e[_e.length-1]}L.getLine(I.line).charAt(se.end)!=">"&&(He+=">"),$[j]=He}if(L.replaceSelections($),B=L.listSelections(),!z)for(var j=0;j<B.length;j++)(j==B.length-1||B[j].head.line<B[j+1].head.line)&&L.indentLine(B[j].head.line)}function V(L){return L.getOption("disableInput")?U.Pass:xe(L,!0)}U.commands.closeTag=function(L){return xe(L)};function N(L,W){if(L.indexOf)return L.indexOf(W);for(var B=0,$=L.length;B<$;++B)if(L[B]==W)return B;return-1}function D(L,W,B,$,we){if(!U.scanForClosingTag)return!1;var ie=Math.min(L.lastLine()+1,$.line+500),z=U.scanForClosingTag(L,$,null,ie);if(!z||z.tag!=B)return!1;for(var j=we?1:0,I=W.length-1;I>=0&&W[I]==B;I--)++j;$=z.to;for(var I=1;I<j;I++){var se=U.scanForClosingTag(L,$,null,ie);if(!se||se.tag!=B)return!1;$=se.to}return!0}})},BjJ7:function(ct,$e,k){"use strict";k.d($e,"d",function(){return me}),k.d($e,"c",function(){return oe}),k.d($e,"e",function(){return ke}),k.d($e,"b",function(){return xe}),k.d($e,"a",function(){return N});var U=k("m3rI");function me(D){var L=!0;if(D.length>0){for(var W=0;W<D.length;W++)if(D[W].compile_success==0||!D[W].compile_success){L=!1;break}}else L=!1;return L}function oe(D){for(var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",W=[],B=0;B<D.length;B++){var $=D[B],we=L?"".concat(L,"/").concat($.name):"".concat($.name);W.push({title:$.name,isLeaf:!($.type==="tree"),key:we})}return W}function ke(D,L,W){for(var B=0;B<D.length;B++){var $=D[B];if($.key===L){$.children=W;break}$.children&&ke($.children,L,W)}return D}function xe(D,L,W){var B;return function(){var $=this,we=arguments,ie=function(){B=null,W||D.apply($,we)},z=W&&!B;clearTimeout(B),B=setTimeout(ie,L),z&&D.apply($,we)}}var V=!0,N=U.a.API_SERVER},"C+DQ":function(ct,$e,k){},DlQD:function(ct,$e,k){(function(U,me){ct.exports=me()})(this,function(){"use strict";function U(C,T){for(var M=0;M<T.length;M++){var f=T[M];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(C,f.key,f)}}function me(C,T,M){return T&&U(C.prototype,T),M&&U(C,M),C}function oe(C,T){if(!C)return;if(typeof C=="string")return ke(C,T);var M=Object.prototype.toString.call(C).slice(8,-1);if(M==="Object"&&C.constructor&&(M=C.constructor.name),M==="Map"||M==="Set")return Array.from(C);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return ke(C,T)}function ke(C,T){(T==null||T>C.length)&&(T=C.length);for(var M=0,f=new Array(T);M<T;M++)f[M]=C[M];return f}function xe(C,T){var M;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(M=oe(C))||T&&C&&typeof C.length=="number"){M&&(C=M);var f=0;return function(){return f>=C.length?{done:!0}:{done:!1,value:C[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return M=C[Symbol.iterator](),M.next.bind(M)}function V(C,T){return T={exports:{}},C(T,T.exports),T.exports}var N=V(function(C){function T(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function M(f){C.exports.defaults=f}C.exports={defaults:T(),getDefaults:T,changeDefaults:M}}),D=N.defaults,L=N.getDefaults,W=N.changeDefaults,B=/[&<>"']/,$=/[&<>"']/g,we=/[<>"']|&(?!#?\w+;)/,ie=/[<>"']|&(?!#?\w+;)/g,z={"&":"&","<":"<",">":">",'"':""","'":"'"},j=function(T){return z[T]};function I(C,T){if(T){if(B.test(C))return C.replace($,j)}else if(we.test(C))return C.replace(ie,j);return C}var se=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function te(C){return C.replace(se,function(T,M){return M=M.toLowerCase(),M==="colon"?":":M.charAt(0)==="#"?M.charAt(1)==="x"?String.fromCharCode(parseInt(M.substring(2),16)):String.fromCharCode(+M.substring(1)):""})}var Ae=/(^|[^\[])\^/g;function He(C,T){C=C.source||C,T=T||"";var M={replace:function(h,g){return g=g.source||g,g=g.replace(Ae,"$1"),C=C.replace(h,g),M},getRegex:function(){return new RegExp(C,T)}};return M}var ce=/[^\w:]/g,_e=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function je(C,T,M){if(C){var f;try{f=decodeURIComponent(te(M)).replace(ce,"").toLowerCase()}catch(h){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}T&&!_e.test(M)&&(M=b(T,M));try{M=encodeURI(M).replace(/%25/g,"%")}catch(h){return null}return M}var he={},pe=/^[^:]+:\/*[^/]*$/,Oe=/^([^:]+:)[\s\S]*$/,ae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(C,T){he[" "+C]||(pe.test(C)?he[" "+C]=C+"/":he[" "+C]=Z(C,"/",!0)),C=he[" "+C];var M=C.indexOf(":")===-1;return T.substring(0,2)==="//"?M?T:C.replace(Oe,"$1")+T:T.charAt(0)==="/"?M?T:C.replace(ae,"$1")+T:C+T}var q={exec:function(){}};function F(C){for(var T=1,M,f;T<arguments.length;T++){M=arguments[T];for(f in M)Object.prototype.hasOwnProperty.call(M,f)&&(C[f]=M[f])}return C}function x(C,T){var M=C.replace(/\|/g,function(g,y,G){for(var ue=!1,Me=y;--Me>=0&&G[Me]==="\\";)ue=!ue;return ue?"|":" |"}),f=M.split(/ \|/),h=0;if(f.length>T)f.splice(T);else for(;f.length<T;)f.push("");for(;h<f.length;h++)f[h]=f[h].trim().replace(/\\\|/g,"|");return f}function Z(C,T,M){var f=C.length;if(f===0)return"";for(var h=0;h<f;){var g=C.charAt(f-h-1);if(g===T&&!M)h++;else if(g!==T&&M)h++;else break}return C.substr(0,f-h)}function P(C,T){if(C.indexOf(T[1])===-1)return-1;for(var M=C.length,f=0,h=0;h<M;h++)if(C[h]==="\\")h++;else if(C[h]===T[0])f++;else if(C[h]===T[1]&&(f--,f<0))return h;return-1}function A(C){C&&C.sanitize&&!C.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 S={escape:I,unescape:te,edit:He,cleanUrl:je,resolveUrl:b,noopTest:q,merge:F,splitCells:x,rtrim:Z,findClosingBracket:P,checkSanitizeDeprecation:A},c=N.defaults,s=S.rtrim,p=S.splitCells,w=S.escape,R=S.findClosingBracket;function ne(C,T,M){var f=T.href,h=T.title?w(T.title):null,g=C[1].replace(/\\([\[\]])/g,"$1");return C[0].charAt(0)!=="!"?{type:"link",raw:M,href:f,title:h,text:g}:{type:"image",raw:M,href:f,title:h,text:w(g)}}function ye(C,T){var M=C.match(/^(\s+)(?:```)/);if(M===null)return T;var f=M[1];return T.split(`
|
|
`).map(function(h){var g=h.match(/^\s+/);if(g===null)return h;var y=g[0];return y.length>=f.length?h.slice(f.length):h}).join(`
|
|
`)}var ee=function(){function C(M){this.options=M||c}var T=C.prototype;return T.space=function(f){var h=this.rules.block.newline.exec(f);if(h)return h[0].length>1?{type:"space",raw:h[0]}:{raw:`
|
|
`}},T.code=function(f,h){var g=this.rules.block.code.exec(f);if(g){var y=h[h.length-1];if(y&&y.type==="paragraph")return{raw:g[0],text:g[0].trimRight()};var G=g[0].replace(/^ {4}/gm,"");return{type:"code",raw:g[0],codeBlockStyle:"indented",text:this.options.pedantic?G:s(G,`
|
|
`)}}},T.fences=function(f){var h=this.rules.block.fences.exec(f);if(h){var g=h[0],y=ye(g,h[3]||"");return{type:"code",raw:g,lang:h[2]?h[2].trim():h[2],text:y}}},T.heading=function(f){var h=this.rules.block.heading.exec(f);if(h)return{type:"heading",raw:h[0],depth:h[1].length,text:h[2]}},T.nptable=function(f){var h=this.rules.block.nptable.exec(f);if(h){var g={type:"table",header:p(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[],raw:h[0]};if(g.header.length===g.align.length){var y=g.align.length,G;for(G=0;G<y;G++)/^ *-+: *$/.test(g.align[G])?g.align[G]="right":/^ *:-+: *$/.test(g.align[G])?g.align[G]="center":/^ *:-+ *$/.test(g.align[G])?g.align[G]="left":g.align[G]=null;for(y=g.cells.length,G=0;G<y;G++)g.cells[G]=p(g.cells[G],g.header.length);return g}}},T.hr=function(f){var h=this.rules.block.hr.exec(f);if(h)return{type:"hr",raw:h[0]}},T.blockquote=function(f){var h=this.rules.block.blockquote.exec(f);if(h){var g=h[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:h[0],text:g}}},T.list=function(f){var h=this.rules.block.list.exec(f);if(h){for(var g=h[0],y=h[2],G=y.length>1,ue=y[y.length-1]===")",Me={type:"list",raw:g,ordered:G,start:G?+y.slice(0,-1):"",loose:!1,items:[]},Xe=h[0].match(this.rules.block.item),st=!1,ze,kt,pt,at,Dt,bt,yt,St=Xe.length,mt=0;mt<St;mt++)ze=Xe[mt],g=ze,kt=ze.length,ze=ze.replace(/^ *([*+-]|\d+[.)]) */,""),~ze.indexOf(`
|
|
`)&&(kt-=ze.length,ze=this.options.pedantic?ze.replace(/^ {1,4}/gm,""):ze.replace(new RegExp("^ {1,"+kt+"}","gm"),"")),mt!==St-1&&(pt=this.rules.block.bullet.exec(Xe[mt+1])[0],(G?pt.length===1||!ue&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==y)&&(at=Xe.slice(mt+1).join(`
|
|
`),Me.raw=Me.raw.substring(0,Me.raw.length-at.length),mt=St-1)),Dt=st||/\n\n(?!\s*$)/.test(ze),mt!==St-1&&(st=ze.charAt(ze.length-1)===`
|
|
`,Dt||(Dt=st)),Dt&&(Me.loose=!0),bt=/^\[[ xX]\] /.test(ze),yt=void 0,bt&&(yt=ze[1]!==" ",ze=ze.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:g,task:bt,checked:yt,loose:Dt,text:ze});return Me}},T.html=function(f){var h=this.rules.block.html.exec(f);if(h)return{type:this.options.sanitize?"paragraph":"html",raw:h[0],pre:!this.options.sanitizer&&(h[1]==="pre"||h[1]==="script"||h[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(h[0]):w(h[0]):h[0]}},T.def=function(f){var h=this.rules.block.def.exec(f);if(h){h[3]&&(h[3]=h[3].substring(1,h[3].length-1));var g=h[1].toLowerCase().replace(/\s+/g," ");return{tag:g,raw:h[0],href:h[2],title:h[3]}}},T.table=function(f){var h=this.rules.block.table.exec(f);if(h){var g={type:"table",header:p(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[]};if(g.header.length===g.align.length){g.raw=h[0];var y=g.align.length,G;for(G=0;G<y;G++)/^ *-+: *$/.test(g.align[G])?g.align[G]="right":/^ *:-+: *$/.test(g.align[G])?g.align[G]="center":/^ *:-+ *$/.test(g.align[G])?g.align[G]="left":g.align[G]=null;for(y=g.cells.length,G=0;G<y;G++)g.cells[G]=p(g.cells[G].replace(/^ *\| *| *\| *$/g,""),g.header.length);return g}}},T.lheading=function(f){var h=this.rules.block.lheading.exec(f);if(h)return{type:"heading",raw:h[0],depth:h[2].charAt(0)==="="?1:2,text:h[1]}},T.paragraph=function(f){var h=this.rules.block.paragraph.exec(f);if(h)return{type:"paragraph",raw:h[0],text:h[1].charAt(h[1].length-1)===`
|
|
`?h[1].slice(0,-1):h[1]}},T.text=function(f,h){var g=this.rules.block.text.exec(f);if(g){var y=h[h.length-1];return y&&y.type==="text"?{raw:g[0],text:g[0]}:{type:"text",raw:g[0],text:g[0]}}},T.escape=function(f){var h=this.rules.inline.escape.exec(f);if(h)return{type:"escape",raw:h[0],text:w(h[1])}},T.tag=function(f,h,g){var y=this.rules.inline.tag.exec(f);if(y)return!h&&/^<a /i.test(y[0])?h=!0:h&&/^<\/a>/i.test(y[0])&&(h=!1),!g&&/^<(pre|code|kbd|script)(\s|>)/i.test(y[0])?g=!0:g&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(y[0])&&(g=!1),{type:this.options.sanitize?"text":"html",raw:y[0],inLink:h,inRawBlock:g,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):w(y[0]):y[0]}},T.link=function(f){var h=this.rules.inline.link.exec(f);if(h){var g=R(h[2],"()");if(g>-1){var y=h[0].indexOf("!")===0?5:4,G=y+h[1].length+g;h[2]=h[2].substring(0,g),h[0]=h[0].substring(0,G).trim(),h[3]=""}var ue=h[2],Me="";if(this.options.pedantic){var Xe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ue);Xe?(ue=Xe[1],Me=Xe[3]):Me=""}else Me=h[3]?h[3].slice(1,-1):"";ue=ue.trim().replace(/^<([\s\S]*)>$/,"$1");var st=ne(h,{href:ue&&ue.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},h[0]);return st}},T.reflink=function(f,h){var g;if((g=this.rules.inline.reflink.exec(f))||(g=this.rules.inline.nolink.exec(f))){var y=(g[2]||g[1]).replace(/\s+/g," ");if(y=h[y.toLowerCase()],!y||!y.href){var G=g[0].charAt(0);return{type:"text",raw:G,text:G}}var ue=ne(g,y,g[0]);return ue}},T.strong=function(f,h,g){g===void 0&&(g="");var y=this.rules.inline.strong.start.exec(f);if(y&&(!y[1]||y[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){h=h.slice(-1*f.length);var G=y[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;G.lastIndex=0;for(var ue;(y=G.exec(h))!=null;)if(ue=this.rules.inline.strong.middle.exec(h.slice(0,y.index+3)),ue)return{type:"strong",raw:f.slice(0,ue[0].length),text:f.slice(2,ue[0].length-2)}}},T.em=function(f,h,g){g===void 0&&(g="");var y=this.rules.inline.em.start.exec(f);if(y&&(!y[1]||y[1]&&(g===""||this.rules.inline.punctuation.exec(g)))){h=h.slice(-1*f.length);var G=y[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;G.lastIndex=0;for(var ue;(y=G.exec(h))!=null;)if(ue=this.rules.inline.em.middle.exec(h.slice(0,y.index+2)),ue)return{type:"em",raw:f.slice(0,ue[0].length),text:f.slice(1,ue[0].length-1)}}},T.codespan=function(f){var h=this.rules.inline.code.exec(f);if(h){var g=h[2].replace(/\n/g," "),y=/[^ ]/.test(g),G=g.startsWith(" ")&&g.endsWith(" ");return y&&G&&(g=g.substring(1,g.length-1)),g=w(g,!0),{type:"codespan",raw:h[0],text:g}}},T.br=function(f){var h=this.rules.inline.br.exec(f);if(h)return{type:"br",raw:h[0]}},T.del=function(f){var h=this.rules.inline.del.exec(f);if(h)return{type:"del",raw:h[0],text:h[1]}},T.autolink=function(f,h){var g=this.rules.inline.autolink.exec(f);if(g){var y,G;return g[2]==="@"?(y=w(this.options.mangle?h(g[1]):g[1]),G="mailto:"+y):(y=w(g[1]),G=y),{type:"link",raw:g[0],text:y,href:G,tokens:[{type:"text",raw:y,text:y}]}}},T.url=function(f,h){var g;if(g=this.rules.inline.url.exec(f)){var y,G;if(g[2]==="@")y=w(this.options.mangle?h(g[0]):g[0]),G="mailto:"+y;else{var ue;do ue=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(ue!==g[0]);y=w(g[0]),g[1]==="www."?G="http://"+y:G=y}return{type:"link",raw:g[0],text:y,href:G,tokens:[{type:"text",raw:y,text:y}]}}},T.inlineText=function(f,h,g){var y=this.rules.inline.text.exec(f);if(y){var G;return h?G=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(y[0]):w(y[0]):y[0]:G=w(this.options.smartypants?g(y[0]):y[0]),{type:"text",raw:y[0],text:G}}},C}(),ge=S.noopTest,le=S.edit,re=S.merge,H={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:ge,table:ge,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};H._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,H._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,H.def=le(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=le(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=le(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=/<!--(?!-?>)[\s\S]*?-->/,H.html=le(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=le(H._paragraph).replace("hr",H.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",H._tag).getRegex(),H.blockquote=le(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=re({},H),H.gfm=re({},H.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*|$)"}),H.gfm.nptable=le(H.gfm.nptable).replace("hr",H.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",H._tag).getRegex(),H.gfm.table=le(H.gfm.table).replace("hr",H.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",H._tag).getRegex(),H.pedantic=re({},H.normal,{html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",H._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:ge,paragraph:le(H.normal._paragraph).replace("hr",H.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var J={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ge,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:ge,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};J._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",J.punctuation=le(J.punctuation).replace(/punctuation/g,J._punctuation).getRegex(),J._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",J._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",J.em.start=le(J.em.start).replace(/punctuation/g,J._punctuation).getRegex(),J.em.middle=le(J.em.middle).replace(/punctuation/g,J._punctuation).replace(/overlapSkip/g,J._overlapSkip).getRegex(),J.em.endAst=le(J.em.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.em.endUnd=le(J.em.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.start=le(J.strong.start).replace(/punctuation/g,J._punctuation).getRegex(),J.strong.middle=le(J.strong.middle).replace(/punctuation/g,J._punctuation).replace(/blockSkip/g,J._blockSkip).getRegex(),J.strong.endAst=le(J.strong.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.endUnd=le(J.strong.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.blockSkip=le(J._blockSkip,"g").getRegex(),J.overlapSkip=le(J._overlapSkip,"g").getRegex(),J._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,J._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,J._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,J.autolink=le(J.autolink).replace("scheme",J._scheme).replace("email",J._email).getRegex(),J._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,J.tag=le(J.tag).replace("comment",H._comment).replace("attribute",J._attribute).getRegex(),J._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,J._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,J.link=le(J.link).replace("label",J._label).replace("href",J._href).replace("title",J._title).getRegex(),J.reflink=le(J.reflink).replace("label",J._label).getRegex(),J.reflinkSearch=le(J.reflinkSearch,"g").replace("reflink",J.reflink).replace("nolink",J.nolink).getRegex(),J.normal=re({},J),J.pedantic=re({},J.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",J._label).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J._label).getRegex()}),J.gfm=re({},J.normal,{escape:le(J.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),J.gfm.url=le(J.gfm.url,"i").replace("email",J.gfm._extended_email).getRegex(),J.breaks=re({},J.gfm,{br:le(J.br).replace("{2,}","*").getRegex(),text:le(J.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var m={block:H,inline:J},O=N.defaults,v=m.block,Q=m.inline;function de(C){return C.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 K(C){var T="",M,f,h=C.length;for(M=0;M<h;M++)f=C.charCodeAt(M),Math.random()>.5&&(f="x"+f.toString(16)),T+="&#"+f+";";return T}var fe=function(){function C(M){this.tokens=[],this.tokens.links=Object.create(null),this.options=M||O,this.options.tokenizer=this.options.tokenizer||new ee,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:v.normal,inline:Q.normal};this.options.pedantic?(f.block=v.pedantic,f.inline=Q.pedantic):this.options.gfm&&(f.block=v.gfm,this.options.breaks?f.inline=Q.breaks:f.inline=Q.gfm),this.tokenizer.rules=f}C.lex=function(f,h){var g=new C(h);return g.lex(f)};var T=C.prototype;return T.lex=function(f){return f=f.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},T.blockTokens=function(f,h,g){h===void 0&&(h=[]),g===void 0&&(g=!0),f=f.replace(/^ +$/gm,"");for(var y,G,ue,Me;f;){if(y=this.tokenizer.space(f)){f=f.substring(y.raw.length),y.type&&h.push(y);continue}if(y=this.tokenizer.code(f,h)){f=f.substring(y.raw.length),y.type?h.push(y):(Me=h[h.length-1],Me.raw+=`
|
|
`+y.raw,Me.text+=`
|
|
`+y.text);continue}if(y=this.tokenizer.fences(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.heading(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.nptable(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.hr(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.blockquote(f)){f=f.substring(y.raw.length),y.tokens=this.blockTokens(y.text,[],g),h.push(y);continue}if(y=this.tokenizer.list(f)){for(f=f.substring(y.raw.length),ue=y.items.length,G=0;G<ue;G++)y.items[G].tokens=this.blockTokens(y.items[G].text,[],!1);h.push(y);continue}if(y=this.tokenizer.html(f)){f=f.substring(y.raw.length),h.push(y);continue}if(g&&(y=this.tokenizer.def(f))){f=f.substring(y.raw.length),this.tokens.links[y.tag]||(this.tokens.links[y.tag]={href:y.href,title:y.title});continue}if(y=this.tokenizer.table(f)){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.lheading(f)){f=f.substring(y.raw.length),h.push(y);continue}if(g&&(y=this.tokenizer.paragraph(f))){f=f.substring(y.raw.length),h.push(y);continue}if(y=this.tokenizer.text(f,h)){f=f.substring(y.raw.length),y.type?h.push(y):(Me=h[h.length-1],Me.raw+=`
|
|
`+y.raw,Me.text+=`
|
|
`+y.text);continue}if(f){var Xe="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Xe);break}else throw new Error(Xe)}}return h},T.inline=function(f){var h,g,y,G,ue,Me,Xe=f.length;for(h=0;h<Xe;h++){Me=f[h];switch(Me.type){case"paragraph":case"text":case"heading":{Me.tokens=[],this.inlineTokens(Me.text,Me.tokens);break}case"table":{for(Me.tokens={header:[],cells:[]},G=Me.header.length,g=0;g<G;g++)Me.tokens.header[g]=[],this.inlineTokens(Me.header[g],Me.tokens.header[g]);for(G=Me.cells.length,g=0;g<G;g++)for(ue=Me.cells[g],Me.tokens.cells[g]=[],y=0;y<ue.length;y++)Me.tokens.cells[g][y]=[],this.inlineTokens(ue[y],Me.tokens.cells[g][y]);break}case"blockquote":{this.inline(Me.tokens);break}case"list":{for(G=Me.items.length,g=0;g<G;g++)this.inline(Me.items[g].tokens);break}}}return f},T.inlineTokens=function(f,h,g,y,G){h===void 0&&(h=[]),g===void 0&&(g=!1),y===void 0&&(y=!1),G===void 0&&(G="");var ue,Me=f,Xe;if(this.tokens.links){var st=Object.keys(this.tokens.links);if(st.length>0)for(;(Xe=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)st.includes(Xe[0].slice(Xe[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,Xe.index)+"["+"a".repeat(Xe[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Xe=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,Xe.index)+"["+"a".repeat(Xe[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(ue=this.tokenizer.escape(f)){f=f.substring(ue.raw.length),h.push(ue);continue}if(ue=this.tokenizer.tag(f,g,y)){f=f.substring(ue.raw.length),g=ue.inLink,y=ue.inRawBlock,h.push(ue);continue}if(ue=this.tokenizer.link(f)){f=f.substring(ue.raw.length),ue.type==="link"&&(ue.tokens=this.inlineTokens(ue.text,[],!0,y)),h.push(ue);continue}if(ue=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(ue.raw.length),ue.type==="link"&&(ue.tokens=this.inlineTokens(ue.text,[],!0,y)),h.push(ue);continue}if(ue=this.tokenizer.strong(f,Me,G)){f=f.substring(ue.raw.length),ue.tokens=this.inlineTokens(ue.text,[],g,y),h.push(ue);continue}if(ue=this.tokenizer.em(f,Me,G)){f=f.substring(ue.raw.length),ue.tokens=this.inlineTokens(ue.text,[],g,y),h.push(ue);continue}if(ue=this.tokenizer.codespan(f)){f=f.substring(ue.raw.length),h.push(ue);continue}if(ue=this.tokenizer.br(f)){f=f.substring(ue.raw.length),h.push(ue);continue}if(ue=this.tokenizer.del(f)){f=f.substring(ue.raw.length),ue.tokens=this.inlineTokens(ue.text,[],g,y),h.push(ue);continue}if(ue=this.tokenizer.autolink(f,K)){f=f.substring(ue.raw.length),h.push(ue);continue}if(!g&&(ue=this.tokenizer.url(f,K))){f=f.substring(ue.raw.length),h.push(ue);continue}if(ue=this.tokenizer.inlineText(f,y,de)){f=f.substring(ue.raw.length),G=ue.raw.slice(-1),h.push(ue);continue}if(f){var ze="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(ze);break}else throw new Error(ze)}}return h},me(C,null,[{key:"rules",get:function(){return{block:v,inline:Q}}}]),C}(),Te=N.defaults,Ne=S.cleanUrl,De=S.escape,Ce=function(){function C(M){this.options=M||Te}var T=C.prototype;return T.code=function(f,h,g){var y=(h||"").match(/\S*/)[0];if(this.options.highlight){var G=this.options.highlight(f,y);G!=null&&G!==f&&(g=!0,f=G)}return y?'<pre><code class="'+this.options.langPrefix+De(y,!0)+'">'+(g?f:De(f,!0))+`</code></pre>
|
|
`:"<pre><code>"+(g?f:De(f,!0))+`</code></pre>
|
|
`},T.blockquote=function(f){return`<blockquote>
|
|
`+f+`</blockquote>
|
|
`},T.html=function(f){return f},T.heading=function(f,h,g,y){return this.options.headerIds?"<h"+h+' id="'+this.options.headerPrefix+y.slug(g)+'">'+f+"</h"+h+`>
|
|
`:"<h"+h+">"+f+"</h"+h+`>
|
|
`},T.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},T.list=function(f,h,g){var y=h?"ol":"ul",G=h&&g!==1?' start="'+g+'"':"";return"<"+y+G+`>
|
|
`+f+"</"+y+`>
|
|
`},T.listitem=function(f){return"<li>"+f+`</li>
|
|
`},T.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},T.paragraph=function(f){return"<p>"+f+`</p>
|
|
`},T.table=function(f,h){return h&&(h="<tbody>"+h+"</tbody>"),`<table>
|
|
<thead>
|
|
`+f+`</thead>
|
|
`+h+`</table>
|
|
`},T.tablerow=function(f){return`<tr>
|
|
`+f+`</tr>
|
|
`},T.tablecell=function(f,h){var g=h.header?"th":"td",y=h.align?"<"+g+' align="'+h.align+'">':"<"+g+">";return y+f+"</"+g+`>
|
|
`},T.strong=function(f){return"<strong>"+f+"</strong>"},T.em=function(f){return"<em>"+f+"</em>"},T.codespan=function(f){return"<code>"+f+"</code>"},T.br=function(){return this.options.xhtml?"<br/>":"<br>"},T.del=function(f){return"<del>"+f+"</del>"},T.link=function(f,h,g){if(f=Ne(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var y='<a href="'+De(f)+'"';return h&&(y+=' title="'+h+'"'),y+=">"+g+"</a>",y},T.image=function(f,h,g){if(f=Ne(this.options.sanitize,this.options.baseUrl,f),f===null)return g;var y='<img src="'+f+'" alt="'+g+'"';return h&&(y+=' title="'+h+'"'),y+=this.options.xhtml?"/>":">",y},T.text=function(f){return f},C}(),Se=function(){function C(){}var T=C.prototype;return T.strong=function(f){return f},T.em=function(f){return f},T.codespan=function(f){return f},T.del=function(f){return f},T.html=function(f){return f},T.text=function(f){return f},T.link=function(f,h,g){return""+g},T.image=function(f,h,g){return""+g},T.br=function(){return""},C}(),Je=function(){function C(){this.seen={}}var T=C.prototype;return T.slug=function(f){var h=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(h)){var g=h;do this.seen[g]++,h=g+"-"+this.seen[g];while(this.seen.hasOwnProperty(h))}return this.seen[h]=0,h},C}(),Ge=N.defaults,Ye=S.unescape,Ke=function(){function C(M){this.options=M||Ge,this.options.renderer=this.options.renderer||new Ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Se,this.slugger=new Je}C.parse=function(f,h){var g=new C(h);return g.parse(f)};var T=C.prototype;return T.parse=function(f,h){h===void 0&&(h=!0);var g="",y,G,ue,Me,Xe,st,ze,kt,pt,at,Dt,bt,yt,St,mt,on,Kn,cn,kn=f.length;for(y=0;y<kn;y++){at=f[y];switch(at.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(at.tokens),at.depth,Ye(this.parseInline(at.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(at.text,at.lang,at.escaped);continue}case"table":{for(kt="",ze="",Me=at.header.length,G=0;G<Me;G++)ze+=this.renderer.tablecell(this.parseInline(at.tokens.header[G]),{header:!0,align:at.align[G]});for(kt+=this.renderer.tablerow(ze),pt="",Me=at.cells.length,G=0;G<Me;G++){for(st=at.tokens.cells[G],ze="",Xe=st.length,ue=0;ue<Xe;ue++)ze+=this.renderer.tablecell(this.parseInline(st[ue]),{header:!1,align:at.align[ue]});pt+=this.renderer.tablerow(ze)}g+=this.renderer.table(kt,pt);continue}case"blockquote":{pt=this.parse(at.tokens),g+=this.renderer.blockquote(pt);continue}case"list":{for(Dt=at.ordered,bt=at.start,yt=at.loose,Me=at.items.length,pt="",G=0;G<Me;G++)mt=at.items[G],on=mt.checked,Kn=mt.task,St="",mt.task&&(cn=this.renderer.checkbox(on),yt?mt.tokens.length>0&&mt.tokens[0].type==="text"?(mt.tokens[0].text=cn+" "+mt.tokens[0].text,mt.tokens[0].tokens&&mt.tokens[0].tokens.length>0&&mt.tokens[0].tokens[0].type==="text"&&(mt.tokens[0].tokens[0].text=cn+" "+mt.tokens[0].tokens[0].text)):mt.tokens.unshift({type:"text",text:cn}):St+=cn),St+=this.parse(mt.tokens,yt),pt+=this.renderer.listitem(St,Kn,on);g+=this.renderer.list(pt,Dt,bt);continue}case"html":{g+=this.renderer.html(at.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(at.tokens));continue}case"text":{for(pt=at.tokens?this.parseInline(at.tokens):at.text;y+1<kn&&f[y+1].type==="text";)at=f[++y],pt+=`
|
|
`+(at.tokens?this.parseInline(at.tokens):at.text);g+=h?this.renderer.paragraph(pt):pt;continue}default:{var mn='Token with "'+at.type+'" type was not found.';if(this.options.silent){console.error(mn);return}else throw new Error(mn)}}}return g},T.parseInline=function(f,h){h=h||this.renderer;var g="",y,G,ue=f.length;for(y=0;y<ue;y++){G=f[y];switch(G.type){case"escape":{g+=h.text(G.text);break}case"html":{g+=h.html(G.text);break}case"link":{g+=h.link(G.href,G.title,this.parseInline(G.tokens,h));break}case"image":{g+=h.image(G.href,G.title,G.text);break}case"strong":{g+=h.strong(this.parseInline(G.tokens,h));break}case"em":{g+=h.em(this.parseInline(G.tokens,h));break}case"codespan":{g+=h.codespan(G.text);break}case"br":{g+=h.br();break}case"del":{g+=h.del(this.parseInline(G.tokens,h));break}case"text":{g+=h.text(G.text);break}default:{var Me='Token with "'+G.type+'" type was not found.';if(this.options.silent){console.error(Me);return}else throw new Error(Me)}}}return g},C}(),it=S.merge,Qe=S.checkSanitizeDeprecation,Ze=S.escape,be=N.getDefaults,rt=N.changeDefaults,qe=N.defaults;function Ee(C,T,M){if(typeof C=="undefined"||C===null)throw new Error("marked(): input parameter is undefined or null");if(typeof C!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(C)+", string expected");if(typeof T=="function"&&(M=T,T=null),T=it({},Ee.defaults,T||{}),Qe(T),M){var f=T.highlight,h;try{h=fe.lex(C,T)}catch(ue){return M(ue)}var g=function(Me){var Xe;if(!Me)try{Xe=Ke.parse(h,T)}catch(st){Me=st}return T.highlight=f,Me?M(Me):M(null,Xe)};if(!f||f.length<3)return g();if(delete T.highlight,!h.length)return g();var y=0;Ee.walkTokens(h,function(ue){ue.type==="code"&&(y++,setTimeout(function(){f(ue.text,ue.lang,function(Me,Xe){if(Me)return g(Me);Xe!=null&&Xe!==ue.text&&(ue.text=Xe,ue.escaped=!0),y--,y===0&&g()})},0))}),y===0&&g();return}try{var G=fe.lex(C,T);return T.walkTokens&&Ee.walkTokens(G,T.walkTokens),Ke.parse(G,T)}catch(ue){if(ue.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,T.silent)return"<p>An error occurred:</p><pre>"+Ze(ue.message+"",!0)+"</pre>";throw ue}}Ee.options=Ee.setOptions=function(C){return it(Ee.defaults,C),rt(Ee.defaults),Ee},Ee.getDefaults=be,Ee.defaults=qe,Ee.use=function(C){var T=it({},C);if(C.renderer&&function(){var f=Ee.defaults.renderer||new Ce,h=function(G){var ue=f[G];f[G]=function(){for(var Me=arguments.length,Xe=new Array(Me),st=0;st<Me;st++)Xe[st]=arguments[st];var ze=C.renderer[G].apply(f,Xe);return ze===!1&&(ze=ue.apply(f,Xe)),ze}};for(var g in C.renderer)h(g);T.renderer=f}(),C.tokenizer&&function(){var f=Ee.defaults.tokenizer||new ee,h=function(G){var ue=f[G];f[G]=function(){for(var Me=arguments.length,Xe=new Array(Me),st=0;st<Me;st++)Xe[st]=arguments[st];var ze=C.tokenizer[G].apply(f,Xe);return ze===!1&&(ze=ue.apply(f,Xe)),ze}};for(var g in C.tokenizer)h(g);T.tokenizer=f}(),C.walkTokens){var M=Ee.defaults.walkTokens;T.walkTokens=function(f){C.walkTokens(f),M&&M(f)}}Ee.setOptions(T)},Ee.walkTokens=function(C,T){for(var M=xe(C),f;!(f=M()).done;){var h=f.value;T(h);switch(h.type){case"table":{for(var g=xe(h.tokens.header),y;!(y=g()).done;){var G=y.value;Ee.walkTokens(G,T)}for(var ue=xe(h.tokens.cells),Me;!(Me=ue()).done;)for(var Xe=Me.value,st=xe(Xe),ze;!(ze=st()).done;){var kt=ze.value;Ee.walkTokens(kt,T)}break}case"list":{Ee.walkTokens(h.items,T);break}default:h.tokens&&Ee.walkTokens(h.tokens,T)}}},Ee.Parser=Ke,Ee.parser=Ke.parse,Ee.Renderer=Ce,Ee.TextRenderer=Se,Ee.Lexer=fe,Ee.lexer=fe.lex,Ee.Tokenizer=ee,Ee.Slugger=Je,Ee.parse=Ee;var Pe=Ee;return Pe})},ELLl:function(ct,$e,k){(function(U){U(k("VrN/"))})(function(U){var me={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=U.Pos;U.defineOption("autoCloseBrackets",!1,function(z,j,I){I&&I!=U.Init&&(z.removeKeyMap(xe),z.state.closeBrackets=null),j&&(V(ke(j,"pairs")),z.state.closeBrackets=j,z.addKeyMap(xe))});function ke(z,j){return j=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[j]!=null?z[j]:me[j]}var xe={Backspace:L,Enter:W};function V(z){for(var j=0;j<z.length;j++){var I=z.charAt(j),se="'"+I+"'";xe[se]||(xe[se]=N(I))}}V(me.pairs+"`");function N(z){return function(j){return $(j,z)}}function D(z){var j=z.state.closeBrackets;if(!j||j.override)return j;var I=z.getModeAt(z.getCursor());return I.closeBrackets||j}function L(z){var j=D(z);if(!j||z.getOption("disableInput"))return U.Pass;for(var I=ke(j,"pairs"),se=z.listSelections(),te=0;te<se.length;te++){if(!se[te].empty())return U.Pass;var Ae=we(z,se[te].head);if(!Ae||I.indexOf(Ae)%2!=0)return U.Pass}for(var te=se.length-1;te>=0;te--){var He=se[te].head;z.replaceRange("",oe(He.line,He.ch-1),oe(He.line,He.ch+1),"+delete")}}function W(z){var j=D(z),I=j&&ke(j,"explode");if(!I||z.getOption("disableInput"))return U.Pass;for(var se=z.listSelections(),te=0;te<se.length;te++){if(!se[te].empty())return U.Pass;var Ae=we(z,se[te].head);if(!Ae||I.indexOf(Ae)%2!=0)return U.Pass}z.operation(function(){var He=z.lineSeparator()||`
|
|
`;z.replaceSelection(He+He,null),z.execCommand("goCharLeft"),se=z.listSelections();for(var ce=0;ce<se.length;ce++){var _e=se[ce].head.line;z.indentLine(_e,null,!0),z.indentLine(_e+1,null,!0)}})}function B(z){var j=U.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(j?-1:1)),head:new oe(z.head.line,z.head.ch+(j?1:-1))}}function $(z,j){var I=D(z);if(!I||z.getOption("disableInput"))return U.Pass;var se=ke(I,"pairs"),te=se.indexOf(j);if(te==-1)return U.Pass;for(var Ae=ke(I,"closeBefore"),He=ke(I,"triples"),ce=se.charAt(te+1)==j,_e=z.listSelections(),je=te%2==0,he,pe=0;pe<_e.length;pe++){var Oe=_e[pe],ae=Oe.head,b,q=z.getRange(ae,oe(ae.line,ae.ch+1));if(je&&!Oe.empty())b="surround";else if((ce||!je)&&q==j)ce&&ie(z,ae)?b="both":He.indexOf(j)>=0&&z.getRange(ae,oe(ae.line,ae.ch+3))==j+j+j?b="skipThree":b="skip";else if(ce&&ae.ch>1&&He.indexOf(j)>=0&&z.getRange(oe(ae.line,ae.ch-2),ae)==j+j){if(ae.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(ae.line,ae.ch-2))))return U.Pass;b="addFour"}else if(ce){var F=ae.ch==0?" ":z.getRange(oe(ae.line,ae.ch-1),ae);if(!U.isWordChar(q)&&F!=j&&!U.isWordChar(F))b="both";else return U.Pass}else if(je&&(q.length===0||/\s/.test(q)||Ae.indexOf(q)>-1))b="both";else return U.Pass;if(!he)he=b;else if(he!=b)return U.Pass}var x=te%2?se.charAt(te-1):j,Z=te%2?j:se.charAt(te+1);z.operation(function(){if(he=="skip")z.execCommand("goCharRight");else if(he=="skipThree")for(var P=0;P<3;P++)z.execCommand("goCharRight");else if(he=="surround"){for(var A=z.getSelections(),P=0;P<A.length;P++)A[P]=x+A[P]+Z;z.replaceSelections(A,"around"),A=z.listSelections().slice();for(var P=0;P<A.length;P++)A[P]=B(A[P]);z.setSelections(A)}else he=="both"?(z.replaceSelection(x+Z,null),z.triggerElectric(x+Z),z.execCommand("goCharLeft")):he=="addFour"&&(z.replaceSelection(x+x+x+x,"before"),z.execCommand("goCharRight"))})}function we(z,j){var I=z.getRange(oe(j.line,j.ch-1),oe(j.line,j.ch+1));return I.length==2?I:null}function ie(z,j){var I=z.getTokenAt(oe(j.line,j.ch+1));return/\bstring/.test(I.type)&&I.start==j.ch&&(j.ch==0||!/\bstring/.test(z.getTokenTypeAt(j)))}})},GfqC:function(ct,$e,k){"use strict";var U=k("q1tI"),me=k.n(U),oe=k("TSYQ"),ke=k.n(oe);function xe(S,c){var s="cannot "+S.method+" "+S.action+" "+c.status+"'",p=new Error(s);return p.status=c.status,p.method=S.method,p.url=S.action,p}function V(S){var c=S.responseText||S.response;if(!c)return c;try{return JSON.parse(c)}catch(s){return c}}function N(S){var c=new XMLHttpRequest;S.onProgress&&c.upload&&(c.upload.onprogress=function(R){R.total>0&&(R.percent=R.loaded/R.total*100),S.onProgress(R)});var s=new FormData;S.data&&Object.keys(S.data).forEach(function(w){var R=S.data[w];if(Array.isArray(R)){R.forEach(function(ne){s.append(w+"[]",ne)});return}s.append(w,S.data[w])}),S.file instanceof Blob?s.append(S.filename,S.file,S.file.name):s.append(S.filename,S.file),c.onerror=function(R){S.onError(R)},c.onload=function(){return c.status<200||c.status>=300?S.onError(xe(S,c),V(c)):S.onSuccess(V(c),c)},c.open(S.method,S.action,!0),S.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var p=S.headers||{};return p["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(p).forEach(function(w){p[w]!==null&&c.setRequestHeader(w,p[w])}),c.send(s),{abort:function(){c.abort()}}}var D=+new Date,L=0;function W(){return"rc-upload-"+D+"-"+ ++L}function B(S,c){return S.indexOf(c,S.length-c.length)!==-1}var $=function(S,c){if(S&&c){var s=Array.isArray(c)?c:c.split(","),p=S.name||"",w=S.type||"",R=w.replace(/\/.*$/,"");return s.some(function(ne){var ye=ne.trim();return ye.charAt(0)==="."?B(p.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?R===ye.replace(/\/.*$/,""):w===ye})}return!0};function we(S,c){var s=S.createReader(),p=[];function w(){s.readEntries(function(R){var ne=Array.prototype.slice.apply(R);p=p.concat(ne);var ye=!ne.length;ye?c(p):w()})}w()}var ie=function(c,s,p){var w=function R(ne,ye){ye=ye||"",ne.isFile?ne.file(function(ee){p(ee)&&(ne.fullPath&&!ee.webkitRelativePath&&(Object.defineProperties(ee,{webkitRelativePath:{writable:!0}}),ee.webkitRelativePath=ne.fullPath.replace(/^\//,""),Object.defineProperties(ee,{webkitRelativePath:{writable:!1}})),s([ee]))}):ne.isDirectory&&we(ne,function(ee){ee.forEach(function(ge){R(ge,""+ye+ne.name+"/")})})};c.forEach(function(R){w(R.webkitGetAsEntry())})},z=ie,j=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(S[p]=s[p])}return S},I=function(){function S(c,s){var p=[],w=!0,R=!1,ne=void 0;try{for(var ye=c[Symbol.iterator](),ee;!(w=(ee=ye.next()).done)&&!(p.push(ee.value),s&&p.length===s);w=!0);}catch(ge){R=!0,ne=ge}finally{try{!w&&ye.return&&ye.return()}finally{if(R)throw ne}}return p}return function(c,s){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return S(c,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),se=function(){function S(c,s){for(var p=0;p<s.length;p++){var w=s[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,s,p){return s&&S(c.prototype,s),p&&S(c,p),c}}();function te(S,c,s){return c in S?Object.defineProperty(S,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):S[c]=s,S}function Ae(S,c){var s={};for(var p in S){if(c.indexOf(p)>=0)continue;if(!Object.prototype.hasOwnProperty.call(S,p))continue;s[p]=S[p]}return s}function He(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function ce(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function _e(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}var je=function(c){return Object.keys(c).reduce(function(s,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-"||p==="role")&&(s[p]=c[p]),s},{})},he=function(S){_e(c,S);function c(){var s,p,w,R;He(this,c);for(var ne=arguments.length,ye=Array(ne),ee=0;ee<ne;ee++)ye[ee]=arguments[ee];return R=(p=(w=ce(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(ye))),w),w.state={uid:W()},w.reqs={},w.onChange=function(ge){var le=ge.target.files;w.uploadFiles(le),w.reset()},w.onClick=function(ge){var le=w.fileInput;if(!le)return;var re=w.props,H=re.children,J=re.onClick;H&&H.type==="button"&&(le.parentNode.focus(),le.parentNode.querySelector("button").blur()),le.click(),J&&J(ge)},w.onKeyDown=function(ge){ge.key==="Enter"&&w.onClick()},w.onFileDrop=function(ge){var le=w.props.multiple;if(ge.preventDefault(),ge.type==="dragover")return;if(w.props.directory)z(Array.prototype.slice.call(ge.dataTransfer.items),w.uploadFiles,function(H){return $(H,w.props.accept)});else{var re=Array.prototype.slice.call(ge.dataTransfer.files).filter(function(H){return $(H,w.props.accept)});le===!1&&(re=re.slice(0,1)),w.uploadFiles(re)}},w.uploadFiles=function(ge){var le=Array.prototype.slice.call(ge);le.map(function(re){return re.uid=W(),re}).forEach(function(re){w.upload(re,le)})},w.saveFileInput=function(ge){w.fileInput=ge},p),ce(w,R)}return se(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(p,w){var R=this,ne=this.props;if(!ne.beforeUpload)return setTimeout(function(){return R.post(p)},0);var ye=ne.beforeUpload(p,w);ye&&ye.then?ye.then(function(ee){var ge=Object.prototype.toString.call(ee);return ge==="[object File]"||ge==="[object Blob]"?R.post(ee):R.post(p)}).catch(function(ee){console.log(ee)}):ye!==!1&&setTimeout(function(){return R.post(p)},0);return}},{key:"post",value:function(p){var w=this;if(!this._isMounted)return;var R=this.props,ne=R.onStart,ye=R.onProgress,ee=R.transformFile,ge=ee===void 0?function(le){return le}:ee;new Promise(function(le){var re=R.action;return typeof re=="function"&&(re=re(p)),le(re)}).then(function(le){var re=p.uid,H=R.customRequest||N,J=Promise.resolve(ge(p)).then(function(m){var O=R.data;return typeof O=="function"&&(O=O(m)),Promise.all([m,O])}).catch(function(m){console.error(m)});J.then(function(m){var O=I(m,2),v=O[0],Q=O[1],de={action:le,filename:R.name,data:Q,file:v,headers:R.headers,withCredentials:R.withCredentials,method:R.method||"post",onProgress:ye?function(K){ye(K,p)}:null,onSuccess:function(fe,Te){delete w.reqs[re],R.onSuccess(fe,p,Te)},onError:function(fe,Te){delete w.reqs[re],R.onError(fe,Te,p)}};ne(p),w.reqs[re]=H(de)})})}},{key:"reset",value:function(){this.setState({uid:W()})}},{key:"abort",value:function(p){var w=this.reqs;if(p){var R=p;p&&p.uid&&(R=p.uid),w[R]&&w[R].abort&&w[R].abort(),delete w[R]}else Object.keys(w).forEach(function(ne){w[ne]&&w[ne].abort&&w[ne].abort(),delete w[ne]})}},{key:"render",value:function(){var p,w=this.props,R=w.component,ne=w.prefixCls,ye=w.className,ee=w.disabled,ge=w.id,le=w.style,re=w.multiple,H=w.accept,J=w.children,m=w.directory,O=w.openFileDialogOnClick,v=w.onMouseEnter,Q=w.onMouseLeave,de=Ae(w,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),K=ke()((p={},te(p,ne,!0),te(p,ne+"-disabled",ee),te(p,ye,ye),p)),fe=ee?{}:{onClick:O?this.onClick:function(){},onKeyDown:O?this.onKeyDown:function(){},onMouseEnter:v,onMouseLeave:Q,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return me.a.createElement(R,j({},fe,{className:K,role:"button",style:le}),me.a.createElement("input",j({},je(de),{id:ge,type:"file",ref:this.saveFileInput,onClick:function(Ne){return Ne.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:H,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:re,onChange:this.onChange})),J)}}]),c}(U.Component),pe=he,Oe=Object.assign||function(S){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(S[p]=s[p])}return S},ae=function(){function S(c,s){for(var p=0;p<s.length;p++){var w=s[p];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(c,w.key,w)}}return function(c,s,p){return s&&S(c.prototype,s),p&&S(c,p),c}}();function b(S,c){if(!(S instanceof c))throw new TypeError("Cannot call a class as a function")}function q(S,c){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:S}function F(S,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);S.prototype=Object.create(c&&c.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(S,c):S.__proto__=c)}function x(){}var Z=function(S){F(c,S);function c(){var s,p,w,R;b(this,c);for(var ne=arguments.length,ye=Array(ne),ee=0;ee<ne;ee++)ye[ee]=arguments[ee];return R=(p=(w=q(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(ye))),w),w.saveUploader=function(ge){w.uploader=ge},p),q(w,R)}return ae(c,[{key:"abort",value:function(p){this.uploader.abort(p)}},{key:"render",value:function(){return me.a.createElement(pe,Oe({},this.props,{ref:this.saveUploader}))}}]),c}(U.Component);Z.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:x,onError:x,onSuccess:x,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var P=Z,A=$e.a=P},Gytx:function(ct,$e){ct.exports=function(U,me,oe,ke){var xe=oe?oe.call(ke,U,me):void 0;if(xe!==void 0)return!!xe;if(U===me)return!0;if(typeof U!="object"||!U||typeof me!="object"||!me)return!1;var V=Object.keys(U),N=Object.keys(me);if(V.length!==N.length)return!1;for(var D=Object.prototype.hasOwnProperty.bind(me),L=0;L<V.length;L++){var W=V[L];if(!D(W))return!1;var B=U[W],$=me[W];if(xe=oe?oe.call(ke,B,$,W):void 0,xe===!1||xe===void 0&&B!==$)return!1}return!0}},HmJG:function(ct,$e,k){},LdHM:function(ct,$e,k){"use strict";k.d($e,"b",function(){return Ae}),k.d($e,"a",function(){return ce});var U=k("1OyB"),me=k("vuIU"),oe=k("Ji7U"),ke=k("LK+K"),xe=k("q1tI"),V=k("rePB"),N=k("Ff2n"),D=k("ODXe"),L=k("4IlW"),W=k("bX4T"),B=k("YrtM"),$=k("TSYQ"),we=k.n($),ie=k("+nKL"),z=k("8OUc"),j=function(p,w){var R=p.prefixCls,ne=p.id,ye=p.flattenOptions,ee=p.childrenAsData,ge=p.values,le=p.searchValue,re=p.multiple,H=p.defaultActiveFirstOption,J=p.height,m=p.itemHeight,O=p.notFoundContent,v=p.open,Q=p.menuItemSelectedIcon,de=p.virtual,K=p.onSelect,fe=p.onToggleOpen,Te=p.onActiveValue,Ne=p.onScroll,De=p.onMouseEnter,Ce="".concat(R,"-item"),Se=Object(B.a)(function(){return ye},[v,ye],function(Pe,C){return C[0]&&Pe[1]!==C[1]}),Je=xe.useRef(null),Ge=function(C){C.preventDefault()},Ye=function(C){Je.current&&Je.current.scrollTo({index:C})},Ke=function(C){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,M=Se.length,f=0;f<M;f+=1){var h=(C+f*T+M)%M,g=Se[h],y=g.group,G=g.data;if(!y&&!G.disabled)return h}return-1},it=xe.useState(function(){return Ke(0)}),Qe=Object(D.a)(it,2),Ze=Qe[0],be=Qe[1],rt=function(C){be(C);var T=Se[C];if(!T){Te(null,-1);return}Te(T.data.value,C)};xe.useEffect(function(){rt(H!==!1?Ke(0):-1)},[Se.length,le]),xe.useEffect(function(){var Pe=setTimeout(function(){if(!re&&v&&ge.size===1){var C=Array.from(ge)[0],T=Se.findIndex(function(M){var f=M.data;return f.value===C});rt(T),Ye(T)}});return function(){return clearTimeout(Pe)}},[v]);var qe=function(C){C!==void 0&&K(C,{selected:!ge.has(C)}),re||fe(!1)};if(xe.useImperativeHandle(w,function(){return{onKeyDown:function(C){var T=C.which;switch(T){case L.a.UP:case L.a.DOWN:{var M=0;if(T===L.a.UP?M=-1:T===L.a.DOWN&&(M=1),M!==0){var f=Ke(Ze+M,M);Ye(f),rt(f)}break}case L.a.ENTER:{var h=Se[Ze];h&&!h.data.disabled?qe(h.data.value):qe(void 0),v&&C.preventDefault();break}case L.a.ESC:fe(!1)}},onKeyUp:function(){},scrollTo:function(C){Ye(C)}}}),Se.length===0)return xe.createElement("div",{role:"listbox",id:"".concat(ne,"_list"),className:"".concat(Ce,"-empty"),onMouseDown:Ge},O);function Ee(Pe){var C=Se[Pe];if(!C)return null;var T=C.data||{},M=T.value,f=T.label,h=T.children,g=Object(W.a)(T,!0),y=ee?h:f;return C?xe.createElement("div",Object.assign({"aria-label":typeof y=="string"?y:null},g,{key:Pe,role:"option",id:"".concat(ne,"_list_").concat(Pe),"aria-selected":ge.has(M)}),M):null}return xe.createElement(xe.Fragment,null,xe.createElement("div",{role:"listbox",id:"".concat(ne,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ee(Ze-1),Ee(Ze),Ee(Ze+1)),xe.createElement(ie.a,{itemKey:"key",ref:Je,data:Se,height:J,itemHeight:m,fullHeight:!1,onMouseDown:Ge,onScroll:Ne,virtual:de,onMouseEnter:De},function(Pe,C){var T,M=Pe.group,f=Pe.groupOption,h=Pe.data,g=h.label,y=h.key;if(M)return xe.createElement("div",{className:we()(Ce,"".concat(Ce,"-group"))},g!==void 0?g:y);var G=h.disabled,ue=h.value,Me=h.title,Xe=h.children,st=h.style,ze=h.className,kt=Object(N.a)(h,["disabled","value","title","children","style","className"]),pt=ge.has(ue),at="".concat(Ce,"-option"),Dt=we()(Ce,at,ze,(T={},Object(V.a)(T,"".concat(at,"-grouped"),f),Object(V.a)(T,"".concat(at,"-active"),Ze===C&&!G),Object(V.a)(T,"".concat(at,"-disabled"),G),Object(V.a)(T,"".concat(at,"-selected"),pt),T)),bt=ee?Xe:g,yt=!Q||typeof Q=="function"||pt;return xe.createElement("div",Object.assign({},kt,{"aria-selected":pt,className:Dt,title:Me,onMouseMove:function(){if(Ze===C||G)return;rt(C)},onClick:function(){G||qe(ue)},style:st}),xe.createElement("div",{className:"".concat(at,"-content")},bt||ue),xe.isValidElement(Q)||pt,yt&&xe.createElement(z.a,{className:"".concat(Ce,"-option-state"),customizeIcon:Q,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},I=xe.forwardRef(j);I.displayName="OptionList";var se=I,te=function(){return null};te.isSelectOption=!0;var Ae=te,He=function(){return null};He.isSelectOptGroup=!0;var ce=He,_e=k("VTBJ"),je=k("Zm9Q");function he(s){var p=s.key,w=s.props,R=w.children,ne=w.value,ye=Object(N.a)(w,["children","value"]);return Object(_e.a)({key:p,value:ne!==void 0?ne:p,children:R},ye)}function pe(s){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(je.a)(s).map(function(w,R){if(!xe.isValidElement(w)||!w.type)return null;var ne=w.type.isSelectOptGroup,ye=w.key,ee=w.props,ge=ee.children,le=Object(N.a)(ee,["children"]);return p||!ne?he(w):Object(_e.a)(Object(_e.a)({key:"__RC_SELECT_GRP__".concat(ye===null?R:ye,"__"),label:ye},le),{},{options:pe(ge)})}).filter(function(w){return w})}var Oe=k("2Qr1"),ae=k("qNPg"),b=k("U8pU"),q=k("Kwbf"),F=k("WKfj");function x(s){var p=s.mode,w=s.options,R=s.children,ne=s.backfill,ye=s.allowClear,ee=s.placeholder,ge=s.getInputElement,le=s.showSearch,re=s.onSearch,H=s.defaultOpen,J=s.autoFocus,m=s.labelInValue,O=s.value,v=s.inputValue,Q=s.optionLabelProp,de=p==="multiple"||p==="tags",K=le!==void 0?le:de||p==="combobox",fe=w||pe(R);if(Object(q.a)(p!=="tags"||fe.every(function(Ce){return!Ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),p==="tags"||p==="combobox"){var Te=fe.some(function(Ce){return Ce.options?Ce.options.some(function(Se){return typeof("value"in Se?Se.value:Se.key)=="number"}):typeof("value"in Ce?Ce.value:Ce.key)=="number"});Object(q.a)(!Te,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(q.a)(p!=="combobox"||!Q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(q.a)(p==="combobox"||!ne,"`backfill` only works with `combobox` mode."),Object(q.a)(p==="combobox"||!ge,"`getInputElement` only work with `combobox` mode."),Object(q.b)(p!=="combobox"||!ge||!ye||!ee,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),re&&!K&&p!=="combobox"&&p!=="tags"&&Object(q.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(q.b)(!H||J,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),O!=null){var Ne=Object(F.d)(O);Object(q.a)(!m||Ne.every(function(Ce){return Object(b.a)(Ce)==="object"&&("key"in Ce||"value"in Ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(q.a)(!de||Array.isArray(O),"`value` should be array when `mode` is `multiple` or `tags`")}if(R){var De=null;Object(je.a)(R).some(function(Ce){if(!xe.isValidElement(Ce)||!Ce.type)return!1;var Se=Ce.type;if(Se.isSelectOption)return!1;if(Se.isSelectOptGroup){var Je=Object(je.a)(Ce.props.children).every(function(Ge){return!xe.isValidElement(Ge)||!Ce.type||Ge.type.isSelectOption?!0:(De=Ge.type,!1)});return!Je}return De=Se,!0}),De&&Object(q.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(De.displayName||De.name||De,"`.")),Object(q.a)(v===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var Z=x,P=Object(ae.a)({prefixCls:"rc-select",components:{optionList:se},convertChildrenToData:pe,flattenOptions:Oe.d,getLabeledValue:Oe.e,filterOptions:Oe.b,isValueDisabled:Oe.g,findValueOption:Oe.c,warningProps:Z,fillOptionsWithMissingValue:Oe.a}),A=function(s){Object(oe.a)(w,s);var p=Object(ke.a)(w);function w(){var R;return Object(U.a)(this,w),R=p.apply(this,arguments),R.selectRef=xe.createRef(),R.focus=function(){R.selectRef.current.focus()},R.blur=function(){R.selectRef.current.blur()},R}return Object(me.a)(w,[{key:"render",value:function(){return xe.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),w}(xe.Component);A.Option=Ae,A.OptGroup=ce;var S=A,c=$e.c=S},M8RZ:function(ct,$e,k){"use strict";k.d($e,"a",function(){return L});var U=k("fWQN"),me=k("mtLc"),oe=k("yKVA"),ke=k("879j"),xe=k("q1tI"),V=k.n(xe),N=k("i8i4"),D=k.n(N),L=function(W){Object(oe.a)($,W);var B=Object(ke.a)($);function $(we){var ie;Object(U.a)(this,$),ie=B.call(this,we);var z=window.document;return ie.node=z.createElement("div"),z.body.appendChild(ie.node),ie}return Object(me.a)($,[{key:"render",value:function(){var ie=this.props.children;return Object(N.createPortal)(ie,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),$}(V.a.Component)},OLES:function(ct,$e,k){"use strict";var U=k("U8pU"),me=k("VTBJ"),oe=k("Ff2n"),ke=k("q1tI"),xe=k("uciX"),V=k("7ixt"),N=function(we){var ie=we.overlay,z=we.prefixCls,j=we.id,I=we.overlayInnerStyle;return ke.createElement("div",{className:"".concat(z,"-inner"),id:j,role:"tooltip",style:I},typeof ie=="function"?ie():ie)},D=N,L=function(we,ie){var z=we.overlayClassName,j=we.trigger,I=j===void 0?["hover"]:j,se=we.mouseEnterDelay,te=se===void 0?0:se,Ae=we.mouseLeaveDelay,He=Ae===void 0?.1:Ae,ce=we.overlayStyle,_e=we.prefixCls,je=_e===void 0?"rc-tooltip":_e,he=we.children,pe=we.onVisibleChange,Oe=we.afterVisibleChange,ae=we.transitionName,b=we.animation,q=we.placement,F=q===void 0?"right":q,x=we.align,Z=x===void 0?{}:x,P=we.destroyTooltipOnHide,A=P===void 0?!1:P,S=we.defaultVisible,c=we.getTooltipContainer,s=we.overlayInnerStyle,p=Object(oe.a)(we,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),w=Object(ke.useRef)(null);Object(ke.useImperativeHandle)(ie,function(){return w.current});var R=Object(me.a)({},p);"visible"in we&&(R.popupVisible=we.visible);var ne=function(){var re=we.arrowContent,H=re===void 0?null:re,J=we.overlay,m=we.id;return[ke.createElement("div",{className:"".concat(je,"-arrow"),key:"arrow"},H),ke.createElement(D,{key:"content",prefixCls:je,id:m,overlay:J,overlayInnerStyle:s})]},ye=!1,ee=!1;if(typeof A=="boolean")ye=A;else if(A&&Object(U.a)(A)==="object"){var ge=A.keepParent;ye=ge===!0,ee=ge===!1}return ke.createElement(xe.a,Object.assign({popupClassName:z,prefixCls:je,popup:ne,action:I,builtinPlacements:V.a,popupPlacement:F,ref:w,popupAlign:Z,getPopupContainer:c,onPopupVisibleChange:pe,afterPopupVisibleChange:Oe,popupTransitionName:ae,popupAnimation:b,defaultPopupVisible:S,destroyPopupOnHide:ye,autoDestroy:ee,mouseLeaveDelay:He,popupStyle:ce,mouseEnterDelay:te},R),he)},W=Object(ke.forwardRef)(L),B=$e.a=W},Ot1p:function(ct,$e,k){"use strict";var U=k("2qtc"),me=k("kLXV"),oe=k("rAM+"),ke=k("miYZ"),xe=k("tsqr"),V=k("tJVT"),N=k("jrin"),D=k("q1tI"),L=k.n(D),W=k("VrN/"),B=k.n(W),$=k("bdgK"),we=k("p77/"),ie=k("Bd2K"),z=k("ELLl"),j=k("19Vz"),I=k("lZu9"),se=k("+NIl"),te=k("kSUc"),Ae=k("9Bee"),He=function(C){var T=C.value,M=T===void 0?"":T,f=C.className,h=C.showTextOnly,g=C.showLines,y=C.style,G=y===void 0?{}:y,ue=Object(D.useMemo)(function(){return""},[M]);return L.a.createElement(L.a.Fragment,null,L.a.createElement("div",{dangerouslySetInnerHTML:{__html:ue}}))},ce=k("0Owb"),_e=k("dejd"),je=k("C+DQ"),he=[{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 pe(C){var T=C.onActionCallback,M=C.title,f=C.icon,h=C.actionName,g=C.className,y=g===void 0?"":g,G=C.children;function ue(){T(h)}return L.a.createElement("a",{title:M,className:y,onClick:ue},L.a.createElement("i",{className:"md-iconfont ".concat(f)}),G)}var Oe=function(C){var T=C.watch,M=C.showNullButton,f=C.onActionCallback,h=C.fullScreen,g=C.insertTemp,y=C.hidetoolBar,G=[].concat(he,[{title:"".concat(T?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(T?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return L.a.createElement("ul",{className:"markdown-toolbar-container"},!y&&G.map(function(ue,Me){return L.a.createElement("li",{key:Me},ue.actionName?L.a.createElement(pe,Object(ce.a)({},ue,{onActionCallback:f})):L.a.createElement("span",{className:"v-line"}))}),M?L.a.createElement("li",null,L.a.createElement(pe,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:f},L.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,g&&L.a.createElement("li",null,L.a.createElement(pe,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(g),onActionCallback:f},L.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),L.a.createElement("li",{className:"btn-full-screen"},L.a.createElement(pe,{icon:"".concat(h?"icon-shrink":"icon-enlarge"),title:h?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:f})))},ae=k("M8RZ"),b=k("+L6B"),q=k("2/Rp"),F=k("y8nQ"),x=k("Vl3Y"),Z=k("5NDa"),P=k("5rEg"),A={labelCol:{span:4},wrapperCol:{span:20}},S=function(C){var T=C.callback,M=C.onCancel;function f(h){T(h)}return L.a.createElement(x.a,Object(ce.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:f}),L.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},L.a.createElement(P.a,null)),L.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},L.a.createElement(P.a,null)),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))},c=k("7ahc"),s=k("HmJG"),p=k("BjJ7"),w=x.a.useForm,R={width:280,marginRight:10},ne={labelCol:{span:5},wrapperCol:{span:19}},ye=function(C){var T=C.callback,M=C.onCancel,f=w(),h=Object(V.a)(f,1),g=h[0];function y(Me){T(Me)}function G(Me,Xe){g.setFieldsValue({src:"/api/attachments/".concat(Me.id),type:Xe.type})}function ue(Me){var Xe=Me.target.files[0];ge(Xe,G)}return L.a.createElement(x.a,Object(ce.a)({form:g},ne,{className:"upload-image-panel",onFinish:y}),L.a.createElement(x.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},L.a.createElement("div",{className:"flex-container"},L.a.createElement(x.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},L.a.createElement(P.a,{style:R})),L.a.createElement(ee,{onFileChange:ue}))),L.a.createElement(x.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},L.a.createElement(P.a,{style:{width:264}})),L.a.createElement(x.a.Item,{style:{textAlign:"right"}},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))};function ee(C){var T=C.onFileChange;return L.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",L.a.createElement("input",{type:"file",onChange:T}))}function ge(C,T){if(!C)throw new String("\u6CA1\u6709\u6587\u4EF6");var M=new FormData;M.append("editormd-image-file",C),M.append("file_param_name","editormd-image-file"),M.append("byxhr","true");var f=new window.XMLHttpRequest;f.withCredentials=!0,f.addEventListener("load",function(h){T(JSON.parse(h.target.responseText),C)},!1),f.addEventListener("error",function(h){console.error(h)},!1),f.open("POST","".concat(p.a,"/api/attachments.json")),f.send(M)}var le=k("giR+"),re=k("fyUT"),H=k("7Kak"),J=k("9yH6"),m=J.a.Group,O={margin:"0 8px"},v=function(C){var T=C.callback,M=C.onCancel;function f(h){T(h)}return L.a.createElement(x.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:f},L.a.createElement("div",{className:"flex-container"},L.a.createElement("span",{style:O},"\u5355\u5143\u683C\u6570\uFF1A"),L.a.createElement("span",{style:O},"\u884C\u6570"),L.a.createElement(x.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},L.a.createElement(re.a,null)),L.a.createElement("span",{style:O},"\u5217\u6570"),L.a.createElement(x.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},L.a.createElement(re.a,null))),L.a.createElement("div",{className:"flex-container",style:{marginTop:12}},L.a.createElement("span",{style:O},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),L.a.createElement(x.a.Item,{name:"align"},L.a.createElement(m,null,L.a.createElement(J.a,{value:"default"},L.a.createElement("i",{className:"fa fa-align-justify"})),L.a.createElement(J.a,{value:"left"},L.a.createElement("i",{className:"fa fa-align-left"})),L.a.createElement(J.a,{value:"center"},L.a.createElement("i",{className:"fa fa-align-center"})),L.a.createElement(J.a,{value:"right"},L.a.createElement("i",{className:"fa fa-align-right"}))))),L.a.createElement("div",{className:"flex-container flex-end"},L.a.createElement(q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),L.a.createElement(q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))},Q=k("m3rI"),de="link",K="upload-image",fe="code-block",Te="add-table",Ne="------------",De={default:Ne,left:":".concat(Ne),center:":".concat(Ne,":"),right:"".concat(Ne,":")},Ce=k("9VGf"),Se,Je;function Ge(){}var Ye=0,Ke=1e4,it="\u2581",Qe=`
|
|
**\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 Ze(C){return/^\d+$/.test(C)?"".concat(C,"px"):C}var be=navigator.platform.toUpperCase().indexOf("MAC")>=0,rt=be?"Cmd":"Ctrl",qe=(Se={},Object(N.a)(Se,rt+"-B","bold"),Object(N.a)(Se,rt+"-I","italic"),Se),Ee=(Je={},Object(N.a)(Je,de,"\u6DFB\u52A0\u94FE\u63A5"),Object(N.a)(Je,fe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(N.a)(Je,K,"\u6DFB\u52A0\u56FE\u7247"),Object(N.a)(Je,Te,"\u6DFB\u52A0\u8868\u683C"),Je),Pe=$e.a=function(C){var T=C.defaultValue,M=T===void 0?"":T,f=C.onChange,h=C.width,g=h===void 0?"100%":h,y=C.height,G=y===void 0?400:y,ue=C.miniToolbar,Me=ue===void 0?!1:ue,Xe=C.isFocus,st=Xe===void 0?!1:Xe,ze=C.watch,kt=C.insertTemp,pt=C.mode,at=pt===void 0?"markdown":pt,Dt=C.id,bt=Dt===void 0?"markdown-editor-id":Dt,yt=C.showResizeBar,St=yt===void 0?!1:yt,mt=C.noStorage,on=mt===void 0?!1:mt,Kn=C.showNullButton,cn=Kn===void 0?!1:Kn,kn=C.hidetoolBar,mn=kn===void 0?!1:kn,bi=C.fullScreen,dn=bi===void 0?!1:bi,$n=C.onBlur,dr=C.onCMBeforeChange,Ot=C.onFullScreen,et=C.className,Sn=et===void 0?"":et,fr=C.disablePaste,fn=fr===void 0?!1:fr,gt=C.placeholder,Tn=gt===void 0?"":gt,Dn=C.values,Vn=Dn===void 0?"":Dn,Re=Object(D.useState)(null),ut=Object(V.a)(Re,2),Ue=ut[0],Ir=ut[1],hr=Object(D.useState)(M),Yn=Object(V.a)(hr,2),qn=Yn[0],lt=Yn[1],Ji=Object(D.useState)(ze),Ur=Object(V.a)(Ji,2),hn=Ur[0],sn=Ur[1],yi=Object(D.useState)(dn),Fr=Object(V.a)(yi,2),nn=Fr[0],pr=Fr[1],xi=Object(D.useState)(""),mr=Object(V.a)(xi,2),_n=mr[0],On=mr[1],wi=Object(D.useState)(0),Wr=Object(V.a)(wi,2),Jn=Wr[0],Hr=Wr[1],Ei=Object(D.useState)(G),pn=Object(V.a)(Ei,2),Ci=pn[0],ki=pn[1],gr=Object(D.useState)(!1),Rn=Object(V.a)(gr,2),Ia=Rn[0],zr=Rn[1],Zn=Object(D.useRef)(),Br=Object(D.useRef)(),Nn=Object(D.useRef)(),Qn=Object(D.useRef)();Object(D.useEffect)(function(){lt(Vn),Ue==null||Ue.setValue(Vn)},[Vn]),Object(D.useEffect)(function(){Ot==null||Ot(nn)},[nn]),Object(D.useEffect)(function(){if(Zn.current){var tt=B.a.fromTextArea(Zn.current,{mode:at,lineNumbers:!Me,lineWrapping:!0,value:M,autoCloseTags:!0,autoCloseBrackets:!0});st&&tt.focus();function dt(ft,wt){if(fn){wt.preventDefault();return}var Et=wt.clipboardData;if(Et){var Tt=Et.types.toString(),Nt=Et.items,Lt=["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(Tt==="Files"||Et.types.indexOf("Files")>-1){if(wt.preventDefault(),at=="stex")return;try{var Gt,gn=Nt[1];((Gt=Nt[0])===null||Gt===void 0?void 0:Gt.kind)==="file"&&(gn=Nt[0]);var _t=gn.getAsFile(),Pn=_t.name.split(".").pop();ge(_t,function(Kt){if(Kt.id){var jn,In,br;(_t==null||((jn=_t.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?tt.replaceSelection(".concat(Kt.content_type,")")):(_t==null||((In=_t.type)===null||In===void 0)?void 0:In.indexOf("video"))>-1?tt.replaceSelection('<video width="100%" controls src="'.concat(Q.a.API_SERVER,"/api/attachments/").concat(Kt.id,'"></video>')):(_t==null||((br=_t.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?tt.replaceSelection('<a href="'.concat(Q.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(_t.type,'&disposition=inline" target="_blank">').concat(_t.name,"</a>")):Lt.includes(Pn)?tt.replaceSelection('<a href="'.concat(Q.a.API_SERVER,"/api/attachments/").concat(Kt.id,'?type=office&disposition=inline" target="_blank">').concat(_t.name,"</a>")):tt.replaceSelection("[".concat(_t.name,"](").concat(Q.a.API_SERVER,"/api/attachments/").concat(Kt.id,"?type=").concat(Kt.content_type,")"))}else(Kt==null?void 0:Kt.status)===401&&(document.location.href="/user/login")})}catch(Kt){xe.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tt.on("paste",dt),Ir(tt),function(){tt.off("paste",dt)}}},[]);var Si=Object(D.useCallback)(function(){if(Br.current)try{}catch(tt){console.log(tt,"---- to set md editor body height")}},[Ci,Br,nn]);Object(D.useEffect)(function(){function tt(){var ft=new $.default(function(wt){var Et=Object(oe.a)(wt),Tt;try{for(Et.s();!(Tt=Et.n()).done;){var Nt=Tt.value;(Nt.target.offsetHeight>0||Nt.target.offsetWidth>0)&&(Si(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(Lt){Et.e(Lt)}finally{Et.f()}});return ft.observe(Zn.current.parentElement),ft}if(Ue){var dt=tt();return function(){dt.unobserve(Zn.current.parentElement)}}},[Ue,Si]),Object(D.useEffect)(function(){if(Ue){for(var tt=[],dt=function(){var Nt=wt[ft];Et=Object(V.a)(Nt,2);var Lt=Et[0],Gt=Et[1],gn=Object(N.a)({},Lt,function(){Xr(Gt)});tt.push(gn),Ue.addKeyMap(gn)},ft=0,wt=Object.entries(qe);ft<wt.length;ft++){var Et;dt()}return function(){var Tt=Object(oe.a)(tt),Nt;try{for(Tt.s();!(Nt=Tt.n()).done;){var Lt=Nt.value;Ue.removeKeyMap(Lt)}}catch(Gt){Tt.e(Gt)}finally{Tt.f()}}}},[Ue]),Object(D.useEffect)(function(){dn!==nn&&pr(dn)},[dn]),Object(Ce.a)(function(){if(!on&&Jn>0){var tt=new Date().getTime(),dt=window.sessionStorage.getItem(bt);tt>=Jn+Ke&&(!dt||dt!==qn)&&(window.sessionStorage.setItem(bt,qn),zr(!0))}},Ke),Object(D.useEffect)(function(){sn(ze)},[Ue,ze]),Object(D.useEffect)(function(){Ue&&(st&&Ue.focus())},[Ue,st]),Object(D.useEffect)(function(){if(hn&&Ue){var tt=Ue.getScrollerElement();function dt(ft){var wt=ft.target;if(Qn.current){var Et=wt.scrollTop/wt.scrollHeight;Qn.current.scrollTop=Qn.current.scrollHeight*Et}}return tt.addEventListener("scroll",dt),function(){tt.removeEventListener("scroll",dt)}}},[Ue,hn]),Object(D.useEffect)(function(){if(Ue&&dr){function tt(dt,ft){dr(dt,ft)}return Ue.on("beforeChange",tt),function(){Ue.off("beforeChange",tt)}}},[Ue,dr]),Object(D.useEffect)(function(){if(Ue&&$n){function tt(){$n(Ue.getValue())}return Ue.on("blur",tt),function(){Ue.off("blur",tt)}}},[Ue,$n]),Object(D.useEffect)(function(){if(Ue){function tt(dt){var ft=dt.getValue();lt(ft),Hr(new Date().getTime()),dt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),f&&f(ft)}return Ue.on("change",tt),function(){Ue.off("change",tt)}}},[Ue,f]),Object(D.useEffect)(function(){Ue&&(M==null?(Ue.setValue(""),lt("")):M!==Ue.getValue()&&(Ue.setValue(M),lt(M),Ue.setCursor(Ue.lineCount(),0)))},[Ue,M]);var Xr=Object(D.useCallback)(function(tt){var dt=Ue.getCursor(),ft=Ue.getSelection(),wt=ft.split(`
|
|
`);switch(tt){case"bold":return Ue.replaceSelection("**"+ft+"**"),ft===""&&Ue.setCursor(dt.line,dt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+ft+"*"),ft===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+ft+"`"),ft===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+ft+"$$`"),ft===""&&Ue.setCursor(dt.line,dt.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+ft+"\n```"),Ue.setCursor(dt.line+1,ft.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`<br/>
|
|
`),Ue.focus();case"list-ul":return ft===""?Ue.replaceSelection("- "+ft):Ue.replaceSelection(wt.map(function(Et){return Et===""?"":"- ".concat(Et)}).join(`
|
|
`)),Ue.focus();case"list-ol":return ft===""?Ue.replaceSelection("1. "+ft):Ue.replaceSelection(wt.map(function(Et,Tt){return Et===""?"":"".concat(Tt+1,". ").concat(Et)}).join(`
|
|
`)),Ue.focus();case"add-null-ch":return ft===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.replaceSelection(it),Ue.focus();case"inster-template-1":return ft===""&&Ue.setCursor(dt.line,dt.ch),Ue.replaceSelection(Qe),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return sn(!hn),Ue.focus();case"trigger-full-screen":return pr(!nn),Ue.focus();case de:On(de);return;case fe:On(fe);return;case K:On(K);return;case Te:On(Te);return;default:throw new Error}},[Ue,hn,nn]),er=Object(D.useCallback)(function(tt){On("");switch(_n){case de:var dt=tt.title,ft=tt.link;return Ue.replaceSelection("[".concat(dt,"](").concat(ft,")")),Ue.focus();case fe:var wt=tt.language,Et=tt.content;return Ue.replaceSelection(["```"+wt,Et,"```"].join(`
|
|
`)),Ue.focus();case K:var Tt=tt.src,Nt=tt.alt;return Ue.replaceSelection(".concat(Tt,' "').concat(Nt,'" )')),Ue.focus();case Te:for(var Lt=tt.row,Gt=tt.col,gn=tt.align,_t=`
|
|
`,Pn=0;Pn<Lt;Pn++){for(var Kt=[],jn=[],In=0;In<Gt;In++)Pn===1&&jn.push(De[gn]),Kt.push(" ");Pn===1&&(_t+="| ".concat(jn.join(" | "),` |
|
|
`)),_t+="| ".concat(Kt.join(Gt===1?"":" | "),` |
|
|
`)}return Ue.replaceSelection(_t+`
|
|
`),Ue.focus();default:throw new Error}},[Ue,_n]),vr=Object(D.useMemo)(function(){switch(_n){case de:return L.a.createElement(S,{callback:er,onCancel:xn});case fe:return L.a.createElement(c.b,{callback:er,onCancel:xn});case K:return L.a.createElement(ye,{callback:er,onCancel:xn});case Te:return L.a.createElement(v,{callback:er,onCancel:xn});default:return null}},[_n]);function xn(){On("")}Object(D.useEffect)(function(){if(Nn.current){var tt=Nn.current,dt=!1,ft=0;function wt(Nt){dt=!0,ft=Nt.pageY}function Et(){dt=!1}function Tt(Nt){if(dt){var Lt=Nt.pageY-ft;Lt<0&&(Lt=0),Lt>300&&(Lt=300);var Gt=G+Lt+"px";ki(Gt)}}return tt.addEventListener("mousedown",wt),document.addEventListener("mousemove",Tt),document.addEventListener("mouseup",Et),function(){tt.removeEventListener("mousedown",wt),document.removeEventListener("mousemove",Tt),document.removeEventListener("mouseup",Et)}}},[Ue,Nn]),Object(D.useEffect)(function(){ki(G)},[G]);var Gr=Ze(g),Ti=Ze(Ci),_i={width:Gr,height:Ti},Kr=Object(D.useMemo)(function(){if(Jn){var tt=new Date(Jn),dt=tt.getHours(),ft=tt.getMinutes(),wt=tt.getSeconds();return dt=dt<10?"0"+dt:dt,ft=ft<10?"0"+ft:ft,wt=wt<10?"0"+wt:wt,"".concat(dt,":").concat(ft,":").concat(wt)}return 0},[Jn]);function Ua(){window.sessionStorage.removeItem(bt),zr(!1),Hr(0)}function Zi(){zr(!1),Hr(0),Ue.setValue(window.sessionStorage.getItem(bt))}return L.a.createElement(D.Fragment,null,L.a.createElement("div",{className:"markdown-editor-wrapper",ref:Br},L.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(hn?"on-preview":""," ").concat(Me?"mini":""," ").concat(nn?"full-screen":""),style:_i},L.a.createElement(Oe,{insertTemp:kt,watch:hn,fullScreen:nn,showNullButton:cn,onActionCallback:Xr,hidetoolBar:mn}),L.a.createElement("div",{className:"markdown-editor-body"},L.a.createElement("div",{className:"codemirror-container"},L.a.createElement("textarea",{ref:Zn,placeholder:Tn})),hn?L.a.createElement("div",{ref:Qn,className:"preview-container"},at==="stex"&&L.a.createElement(He,{value:qn}),at!=="stex"&&L.a.createElement(Ae.a,{value:qn})):null))),St?L.a.createElement("a",{ref:Nn,className:"editor-resize"}):null,L.a.createElement(ae.a,null,Ee[_n]?L.a.createElement(me.a,{centered:!0,title:Ee[_n],visible:!0,onCancel:xn,footer:null},vr):null))}},SJMd:function(ct,$e){/**
|
|
* @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 k,U,me,oe=!1,ke,xe;window.PR_SHOULD_USE_CONTINUATION=!0;var V,N;(function(){var D=window,L=["break,continue,do,else,for,if,return,while"],W=[L,"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"],B=[W,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],$=[B,"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"],we=[B,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],ie=[B,"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"],z="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",j=[B,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",se=[L,"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"],te=[L,"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"],Ae=[L,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],He=[$,ie,we,j,I,se,te,Ae],ce=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_e="str",je="kwd",he="com",pe="typ",Oe="lit",ae="pun",b="pln",q="tag",F="dec",x="src",Z="atn",P="atv",A="nocode",S="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(K){for(var fe=0,Te=!1,Ne=!1,De=0,Ce=K.length;De<Ce;++De){var Se=K[De];if(Se.ignoreCase)Ne=!0;else if(/[a-z]/i.test(Se.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Te=!0,Ne=!1;break}}var Je={b:8,t:9,n:10,v:11,f:12,r:13};function Ge(Ze){var be=Ze.charCodeAt(0);if(be!==92)return be;var rt=Ze.charAt(1);return be=Je[rt],be||("0"<=rt&&rt<="7"?parseInt(Ze.substring(1),8):rt==="u"||rt==="x"?parseInt(Ze.substring(2),16):Ze.charCodeAt(1))}function Ye(Ze){if(Ze<32)return(Ze<16?"\\x0":"\\x")+Ze.toString(16);var be=String.fromCharCode(Ze);return be==="\\"||be==="-"||be==="]"||be==="^"?"\\"+be:be}function Ke(Ze){var be=Ze.substring(1,Ze.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=[],qe=be[0]==="^",Ee=["["];qe&&Ee.push("^");for(var Pe=qe?1:0,C=be.length;Pe<C;++Pe){var T=be[Pe];if(/\\[bdsw]/i.test(T))Ee.push(T);else{var M=Ge(T),f;Pe+2<C&&be[Pe+1]==="-"?(f=Ge(be[Pe+2]),Pe+=2):f=M,rt.push([M,f]),f<65||M>122||(f<65||M>90||rt.push([Math.max(65,M)|32,Math.min(f,90)|32]),f<97||M>122||rt.push([Math.max(97,M)&~32,Math.min(f,122)&~32]))}}rt.sort(function(G,ue){return G[0]-ue[0]||ue[1]-G[1]});for(var h=[],g=[],Pe=0;Pe<rt.length;++Pe){var y=rt[Pe];y[0]<=g[1]+1?g[1]=Math.max(g[1],y[1]):h.push(g=y)}for(var Pe=0;Pe<h.length;++Pe){var y=h[Pe];Ee.push(Ye(y[0])),y[1]>y[0]&&(y[1]+1>y[0]&&Ee.push("-"),Ee.push(Ye(y[1])))}return Ee.push("]"),Ee.join("")}function it(Ze){for(var be=Ze.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=be.length,qe=[],Ee=0,Pe=0;Ee<rt;++Ee){var C=be[Ee];if(C==="(")++Pe;else if(C.charAt(0)==="\\"){var T=+C.substring(1);T&&(T<=Pe?qe[T]=-1:be[Ee]=Ye(T))}}for(var Ee=1;Ee<qe.length;++Ee)qe[Ee]===-1&&(qe[Ee]=++fe);for(var Ee=0,Pe=0;Ee<rt;++Ee){var C=be[Ee];if(C==="(")++Pe,qe[Pe]||(be[Ee]="(?:");else if(C.charAt(0)==="\\"){var T=+C.substring(1);T&&T<=Pe&&(be[Ee]="\\"+qe[T])}}for(var Ee=0;Ee<rt;++Ee)be[Ee]==="^"&&be[Ee+1]!=="^"&&(be[Ee]="");if(Ze.ignoreCase&&Te)for(var Ee=0;Ee<rt;++Ee){var C=be[Ee],M=C.charAt(0);C.length>=2&&M==="["?be[Ee]=Ke(C):M!=="\\"&&(be[Ee]=C.replace(/[a-zA-Z]/g,function(g){var y=g.charCodeAt(0);return"["+String.fromCharCode(y&~32,y|32)+"]"}))}return be.join("")}for(var Qe=[],De=0,Ce=K.length;De<Ce;++De){var Se=K[De];if(Se.global||Se.multiline)throw new Error(""+Se);Qe.push("(?:"+it(Se)+")")}return new RegExp(Qe.join("|"),Ne?"gi":"g")}function s(K,fe){var Te=/(?:^|\s)nocode(?:\s|$)/,Ne=[],De=0,Ce=[],Se=0;function Je(Ge){var Ye=Ge.nodeType;if(Ye==1){if(Te.test(Ge.className))return;for(var Ke=Ge.firstChild;Ke;Ke=Ke.nextSibling)Je(Ke);var it=Ge.nodeName.toLowerCase();(it==="br"||it==="li")&&(Ne[Se]=`
|
|
`,Ce[Se<<1]=De++,Ce[Se++<<1|1]=Ge)}else if(Ye==3||Ye==4){var Qe=Ge.nodeValue;Qe.length&&(fe?Qe=Qe.replace(/\r\n?/g,`
|
|
`):Qe=Qe.replace(/[ \t\r\n]+/g," "),Ne[Se]=Qe,Ce[Se<<1]=De,De+=Qe.length,Ce[Se++<<1|1]=Ge)}}return Je(K),{sourceCode:Ne.join("").replace(/\n$/,""),spans:Ce}}function p(K,fe,Te,Ne,De){if(!Te)return;var Ce={sourceNode:K,pre:1,langExtension:null,numberLines:null,sourceCode:Te,spans:null,basePos:fe,decorations:null};Ne(Ce),De.push.apply(De,Ce.decorations)}var w=/\S/;function R(K){for(var fe=void 0,Te=K.firstChild;Te;Te=Te.nextSibling){var Ne=Te.nodeType;fe=Ne===1?fe?K:Te:Ne===3&&w.test(Te.nodeValue)?K:fe}return fe===K?void 0:fe}function ne(K,fe){var Te={},Ne;(function(){for(var Se=K.concat(fe),Je=[],Ge={},Ye=0,Ke=Se.length;Ye<Ke;++Ye){var it=Se[Ye],Qe=it[3];if(Qe)for(var Ze=Qe.length;--Ze>=0;)Te[Qe.charAt(Ze)]=it;var be=it[1],rt=""+be;Ge.hasOwnProperty(rt)||(Je.push(be),Ge[rt]=null)}Je.push(/[\0-\uffff]/),Ne=c(Je)})();var De=fe.length,Ce=function(Se){for(var Je=Se.sourceCode,Ge=Se.basePos,Ye=Se.sourceNode,Ke=[Ge,b],it=0,Qe=Je.match(Ne)||[],Ze={},be=0,rt=Qe.length;be<rt;++be){var qe=Qe[be],Ee=Ze[qe],Pe=void 0,C;if(typeof Ee=="string")C=!1;else{var T=Te[qe.charAt(0)];if(T)Pe=qe.match(T[1]),Ee=T[0];else{for(var M=0;M<De;++M)if(T=fe[M],Pe=qe.match(T[1]),Pe){Ee=T[0];break}Pe||(Ee=b)}C=Ee.length>=5&&Ee.substring(0,5)==="lang-",C&&!(Pe&&typeof Pe[1]=="string")&&(C=!1,Ee=x),C||(Ze[qe]=Ee)}var f=it;if(it+=qe.length,!C)Ke.push(Ge+f,Ee);else{var h=Pe[1],g=qe.indexOf(h),y=g+h.length;Pe[2]&&(y=qe.length-Pe[2].length,g=y-h.length);var G=Ee.substring(5);p(Ye,Ge+f,qe.substring(0,g),Ce,Ke),p(Ye,Ge+f+g,h,J(G,h),Ke),p(Ye,Ge+f+y,qe.substring(y),Ce,Ke)}}Se.decorations=Ke};return Ce}function ye(K){var fe=[],Te=[];K.tripleQuotedStrings?fe.push([_e,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):K.multiLineStrings?fe.push([_e,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):fe.push([_e,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),K.verbatimStrings&&Te.push([_e,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ne=K.hashComments;Ne&&(K.cStyleComments?(Ne>1?fe.push([he,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):fe.push([he,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Te.push([_e,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):fe.push([he,/^#[^\r\n]*/,null,"#"])),K.cStyleComments&&(Te.push([he,/^\/\/[^\r\n]*/,null]),Te.push([he,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var De=K.regexLiterals;if(De){var Ce=De>1?"":`
|
|
\r`,Se=Ce?".":"[\\S\\s]",Je="/(?=[^/*"+Ce+"])(?:[^/\\x5B\\x5C"+Ce+"]|\\x5C"+Se+"|\\x5B(?:[^\\x5C\\x5D"+Ce+"]|\\x5C"+Se+")*(?:\\x5D|$))+/";Te.push(["lang-regex",RegExp("^"+S+"("+Je+")")])}var Ge=K.types;Ge&&Te.push([pe,Ge]);var Ye=(""+K.keywords).replace(/^ | $/g,"");Ye.length&&Te.push([je,new RegExp("^(?:"+Ye.replace(/[\s,]+/g,"|")+")\\b"),null]),fe.push([b,/^\s+/,null,` \r
|
|
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return K.regexLiterals&&(Ke+="(?!s*/)"),Te.push([Oe,/^@[a-z_$][a-z_$@0-9]*/i,null],[pe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[b,/^[a-z_$][a-z_$@0-9]*/i,null],[Oe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[b,/^\\[\s\S]?/,null],[ae,new RegExp(Ke),null]),ne(fe,Te)}var ee=ye({keywords:He,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ge(K,fe,Te){for(var Ne=/(?:^|\s)nocode(?:\s|$)/,De=/\r\n?|\n/,Ce=K.ownerDocument,Se=Ce.createElement("li");K.firstChild;)Se.appendChild(K.firstChild);var Je=[Se];function Ge(be){var rt=be.nodeType;if(rt==1&&!Ne.test(be.className))if(be.nodeName==="br")Ye(be),be.parentNode&&be.parentNode.removeChild(be);else for(var qe=be.firstChild;qe;qe=qe.nextSibling)Ge(qe);else if((rt==3||rt==4)&&Te){var Ee=be.nodeValue,Pe=Ee.match(De);if(Pe){var C=Ee.substring(0,Pe.index);be.nodeValue=C;var T=Ee.substring(Pe.index+Pe[0].length);if(T){var M=be.parentNode;M.insertBefore(Ce.createTextNode(T),be.nextSibling)}Ye(be),C||be.parentNode.removeChild(be)}}}function Ye(be){for(;!be.nextSibling;)if(be=be.parentNode,!be)return;function rt(Pe,C){var T=C?Pe.cloneNode(!1):Pe,M=Pe.parentNode;if(M){var f=rt(M,1),h=Pe.nextSibling;f.appendChild(T);for(var g=h;g;g=h)h=g.nextSibling,f.appendChild(g)}return T}for(var qe=rt(be.nextSibling,0),Ee;(Ee=qe.parentNode)&&Ee.nodeType===1;)qe=Ee;Je.push(qe)}for(var Ke=0;Ke<Je.length;++Ke)Ge(Je[Ke]);fe===(fe|0)&&Je[0].setAttribute("value",fe);var it=Ce.createElement("ol");it.className="linenums";for(var Qe=Math.max(0,fe-1|0)||0,Ke=0,Ze=Je.length;Ke<Ze;++Ke)Se=Je[Ke],Se.className="L"+(Ke+Qe)%10,Se.firstChild||Se.appendChild(Ce.createTextNode("\xA0")),it.appendChild(Se);K.appendChild(it)}function le(K){var fe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);fe=fe&&+fe[1]<=8;var Te=/\n/g,Ne=K.sourceCode,De=Ne.length,Ce=0,Se=K.spans,Je=Se.length,Ge=0,Ye=K.decorations,Ke=Ye.length,it=0;Ye[Ke]=De;var Qe,Ze;for(Ze=Qe=0;Ze<Ke;)Ye[Ze]!==Ye[Ze+2]?(Ye[Qe++]=Ye[Ze++],Ye[Qe++]=Ye[Ze++]):Ze+=2;for(Ke=Qe,Ze=Qe=0;Ze<Ke;){for(var be=Ye[Ze],rt=Ye[Ze+1],qe=Ze+2;qe+2<=Ke&&Ye[qe+1]===rt;)qe+=2;Ye[Qe++]=be,Ye[Qe++]=rt,Ze=qe}Ke=Ye.length=Qe;var Ee=K.sourceNode,Pe="";Ee&&(Pe=Ee.style.display,Ee.style.display="none");try{for(var C=null;Ge<Je;){var T=Se[Ge],M=Se[Ge+2]||De,f=Ye[it+2]||De,qe=Math.min(M,f),h=Se[Ge+1],g;if(h.nodeType!==1&&(g=Ne.substring(Ce,qe))){fe&&(g=g.replace(Te,"\r")),h.nodeValue=g;var y=h.ownerDocument,G=y.createElement("span");G.className=Ye[it+1];var ue=h.parentNode;ue.replaceChild(G,h),G.appendChild(h),Ce<M&&(Se[Ge+1]=h=y.createTextNode(Ne.substring(qe,M)),ue.insertBefore(h,G.nextSibling))}Ce=qe,Ce>=M&&(Ge+=2),Ce>=f&&(it+=2)}}finally{Ee&&(Ee.style.display=Pe)}}var re={};function H(K,fe){for(var Te=fe.length;--Te>=0;){var Ne=fe[Te];re.hasOwnProperty(Ne)?D.console&&console.warn("cannot override language handler %s",Ne):re[Ne]=K}}function J(K,fe){return K&&re.hasOwnProperty(K)||(K=/^\s*</.test(fe)?"default-markup":"default-code"),re[K]}H(ee,["default-code"]),H(ne([],[[b,/^[^<?]+/],[F,/^<!\w[^>]*(?:>|$)/],[he,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ae,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),H(ne([[b,/^[\s]+/,null,` \r
|
|
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[q,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[Z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ae,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),H(ne([],[[P,/^[\s\S]+/]]),["uq.val"]),H(ye({keywords:$,hashComments:!0,cStyleComments:!0,types:ce}),["c","cc","cpp","cxx","cyc","m"]),H(ye({keywords:"null,true,false"}),["json"]),H(ye({keywords:ie,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:ce}),["cs"]),H(ye({keywords:we,cStyleComments:!0}),["java"]),H(ye({keywords:Ae,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),H(ye({keywords:se,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),H(ye({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),H(ye({keywords:te,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),H(ye({keywords:j,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),H(ye({keywords:z,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),H(ne([],[[_e,/^[\s\S]+/]]),["regex"]);function m(K){var fe=K.langExtension;try{var Te=s(K.sourceNode,K.pre),Ne=Te.sourceCode;K.sourceCode=Ne,K.spans=Te.spans,K.basePos=0,J(fe,Ne)(K),le(K)}catch(De){D.console&&console.log(De&&De.stack||De)}}function O(K,fe,Te){var Ne=Te||!1,De=fe||null,Ce=document.createElement("div");Ce.innerHTML="<pre>"+K+"</pre>",Ce=Ce.firstChild,Ne&&ge(Ce,Ne,!0);var Se={langExtension:De,numberLines:Ne,sourceNode:Ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return m(Se),Ce.innerHTML}function v(K,fe){var Te=fe||document.body,Ne=Te.ownerDocument||document;function De(T){return Te.getElementsByTagName(T)}for(var Ce=[De("pre"),De("code"),De("xmp")],Se=[],Je=0;Je<Ce.length;++Je)for(var Ge=0,Ye=Ce[Je].length;Ge<Ye;++Ge)Se.push(Ce[Je][Ge]);Ce=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var it=0,Qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ze=/\bprettyprint\b/,be=/\bprettyprinted\b/,rt=/pre|xmp/i,qe=/^code$/i,Ee=/^(?:pre|code|xmp)$/i,Pe={};function C(){for(var T=D.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;it<Se.length&&Ke.now()<T;it++){for(var M=Se[it],f=Pe,h=M;h=h.previousSibling;){var g=h.nodeType,y=(g===7||g===8)&&h.nodeValue;if(y?!/^\??prettify\b/.test(y):g!==3||/\S/.test(h.nodeValue))break;if(y){f={},y.replace(/\b(\w+)=([\w:.%+-]+)/g,function(St,mt,on){f[mt]=on});break}}var G=M.className;if((f!==Pe||Ze.test(G))&&!be.test(G)){for(var ue=!1,Me=M.parentNode;Me;Me=Me.parentNode){var Xe=Me.tagName;if(Ee.test(Xe)&&Me.className&&Ze.test(Me.className)){ue=!0;break}}if(!ue){M.className+=" prettyprinted";var st=f.lang;if(!st){st=G.match(Qe);var ze;!st&&(ze=R(M))&&qe.test(ze.tagName)&&(st=ze.className.match(Qe)),st&&(st=st[1])}var kt;if(rt.test(M.tagName))kt=1;else{var pt=M.currentStyle,at=Ne.defaultView,Dt=pt?pt.whiteSpace:at&&at.getComputedStyle?at.getComputedStyle(M,null).getPropertyValue("white-space"):0;kt=Dt&&Dt.substring(0,3)==="pre"}var bt=f.linenums;(bt=bt==="true"||+bt)||(bt=G.match(/\blinenums\b(?::(\d+))?/),bt=bt?bt[1]&&bt[1].length?+bt[1]:!0:!1),bt&&ge(M,bt,kt);var yt={langExtension:st,sourceNode:M,numberLines:bt,pre:kt,sourceCode:null,basePos:null,spans:null,decorations:null};m(yt)}}}it<Se.length?D.setTimeout(C,250):typeof K=="function"&&K()}C()}var Q=D.PR={createSimpleLexer:ne,registerLangHandler:H,sourceDecorator:ye,PR_ATTRIB_NAME:Z,PR_ATTRIB_VALUE:P,PR_COMMENT:he,PR_DECLARATION:F,PR_KEYWORD:je,PR_LITERAL:Oe,PR_NOCODE:A,PR_PLAIN:b,PR_PUNCTUATION:ae,PR_SOURCE:x,PR_STRING:_e,PR_TAG:q,PR_TYPE:pe,prettyPrintOne:oe?D.prettyPrintOne=O:V=O,prettyPrint:N=oe?D.prettyPrint=v:N=v},de=D.define;typeof de=="function"&&de.amd&&de("google-code-prettify",[],function(){return Q})})()},"VrN/":function(ct,$e,k){(function(U,me){ct.exports=me()})(this,function(){"use strict";var U=navigator.userAgent,me=navigator.platform,oe=/gecko\/\d/i.test(U),ke=/MSIE \d/.test(U),xe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(U),V=/Edge\/(\d+)/.exec(U),N=ke||xe||V,D=N&&(ke?document.documentMode||6:+(V||xe)[1]),L=!V&&/WebKit\//.test(U),W=L&&/Qt\/\d+\.\d+/.test(U),B=!V&&/Chrome\//.test(U),$=/Opera\//.test(U),we=/Apple Computer/.test(navigator.vendor),ie=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(U),z=/PhantomJS/.test(U),j=!V&&/AppleWebKit/.test(U)&&/Mobile\/\w+/.test(U),I=/Android/.test(U),se=j||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(U),te=j||/Mac/.test(me),Ae=/\bCrOS\b/.test(U),He=/win/i.test(me),ce=$&&U.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&($=!1,L=!0);var _e=te&&(W||$&&(ce==null||ce<12.11)),je=oe||N&&D>=9;function he(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var pe=function(e,t){var r=e.className,n=he(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 Oe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ae(e,t){return Oe(e).appendChild(t)}function b(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function q(e,t,r,n){var i=b(e,t,r,n);return i.setAttribute("role","presentation"),i}var F;document.createRange?F=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:F=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function x(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function Z(){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 P(e,t){var r=e.className;he(t).test(r)||(e.className+=(r?" ":"")+t)}function A(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!he(r[n]).test(t)&&(t+=" "+r[n]);return t}var S=function(e){e.select()};j?S=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:N&&(S=function(e){try{e.select()}catch(t){}});function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function p(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var l=e.indexOf(" ",a);if(l<0||l>=t)return o+(t-a);o+=l-a,o+=r-o%r,a=l+1}}var w=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};w.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},w.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 R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ne=50,ye={toString:function(){return"CodeMirror.Pass"}},ee={scroll:!1},ge={origin:"*mouse"},le={origin:"+move"};function re(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 H=[""];function J(e){for(;H.length<=e;)H.push(m(H)+" ");return H[e]}function m(e){return e[e.length-1]}function O(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function v(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Q(){}function de(e,t){var r;return Object.create?r=Object.create(e):(Q.prototype=e,r=new Q),t&&s(t,r),r}var K=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function fe(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||K.test(e))}function Te(e,t){return t?t.source.indexOf("\\w")>-1&&fe(e)?!0:t.test(e):fe(e)}function Ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var De=/[\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 Ce(e){return e.charCodeAt(0)>=768&&De.test(e)}function Se(e,t,r){for(;(r<0?t>0:t<e.length)&&Ce(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 Ge(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var Ye=null;function Ke(e,t,r){var n;Ye=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:Ye=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ye=i)}return n!=null?n:Ye}var it=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function u(d,E,_){this.level=d,this.from=E,this.to=_}return function(d,E){var _=E=="ltr"?"L":"R";if(d.length==0||E=="ltr"&&!n.test(d))return!1;for(var Y=d.length,X=[],ve=0;ve<Y;++ve)X.push(r(d.charCodeAt(ve)));for(var Le=0,Ie=_;Le<Y;++Le){var Fe=X[Le];Fe=="m"?X[Le]=Ie:Ie=Fe}for(var Be=0,We=_;Be<Y;++Be){var Ve=X[Be];Ve=="1"&&We=="r"?X[Be]="n":a.test(Ve)&&(We=Ve,Ve=="r"&&(X[Be]="R"))}for(var ot=1,nt=X[0];ot<Y-1;++ot){var ht=X[ot];ht=="+"&&nt=="1"&&X[ot+1]=="1"?X[ot]="1":ht==","&&nt==X[ot+1]&&(nt=="1"||nt=="n")&&(X[ot]=nt),nt=ht}for(var Ct=0;Ct<Y;++Ct){var Ht=X[Ct];if(Ht==",")X[Ct]="N";else if(Ht=="%"){var Mt=void 0;for(Mt=Ct+1;Mt<Y&&X[Mt]=="%";++Mt);for(var an=Ct&&X[Ct-1]=="!"||Mt<Y&&X[Mt]=="1"?"1":"N",Qt=Ct;Qt<Mt;++Qt)X[Qt]=an;Ct=Mt-1}}for(var jt=0,en=_;jt<Y;++jt){var Xt=X[jt];en=="L"&&Xt=="1"?X[jt]="L":a.test(Xt)&&(en=Xt)}for(var Ut=0;Ut<Y;++Ut)if(i.test(X[Ut])){var It=void 0;for(It=Ut+1;It<Y&&i.test(X[It]);++It);for(var Rt=(Ut?X[Ut-1]:_)=="L",tn=(It<Y?X[It]:_)=="L",Pr=Rt==tn?Rt?"L":"R":_,Gn=Ut;Gn<It;++Gn)X[Gn]=Pr;Ut=It-1}for(var Vt=[],Cn,zt=0;zt<Y;)if(o.test(X[zt])){var Pa=zt;for(++zt;zt<Y&&o.test(X[zt]);++zt);Vt.push(new u(0,Pa,zt))}else{var Mn=zt,ur=Vt.length,cr=E=="rtl"?1:0;for(++zt;zt<Y&&X[zt]!="L";++zt);for(var qt=Mn;qt<zt;)if(l.test(X[qt])){Mn<qt&&(Vt.splice(ur,0,new u(1,Mn,qt)),ur+=cr);var jr=qt;for(++qt;qt<zt&&l.test(X[qt]);++qt);Vt.splice(ur,0,new u(2,jr,qt)),ur+=cr,Mn=qt}else++qt;Mn<zt&&Vt.splice(ur,0,new u(1,Mn,zt))}return E=="ltr"&&(Vt[0].level==1&&(Cn=d.match(/^\s+/))&&(Vt[0].from=Cn[0].length,Vt.unshift(new u(0,0,Cn[0].length))),m(Vt).level==1&&(Cn=d.match(/\s+$/))&&(m(Vt).to-=Cn[0].length,Vt.push(new u(0,Y-Cn[0].length,Y)))),E=="rtl"?Vt.reverse():Vt}}();function Qe(e,t){var r=e.order;return r==null&&(r=e.order=it(e.text,t)),r}var Ze=[],be=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]||Ze).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Ze}function qe(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=R(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Ee(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 Pe(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ee(e,r||t.type,e,t),g(t)||t.codemirrorIgnore}function C(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)R(r,t[n])==-1&&r.push(t[n])}function T(e,t){return rt(e,t).length>0}function M(e){e.prototype.on=function(t,r){be(this,t,r)},e.prototype.off=function(t,r){qe(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function h(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function g(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function y(e){f(e),h(e)}function G(e){return e.target||e.srcElement}function ue(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),te&&e.ctrlKey&&t==1&&(t=3),t}var Me=function(){if(N&&D<9)return!1;var e=b("div");return"draggable"in e||"dragDrop"in e}(),Xe;function st(e){if(Xe==null){var t=b("span","\u200B");ae(e,b("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Xe=t.offsetWidth<=1&&t.offsetHeight>2&&!(N&&D<8))}var r=Xe?b("span","\u200B"):b("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ze;function kt(e){if(ze!=null)return ze;var t=ae(e,document.createTextNode("A\u062EA")),r=F(t,0,1).getBoundingClientRect(),n=F(t,1,2).getBoundingClientRect();return Oe(e),!r||r.left==r.right?!1:ze=n.right-r.right<3}var pt=`
|
|
|
|
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/)},at=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},Dt=function(){var e=b("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),bt=null;function yt(e){if(bt!=null)return bt;var t=ae(e,b("span","x")),r=t.getBoundingClientRect(),n=F(t,0,1).getBoundingClientRect();return bt=Math.abs(r.left-n.left)>1}var St={},mt={};function on(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),St[e]=t}function Kn(e,t){mt[e]=t}function cn(e){if(typeof e=="string"&&mt.hasOwnProperty(e))e=mt[e];else if(e&&typeof e.name=="string"&&mt.hasOwnProperty(e.name)){var t=mt[e.name];typeof t=="string"&&(t={name:t}),e=de(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return cn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return cn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function kn(e,t){t=cn(t);var r=St[t.name];if(!r)return kn(e,"text/plain");var n=r(e,t);if(mn.hasOwnProperty(t.name)){var i=mn[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 mn={};function bi(e,t){var r=mn.hasOwnProperty(e)?mn[e]:mn[e]={};s(t,r)}function dn(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 dr(e,t,r){return e.startState?e.startState(t,r):!0}var Ot=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};Ot.prototype.eol=function(){return this.pos>=this.string.length},Ot.prototype.sol=function(){return this.pos==this.lineStart},Ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ot.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ot.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},Ot.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ot.prototype.skipToEnd=function(){this.pos=this.string.length},Ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ot.prototype.backUp=function(e){this.pos-=e},Ot.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=p(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?p(this.string,this.lineStart,this.tabSize):0)},Ot.prototype.indentation=function(){return p(this.string,null,this.tabSize)-(this.lineStart?p(this.string,this.lineStart,this.tabSize):0)},Ot.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)}},Ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ot.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ot.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ot.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function et(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 Sn(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 fr(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function fn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function gt(e){if(e.parent==null)return null;for(var t=e.parent,r=R(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 Tn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o],u=l.height;if(t<u)break;t-=u}return r+o}function Dn(e,t){return t>=e.first&&t<e.first+e.size}function Vn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Re(e,t,r){if(r===void 0&&(r=null),!(this instanceof Re))return new Re(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ut(e,t){return e.line-t.line||e.ch-t.ch}function Ue(e,t){return e.sticky==t.sticky&&ut(e,t)==0}function Ir(e){return Re(e.line,e.ch)}function hr(e,t){return ut(e,t)<0?t:e}function Yn(e,t){return ut(e,t)<0?e:t}function qn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function lt(e,t){if(t.line<e.first)return Re(e.first,0);var r=e.first+e.size-1;return t.line>r?Re(r,et(e,r).text.length):Ji(t,et(e,t.line).text.length)}function Ji(e,t){var r=e.ch;return r==null||r>t?Re(e.line,t):r<0?Re(e.line,0):e}function Ur(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=lt(e,t[n]);return r}var hn=function(e,t){this.state=e,this.lookAhead=t},sn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};sn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},sn.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}},sn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},sn.fromSaved=function(e,t,r){return t instanceof hn?new sn(e,dn(e.mode,t.state),r,t.lookAhead):new sn(e,dn(e.mode,t),r)},sn.prototype.save=function(e){var t=e!==!1?dn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new hn(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(d,E){return i.push(d,E)},a,n);for(var o=r.state,l=function(d){r.baseTokens=i;var E=e.state.overlays[d],_=1,Y=0;r.state=!0,Wr(e,t.text,E.mode,r,function(X,ve){for(var Le=_;Y<X;){var Ie=i[_];Ie>X&&i.splice(_,1,X,i[_+1],Ie),_+=2,Y=Math.min(X,Ie)}if(!ve)return;if(E.opaque)i.splice(Le,_-Le,X,"overlay "+ve),_=Le+2;else for(;Le<_;Le+=2){var Fe=i[Le+1];i[Le+1]=(Fe?Fe+" ":"")+"overlay "+ve}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Fr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=nn(e,gt(t)),i=t.text.length>e.options.maxHighlightLength&&dn(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 nn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new sn(n,!0,t);var a=Jn(e,t,r),o=a>n.first&&et(n,a-1).stateAfter,l=o?sn.fromSaved(n,o,a):new sn(n,dr(n.mode),a);return n.iter(a,t,function(u){pr(e,u.text,l);var d=l.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function pr(e,t,r,n){var i=e.doc.mode,a=new Ot(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&xi(i,r.state);!a.eol();)mr(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 mr(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 _n=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function On(e,t,r,n){var i=e.doc,a=i.mode,o;t=lt(i,t);var l=et(i,t.line),u=nn(e,t.line,r),d=new Ot(l.text,e.options.tabSize,u),E;for(n&&(E=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=mr(a,d,u.state),n&&E.push(new _n(d,o,dn(i.mode,u.state)));return n?E:new _n(d,o,u.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 l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var u=0,d=null,E=new Ot(t,e.options.tabSize,n),_,Y=e.options.addModeClass&&[null];for(t==""&&wi(xi(r,n.state),a);!E.eol();){if(E.pos>e.options.maxHighlightLength?(l=!1,o&&pr(e,t,n,E.pos),E.pos=t.length,_=null):_=wi(mr(r,E,n.state,Y),a),Y){var X=Y[0].name;X&&(_="m-"+(_?X+" "+_:X))}if(!l||d!=_){for(;u<E.start;)u=Math.min(E.start,u+5e3),i(u,d);d=_}E.start=E.pos}for(;u<E.pos;){var ve=Math.min(E.pos,u+5e3);i(ve,d),u=ve}}function Jn(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=a.first)return a.first;var u=et(a,l-1),d=u.stateAfter;if(d&&(!r||l+(d instanceof hn?d.lookAhead:0)<=a.modeFrontier))return l;var E=p(u.text,null,e.options.tabSize);(i==null||n>E)&&(i=l-1,n=E)}return i}function Hr(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=et(e,n).stateAfter;if(i&&(!(i instanceof hn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Ei=!1,pn=!1;function Ci(){Ei=!0}function ki(){pn=!0}function gr(e,t,r){this.marker=e,this.from=t,this.to=r}function Rn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Ia(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function zr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Zn(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(l||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new gr(o,a.from,u?null:a.to))}}return n}function Br(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new gr(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Nn(e,t){if(t.full)return null;var r=Dn(e,t.from.line)&&et(e,t.from.line).markedSpans,n=Dn(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ut(t.from,t.to)==0,l=Zn(r,i,o),u=Br(n,a,o),d=t.text.length==1,E=m(t.text).length+(d?i:0);if(l)for(var _=0;_<l.length;++_){var Y=l[_];if(Y.to==null){var X=Rn(u,Y.marker);X?d&&(Y.to=X.to==null?null:X.to+E):Y.to=i}}if(u)for(var ve=0;ve<u.length;++ve){var Le=u[ve];if(Le.to!=null&&(Le.to+=E),Le.from==null){var Ie=Rn(l,Le.marker);Ie||(Le.from=E,d&&(l||(l=[])).push(Le))}else Le.from+=E,d&&(l||(l=[])).push(Le)}l&&(l=Qn(l)),u&&u!=l&&(u=Qn(u));var Fe=[l];if(!d){var Be=t.text.length-2,We;if(Be>0&&l)for(var Ve=0;Ve<l.length;++Ve)l[Ve].to==null&&(We||(We=[])).push(new gr(l[Ve].marker,null,null));for(var ot=0;ot<Be;++ot)Fe.push(We);Fe.push(u)}return Fe}function Qn(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(X){if(X.markedSpans)for(var ve=0;ve<X.markedSpans.length;++ve){var Le=X.markedSpans[ve].marker;Le.readOnly&&(!n||R(n,Le)==-1)&&(n||(n=[])).push(Le)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],l=o.find(0),u=0;u<i.length;++u){var d=i[u];if(ut(d.to,l.from)<0||ut(d.from,l.to)>0)continue;var E=[u,1],_=ut(d.from,l.from),Y=ut(d.to,l.to);(_<0||!o.inclusiveLeft&&!_)&&E.push({from:d.from,to:l.from}),(Y>0||!o.inclusiveRight&&!Y)&&E.push({from:l.to,to:d.to}),i.splice.apply(i,E),u+=E.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 er(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function vr(e){return e.inclusiveLeft?-1:0}function xn(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=ut(n.from,i.from)||vr(e)-vr(t);if(a)return-a;var o=ut(n.to,i.to)||xn(e)-xn(t);return o||t.id-e.id}function Ti(e,t){var r=pn&&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 _i(e){return Ti(e,!0)}function Kr(e){return Ti(e,!1)}function Ua(e,t){var r=pn&&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 Zi(e,t,r,n,i){var a=et(e,t),o=pn&&a.markedSpans;if(o)for(var l=0;l<o.length;++l){var u=o[l];if(!u.marker.collapsed)continue;var d=u.marker.find(0),E=ut(d.from,r)||vr(u.marker)-vr(i),_=ut(d.to,n)||xn(u.marker)-xn(i);if(E>=0&&_<=0||E<=0&&_>=0)continue;if(E<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.to,r)>=0:ut(d.to,r)>0)||E>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.from,n)<=0:ut(d.from,n)<0))return!0}}function tt(e){for(var t;t=_i(e);)e=t.find(-1,!0).line;return e}function dt(e){for(var t;t=Kr(e);)e=t.find(1,!0).line;return e}function ft(e){for(var t,r;t=Kr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function wt(e,t){var r=et(e,t),n=tt(r);return r==n?t:gt(n)}function Et(e,t){if(t>e.lastLine())return t;var r=et(e,t),n;if(!Tt(e,r))return t;for(;n=Kr(r);)r=n.find(1,!0).line;return gt(r)+1}function Tt(e,t){var r=pn&&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&&Nt(e,t,n))return!0}}function Nt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Nt(e,n.line,Rn(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)&&Nt(e,t,i))return!0}function Lt(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 l=a.children[o];if(l==r)break;t+=l.height}return t}function Gt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=_i(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Kr(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 gn(e){var t=e.display,r=e.doc;t.maxLine=et(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 _t=function(e,t,r){this.text=e,er(this,t),this.height=r?r(this):1};_t.prototype.lineNo=function(){return gt(this)},M(_t);function Pn(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),er(e,r);var i=n?n(e):1;i!=e.height&&fn(e,i)}function Kt(e){e.parent=null,Xr(e)}var jn={},In={};function br(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?In:jn;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var r=q("span",null,null,L?"padding-right: .1px":null),n={pre:q("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,kt(e.display.measure)&&(o=Qe(a,e.doc.direction))&&(n.addToken=_s(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&>(a);Os(a,n,Fr(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=A(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=A(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(st(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(L){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Ee(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=A(n.pre.className,n.textClass||"")),n}function ks(e){var t=b("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var l=e.splitSpaces?Ts(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,E;if(!u.test(t))e.col+=t.length,E=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,E),N&&D<9&&(d=!0),e.pos+=t.length;else{E=document.createDocumentFragment();for(var _=0;;){u.lastIndex=_;var Y=u.exec(t),X=Y?Y.index-_:t.length-_;if(X){var ve=document.createTextNode(l.slice(_,_+X));N&&D<9?E.appendChild(b("span",[ve])):E.appendChild(ve),e.map.push(e.pos,e.pos+X,ve),e.col+=X,e.pos+=X}if(!Y)break;_+=X+1;var Le=void 0;if(Y[0]==" "){var Ie=e.cm.options.tabSize,Fe=Ie-e.col%Ie;Le=E.appendChild(b("span",J(Fe),"cm-tab")),Le.setAttribute("role","presentation"),Le.setAttribute("cm-text"," "),e.col+=Fe}else Y[0]=="\r"||Y[0]==`
|
|
`?(Le=E.appendChild(b("span",Y[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Le.setAttribute("cm-text",Y[0]),e.col+=1):(Le=e.cm.options.specialCharPlaceholder(Y[0]),Le.setAttribute("cm-text",Y[0]),N&&D<9?E.appendChild(b("span",[Le])):E.appendChild(Le),e.col+=1);e.map.push(e.pos,e.pos+1,Le),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Be=r||"";n&&(Be+=n),i&&(Be+=i);var We=b("span",[E],Be,a);if(o)for(var Ve in o)o.hasOwnProperty(Ve)&&Ve!="style"&&Ve!="class"&&We.setAttribute(Ve,o[Ve]);return e.content.appendChild(We)}e.content.appendChild(E)}function Ts(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 _s(e,t){return function(r,n,i,a,o,l,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,E=d+n.length;;){for(var _=void 0,Y=0;Y<t.length&&!(_=t[Y],_.to>d&&_.from<=d);Y++);if(_.to>=E)return e(r,n,i,a,o,l,u);e(r,n.slice(0,_.to-d),i,a,null,l,u),a=null,n=n.slice(_.to-d),d=_.to}}}function Wa(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]),br(r[o+1],t.cm.options));return}for(var l=i.length,u=0,d=1,E="",_,Y,X=0,ve,Le,Ie,Fe,Be;;){if(X==u){ve=Le=Ie=Y="",Be=null,Fe=null,X=Infinity;for(var We=[],Ve=void 0,ot=0;ot<n.length;++ot){var nt=n[ot],ht=nt.marker;if(ht.type=="bookmark"&&nt.from==u&&ht.widgetNode)We.push(ht);else if(nt.from<=u&&(nt.to==null||nt.to>u||ht.collapsed&&nt.to==u&&nt.from==u)){if(nt.to!=null&&nt.to!=u&&X>nt.to&&(X=nt.to,Le=""),ht.className&&(ve+=" "+ht.className),ht.css&&(Y=(Y?Y+";":"")+ht.css),ht.startStyle&&nt.from==u&&(Ie+=" "+ht.startStyle),ht.endStyle&&nt.to==X&&(Ve||(Ve=[])).push(ht.endStyle,nt.to),ht.title&&((Be||(Be={})).title=ht.title),ht.attributes)for(var Ct in ht.attributes)(Be||(Be={}))[Ct]=ht.attributes[Ct];ht.collapsed&&(!Fe||Gr(Fe.marker,ht)<0)&&(Fe=nt)}else nt.from>u&&X>nt.from&&(X=nt.from)}if(Ve)for(var Ht=0;Ht<Ve.length;Ht+=2)Ve[Ht+1]==X&&(Le+=" "+Ve[Ht]);if(!Fe||Fe.from==u)for(var Mt=0;Mt<We.length;++Mt)Wa(t,0,We[Mt]);if(Fe&&(Fe.from||0)==u){if(Wa(t,(Fe.to==null?l+1:Fe.to)-u,Fe.marker,Fe.from==null),Fe.to==null)return;Fe.to==u&&(Fe=!1)}}if(u>=l)break;for(var an=Math.min(l,X);;){if(E){var Qt=u+E.length;if(!Fe){var jt=Qt>an?E.slice(0,an-u):E;t.addToken(t,jt,_?_+ve:ve,Ie,u+jt.length==X?Le:"",Y,Be)}if(Qt>=an){E=E.slice(an-u),u=an;break}u=Qt,Ie=""}E=i.slice(a,a=r[d++]),_=br(r[d++],t.cm.options)}}}function Ha(e,t,r){this.line=t,this.rest=ft(t),this.size=this.rest?gt(m(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Tt(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Ha(e.doc,et(e.doc,a),a);i=a+o.size,n.push(o)}return n}var yr=null;function Ls(e){yr?yr.ops.push(e):e.ownsGroup=yr={ops:[e],delayedCallbacks:[]}}function As(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 Ms(e,t){var r=e.ownsGroup;if(!r)return;try{As(r)}finally{yr=null,t(r)}}var $r=null;function Bt(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;yr?i=yr.delayedCallbacks:$r?i=$r:(i=$r=[],setTimeout(Ds,0));for(var a=function(l){i.push(function(){return r[l].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){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"?Ns(e,t):a=="gutter"?Xa(e,t,r,n):a=="class"?Qi(e,t):a=="widget"&&Ps(e,t,n)}t.changes=null}function Vr(e){return e.node==e.text&&(e.node=b("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),N&&D<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=Vr(t);t.background=n.insertBefore(b("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ba(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 Ns(e,t){var r=t.text.className,n=Ba(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?Vr(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 Xa(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=Vr(t);t.gutterBackground=b("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=Vr(t),l=t.gutter=b("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(b("div",Vn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var d=e.display.gutterSpecs[u].className,E=a.hasOwnProperty(d)&&a[d];E&&l.appendChild(b("div",[E],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function Ps(e,t,r){t.alignable&&(t.alignable=null);for(var n=he("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ga(e,t,r)}function js(e,t,r,n){var i=Ba(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Qi(e,t),Xa(e,t,r,n),Ga(e,t,n),t.node}function Ga(e,t,r){if(Ka(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ka(e,t.rest[n],t,r,!1)}function Ka(e,t,r,n,i){if(!t.widgets)return;for(var a=Vr(r),o=0,l=t.widgets;o<l.length;++o){var u=l[o],d=b("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(u,d,r,n),e.display.input.setUneditable(d),i&&u.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),Bt(u,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Yr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!x(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),ae(t.display.measure,b("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Ln(e,t){for(var r=G(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 $a(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ae(e.measure,b("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function wn(e){return ne-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-wn(e)-e.display.barWidth}function ta(e){return e.display.scroller.clientHeight-wn(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var u=o[l],d=o[l+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function Va(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(gt(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=gt(t),n=e.display.externalMeasured=new Ha(e.doc,t,r);n.lineN=r;var i=n.built=Fa(e,n);return n.text=i.pre,ae(e.display.lineMeasure,i.pre),n}function Ya(e,t,r,n){return En(e,xr(e,t),r,n)}function na(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ir(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function xr(e,t){var r=gt(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=Va(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function En(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=Hs(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 qa={left:0,right:0,top:0,bottom:0};function Ja(e,t,r){for(var n,i,a,o,l,u,d=0;d<e.length;d+=3)if(l=e[d],u=e[d+1],t<l?(i=0,a=1,o="left"):t<u?(i=t-l,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-l,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],l==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==u-l)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:l,coverEnd:u}}function Ws(e,t){var r=qa;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 Hs(e,t,r,n){var i=Ja(t.map,r,n),a=i.node,o=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var E=0;E<4;E++){for(;o&&Ce(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+l<i.coverEnd&&Ce(t.line.text.charAt(i.coverStart+l));)++l;if(N&&D<9&&o==0&&l==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Ws(F(a,o,l).getClientRects(),n),d.left||d.right||o==0)break;l=o,o=o-1,u="right"}N&&D<11&&(d=zs(e.display.measure,d))}else{o>0&&(u=n="right");var _;e.options.lineWrapping&&(_=a.getClientRects()).length>1?d=_[n=="right"?_.length-1:0]:d=a.getBoundingClientRect()}if(N&&D<9&&!o&&(!d||!d.left&&!d.right)){var Y=a.parentNode.getClientRects()[0];Y?d={left:Y.left,right:Y.left+Er(e.display),top:Y.top,bottom:Y.bottom}:d=qa}for(var X=d.top-t.rect.top,ve=d.bottom-t.rect.top,Le=(X+ve)/2,Ie=t.view.measure.heights,Fe=0;Fe<Ie.length-1&&!(Le<Ie[Fe]);Fe++);var Be=Fe?Ie[Fe-1]:0,We=Ie[Fe],Ve={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:Be,bottom:We};return!d.left&&!d.right&&(Ve.bogus=!0),e.options.singleCursorHeightPerLine||(Ve.rtop=X,Ve.rbottom=ve),Ve}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yt(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 Za(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,Oe(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Za(e.display.view[t])}function qr(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 B&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return B&&I?-(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+=Yr(e.widgets[r]));return t}function Ai(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=Lt(t);if(n=="local"?o+=Li(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+(n=="window"?0:to());var u=l.left+(n=="window"?0:eo());r.left+=u,r.right+=u}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=et(e.doc,t.line)),Ai(e,n,Ya(e,n,t.ch,i),r)}function vn(e,t,r,n,i,a){n=n||et(e.doc,t.line),i||(i=xr(e,n));function o(ve,Le){var Ie=En(e,i,ve,Le?"right":"left",a);return Le?Ie.left=Ie.right:Ie.right=Ie.left,Ai(e,n,Ie,r)}var l=Qe(n,e.doc.direction),u=t.ch,d=t.sticky;if(u>=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!l)return o(d=="before"?u-1:u,d=="before");function E(ve,Le,Ie){var Fe=l[Le],Be=Fe.level==1;return o(Ie?ve-1:ve,Be!=Ie)}var _=Ke(l,u,d),Y=Ye,X=E(u,_,d=="before");return Y!=null&&(X.other=E(u,Y,d!="before")),X}function ro(e,t){var r=0;t=lt(e.doc,t),e.options.lineWrapping||(r=Er(e.display)*t.ch);var n=et(e.doc,t.line),i=Lt(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Re(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=Tn(n,r),a=n.first+n.size-1;if(i>a)return aa(n.first+n.size-1,et(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=et(n,i);;){var l=Bs(e,o,i,t,r),u=Ua(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var d=u.find(1);if(d.line==i)return d;o=et(n,i=d.line)}}function io(e,t,r,n){n-=ra(t);var i=t.text.length,a=Je(function(o){return En(e,r,o-1).bottom<=n},i,0);return i=Je(function(o){return En(e,r,o).top>n},a,i),{begin:a,end:i}}function ao(e,t,r,n){r||(r=xr(e,t));var i=Ai(e,t,En(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 Bs(e,t,r,n,i){i-=Lt(t);var a=xr(e,t),o=ra(t),l=0,u=t.text.length,d=!0,E=Qe(t,e.doc.direction);if(E){var _=(e.options.lineWrapping?Gs:Xs)(e,t,r,a,E,n,i);d=_.level!=1,l=d?_.from:_.to-1,u=d?_.to:_.from-1}var Y=null,X=null,ve=Je(function(ot){var nt=En(e,a,ot);return nt.top+=o,nt.bottom+=o,sa(nt,n,i,!1)?(nt.top<=i&&nt.left<=n&&(Y=ot,X=nt),!0):!1},l,u),Le,Ie,Fe=!1;if(X){var Be=n-X.left<X.right-n,We=Be==d;ve=Y+(We?0:1),Ie=We?"after":"before",Le=Be?X.left:X.right}else{!d&&(ve==u||ve==l)&&ve++,Ie=ve==0?"after":ve==t.text.length?"before":En(e,a,ve-(d?1:0)).bottom+o<=i==d?"after":"before";var Ve=vn(e,Re(r,ve,Ie),"line",t,a);Le=Ve.left,Fe=i<Ve.top?-1:i>=Ve.bottom?1:0}return ve=Se(t.text,ve,1),aa(r,ve,Ie,Fe,n-Le)}function Xs(e,t,r,n,i,a,o){var l=Je(function(_){var Y=i[_],X=Y.level!=1;return sa(vn(e,Re(r,X?Y.to:Y.from,X?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[l];if(l>0){var d=u.level!=1,E=vn(e,Re(r,d?u.from:u.to,d?"after":"before"),"line",t,n);sa(E,a,o,!0)&&E.top>o&&(u=i[l-1])}return u}function Gs(e,t,r,n,i,a,o){var l=io(e,t,n,o),u=l.begin,d=l.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var E=null,_=null,Y=0;Y<i.length;Y++){var X=i[Y];if(X.from>=d||X.to<=u)continue;var ve=X.level!=1,Le=En(e,n,ve?Math.min(d,X.to)-1:Math.max(u,X.from)).right,Ie=Le<a?a-Le+1e9:Le-a;(!E||_>Ie)&&(E=X,_=Ie)}return E||(E=i[i.length-1]),E.from<u&&(E={from:u,to:E.to,level:E.level}),E.to>d&&(E={from:E.from,to:d,level:E.level}),E}var nr;function wr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(nr==null){nr=b("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nr.appendChild(document.createTextNode("x")),nr.appendChild(b("br"));nr.appendChild(document.createTextNode("x"))}ae(e.measure,nr);var r=nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Oe(e.measure),r||1}function Er(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=b("span","xxxxxxxxxx"),r=b("pre",[t],"CodeMirror-line-like");ae(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function 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 l=e.display.gutterSpecs[o].className;r[l]=a.offsetLeft+a.clientLeft+i,n[l]=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=wr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Er(e.display)-3);return function(i){if(Tt(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&&fn(n,i)})}function rr(e,t,r,n){var i=e.display;if(!r&&G(t).getAttribute("cm-not-content")=="true")return null;var a,o,l=i.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,o=t.clientY-l.top}catch(_){return null}var u=oa(e,a,o),d;if(n&&u.xRel>0&&(d=et(e.doc,u.line).text).length==u.ch){var E=p(d,d.length,e.options.tabSize)-d.length;u=Re(u.line,Math.max(0,Math.round((a-$a(e.display).left)/Er(e.display))-E))}return u}function ir(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 Jt(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)pn&&wt(e.doc,t)<i.viewTo&&Fn(e);else if(r<=i.viewFrom)pn&&Et(e.doc,r+n)>i.viewFrom?Fn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Fn(e);else if(t<=i.viewFrom){var a=Mi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Fn(e)}else if(r>=i.viewTo){var o=Mi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Fn(e)}else{var l=Mi(e,t,t,-1),u=Mi(e,r,r+n,1);l&&u?(i.view=i.view.slice(0,l.index).concat(Oi(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Fn(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function Un(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[ir(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);R(o,r)==-1&&o.push(r)}function Fn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Mi(e,t,r,n){var i=ir(e,t),a,o=e.display.view;if(!pn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u<i;u++)l+=o[u].size;if(l!=t){if(n>0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,r+=a}for(;wt(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Ks(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=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(ir(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,ir(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 Jr(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 l=r.sel.ranges[o];if(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)continue;var u=l.empty();(u||e.options.showCursorWhenSelecting)&&uo(e,l.head,i),u||$s(e,l,a)}return n}function uo(e,t,r){var n=vn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(b("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(b("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Di(e,t){return e.top-t.top||e.left-t.left}function $s(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=$a(e.display),l=o.left,u=Math.max(n.sizerWidth,tr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function E(We,Ve,ot,nt){Ve<0&&(Ve=0),Ve=Math.round(Ve),nt=Math.round(nt),a.appendChild(b("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
|
|
top: `+Ve+"px; width: "+(ot==null?u-We:ot)+`px;
|
|
height: `+(nt-Ve)+"px"))}function _(We,Ve,ot){var nt=et(i,We),ht=nt.text.length,Ct,Ht;function Mt(jt,en){return ia(e,Re(We,jt),"div",nt,en)}function an(jt,en,Xt){var Ut=ao(e,nt,null,jt),It=en=="ltr"==(Xt=="after")?"left":"right",Rt=Xt=="after"?Ut.begin:Ut.end-(/\s/.test(nt.text.charAt(Ut.end-1))?2:1);return Mt(Rt,It)[It]}var Qt=Qe(nt,i.direction);return Ge(Qt,Ve||0,ot==null?ht:ot,function(jt,en,Xt,Ut){var It=Xt=="ltr",Rt=Mt(jt,It?"left":"right"),tn=Mt(en-1,It?"right":"left"),Pr=Ve==null&&jt==0,Gn=ot==null&&en==ht,Vt=Ut==0,Cn=!Qt||Ut==Qt.length-1;if(tn.top-Rt.top<=3){var zt=(d?Pr:Gn)&&Vt,Pa=(d?Gn:Pr)&&Cn,Mn=zt?l:(It?Rt:tn).left,ur=Pa?u:(It?tn:Rt).right;E(Mn,Rt.top,ur-Mn,Rt.bottom)}else{var cr,qt,jr,ja;It?(cr=d&&Pr&&Vt?l:Rt.left,qt=d?u:an(jt,Xt,"before"),jr=d?l:an(en,Xt,"after"),ja=d&&Gn&&Cn?u:tn.right):(cr=d?an(jt,Xt,"before"):l,qt=!d&&Pr&&Vt?u:Rt.right,jr=!d&&Gn&&Cn?l:tn.left,ja=d?an(en,Xt,"after"):u),E(cr,Rt.top,qt-cr,Rt.bottom),Rt.bottom<tn.top&&E(l,Rt.bottom,null,tn.top),E(jr,tn.top,ja-jr,tn.bottom)}(!Ct||Di(Rt,Ct)<0)&&(Ct=Rt),Di(tn,Ct)<0&&(Ct=tn),(!Ht||Di(Rt,Ht)<0)&&(Ht=Rt),Di(tn,Ht)<0&&(Ht=tn)}),{start:Ct,end:Ht}}var Y=t.from(),X=t.to();if(Y.line==X.line)_(Y.line,Y.ch,X.ch);else{var ve=et(i,Y.line),Le=et(i,X.line),Ie=tt(ve)==tt(Le),Fe=_(Y.line,Y.ch,Ie?ve.text.length+1:null).end,Be=_(X.line,Ie?0:null,X.ch).start;Ie&&(Fe.top<Be.top-2?(E(Fe.right,Fe.top,null,Fe.bottom),E(l,Be.top,Be.left,Be.bottom)):E(Fe.right,Fe.top,Be.left-Fe.right,Fe.bottom)),Fe.bottom<Be.top&&E(l,Fe.bottom,null,Be.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||(Ee(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),L&&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&&(Ee(e,"blur",e,t),e.state.focused=!1,pe(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,l=0;if(i.hidden)continue;if(N&&D<8){var u=i.node.offsetTop+i.node.offsetHeight;o=u-r,r=u}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var E=i.line.height-o;if((E>.005||E<-.005)&&(fn(i.line,o),ho(i.line),i.rest))for(var _=0;_<i.rest.length;_++)ho(i.rest[_]);if(l>e.display.sizerWidth){var Y=Math.ceil(l/Er(e.display));Y>e.display.maxLineLength&&(e.display.maxLineLength=Y,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 Ni(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=Tn(t,n),o=Tn(t,i);if(r&&r.ensure){var l=r.ensure.from.line,u=r.ensure.to.line;l<a?(a=l,o=Tn(t,Lt(et(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=Tn(t,Lt(et(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(Pe(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&&!z){var a=b("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Li(e.display))+`px;
|
|
height: `+(t.bottom-t.top+wn(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?Re(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Re(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,l=vn(e,t),u=!r||r==t?l:vn(e,r);i={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n};var d=ha(e,i),E=e.doc.scrollTop,_=e.doc.scrollLeft;if(d.scrollTop!=null&&(Qr(e,d.scrollTop),Math.abs(e.doc.scrollTop-E)>1&&(o=!0)),d.scrollLeft!=null&&(ar(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-_)>1&&(o=!0)),!o)break}return i}function qs(e,t){var r=ha(e,t);r.scrollTop!=null&&Qr(e,r.scrollTop),r.scrollLeft!=null&&ar(e,r.scrollLeft)}function ha(e,t){var r=e.display,n=wr(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 l=e.doc.height+ea(r),u=t.top<n,d=t.bottom>l-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var E=Math.min(t.top,(d?l:t.bottom)-a);E!=i&&(o.scrollTop=E)}var _=e.options.fixedGutter?0:r.gutters.offsetWidth,Y=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-_,X=tr(e)-r.gutters.offsetWidth,ve=t.right-t.left>X;return ve&&(t.right=t.left+X),t.left<10?o.scrollLeft=0:t.left<Y?o.scrollLeft=Math.max(0,t.left+_-(ve?0:10)):t.right>X+Y-3&&(o.scrollLeft=t.right+(ve?0:10)-X),o}function pa(e,t){if(t==null)return;Pi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function kr(e){Pi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Zr(e,t,r){(t!=null||r!=null)&&Pi(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Js(e,t){Pi(e),e.curOp.scrollToPos=t}function Pi(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});Zr(e,i.scrollLeft,i.scrollTop)}function Qr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;oe||ga(e,{top:t}),mo(e,t,!0),oe&&ga(e),ni(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 ar(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 ei(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+wn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var or=function(e,t,r){this.cm=r;var n=this.vert=b("div",[b("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=b("div",[b("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),be(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),be(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,N&&D<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};or.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}},or.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},or.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},or.prototype.zeroWidthHack=function(){var e=te&&!ie?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new w,this.disableVert=new w},or.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)},or.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ti=function(){};ti.prototype.update=function(){return{bottom:0,right:0}},ti.prototype.setScrollLeft=function(){},ti.prototype.setScrollTop=function(){},ti.prototype.clear=function(){};function Sr(e,t){t||(t=ei(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,ei(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:or,null:ti};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&pe(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),be(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"?ar(e,t):Qr(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function sr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},Ls(e.curOp)}function lr(e){var t=e.curOp;t&&Ms(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&&gn(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 ji(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=ei(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+wn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-tr(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&&ar(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Z();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Sr(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&&ar(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,lt(n,e.scrollToPos.from),lt(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var l=0;l<a.length;++l)a[l].lines.length||Ee(a[l],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&Ee(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ee(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function rn(e,t){if(e.curOp)return t();sr(e);try{return t()}finally{lr(e)}}function Ft(e,t){return function(){if(e.curOp)return t.apply(e,arguments);sr(e);try{return t.apply(e,arguments)}finally{lr(e)}}}function Yt(e){return function(){if(this.curOp)return e.apply(this,arguments);sr(this);try{return e.apply(this,arguments)}finally{lr(this)}}}function Wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);sr(t);try{return e.apply(this,arguments)}finally{lr(t)}}}function ni(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=nn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,l=a.text.length>e.options.maxHighlightLength?dn(t.mode,n.state):null,u=yi(e,a,n,!0);l&&(n.state=l),a.styles=u.styles;var d=a.styleClasses,E=u.classes;E?a.styleClasses=E:d&&(a.styleClasses=null);for(var _=!o||o.length!=a.styles.length||d!=E&&(!d||!E||d.bgClass!=E.bgClass||d.textClass!=E.textClass),Y=0;!_&&Y<o.length;++Y)_=o[Y]!=a.styles[Y];_&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&rn(e,function(){for(var a=0;a<i.length;a++)Un(e,i[a],"text")})}var ji=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ni(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=r,this.dims=la(e),this.events=[]};ji.prototype.signal=function(e,t){T(e,t)&&this.events.push(arguments)},ji.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ee.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=wn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=wn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=Z();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==Z())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 Fn(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)&&(Fn(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)),pn&&(a=wt(e.doc,a),o=Et(e.doc,o));var l=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ks(e,a,o),r.viewOffset=Lt(et(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=so(e);if(!l&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return u>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),Oe(r.cursorDiv),Oe(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(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==tr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ea(e.display)-ta(e),r.top)}),t.visible=Ni(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ni(e.display,e.doc,r));if(!ma(e,t))break;Ri(e);var i=ei(e);Jr(e),Sr(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 ji(e,t);if(ma(e,r)){Ri(e),yo(e,r);var n=ei(e);Jr(e),Sr(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 l(ve){var Le=ve.nextSibling;return L&&te&&e.display.currentWheelTarget==ve?ve.style.display="none":ve.parentNode.removeChild(ve),Le}for(var u=n.view,d=n.viewFrom,E=0;E<u.length;E++){var _=u[E];if(!_.hidden)if(!_.node||_.node.parentNode!=a){var Y=js(e,_,d,r);a.insertBefore(Y,o)}else{for(;o!=_.node;)o=l(o);var X=i&&t!=null&&t<=d&&_.lineNumber;_.changes&&(R(_.changes,"gutter")>-1&&(X=!1),za(e,_,d,r)),X&&(Oe(_.lineNumber),_.lineNumber.appendChild(document.createTextNode(Vn(e.options,d)))),o=_.node.nextSibling}d+=_.size}for(;o;)o=l(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+wn(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 l=r[o].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function wo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Vn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(b("div",[b("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",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;Oe(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,l=t.appendChild(b("div",null,"CodeMirror-gutter "+a));o&&(l.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",va(e)}function ri(e){Eo(e.display),Jt(e),xo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=b("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=b("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=q("div",null,"CodeMirror-code"),i.selectionDiv=b("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=b("div",null,"CodeMirror-cursors"),i.measure=b("div",null,"CodeMirror-measure"),i.lineMeasure=b("div",null,"CodeMirror-measure"),i.lineSpace=q("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=q("div",[i.lineSpace],"CodeMirror-lines");i.mover=b("div",[a],null,"position: relative"),i.sizer=b("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=b("div",null,null,"position: absolute; height: "+ne+"px; width: 1px;"),i.gutters=b("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=b("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=b("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),N&&D<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!L&&!(oe&&se)&&(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 Ii=0,ln=null;N?ln=-.53:oe?ln=15:B?ln=-.7:we&&(ln=-1/3);function Co(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=Co(e);return t.x*=ln,t.y*=ln,t}function ko(e,t){var r=Co(t),n=r.x,i=r.y,a=e.display,o=a.scroller,l=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&l||i&&u))return;if(i&&te&&L){e:for(var d=t.target,E=a.view;d!=o;d=d.parentNode)for(var _=0;_<E.length;_++)if(E[_].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!oe&&!$&&ln!=null){i&&u&&Qr(e,Math.max(0,o.scrollTop+i*ln)),ar(e,Math.max(0,o.scrollLeft+n*ln)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&ln!=null){var Y=i*ln,X=e.doc.scrollTop,ve=X+a.wrapper.clientHeight;Y<0?X=Math.max(0,X+Y-50):ve=Math.min(e.doc.height,ve+Y+50),ga(e,{top:X,bottom:ve})}Ii<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 Le=o.scrollLeft-a.wheelStartX,Ie=o.scrollTop-a.wheelStartY,Fe=Ie&&a.wheelDY&&Ie/a.wheelDY||Le&&a.wheelDX&&Le/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Fe)return;ln=(ln*Ii+Fe)/(Ii+1),++Ii},200)):(a.wheelDX+=n,a.wheelDY+=i))}var un=function(e,t){this.ranges=e,this.primIndex=t};un.prototype.primary=function(){return this.ranges[this.primIndex]},un.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(!Ue(r.anchor,n.anchor)||!Ue(r.head,n.head))return!1}return!0},un.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vt(Ir(this.ranges[t].anchor),Ir(this.ranges[t].head));return new un(e,this.primIndex)},un.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},un.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ut(t,n.from())>=0&&ut(e,n.to())<=0)return r}return-1};var vt=function(e,t){this.anchor=e,this.head=t};vt.prototype.from=function(){return Yn(this.anchor,this.head)},vt.prototype.to=function(){return hr(this.anchor,this.head)},vt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function bn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(Y,X){return ut(Y.from(),X.from())}),r=R(t,i);for(var a=1;a<t.length;a++){var o=t[a],l=t[a-1],u=ut(l.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Yn(l.from(),o.from()),E=hr(l.to(),o.to()),_=l.empty()?o.from()==o.head:l.from()==l.head;a<=r&&--r,t.splice(--a,2,new vt(_?E:d,_?d:E))}}return new un(t,r)}function Wn(e,t){return new un([new vt(e,t||e)],0)}function Hn(e){return e.text?Re(e.from.line+e.text.length-1,m(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function So(e,t){if(ut(e,t.from)<0)return e;if(ut(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),Re(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 vt(So(i.anchor,t),So(i.head,t)))}return bn(e.cm,r,e.sel.primIndex)}function To(e,t,r){return e.line==t.line?Re(r.line,e.ch-t.ch+r.ch):Re(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Re(e.first,0),a=i,o=0;o<t.length;o++){var l=t[o],u=To(l.from,i,a),d=To(Hn(l),i,a);if(i=l.to,a=d,r=="around"){var E=e.sel.ranges[o],_=ut(E.head,E.anchor)<0;n[o]=new vt(_?d:u,_?u:d)}else n[o]=new vt(u,u)}return new un(n,e.sel.primIndex)}function wa(e){e.doc.mode=kn(e.options,e.doc.modeOption),ii(e)}function ii(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,ni(e,100),e.state.modeGen++,e.curOp&&Jt(e)}function _o(e,t){return t.from.ch==0&&t.to.ch==0&&m(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ea(e,t,r,n){function i(Be){return r?r[Be]:null}function a(Be,We,Ve){Pn(Be,We,Ve,n),Bt(Be,"change",Be,t)}function o(Be,We){for(var Ve=[],ot=Be;ot<We;++ot)Ve.push(new _t(d[ot],i(ot),n));return Ve}var l=t.from,u=t.to,d=t.text,E=et(e,l.line),_=et(e,u.line),Y=m(d),X=i(d.length-1),ve=u.line-l.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(_o(e,t)){var Le=o(0,d.length-1);a(_,_.text,X),ve&&e.remove(l.line,ve),Le.length&&e.insert(l.line,Le)}else if(E==_)if(d.length==1)a(E,E.text.slice(0,l.ch)+Y+E.text.slice(u.ch),X);else{var Ie=o(1,d.length-1);Ie.push(new _t(Y+E.text.slice(u.ch),X,n)),a(E,E.text.slice(0,l.ch)+d[0],i(0)),e.insert(l.line+1,Ie)}else if(d.length==1)a(E,E.text.slice(0,l.ch)+d[0]+_.text.slice(u.ch),i(0)),e.remove(l.line+1,ve);else{a(E,E.text.slice(0,l.ch)+d[0],i(0)),a(_,Y+_.text.slice(u.ch),X);var Fe=o(1,d.length-1);ve>1&&e.remove(l.line+1,ve-1),e.insert(l.line+1,Fe)}Bt(e,"change",e,t)}function zn(e,t,r){function n(i,a,o){if(i.linked)for(var l=0;l<i.linked.length;++l){var u=i.linked[l];if(u.doc==a)continue;var d=o&&u.sharedHist;if(r&&!d)continue;t(u.doc,d),n(u.doc,i,d)}}n(e,null,!0)}function 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||gn(e),e.options.mode=t.modeOption,Jt(e)}function Lo(e){(e.doc.direction=="rtl"?P:pe)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){rn(e,function(){Lo(e),Jt(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 Ca(e,t){var r={from:Ir(t.from),to:Hn(t),text:Sn(e,t.from,t.to)};return Do(e,r,t.from.line,t.to.line+1),zn(e,function(n){return Do(n,r,t.from.line,t.to.line+1)},!0),r}function Ao(e){for(;e.length;){var t=m(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Ao(e.done),m(e.done);if(e.done.length&&!m(e.done).ranges)return m(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),m(e.done)}function Mo(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))l=m(o.changes),ut(t.from,t.to)==0&&ut(t.from,l.to)==0?l.to=Hn(t):o.changes.push(Ca(e,t));else{var u=m(i.done);for((!u||!u.ranges)&&Fi(e.sel,i.done),o={changes:[Ca(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Ee(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,m(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&&Ao(i.undone)}function Fi(e,t){var r=m(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Do(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=Nn(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var l=0;l<o.length;++l){for(var u=o[l],d=0;d<a.length;++d)if(a[d].marker==u.marker)continue e;a.push(u)}}else o&&(r[i]=o)}return r}function Tr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?un.prototype.deepCopy.call(a):a);continue}var o=a.changes,l=[];n.push({changes:l});for(var u=0;u<o.length;++u){var d=o[u],E=void 0;if(l.push({from:d.from,to:d.to,text:d.text}),t)for(var _ in d)(E=_.match(/^spans_(\d+)$/))&&(R(t,Number(E[1]))>-1&&(m(l)[_]=d[_],delete d[_]))}}return n}function ka(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ut(t,i)<0;a!=ut(r,i)<0?(i=t,t=r):a!=ut(t,r)<0&&(t=r)}return new vt(i,t)}else return new vt(r||t,t)}function Wi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),$t(e,new un([ka(e.sel.primary(),t,r,i)],0),n)}function No(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]=ka(e.sel.ranges[a],t[a],null,i);var o=bn(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,bn(e.cm,i,e.sel.primIndex),n)}function Po(e,t,r,n){$t(e,Wn(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 vt(lt(e,i[a].anchor),lt(e,i[a].head))},origin:r&&r.origin};return Ee(e,"beforeSelectionChange",e,n),e.cm&&Ee(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bn(e.cm,n.ranges,n.ranges.length-1):t}function jo(e,t,r){var n=e.history.done,i=m(n);i&&i.ranges?(n[n.length-1]=t,Hi(e,t,r)):$t(e,t,r)}function $t(e,t,r){Hi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Hi(e,t,r){(T(e,"beforeSelectionChange")||e.cm&&T(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Io(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&kr(e.cm)}function Io(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,C(e.cm)),Bt(e,"cursorActivity",e)}function Uo(e){Io(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],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=zi(e,o.anchor,l&&l.anchor,r,n),d=zi(e,o.head,l&&l.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new vt(u,d))}return i?bn(e.cm,i,t.primIndex):t}function _r(e,t,r,n,i){var a=et(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var l=a.markedSpans[o],u=l.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,E="selectRight"in u?!u.selectRight:u.inclusiveRight;if((l.from==null||(d?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(E?l.to>=t.ch:l.to>t.ch))){if(i&&(Ee(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var _=u.find(n<0?1:-1),Y=void 0;if((n<0?E:d)&&(_=Wo(e,_,-n,_&&_.line==t.line?a:null)),_&&_.line==t.line&&(Y=ut(_,r))&&(n<0?Y<0:Y>0))return _r(e,_,t,n,i)}var X=u.find(n<0?-1:1);return(n<0?d:E)&&(X=Wo(e,X,n,X.line==t.line?a:null)),X?_r(e,X,t,n,i):null}}return t}function zi(e,t,r,n,i){var a=n||1,o=_r(e,t,r,a,i)||!i&&_r(e,t,r,a,!0)||_r(e,t,r,-a,i)||!i&&_r(e,t,r,-a,!0);return o||(e.cantEdit=!0,Re(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?lt(e,Re(t.line-1)):null:r>0&&t.ch==(n||et(e,t.line)).text.length?t.line<e.first+e.size-1?Re(t.line+1,0):null:new Re(t.line,t.ch+r)}function Ho(e){e.setSelection(Re(e.firstLine(),0),Re(e.lastLine()),ee)}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,l){i&&(n.from=lt(e,i)),a&&(n.to=lt(e,a)),o&&(n.text=o),l!==void 0&&(n.origin=l)}),Ee(e,"beforeChange",e,n),e.cm&&Ee(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 Or(e,t,r){if(e.cm){if(!e.cm.curOp)return Ft(e.cm,Or)(e,t,r);if(e.cm.state.suppressEdits)return}if((T(e,"beforeChange")||e.cm&&T(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)Bo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Bo(e,t)}function Bo(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=xa(e,t);Mo(e,t,r,e.cm?e.cm.curOp.id:NaN),ai(e,t,r,Nn(e,t));var n=[];zn(e,function(i,a){!a&&R(n,i.history)==-1&&($o(i.history,t),n.push(i.history)),ai(i,t,null,Nn(i,t))})}function Bi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,l=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d<l.length&&!(a=l[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==l.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=l.pop(),a.ranges){if(Fi(a,u),r&&!a.equals(e.sel)){$t(e,a,{clearRedo:!1});return}o=a}else if(n){l.push(a);return}else break;var E=[];Fi(o,u),u.push({changes:E,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var _=T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"),Y=function(Le){var Ie=a.changes[Le];if(Ie.origin=t,_&&!zo(e,Ie,!1))return l.length=0,{};E.push(Ca(e,Ie));var Fe=Le?xa(e,Ie):m(l);ai(e,Ie,Fe,Ro(e,Ie)),!Le&&e.cm&&e.cm.scrollIntoView({from:Ie.from,to:Hn(Ie)});var Be=[];zn(e,function(We,Ve){!Ve&&R(Be,We.history)==-1&&($o(We.history,Ie),Be.push(We.history)),ai(We,Ie,null,Ro(We,Ie))})},X=a.changes.length-1;X>=0;--X){var ve=Y(X);if(ve)return ve.v}}function Xo(e,t){if(t==0)return;if(e.first+=t,e.sel=new un(O(e.sel.ranges,function(i){return new vt(Re(i.anchor.line+t,i.anchor.ch),Re(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){Jt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Un(e.cm,n,"gutter")}}function ai(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ft(e.cm,ai)(e,t,r,n);if(t.to.line<e.first){Xo(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);Xo(e,i),t={from:Re(e.first,0),to:Re(t.to.line+i,t.to.ch),text:[m(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Re(a,et(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Sn(e,t.from,t.to),r||(r=xa(e,t)),e.cm?xl(e.cm,t,n):Ea(e,t,n),Hi(e,r,ee),e.cantEdit&&zi(e,Re(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=gt(tt(et(n,a.line))),n.iter(u,o.line+1,function(X){if(X==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&C(e),Ea(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(X){var ve=Gt(X);ve>i.maxLineLength&&(i.maxLine=X,i.maxLineLength=ve,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Hr(n,a.line),ni(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?Jt(e):a.line==o.line&&t.text.length==1&&!_o(e.doc,t)?Un(e,a.line,"text"):Jt(e,a.line,o.line+1,d);var E=T(e,"changes"),_=T(e,"change");if(_||E){var Y={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};_&&Bt(e,"change",e,Y),E&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Y)}e.display.selForContextMenu=null}function Lr(e,t,r,n,i){var a;n||(n=r),ut(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Or(e,{from:r,to:n,text:t,origin:i})}function Go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Ko(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var l=0;l<a.ranges.length;l++)Go(a.ranges[l].anchor,t,r,n),Go(a.ranges[l].head,t,r,n);continue}for(var u=0;u<a.changes.length;++u){var d=a.changes[u];if(r<d.from.line)d.from=Re(d.from.line+n,d.from.ch),d.to=Re(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function $o(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Ko(e.done,r,n,i),Ko(e.undone,r,n,i)}function oi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=et(e,qn(e,t)):i=gt(t),i==null?null:(n(a,i)&&e.cm&&Un(e.cm,i,r),a)}function si(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}si.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,Kt(i),Bt(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 li(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}li.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 si))){var l=[];this.collapse(l),this.children=[new si(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,l=o;l<i.lines.length;){var u=new si(i.lines.slice(l,l+=25));i.height-=u.height,this.children.splice(++n,0,u),u.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new li(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=R(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new li(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 ui=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ui.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=gt(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=Yr(this);fn(r,Math.max(0,r.height-a)),e&&(rn(e,function(){Vo(e,r,-a),Un(e,n,"widget")}),Bt(e,"lineWidgetCleared",e,this,n))},ui.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Yr(this)-t;if(!i)return;Tt(this.doc,n)||fn(n,n.height+i),r&&rn(r,function(){r.curOp.forceUpdate=!0,Vo(r,n,i),Bt(r,"lineWidgetChanged",r,e,gt(n))})},M(ui);function Vo(e,t,r){Lt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pa(e,r)}function wl(e,t,r,n){var i=new ui(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),oi(e,t,"widget",function(o){var l=o.widgets||(o.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!Tt(e,o)){var u=Lt(o)<e.scrollTop;fn(o,o.height+Yr(i)),u&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Bt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:gt(t)),i}var Yo=0,Bn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};Bn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&sr(e),T(this,"clear")){var r=this.find();r&&Bt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],l=Rn(o.markedSpans,this);e&&!this.collapsed?Un(e,gt(o),"text"):e&&(l.to!=null&&(i=gt(o)),l.from!=null&&(n=gt(o))),o.markedSpans=Ia(o.markedSpans,l),l.from==null&&this.collapsed&&!Tt(this.doc,o)&&e&&fn(o,wr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=tt(this.lines[u]),E=Gt(d);E>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=E,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Jt(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&&Bt(e,"markerCleared",e,this,n,i),t&&lr(e),this.parent&&this.parent.clear()},Bn.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=Rn(a.markedSpans,this);if(o.from!=null&&(r=Re(t?a:gt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Re(t?a:gt(a),o.to),e==1))return n}return r&&{from:r,to:n}},Bn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;rn(n,function(){var i=t.line,a=gt(t.line),o=na(n,a);if(o&&(Za(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Tt(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var u=Yr(r)-l;u&&fn(i,i.height+u)}Bt(n,"markerChanged",n,e)})},Bn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||R(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Bn.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},M(Bn);function Ar(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ft(e.cm,Ar)(e,t,r,n,i);var a=new Bn(e,i),o=ut(t,r);if(n&&s(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=q("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Zi(e,t.line,t,r,a)||t.line!=r.line&&Zi(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");ki()}a.addToHistory&&Mo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,u=e.cm,d;if(e.iter(l,r.line+1,function(_){u&&a.collapsed&&!u.options.lineWrapping&&tt(_)==u.display.maxLine&&(d=!0),a.collapsed&&l!=t.line&&fn(_,0),zr(_,new gr(a,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),a.collapsed&&e.iter(t.line,r.line+1,function(_){Tt(e,_)&&fn(_,0)}),a.clearOnEnter&&be(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Ci(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Yo,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)Jt(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var E=t.line;E<=r.line;E++)Un(u,E,"text");a.atomic&&Uo(u.doc),Bt(u,"markerAdded",u,a)}return a}var ci=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};ci.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Bt(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},M(ci);function El(e,t,r,n,i){n=s(n),n.shared=!1;var a=[Ar(e,t,r,n,i)],o=a[0],l=n.widgetNode;return zn(e,function(u){l&&(n.widgetNode=l.cloneNode(!0)),a.push(Ar(u,lt(u,t),lt(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=m(a)}),new ci(a,o)}function qo(e){return e.findMarks(Re(e.first,0),e.clipPos(Re(e.lastLine())),function(t){return t.parent})}function Cl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(ut(a,o)){var l=Ar(e,a,o,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function kl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];zn(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var l=i.markers[o];R(a,l.doc)==-1&&(l.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,Zt=function(e,t,r,n,i){if(!(this instanceof Zt))return new Zt(e,t,r,n,i);r==null&&(r=0),li.call(this,[new si([new _t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Re(r,0);this.sel=Wn(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,Wn(a),ee)};Zt.prototype=de(li.prototype,{constructor:Zt,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=fr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Wt(function(e){var t=Re(this.first,0),r=this.first+this.size-1;Or(this,{from:t,to:Re(r,et(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zr(this.cm,0,0),$t(this,Wn(t),ee)}),replaceRange:function(e,t,r,n){t=lt(this,t),r=r?lt(this,r):t,Lr(this,e,t,r,n)},getRange:function(e,t,r){var n=Sn(this,lt(this,e),lt(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(Dn(this,e))return et(this,e)},getLineNumber:function(e){return gt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=et(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 lt(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){Po(this,lt(this,typeof e=="number"?Re(e,t||0):e),null,r)}),setSelection:Wt(function(e,t,r){Po(this,lt(this,e),lt(this,t||e),r)}),extendSelection:Wt(function(e,t,r){Wi(this,lt(this,e),t&<(this,t),r)}),extendSelections:Wt(function(e,t){No(this,Ur(this,e),t)}),extendSelectionsBy:Wt(function(e,t){var r=O(this.sel.ranges,e);No(this,Ur(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 vt(lt(this,e[i].anchor),lt(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),$t(this,bn(this.cm,n,t),r)}),addSelection:Wt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vt(lt(this,e),lt(this,t||e))),$t(this,bn(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=Sn(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=Sn(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 l=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)Or(this,n[u]);l?jo(this,l):this.cm&&kr(this.cm)}),undo:Wt(function(){Bi(this,"undo")}),redo:Wt(function(){Bi(this,"redo")}),undoSelection:Wt(function(){Bi(this,"undo",!0)}),redoSelection:Wt(function(){Bi(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),zn(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 oi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Ne(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Wt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&oi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ne(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Dn(this,e))return null;if(t=e,e=et(this,e),!e)return null}else if(t=gt(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 oi(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(he(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Wt(function(e,t,r){return oi(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(he(r));if(!o)return!1;var l=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||l==a.length?"":" ")+a.slice(l)||null}else return!1;return!0})}),addLineWidget:Wt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ar(this,lt(this,e),lt(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=lt(this,e),Ar(this,e,e,r,"bookmark")},findMarksAt:function(e){e=lt(this,e);var t=[],r=et(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=lt(this,e),t=lt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l<o.length;l++){var u=o[l];!(u.to!=null&&i==e.line&&e.ch>=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!r||r(u.marker))&&n.push(u.marker.parent||u.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+n;if(a>e)return t=e,!0;e-=a,++r}),lt(this,Re(r,t))},indexFromPos:function(e){e=lt(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 Zt(fr(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 Zt(fr(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Cl(n,qo(this)),n},unlinkDoc:function(e){if(e instanceof At&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),kl(qo(this));break}if(e.history==this.history){var n=[e.id];zn(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){zn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):pt(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)})}),Zt.prototype.eachLine=Zt.prototype.iter;var Jo=0;function Tl(e){var t=this;if(Zo(t),Pe(t,e)||Ln(t.display,e))return;f(e),N&&(Jo=+new Date);var r=rr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,l=function(){++o==i&&Ft(t,function(){r=lt(t.doc,r);var X={from:r,to:r,text:t.doc.splitLines(a.filter(function(ve){return ve!=null}).join(t.doc.lineSeparator())),origin:"paste"};Or(t.doc,X),jo(t.doc,Wn(lt(t.doc,r),lt(t.doc,Hn(X))))})()},u=function(X,ve){if(t.options.allowDropFileTypes&&R(t.options.allowDropFileTypes,X.type)==-1){l();return}var Le=new FileReader;Le.onerror=function(){return l()},Le.onload=function(){var Ie=Le.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ie)){l();return}a[ve]=Ie,l()},Le.readAsText(X)},d=0;d<n.length;d++)u(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var E=e.dataTransfer.getData("Text");if(E){var _;if(t.state.draggingText&&!t.state.draggingText.copy&&(_=t.listSelections()),Hi(t.doc,Wn(r,r)),_)for(var Y=0;Y<_.length;++Y)Lr(t.doc,"",_[Y].anchor,_[Y].head,"drag");t.replaceSelection(E,"around","paste"),t.display.input.focus()}}catch(X){}}}function _l(e,t){if(N&&(!e.state.draggingText||+new Date-Jo<100)){y(t);return}if(Pe(e,t)||Ln(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!we){var r=b("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",$&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),$&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=rr(e,t);if(!r)return;var n=document.createDocumentFragment();uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=b("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ae(e.display.dragCursor,n)}function Zo(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;Al(),es=!0}function Al(){var e;be(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Qo(Ml)},100))}),be(window,"blur",function(){return Qo(Cr)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Xn={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"},di=0;di<10;di++)Xn[di+48]=Xn[di+96]=String(di);for(var Xi=65;Xi<=90;Xi++)Xn[Xi]=String.fromCharCode(Xi);for(var fi=1;fi<=12;fi++)Xn[fi+111]=Xn[fi+63235]="F"+fi;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=te?An.macDefault:An.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function 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=O(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,l=void 0;a==i.length-1?(l=i.join(" "),o=n):(l=i.slice(0,a+1).join(" "),o="...");var u=t[l];if(!u)t[l]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Mr(e,t,r,n){t=Gi(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 Mr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Mr(e,t.fallthrough[a],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:Xn[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),(_e?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(_e?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if($&&e.keyCode==34&&e.char)return!1;var r=Xn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Gi(e){return typeof e=="string"?An[e]:e}function Dr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ut(a.from,m(n).to)<=0;){var o=n.pop();if(ut(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}rn(e,function(){for(var l=n.length-1;l>=0;l--)Lr(e.doc,"",n[l].from,n[l].to,"+delete");kr(e)})}function Ta(e,t,r){var n=Se(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _a(e,t,r){var n=Ta(e,t.ch,r);return n==null?null:new Re(t.line,n,r<0?"after":"before")}function Oa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Qe(r,t.doc.direction);if(a){var o=i<0?m(a):a[0],l=i<0==(o.level==1),u=l?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var E=xr(t,r);d=i<0?r.text.length-1:0;var _=En(t,E,d).top;d=Je(function(Y){return En(t,E,Y).top==_},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Ta(r,d,1))}else d=i<0?o.to:o.from;return new Re(n,d,u)}}return new Re(n,i<0?r.text.length:0,i<0?"before":"after")}function Nl(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return _a(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 _a(t,r,n);var l=function(Fe,Be){return Ta(t,Fe instanceof Re?Fe.ch:Fe,Be)},u,d=function(Fe){return e.options.lineWrapping?(u=u||xr(e,t),ao(e,t,u,Fe)):{begin:0,end:t.text.length}},E=d(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var _=o.level==1==n<0,Y=l(r,_?1:-1);if(Y!=null&&(_?Y<=o.to&&Y<=E.end:Y>=o.from&&Y>=E.begin)){var X=_?"before":"after";return new Re(r.line,Y,X)}}var ve=function(Fe,Be,We){for(var Ve=function(Ct,Ht){return Ht?new Re(r.line,l(Ct,1),"before"):new Re(r.line,Ct,"after")};Fe>=0&&Fe<i.length;Fe+=Be){var ot=i[Fe],nt=Be>0==(ot.level!=1),ht=nt?We.begin:l(We.end,-1);if(ot.from<=ht&&ht<ot.to)return Ve(ht,nt);if(ht=nt?ot.from:l(ot.to,-1),We.begin<=ht&&ht<We.end)return Ve(ht,nt)}},Le=ve(a+n,n,E);if(Le)return Le;var Ie=n>0?E.end:l(E.begin,-1);return Ie!=null&&!(n>0&&Ie==t.text.length)&&(Le=ve(n>0?0:i.length-1,n,d(Ie)),Le)?Le:null}var hi={selectAll:Ho,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ee)},killLine:function(e){return Dr(e,function(t){if(t.empty()){var r=et(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Re(t.head.line+1,0)}:{from:t.head,to:Re(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Dr(e,function(t){return{from:Re(t.from().line,0),to:lt(e.doc,Re(t.to().line+1,0))}})},delLineLeft:function(e){return Dr(e,function(t){return{from:Re(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Dr(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 Dr(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(Re(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Re(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 Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},le)},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")},le)},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},le)},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=p(e.getLine(a.line),a.ch,n);t.push(J(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return rn(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=et(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Re(i.line,i.ch-1)),i.ch>0)i=new Re(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Re(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=et(e.doc,i.line-1).text;o&&(i=new Re(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Re(i.line-1,o.length-1),i,"+transpose"))}}r.push(new vt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return rn(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);kr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=et(e.doc,t),n=tt(r);return n!=r&&(t=gt(n)),Oa(!0,e,n,t,1)}function Pl(e,t){var r=et(e.doc,t),n=dt(r);return n!=r&&(t=gt(n)),Oa(!0,e,r,t,-1)}function as(e,t){var r=is(e,t.line),n=et(e.doc,r.line),i=Qe(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 Re(r.line,o?0:a,r.sticky)}return r}function Ki(e,t,r){if(typeof t=="string"&&(t=hi[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)!=ye}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function jl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Mr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Mr(t,e.options.extraKeys,r,e)||Mr(t,e.options.keyMap,r,e)}var Il=new w;function pi(e,t,r,n){var i=e.state.keySeq;if(i){if(ts(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),os(e,i+" "+t,r,n))return!0}return os(e,t,r,n)}function os(e,t,r,n){var i=jl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Bt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),da(e)),!!i}function ss(e,t){var r=rs(t,!0);return r?t.shiftKey&&!e.state.keySeq?pi(e,"Shift-"+r,t,function(n){return Ki(e,n,!0)})||pi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ki(e,n)}):pi(e,r,t,function(n){return Ki(e,n)}):!1}function Ul(e,t,r){return pi(e,"'"+r+"'",t,function(n){return Ki(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=Z(),Pe(t,e))return;N&&D<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);$&&(La=n?r:null,!n&&r==88&&!Dt&&(te?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),oe&&!te&&!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;P(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(pe(t,"CodeMirror-crosshair"),qe(document,"keyup",r),qe(document,"mouseover",r))}be(document,"keyup",r),be(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),Pe(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ln(t.display,e)||Pe(t,e)||e.ctrlKey&&!e.altKey||te&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if($&&r==La){La=null,f(e);return}if($&&(!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 Wl=400,Aa=function(e,t,r){this.time=e,this.pos=t,this.button=r};Aa.prototype.compare=function(e,t,r){return this.time+Wl>e&&ut(t,this.pos)==0&&r==this.button};var mi,gi;function Hl(e,t){var r=+new Date;return gi&&gi.compare(r,e,t)?(mi=gi=null,"triple"):mi&&mi.compare(r,e,t)?(gi=new Aa(r,e,t),mi=null,"double"):(mi=new Aa(r,e,t),gi=null,"single")}function ds(e){var t=this,r=t.display;if(Pe(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Ln(r,e)){L||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ma(t,e))return;var n=rr(t,e),i=ue(e),a=n?Hl(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?Xl(t,n,a,e):G(e)==r.scroller&&f(e):i==2?(n&&Wi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(je?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,pi(e,ns(a,i),i,function(o){if(typeof o=="string"&&(o=hi[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,r)!=ye}finally{e.state.suppressEdits=!1}return l})}function Bl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Ae?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=te?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(te?r.altKey:r.ctrlKey)),i}function Xl(e,t,r,n){N?setTimeout(c(co,e),0):e.curOp.focus=Z();var i=Bl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Me&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ut((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Kl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Ft(e,function(d){L&&(i.scroller.draggable=!1),e.state.draggingText=!1,qe(i.wrapper.ownerDocument,"mouseup",o),qe(i.wrapper.ownerDocument,"mousemove",l),qe(i.scroller,"dragstart",u),qe(i.scroller,"drop",o),a||(f(d),n.addNew||Wi(e.doc,r,null,null,n.extend),L&&!we||N&&D==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};L&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),be(i.wrapper.ownerDocument,"mouseup",o),be(i.wrapper.ownerDocument,"mousemove",l),be(i.scroller,"dragstart",u),be(i.scroller,"drop",o),fo(e),setTimeout(function(){return i.input.focus()},20)}function fs(e,t,r){if(r=="char")return new vt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new vt(Re(t.line,0),lt(e.doc,Re(t.line+1,0)));var n=r(e,t);return new vt(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,l,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(r),l>-1?o=d[l]:o=new vt(r,r)):(o=a.sel.primary(),l=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new vt(r,r)),r=rr(e,t,!0,!0),l=-1;else{var E=fs(e,r,n.unit);n.extend?o=ka(o,E.anchor,E.head,n.extend):o=E}n.addNew?l==-1?(l=d.length,$t(a,bn(e,d.concat([o]),l),{scroll:!1,origin:"*mouse"})):d.length>1&&d[l].empty()&&n.unit=="char"&&!n.extend?($t(a,bn(e,d.slice(0,l).concat(d.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Sa(a,l,o,ge):(l=0,$t(a,new un([o],0),ge),u=a.sel);var _=r;function Y(We){if(ut(_,We)==0)return;if(_=We,n.unit=="rectangle"){for(var Ve=[],ot=e.options.tabSize,nt=p(et(a,r.line).text,r.ch,ot),ht=p(et(a,We.line).text,We.ch,ot),Ct=Math.min(nt,ht),Ht=Math.max(nt,ht),Mt=Math.min(r.line,We.line),an=Math.min(e.lastLine(),Math.max(r.line,We.line));Mt<=an;Mt++){var Qt=et(a,Mt).text,jt=re(Qt,Ct,ot);Ct==Ht?Ve.push(new vt(Re(Mt,jt),Re(Mt,jt))):Qt.length>jt&&Ve.push(new vt(Re(Mt,jt),Re(Mt,re(Qt,Ht,ot))))}Ve.length||Ve.push(new vt(r,r)),$t(a,bn(e,u.ranges.slice(0,l).concat(Ve),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(We)}else{var en=o,Xt=fs(e,We,n.unit),Ut=en.anchor,It;ut(Xt.anchor,Ut)>0?(It=Xt.head,Ut=Yn(en.from(),Xt.anchor)):(It=Xt.anchor,Ut=hr(en.to(),Xt.head));var Rt=u.ranges.slice(0);Rt[l]=$l(e,new vt(lt(a,Ut),It)),$t(a,bn(e,Rt,l),ge)}}var X=i.wrapper.getBoundingClientRect(),ve=0;function Le(We){var Ve=++ve,ot=rr(e,We,!0,n.unit=="rectangle");if(!ot)return;if(ut(ot,_)!=0){e.curOp.focus=Z(),Y(ot);var nt=Ni(i,a);(ot.line>=nt.to||ot.line<nt.from)&&setTimeout(Ft(e,function(){ve==Ve&&Le(We)}),150)}else{var ht=We.clientY<X.top?-20:We.clientY>X.bottom?20:0;ht&&setTimeout(Ft(e,function(){if(ve!=Ve)return;i.scroller.scrollTop+=ht,Le(We)}),50)}}function Ie(We){e.state.selectingText=!1,ve=Infinity,We&&(f(We),i.input.focus()),qe(i.wrapper.ownerDocument,"mousemove",Fe),qe(i.wrapper.ownerDocument,"mouseup",Be),a.history.lastSelOrigin=null}var Fe=Ft(e,function(We){We.buttons===0||!ue(We)?Ie(We):Le(We)}),Be=Ft(e,Ie);e.state.selectingText=Be,be(i.wrapper.ownerDocument,"mousemove",Fe),be(i.wrapper.ownerDocument,"mouseup",Be)}function $l(e,t){var r=t.anchor,n=t.head,i=et(e.doc,r.line);if(ut(r,n)==0&&r.sticky==n.sticky)return t;var a=Qe(i);if(!a)return t;var o=Ke(a,r.ch,r.sticky),l=a[o];if(l.from!=r.ch&&l.to!=r.ch)return t;var u=o+(l.from==r.ch==(l.level!=1)?0:1);if(u==0||u==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var E=Ke(a,n.ch,n.sticky),_=E-o||(n.ch-r.ch)*(l.level==1?-1:1);E==u-1||E==u?d=_<0:d=_>0}var Y=a[u+(d?-1:0)],X=d==(Y.level==1),ve=X?Y.from:Y.to,Le=X?"after":"before";return r.ch==ve&&r.sticky==Le?t:new vt(new Re(r.line,ve,Le),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(Y){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!T(e,r))return g(t);a-=l.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var d=o.gutters.childNodes[u];if(d&&d.getBoundingClientRect().right>=i){var E=Tn(e.doc,a),_=e.display.gutterSpecs[u];return Ee(e,r,e,E,_.className,t),g(t)}}}function Ma(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(Ln(e.display,t)||Vl(e,t))return;if(Pe(e,t,"contextmenu"))return;je||e.display.input.onContextMenu(t)}function Vl(e,t){return T(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-"),qr(e)}var Rr={toString:function(){return"CodeMirror.Init"}},gs={},$i={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(l,u,d){d!=Rr&&a(l,u,d)}:a)}e.defineOption=r,e.Init=Rr,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){ii(n),qr(n),Jt(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(u){for(var d=0;;){var E=u.text.indexOf(i,d);if(E==-1)break;d=E+i.length,a.push(Re(o,E))}o++});for(var l=a.length-1;l>=0;l--)Lr(n.doc,i,a[l],Re(a[l].line,a[l].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Rr&&n.refresh()}),r("specialCharPlaceholder",ks,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",se?"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",!He),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),ri(n)},!0),r("keyMap","default",function(n,i,a){var o=Gi(i),l=a!=Rr&&Gi(a);l&&l.detach&&l.detach(n,o),o.attach&&o.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Jl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ya(i,n.options.lineNumbers),ri(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 Sr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),Sr(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),ri(n)},!0),r("firstLineNumber",1,ri,!0),r("lineNumberFormatter",function(n){return n},ri,!0),r("showCursorWhenSelecting",!1,Jr,!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,ql),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Jr,!0),r("singleCursorHeightPerLine",!0,Jr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ii,!0),r("addModeClass",!1,ii,!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,ii,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function ql(e,t,r){var n=r&&r!=Rr;if(!t!=!n){var i=e.display.dragFunctions,a=t?be:qe;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Jl(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(pe(e.display.wrapper,"CodeMirror-wrap"),gn(e)),ca(e),Jt(e),qr(e),setTimeout(function(){return Sr(e)},100)}function At(e,t){var r=this;if(!(this instanceof At))return new At(e,t);this.options=t=t?s(t):{},s(gs,t,!1);var n=t.value;typeof n=="string"?n=new Zt(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new At.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 w,keySeq:null,specialChars:null},t.autofocus&&!se&&a.input.focus(),N&&D<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Ll(),sr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!se||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&fa(r)},20):Cr(this);for(var o in $i)$i.hasOwnProperty(o)&&$i[o](this,t[o],Rr);wo(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Da.length;++l)Da[l](this);lr(this),L&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}At.defaults=gs,At.optionHandlers=$i;function Zl(e){var t=e.display;be(t.scroller,"mousedown",Ft(e,ds)),N&&D<11?be(t.scroller,"dblclick",Ft(e,function(u){if(Pe(e,u))return;var d=rr(e,u);if(!d||Ma(e,u)||Ln(e.display,u))return;f(u);var E=e.findWordAt(d);Wi(e.doc,E.anchor,E.head)})):be(t.scroller,"dblclick",function(u){return Pe(e,u)||f(u)}),be(t.scroller,"contextmenu",function(u){return ps(e,u)}),be(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||ps(e,u)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(u){if(u.touches.length!=1)return!1;var d=u.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(u,d){if(d.left==null)return!0;var E=d.left-u.left,_=d.top-u.top;return E*E+_*_>20*20}be(t.scroller,"touchstart",function(u){if(!Pe(e,u)&&!a(u)&&!Ma(e,u)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),be(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),be(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Ln(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var E=e.coordsChar(t.activeTouch,"page"),_;!d.prev||o(d,d.prev)?_=new vt(E,E):!d.prev.prev||o(d,d.prev.prev)?_=e.findWordAt(E):_=new vt(Re(E.line,0),lt(e.doc,Re(E.line+1,0))),e.setSelection(_.anchor,_.head),e.focus(),f(u)}i()}),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qr(e,t.scroller.scrollTop),ar(e,t.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),be(t.scroller,"mousewheel",function(u){return ko(e,u)}),be(t.scroller,"DOMMouseScroll",function(u){return ko(e,u)}),be(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Pe(e,u)||y(u)},over:function(u){Pe(e,u)||(Ol(e,u),y(u))},start:function(u){return _l(e,u)},drop:Ft(e,Tl),leave:function(u){Pe(e,u)||Zo(e)}};var l=t.input.getField();be(l,"keyup",function(u){return us.call(e,u)}),be(l,"keydown",Ft(e,ls)),be(l,"keypress",Ft(e,cs)),be(l,"focus",function(u){return fa(e,u)}),be(l,"blur",function(u){return Cr(e,u)})}var Da=[];At.defineInitHook=function(e){return Da.push(e)};function vi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=nn(e,t).state:r="prev");var o=e.options.tabSize,l=et(i,t),u=p(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var d=l.text.match(/^\s*/)[0],E;if(!n&&!/\S/.test(l.text))E=0,r="not";else if(r=="smart"&&(E=i.mode.indent(a,l.text.slice(d.length),l.text),E==ye||E>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?E=p(et(i,t-1).text,null,o):E=0:r=="add"?E=u+e.options.indentUnit:r=="subtract"?E=u-e.options.indentUnit:typeof r=="number"&&(E=u+r),E=Math.max(0,E);var _="",Y=0;if(e.options.indentWithTabs)for(var X=Math.floor(E/o);X;--X)Y+=o,_+=" ";if(Y<E&&(_+=J(E-Y)),_!=d)return Lr(i,_,Re(t,0),Re(t,d.length),"+input"),l.stateAfter=null,!0;for(var ve=0;ve<i.sel.ranges.length;ve++){var Le=i.sel.ranges[ve];if(Le.head.line==t&&Le.head.ch<d.length){var Ie=Re(t,d.length);Sa(i,ve,new vt(Ie,Ie));break}}}var yn=null;function Vi(e){yn=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,l=i=="paste"||e.state.pasteIncoming>o,u=pt(t),d=null;if(l&&n.ranges.length>1)if(yn&&yn.text.join(`
|
|
`)==t){if(n.ranges.length%yn.text.length==0){d=[];for(var E=0;E<yn.text.length;E++)d.push(a.splitLines(yn.text[E]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=O(u,function(Fe){return[Fe]}));for(var _=e.curOp.updateInput,Y=n.ranges.length-1;Y>=0;Y--){var X=n.ranges[Y],ve=X.from(),Le=X.to();X.empty()&&(r&&r>0?ve=Re(ve.line,ve.ch-r):e.state.overwrite&&!l?Le=Re(Le.line,Math.min(et(a,Le.line).text.length,Le.ch+m(u).length)):l&&yn&&yn.lineWise&&yn.text.join(`
|
|
`)==u.join(`
|
|
`)&&(ve=Le=Re(ve.line,0)));var Ie={from:ve,to:Le,text:d?d[Y%d.length]:u,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};Or(e.doc,Ie),Bt(e,"inputRead",e,Ie)}t&&!l&&bs(e,t),kr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=_),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&&rn(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 l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){o=vi(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=vi(e,i.head.line,"smart")));o&&Bt(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:Re(i,0),head:Re(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=b("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=b("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return L?e.style.width="1000px":e.setAttribute("wrap","off"),j&&(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)&&Ft(this,t[n])(this,i,o),Ee(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"](Gi(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:Yt(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,Jt(this)}),removeOverlay:Yt(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++,Jt(this);return}}}),indentLine:Yt(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Dn(this.doc,n)&&vi(this,n,i,a)}),indentSelection:Yt(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var l=i[o];if(l.empty())l.head.line>a&&(vi(this,l.head.line,n,!0),a=l.head.line,o==this.doc.sel.primIndex&&kr(this));else{var u=l.from(),d=l.to(),E=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var _=E;_<a;++_)vi(this,_,n);var Y=this.doc.sel.ranges;u.ch==0&&i.length==Y.length&&Y[o].from().ch>0&&Sa(this.doc,o,new vt(u,Y[o].to()),ee)}}}),getTokenAt:function(n,i){return On(this,n,i)},getLineTokens:function(n,i){return On(this,Re(n),i,!0)},getTokenTypeAt:function(n){n=lt(this.doc,n);var i=Fr(this,et(this.doc,n.line)),a=0,o=(i.length-1)/2,l=n.ch,u;if(l==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=l)o=d;else if(i[d*2+1]<l)a=d+1;else{u=i[d*2+2];break}}var E=u?u.indexOf("overlay "):-1;return E<0?u:E==0?null:u.slice(0,E-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")o[l[i]]&&a.push(o[l[i]]);else if(l[i])for(var u=0;u<l[i].length;u++){var d=o[l[i][u]];d&&a.push(d)}else l.helperType&&o[l.helperType]?a.push(o[l.helperType]):o[l.name]&&a.push(o[l.name]);for(var E=0;E<o._global.length;E++){var _=o._global[E];_.pred(l,this)&&R(a,_.val)==-1&&a.push(_.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=qn(a,n==null?a.first+a.size-1:n),nn(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=lt(this.doc,n):a=n?o.from():o.to(),vn(this,a,i||"page")},charCoords:function(n,i){return ia(this,lt(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,Tn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,l;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),l=et(this.doc,n)}else l=n;return Ai(this,l,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Lt(l):0)},defaultTextHeight:function(){return wr(this.display)},defaultCharWidth:function(){return Er(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,l){var u=this.display;n=vn(this,lt(this.doc,n));var d=n.bottom,E=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var _=Math.max(u.wrapper.clientHeight,this.doc.height),Y=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>_)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=_&&(d=n.bottom),E+i.offsetWidth>Y&&(E=Y-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",l=="right"?(E=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?E=0:l=="middle"&&(E=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=E+"px"),a&&qs(this,{left:E,top:d,right:E+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:Yt(ls),triggerOnKeyPress:Yt(cs),triggerOnKeyUp:us,triggerOnMouseDown:Yt(ds),execCommand:function(n){if(hi.hasOwnProperty(n))return hi[n].call(null,this)},triggerElectric:Yt(function(n){bs(this,n)}),findPosH:function(n,i,a,o){var l=1;i<0&&(l=-1,i=-i);for(var u=lt(this.doc,n),d=0;d<i&&!(u=Na(this.doc,u,l,a,o),u.hitSide);++d);return u},moveH:Yt(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Na(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},le)}),deleteH:Yt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Dr(this,function(l){var u=Na(o,l.head,n,i,!1);return n<0?{from:u,to:l.head}:{from:l.head,to:u}})}),findPosV:function(n,i,a,o){var l=1,u=o;i<0&&(l=-1,i=-i);for(var d=lt(this.doc,n),E=0;E<i;++E){var _=vn(this,d,"div");if(u==null?u=_.left:_.left=u,d=Es(this,_,l,a),d.hitSide)break}return d},moveV:Yt(function(n,i){var a=this,o=this.doc,l=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(E){if(u)return n<0?E.from():E.to();var _=vn(a,E.head,"div");E.goalColumn!=null&&(_.left=E.goalColumn),l.push(_.left);var Y=Es(a,_,n,i);return i=="page"&&E==o.sel.primary()&&pa(a,ia(a,Y,"div").top-_.top),Y},le),l.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=l[d]}),findWordAt:function(n){var i=this.doc,a=et(i,n.line).text,o=n.ch,l=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||l==a.length)&&o?--o:++l;for(var d=a.charAt(o),E=Te(d,u)?function(_){return Te(_,u)}:/\s/.test(d)?function(_){return/\s/.test(_)}:function(_){return!/\s/.test(_)&&!Te(_)};o>0&&E(a.charAt(o-1));)--o;for(;l<a.length&&E(a.charAt(l));)++l}return new vt(Re(n.line,o),Re(n.line,l))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):pe(this.display.cursorDiv,"CodeMirror-overwrite"),Ee(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==Z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Yt(function(n,i){Zr(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-wn(this)-this.display.barHeight,width:n.scrollWidth-wn(this)-this.display.barWidth,clientHeight:ta(this),clientWidth:tr(this)}},scrollIntoView:Yt(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:Re(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Js(this,n):po(this,n.from,n.to,n.margin)}),setSize:Yt(function(n,i){var a=this,o=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&Qa(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){Un(a,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,Ee(this,"refresh",this)}),operation:function(n){return rn(this,n)},startOperation:function(){return sr(this)},endOperation:function(){return lr(this)},refresh:Yt(function(){var n=this.display.cachedTextHeight;Jt(this),this.curOp.forceUpdate=!0,qr(this),Zr(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(n==null||Math.abs(n-wr(this.display))>.5||this.options.lineWrapping)&&ca(this),Ee(this,"refresh",this)}),swapDoc:Yt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Oo(this,n),qr(this),this.display.input.reset(),Zr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Bt(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}},M(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 Na(e,t,r,n,i){var a=t,o=r,l=et(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var Be=t.line+u;return Be<e.first||Be>=e.first+e.size?!1:(t=new Re(Be,t.ch,t.sticky),l=et(e,Be))}function E(Be){var We;if(n=="codepoint"){var Ve=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ve)?We=null:We=new Re(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Ve>=55296&&Ve<56320?2:1))),-r)}else i?We=Nl(e.cm,l,t,r):We=_a(l,t,r);if(We==null)if(!Be&&d())t=Oa(i,e.cm,l,t.line,u);else return!1;else t=We;return!0}if(n=="char"||n=="codepoint")E();else if(n=="column")E(!0);else if(n=="word"||n=="group")for(var _=null,Y=n=="group",X=e.cm&&e.cm.getHelper(t,"wordChars"),ve=!0;!(r<0&&!E(!ve));ve=!1){var Le=l.text.charAt(t.ch)||`
|
|
`,Ie=Te(Le,X)?"w":Y&&Le==`
|
|
`?"n":!Y||/\s/.test(Le)?null:"p";if(Y&&!ve&&!Ie&&(Ie="s"),_&&_!=Ie){r<0&&(r=1,E(),t.sticky="after");break}if(Ie&&(_=Ie),r>0&&!E(!ve))break}var Fe=zi(e,t,a,o,!0);return Ue(a,Fe)&&(Fe.hitSide=!0),Fe}function Es(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*wr(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=oa(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var xt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new w,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};xt.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(l){for(var u=l.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}be(i,"paste",function(l){if(!a(l)||Pe(n,l)||vs(l,n))return;D<=11&&setTimeout(Ft(n,function(){return t.updateFromDOM()}),20)}),be(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),be(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),be(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),be(i,"touchstart",function(){return r.forceCompositionEnd()}),be(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(l){if(!a(l)||Pe(n,l))return;if(n.somethingSelected())Vi({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=ys(n);Vi({lineWise:!0,text:u.text}),l.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,ee),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var d=yn.text.join(`
|
|
`);if(l.clipboardData.setData("Text",d),l.clipboardData.getData("Text")==d){l.preventDefault();return}}var E=ws(),_=E.firstChild;n.display.lineSpace.insertBefore(E,n.display.lineSpace.firstChild),_.value=yn.text.join(`
|
|
`);var Y=document.activeElement;S(_),setTimeout(function(){n.display.lineSpace.removeChild(E),Y.focus(),Y==i&&r.showPrimarySelection()},50)}be(i,"copy",o),be(i,"cut",o)},xt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},xt.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},xt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},xt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xt.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&&ut(Yn(a,o),n)==0&&ut(hr(a,o),i)==0)return;var l=t.display.view,u=n.line>=t.display.viewFrom&&Cs(t,n)||{node:l[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&Cs(t,i);if(!d){var E=l[l.length-1].measure,_=E.maps?E.maps[E.maps.length-1]:E.map;d={node:_[_.length-1],offset:_[_.length-2]-_[_.length-3]}}if(!u||!d){e.removeAllRanges();return}var Y=e.rangeCount&&e.getRangeAt(0),X;try{X=F(u.node,u.offset,d.offset,d.node)}catch(ve){}X&&(!oe&&t.state.focused?(e.collapse(u.node,u.offset),X.collapsed||(e.removeAllRanges(),e.addRange(X))):(e.removeAllRanges(),e.addRange(X)),Y&&e.anchorNode==null?e.addRange(Y):oe&&this.startGracePeriod()),this.rememberSelection()},xt.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)},xt.prototype.showMultipleSelections=function(e){ae(this.cm.display.cursorDiv,e.cursors),ae(this.cm.display.selectionDiv,e.selection)},xt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},xt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},xt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},xt.prototype.blur=function(){this.div.blur()},xt.prototype.getField=function(){return this.div},xt.prototype.supportsTouch=function(){return!0},xt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():rn(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)},xt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},xt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(I&&B&&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&&rn(t,function(){$t(t.doc,Wn(r,n),ee),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},xt.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=Re(n.line-1,et(e.doc,n.line-1).length)),i.ch==et(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Re(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,l;n.line==t.viewFrom||(a=ir(e,n.line))==0?(o=gt(t.view[0].line),l=t.view[0].node):(o=gt(t.view[a].line),l=t.view[a-1].node.nextSibling);var u=ir(e,i.line),d,E;if(u==t.view.length-1?(d=t.viewTo-1,E=t.lineDiv.lastChild):(d=gt(t.view[u+1].line)-1,E=t.view[u+1].node.previousSibling),!l)return!1;for(var _=e.doc.splitLines(tu(e,l,E,o,d)),Y=Sn(e.doc,Re(o,0),Re(d,et(e.doc,d).text.length));_.length>1&&Y.length>1;)if(m(_)==m(Y))_.pop(),Y.pop(),d--;else if(_[0]==Y[0])_.shift(),Y.shift(),o++;else break;for(var X=0,ve=0,Le=_[0],Ie=Y[0],Fe=Math.min(Le.length,Ie.length);X<Fe&&Le.charCodeAt(X)==Ie.charCodeAt(X);)++X;for(var Be=m(_),We=m(Y),Ve=Math.min(Be.length-(_.length==1?X:0),We.length-(Y.length==1?X:0));ve<Ve&&Be.charCodeAt(Be.length-ve-1)==We.charCodeAt(We.length-ve-1);)++ve;if(_.length==1&&Y.length==1&&o==n.line)for(;X&&X>n.ch&&Be.charCodeAt(Be.length-ve-1)==We.charCodeAt(We.length-ve-1);)X--,ve++;_[_.length-1]=Be.slice(0,Be.length-ve).replace(/^\u200b+/,""),_[0]=_[0].slice(X).replace(/\u200b+$/,"");var ot=Re(o,X),nt=Re(d,Y.length?m(Y).length-ve:0);if(_.length>1||_[0]||ut(ot,nt))return Lr(e.doc,_,ot,nt,"+input"),!0},xt.prototype.ensurePolled=function(){this.forceCompositionEnd()},xt.prototype.reset=function(){this.forceCompositionEnd()},xt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},xt.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)},xt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&rn(this.cm,function(){return Jt(e.cm)})},xt.prototype.setUneditable=function(e){e.contentEditable="false"},xt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Ft(this.cm,Ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},xt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},xt.prototype.onContextMenu=function(){},xt.prototype.resetPosition=function(){},xt.prototype.needsContentAttribute=!0;function Cs(e,t){var r=na(e,t.line);if(!r||r.hidden)return null;var n=et(e.doc,t.line),i=Va(r,n,t.line),a=Qe(n,e.doc.direction),o="left";if(a){var l=Ke(a,t.ch);o=l%2?"right":"left"}var u=Ja(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Nr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,l=e.doc.lineSeparator(),u=!1;function d(X){return function(ve){return ve.id==X}}function E(){o&&(a+=l,u&&(a+=l),o=u=!1)}function _(X){X&&(E(),a+=X)}function Y(X){if(X.nodeType==1){var ve=X.getAttribute("cm-text");if(ve){_(ve);return}var Le=X.getAttribute("cm-marker"),Ie;if(Le){var Fe=e.findMarks(Re(n,0),Re(i+1,0),d(+Le));Fe.length&&(Ie=Fe[0].find(0))&&_(Sn(e.doc,Ie.from,Ie.to).join(l));return}if(X.getAttribute("contenteditable")=="false")return;var Be=/^(pre|div|p|li|table|br)$/i.test(X.nodeName);if(!/^br$/i.test(X.nodeName)&&X.textContent.length==0)return;Be&&E();for(var We=0;We<X.childNodes.length;We++)Y(X.childNodes[We]);/^(pre|p)$/i.test(X.nodeName)&&(u=!0),Be&&(o=!0)}else X.nodeType==3&&_(X.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Y(t),t==r);)t=t.nextSibling,u=!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(Re(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(Re(gt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?m(e.rest):e.line;return Nr(Re(gt(a),a.text.length),i)}var o=t.nodeType==3?t:null,l=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var u=e.measure,d=u.maps;function E(Ie,Fe,Be){for(var We=-1;We<(d?d.length:0);We++)for(var Ve=We<0?u.map:d[We],ot=0;ot<Ve.length;ot+=3){var nt=Ve[ot+2];if(nt==Ie||nt==Fe){var ht=gt(We<0?e.line:e.rest[We]),Ct=Ve[ot]+Be;return(Be<0||nt!=Ie)&&(Ct=Ve[ot+(Be?1:0)]),Re(ht,Ct)}}}var _=E(o,l,r);if(_)return Nr(_,i);for(var Y=l.nextSibling,X=o?o.nodeValue.length-r:0;Y;Y=Y.nextSibling){if(_=E(Y,Y.firstChild,0),_)return Nr(Re(_.line,_.ch-X),i);X+=Y.textContent.length}for(var ve=l.previousSibling,Le=r;ve;ve=ve.previousSibling){if(_=E(ve,ve.firstChild,-1),_)return Nr(Re(_.line,_.ch+Le),i);Le+=ve.textContent.length}}var Pt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new w,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),j&&(i.style.width="0px"),be(i,"input",function(){N&&D>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),be(i,"paste",function(o){if(Pe(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Pe(n,o))return;if(n.somethingSelected())Vi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=ys(n);Vi({lineWise:!0,text:l.text}),o.type=="cut"?n.setSelections(l.ranges,null,ee):(r.prevInput="",i.value=l.text.join(`
|
|
`),S(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}be(i,"cut",a),be(i,"copy",a),be(e.scroller,"paste",function(o){if(Ln(e,o)||Pe(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,i.dispatchEvent(l)}),be(e.lineSpace,"selectstart",function(o){Ln(e,o)||f(o)}),be(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"})}}),be(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=vn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Pt.prototype.showSelection=function(e){var t=this.cm,r=t.display;ae(r.cursorDiv,e.cursors),ae(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Pt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&S(this.textarea),N&&D>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",N&&D>=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"&&(!se||Z()!=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||at(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(N&&D>=9&&this.hasSelection===i||te&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,i.length);o<l&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return rn(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(){N&&D>=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=rr(r,e),o=n.scroller.scrollTop;if(!a||$)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(a)==-1&&Ft(r,$t)(r.doc,Wn(a),ee);var u=i.style.cssText,d=t.wrapper.style.cssText,E=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-E.top-5)+"px; left: "+(e.clientX-E.left-5)+`px;
|
|
z-index: 1000; background: `+(N?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _;L&&(_=window.scrollY),n.input.focus(),L&&window.scrollTo(null,_),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=X,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Y(){if(i.selectionStart!=null){var Le=r.somethingSelected(),Ie="\u200B"+(Le?i.value:"");i.value="\u21DA",i.value=Ie,t.prevInput=Le?"":"\u200B",i.selectionStart=1,i.selectionEnd=Ie.length,n.selForContextMenu=r.doc.sel}}function X(){if(t.contextMenuPending!=X)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,N&&D<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!N||N&&D<9)&&Y();var Le=0,Ie=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Ft(r,Ho)(r):Le++<10?n.detectingSelectAll=setTimeout(Ie,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ie,200)}}if(N&&D>=9&&Y(),je){y(e);var ve=function(){qe(window,"mouseup",ve),setTimeout(X,20)};be(window,"mouseup",ve)}else setTimeout(X,50)},Pt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Pt.prototype.setUneditable=function(){},Pt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=Z();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(be(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch(u){}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(qe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=At(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return l}function iu(e){e.off=qe,e.on=be,e.wheelEventPixels=dl,e.Doc=Zt,e.splitLines=pt,e.countColumn=p,e.findColumn=re,e.isWordChar=fe,e.Pass=ye,e.signal=Ee,e.Line=_t,e.changeEnd=Hn,e.scrollbarModel=vo,e.Pos=Re,e.cmpPos=ut,e.modes=St,e.mimeModes=mt,e.resolveMode=cn,e.getMode=kn,e.modeExtensions=mn,e.extendMode=bi,e.copyState=dn,e.startState=dr,e.innerMode=$n,e.commands=hi,e.keyMap=An,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Mr,e.normalizeKeyMap=Rl,e.StringStream=Ot,e.SharedTextMarker=ci,e.TextMarker=Bn,e.LineWidget=ui,e.e_preventDefault=f,e.e_stopPropagation=h,e.e_stop=y,e.addClass=P,e.contains=x,e.rmClass=pe,e.keyNames=Xn}Yl(At),Ql(At);var au="iter insert remove copy getEditor constructor".split(" ");for(var qi in Zt.prototype)Zt.prototype.hasOwnProperty(qi)&&R(au,qi)<0&&(At.prototype[qi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[qi]));return M(Zt),At.inputStyles={textarea:Pt,contenteditable:xt},At.defineMode=function(e){!At.defaults.mode&&e!="null"&&(At.defaults.mode=e),on.apply(this,arguments)},At.defineMIME=Kn,At.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),At.defineMIME("text/plain","null"),At.defineExtension=function(e,t){At.prototype[e]=t},At.defineDocExtension=function(e,t){Zt.prototype[e]=t},At.fromTextArea=ru,iu(At),At.version="5.58.2",At})},Y1PL:function(ct,$e,k){"use strict";k.r($e),k.d($e,"ResizableTextArea",function(){return R});var U=k("wx14"),me=k("1OyB"),oe=k("vuIU"),ke=k("Ji7U"),xe=k("LK+K"),V=k("q1tI"),N=k("VTBJ"),D=k("rePB"),L=k("Zm9Q"),W=k("Kwbf"),B=k("c+Xe"),$=k("m+aA"),we=k("bdgK"),ie=new Map;function z(ee){ee.forEach(function(ge){var le,re=ge.target;(le=ie.get(re))===null||le===void 0||le.forEach(function(H){return H(re)})})}var j=new we.default(z),I=null,se=null;function te(ee,ge){ie.has(ee)||(ie.set(ee,new Set),j.observe(ee)),ie.get(ee).add(ge)}function Ae(ee,ge){ie.has(ee)&&(ie.get(ee).delete(ge),ie.get(ee).size||(j.unobserve(ee),ie.delete(ee)))}var He=function(ee){Object(ke.a)(le,ee);var ge=Object(xe.a)(le);function le(){return Object(me.a)(this,le),ge.apply(this,arguments)}return Object(oe.a)(le,[{key:"render",value:function(){return this.props.children}}]),le}(V.Component),ce=V.createContext(null);function _e(ee){var ge=ee.children,le=ee.onBatchResize,re=V.useRef(0),H=V.useRef([]),J=V.useContext(ce),m=V.useCallback(function(O,v,Q){re.current+=1;var de=re.current;H.current.push({size:O,element:v,data:Q}),Promise.resolve().then(function(){de===re.current&&(le==null||le(H.current),H.current=[])}),J==null||J(O,v,Q)},[le,J]);return V.createElement(ce.Provider,{value:m},ge)}function je(ee){var ge=ee.children,le=ee.disabled,re=V.useRef(null),H=V.useRef(null),J=V.useContext(ce),m=V.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),O=V.isValidElement(ge)&&Object(B.c)(ge),v=O?ge.ref:null,Q=V.useMemo(function(){return Object(B.a)(v,re)},[v,re]),de=V.useRef(ee);de.current=ee;var K=V.useCallback(function(fe){var Te=de.current,Ne=Te.onResize,De=Te.data,Ce=fe.getBoundingClientRect(),Se=Ce.width,Je=Ce.height,Ge=fe.offsetWidth,Ye=fe.offsetHeight,Ke=Math.floor(Se),it=Math.floor(Je);if(m.current.width!==Ke||m.current.height!==it||m.current.offsetWidth!==Ge||m.current.offsetHeight!==Ye){var Qe={width:Ke,height:it,offsetWidth:Ge,offsetHeight:Ye};m.current=Qe;var Ze=Ge===Math.round(Se)?Se:Ge,be=Ye===Math.round(Je)?Je:Ye,rt=Object(N.a)(Object(N.a)({},Qe),{},{offsetWidth:Ze,offsetHeight:be});J==null||J(rt,fe,De),Ne&&Promise.resolve().then(function(){Ne(rt,fe)})}},[]);return V.useEffect(function(){var fe=Object($.a)(re.current)||Object($.a)(H.current);return fe&&!le&&te(fe,K),function(){return Ae(fe,K)}},[re.current,le]),V.createElement(He,{ref:H},O?V.cloneElement(ge,{ref:Q}):ge)}var he="rc-observer-key";function pe(ee){var ge=ee.children,le=Object(L.a)(ge);return le.map(function(re,H){var J=(re==null?void 0:re.key)||"".concat(he,"-").concat(H);return V.createElement(je,Object(U.a)({},ee,{key:J}),re)})}pe.Collection=_e;var Oe=pe,ae=k("bT9E"),b=k("TSYQ"),q=k.n(b),F=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,x=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],Z={},P;function A(ee){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=ee.getAttribute("id")||ee.getAttribute("data-reactid")||ee.getAttribute("name");if(ge&&Z[le])return Z[le];var re=window.getComputedStyle(ee),H=re.getPropertyValue("box-sizing")||re.getPropertyValue("-moz-box-sizing")||re.getPropertyValue("-webkit-box-sizing"),J=parseFloat(re.getPropertyValue("padding-bottom"))+parseFloat(re.getPropertyValue("padding-top")),m=parseFloat(re.getPropertyValue("border-bottom-width"))+parseFloat(re.getPropertyValue("border-top-width")),O=x.map(function(Q){return"".concat(Q,":").concat(re.getPropertyValue(Q))}).join(";"),v={sizingStyle:O,paddingSize:J,borderSize:m,boxSizing:H};return ge&&le&&(Z[le]=v),v}function S(ee){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),document.body.appendChild(P)),ee.getAttribute("wrap")?P.setAttribute("wrap",ee.getAttribute("wrap")):P.removeAttribute("wrap");var H=A(ee,ge),J=H.paddingSize,m=H.borderSize,O=H.boxSizing,v=H.sizingStyle;P.setAttribute("style","".concat(v,";").concat(F)),P.value=ee.value||ee.placeholder||"";var Q=Number.MIN_SAFE_INTEGER,de=Number.MAX_SAFE_INTEGER,K=P.scrollHeight,fe;if(O==="border-box"?K+=m:O==="content-box"&&(K-=J),le!==null||re!==null){P.value=" ";var Te=P.scrollHeight-J;le!==null&&(Q=Te*le,O==="border-box"&&(Q=Q+J+m),K=Math.max(Q,K)),re!==null&&(de=Te*re,O==="border-box"&&(de=de+J+m),fe=K>de?"":"hidden",K=Math.min(de,K))}return{height:K,minHeight:Q,maxHeight:de,overflowY:fe,resize:"none"}}var c=k("Gytx"),s=k.n(c),p;(function(ee){ee[ee.NONE=0]="NONE",ee[ee.RESIZING=1]="RESIZING",ee[ee.RESIZED=2]="RESIZED"})(p||(p={}));var w=function(ee){Object(ke.a)(le,ee);var ge=Object(xe.a)(le);function le(re){var H;return Object(me.a)(this,le),H=ge.call(this,re),H.nextFrameActionId=void 0,H.resizeFrameId=void 0,H.textArea=void 0,H.saveTextArea=function(J){H.textArea=J},H.handleResize=function(J){var m=H.state.resizeStatus,O=H.props,v=O.autoSize,Q=O.onResize;if(m!==p.NONE)return;typeof Q=="function"&&Q(J),v&&H.resizeOnNextFrame()},H.resizeOnNextFrame=function(){cancelAnimationFrame(H.nextFrameActionId),H.nextFrameActionId=requestAnimationFrame(H.resizeTextarea)},H.resizeTextarea=function(){var J=H.props.autoSize;if(!J||!H.textArea)return;var m=J.minRows,O=J.maxRows,v=S(H.textArea,!1,m,O);H.setState({textareaStyles:v,resizeStatus:p.RESIZING},function(){cancelAnimationFrame(H.resizeFrameId),H.resizeFrameId=requestAnimationFrame(function(){H.setState({resizeStatus:p.RESIZED},function(){H.resizeFrameId=requestAnimationFrame(function(){H.setState({resizeStatus:p.NONE}),H.fixFirefoxAutoScroll()})})})})},H.renderTextArea=function(){var J=H.props,m=J.prefixCls,O=m===void 0?"rc-textarea":m,v=J.autoSize,Q=J.onResize,de=J.className,K=J.disabled,fe=H.state,Te=fe.textareaStyles,Ne=fe.resizeStatus,De=Object(ae.a)(H.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ce=q()(O,de,Object(D.a)({},"".concat(O,"-disabled"),K));"value"in De&&(De.value=De.value||"");var Se=Object(N.a)(Object(N.a)(Object(N.a)({},H.props.style),Te),Ne===p.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return V.createElement(Oe,{onResize:H.handleResize,disabled:!(v||Q)},V.createElement("textarea",Object(U.a)({},De,{className:Ce,style:Se,ref:H.saveTextArea})))},H.state={textareaStyles:{},resizeStatus:p.NONE},H}return Object(oe.a)(le,[{key:"componentDidUpdate",value:function(H){(H.value!==this.props.value||!s()(H.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 H=this.textArea.selectionStart,J=this.textArea.selectionEnd;this.textArea.setSelectionRange(H,J)}}catch(m){}}},{key:"render",value:function(){return this.renderTextArea()}}]),le}(V.Component),R=w,ne=function(ee){Object(ke.a)(le,ee);var ge=Object(xe.a)(le);function le(re){var H;Object(me.a)(this,le),H=ge.call(this,re),H.resizableTextArea=void 0,H.focus=function(){H.resizableTextArea.textArea.focus()},H.saveTextArea=function(m){H.resizableTextArea=m},H.handleChange=function(m){var O=H.props.onChange;H.setValue(m.target.value,function(){H.resizableTextArea.resizeTextarea()}),O&&O(m)},H.handleKeyDown=function(m){var O=H.props,v=O.onPressEnter,Q=O.onKeyDown;m.keyCode===13&&v&&v(m),Q&&Q(m)};var J=typeof re.value=="undefined"||re.value===null?re.defaultValue:re.value;return H.state={value:J},H}return Object(oe.a)(le,[{key:"setValue",value:function(H,J){"value"in this.props||this.setState({value:H},J)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return V.createElement(R,Object(U.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(H){return"value"in H?{value:H.value}:null}}]),le}(V.Component),ye=$e.default=ne},ZW9T:function(ct,$e,k){"use strict";k.d($e,"a",function(){return He});var U=k("k1fw"),me=k("miYZ"),oe=k("tsqr"),ke=k("rAM+"),xe=k("tJVT"),V=k("PpiC"),N=k("q1tI"),D=k.n(N),L=k("bdgK");function W(ce,_e,je,he,pe){var Oe=_e.getWordUntilPosition(je),ae={startLineNumber:je.lineNumber,endLineNumber:je.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},b=he.map(function(q){return{label:q,kind:ce.languages.CompletionItemKind.Keyword,insertText:q,insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ae}});return pe.map(function(q){b.push(Object(U.a)(Object(U.a)({},q),{},{range:ae}))}),b}var B=function(ce){var _e={label:"ifelse",kind:ce.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},je=["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"];ce.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ae,b){var q=W(ce,ae,b,je,[_e]);return{suggestions:q}}});var he=["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"];ce.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ae,b){var q=[{label:"print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],F=W(ce,ae,b,he,q);return{suggestions:F}}});var pe=["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"];ce.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ae,b){var q=[_e,{label:"main",kind:ce.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:ce.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:ce.languages.CompletionItemInsertTextRule.InsertAsSnippet}],F=W(ce,ae,b,pe,q);return{suggestions:F}}})},$="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",we=k("LvDl");function ie(ce){return/^\d+$/.test(ce)?"".concat(ce,"px"):ce}function z(){}var j=!1,I={"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 se(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_e=ce;if(Array.isArray(ce)){for(var je=0;je<ce.length;je++){var he=I[ce[je]];if(he)return he}return _e[0]}return I[_e]||_e}var te=null,Ae=$e.b=function(ce){var _e=ce.width,je=_e===void 0?"100%":_e,he=ce.height,pe=he===void 0?"100%":he,Oe=ce.value,ae=ce.language,b=ae===void 0?"javascript":ae,q=ce.style,F=q===void 0?{}:q,x=ce.options,Z=x===void 0?{}:x,P=ce.overrideServices,A=P===void 0?{}:P,S=ce.theme,c=S===void 0?"vs-dark":S,s=ce.onEditBlur,p=ce.onSave,w=ce.autoHeight,R=w===void 0?!1:w,ne=ce.forbidCopy,ye=ne===void 0?!1:ne,ee=ce.onChange,ge=ee===void 0?z:ee,le=ce.editorDidMount,re=le===void 0?z:le,H=ce.onFocus,J=H===void 0?z:H,m=ce.filename,O=m===void 0?"educoder.txt":m,v=Object(V.a)(ce,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Q=Object(N.useRef)(),de=Object(N.useRef)({}),K=Object(N.useRef)(),fe=Object(N.useRef)(!1),Te=Object(N.useRef)(),Ne=Object(N.useState)(!1),De=Object(xe.a)(Ne,2),Ce=De[0],Se=De[1];function Je(){var g;return Q.current&&(g=new L.default(function(y){var G=Object(ke.a)(y),ue;try{for(G.s();!(ue=G.n()).done;){var Me=ue.value;(Me.target.offsetHeight>0||Me.target.offsetWidth>0)&&de.current.instance.layout()}}catch(Xe){G.e(Xe)}finally{G.f()}}),g.observe(Q.current)),g}function Ge(){oe.b.warn(decodeURIComponent($))}var Ye=function(){var y=de.current.instance;if(Oe!=null&&y&&Ce){var G=y.getModel();G&&Oe!==G.getValue()&&(j=!0,G.setValue(Oe),y.layout(),j=!1)}};Object(N.useEffect)(function(){K.current&&clearTimeout(K.current),K.current=setTimeout(function(){Ye()},500)},[Oe,Ce,de.current]);function Ke(){var g=de.current.instance;if(g){var y=g.getSelection(),G=de.current.pastePos||{},ue=new te.Range(G.startLineNumber||y.endLineNumber,G.startColumn||y.endColumn,G.endLineNumber||y.endLineNumber,G.endColumn||y.endColumn);setTimeout(function(){g.executeEdits("",[{range:ue,text:""}])},300)}}function it(g){(window.navigator.platform.match("Mac")?g.metaKey:g.ctrlKey)&&g.keyCode==83&&(g.preventDefault(),p())}var Qe=function(){if(R&&de.current.instance){var y=de.current.instance.getContentHeight();f(y<pe?pe:y)}else f(pe)};function Ze(g){var y=document.createEvent("MouseEvents");y.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),g.dispatchEvent(y)}function be(g,y){var G=window.URL||window.webkitURL||window,ue=new Blob([y]),Me=document.createElementNS("http://www.w3.org/1999/xhtml","a");Me.href=G.createObjectURL(ue),Me.download=g,Ze(Me)}Object(N.useEffect)(function(){Qe()},[Qe]),Object(N.useEffect)(function(){Q.current&&!Ce&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(g){try{te=g,de.current.instance=te.editor.create(Q.current,{value:Oe,language:se(b),theme:c,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},A);var y=de.current.instance;if(re(y,te),setTimeout(function(){Qe(),de.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){be(O||"educoder.txt",y.getValue())}})},500),de.current.subscription=y.onDidChangeModelContent(function(ue){fe.current?clearTimeout(Te.current):(Qe(),ge(y.getValue(),ue)),Te.current=setTimeout(function(){fe.current=!1},500)}),window.Monaco||B(te),ye&&(y.addCommand(te.KeyMod.CtrlCmd|te.KeyMod.Shift|te.KeyCode.KEY_V,function(){return Ge(),null}),y.addCommand(te.KeyMod.CtrlCmd|te.KeyCode.KEY_C,function(){return Ge(),null})),window.Monaco=te,s&&y.onDidBlurEditorWidget(function(){s(y.getValue())}),J&&y.onDidFocusEditorText(function(){J(y.getValue())}),ye){y.addCommand(te.KeyMod.CtrlCmd|te.KeyCode.KEY_V,function(){return Ge(),null}),y.onDidPaste(function(ue){de.current.pastePos=ue});try{window.addEventListener("paste",Ke)}catch(ue){}}var G=Je();return Se(!0),function(){var ue=de.current.instance;ue.dispose();var Me=ue.getModel();Me&&Me.dispose(),de.current.subscription&&de.current.subscription.dispose(),ye&&window.removeEventListener("paste",Ke),G.unobserve(Q.current)}}catch(ue){}})},[]),Object(N.useEffect)(function(){var g=de.current.instance;if(g&&Ce)return document.addEventListener("keydown",it,!1),function(){document.removeEventListener("keydown",it)}},[p,Ce]),Object(N.useEffect)(function(){var g=de.current.instance;if(g&&Ce){var y=se(b);te.editor.setModelLanguage(g.getModel(),y),console.log("language:",b,g.getModel(),y)}},[b,Ce]),Object(N.useEffect)(function(){var g=de.current.instance;g&&Ce&&te.editor.setTheme(c)},[c,Ce]),Object(N.useEffect)(function(){var g=de.current.instance;g&&Ce&&(g.updateOptions(Object(U.a)({},Z)),setTimeout(function(){g.getModel().updateOptions(Object(U.a)({},Z))},200))},[JSON.stringify(Z),Ce]),Object(N.useEffect)(function(){var g=de.current.instance;g&&Ce&&g.layout()},[je,pe,Ce]);var rt=Object(N.useState)(ie(je)),qe=Object(xe.a)(rt,2),Ee=qe[0],Pe=qe[1],C=Object(N.useState)(ie(pe)),T=Object(xe.a)(C,2),M=T[0],f=T[1],h=Object(U.a)(Object(U.a)({},F),{},{width:Ee,height:M});return D.a.createElement("div",{className:"my-monaco-editor",ref:Q,style:h})};function He(ce){var _e=ce.width,je=_e===void 0?"100%":_e,he=ce.height,pe=he===void 0?"100%":he,Oe=ce.original,ae=ce.modified,b=ce.language,q=ce.options,F=q===void 0?{}:q,x=Object(N.useRef)(),Z=Object(N.useState)(null),P=Object(xe.a)(Z,2),A=P[0],S=P[1];function c(R){var ne;return x.current&&(ne=new L.default(function(ye){var ee=Object(ke.a)(ye),ge;try{for(ee.s();!(ge=ee.n()).done;){var le=ge.value;(le.target.offsetHeight>0||le.target.offsetWidth>0)&&R.layout()}}catch(re){ee.e(re)}finally{ee.f()}}),ne.observe(x.current)),ne}Object(N.useEffect)(function(){x.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(R){te=R;var ne=te.editor.createDiffEditor(x.current,Object(U.a)(Object(U.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},F),{},{wordWrap:!0}));S(ne);var ye=c(ne);return function(){ne.dispose();var ee=ne.getModel();ee&&ee.dispose(),ye.unobserve(x.current)}})},[]),Object(N.useEffect)(function(){A&&A.setModel({original:te.editor.createModel(Oe,b),modified:te.editor.createModel(ae,b)})},[Oe,ae,b,A]);var s=ie(je),p=ie(pe),w={width:s,height:p};return D.a.createElement("div",{className:"my-diff-editor",ref:x,style:w})}},ZpRC:function(ct,$e,k){"use strict";function U(B){return typeof B=="object"&&B!=null&&B.nodeType===1}function me(B,$){return(!$||B!=="hidden")&&B!=="visible"&&B!=="clip"}function oe(B,$){if(B.clientHeight<B.scrollHeight||B.clientWidth<B.scrollWidth){var we=getComputedStyle(B,null);return me(we.overflowY,$)||me(we.overflowX,$)||function(ie){var z=function(j){if(!j.ownerDocument||!j.ownerDocument.defaultView)return null;try{return j.ownerDocument.defaultView.frameElement}catch(I){return null}}(ie);return!!z&&(z.clientHeight<ie.scrollHeight||z.clientWidth<ie.scrollWidth)}(B)}return!1}function ke(B,$,we,ie,z,j,I,se){return j<B&&I>$||j>B&&I<$?0:j<=B&&se<=we||I>=$&&se>=we?j-B-ie:I>$&&se<we||j<B&&se>we?I-$+z:0}var xe=function(B,$){var we=window,ie=$.scrollMode,z=$.block,j=$.inline,I=$.boundary,se=$.skipOverflowHiddenElements,te=typeof I=="function"?I:function(Te){return Te!==I};if(!U(B))throw new TypeError("Invalid target");for(var Ae=document.scrollingElement||document.documentElement,He=[],ce=B;U(ce)&&te(ce);){if((ce=ce.parentElement)===Ae){He.push(ce);break}ce!=null&&ce===document.body&&oe(ce)&&!oe(document.documentElement)||ce!=null&&oe(ce,se)&&He.push(ce)}for(var _e=we.visualViewport?we.visualViewport.width:innerWidth,je=we.visualViewport?we.visualViewport.height:innerHeight,he=window.scrollX||pageXOffset,pe=window.scrollY||pageYOffset,Oe=B.getBoundingClientRect(),ae=Oe.height,b=Oe.width,q=Oe.top,F=Oe.right,x=Oe.bottom,Z=Oe.left,P=z==="start"||z==="nearest"?q:z==="end"?x:q+ae/2,A=j==="center"?Z+b/2:j==="end"?F:Z,S=[],c=0;c<He.length;c++){var s=He[c],p=s.getBoundingClientRect(),w=p.height,R=p.width,ne=p.top,ye=p.right,ee=p.bottom,ge=p.left;if(ie==="if-needed"&&q>=0&&Z>=0&&x<=je&&F<=_e&&q>=ne&&x<=ee&&Z>=ge&&F<=ye)return S;var le=getComputedStyle(s),re=parseInt(le.borderLeftWidth,10),H=parseInt(le.borderTopWidth,10),J=parseInt(le.borderRightWidth,10),m=parseInt(le.borderBottomWidth,10),O=0,v=0,Q="offsetWidth"in s?s.offsetWidth-s.clientWidth-re-J:0,de="offsetHeight"in s?s.offsetHeight-s.clientHeight-H-m:0;if(Ae===s)O=z==="start"?P:z==="end"?P-je:z==="nearest"?ke(pe,pe+je,je,H,m,pe+P,pe+P+ae,ae):P-je/2,v=j==="start"?A:j==="center"?A-_e/2:j==="end"?A-_e:ke(he,he+_e,_e,re,J,he+A,he+A+b,b),O=Math.max(0,O+pe),v=Math.max(0,v+he);else{O=z==="start"?P-ne-H:z==="end"?P-ee+m+de:z==="nearest"?ke(ne,ee,w,H,m+de,P,P+ae,ae):P-(ne+w/2)+de/2,v=j==="start"?A-ge-re:j==="center"?A-(ge+R/2)+Q/2:j==="end"?A-ye+J+Q:ke(ge,ye,R,re,J+Q,A,A+b,b);var K=s.scrollLeft,fe=s.scrollTop;P+=fe-(O=Math.max(0,Math.min(fe+O,s.scrollHeight-w+de))),A+=K-(v=Math.max(0,Math.min(K+v,s.scrollWidth-R+Q)))}S.push({el:s,top:O,left:v})}return S};function V(B){return B===Object(B)&&Object.keys(B).length!==0}function N(B,$){$===void 0&&($="auto");var we="scrollBehavior"in document.body.style;B.forEach(function(ie){var z=ie.el,j=ie.top,I=ie.left;z.scroll&&we?z.scroll({top:j,left:I,behavior:$}):(z.scrollTop=j,z.scrollLeft=I)})}function D(B){return B===!1?{block:"end",inline:"nearest"}:V(B)?B:{block:"start",inline:"nearest"}}function L(B,$){var we=!B.ownerDocument.documentElement.contains(B);if(V($)&&typeof $.behavior=="function")return $.behavior(we?[]:xe(B,$));if(we)return;var ie=D($);return N(xe(B,ie),ie.behavior)}var W=$e.a=L},Zss7:function(ct,$e,k){var U;(function(me){var oe=/^\s+/,ke=/\s+$/,xe=0,V=me.round,N=me.min,D=me.max,L=me.random;function W(m,O){if(m=m||"",O=O||{},m instanceof W)return m;if(!(this instanceof W))return new W(m,O);var v=B(m);this._originalInput=m,this._r=v.r,this._g=v.g,this._b=v.b,this._a=v.a,this._roundA=V(100*this._a)/100,this._format=O.format||v.format,this._gradientType=O.gradientType,this._r<1&&(this._r=V(this._r)),this._g<1&&(this._g=V(this._g)),this._b<1&&(this._b=V(this._b)),this._ok=v.ok,this._tc_id=xe++}W.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var m=this.toRgb();return(m.r*299+m.g*587+m.b*114)/1e3},getLuminance:function(){var m=this.toRgb(),O,v,Q,de,K,fe;return O=m.r/255,v=m.g/255,Q=m.b/255,O<=.03928?de=O/12.92:de=me.pow((O+.055)/1.055,2.4),v<=.03928?K=v/12.92:K=me.pow((v+.055)/1.055,2.4),Q<=.03928?fe=Q/12.92:fe=me.pow((Q+.055)/1.055,2.4),.2126*de+.7152*K+.0722*fe},setAlpha:function(m){return this._a=S(m),this._roundA=V(100*this._a)/100,this},toHsv:function(){var m=z(this._r,this._g,this._b);return{h:m.h*360,s:m.s,v:m.v,a:this._a}},toHsvString:function(){var m=z(this._r,this._g,this._b),O=V(m.h*360),v=V(m.s*100),Q=V(m.v*100);return this._a==1?"hsv("+O+", "+v+"%, "+Q+"%)":"hsva("+O+", "+v+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var m=we(this._r,this._g,this._b);return{h:m.h*360,s:m.s,l:m.l,a:this._a}},toHslString:function(){var m=we(this._r,this._g,this._b),O=V(m.h*360),v=V(m.s*100),Q=V(m.l*100);return this._a==1?"hsl("+O+", "+v+"%, "+Q+"%)":"hsla("+O+", "+v+"%, "+Q+"%, "+this._roundA+")"},toHex:function(m){return I(this._r,this._g,this._b,m)},toHexString:function(m){return"#"+this.toHex(m)},toHex8:function(m){return se(this._r,this._g,this._b,this._a,m)},toHex8String:function(m){return"#"+this.toHex8(m)},toRgb:function(){return{r:V(this._r),g:V(this._g),b:V(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+V(this._r)+", "+V(this._g)+", "+V(this._b)+")":"rgba("+V(this._r)+", "+V(this._g)+", "+V(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:V(c(this._r,255)*100)+"%",g:V(c(this._g,255)*100)+"%",b:V(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+V(c(this._r,255)*100)+"%, "+V(c(this._g,255)*100)+"%, "+V(c(this._b,255)*100)+"%)":"rgba("+V(c(this._r,255)*100)+"%, "+V(c(this._g,255)*100)+"%, "+V(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:P[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(m){var O="#"+te(this._r,this._g,this._b,this._a),v=O,Q=this._gradientType?"GradientType = 1, ":"";if(m){var de=W(m);v="#"+te(de._r,de._g,de._b,de._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+O+",endColorstr="+v+")"},toString:function(m){var O=!!m;m=m||this._format;var v=!1,Q=this._a<1&&this._a>=0,de=!O&&Q&&(m==="hex"||m==="hex6"||m==="hex3"||m==="hex4"||m==="hex8"||m==="name");return de?m==="name"&&this._a===0?this.toName():this.toRgbString():(m==="rgb"&&(v=this.toRgbString()),m==="prgb"&&(v=this.toPercentageRgbString()),(m==="hex"||m==="hex6")&&(v=this.toHexString()),m==="hex3"&&(v=this.toHexString(!0)),m==="hex4"&&(v=this.toHex8String(!0)),m==="hex8"&&(v=this.toHex8String()),m==="name"&&(v=this.toName()),m==="hsl"&&(v=this.toHslString()),m==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return W(this.toString())},_applyModification:function(m,O){var v=m.apply(null,[this].concat([].slice.call(O)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(_e,arguments)},brighten:function(){return this._applyModification(je,arguments)},darken:function(){return this._applyModification(he,arguments)},desaturate:function(){return this._applyModification(Ae,arguments)},saturate:function(){return this._applyModification(He,arguments)},greyscale:function(){return this._applyModification(ce,arguments)},spin:function(){return this._applyModification(pe,arguments)},_applyCombination:function(m,O){return m.apply(null,[this].concat([].slice.call(O)))},analogous:function(){return this._applyCombination(F,arguments)},complement:function(){return this._applyCombination(Oe,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(ae,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},W.fromRatio=function(m,O){if(typeof m=="object"){var v={};for(var Q in m)m.hasOwnProperty(Q)&&(Q==="a"?v[Q]=m[Q]:v[Q]=ye(m[Q]));m=v}return W(m,O)};function B(m){var O={r:0,g:0,b:0},v=1,Q=null,de=null,K=null,fe=!1,Te=!1;return typeof m=="string"&&(m=H(m)),typeof m=="object"&&(re(m.r)&&re(m.g)&&re(m.b)?(O=$(m.r,m.g,m.b),fe=!0,Te=String(m.r).substr(-1)==="%"?"prgb":"rgb"):re(m.h)&&re(m.s)&&re(m.v)?(Q=ye(m.s),de=ye(m.v),O=j(m.h,Q,de),fe=!0,Te="hsv"):re(m.h)&&re(m.s)&&re(m.l)&&(Q=ye(m.s),K=ye(m.l),O=ie(m.h,Q,K),fe=!0,Te="hsl"),m.hasOwnProperty("a")&&(v=m.a)),v=S(v),{ok:fe,format:m.format||Te,r:N(255,D(O.r,0)),g:N(255,D(O.g,0)),b:N(255,D(O.b,0)),a:v}}function $(m,O,v){return{r:c(m,255)*255,g:c(O,255)*255,b:c(v,255)*255}}function we(m,O,v){m=c(m,255),O=c(O,255),v=c(v,255);var Q=D(m,O,v),de=N(m,O,v),K,fe,Te=(Q+de)/2;if(Q==de)K=fe=0;else{var Ne=Q-de;fe=Te>.5?Ne/(2-Q-de):Ne/(Q+de);switch(Q){case m:K=(O-v)/Ne+(O<v?6:0);break;case O:K=(v-m)/Ne+2;break;case v:K=(m-O)/Ne+4;break}K/=6}return{h:K,s:fe,l:Te}}function ie(m,O,v){var Q,de,K;m=c(m,360),O=c(O,100),v=c(v,100);function fe(De,Ce,Se){return Se<0&&(Se+=1),Se>1&&(Se-=1),Se<1/6?De+(Ce-De)*6*Se:Se<1/2?Ce:Se<2/3?De+(Ce-De)*(2/3-Se)*6:De}if(O===0)Q=de=K=v;else{var Te=v<.5?v*(1+O):v+O-v*O,Ne=2*v-Te;Q=fe(Ne,Te,m+1/3),de=fe(Ne,Te,m),K=fe(Ne,Te,m-1/3)}return{r:Q*255,g:de*255,b:K*255}}function z(m,O,v){m=c(m,255),O=c(O,255),v=c(v,255);var Q=D(m,O,v),de=N(m,O,v),K,fe,Te=Q,Ne=Q-de;if(fe=Q===0?0:Ne/Q,Q==de)K=0;else{switch(Q){case m:K=(O-v)/Ne+(O<v?6:0);break;case O:K=(v-m)/Ne+2;break;case v:K=(m-O)/Ne+4;break}K/=6}return{h:K,s:fe,v:Te}}function j(m,O,v){m=c(m,360)*6,O=c(O,100),v=c(v,100);var Q=me.floor(m),de=m-Q,K=v*(1-O),fe=v*(1-de*O),Te=v*(1-(1-de)*O),Ne=Q%6,De=[v,fe,K,K,Te,v][Ne],Ce=[Te,v,v,fe,K,K][Ne],Se=[K,K,Te,v,v,fe][Ne];return{r:De*255,g:Ce*255,b:Se*255}}function I(m,O,v,Q){var de=[ne(V(m).toString(16)),ne(V(O).toString(16)),ne(V(v).toString(16))];return Q&&de[0].charAt(0)==de[0].charAt(1)&&de[1].charAt(0)==de[1].charAt(1)&&de[2].charAt(0)==de[2].charAt(1)?de[0].charAt(0)+de[1].charAt(0)+de[2].charAt(0):de.join("")}function se(m,O,v,Q,de){var K=[ne(V(m).toString(16)),ne(V(O).toString(16)),ne(V(v).toString(16)),ne(ee(Q))];return de&&K[0].charAt(0)==K[0].charAt(1)&&K[1].charAt(0)==K[1].charAt(1)&&K[2].charAt(0)==K[2].charAt(1)&&K[3].charAt(0)==K[3].charAt(1)?K[0].charAt(0)+K[1].charAt(0)+K[2].charAt(0)+K[3].charAt(0):K.join("")}function te(m,O,v,Q){var de=[ne(ee(Q)),ne(V(m).toString(16)),ne(V(O).toString(16)),ne(V(v).toString(16))];return de.join("")}W.equals=function(m,O){return!m||!O?!1:W(m).toRgbString()==W(O).toRgbString()},W.random=function(){return W.fromRatio({r:L(),g:L(),b:L()})};function Ae(m,O){O=O===0?0:O||10;var v=W(m).toHsl();return v.s-=O/100,v.s=s(v.s),W(v)}function He(m,O){O=O===0?0:O||10;var v=W(m).toHsl();return v.s+=O/100,v.s=s(v.s),W(v)}function ce(m){return W(m).desaturate(100)}function _e(m,O){O=O===0?0:O||10;var v=W(m).toHsl();return v.l+=O/100,v.l=s(v.l),W(v)}function je(m,O){O=O===0?0:O||10;var v=W(m).toRgb();return v.r=D(0,N(255,v.r-V(255*-(O/100)))),v.g=D(0,N(255,v.g-V(255*-(O/100)))),v.b=D(0,N(255,v.b-V(255*-(O/100)))),W(v)}function he(m,O){O=O===0?0:O||10;var v=W(m).toHsl();return v.l-=O/100,v.l=s(v.l),W(v)}function pe(m,O){var v=W(m).toHsl(),Q=(v.h+O)%360;return v.h=Q<0?360+Q:Q,W(v)}function Oe(m){var O=W(m).toHsl();return O.h=(O.h+180)%360,W(O)}function ae(m){var O=W(m).toHsl(),v=O.h;return[W(m),W({h:(v+120)%360,s:O.s,l:O.l}),W({h:(v+240)%360,s:O.s,l:O.l})]}function b(m){var O=W(m).toHsl(),v=O.h;return[W(m),W({h:(v+90)%360,s:O.s,l:O.l}),W({h:(v+180)%360,s:O.s,l:O.l}),W({h:(v+270)%360,s:O.s,l:O.l})]}function q(m){var O=W(m).toHsl(),v=O.h;return[W(m),W({h:(v+72)%360,s:O.s,l:O.l}),W({h:(v+216)%360,s:O.s,l:O.l})]}function F(m,O,v){O=O||6,v=v||30;var Q=W(m).toHsl(),de=360/v,K=[W(m)];for(Q.h=(Q.h-(de*O>>1)+720)%360;--O;)Q.h=(Q.h+de)%360,K.push(W(Q));return K}function x(m,O){O=O||6;for(var v=W(m).toHsv(),Q=v.h,de=v.s,K=v.v,fe=[],Te=1/O;O--;)fe.push(W({h:Q,s:de,v:K})),K=(K+Te)%1;return fe}W.mix=function(m,O,v){v=v===0?0:v||50;var Q=W(m).toRgb(),de=W(O).toRgb(),K=v/100,fe={r:(de.r-Q.r)*K+Q.r,g:(de.g-Q.g)*K+Q.g,b:(de.b-Q.b)*K+Q.b,a:(de.a-Q.a)*K+Q.a};return W(fe)},W.readability=function(m,O){var v=W(m),Q=W(O);return(me.max(v.getLuminance(),Q.getLuminance())+.05)/(me.min(v.getLuminance(),Q.getLuminance())+.05)},W.isReadable=function(m,O,v){var Q=W.readability(m,O),de,K;K=!1,de=J(v);switch(de.level+de.size){case"AAsmall":case"AAAlarge":K=Q>=4.5;break;case"AAlarge":K=Q>=3;break;case"AAAsmall":K=Q>=7;break}return K},W.mostReadable=function(m,O,v){var Q=null,de=0,K,fe,Te,Ne;v=v||{},fe=v.includeFallbackColors,Te=v.level,Ne=v.size;for(var De=0;De<O.length;De++)K=W.readability(m,O[De]),K>de&&(de=K,Q=W(O[De]));return W.isReadable(m,Q,{level:Te,size:Ne})||!fe?Q:(v.includeFallbackColors=!1,W.mostReadable(m,["#fff","#000"],v))};var Z=W.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=W.hexNames=A(Z);function A(m){var O={};for(var v in m)m.hasOwnProperty(v)&&(O[m[v]]=v);return O}function S(m){return m=parseFloat(m),(isNaN(m)||m<0||m>1)&&(m=1),m}function c(m,O){w(m)&&(m="100%");var v=R(m);return m=N(O,D(0,parseFloat(m))),v&&(m=parseInt(m*O,10)/100),me.abs(m-O)<1e-6?1:m%O/parseFloat(O)}function s(m){return N(1,D(0,m))}function p(m){return parseInt(m,16)}function w(m){return typeof m=="string"&&m.indexOf(".")!=-1&&parseFloat(m)===1}function R(m){return typeof m=="string"&&m.indexOf("%")!=-1}function ne(m){return m.length==1?"0"+m:""+m}function ye(m){return m<=1&&(m=m*100+"%"),m}function ee(m){return me.round(parseFloat(m)*255).toString(16)}function ge(m){return p(m)/255}var le=function(){var m="[-\\+]?\\d+%?",O="[-\\+]?\\d*\\.\\d+%?",v="(?:"+O+")|(?:"+m+")",Q="[\\s|\\(]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")\\s*\\)?",de="[\\s|\\(]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")[,|\\s]+("+v+")\\s*\\)?";return{CSS_UNIT:new RegExp(v),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+de),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+de),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+de),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function re(m){return!!le.CSS_UNIT.exec(m)}function H(m){m=m.replace(oe,"").replace(ke,"").toLowerCase();var O=!1;if(Z[m])m=Z[m],O=!0;else if(m=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var v;return(v=le.rgb.exec(m))?{r:v[1],g:v[2],b:v[3]}:(v=le.rgba.exec(m))?{r:v[1],g:v[2],b:v[3],a:v[4]}:(v=le.hsl.exec(m))?{h:v[1],s:v[2],l:v[3]}:(v=le.hsla.exec(m))?{h:v[1],s:v[2],l:v[3],a:v[4]}:(v=le.hsv.exec(m))?{h:v[1],s:v[2],v:v[3]}:(v=le.hsva.exec(m))?{h:v[1],s:v[2],v:v[3],a:v[4]}:(v=le.hex8.exec(m))?{r:p(v[1]),g:p(v[2]),b:p(v[3]),a:ge(v[4]),format:O?"name":"hex8"}:(v=le.hex6.exec(m))?{r:p(v[1]),g:p(v[2]),b:p(v[3]),format:O?"name":"hex"}:(v=le.hex4.exec(m))?{r:p(v[1]+""+v[1]),g:p(v[2]+""+v[2]),b:p(v[3]+""+v[3]),a:ge(v[4]+""+v[4]),format:O?"name":"hex8"}:(v=le.hex3.exec(m))?{r:p(v[1]+""+v[1]),g:p(v[2]+""+v[2]),b:p(v[3]+""+v[3]),format:O?"name":"hex"}:!1}function J(m){var O,v;return m=m||{level:"AA",size:"small"},O=(m.level||"AA").toUpperCase(),v=(m.size||"small").toLowerCase(),O!=="AA"&&O!=="AAA"&&(O="AA"),v!=="small"&&v!=="large"&&(v="small"),{level:O,size:v}}ct.exports?ct.exports=W:!(U=function(){return W}.call($e,k,$e,ct),U!==void 0&&(ct.exports=U))})(Math)},bT9E:function(ct,$e,k){"use strict";k.d($e,"a",function(){return me});var U=k("VTBJ");function me(oe,ke){var xe=Object(U.a)({},oe);return Array.isArray(ke)&&ke.forEach(function(V){delete xe[V]}),xe}},c5Ni:function(ct,$e,k){},dejd:function(ct,$e,k){},dmUQ:function(ct,$e,k){"use strict";var U=k("Ff2n"),me=k("rePB"),oe=k("1OyB"),ke=k("vuIU"),xe=k("Ji7U"),V=k("md7G"),N=k("foSv"),D=k("q1tI"),L=k.n(D),W=k("TSYQ"),B=k.n(W),$=k("4IlW");function we(ae,b){var q=Object.keys(ae);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(ae);b&&(F=F.filter(function(x){return Object.getOwnPropertyDescriptor(ae,x).enumerable})),q.push.apply(q,F)}return q}function ie(ae){for(var b=1;b<arguments.length;b++){var q=arguments[b]!=null?arguments[b]:{};b%2?we(Object(q),!0).forEach(function(F){Object(me.a)(ae,F,q[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ae,Object.getOwnPropertyDescriptors(q)):we(Object(q)).forEach(function(F){Object.defineProperty(ae,F,Object.getOwnPropertyDescriptor(q,F))})}return ae}function z(ae){var b=j();return function(){var F=Object(N.a)(ae),x;if(b){var Z=Object(N.a)(this).constructor;x=Reflect.construct(F,arguments,Z)}else x=F.apply(this,arguments);return Object(V.a)(this,x)}}function j(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ae){return!1}}function I(){}function se(ae){ae.preventDefault()}var te=function(b){return b.replace(/[^\w.-]+/g,"")},Ae=200,He=600,ce=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,_e=function(b){return b!=null},je=function(b,q){return q===b||typeof q=="number"&&typeof b=="number"&&isNaN(q)&&isNaN(b)},he=function(ae){Object(xe.a)(q,ae);var b=z(q);function q(F){var x;Object(oe.a)(this,q),x=b.call(this,F),x.onKeyDown=function(A){var S=x.props,c=S.onKeyDown,s=S.onPressEnter;if(A.keyCode===$.a.UP){var p=x.getRatio(A);x.up(A,p,null),x.stop()}else if(A.keyCode===$.a.DOWN){var w=x.getRatio(A);x.down(A,w,null),x.stop()}else A.keyCode===$.a.ENTER&&s&&s(A);if(x.recordCursorPosition(),x.lastKeyCode=A.keyCode,c){for(var R=arguments.length,ne=new Array(R>1?R-1:0),ye=1;ye<R;ye++)ne[ye-1]=arguments[ye];c.apply(void 0,[A].concat(ne))}},x.onKeyUp=function(A){var S=x.props.onKeyUp;if(x.stop(),x.recordCursorPosition(),S){for(var c=arguments.length,s=new Array(c>1?c-1:0),p=1;p<c;p++)s[p-1]=arguments[p];S.apply(void 0,[A].concat(s))}},x.onChange=function(A){var S=x.props.onChange;x.state.focused&&(x.inputting=!0),x.rawInput=x.props.parser(x.getValueFromEvent(A)),x.setState({inputValue:x.rawInput}),S(x.toNumber(x.rawInput))},x.onMouseUp=function(){var A=x.props.onMouseUp;x.recordCursorPosition(),A&&A.apply(void 0,arguments)},x.onFocus=function(){var A;x.setState({focused:!0}),(A=x.props).onFocus.apply(A,arguments)},x.onBlur=function(){var A=x.props.onBlur;x.inputting=!1,x.setState({focused:!1});var S=x.getCurrentValidValue(x.state.inputValue),c=x.setValue(S,I);if(A){var s=x.input.value,p=x.getInputDisplayValue({focus:!1,value:c});x.input.value=p&&Number(p),A.apply(void 0,arguments),x.input.value=s}},x.getRatio=function(A){var S=1;return A.metaKey||A.ctrlKey?S=.1:A.shiftKey&&(S=10),S},x.getFullNum=function(A){return isNaN(A)?A:/e/i.test(String(A))?Number(A).toFixed(18).replace(/\.?0+$/,""):A},x.getPrecision=function(A){if(_e(x.props.precision))return x.props.precision;var S=String(A);if(S.indexOf("e-")>=0)return parseInt(S.slice(S.indexOf("e-")+2),10);var c=0;return S.indexOf(".")>=0&&(c=S.length-S.indexOf(".")-1),c},x.getInputDisplayValue=function(A){var S=A||x.state,c=S.focused,s=S.inputValue,p=S.value,w;c?w=s:w=x.toPrecisionAsStep(p),w==null&&(w="");var R=x.formatWrapper(w);return _e(x.props.decimalSeparator)&&(R=R.toString().replace(".",x.props.decimalSeparator)),R},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(A){}},x.restoreByAfter=function(A){if(A===void 0)return!1;var S=x.input.value,c=S.lastIndexOf(A);if(c===-1)return!1;var s=x.cursorBefore.length;return x.lastKeyCode===$.a.DELETE&&x.cursorBefore.charAt(s-1)===A[0]?(x.fixCaret(s,s),!0):c+A.length===S.length?(x.fixCaret(c,c),!0):!1},x.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(S,c){var s=A.substring(c);return x.restoreByAfter(s)})},x.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},x.stop=function(){x.autoStepTimer&&clearTimeout(x.autoStepTimer)},x.down=function(A,S,c){x.pressingUpOrDown=!0,x.step("down",A,S,c)},x.up=function(A,S,c){x.pressingUpOrDown=!0,x.step("up",A,S,c)},x.saveInput=function(A){x.input=A};var Z=F.value;Z===void 0&&(Z=F.defaultValue),x.state={focused:F.autoFocus};var P=x.getValidValue(x.toNumber(Z));return x.state=ie(ie({},x.state),{},{inputValue:x.toPrecisionAsStep(P),value:P}),x}return Object(ke.a)(q,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(x){var Z=this.props,P=Z.value,A=Z.onChange,S=Z.max,c=Z.min,s=this.state.focused;if(x){if(!je(x.value,P)||!je(x.max,S)||!je(x.min,c)){var p=s?P:this.getValidValue(P),w;this.pressingUpOrDown?w=p:this.inputting?w=this.rawInput:w=this.toPrecisionAsStep(p),this.setState({value:p,inputValue:w})}var R="value"in this.props?P:this.state.value;"max"in this.props&&x.max!==S&&typeof R=="number"&&R>S&&A&&A(S),"min"in this.props&&x.min!==c&&typeof R=="number"&&R<c&&A&&A(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ne=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===$.a.BACKSPACE?ne=this.cursorStart-1:this.lastKeyCode===$.a.DELETE&&(ne=this.cursorStart):ne=this.input.value.length,this.fixCaret(ne,ne)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case $.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case $.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ye){}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 Z=x;return Z===""?Z="":this.isNotCompleteNumber(parseFloat(Z))?Z=this.state.value:Z=this.getValidValue(Z),this.toNumber(Z)}},{key:"getValueFromEvent",value:function(x){var Z=x.target.value.trim().replace(/。/g,".");return _e(this.props.decimalSeparator)&&(Z=Z.replace(this.props.decimalSeparator,".")),Z}},{key:"getValidValue",value:function(x){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(x);return isNaN(A)?x:(A<Z&&(A=Z),A>P&&(A=P),A)}},{key:"setValue",value:function(x,Z){var P=this.props.precision,A=this.isNotCompleteNumber(parseFloat(x))?null:parseFloat(x),S=this.state.value,c=S===void 0?null:S,s=this.state.inputValue,p=s===void 0?null:s,w=typeof A=="number"?A.toFixed(P):"".concat(A),R=A!==c||w!=="".concat(p);return"value"in this.props?(p=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:p},Z)):this.setState({value:A,inputValue:this.toPrecisionAsStep(x)},Z),R&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(x){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,A=P.precision,S=P.step;if(_e(A))return A;var c=this.getPrecision(Z),s=this.getPrecision(S),p=this.getPrecision(x);return x?Math.max(p,c+s):c+s}},{key:"getPrecisionFactor",value:function(x){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(x,Z);return Math.pow(10,P)}},{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 Z=Math.abs(this.getMaxPrecision(x));return isNaN(Z)?x.toString():Number(x).toFixed(Z)}},{key:"toNumber",value:function(x){var Z=this.props.precision,P=this.state.focused,A=x&&x.length>16&&P;return this.isNotCompleteNumber(x)||A?x:_e(Z)?Math.round(x*Math.pow(10,Z))/Math.pow(10,Z):Number(x)}},{key:"upStep",value:function(x,Z){var P=this.props.step,A=this.getPrecisionFactor(x,Z),S=Math.abs(this.getMaxPrecision(x,Z)),c=((A*x+A*P*Z)/A).toFixed(S);return this.toNumber(c)}},{key:"downStep",value:function(x,Z){var P=this.props.step,A=this.getPrecisionFactor(x,Z),S=Math.abs(this.getMaxPrecision(x,Z)),c=((A*x-A*P*Z)/A).toFixed(S);return this.toNumber(c)}},{key:"step",value:function(x,Z){var P=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=arguments.length>3?arguments[3]:void 0;this.stop(),Z&&(Z.persist(),Z.preventDefault());var c=this.props;if(c.disabled)return;var s=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(s))return;var p=this["".concat(x,"Step")](s,A),w=p>c.max||p<c.min;if(p>c.max?p=c.max:p<c.min&&(p=c.min),this.setValue(p,null),this.setState({focused:!0},function(){P.pressingUpOrDown=!1}),w)return;this.autoStepTimer=setTimeout(function(){P[x](Z,A,!0)},S?Ae:He)}},{key:"fixCaret",value:function(x,Z){if(x===void 0||Z===void 0||!this.input||!this.input.value)return;try{var P=this.input.selectionStart,A=this.input.selectionEnd;(x!==P||Z!==A)&&this.input.setSelectionRange(x,Z)}catch(S){}}},{key:"render",value:function(){var x,Z=this.props,P=Z.prefixCls,A=Z.disabled,S=Z.readOnly,c=Z.useTouch,s=Z.autoComplete,p=Z.upHandler,w=Z.downHandler,R=Z.className,ne=Z.max,ye=Z.min,ee=Z.style,ge=Z.title,le=Z.onMouseEnter,re=Z.onMouseLeave,H=Z.onMouseOver,J=Z.onMouseOut,m=Z.required,O=Z.onClick,v=Z.tabIndex,Q=Z.type,de=Z.placeholder,K=Z.id,fe=Z.inputMode,Te=Z.pattern,Ne=Z.step,De=Z.maxLength,Ce=Z.autoFocus,Se=Z.name,Je=Z.onPaste,Ge=Z.onInput,Ye=Object(U.a)(Z,["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,Qe=Ke.focused,Ze=B()(P,(x={},Object(me.a)(x,R,!!R),Object(me.a)(x,"".concat(P,"-disabled"),A),Object(me.a)(x,"".concat(P,"-focused"),Qe),x)),be={};Object.keys(Ye).forEach(function(y){(y.substr(0,5)==="data-"||y.substr(0,5)==="aria-"||y==="role")&&(be[y]=Ye[y])});var rt=!S&&!A,qe=this.getInputDisplayValue(null),Ee=(it||it===0)&&(isNaN(it)||Number(it)>=ne),Pe=(it||it===0)&&(isNaN(it)||Number(it)<=ye),C=Ee||A||S,T=Pe||A||S,M=B()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(me.a)({},"".concat(P,"-handler-up-disabled"),C)),f=B()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(me.a)({},"".concat(P,"-handler-down-disabled"),T)),h=c?{onTouchStart:C?I:this.up,onTouchEnd:this.stop}:{onMouseDown:C?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},g=c?{onTouchStart:T?I:this.down,onTouchEnd:this.stop}:{onMouseDown:T?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return L.a.createElement("div",{className:Ze,style:ee,title:ge,onMouseEnter:le,onMouseLeave:re,onMouseOver:H,onMouseOut:J,onFocus:function(){return null},onBlur:function(){return null}},L.a.createElement("div",{className:"".concat(P,"-handler-wrap")},L.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Increase Value","aria-disabled":C,className:M}),p||L.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:se})),L.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Decrease Value","aria-disabled":T,className:f}),w||L.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:se}))),L.a.createElement("div",{className:"".concat(P,"-input-wrap")},L.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ye,"aria-valuemax":ne,"aria-valuenow":it,required:m,type:Q,placeholder:de,onPaste:Je,onClick:O,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:v,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:I,onKeyUp:rt?this.onKeyUp:I,autoFocus:Ce,maxLength:De,readOnly:S,disabled:A,max:ne,min:ye,step:Ne,name:Se,title:ge,id:K,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(qe),pattern:Te,inputMode:fe,onInput:Ge},be))))}}]),q}(L.a.Component);he.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:ce,min:-ce,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:te,required:!1,autoComplete:"off"};var pe=he,Oe=$e.a=pe},gkVt:function(ct,$e,k){"use strict";k.r($e);var U=k("DZo9"),me=k("8z0m"),oe=k("+L6B"),ke=k("2/Rp"),xe=k("miYZ"),V=k("tsqr"),N=k("9og8"),D=k("tJVT"),L=k("WmNS"),W=k.n(L),B=k("q1tI"),$=k.n(B),we=k("5NDa"),ie=k("5rEg"),z=k("Ot1p"),j=k("ErOA");function I(ae){var b=ae.setIscreate,q=ae.init,F=ae.UpdateItem,x=Object(B.useState)(""),Z=Object(D.a)(x,2),P=Z[0],A=Z[1],S=Object(B.useState)(""),c=Object(D.a)(S,2),s=c[0],p=c[1];Object(B.useEffect)(function(){if(!F)return;A(F&&F.name),p(F&&F.description)},[F]);function w(){return R.apply(this,arguments)}function R(){return R=Object(N.a)(W.a.mark(function ee(){var ge;return W.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(P){re.next=3;break}return V.b.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A"),re.abrupt("return");case 3:if(s){re.next=6;break}return V.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),re.abrupt("return");case 6:if(!F){re.next=9;break}return ne(),re.abrupt("return");case 9:return re.next=11,Object(j.a)("/api/hpc_courses.json",{method:"post",body:{name:P,description:s,container_type:window.location.pathname.split("/")[1]}});case 11:ge=re.sent,ge&&(V.b.info("\u521B\u5EFA\u6210\u529F"),b(!1),q("add"));case 13:case"end":return re.stop()}},ee)})),R.apply(this,arguments)}function ne(){return ye.apply(this,arguments)}function ye(){return ye=Object(N.a)(W.a.mark(function ee(){var ge;return W.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,Object(j.a)("/api/hpc_courses/".concat(F.id,".json"),{method:"put",body:{name:P,description:s,container_type:window.location.pathname.split("/")[1]}});case 2:ge=re.sent,ge&&(V.b.info("\u7F16\u8F91\u6210\u529F"),b(!1),q(""));case 4:case"end":return re.stop()}},ee)})),ye.apply(this,arguments)}return $.a.createElement("div",null,$.a.createElement(ie.a,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:P,maxLength:60,addonAfter:String(P.length)+"/60",onChange:function(ge){return A(ge.target.value)}}),$.a.createElement(z.a,{id:"courseContentMD",defaultValue:s,onChange:function(ge){return p(ge)}}),$.a.createElement("div",{className:"clearfix mt30 mb30"},$.a.createElement(ke.a,{type:"primary",onClick:function(){return w()},className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),$.a.createElement("a",{className:"defalutCancelbtn fl",onClick:function(){return b(!1)}},"\u53D6\u6D88")))}var se=I,te=k("9Bee");function Ae(ae){var b=ae.CourseItem,q=ae.userId,F=ae.init,x=ae.ItemUpdate,Z=ae.setSee,P=ae.UserInfo;function A(){return S.apply(this,arguments)}function S(){return S=Object(N.a)(W.a.mark(function s(){var p;return W.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,Object(j.a)("/api/hpc_courses/".concat(b.id,".json"),{method:"delete"});case 2:p=R.sent,p&&(V.b.info("\u5220\u9664\u6210\u529F"),F("delete"),Z(!1));case 4:case"end":return R.stop()}},s)})),S.apply(this,arguments)}function c(){x(b)}return $.a.createElement("div",null,q===299635||q===301458||P!=null&&P.admin||P!=null&&P.business?$.a.createElement("div",{style:{textAlign:"right"}},$.a.createElement(ke.a,{onClick:function(){return c()}},"\u7F16\u8F91"),$.a.createElement(ke.a,{onClick:function(){return A()},style:{marginLeft:"30px"}},"\u5220\u9664")):null,$.a.createElement("h1",null,b==null?void 0:b.name),$.a.createElement(te.a,{value:b==null?void 0:b.description}))}var He=Ae,ce=k("9ivq"),_e=k("m3rI"),je=k("Ty5D"),he=k("9kvl");function pe(ae){var b,q,F,x,Z,P,A,S,c,s=ae.user,p=ae.dispatch,w=Object(B.useState)(1),R=Object(D.a)(w,2),ne=R[0],ye=R[1],ee=Object(B.useState)(100),ge=Object(D.a)(ee,2),le=ge[0],re=ge[1],H=Object(B.useState)([]),J=Object(D.a)(H,2),m=J[0],O=J[1],v=Object(B.useState)(!1),Q=Object(D.a)(v,2),de=Q[0],K=Q[1],fe=Object(B.useState)(!1),Te=Object(D.a)(fe,2),Ne=Te[0],De=Te[1],Ce=Object(B.useState)(""),Se=Object(D.a)(Ce,2),Je=Se[0],Ge=Se[1],Ye=Object(B.useState)(""),Ke=Object(D.a)(Ye,2),it=Ke[0],Qe=Ke[1],Ze=Object(B.useState)(""),be=Object(D.a)(Ze,2),rt=be[0],qe=be[1],Ee=Object(je.i)(),Pe=Ee.itemname,C=Object(B.useState)(""),T=Object(D.a)(C,2),M=T[0],f=T[1];Object(B.useEffect)(function(){p({type:"globalSetting/headerToggle",payload:!1}),ne&&h("")},[ne]);function h(Xe){return g.apply(this,arguments)}function g(){return g=Object(N.a)(W.a.mark(function Xe(st){var ze,kt,pt,at,Dt;return W.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Object(j.a)("/api/hpc_courses.json",{method:"get",params:{page:ne,per_page:le,container_type:window.location.pathname.split("/")[1]}});case 2:if(ze=yt.sent,!ze){yt.next=24;break}if(kt=ze.data.hpc_courses.length,O(ze.data.hpc_courses),qe(ze.data.file_url),Qe(""),kt){yt.next=10;break}return yt.abrupt("return");case 10:if(M){yt.next=14;break}Pe?(Dt=0,ze==null||((pt=ze.data)===null||pt===void 0||((at=pt.hpc_courses)===null||at===void 0))||at.map(function(St,mt){var on;(Pe==null?void 0:Pe.toLocaleLowerCase())===(St==null||((on=St.name)===null||on===void 0)?void 0:on.toLocaleLowerCase())&&(Dt=mt)}),Ge(ze.data.hpc_courses[Dt]),De(!0),f(ze.data.hpc_courses[Dt].id),(Pe==null?void 0:Pe.toLocaleLowerCase())==="resources"&&(Ge(ze.data.hpc_courses.filter(function(St){return St.id===15})[0]),De(!0),f(15))):(Ge(ze.data.hpc_courses[0]),De(!0),f(ze.data.hpc_courses[0].id)),yt.next=24;break;case 14:if(!(st==="delete")){yt.next=23;break}if(!(kt===0)){yt.next=18;break}return De(!1),yt.abrupt("return");case 18:Ge(ze.data.hpc_courses[0]),De(!0),f(ze.data.hpc_courses[0].id),yt.next=24;break;case 23:st==="add"?(Ge(ze.data.hpc_courses[kt-1]),De(!0),f(ze.data.hpc_courses[kt-1].id)):(Ge(ze.data.hpc_courses.filter(function(St){return St.id===M})[0]),De(!0),f(M));case 24:case"end":return yt.stop()}},Xe)})),g.apply(this,arguments)}function y(Xe){K(!1),De(!0),Ge(Xe),f(Xe.id)}function G(Xe){Qe(Xe),K(!0),De(!1)}function ue(){Qe(""),K(!0),De(!1)}var Me={name:"file",multiple:!0,action:"/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange:function(st){var ze=st.file.status;ze!=="uploading",ze==="done"?(V.b.success("".concat(st.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),h("")):ze==="error"&&V.b.error("".concat(st.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(st){var ze=st.size/1024/1024<150;return ze||V.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),ze}};return $.a.createElement("div",{style:{marginBottom:"40px"}},$.a.createElement("div",{className:"bannterdiv",style:{background:"url(".concat(_e.a.IMG_SERVER+"/".concat(rt),")")}}),$.a.createElement("img",{style:{width:"100%"},src:_e.a.IMG_SERVER+"/".concat(rt)}),$.a.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},$.a.createElement("div",{style:{flex:"1",marginTop:"17px"}},m&&m.map(function(Xe,st){return $.a.createElement("p",{key:st,onClick:function(){return y(Xe)},className:M===Xe.id?"menuitemselect":"menuitem task-hide"},Xe.name)}),(s==null||((b=s.userInfo)===null||b===void 0)?void 0:b.user_id)===299635||(s==null||((q=s.userInfo)===null||q===void 0)?void 0:q.user_id)===301458||s!=null&&(F=s.userInfo)!==null&&F!==void 0&&F.admin||s!=null&&(x=s.userInfo)!==null&&x!==void 0&&x.business?$.a.createElement("p",{onClick:function(){return ue()},className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},$.a.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),$.a.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},de?$.a.createElement(se,{UpdateItem:it,setIscreate:K,init:h}):null,Ne?$.a.createElement(He,{UserInfo:s==null?void 0:s.userInfo,setSee:De,userId:s==null||((Z=s.userInfo)===null||Z===void 0)?void 0:Z.user_id,ItemUpdate:G,CourseItem:Je,init:h}):null)),(s==null||((P=s.userInfo)===null||P===void 0)?void 0:P.user_id)===299635||(s==null||((A=s.userInfo)===null||A===void 0)?void 0:A.user_id)===301458||s!=null&&(S=s.userInfo)!==null&&S!==void 0&&S.admin||s!=null&&(c=s.userInfo)!==null&&c!==void 0&&c.business?$.a.createElement(me.a,Me,$.a.createElement(ke.a,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var Oe=$e.default=Object(he.a)(function(ae){var b=ae.user;return{user:b}})(pe)},h78n:function(ct,$e,k){"use strict";k.d($e,"a",function(){return x});var U=k("q1tI"),me=k.n(U),oe=k("TSYQ"),ke=k.n(oe),xe={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},V=function(A){var S=A.map(function(){return Object(U.useRef)()}),c=Object(U.useRef)();return Object(U.useEffect)(function(){var s=Date.now(),p=!1;Object.keys(S).forEach(function(w){var R=S[w].current;if(!R)return;p=!0;var ne=R.style;ne.transitionDuration=".3s, .3s, .3s, .06s",c.current&&s-c.current<100&&(ne.transitionDuration="0s, 0s")}),p&&(c.current=Date.now())}),[S]};function N(){return N=Object.assign||function(P){for(var A=1;A<arguments.length;A++){var S=arguments[A];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(P[c]=S[c])}return P},N.apply(this,arguments)}function D(P,A){return we(P)||$(P,A)||W(P,A)||L()}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W(P,A){if(!P)return;if(typeof P=="string")return B(P,A);var S=Object.prototype.toString.call(P).slice(8,-1);if(S==="Object"&&P.constructor&&(S=P.constructor.name),S==="Map"||S==="Set")return Array.from(P);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return B(P,A)}function B(P,A){(A==null||A>P.length)&&(A=P.length);for(var S=0,c=new Array(A);S<A;S++)c[S]=P[S];return c}function $(P,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(P)))return;var S=[],c=!0,s=!1,p=void 0;try{for(var w=P[Symbol.iterator](),R;!(c=(R=w.next()).done)&&!(S.push(R.value),A&&S.length===A);c=!0);}catch(ne){s=!0,p=ne}finally{try{!c&&w.return!=null&&w.return()}finally{if(s)throw p}}return S}function we(P){if(Array.isArray(P))return P}function ie(P,A){if(P==null)return{};var S=z(P,A),c,s;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(P);for(s=0;s<p.length;s++){if(c=p[s],A.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(P,c))continue;S[c]=P[c]}}return S}function z(P,A){if(P==null)return{};var S={},c=Object.keys(P),s,p;for(p=0;p<c.length;p++){if(s=c[p],A.indexOf(s)>=0)continue;S[s]=P[s]}return S}var j=function(A){var S=A.className,c=A.percent,s=A.prefixCls,p=A.strokeColor,w=A.strokeLinecap,R=A.strokeWidth,ne=A.style,ye=A.trailColor,ee=A.trailWidth,ge=A.transition,le=ie(A,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete le.gapPosition;var re=Array.isArray(c)?c:[c],H=Array.isArray(p)?p:[p],J=V(re),m=D(J,1),O=m[0],v=R/2,Q=100-R/2,de="M ".concat(w==="round"?v:0,",").concat(v,`
|
|
L `).concat(w==="round"?Q:100,",").concat(v),K="0 0 100 ".concat(R),fe=0;return me.a.createElement("svg",N({className:ke()("".concat(s,"-line"),S),viewBox:K,preserveAspectRatio:"none",style:ne},le),me.a.createElement("path",{className:"".concat(s,"-line-trail"),d:de,strokeLinecap:w,stroke:ye,strokeWidth:ee||R,fillOpacity:"0"}),re.map(function(Te,Ne){var De={strokeDasharray:"".concat(Te,"px, 100px"),strokeDashoffset:"-".concat(fe,"px"),transition:ge||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ce=H[Ne]||H[H.length-1];return fe+=Te,me.a.createElement("path",{key:Ne,className:"".concat(s,"-line-path"),d:de,strokeLinecap:w,stroke:Ce,strokeWidth:R,fillOpacity:"0",ref:O[Ne],style:De})}))};j.defaultProps=xe;var I=j;function se(){return se=Object.assign||function(P){for(var A=1;A<arguments.length;A++){var S=arguments[A];for(var c in S)Object.prototype.hasOwnProperty.call(S,c)&&(P[c]=S[c])}return P},se.apply(this,arguments)}function te(P,A){return je(P)||_e(P,A)||He(P,A)||Ae()}function Ae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(P,A){if(!P)return;if(typeof P=="string")return ce(P,A);var S=Object.prototype.toString.call(P).slice(8,-1);if(S==="Object"&&P.constructor&&(S=P.constructor.name),S==="Map"||S==="Set")return Array.from(P);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return ce(P,A)}function ce(P,A){(A==null||A>P.length)&&(A=P.length);for(var S=0,c=new Array(A);S<A;S++)c[S]=P[S];return c}function _e(P,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(P)))return;var S=[],c=!0,s=!1,p=void 0;try{for(var w=P[Symbol.iterator](),R;!(c=(R=w.next()).done)&&!(S.push(R.value),A&&S.length===A);c=!0);}catch(ne){s=!0,p=ne}finally{try{!c&&w.return!=null&&w.return()}finally{if(s)throw p}}return S}function je(P){if(Array.isArray(P))return P}function he(P,A){if(P==null)return{};var S=pe(P,A),c,s;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(P);for(s=0;s<p.length;s++){if(c=p[s],A.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(P,c))continue;S[c]=P[c]}}return S}function pe(P,A){if(P==null)return{};var S={},c=Object.keys(P),s,p;for(p=0;p<c.length;p++){if(s=c[p],A.indexOf(s)>=0)continue;S[s]=P[s]}return S}var Oe=0;function ae(P){return+P.replace("%","")}function b(P){return Array.isArray(P)?P:[P]}function q(P,A,S,c){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,p=arguments.length>5?arguments[5]:void 0,w=50-c/2,R=0,ne=-w,ye=0,ee=-2*w;switch(p){case"left":R=-w,ne=0,ye=2*w,ee=0;break;case"right":R=w,ne=0,ye=-2*w,ee=0;break;case"bottom":ne=w,ee=2*w;break;default:}var ge="M 50,50 m ".concat(R,",").concat(ne,`
|
|
a `).concat(w,",").concat(w," 0 1 1 ").concat(ye,",").concat(-ee,`
|
|
a `).concat(w,",").concat(w," 0 1 1 ").concat(-ye,",").concat(ee),le=Math.PI*2*w,re={stroke:S,strokeDasharray:"".concat(A/100*(le-s),"px ").concat(le,"px"),strokeDashoffset:"-".concat(s/2+P/100*(le-s),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ge,pathStyle:re}}var F=function(A){var S=A.prefixCls,c=A.strokeWidth,s=A.trailWidth,p=A.gapDegree,w=A.gapPosition,R=A.trailColor,ne=A.strokeLinecap,ye=A.style,ee=A.className,ge=A.strokeColor,le=A.percent,re=he(A,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),H=Object(U.useMemo)(function(){return Oe+=1,Oe},[]),J=q(0,100,R,c,p,w),m=J.pathString,O=J.pathStyle,v=b(le),Q=b(ge),de=Q.find(function(De){return Object.prototype.toString.call(De)==="[object Object]"}),K=V(v),fe=te(K,1),Te=fe[0],Ne=function(){var Ce=0;return v.map(function(Se,Je){var Ge=Q[Je]||Q[Q.length-1],Ye=Object.prototype.toString.call(Ge)==="[object Object]"?"url(#".concat(S,"-gradient-").concat(H,")"):"",Ke=q(Ce,Se,Ge,c,p,w);return Ce+=Se,me.a.createElement("path",{key:Je,className:"".concat(S,"-circle-path"),d:Ke.pathString,stroke:Ye,strokeLinecap:ne,strokeWidth:c,opacity:Se===0?0:1,fillOpacity:"0",style:Ke.pathStyle,ref:Te[Je]})})};return me.a.createElement("svg",se({className:ke()("".concat(S,"-circle"),ee),viewBox:"0 0 100 100",style:ye},re),de&&me.a.createElement("defs",null,me.a.createElement("linearGradient",{id:"".concat(S,"-gradient-").concat(H),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(de).sort(function(De,Ce){return ae(De)-ae(Ce)}).map(function(De,Ce){return me.a.createElement("stop",{key:Ce,offset:De,stopColor:de[De]})}))),me.a.createElement("path",{className:"".concat(S,"-circle-trail"),d:m,stroke:R,strokeLinecap:ne,strokeWidth:s||c,fillOpacity:"0",style:O}),Ne().reverse())};F.defaultProps=xe;var x=F,Z={Line:I,Circle:x}},kSUc:function(ct,$e,k){},lZu9:function(ct,$e,k){(function(U){U(k("VrN/"),k("1eCo"),k("8EBN"))})(function(U){"use strict";U.defineMode("markdown",function(me,oe){var ke=U.getMode(me,"text/html"),xe=ke.name=="null";function V(c){if(U.findModeByName){var s=U.findModeByName(c);s&&(c=s.mime||s.mimes[0])}var p=U.getMode(me,c);return p.name=="null"?null:p}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var N={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 D in N)N.hasOwnProperty(D)&&oe.tokenTypeOverrides[D]&&(N[D]=oe.tokenTypeOverrides[D]);var L=/^([*\-_])(?:\s*\1){2,}\s*$/,W=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,B=/^\[(x| )\](?=\s)/i,$=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,we=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ie=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,j=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function te(c,s,p){return s.f=s.inline=p,p(c,s)}function Ae(c,s,p){return s.f=s.block=p,p(c,s)}function He(c){return!c||!/\S/.test(c.string)}function ce(c){if(c.linkTitle=!1,c.linkHref=!1,c.linkText=!1,c.em=!1,c.strong=!1,c.strikethrough=!1,c.quote=0,c.indentedCode=!1,c.f==je){var s=xe;if(!s){var p=U.innerMode(ke,c.htmlState);s=p.mode.name=="xml"&&p.state.tagStart===null&&!p.state.context&&p.state.tokenize.isInText}s&&(c.f=ae,c.block=_e,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function _e(c,s){var p=c.column()===s.indentation,w=He(s.prevLine.stream),R=s.indentedCode,ne=s.prevLine.hr,ye=s.list!==!1,ee=(s.listStack[s.listStack.length-1]||0)+3;s.indentedCode=!1;var ge=s.indentation;if(s.indentationDiff===null&&(s.indentationDiff=s.indentation,ye)){for(s.list=null;ge<s.listStack[s.listStack.length-1];)s.listStack.pop(),s.listStack.length?s.indentation=s.listStack[s.listStack.length-1]:s.list=!1;s.list!==!1&&(s.indentationDiff=ge-s.listStack[s.listStack.length-1])}var le=!w&&!ne&&!s.prevLine.header&&(!ye||!R)&&!s.prevLine.fencedCodeEnd,re=(s.list===!1||ne||w)&&s.indentation<=ee&&c.match(L),H=null;if(s.indentationDiff>=4&&(R||s.prevLine.fencedCodeEnd||s.prevLine.header||w))return c.skipToEnd(),s.indentedCode=!0,N.code;if(c.eatSpace())return null;if(p&&s.indentation<=ee&&(H=c.match($))&&H[1].length<=6)return s.quote=0,s.header=H[1].length,s.thisLine.header=!0,oe.highlightFormatting&&(s.formatting="header"),s.f=s.inline,pe(s);if(s.indentation<=ee&&c.eat(">"))return s.quote=p?1:s.quote+1,oe.highlightFormatting&&(s.formatting="quote"),c.eatSpace(),pe(s);if(!re&&!s.setext&&p&&s.indentation<=ee&&(H=c.match(W))){var J=H[1]?"ol":"ul";return s.indentation=ge+c.current().length,s.list=!0,s.quote=0,s.listStack.push(s.indentation),s.em=!1,s.strong=!1,s.code=!1,s.strikethrough=!1,oe.taskLists&&c.match(B,!1)&&(s.taskList=!0),s.f=s.inline,oe.highlightFormatting&&(s.formatting=["list","list-"+J]),pe(s)}else{if(p&&s.indentation<=ee&&(H=c.match(z,!0)))return s.quote=0,s.fencedEndRE=new RegExp(H[1]+"+ *$"),s.localMode=oe.fencedCodeBlockHighlighting&&V(H[2]||oe.fencedCodeBlockDefaultMode),s.localMode&&(s.localState=U.startState(s.localMode)),s.f=s.block=he,oe.highlightFormatting&&(s.formatting="code-block"),s.code=-1,pe(s);if(s.setext||(!le||!ye)&&!s.quote&&s.list===!1&&!s.code&&!re&&!j.test(c.string)&&(H=c.lookAhead(1))&&(H=H.match(we)))return s.setext?(s.header=s.setext,s.setext=0,c.skipToEnd(),oe.highlightFormatting&&(s.formatting="header")):(s.header=H[0].charAt(0)=="="?1:2,s.setext=s.header),s.thisLine.header=!0,s.f=s.inline,pe(s);if(re)return c.skipToEnd(),s.hr=!0,s.thisLine.hr=!0,N.hr;if(c.peek()==="[")return te(c,s,Z)}return te(c,s,s.inline)}function je(c,s){var p=ke.token(c,s.htmlState);if(!xe){var w=U.innerMode(ke,s.htmlState);(w.mode.name=="xml"&&w.state.tagStart===null&&!w.state.context&&w.state.tokenize.isInText||s.md_inside&&c.current().indexOf(">")>-1)&&(s.f=ae,s.block=_e,s.htmlState=null)}return p}function he(c,s){var p=s.listStack[s.listStack.length-1]||0,w=s.indentation<p,R=p+3;if(s.fencedEndRE&&s.indentation<=R&&(w||c.match(s.fencedEndRE))){oe.highlightFormatting&&(s.formatting="code-block");var ne;return w||(ne=pe(s)),s.localMode=s.localState=null,s.block=_e,s.f=ae,s.fencedEndRE=null,s.code=0,s.thisLine.fencedCodeEnd=!0,w?Ae(c,s,s.block):ne}else return s.localMode?s.localMode.token(c,s.localState):(c.skipToEnd(),N.code)}function pe(c){var s=[];if(c.formatting){s.push(N.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var p=0;p<c.formatting.length;p++)s.push(N.formatting+"-"+c.formatting[p]),c.formatting[p]==="header"&&s.push(N.formatting+"-"+c.formatting[p]+"-"+c.header),c.formatting[p]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=c.quote?s.push(N.formatting+"-"+c.formatting[p]+"-"+c.quote):s.push("error"))}if(c.taskOpen)return s.push("meta"),s.length?s.join(" "):null;if(c.taskClosed)return s.push("property"),s.length?s.join(" "):null;if(c.linkHref?s.push(N.linkHref,"url"):(c.strong&&s.push(N.strong),c.em&&s.push(N.em),c.strikethrough&&s.push(N.strikethrough),c.emoji&&s.push(N.emoji),c.linkText&&s.push(N.linkText),c.code&&s.push(N.code),c.image&&s.push(N.image),c.imageAltText&&s.push(N.imageAltText,"link"),c.imageMarker&&s.push(N.imageMarker)),c.header&&s.push(N.header,N.header+"-"+c.header),c.quote&&(s.push(N.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=c.quote?s.push(N.quote+"-"+c.quote):s.push(N.quote+"-"+oe.maxBlockquoteDepth)),c.list!==!1){var w=(c.listStack.length-1)%3;w?w===1?s.push(N.list2):s.push(N.list3):s.push(N.list1)}return c.trailingSpaceNewLine?s.push("trailing-space-new-line"):c.trailingSpace&&s.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),s.length?s.join(" "):null}function Oe(c,s){return c.match(ie,!0)?pe(s):void 0}function ae(c,s){var p=s.text(c,s);if(typeof p!="undefined")return p;if(s.list)return s.list=null,pe(s);if(s.taskList){var w=c.match(B,!0)[1]===" ";return w?s.taskOpen=!0:s.taskClosed=!0,oe.highlightFormatting&&(s.formatting="task"),s.taskList=!1,pe(s)}if(s.taskOpen=!1,s.taskClosed=!1,s.header&&c.match(/^#+$/,!0))return oe.highlightFormatting&&(s.formatting="header"),pe(s);var R=c.next();if(s.linkTitle){s.linkTitle=!1;var ne=R;R==="("&&(ne=")"),ne=(ne+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+ne+"\\\\]+|\\\\\\\\|\\\\.)"+ne;if(c.match(new RegExp(ye),!0))return N.linkHref}if(R==="`"){var ee=s.formatting;oe.highlightFormatting&&(s.formatting="code"),c.eatWhile("`");var ge=c.current().length;if(s.code==0&&(!s.quote||ge==1))return s.code=ge,pe(s);if(ge==s.code){var le=pe(s);return s.code=0,le}else return s.formatting=ee,pe(s)}else if(s.code)return pe(s);if(R==="\\"&&(c.next(),oe.highlightFormatting)){var re=pe(s),H=N.formatting+"-escape";return re?re+" "+H:H}if(R==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return s.imageMarker=!0,s.image=!0,oe.highlightFormatting&&(s.formatting="image"),pe(s);if(R==="["&&s.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return s.imageMarker=!1,s.imageAltText=!0,oe.highlightFormatting&&(s.formatting="image"),pe(s);if(R==="]"&&s.imageAltText){oe.highlightFormatting&&(s.formatting="image");var re=pe(s);return s.imageAltText=!1,s.image=!1,s.inline=s.f=q,re}if(R==="["&&!s.image)return s.linkText&&c.match(/^.*?\]/)||(s.linkText=!0,oe.highlightFormatting&&(s.formatting="link")),pe(s);if(R==="]"&&s.linkText){oe.highlightFormatting&&(s.formatting="link");var re=pe(s);return s.linkText=!1,s.inline=s.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?q:ae,re}if(R==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,oe.highlightFormatting&&(s.formatting="link");var re=pe(s);return re?re+=" ":re="",re+N.linkInline}if(R==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,oe.highlightFormatting&&(s.formatting="link");var re=pe(s);return re?re+=" ":re="",re+N.linkEmail}if(oe.xml&&R==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var J=c.string.indexOf(">",c.pos);if(J!=-1){var m=c.string.substring(c.start,J);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(m)&&(s.md_inside=!0)}return c.backUp(1),s.htmlState=U.startState(ke),Ae(c,s,je)}if(oe.xml&&R==="<"&&c.match(/^\/\w*?>/))return s.md_inside=!1,"tag";if(R==="*"||R==="_"){for(var O=1,v=c.pos==1?" ":c.string.charAt(c.pos-2);O<3&&c.eat(R);)O++;var Q=c.peek()||" ",de=!/\s/.test(Q)&&(!I.test(Q)||/\s/.test(v)||I.test(v)),K=!/\s/.test(v)&&(!I.test(v)||/\s/.test(Q)||I.test(Q)),fe=null,Te=null;if(O%2&&(!s.em&&de&&(R==="*"||!K||I.test(v))?fe=!0:s.em==R&&K&&(R==="*"||!de||I.test(Q))&&(fe=!1)),O>1&&(!s.strong&&de&&(R==="*"||!K||I.test(v))?Te=!0:s.strong==R&&K&&(R==="*"||!de||I.test(Q))&&(Te=!1)),Te!=null||fe!=null){oe.highlightFormatting&&(s.formatting=fe==null?"strong":Te==null?"em":"strong em"),fe===!0&&(s.em=R),Te===!0&&(s.strong=R);var le=pe(s);return fe===!1&&(s.em=!1),Te===!1&&(s.strong=!1),le}}else if(R===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return pe(s);c.backUp(1)}if(oe.strikethrough){if(R==="~"&&c.eatWhile(R)){if(s.strikethrough){oe.highlightFormatting&&(s.formatting="strikethrough");var le=pe(s);return s.strikethrough=!1,le}else if(c.match(/^[^\s]/,!1))return s.strikethrough=!0,oe.highlightFormatting&&(s.formatting="strikethrough"),pe(s)}else if(R===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return pe(s);c.backUp(2)}}if(oe.emoji&&R===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){s.emoji=!0,oe.highlightFormatting&&(s.formatting="emoji");var Ne=pe(s);return s.emoji=!1,Ne}return R===" "&&(c.match(/^ +$/,!1)?s.trailingSpace++:s.trailingSpace&&(s.trailingSpaceNewLine=!0)),pe(s)}function b(c,s){var p=c.next();if(p===">"){s.f=s.inline=ae,oe.highlightFormatting&&(s.formatting="link");var w=pe(s);return w?w+=" ":w="",w+N.linkInline}return c.match(/^[^>]+/,!0),N.linkInline}function q(c,s){if(c.eatSpace())return null;var p=c.next();return p==="("||p==="["?(s.f=s.inline=x(p==="("?")":"]"),oe.highlightFormatting&&(s.formatting="link-string"),s.linkHref=!0,pe(s)):"error"}var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function x(c){return function(s,p){var w=s.next();if(w===c){p.f=p.inline=ae,oe.highlightFormatting&&(p.formatting="link-string");var R=pe(p);return p.linkHref=!1,R}return s.match(F[c]),p.linkHref=!0,pe(p)}}function Z(c,s){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(s.f=P,c.next(),oe.highlightFormatting&&(s.formatting="link"),s.linkText=!0,pe(s)):te(c,s,ae)}function P(c,s){if(c.match(/^\]:/,!0)){s.f=s.inline=A,oe.highlightFormatting&&(s.formatting="link");var p=pe(s);return s.linkText=!1,p}return c.match(/^([^\]\\]|\\.)+/,!0),N.linkText}function A(c,s){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?s.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),s.f=s.inline=ae,N.linkHref+" url")}var S={startState:function(){return{f:_e,prevLine:{stream:null},thisLine:{stream:null},block:_e,htmlState:null,indentation:0,inline:ae,text:Oe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(c){return{f:c.f,prevLine:c.prevLine,thisLine:c.thisLine,block:c.block,htmlState:c.htmlState&&U.copyState(ke,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?U.copyState(c.localMode,c.localState):null,inline:c.inline,text:c.text,formatting:!1,linkText:c.linkText,linkTitle:c.linkTitle,linkHref:c.linkHref,code:c.code,em:c.em,strong:c.strong,strikethrough:c.strikethrough,emoji:c.emoji,header:c.header,setext:c.setext,hr:c.hr,taskList:c.taskList,list:c.list,listStack:c.listStack.slice(0),quote:c.quote,indentedCode:c.indentedCode,trailingSpace:c.trailingSpace,trailingSpaceNewLine:c.trailingSpaceNewLine,md_inside:c.md_inside,fencedEndRE:c.fencedEndRE}},token:function(c,s){if(s.formatting=!1,c!=s.thisLine.stream){if(s.header=0,s.hr=!1,c.match(/^\s*$/,!0))return ce(s),null;if(s.prevLine=s.thisLine,s.thisLine={stream:c},s.taskList=!1,s.trailingSpace=0,s.trailingSpaceNewLine=!1,!s.localState&&(s.f=s.block,s.f!=je)){var p=c.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(s.indentation=p,s.indentationDiff=null,p>0)return null}}return s.f(c,s)},innerMode:function(c){return c.block==je?{state:c.htmlState,mode:ke}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:S}},indent:function(c,s,p){return c.block==je&&ke.indent?ke.indent(c.htmlState,s,p):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,s,p):U.Pass},blankLine:ce,getType:pe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return S},"xml"),U.defineMIME("text/markdown","markdown"),U.defineMIME("text/x-markdown","markdown")})},osHv:function(ct,$e,k){(function(U){U(k("VrN/"))})(function(U){"use strict";var me=U.Pos;function oe(I,se){return I.line-se.line||I.ch-se.ch}var ke="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",xe=ke+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",V=new RegExp("<(/?)(["+ke+"]["+xe+"]*)","g");function N(I,se,te,Ae){this.line=se,this.ch=te,this.cm=I,this.text=I.getLine(se),this.min=Ae?Math.max(Ae.from,I.firstLine()):I.firstLine(),this.max=Ae?Math.min(Ae.to-1,I.lastLine()):I.lastLine()}function D(I,se){var te=I.cm.getTokenTypeAt(me(I.line,se));return te&&/\btag\b/.test(te)}function L(I){return I.line>=I.max?void 0:(I.ch=0,I.text=I.cm.getLine(++I.line),!0)}function W(I){return I.line<=I.min?void 0:(I.text=I.cm.getLine(--I.line),I.ch=I.text.length,!0)}function B(I){for(;;){var se=I.text.indexOf(">",I.ch);if(se==-1){if(L(I))continue;return}if(!D(I,se+1)){I.ch=se+1;continue}var te=I.text.lastIndexOf("/",se),Ae=te>-1&&!/\S/.test(I.text.slice(te+1,se));return I.ch=se+1,Ae?"selfClose":"regular"}}function $(I){for(;;){var se=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(se==-1){if(W(I))continue;return}if(!D(I,se+1)){I.ch=se;continue}V.lastIndex=se,I.ch=se;var te=V.exec(I.text);if(te&&te.index==se)return te}}function we(I){for(;;){V.lastIndex=I.ch;var se=V.exec(I.text);if(!se){if(L(I))continue;return}if(!D(I,se.index+1)){I.ch=se.index+1;continue}return I.ch=se.index+se[0].length,se}}function ie(I){for(;;){var se=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(se==-1){if(W(I))continue;return}if(!D(I,se+1)){I.ch=se;continue}var te=I.text.lastIndexOf("/",se),Ae=te>-1&&!/\S/.test(I.text.slice(te+1,se));return I.ch=se+1,Ae?"selfClose":"regular"}}function z(I,se){for(var te=[];;){var Ae=we(I),He,ce=I.line,_e=I.ch-(Ae?Ae[0].length:0);if(!Ae||!(He=B(I)))return;if(He=="selfClose")continue;if(Ae[1]){for(var je=te.length-1;je>=0;--je)if(te[je]==Ae[2]){te.length=je;break}if(je<0&&(!se||se==Ae[2]))return{tag:Ae[2],from:me(ce,_e),to:me(I.line,I.ch)}}else te.push(Ae[2])}}function j(I,se){for(var te=[];;){var Ae=ie(I);if(!Ae)return;if(Ae=="selfClose"){$(I);continue}var He=I.line,ce=I.ch,_e=$(I);if(!_e)return;if(_e[1])te.push(_e[2]);else{for(var je=te.length-1;je>=0;--je)if(te[je]==_e[2]){te.length=je;break}if(je<0&&(!se||se==_e[2]))return{tag:_e[2],from:me(I.line,I.ch),to:me(He,ce)}}}}U.registerHelper("fold","xml",function(I,se){for(var te=new N(I,se.line,0);;){var Ae=we(te);if(!Ae||te.line!=se.line)return;var He=B(te);if(!He)return;if(!Ae[1]&&He!="selfClose"){var ce=me(te.line,te.ch),_e=z(te,Ae[2]);return _e&&oe(_e.from,ce)>0?{from:ce,to:_e.from}:null}}}),U.findMatchingTag=function(I,se,te){var Ae=new N(I,se.line,se.ch,te);if(Ae.text.indexOf(">")==-1&&Ae.text.indexOf("<")==-1)return;var He=B(Ae),ce=He&&me(Ae.line,Ae.ch),_e=He&&$(Ae);if(!He||!_e||oe(Ae,se)>0)return;var je={from:me(Ae.line,Ae.ch),to:ce,tag:_e[2]};return He=="selfClose"?{open:je,close:null,at:"open"}:_e[1]?{open:j(Ae,_e[2]),close:je,at:"close"}:(Ae=new N(I,ce.line,ce.ch,te),{open:je,close:z(Ae,_e[2]),at:"open"})},U.findEnclosingTag=function(I,se,te,Ae){for(var He=new N(I,se.line,se.ch,te);;){var ce=j(He,Ae);if(!ce)break;var _e=new N(I,se.line,se.ch,te),je=z(_e,ce.tag);if(je)return{open:ce,close:je}}},U.scanForClosingTag=function(I,se,te,Ae){var He=new N(I,se.line,se.ch,Ae?{from:0,to:Ae}:null);return z(He,te)}})},p5ED:function(ct,$e,k){"use strict";var U=k("+L6B"),me=k("2/Rp"),oe=k("5Dmo"),ke=k("3S7+"),xe=k("k1fw"),V=k("tJVT"),N=k("q1tI"),D=k.n(N),L=k("vHTk"),W=k.n(L),B=k("yEEn"),$=k("ZW9T"),we=k("1vsH");$e.a=function(ie){var z=ie.name,j=ie.data,I=ie.theme,se=ie.type,te=ie.filename,Ae=ie.monacoEditor,He=ie.className,ce=ie.style,_e=ie.close,je=ie.onClose,he=ie.hasMask,pe=Object(N.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Oe=Object(V.a)(pe,2),ae=Oe[0],b=Oe[1],q=Object(N.useState)(""),F=Object(V.a)(q,2),x=F[0],Z=F[1],P=Object(N.useRef)();te&&(Ae.filename=te),Object(N.useEffect)(function(){var c,s,p=(c=document.cookie)===null||c===void 0||((s=c.replace(/\s/g,""))===null||s===void 0)?void 0:s.split(";");p==null||p.map(function(w){var R=w.split("=");R[0]==="_educoder_session"&&Z(R[1])})},[]);var A=function(){if(j.startsWith("http")||j.startsWith("/")){S();return}Object(we.x)(te||"educoder",j,te)},S=function(){Object(we.v)(te||z,j)};return console.log("data:",j,"fileanme:",te," name:",z),D.a.createElement("div",{style:Object(xe.a)({},ce||{}),className:"".concat(he&&W.a.bgBlack," ").concat(se?W.a.wrp:"hide")},_e&&D.a.createElement("div",{className:W.a.close,ref:P},D.a.createElement(ke.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return P.current}},D.a.createElement("span",{onClick:S},D.a.createElement("i",{className:"icon-quxiaozhiding"}))),D.a.createElement(ke.a,{title:"\u5173\u95ED",getPopupContainer:function(){return P.current}},D.a.createElement("span",{className:"",onClick:je},D.a.createElement("i",{className:"icon-guanbi1"})))),D.a.createElement("div",{className:"".concat(W.a[He]," ").concat(He," ").concat(W.a.monaco," ").concat(se==="txt"?"show":"hide")},se==="txt"&&D.a.createElement($.b,Ae)),se==="audio"&&D.a.createElement("audio",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?j:"data:audio/mp3;base64,").concat(j),autoPlay:!0}),se==="video"&&D.a.createElement(D.a.Fragment,null,j!=null&&j.startsWith("/")?D.a.createElement("video",{controls:!0,src:"".concat(j),autoPlay:!0}):D.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(j),autoPlay:!0})),se==="pdf"&&D.a.createElement("embed",{className:W.a.embed,src:j}),se==="image"&&D.a.createElement(D.a.Fragment,null,D.a.createElement("img",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(j)})),se==="other"&&D.a.createElement("div",null,D.a.createElement(me.a,{type:"primary",size:"large",onClick:A},D.a.createElement(B.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(se==="download"||se==="office")&&D.a.createElement(me.a,{type:"primary",size:"large",onClick:A},D.a.createElement(B.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ct,$e,k){},"rAM+":function(ct,$e,k){"use strict";k.d($e,"a",function(){return me});var U=k("Qw5x");function me(oe,ke){var xe;if(typeof Symbol=="undefined"||oe[Symbol.iterator]==null){if(Array.isArray(oe)||(xe=Object(U.a)(oe))||ke&&oe&&typeof oe.length=="number"){xe&&(oe=xe);var V=0,N=function(){};return{s:N,n:function(){return V>=oe.length?{done:!0}:{done:!1,value:oe[V++]}},e:function($){throw $},f:N}}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 D=!0,L=!1,W;return{s:function(){xe=oe[Symbol.iterator]()},n:function(){var $=xe.next();return D=$.done,$},e:function($){L=!0,W=$},f:function(){try{!D&&xe.return!=null&&xe.return()}finally{if(L)throw W}}}}},rUJ1:function(ct,$e){const k=/[&<>"']/,U=/[&<>"']/g,me=/[<>"']|&(?!#?\w+;)/,oe=/[<>"']|&(?!#?\w+;)/g,ke={"&":"&","<":"<",">":">",'"':""","'":"'"},xe=he=>ke[he];function V(he,pe){if(pe){if(k.test(he))return he.replace(U,xe)}else if(me.test(he))return he.replace(oe,xe);return he}const N=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function D(he){return he.replace(N,(pe,Oe)=>(Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""))}const L=/(^|[^\[])\^/g;function W(he,pe){he=he.source||he,pe=pe||"";const Oe={replace:(ae,b)=>(b=b.source||b,b=b.replace(L,"$1"),he=he.replace(ae,b),Oe),getRegex:()=>new RegExp(he,pe)};return Oe}const B=/[^\w:]/g,$=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function we(he,pe,Oe){if(he){let ae;try{ae=decodeURIComponent(D(Oe)).replace(B,"").toLowerCase()}catch(b){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}pe&&!$.test(Oe)&&(Oe=se(pe,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ae){return null}return Oe}const ie={},z=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function se(he,pe){ie[" "+he]||(z.test(he)?ie[" "+he]=he+"/":ie[" "+he]=ce(he,"/",!0)),he=ie[" "+he];const Oe=he.indexOf(":")===-1;return pe.substring(0,2)==="//"?Oe?pe:he.replace(j,"$1")+pe:pe.charAt(0)==="/"?Oe?pe:he.replace(I,"$1")+pe:he+pe}const te={exec:function(){}};function Ae(he){let pe=1,Oe,ae;for(;pe<arguments.length;pe++){Oe=arguments[pe];for(ae in Oe)Object.prototype.hasOwnProperty.call(Oe,ae)&&(he[ae]=Oe[ae])}return he}function He(he,pe){const Oe=he.replace(/\|/g,(q,F,x)=>{let Z=!1,P=F;for(;--P>=0&&x[P]==="\\";)Z=!Z;return Z?"|":" |"}),ae=Oe.split(/ \|/);let b=0;if(ae.length>pe)ae.splice(pe);else for(;ae.length<pe;)ae.push("");for(;b<ae.length;b++)ae[b]=ae[b].trim().replace(/\\\|/g,"|");return ae}function ce(he,pe,Oe){const ae=he.length;if(ae===0)return"";let b=0;for(;b<ae;){const q=he.charAt(ae-b-1);if(q===pe&&!Oe)b++;else if(q!==pe&&Oe)b++;else break}return he.substr(0,ae-b)}function _e(he,pe){if(he.indexOf(pe[1])===-1)return-1;const Oe=he.length;let ae=0,b=0;for(;b<Oe;b++)if(he[b]==="\\")b++;else if(he[b]===pe[0])ae++;else if(he[b]===pe[1]&&(ae--,ae<0))return b;return-1}function je(he){he&&he.sanitize&&!he.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")}ct.exports={escape:V,unescape:D,edit:W,cleanUrl:we,resolveUrl:se,noopTest:te,merge:Ae,splitCells:He,rtrim:ce,findClosingBracket:_e,checkSanitizeDeprecation:je}},vHTk:function(ct,$e,k){ct.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);
|