You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__MoopCases__FormPanel.7b9...

122 lines
412 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[162,6,7],{"+NIl":function(ft,Xe,w){(function(I){I(w("VrN/"))})(function(I){"use strict";I.defineMode("stex",function(ve,re){"use strict";function Ee(se,B){se.cmdState.push(B)}function ye(se){return se.cmdState.length>0?se.cmdState[se.cmdState.length-1]:null}function $(se){var B=se.cmdState.pop();B&&B.closeBracket()}function M(se){for(var B=se.cmdState,j=B.length-1;j>=0;j--){var F=B[j];if(F.name=="DEFAULT")continue;return F}return{styleIdentifier:function(){return null}}}function L(se,B,j){return function(){this.name=se,this.bracketNo=0,this.style=B,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 y={};y.importmodule=L("importmodule","tag",["string","builtin"]),y.documentclass=L("documentclass","tag",["","atom"]),y.usepackage=L("usepackage","tag",["atom"]),y.begin=L("begin","tag",["atom"]),y.end=L("end","tag",["atom"]),y.label=L("label","tag",["atom"]),y.ref=L("ref","tag",["atom"]),y.eqref=L("eqref","tag",["atom"]),y.cite=L("cite","tag",["atom"]),y.bibitem=L("bibitem","tag",["atom"]),y.Bibitem=L("Bibitem","tag",["atom"]),y.RBibitem=L("RBibitem","tag",["atom"]),y.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function X(se,B){se.f=B}function V(se,B){var j;if(se.match(/^\\[a-zA-Z@]+/)){var F=se.current().slice(1);return j=y.hasOwnProperty(F)?y[F]:y.DEFAULT,j=new j,Ee(B,j),X(B,Ce),j.style}if(se.match(/^\\[$&%#{}_]/))return"tag";if(se.match(/^\\[,;!\/\\]/))return"tag";if(se.match("\\["))return X(B,function(oe,Me){return ae(oe,Me,"\\]")}),"keyword";if(se.match("\\("))return X(B,function(oe,Me){return ae(oe,Me,"\\)")}),"keyword";if(se.match("$$"))return X(B,function(oe,Me){return ae(oe,Me,"$$")}),"keyword";if(se.match("$"))return X(B,function(oe,Me){return ae(oe,Me,"$")}),"keyword";var le=se.next();if(le=="%")return se.skipToEnd(),"comment";if(le=="}"||le=="]"){if(j=ye(B),j)j.closeBracket(le),X(B,Ce);else return"error";return"bracket"}else return le=="{"||le=="["?(j=y.DEFAULT,j=new j,Ee(B,j),"bracket"):/\d/.test(le)?(se.eatWhile(/[\w.%]/),"atom"):(se.eatWhile(/[\w\-_]/),j=M(B),j.name=="begin"&&(j.argument=se.current()),j.styleIdentifier())}function ae(se,B,j){if(se.eatSpace())return null;if(j&&se.match(j))return X(B,V),"keyword";if(se.match(/^\\[a-zA-Z@]+/))return"tag";if(se.match(/^[a-zA-Z]+/))return"variable-2";if(se.match(/^\\[$&%#{}_]/))return"tag";if(se.match(/^\\[,;!\/]/))return"tag";if(se.match(/^[\^_&]/))return"tag";if(se.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(se.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var F=se.next();return F=="{"||F=="}"||F=="["||F=="]"||F=="("||F==")"?"bracket":F=="%"?(se.skipToEnd(),"comment"):"error"}function Ce(se,B){var j=se.peek(),F;return j=="{"||j=="["?(F=ye(B),F.openBracket(j),se.eat(j),X(B,V),"bracket"):/[ \t\r]/.test(j)?(se.eat(j),null):(X(B,V),$(B),V(se,B))}return{startState:function(){var se=re.inMathMode?function(B,j){return ae(B,j)}:V;return{cmdState:[],f:se}},copyState:function(se){return{cmdState:se.cmdState.slice(),f:se.f}},token:function(se,B){return B.f(se,B)},blankLine:function(se){se.f=V,se.cmdState.length=0},lineComment:"%"}}),I.defineMIME("text/x-stex","stex"),I.defineMIME("text/x-latex","stex")})},"19Vz":function(ft,Xe,w){(function(I){I(w("VrN/"))})(function(I){I.defineOption("placeholder","",function(L,y,X){var V=X&&X!=I.Init;if(y&&!V)L.on("blur",ye),L.on("change",$),L.on("swapDoc",$),I.on(L.getInputField(),"compositionupdate",L.state.placeholderCompose=function(){Ee(L)}),$(L);else if(!y&&V){L.off("blur",ye),L.off("change",$),L.off("swapDoc",$),I.off(L.getInputField(),"compositionupdate",L.state.placeholderCompose),ve(L);var ae=L.getWrapperElement();ae.className=ae.className.replace(" CodeMirror-empty","")}y&&!L.hasFocus()&&ye(L)});function ve(L){L.state.placeholder&&(L.state.placeholder.parentNode.removeChild(L.state.placeholder),L.state.placeholder=null)}function re(L){ve(L);var y=L.state.placeholder=document.createElement("pre");y.style.cssText="height: 0; overflow: visible",y.style.direction=L.getOption("direction"),y.className="CodeMirror-placeholder CodeMirror-line-like";var X=L.getOption("placeholder");typeof X=="string"&&(X=document.createTextNode(X)),y.appendChild(X),L.display.lineSpace.insertBefore(y,L.display.lineSpace.firstChild)}function Ee(L){setTimeout(function(){var y=!1,X=L.getInputField();X.nodeName=="TEXTAREA"?y=!X.value:L.lineCount()==1&&(y=!/[^\u200b]/.test(X.querySelector(".CodeMirror-line").textContent)),y?re(L):ve(L)},20)}function ye(L){M(L)&&re(L)}function $(L){var y=L.getWrapperElement(),X=M(L);y.className=y.className.replace(" CodeMirror-empty","")+(X?" CodeMirror-empty":""),X?re(L):ve(L)}function M(L){return L.lineCount()===1&&L.getLine(0)===""}})},"1eCo":function(ft,Xe,w){(function(I){I(w("VrN/"))})(function(I){"use strict";var ve={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},re={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};I.defineMode("xml",function(Ee,ye){var $=Ee.indentUnit,M={},L=ye.htmlMode?ve:re;for(var y in L)M[y]=L[y];for(var y in ye)M[y]=ye[y];var X,V;function ae(b,K){function G(N){return K.tokenize=N,N(b,K)}var E=b.next();if(E=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?G(B("atom","]]>")):null:b.match("--")?G(B("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),G(j(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),K.tokenize=B("meta","?>"),"meta"):(X=b.eat("/")?"closeTag":"openTag",K.tokenize=Ce,"tag bracket");if(E=="&"){var q;return b.eat("#")?b.eat("x")?q=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):q=b.eatWhile(/[\d]/)&&b.eat(";"):q=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),q?"atom":"error"}else return b.eatWhile(/[^&<]/),null}ae.isInText=!0;function Ce(b,K){var G=b.next();if(G==">"||G=="/"&&b.eat(">"))return K.tokenize=ae,X=G==">"?"endTag":"selfcloseTag","tag bracket";if(G=="=")return X="equals",null;if(G=="<"){K.tokenize=ae,K.state=Me,K.tagName=K.tagStart=null;var E=K.tokenize(b,K);return E?E+" tag error":"tag error"}else return/[\'\"]/.test(G)?(K.tokenize=se(G),K.stringStartCol=b.column(),K.tokenize(b,K)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function se(b){var K=function(G,E){for(;!G.eol();)if(G.next()==b){E.tokenize=Ce;break}return"string"};return K.isInAttribute=!0,K}function B(b,K){return function(G,E){for(;!G.eol();){if(G.match(K)){E.tokenize=ae;break}G.next()}return b}}function j(b){return function(K,G){for(var E;(E=K.next())!=null;){if(E=="<")return G.tokenize=j(b+1),G.tokenize(K,G);if(E==">")if(b==1){G.tokenize=ae;break}else return G.tokenize=j(b-1),G.tokenize(K,G)}return"meta"}}function F(b,K,G){this.prev=b.context,this.tagName=K,this.indent=b.indented,this.startOfLine=G,(M.doNotIndent.hasOwnProperty(K)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function le(b){b.context&&(b.context=b.context.prev)}function oe(b,K){for(var G;;){if(!b.context)return;if(G=b.context.tagName,!M.contextGrabbers.hasOwnProperty(G)||!M.contextGrabbers[G].hasOwnProperty(K))return;le(b)}}function Me(b,K,G){return b=="openTag"?(G.tagStart=K.column(),We):b=="closeTag"?he:Me}function We(b,K,G){return b=="word"?(G.tagName=K.current(),V="tag",be):M.allowMissingTagName&&b=="endTag"?(V="tag bracket",be(b,K,G)):(V="error",We)}function he(b,K,G){if(b=="word"){var E=K.current();return G.context&&G.context.tagName!=E&&M.implicitlyClosed.hasOwnProperty(G.context.tagName)&&le(G),G.context&&G.context.tagName==E||M.matchClosing===!1?(V="tag",Te):(V="tag error",Ne)}else return M.allowMissingTagName&&b=="endTag"?(V="tag bracket",Te(b,K,G)):(V="error",Ne)}function Te(b,K,G){return b!="endTag"?(V="error",Te):(le(G),Me)}function Ne(b,K,G){return V="error",Te(b,K,G)}function be(b,K,G){if(b=="word")return V="attribute",me;if(b=="endTag"||b=="selfcloseTag"){var E=G.tagName,q=G.tagStart;return G.tagName=G.tagStart=null,b=="selfcloseTag"||M.autoSelfClosers.hasOwnProperty(E)?oe(G,E):(oe(G,E),G.context=new F(G,E,q==G.indented)),Me}return V="error",be}function me(b,K,G){return b=="equals"?de:(M.allowMissing||(V="error"),be(b,K,G))}function de(b,K,G){return b=="string"?W:b=="word"&&M.allowUnquoted?(V="string",be):(V="error",be(b,K,G))}function W(b,K,G){return b=="string"?W:be(b,K,G)}return{startState:function(b){var K={tokenize:ae,state:Me,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(K.baseIndent=b),K},token:function(b,K){if(!K.tagName&&b.sol()&&(K.indented=b.indentation()),b.eatSpace())return null;X=null;var G=K.tokenize(b,K);return(G||X)&&G!="comment"&&(V=null,K.state=K.state(X||G,b,K),V&&(G=V=="error"?G+" error":V)),G},indent:function(b,K,G){var E=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+$;if(E&&E.noIndent)return I.Pass;if(b.tokenize!=Ce&&b.tokenize!=ae)return G?G.match(/^(\s*)/)[0].length:0;if(b.tagName)return M.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+$*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/<!\[CDATA\[/.test(K))return 0;var q=K&&/^<(\/)?([\w_:\.-]*)/.exec(K);if(q&&q[1])for(;E;)if(E.tagName==q[2]){E=E.prev;break}else if(M.implicitlyClosed.hasOwnProperty(E.tagName))E=E.prev;else break;else if(q)for(;E;){var N=M.contextGrabbers[E.tagName];if(N&&N.hasOwnProperty(q[2]))E=E.prev;else break}for(;E&&E.prev&&!E.startOfLine;)E=E.prev;return E?E.indent+$:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(b){b.state==de&&(b.state=be)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var K=[],G=b.context;G;G=G.prev)G.tagName&&K.push(G.tagName);return K.reverse()}}}),I.defineMIME("text/xml","xml"),I.defineMIME("application/xml","xml"),I.mimeModes.hasOwnProperty("text/html")||I.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"55Ip":function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return oe});var I=w("Ty5D"),ve=w("dI71"),re=w("q1tI"),Ee=w.n(re),ye=w("YS25"),$=w("17x9"),M=w.n($),L=w("wx14"),y=w("zLVn"),X=w("9R94"),V=function(de){Object(ve.a)(W,de);function W(){for(var K,G=arguments.length,E=new Array(G),q=0;q<G;q++)E[q]=arguments[q];return K=de.call.apply(de,[this].concat(E))||this,K.history=Object(ye.a)(K.props),K}var b=W.prototype;return b.render=function(){return Ee.a.createElement(I.c,{history:this.history,children:this.props.children})},W}(Ee.a.Component),ae=function(de){Object(ve.a)(W,de);function W(){for(var K,G=arguments.length,E=new Array(G),q=0;q<G;q++)E[q]=arguments[q];return K=de.call.apply(de,[this].concat(E))||this,K.history=Object(ye.b)(K.props),K}var b=W.prototype;return b.render=function(){return Ee.a.createElement(I.c,{history:this.history,children:this.props.children})},W}(Ee.a.Component),Ce=function(W,b){return typeof W=="function"?W(b):W},se=function(W,b){return typeof W=="string"?Object(ye.c)(W,null,null,b):W},B=function(W){return W},j=Ee.a.forwardRef;typeof j=="undefined"&&(j=B);function F(de){return!!(de.metaKey||de.altKey||de.ctrlKey||de.shiftKey)}var le=j(function(de,W){var b=de.innerRef,K=de.navigate,G=de.onClick,E=Object(y.a)(de,["innerRef","navigate","onClick"]),q=E.target,N=Object(L.a)({},E,{onClick:function(_){try{G&&G(_)}catch(c){throw _.preventDefault(),c}!_.defaultPrevented&&_.button===0&&(!q||q==="_self")&&!F(_)&&(_.preventDefault(),K())}});return B!==j?N.ref=W||b:N.ref=b,Ee.a.createElement("a",N)}),oe=j(function(de,W){var b=de.component,K=b===void 0?le:b,G=de.replace,E=de.to,q=de.innerRef,N=Object(y.a)(de,["component","replace","to","innerRef"]);return Ee.a.createElement(I.e.Consumer,null,function(O){O||Object(X.a)(!1);var _=O.history,c=se(Ce(E,O.location),O.location),l=c?_.createHref(c):"",g=Object(L.a)({},N,{href:l,navigate:function(){var D=Ce(E,O.location),ee=G?_.replace:_.push;ee(D)}});return B!==j?g.ref=W||q:g.innerRef=q,Ee.a.createElement(K,g)})});if(!1)var Me,We;var he=function(W){return W},Te=Ee.a.forwardRef;typeof Te=="undefined"&&(Te=he);function Ne(){for(var de=arguments.length,W=new Array(de),b=0;b<de;b++)W[b]=arguments[b];return W.filter(function(K){return K}).join(" ")}var be=Te(function(de,W){var b=de["aria-current"],K=b===void 0?"page":b,G=de.activeClassName,E=G===void 0?"active":G,q=de.activeStyle,N=de.className,O=de.exact,_=de.isActive,c=de.location,l=de.sensitive,g=de.strict,C=de.style,D=de.to,ee=de.innerRef,we=Object(y.a)(de,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Ee.a.createElement(I.e.Consumer,null,function(ce){ce||Object(X.a)(!1);var ke=c||ce.location,ne=se(Ce(D,ke),ke),ue=ne.pathname,H=ue&&ue.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ie=H?Object(I.f)(ke.pathname,{path:H,exact:O,sensitive:l,strict:g}):null,h=!!(_?_(ie,ke):ie),T=h?Ne(N,E):N,p=h?Object(L.a)({},C,{},q):C,P=Object(L.a)({"aria-current":h&&K||null,className:T,style:p,to:ne},we);return he!==Te?P.ref=W||ee:P.innerRef=ee,Ee.a.createElement(oe,P)})});if(!1)var me},"7ahc":function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return We});var I=w("k1fw"),ve=w("0Owb"),re=w("+L6B"),Ee=w("2/Rp"),ye=w("y8nQ"),$=w("Vl3Y"),M=w("tJVT"),L=w("OaEy"),y=w("2fM7"),X=w("q1tI"),V=w.n(X),ae=w("VrN/"),Ce=w.n(ae),se=w("p77/"),B=w.n(se),j=w("c5Ni"),F=w.n(j),le=y.a.Option,oe={labelCol:{span:4},wrapperCol:{span:20}},Me={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"]};Xe.b=function(he){var Te=he.callback,Ne=he.onCancel,be=Object(X.useState)("python"),me=Object(M.a)(be,2),de=me[0],W=me[1];function b(G){W(Me[G][1])}function K(G){Te(G)}return V.a.createElement($.a,Object(ve.a)({},oe,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:K}),V.a.createElement($.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},V.a.createElement(y.a,{onChange:b},Object.keys(Me).map(function(G){return V.a.createElement(le,{key:G,value:G},Me[G][0])}))),V.a.createElement($.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},V.a.createElement(We,{mode:de})),V.a.createElement("div",{className:"flex-container flex-end"},V.a.createElement(Ee.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),V.a.createElement(Ee.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))};function We(he){var Te=he.value,Ne=he.onChange,be=he.mode,me=he.options,de=me===void 0?{}:me,W=Object(X.useRef)(),b=Object(X.useState)(),K=Object(M.a)(b,2),G=K[0],E=K[1];return Object(X.useEffect)(function(){if(G){function q(N){var O=N.getValue();Ne&&Ne(O)}return G.on("change",q),function(){G.off("change",q)}}},[G,Ne]),Object(X.useEffect)(function(){G&&G.setOption("mode",be)},[G,be]),Object(X.useEffect)(function(){G&&((Te!==G.getValue()||Te==="")&&setTimeout(function(){G.setValue(Te||" ")},300))},[G,Te]),Object(X.useEffect)(function(){if(W.current&&!G){var q=Ce.a.fromTextArea(W.current,Object(I.a)({mode:be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},de));E(q)}},[W.current,G]),V.a.createElement("div",{className:"my-codemirror-container"},V.a.createElement("textarea",{ref:W}))}},"7ixt":function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return re});var I={adjustX:1,adjustY:1},ve=[0,0],re={left:{points:["cr","cl"],overflow:I,offset:[-4,0],targetOffset:ve},right:{points:["cl","cr"],overflow:I,offset:[4,0],targetOffset:ve},top:{points:["bc","tc"],overflow:I,offset:[0,-4],targetOffset:ve},bottom:{points:["tc","bc"],overflow:I,offset:[0,4],targetOffset:ve},topLeft:{points:["bl","tl"],overflow:I,offset:[0,-4],targetOffset:ve},leftTop:{points:["tr","tl"],overflow:I,offset:[-4,0],targetOffset:ve},topRight:{points:["br","tr"],overflow:I,offset:[0,-4],targetOffset:ve},rightTop:{points:["tl","tr"],overflow:I,offset:[4,0],targetOffset:ve},bottomRight:{points:["tr","br"],overflow:I,offset:[0,4],targetOffset:ve},rightBottom:{points:["bl","br"],overflow:I,offset:[4,0],targetOffset:ve},bottomLeft:{points:["tl","bl"],overflow:I,offset:[0,4],targetOffset:ve},leftBottom:{points:["br","bl"],overflow:I,offset:[-4,0],targetOffset:ve}},Ee=re},"8EBN":function(ft,Xe,w){(function(I){I(w("VrN/"))})(function(I){"use strict";I.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 ve=0;ve<I.modeInfo.length;ve++){var re=I.modeInfo[ve];re.mimes&&(re.mime=re.mimes[0])}I.findModeByMIME=function(Ee){Ee=Ee.toLowerCase();for(var ye=0;ye<I.modeInfo.length;ye++){var $=I.modeInfo[ye];if($.mime==Ee)return $;if($.mimes){for(var M=0;M<$.mimes.length;M++)if($.mimes[M]==Ee)return $}}if(/\+xml$/.test(Ee))return I.findModeByMIME("application/xml");if(/\+json$/.test(Ee))return I.findModeByMIME("application/json")},I.findModeByExtension=function(Ee){Ee=Ee.toLowerCase();for(var ye=0;ye<I.modeInfo.length;ye++){var $=I.modeInfo[ye];if($.ext){for(var M=0;M<$.ext.length;M++)if($.ext[M]==Ee)return $}}},I.findModeByFileName=function(Ee){for(var ye=0;ye<I.modeInfo.length;ye++){var $=I.modeInfo[ye];if($.file&&$.file.test(Ee))return $}var M=Ee.lastIndexOf("."),L=M>-1&&Ee.substring(M+1,Ee.length);if(L)return I.findModeByExtension(L)},I.findModeByName=function(Ee){Ee=Ee.toLowerCase();for(var ye=0;ye<I.modeInfo.length;ye++){var $=I.modeInfo[ye];if($.name.toLowerCase()==Ee)return $;if($.alias){for(var M=0;M<$.alias.length;M++)if($.alias[M].toLowerCase()==Ee)return $}}}})},"9Bee":function(ft,Xe,w){"use strict";var I=w("k1fw"),ve=w("tJVT"),re=w("q1tI"),Ee=w.n(re),ye=w("vg9a"),$=w("DlQD"),M=w.n($),L=w("rUJ1");function y(g,C){var D=g.match(/^(\s+)(?:```)/);if(D===null)return C;var ee=D[1];return C.split(`
`).map(function(we){var ce=we.match(/^\s+/);if(ce===null)return we;var ke=Object(ve.a)(ce,1),ne=ke[0];return ne.length>=ee.length?we.slice(ee.length):we}).join(`
`)}var X=[],V=["<ul>"],ae=new M.a.Renderer,Ce=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function se(){X.length=0,V=["<ul>"]}var B={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function j(g,C,D,ee){if(C>=g.length||g[C].level<=D)return C;var we=g[C];ee.push("<li><a href='#"+we.anchor+"'>"+we.text+"</a>"),C++;var ce=[];return C=j(g,C,we.level,ce),ce.length>0&&(ee.push("<ul>"),ce.forEach(function(ke){ee.push(ke)}),ee.push("</ul>")),ee.push("</li>"),C=j(g,C,D,ee),C}function F(){return j(X,0,0,V),V.push("</ul>"),V.join("")}var le={heading:function(C){var D=Ce.exec(C);if(D)return{type:"heading",raw:D[0],depth:D[1].length,text:D[2]}},fences:function(C){var D=this.rules.block.fences.exec(C);if(D){var ee=D[0],we=y(ee,D[3]||""),ce=D[2]?D[2].trim():D[2];if(["latex","katex","math"].indexOf(ce)>=0){var ke=We(),ne=we;we=ke,he[ke]={type:"block",expression:ne}}return{type:"code",raw:ee,lang:ce,text:we}}}},oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Me=0,We=function(){return"__special_katext_id_".concat(Me++,"__")},he={};function Te(){return he}function Ne(){Me=0,he={}}function be(g){return g=g.replace(oe,function(C,D){var ee=We();return he[ee]={type:"inline",expression:D},ee}),g}var me=ae.listitem;ae.listitem=function(g){return me(be(g))};var de=ae.paragraph;ae.paragraph=function(g){return de(be(g))};var W=ae.tablecell;ae.tablecell=function(g,C){return W(be(g),C)},ae.code=function(g,C,D){var ee=(C||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"<p class='editormd-tex'>".concat(g,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(C,'">').concat(D?g:Object(L.escape)(g,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(D?g:Object(L.escape)(g,!0))+"</code></pre>"},ae.heading=function(g,C,D){var ee=this.options.headerPrefix+D.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return X.push({anchor:ee,level:C,text:g}),"<h"+C+' id="'+ee+'">'+g+"</h"+C+">"},M.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),M.a.use({tokenizer:le,renderer:ae});var b=M.a,K=w("SJMd"),G=w("ulZh"),E=w.n(G),q=w("m3rI"),N=w("Oy/b"),O=w("p5ED"),_=/<pre[^>]*>/g;function c(g){var C=document.createElement("div");return C.innerHTML=g,C.childNodes.length===0?"":C.childNodes[0].nodeValue}var l=Xe.a=function(g){var C,D=g.value,ee=D===void 0?"":D,we=g.className,ce=g.showTextOnly,ke=g.showLines,ne=g.style,ue=ne===void 0?{}:ne,H=g.stylesPrev,ie=H===void 0?{}:H,h=(C=String(ee))===null||C===void 0?void 0:C.replace(/<script.*?>|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),T=Object(re.useState)(""),p=Object(ve.a)(T,2),P=p[0],Z=p[1],z=Object(re.useMemo)(function(){try{var Le=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ge=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ae=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;h=h.replace(Le,"("+q.a.API_SERVER+"/api/attachments/").replace(ge,'"'+q.a.API_SERVER+"/api/attachments/").replace(Ae,'"'+q.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),h=h.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Ye){}var Ie=b(h),$e=Te();if(h.match(/\[TOC\]/)&&(Ie=Ie.replace("<p>[TOC]</p>",F()),se()),Ie=Ie.replace(/(__special_katext_id_\d+__)/g,function(Ye,lt){var tt=$e[lt],Ke=tt.type,xe=tt.expression;return Object(N.renderToString)(c(xe)||"",{displayMode:Ke==="block",throwOnError:!1,output:"html"})}),Ie=Ie.replace(/▁/g,"\u2581\u2581\u2581"),Ne(),ce){var He=document.createElement("div");return He.innerHTML=Ie,He.innerText}return setTimeout(function(){return Pe()},500),Ie},[h]),te=Object(re.useRef)();B.WebkitLineClamp=ke,ke&&(ue=Object(I.a)(Object(I.a)({},ue),B));function Se(Le){var ge=Le.target;if(ge.tagName.toUpperCase()==="A"){var Ae=ge.getAttribute("href");if(Ae.indexOf("office")>-1)Le.preventDefault(),Z(Ae);else if(Ae.startsWith("#")){Le.preventDefault();var Ie=document.getElementById(Ae.replace("#",""));Ie&&Ie.scrollIntoView(!0)}}}var Pe=function(){var ge,Ae=(ge=te.current)===null||ge===void 0?void 0:ge.querySelectorAll("video");Ae==null||Ae.forEach(function(Ie){if(Ie.oncontextmenu=function(){return!1},Ie.src.indexOf(".m3u8")>-1&&!Ie.canPlayType("application/vnd.apple.mpegurl")){if(E.a.isSupported()){var $e=new E.a;$e.loadSource(Ie.src),$e.attachMedia(Ie)}}})};return Object(re.useEffect)(function(){if(te.current&&z&&(z.match(_)&&window.PR.prettyPrint()),te.current)return te.current.addEventListener("click",Se),function(){te.current.removeEventListener("click",Se),Ne(),se()}},[z,te.current,Se]),Ee.a.createElement(Ee.a.Fragment,null,Ee.a.createElement("div",{ref:te,style:Object(I.a)({},ue),className:"".concat(we||""," markdown-body "),dangerouslySetInnerHTML:{__html:z}}),Ee.a.createElement(O.a,{close:!0,data:P,type:P!=null&&P.length?"office":"",style:Object(I.a)({},ie),onClose:function(){return Z("")}}))}},"9VGf":function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return re});var I=w("q1tI"),ve=w.n(I);function re(Ee,ye){var $=Object(I.useRef)();Object(I.useEffect)(function(){$.current=Ee}),Object(I.useEffect)(function(){function M(){$.current()}if(ye!==null){var L=setInterval(M,ye);return function(){return clearInterval(L)}}},[ye])}},Bd2K:function(ft,Xe,w){(function(I){I(w("VrN/"),w("osHv"))})(function(I){I.defineOption("autoCloseTags",!1,function(y,X,V){if(V!=I.Init&&V&&y.removeKeyMap("autoCloseTags"),!X)return;var ae={name:"autoCloseTags"};(typeof X!="object"||X.whenClosing!==!1)&&(ae["'/'"]=function(Ce){return $(Ce)}),(typeof X!="object"||X.whenOpening!==!1)&&(ae["'>'"]=function(Ce){return Ee(Ce)}),y.addKeyMap(ae)});var ve=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],re=["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 Ee(y){if(y.getOption("disableInput"))return I.Pass;for(var X=y.listSelections(),V=[],ae=y.getOption("autoCloseTags"),Ce=0;Ce<X.length;Ce++){if(!X[Ce].empty())return I.Pass;var se=X[Ce].head,B=y.getTokenAt(se),j=I.innerMode(y.getMode(),B.state),F=j.state,le=j.mode.xmlCurrentTag&&j.mode.xmlCurrentTag(F),oe=le&&le.name;if(!oe)return I.Pass;var Me=j.mode.configuration=="html",We=typeof ae=="object"&&ae.dontCloseTags||Me&&ve,he=typeof ae=="object"&&ae.indentTags||Me&&re;B.end>se.ch&&(oe=oe.slice(0,oe.length-B.end+se.ch));var Te=oe.toLowerCase();if(!oe||B.type=="string"&&(B.end!=se.ch||!/[\"\']/.test(B.string.charAt(B.string.length-1))||B.string.length==1)||B.type=="tag"&&le.close||B.string.indexOf("/")==se.ch-B.start-1||We&&M(We,Te)>-1||L(y,j.mode.xmlCurrentContext&&j.mode.xmlCurrentContext(F)||[],oe,se,!0))return I.Pass;var Ne=typeof ae=="object"&&ae.emptyTags;if(Ne&&M(Ne,oe)>-1){V[Ce]={text:"/>",newPos:I.Pos(se.line,se.ch+2)};continue}var be=he&&M(he,Te)>-1;V[Ce]={indent:be,text:">"+(be?`
`:"")+"</"+oe+">",newPos:be?I.Pos(se.line+1,0):I.Pos(se.line,se.ch+1)}}for(var me=typeof ae=="object"&&ae.dontIndentOnAutoClose,Ce=X.length-1;Ce>=0;Ce--){var de=V[Ce];y.replaceRange(de.text,X[Ce].head,X[Ce].anchor,"+insert");var W=y.listSelections().slice(0);W[Ce]={head:de.newPos,anchor:de.newPos},y.setSelections(W),!me&&de.indent&&(y.indentLine(de.newPos.line,null,!0),y.indentLine(de.newPos.line+1,null,!0))}}function ye(y,X){for(var V=y.listSelections(),ae=[],Ce=X?"/":"</",se=y.getOption("autoCloseTags"),B=typeof se=="object"&&se.dontIndentOnSlash,j=0;j<V.length;j++){if(!V[j].empty())return I.Pass;var F=V[j].head,le=y.getTokenAt(F),oe=I.innerMode(y.getMode(),le.state),Me=oe.state;if(X&&(le.type=="string"||le.string.charAt(0)!="<"||le.start!=F.ch-1))return I.Pass;var We,he=oe.mode.name!="xml"&&y.getMode().name=="htmlmixed";if(he&&oe.mode.name=="javascript")We=Ce+"script";else if(he&&oe.mode.name=="css")We=Ce+"style";else{var Te=oe.mode.xmlCurrentContext&&oe.mode.xmlCurrentContext(Me);if(!Te||Te.length&&L(y,Te,Te[Te.length-1],F))return I.Pass;We=Ce+Te[Te.length-1]}y.getLine(F.line).charAt(le.end)!=">"&&(We+=">"),ae[j]=We}if(y.replaceSelections(ae),V=y.listSelections(),!B)for(var j=0;j<V.length;j++)(j==V.length-1||V[j].head.line<V[j+1].head.line)&&y.indentLine(V[j].head.line)}function $(y){return y.getOption("disableInput")?I.Pass:ye(y,!0)}I.commands.closeTag=function(y){return ye(y)};function M(y,X){if(y.indexOf)return y.indexOf(X);for(var V=0,ae=y.length;V<ae;++V)if(y[V]==X)return V;return-1}function L(y,X,V,ae,Ce){if(!I.scanForClosingTag)return!1;var se=Math.min(y.lastLine()+1,ae.line+500),B=I.scanForClosingTag(y,ae,null,se);if(!B||B.tag!=V)return!1;for(var j=Ce?1:0,F=X.length-1;F>=0&&X[F]==V;F--)++j;ae=B.to;for(var F=1;F<j;F++){var le=I.scanForClosingTag(y,ae,null,se);if(!le||le.tag!=V)return!1;ae=le.to}return!0}})},BjJ7:function(ft,Xe,w){"use strict";w.d(Xe,"d",function(){return ve}),w.d(Xe,"c",function(){return re}),w.d(Xe,"e",function(){return Ee}),w.d(Xe,"b",function(){return ye}),w.d(Xe,"a",function(){return M});var I=w("m3rI");function ve(L){var y=!0;if(L.length>0){for(var X=0;X<L.length;X++)if(L[X].compile_success==0||!L[X].compile_success){y=!1;break}}else y=!1;return y}function re(L){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",X=[],V=0;V<L.length;V++){var ae=L[V],Ce=y?"".concat(y,"/").concat(ae.name):"".concat(ae.name);X.push({title:ae.name,isLeaf:!(ae.type==="tree"),key:Ce})}return X}function Ee(L,y,X){for(var V=0;V<L.length;V++){var ae=L[V];if(ae.key===y){ae.children=X;break}ae.children&&Ee(ae.children,y,X)}return L}function ye(L,y,X){var V;return function(){var ae=this,Ce=arguments,se=function(){V=null,X||L.apply(ae,Ce)},B=X&&!V;clearTimeout(V),V=setTimeout(se,y),B&&L.apply(ae,Ce)}}var $=!0,M=I.a.API_SERVER},"C+DQ":function(ft,Xe,w){},DlQD:function(ft,Xe,w){(function(I,ve){ft.exports=ve()})(this,function(){"use strict";function I(U,R){for(var S=0;S<R.length;S++){var f=R[S];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(U,f.key,f)}}function ve(U,R,S){return R&&I(U.prototype,R),S&&I(U,S),U}function re(U,R){if(!U)return;if(typeof U=="string")return Ee(U,R);var S=Object.prototype.toString.call(U).slice(8,-1);if(S==="Object"&&U.constructor&&(S=U.constructor.name),S==="Map"||S==="Set")return Array.from(U);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Ee(U,R)}function Ee(U,R){(R==null||R>U.length)&&(R=U.length);for(var S=0,f=new Array(R);S<R;S++)f[S]=U[S];return f}function ye(U,R){var S;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(S=re(U))||R&&U&&typeof U.length=="number"){S&&(U=S);var f=0;return function(){return f>=U.length?{done:!0}:{done:!1,value:U[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 S=U[Symbol.iterator](),S.next.bind(S)}function $(U,R){return R={exports:{}},U(R,R.exports),R.exports}var M=$(function(U){function R(){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 S(f){U.exports.defaults=f}U.exports={defaults:R(),getDefaults:R,changeDefaults:S}}),L=M.defaults,y=M.getDefaults,X=M.changeDefaults,V=/[&<>"']/,ae=/[&<>"']/g,Ce=/[<>"']|&(?!#?\w+;)/,se=/[<>"']|&(?!#?\w+;)/g,B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},j=function(R){return B[R]};function F(U,R){if(R){if(V.test(U))return U.replace(ae,j)}else if(Ce.test(U))return U.replace(se,j);return U}var le=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function oe(U){return U.replace(le,function(R,S){return S=S.toLowerCase(),S==="colon"?":":S.charAt(0)==="#"?S.charAt(1)==="x"?String.fromCharCode(parseInt(S.substring(2),16)):String.fromCharCode(+S.substring(1)):""})}var Me=/(^|[^\[])\^/g;function We(U,R){U=U.source||U,R=R||"";var S={replace:function(m,v){return v=v.source||v,v=v.replace(Me,"$1"),U=U.replace(m,v),S},getRegex:function(){return new RegExp(U,R)}};return S}var he=/[^\w:]/g,Te=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ne(U,R,S){if(U){var f;try{f=decodeURIComponent(oe(S)).replace(he,"").toLowerCase()}catch(m){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}R&&!Te.test(S)&&(S=b(R,S));try{S=encodeURI(S).replace(/%25/g,"%")}catch(m){return null}return S}var be={},me=/^[^:]+:\/*[^/]*$/,de=/^([^:]+:)[\s\S]*$/,W=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(U,R){be[" "+U]||(me.test(U)?be[" "+U]=U+"/":be[" "+U]=q(U,"/",!0)),U=be[" "+U];var S=U.indexOf(":")===-1;return R.substring(0,2)==="//"?S?R:U.replace(de,"$1")+R:R.charAt(0)==="/"?S?R:U.replace(W,"$1")+R:U+R}var K={exec:function(){}};function G(U){for(var R=1,S,f;R<arguments.length;R++){S=arguments[R];for(f in S)Object.prototype.hasOwnProperty.call(S,f)&&(U[f]=S[f])}return U}function E(U,R){var S=U.replace(/\|/g,function(v,x,J){for(var fe=!1,De=x;--De>=0&&J[De]==="\\";)fe=!fe;return fe?"|":" |"}),f=S.split(/ \|/),m=0;if(f.length>R)f.splice(R);else for(;f.length<R;)f.push("");for(;m<f.length;m++)f[m]=f[m].trim().replace(/\\\|/g,"|");return f}function q(U,R,S){var f=U.length;if(f===0)return"";for(var m=0;m<f;){var v=U.charAt(f-m-1);if(v===R&&!S)m++;else if(v!==R&&S)m++;else break}return U.substr(0,f-m)}function N(U,R){if(U.indexOf(R[1])===-1)return-1;for(var S=U.length,f=0,m=0;m<S;m++)if(U[m]==="\\")m++;else if(U[m]===R[0])f++;else if(U[m]===R[1]&&(f--,f<0))return m;return-1}function O(U){U&&U.sanitize&&!U.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 _={escape:F,unescape:oe,edit:We,cleanUrl:Ne,resolveUrl:b,noopTest:K,merge:G,splitCells:E,rtrim:q,findClosingBracket:N,checkSanitizeDeprecation:O},c=M.defaults,l=_.rtrim,g=_.splitCells,C=_.escape,D=_.findClosingBracket;function ee(U,R,S){var f=R.href,m=R.title?C(R.title):null,v=U[1].replace(/\\([\[\]])/g,"$1");return U[0].charAt(0)!=="!"?{type:"link",raw:S,href:f,title:m,text:v}:{type:"image",raw:S,href:f,title:m,text:C(v)}}function we(U,R){var S=U.match(/^(\s+)(?:```)/);if(S===null)return R;var f=S[1];return R.split(`
`).map(function(m){var v=m.match(/^\s+/);if(v===null)return m;var x=v[0];return x.length>=f.length?m.slice(f.length):m}).join(`
`)}var ce=function(){function U(S){this.options=S||c}var R=U.prototype;return R.space=function(f){var m=this.rules.block.newline.exec(f);if(m)return m[0].length>1?{type:"space",raw:m[0]}:{raw:`
`}},R.code=function(f,m){var v=this.rules.block.code.exec(f);if(v){var x=m[m.length-1];if(x&&x.type==="paragraph")return{raw:v[0],text:v[0].trimRight()};var J=v[0].replace(/^ {4}/gm,"");return{type:"code",raw:v[0],codeBlockStyle:"indented",text:this.options.pedantic?J:l(J,`
`)}}},R.fences=function(f){var m=this.rules.block.fences.exec(f);if(m){var v=m[0],x=we(v,m[3]||"");return{type:"code",raw:v,lang:m[2]?m[2].trim():m[2],text:x}}},R.heading=function(f){var m=this.rules.block.heading.exec(f);if(m)return{type:"heading",raw:m[0],depth:m[1].length,text:m[2]}},R.nptable=function(f){var m=this.rules.block.nptable.exec(f);if(m){var v={type:"table",header:g(m[1].replace(/^ *| *\| *$/g,"")),align:m[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:m[3]?m[3].replace(/\n$/,"").split(`
`):[],raw:m[0]};if(v.header.length===v.align.length){var x=v.align.length,J;for(J=0;J<x;J++)/^ *-+: *$/.test(v.align[J])?v.align[J]="right":/^ *:-+: *$/.test(v.align[J])?v.align[J]="center":/^ *:-+ *$/.test(v.align[J])?v.align[J]="left":v.align[J]=null;for(x=v.cells.length,J=0;J<x;J++)v.cells[J]=g(v.cells[J],v.header.length);return v}}},R.hr=function(f){var m=this.rules.block.hr.exec(f);if(m)return{type:"hr",raw:m[0]}},R.blockquote=function(f){var m=this.rules.block.blockquote.exec(f);if(m){var v=m[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:m[0],text:v}}},R.list=function(f){var m=this.rules.block.list.exec(f);if(m){for(var v=m[0],x=m[2],J=x.length>1,fe=x[x.length-1]===")",De={type:"list",raw:v,ordered:J,start:J?+x.slice(0,-1):"",loose:!1,items:[]},et=m[0].match(this.rules.block.item),nt=!1,ot,xt,bt,ht,Ft,Ct,zt,Rt=et.length,yt=0;yt<Rt;yt++)ot=et[yt],v=ot,xt=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
`)&&(xt-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+xt+"}","gm"),"")),yt!==Rt-1&&(bt=this.rules.block.bullet.exec(et[yt+1])[0],(J?bt.length===1||!fe&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==x)&&(ht=et.slice(yt+1).join(`
`),De.raw=De.raw.substring(0,De.raw.length-ht.length),yt=Rt-1)),Ft=nt||/\n\n(?!\s*$)/.test(ot),yt!==Rt-1&&(nt=ot.charAt(ot.length-1)===`
`,Ft||(Ft=nt)),Ft&&(De.loose=!0),Ct=/^\[[ xX]\] /.test(ot),zt=void 0,Ct&&(zt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),De.items.push({type:"list_item",raw:v,task:Ct,checked:zt,loose:Ft,text:ot});return De}},R.html=function(f){var m=this.rules.block.html.exec(f);if(m)return{type:this.options.sanitize?"paragraph":"html",raw:m[0],pre:!this.options.sanitizer&&(m[1]==="pre"||m[1]==="script"||m[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):C(m[0]):m[0]}},R.def=function(f){var m=this.rules.block.def.exec(f);if(m){m[3]&&(m[3]=m[3].substring(1,m[3].length-1));var v=m[1].toLowerCase().replace(/\s+/g," ");return{tag:v,raw:m[0],href:m[2],title:m[3]}}},R.table=function(f){var m=this.rules.block.table.exec(f);if(m){var v={type:"table",header:g(m[1].replace(/^ *| *\| *$/g,"")),align:m[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:m[3]?m[3].replace(/\n$/,"").split(`
`):[]};if(v.header.length===v.align.length){v.raw=m[0];var x=v.align.length,J;for(J=0;J<x;J++)/^ *-+: *$/.test(v.align[J])?v.align[J]="right":/^ *:-+: *$/.test(v.align[J])?v.align[J]="center":/^ *:-+ *$/.test(v.align[J])?v.align[J]="left":v.align[J]=null;for(x=v.cells.length,J=0;J<x;J++)v.cells[J]=g(v.cells[J].replace(/^ *\| *| *\| *$/g,""),v.header.length);return v}}},R.lheading=function(f){var m=this.rules.block.lheading.exec(f);if(m)return{type:"heading",raw:m[0],depth:m[2].charAt(0)==="="?1:2,text:m[1]}},R.paragraph=function(f){var m=this.rules.block.paragraph.exec(f);if(m)return{type:"paragraph",raw:m[0],text:m[1].charAt(m[1].length-1)===`
`?m[1].slice(0,-1):m[1]}},R.text=function(f,m){var v=this.rules.block.text.exec(f);if(v){var x=m[m.length-1];return x&&x.type==="text"?{raw:v[0],text:v[0]}:{type:"text",raw:v[0],text:v[0]}}},R.escape=function(f){var m=this.rules.inline.escape.exec(f);if(m)return{type:"escape",raw:m[0],text:C(m[1])}},R.tag=function(f,m,v){var x=this.rules.inline.tag.exec(f);if(x)return!m&&/^<a /i.test(x[0])?m=!0:m&&/^<\/a>/i.test(x[0])&&(m=!1),!v&&/^<(pre|code|kbd|script)(\s|>)/i.test(x[0])?v=!0:v&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(x[0])&&(v=!1),{type:this.options.sanitize?"text":"html",raw:x[0],inLink:m,inRawBlock:v,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(x[0]):C(x[0]):x[0]}},R.link=function(f){var m=this.rules.inline.link.exec(f);if(m){var v=D(m[2],"()");if(v>-1){var x=m[0].indexOf("!")===0?5:4,J=x+m[1].length+v;m[2]=m[2].substring(0,v),m[0]=m[0].substring(0,J).trim(),m[3]=""}var fe=m[2],De="";if(this.options.pedantic){var et=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(fe);et?(fe=et[1],De=et[3]):De=""}else De=m[3]?m[3].slice(1,-1):"";fe=fe.trim().replace(/^<([\s\S]*)>$/,"$1");var nt=ee(m,{href:fe&&fe.replace(this.rules.inline._escapes,"$1"),title:De&&De.replace(this.rules.inline._escapes,"$1")},m[0]);return nt}},R.reflink=function(f,m){var v;if((v=this.rules.inline.reflink.exec(f))||(v=this.rules.inline.nolink.exec(f))){var x=(v[2]||v[1]).replace(/\s+/g," ");if(x=m[x.toLowerCase()],!x||!x.href){var J=v[0].charAt(0);return{type:"text",raw:J,text:J}}var fe=ee(v,x,v[0]);return fe}},R.strong=function(f,m,v){v===void 0&&(v="");var x=this.rules.inline.strong.start.exec(f);if(x&&(!x[1]||x[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){m=m.slice(-1*f.length);var J=x[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;J.lastIndex=0;for(var fe;(x=J.exec(m))!=null;)if(fe=this.rules.inline.strong.middle.exec(m.slice(0,x.index+3)),fe)return{type:"strong",raw:f.slice(0,fe[0].length),text:f.slice(2,fe[0].length-2)}}},R.em=function(f,m,v){v===void 0&&(v="");var x=this.rules.inline.em.start.exec(f);if(x&&(!x[1]||x[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){m=m.slice(-1*f.length);var J=x[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;J.lastIndex=0;for(var fe;(x=J.exec(m))!=null;)if(fe=this.rules.inline.em.middle.exec(m.slice(0,x.index+2)),fe)return{type:"em",raw:f.slice(0,fe[0].length),text:f.slice(1,fe[0].length-1)}}},R.codespan=function(f){var m=this.rules.inline.code.exec(f);if(m){var v=m[2].replace(/\n/g," "),x=/[^ ]/.test(v),J=v.startsWith(" ")&&v.endsWith(" ");return x&&J&&(v=v.substring(1,v.length-1)),v=C(v,!0),{type:"codespan",raw:m[0],text:v}}},R.br=function(f){var m=this.rules.inline.br.exec(f);if(m)return{type:"br",raw:m[0]}},R.del=function(f){var m=this.rules.inline.del.exec(f);if(m)return{type:"del",raw:m[0],text:m[1]}},R.autolink=function(f,m){var v=this.rules.inline.autolink.exec(f);if(v){var x,J;return v[2]==="@"?(x=C(this.options.mangle?m(v[1]):v[1]),J="mailto:"+x):(x=C(v[1]),J=x),{type:"link",raw:v[0],text:x,href:J,tokens:[{type:"text",raw:x,text:x}]}}},R.url=function(f,m){var v;if(v=this.rules.inline.url.exec(f)){var x,J;if(v[2]==="@")x=C(this.options.mangle?m(v[0]):v[0]),J="mailto:"+x;else{var fe;do fe=v[0],v[0]=this.rules.inline._backpedal.exec(v[0])[0];while(fe!==v[0]);x=C(v[0]),v[1]==="www."?J="http://"+x:J=x}return{type:"link",raw:v[0],text:x,href:J,tokens:[{type:"text",raw:x,text:x}]}}},R.inlineText=function(f,m,v){var x=this.rules.inline.text.exec(f);if(x){var J;return m?J=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(x[0]):C(x[0]):x[0]:J=C(this.options.smartypants?v(x[0]):x[0]),{type:"text",raw:x[0],text:J}}},U}(),ke=_.noopTest,ne=_.edit,ue=_.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:ke,table:ke,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=ne(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=ne(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=ne(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=ne(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=ne(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=ne(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=ue({},H),H.gfm=ue({},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=ne(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=ne(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=ue({},H.normal,{html:ne(`^ *(?: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:ke,paragraph:ne(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 ie={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ke,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:ke,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ie._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ie.punctuation=ne(ie.punctuation).replace(/punctuation/g,ie._punctuation).getRegex(),ie._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ie._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ie.em.start=ne(ie.em.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.middle=ne(ie.em.middle).replace(/punctuation/g,ie._punctuation).replace(/overlapSkip/g,ie._overlapSkip).getRegex(),ie.em.endAst=ne(ie.em.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.endUnd=ne(ie.em.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.start=ne(ie.strong.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.middle=ne(ie.strong.middle).replace(/punctuation/g,ie._punctuation).replace(/blockSkip/g,ie._blockSkip).getRegex(),ie.strong.endAst=ne(ie.strong.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.endUnd=ne(ie.strong.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.blockSkip=ne(ie._blockSkip,"g").getRegex(),ie.overlapSkip=ne(ie._overlapSkip,"g").getRegex(),ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ie._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])?)+(?![-_])/,ie.autolink=ne(ie.autolink).replace("scheme",ie._scheme).replace("email",ie._email).getRegex(),ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ie.tag=ne(ie.tag).replace("comment",H._comment).replace("attribute",ie._attribute).getRegex(),ie._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ie.link=ne(ie.link).replace("label",ie._label).replace("href",ie._href).replace("title",ie._title).getRegex(),ie.reflink=ne(ie.reflink).replace("label",ie._label).getRegex(),ie.reflinkSearch=ne(ie.reflinkSearch,"g").replace("reflink",ie.reflink).replace("nolink",ie.nolink).getRegex(),ie.normal=ue({},ie),ie.pedantic=ue({},ie.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:ne(/^!?\[(label)\]\((.*?)\)/).replace("label",ie._label).getRegex(),reflink:ne(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie._label).getRegex()}),ie.gfm=ue({},ie.normal,{escape:ne(ie.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ie.gfm.url=ne(ie.gfm.url,"i").replace("email",ie.gfm._extended_email).getRegex(),ie.breaks=ue({},ie.gfm,{br:ne(ie.br).replace("{2,}","*").getRegex(),text:ne(ie.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var h={block:H,inline:ie},T=M.defaults,p=h.block,P=h.inline;function Z(U){return U.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 z(U){var R="",S,f,m=U.length;for(S=0;S<m;S++)f=U.charCodeAt(S),Math.random()>.5&&(f="x"+f.toString(16)),R+="&#"+f+";";return R}var te=function(){function U(S){this.tokens=[],this.tokens.links=Object.create(null),this.options=S||T,this.options.tokenizer=this.options.tokenizer||new ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:p.normal,inline:P.normal};this.options.pedantic?(f.block=p.pedantic,f.inline=P.pedantic):this.options.gfm&&(f.block=p.gfm,this.options.breaks?f.inline=P.breaks:f.inline=P.gfm),this.tokenizer.rules=f}U.lex=function(f,m){var v=new U(m);return v.lex(f)};var R=U.prototype;return R.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},R.blockTokens=function(f,m,v){m===void 0&&(m=[]),v===void 0&&(v=!0),f=f.replace(/^ +$/gm,"");for(var x,J,fe,De;f;){if(x=this.tokenizer.space(f)){f=f.substring(x.raw.length),x.type&&m.push(x);continue}if(x=this.tokenizer.code(f,m)){f=f.substring(x.raw.length),x.type?m.push(x):(De=m[m.length-1],De.raw+=`
`+x.raw,De.text+=`
`+x.text);continue}if(x=this.tokenizer.fences(f)){f=f.substring(x.raw.length),m.push(x);continue}if(x=this.tokenizer.heading(f)){f=f.substring(x.raw.length),m.push(x);continue}if(x=this.tokenizer.nptable(f)){f=f.substring(x.raw.length),m.push(x);continue}if(x=this.tokenizer.hr(f)){f=f.substring(x.raw.length),m.push(x);continue}if(x=this.tokenizer.blockquote(f)){f=f.substring(x.raw.length),x.tokens=this.blockTokens(x.text,[],v),m.push(x);continue}if(x=this.tokenizer.list(f)){for(f=f.substring(x.raw.length),fe=x.items.length,J=0;J<fe;J++)x.items[J].tokens=this.blockTokens(x.items[J].text,[],!1);m.push(x);continue}if(x=this.tokenizer.html(f)){f=f.substring(x.raw.length),m.push(x);continue}if(v&&(x=this.tokenizer.def(f))){f=f.substring(x.raw.length),this.tokens.links[x.tag]||(this.tokens.links[x.tag]={href:x.href,title:x.title});continue}if(x=this.tokenizer.table(f)){f=f.substring(x.raw.length),m.push(x);continue}if(x=this.tokenizer.lheading(f)){f=f.substring(x.raw.length),m.push(x);continue}if(v&&(x=this.tokenizer.paragraph(f))){f=f.substring(x.raw.length),m.push(x);continue}if(x=this.tokenizer.text(f,m)){f=f.substring(x.raw.length),x.type?m.push(x):(De=m[m.length-1],De.raw+=`
`+x.raw,De.text+=`
`+x.text);continue}if(f){var et="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(et);break}else throw new Error(et)}}return m},R.inline=function(f){var m,v,x,J,fe,De,et=f.length;for(m=0;m<et;m++){De=f[m];switch(De.type){case"paragraph":case"text":case"heading":{De.tokens=[],this.inlineTokens(De.text,De.tokens);break}case"table":{for(De.tokens={header:[],cells:[]},J=De.header.length,v=0;v<J;v++)De.tokens.header[v]=[],this.inlineTokens(De.header[v],De.tokens.header[v]);for(J=De.cells.length,v=0;v<J;v++)for(fe=De.cells[v],De.tokens.cells[v]=[],x=0;x<fe.length;x++)De.tokens.cells[v][x]=[],this.inlineTokens(fe[x],De.tokens.cells[v][x]);break}case"blockquote":{this.inline(De.tokens);break}case"list":{for(J=De.items.length,v=0;v<J;v++)this.inline(De.items[v].tokens);break}}}return f},R.inlineTokens=function(f,m,v,x,J){m===void 0&&(m=[]),v===void 0&&(v=!1),x===void 0&&(x=!1),J===void 0&&(J="");var fe,De=f,et;if(this.tokens.links){var nt=Object.keys(this.tokens.links);if(nt.length>0)for(;(et=this.tokenizer.rules.inline.reflinkSearch.exec(De))!=null;)nt.includes(et[0].slice(et[0].lastIndexOf("[")+1,-1))&&(De=De.slice(0,et.index)+"["+"a".repeat(et[0].length-2)+"]"+De.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(et=this.tokenizer.rules.inline.blockSkip.exec(De))!=null;)De=De.slice(0,et.index)+"["+"a".repeat(et[0].length-2)+"]"+De.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(fe=this.tokenizer.escape(f)){f=f.substring(fe.raw.length),m.push(fe);continue}if(fe=this.tokenizer.tag(f,v,x)){f=f.substring(fe.raw.length),v=fe.inLink,x=fe.inRawBlock,m.push(fe);continue}if(fe=this.tokenizer.link(f)){f=f.substring(fe.raw.length),fe.type==="link"&&(fe.tokens=this.inlineTokens(fe.text,[],!0,x)),m.push(fe);continue}if(fe=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(fe.raw.length),fe.type==="link"&&(fe.tokens=this.inlineTokens(fe.text,[],!0,x)),m.push(fe);continue}if(fe=this.tokenizer.strong(f,De,J)){f=f.substring(fe.raw.length),fe.tokens=this.inlineTokens(fe.text,[],v,x),m.push(fe);continue}if(fe=this.tokenizer.em(f,De,J)){f=f.substring(fe.raw.length),fe.tokens=this.inlineTokens(fe.text,[],v,x),m.push(fe);continue}if(fe=this.tokenizer.codespan(f)){f=f.substring(fe.raw.length),m.push(fe);continue}if(fe=this.tokenizer.br(f)){f=f.substring(fe.raw.length),m.push(fe);continue}if(fe=this.tokenizer.del(f)){f=f.substring(fe.raw.length),fe.tokens=this.inlineTokens(fe.text,[],v,x),m.push(fe);continue}if(fe=this.tokenizer.autolink(f,z)){f=f.substring(fe.raw.length),m.push(fe);continue}if(!v&&(fe=this.tokenizer.url(f,z))){f=f.substring(fe.raw.length),m.push(fe);continue}if(fe=this.tokenizer.inlineText(f,x,Z)){f=f.substring(fe.raw.length),J=fe.raw.slice(-1),m.push(fe);continue}if(f){var ot="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return m},ve(U,null,[{key:"rules",get:function(){return{block:p,inline:P}}}]),U}(),Se=M.defaults,Pe=_.cleanUrl,Le=_.escape,ge=function(){function U(S){this.options=S||Se}var R=U.prototype;return R.code=function(f,m,v){var x=(m||"").match(/\S*/)[0];if(this.options.highlight){var J=this.options.highlight(f,x);J!=null&&J!==f&&(v=!0,f=J)}return x?'<pre><code class="'+this.options.langPrefix+Le(x,!0)+'">'+(v?f:Le(f,!0))+`</code></pre>
`:"<pre><code>"+(v?f:Le(f,!0))+`</code></pre>
`},R.blockquote=function(f){return`<blockquote>
`+f+`</blockquote>
`},R.html=function(f){return f},R.heading=function(f,m,v,x){return this.options.headerIds?"<h"+m+' id="'+this.options.headerPrefix+x.slug(v)+'">'+f+"</h"+m+`>
`:"<h"+m+">"+f+"</h"+m+`>
`},R.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},R.list=function(f,m,v){var x=m?"ol":"ul",J=m&&v!==1?' start="'+v+'"':"";return"<"+x+J+`>
`+f+"</"+x+`>
`},R.listitem=function(f){return"<li>"+f+`</li>
`},R.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},R.paragraph=function(f){return"<p>"+f+`</p>
`},R.table=function(f,m){return m&&(m="<tbody>"+m+"</tbody>"),`<table>
<thead>
`+f+`</thead>
`+m+`</table>
`},R.tablerow=function(f){return`<tr>
`+f+`</tr>
`},R.tablecell=function(f,m){var v=m.header?"th":"td",x=m.align?"<"+v+' align="'+m.align+'">':"<"+v+">";return x+f+"</"+v+`>
`},R.strong=function(f){return"<strong>"+f+"</strong>"},R.em=function(f){return"<em>"+f+"</em>"},R.codespan=function(f){return"<code>"+f+"</code>"},R.br=function(){return this.options.xhtml?"<br/>":"<br>"},R.del=function(f){return"<del>"+f+"</del>"},R.link=function(f,m,v){if(f=Pe(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var x='<a href="'+Le(f)+'"';return m&&(x+=' title="'+m+'"'),x+=">"+v+"</a>",x},R.image=function(f,m,v){if(f=Pe(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var x='<img src="'+f+'" alt="'+v+'"';return m&&(x+=' title="'+m+'"'),x+=this.options.xhtml?"/>":">",x},R.text=function(f){return f},U}(),Ae=function(){function U(){}var R=U.prototype;return R.strong=function(f){return f},R.em=function(f){return f},R.codespan=function(f){return f},R.del=function(f){return f},R.html=function(f){return f},R.text=function(f){return f},R.link=function(f,m,v){return""+v},R.image=function(f,m,v){return""+v},R.br=function(){return""},U}(),Ie=function(){function U(){this.seen={}}var R=U.prototype;return R.slug=function(f){var m=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(m)){var v=m;do this.seen[v]++,m=v+"-"+this.seen[v];while(this.seen.hasOwnProperty(m))}return this.seen[m]=0,m},U}(),$e=M.defaults,He=_.unescape,Ye=function(){function U(S){this.options=S||$e,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new Ie}U.parse=function(f,m){var v=new U(m);return v.parse(f)};var R=U.prototype;return R.parse=function(f,m){m===void 0&&(m=!0);var v="",x,J,fe,De,et,nt,ot,xt,bt,ht,Ft,Ct,zt,Rt,yt,on,Cn,sn,kn=f.length;for(x=0;x<kn;x++){ht=f[x];switch(ht.type){case"space":continue;case"hr":{v+=this.renderer.hr();continue}case"heading":{v+=this.renderer.heading(this.parseInline(ht.tokens),ht.depth,He(this.parseInline(ht.tokens,this.textRenderer)),this.slugger);continue}case"code":{v+=this.renderer.code(ht.text,ht.lang,ht.escaped);continue}case"table":{for(xt="",ot="",De=ht.header.length,J=0;J<De;J++)ot+=this.renderer.tablecell(this.parseInline(ht.tokens.header[J]),{header:!0,align:ht.align[J]});for(xt+=this.renderer.tablerow(ot),bt="",De=ht.cells.length,J=0;J<De;J++){for(nt=ht.tokens.cells[J],ot="",et=nt.length,fe=0;fe<et;fe++)ot+=this.renderer.tablecell(this.parseInline(nt[fe]),{header:!1,align:ht.align[fe]});bt+=this.renderer.tablerow(ot)}v+=this.renderer.table(xt,bt);continue}case"blockquote":{bt=this.parse(ht.tokens),v+=this.renderer.blockquote(bt);continue}case"list":{for(Ft=ht.ordered,Ct=ht.start,zt=ht.loose,De=ht.items.length,bt="",J=0;J<De;J++)yt=ht.items[J],on=yt.checked,Cn=yt.task,Rt="",yt.task&&(sn=this.renderer.checkbox(on),zt?yt.tokens.length>0&&yt.tokens[0].type==="text"?(yt.tokens[0].text=sn+" "+yt.tokens[0].text,yt.tokens[0].tokens&&yt.tokens[0].tokens.length>0&&yt.tokens[0].tokens[0].type==="text"&&(yt.tokens[0].tokens[0].text=sn+" "+yt.tokens[0].tokens[0].text)):yt.tokens.unshift({type:"text",text:sn}):Rt+=sn),Rt+=this.parse(yt.tokens,zt),bt+=this.renderer.listitem(Rt,Cn,on);v+=this.renderer.list(bt,Ft,Ct);continue}case"html":{v+=this.renderer.html(ht.text);continue}case"paragraph":{v+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(bt=ht.tokens?this.parseInline(ht.tokens):ht.text;x+1<kn&&f[x+1].type==="text";)ht=f[++x],bt+=`
`+(ht.tokens?this.parseInline(ht.tokens):ht.text);v+=m?this.renderer.paragraph(bt):bt;continue}default:{var tn='Token with "'+ht.type+'" type was not found.';if(this.options.silent){console.error(tn);return}else throw new Error(tn)}}}return v},R.parseInline=function(f,m){m=m||this.renderer;var v="",x,J,fe=f.length;for(x=0;x<fe;x++){J=f[x];switch(J.type){case"escape":{v+=m.text(J.text);break}case"html":{v+=m.html(J.text);break}case"link":{v+=m.link(J.href,J.title,this.parseInline(J.tokens,m));break}case"image":{v+=m.image(J.href,J.title,J.text);break}case"strong":{v+=m.strong(this.parseInline(J.tokens,m));break}case"em":{v+=m.em(this.parseInline(J.tokens,m));break}case"codespan":{v+=m.codespan(J.text);break}case"br":{v+=m.br();break}case"del":{v+=m.del(this.parseInline(J.tokens,m));break}case"text":{v+=m.text(J.text);break}default:{var De='Token with "'+J.type+'" type was not found.';if(this.options.silent){console.error(De);return}else throw new Error(De)}}}return v},U}(),lt=_.merge,tt=_.checkSanitizeDeprecation,Ke=_.escape,xe=M.getDefaults,rt=M.changeDefaults,qe=M.defaults;function Oe(U,R,S){if(typeof U=="undefined"||U===null)throw new Error("marked(): input parameter is undefined or null");if(typeof U!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(U)+", string expected");if(typeof R=="function"&&(S=R,R=null),R=lt({},Oe.defaults,R||{}),tt(R),S){var f=R.highlight,m;try{m=te.lex(U,R)}catch(fe){return S(fe)}var v=function(De){var et;if(!De)try{et=Ye.parse(m,R)}catch(nt){De=nt}return R.highlight=f,De?S(De):S(null,et)};if(!f||f.length<3)return v();if(delete R.highlight,!m.length)return v();var x=0;Oe.walkTokens(m,function(fe){fe.type==="code"&&(x++,setTimeout(function(){f(fe.text,fe.lang,function(De,et){if(De)return v(De);et!=null&&et!==fe.text&&(fe.text=et,fe.escaped=!0),x--,x===0&&v()})},0))}),x===0&&v();return}try{var J=te.lex(U,R);return R.walkTokens&&Oe.walkTokens(J,R.walkTokens),Ye.parse(J,R)}catch(fe){if(fe.message+=`
Please report this to https://github.com/markedjs/marked.`,R.silent)return"<p>An error occurred:</p><pre>"+Ke(fe.message+"",!0)+"</pre>";throw fe}}Oe.options=Oe.setOptions=function(U){return lt(Oe.defaults,U),rt(Oe.defaults),Oe},Oe.getDefaults=xe,Oe.defaults=qe,Oe.use=function(U){var R=lt({},U);if(U.renderer&&function(){var f=Oe.defaults.renderer||new ge,m=function(J){var fe=f[J];f[J]=function(){for(var De=arguments.length,et=new Array(De),nt=0;nt<De;nt++)et[nt]=arguments[nt];var ot=U.renderer[J].apply(f,et);return ot===!1&&(ot=fe.apply(f,et)),ot}};for(var v in U.renderer)m(v);R.renderer=f}(),U.tokenizer&&function(){var f=Oe.defaults.tokenizer||new ce,m=function(J){var fe=f[J];f[J]=function(){for(var De=arguments.length,et=new Array(De),nt=0;nt<De;nt++)et[nt]=arguments[nt];var ot=U.tokenizer[J].apply(f,et);return ot===!1&&(ot=fe.apply(f,et)),ot}};for(var v in U.tokenizer)m(v);R.tokenizer=f}(),U.walkTokens){var S=Oe.defaults.walkTokens;R.walkTokens=function(f){U.walkTokens(f),S&&S(f)}}Oe.setOptions(R)},Oe.walkTokens=function(U,R){for(var S=ye(U),f;!(f=S()).done;){var m=f.value;R(m);switch(m.type){case"table":{for(var v=ye(m.tokens.header),x;!(x=v()).done;){var J=x.value;Oe.walkTokens(J,R)}for(var fe=ye(m.tokens.cells),De;!(De=fe()).done;)for(var et=De.value,nt=ye(et),ot;!(ot=nt()).done;){var xt=ot.value;Oe.walkTokens(xt,R)}break}case"list":{Oe.walkTokens(m.items,R);break}default:m.tokens&&Oe.walkTokens(m.tokens,R)}}},Oe.Parser=Ye,Oe.parser=Ye.parse,Oe.Renderer=ge,Oe.TextRenderer=Ae,Oe.Lexer=te,Oe.lexer=te.lex,Oe.Tokenizer=ce,Oe.Slugger=Ie,Oe.parse=Oe;var Ue=Oe;return Ue})},ELLl:function(ft,Xe,w){(function(I){I(w("VrN/"))})(function(I){var ve={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},re=I.Pos;I.defineOption("autoCloseBrackets",!1,function(B,j,F){F&&F!=I.Init&&(B.removeKeyMap(ye),B.state.closeBrackets=null),j&&($(Ee(j,"pairs")),B.state.closeBrackets=j,B.addKeyMap(ye))});function Ee(B,j){return j=="pairs"&&typeof B=="string"?B:typeof B=="object"&&B[j]!=null?B[j]:ve[j]}var ye={Backspace:y,Enter:X};function $(B){for(var j=0;j<B.length;j++){var F=B.charAt(j),le="'"+F+"'";ye[le]||(ye[le]=M(F))}}$(ve.pairs+"`");function M(B){return function(j){return ae(j,B)}}function L(B){var j=B.state.closeBrackets;if(!j||j.override)return j;var F=B.getModeAt(B.getCursor());return F.closeBrackets||j}function y(B){var j=L(B);if(!j||B.getOption("disableInput"))return I.Pass;for(var F=Ee(j,"pairs"),le=B.listSelections(),oe=0;oe<le.length;oe++){if(!le[oe].empty())return I.Pass;var Me=Ce(B,le[oe].head);if(!Me||F.indexOf(Me)%2!=0)return I.Pass}for(var oe=le.length-1;oe>=0;oe--){var We=le[oe].head;B.replaceRange("",re(We.line,We.ch-1),re(We.line,We.ch+1),"+delete")}}function X(B){var j=L(B),F=j&&Ee(j,"explode");if(!F||B.getOption("disableInput"))return I.Pass;for(var le=B.listSelections(),oe=0;oe<le.length;oe++){if(!le[oe].empty())return I.Pass;var Me=Ce(B,le[oe].head);if(!Me||F.indexOf(Me)%2!=0)return I.Pass}B.operation(function(){var We=B.lineSeparator()||`
`;B.replaceSelection(We+We,null),B.execCommand("goCharLeft"),le=B.listSelections();for(var he=0;he<le.length;he++){var Te=le[he].head.line;B.indentLine(Te,null,!0),B.indentLine(Te+1,null,!0)}})}function V(B){var j=I.cmpPos(B.anchor,B.head)>0;return{anchor:new re(B.anchor.line,B.anchor.ch+(j?-1:1)),head:new re(B.head.line,B.head.ch+(j?1:-1))}}function ae(B,j){var F=L(B);if(!F||B.getOption("disableInput"))return I.Pass;var le=Ee(F,"pairs"),oe=le.indexOf(j);if(oe==-1)return I.Pass;for(var Me=Ee(F,"closeBefore"),We=Ee(F,"triples"),he=le.charAt(oe+1)==j,Te=B.listSelections(),Ne=oe%2==0,be,me=0;me<Te.length;me++){var de=Te[me],W=de.head,b,K=B.getRange(W,re(W.line,W.ch+1));if(Ne&&!de.empty())b="surround";else if((he||!Ne)&&K==j)he&&se(B,W)?b="both":We.indexOf(j)>=0&&B.getRange(W,re(W.line,W.ch+3))==j+j+j?b="skipThree":b="skip";else if(he&&W.ch>1&&We.indexOf(j)>=0&&B.getRange(re(W.line,W.ch-2),W)==j+j){if(W.ch>2&&/\bstring/.test(B.getTokenTypeAt(re(W.line,W.ch-2))))return I.Pass;b="addFour"}else if(he){var G=W.ch==0?" ":B.getRange(re(W.line,W.ch-1),W);if(!I.isWordChar(K)&&G!=j&&!I.isWordChar(G))b="both";else return I.Pass}else if(Ne&&(K.length===0||/\s/.test(K)||Me.indexOf(K)>-1))b="both";else return I.Pass;if(!be)be=b;else if(be!=b)return I.Pass}var E=oe%2?le.charAt(oe-1):j,q=oe%2?j:le.charAt(oe+1);B.operation(function(){if(be=="skip")B.execCommand("goCharRight");else if(be=="skipThree")for(var N=0;N<3;N++)B.execCommand("goCharRight");else if(be=="surround"){for(var O=B.getSelections(),N=0;N<O.length;N++)O[N]=E+O[N]+q;B.replaceSelections(O,"around"),O=B.listSelections().slice();for(var N=0;N<O.length;N++)O[N]=V(O[N]);B.setSelections(O)}else be=="both"?(B.replaceSelection(E+q,null),B.triggerElectric(E+q),B.execCommand("goCharLeft")):be=="addFour"&&(B.replaceSelection(E+E+E+E,"before"),B.execCommand("goCharRight"))})}function Ce(B,j){var F=B.getRange(re(j.line,j.ch-1),re(j.line,j.ch+1));return F.length==2?F:null}function se(B,j){var F=B.getTokenAt(re(j.line,j.ch+1));return/\bstring/.test(F.type)&&F.start==j.ch&&(j.ch==0||!/\bstring/.test(B.getTokenTypeAt(j)))}})},GfqC:function(ft,Xe,w){"use strict";var I=w("q1tI"),ve=w.n(I),re=w("TSYQ"),Ee=w.n(re);function ye(_,c){var l="cannot "+_.method+" "+_.action+" "+c.status+"'",g=new Error(l);return g.status=c.status,g.method=_.method,g.url=_.action,g}function $(_){var c=_.responseText||_.response;if(!c)return c;try{return JSON.parse(c)}catch(l){return c}}function M(_){var c=new XMLHttpRequest;_.onProgress&&c.upload&&(c.upload.onprogress=function(D){D.total>0&&(D.percent=D.loaded/D.total*100),_.onProgress(D)});var l=new FormData;_.data&&Object.keys(_.data).forEach(function(C){var D=_.data[C];if(Array.isArray(D)){D.forEach(function(ee){l.append(C+"[]",ee)});return}l.append(C,_.data[C])}),_.file instanceof Blob?l.append(_.filename,_.file,_.file.name):l.append(_.filename,_.file),c.onerror=function(D){_.onError(D)},c.onload=function(){return c.status<200||c.status>=300?_.onError(ye(_,c),$(c)):_.onSuccess($(c),c)},c.open(_.method,_.action,!0),_.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var g=_.headers||{};return g["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(g).forEach(function(C){g[C]!==null&&c.setRequestHeader(C,g[C])}),c.send(l),{abort:function(){c.abort()}}}var L=+new Date,y=0;function X(){return"rc-upload-"+L+"-"+ ++y}function V(_,c){return _.indexOf(c,_.length-c.length)!==-1}var ae=function(_,c){if(_&&c){var l=Array.isArray(c)?c:c.split(","),g=_.name||"",C=_.type||"",D=C.replace(/\/.*$/,"");return l.some(function(ee){var we=ee.trim();return we.charAt(0)==="."?V(g.toLowerCase(),we.toLowerCase()):/\/\*$/.test(we)?D===we.replace(/\/.*$/,""):C===we})}return!0};function Ce(_,c){var l=_.createReader(),g=[];function C(){l.readEntries(function(D){var ee=Array.prototype.slice.apply(D);g=g.concat(ee);var we=!ee.length;we?c(g):C()})}C()}var se=function(c,l,g){var C=function D(ee,we){we=we||"",ee.isFile?ee.file(function(ce){g(ce)&&(ee.fullPath&&!ce.webkitRelativePath&&(Object.defineProperties(ce,{webkitRelativePath:{writable:!0}}),ce.webkitRelativePath=ee.fullPath.replace(/^\//,""),Object.defineProperties(ce,{webkitRelativePath:{writable:!1}})),l([ce]))}):ee.isDirectory&&Ce(ee,function(ce){ce.forEach(function(ke){D(ke,""+we+ee.name+"/")})})};c.forEach(function(D){C(D.webkitGetAsEntry())})},B=se,j=Object.assign||function(_){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var g in l)Object.prototype.hasOwnProperty.call(l,g)&&(_[g]=l[g])}return _},F=function(){function _(c,l){var g=[],C=!0,D=!1,ee=void 0;try{for(var we=c[Symbol.iterator](),ce;!(C=(ce=we.next()).done)&&!(g.push(ce.value),l&&g.length===l);C=!0);}catch(ke){D=!0,ee=ke}finally{try{!C&&we.return&&we.return()}finally{if(D)throw ee}}return g}return function(c,l){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return _(c,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),le=function(){function _(c,l){for(var g=0;g<l.length;g++){var C=l[g];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(c,C.key,C)}}return function(c,l,g){return l&&_(c.prototype,l),g&&_(c,g),c}}();function oe(_,c,l){return c in _?Object.defineProperty(_,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):_[c]=l,_}function Me(_,c){var l={};for(var g in _){if(c.indexOf(g)>=0)continue;if(!Object.prototype.hasOwnProperty.call(_,g))continue;l[g]=_[g]}return l}function We(_,c){if(!(_ instanceof c))throw new TypeError("Cannot call a class as a function")}function he(_,c){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:_}function Te(_,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);_.prototype=Object.create(c&&c.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(_,c):_.__proto__=c)}var Ne=function(c){return Object.keys(c).reduce(function(l,g){return(g.substr(0,5)==="data-"||g.substr(0,5)==="aria-"||g==="role")&&(l[g]=c[g]),l},{})},be=function(_){Te(c,_);function c(){var l,g,C,D;We(this,c);for(var ee=arguments.length,we=Array(ee),ce=0;ce<ee;ce++)we[ce]=arguments[ce];return D=(g=(C=he(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(we))),C),C.state={uid:X()},C.reqs={},C.onChange=function(ke){var ne=ke.target.files;C.uploadFiles(ne),C.reset()},C.onClick=function(ke){var ne=C.fileInput;if(!ne)return;var ue=C.props,H=ue.children,ie=ue.onClick;H&&H.type==="button"&&(ne.parentNode.focus(),ne.parentNode.querySelector("button").blur()),ne.click(),ie&&ie(ke)},C.onKeyDown=function(ke){ke.key==="Enter"&&C.onClick()},C.onFileDrop=function(ke){var ne=C.props.multiple;if(ke.preventDefault(),ke.type==="dragover")return;if(C.props.directory)B(Array.prototype.slice.call(ke.dataTransfer.items),C.uploadFiles,function(H){return ae(H,C.props.accept)});else{var ue=Array.prototype.slice.call(ke.dataTransfer.files).filter(function(H){return ae(H,C.props.accept)});ne===!1&&(ue=ue.slice(0,1)),C.uploadFiles(ue)}},C.uploadFiles=function(ke){var ne=Array.prototype.slice.call(ke);ne.map(function(ue){return ue.uid=X(),ue}).forEach(function(ue){C.upload(ue,ne)})},C.saveFileInput=function(ke){C.fileInput=ke},g),he(C,D)}return le(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(g,C){var D=this,ee=this.props;if(!ee.beforeUpload)return setTimeout(function(){return D.post(g)},0);var we=ee.beforeUpload(g,C);we&&we.then?we.then(function(ce){var ke=Object.prototype.toString.call(ce);return ke==="[object File]"||ke==="[object Blob]"?D.post(ce):D.post(g)}).catch(function(ce){console.log(ce)}):we!==!1&&setTimeout(function(){return D.post(g)},0);return}},{key:"post",value:function(g){var C=this;if(!this._isMounted)return;var D=this.props,ee=D.onStart,we=D.onProgress,ce=D.transformFile,ke=ce===void 0?function(ne){return ne}:ce;new Promise(function(ne){var ue=D.action;return typeof ue=="function"&&(ue=ue(g)),ne(ue)}).then(function(ne){var ue=g.uid,H=D.customRequest||M,ie=Promise.resolve(ke(g)).then(function(h){var T=D.data;return typeof T=="function"&&(T=T(h)),Promise.all([h,T])}).catch(function(h){console.error(h)});ie.then(function(h){var T=F(h,2),p=T[0],P=T[1],Z={action:ne,filename:D.name,data:P,file:p,headers:D.headers,withCredentials:D.withCredentials,method:D.method||"post",onProgress:we?function(z){we(z,g)}:null,onSuccess:function(te,Se){delete C.reqs[ue],D.onSuccess(te,g,Se)},onError:function(te,Se){delete C.reqs[ue],D.onError(te,Se,g)}};ee(g),C.reqs[ue]=H(Z)})})}},{key:"reset",value:function(){this.setState({uid:X()})}},{key:"abort",value:function(g){var C=this.reqs;if(g){var D=g;g&&g.uid&&(D=g.uid),C[D]&&C[D].abort&&C[D].abort(),delete C[D]}else Object.keys(C).forEach(function(ee){C[ee]&&C[ee].abort&&C[ee].abort(),delete C[ee]})}},{key:"render",value:function(){var g,C=this.props,D=C.component,ee=C.prefixCls,we=C.className,ce=C.disabled,ke=C.id,ne=C.style,ue=C.multiple,H=C.accept,ie=C.children,h=C.directory,T=C.openFileDialogOnClick,p=C.onMouseEnter,P=C.onMouseLeave,Z=Me(C,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),z=Ee()((g={},oe(g,ee,!0),oe(g,ee+"-disabled",ce),oe(g,we,we),g)),te=ce?{}:{onClick:T?this.onClick:function(){},onKeyDown:T?this.onKeyDown:function(){},onMouseEnter:p,onMouseLeave:P,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ve.a.createElement(D,j({},te,{className:z,role:"button",style:ne}),ve.a.createElement("input",j({},Ne(Z),{id:ke,type:"file",ref:this.saveFileInput,onClick:function(Pe){return Pe.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:H,directory:h?"directory":null,webkitdirectory:h?"webkitdirectory":null,multiple:ue,onChange:this.onChange})),ie)}}]),c}(I.Component),me=be,de=Object.assign||function(_){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var g in l)Object.prototype.hasOwnProperty.call(l,g)&&(_[g]=l[g])}return _},W=function(){function _(c,l){for(var g=0;g<l.length;g++){var C=l[g];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(c,C.key,C)}}return function(c,l,g){return l&&_(c.prototype,l),g&&_(c,g),c}}();function b(_,c){if(!(_ instanceof c))throw new TypeError("Cannot call a class as a function")}function K(_,c){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:_}function G(_,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);_.prototype=Object.create(c&&c.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(_,c):_.__proto__=c)}function E(){}var q=function(_){G(c,_);function c(){var l,g,C,D;b(this,c);for(var ee=arguments.length,we=Array(ee),ce=0;ce<ee;ce++)we[ce]=arguments[ce];return D=(g=(C=K(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(we))),C),C.saveUploader=function(ke){C.uploader=ke},g),K(C,D)}return W(c,[{key:"abort",value:function(g){this.uploader.abort(g)}},{key:"render",value:function(){return ve.a.createElement(me,de({},this.props,{ref:this.saveUploader}))}}]),c}(I.Component);q.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:E,onError:E,onSuccess:E,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var N=q,O=Xe.a=N},Gytx:function(ft,Xe){ft.exports=function(I,ve,re,Ee){var ye=re?re.call(Ee,I,ve):void 0;if(ye!==void 0)return!!ye;if(I===ve)return!0;if(typeof I!="object"||!I||typeof ve!="object"||!ve)return!1;var $=Object.keys(I),M=Object.keys(ve);if($.length!==M.length)return!1;for(var L=Object.prototype.hasOwnProperty.bind(ve),y=0;y<$.length;y++){var X=$[y];if(!L(X))return!1;var V=I[X],ae=ve[X];if(ye=re?re.call(Ee,V,ae,X):void 0,ye===!1||ye===void 0&&V!==ae)return!1}return!0}},HmJG:function(ft,Xe,w){},LdHM:function(ft,Xe,w){"use strict";w.d(Xe,"b",function(){return Me}),w.d(Xe,"a",function(){return he});var I=w("1OyB"),ve=w("vuIU"),re=w("Ji7U"),Ee=w("LK+K"),ye=w("q1tI"),$=w("rePB"),M=w("Ff2n"),L=w("ODXe"),y=w("4IlW"),X=w("bX4T"),V=w("YrtM"),ae=w("TSYQ"),Ce=w.n(ae),se=w("+nKL"),B=w("8OUc"),j=function(g,C){var D=g.prefixCls,ee=g.id,we=g.flattenOptions,ce=g.childrenAsData,ke=g.values,ne=g.searchValue,ue=g.multiple,H=g.defaultActiveFirstOption,ie=g.height,h=g.itemHeight,T=g.notFoundContent,p=g.open,P=g.menuItemSelectedIcon,Z=g.virtual,z=g.onSelect,te=g.onToggleOpen,Se=g.onActiveValue,Pe=g.onScroll,Le=g.onMouseEnter,ge="".concat(D,"-item"),Ae=Object(V.a)(function(){return we},[p,we],function(Ue,U){return U[0]&&Ue[1]!==U[1]}),Ie=ye.useRef(null),$e=function(U){U.preventDefault()},He=function(U){Ie.current&&Ie.current.scrollTo({index:U})},Ye=function(U){for(var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,S=Ae.length,f=0;f<S;f+=1){var m=(U+f*R+S)%S,v=Ae[m],x=v.group,J=v.data;if(!x&&!J.disabled)return m}return-1},lt=ye.useState(function(){return Ye(0)}),tt=Object(L.a)(lt,2),Ke=tt[0],xe=tt[1],rt=function(U){xe(U);var R=Ae[U];if(!R){Se(null,-1);return}Se(R.data.value,U)};ye.useEffect(function(){rt(H!==!1?Ye(0):-1)},[Ae.length,ne]),ye.useEffect(function(){var Ue=setTimeout(function(){if(!ue&&p&&ke.size===1){var U=Array.from(ke)[0],R=Ae.findIndex(function(S){var f=S.data;return f.value===U});rt(R),He(R)}});return function(){return clearTimeout(Ue)}},[p]);var qe=function(U){U!==void 0&&z(U,{selected:!ke.has(U)}),ue||te(!1)};if(ye.useImperativeHandle(C,function(){return{onKeyDown:function(U){var R=U.which;switch(R){case y.a.UP:case y.a.DOWN:{var S=0;if(R===y.a.UP?S=-1:R===y.a.DOWN&&(S=1),S!==0){var f=Ye(Ke+S,S);He(f),rt(f)}break}case y.a.ENTER:{var m=Ae[Ke];m&&!m.data.disabled?qe(m.data.value):qe(void 0),p&&U.preventDefault();break}case y.a.ESC:te(!1)}},onKeyUp:function(){},scrollTo:function(U){He(U)}}}),Ae.length===0)return ye.createElement("div",{role:"listbox",id:"".concat(ee,"_list"),className:"".concat(ge,"-empty"),onMouseDown:$e},T);function Oe(Ue){var U=Ae[Ue];if(!U)return null;var R=U.data||{},S=R.value,f=R.label,m=R.children,v=Object(X.a)(R,!0),x=ce?m:f;return U?ye.createElement("div",Object.assign({"aria-label":typeof x=="string"?x:null},v,{key:Ue,role:"option",id:"".concat(ee,"_list_").concat(Ue),"aria-selected":ke.has(S)}),S):null}return ye.createElement(ye.Fragment,null,ye.createElement("div",{role:"listbox",id:"".concat(ee,"_list"),style:{height:0,width:0,overflow:"hidden"}},Oe(Ke-1),Oe(Ke),Oe(Ke+1)),ye.createElement(se.a,{itemKey:"key",ref:Ie,data:Ae,height:ie,itemHeight:h,fullHeight:!1,onMouseDown:$e,onScroll:Pe,virtual:Z,onMouseEnter:Le},function(Ue,U){var R,S=Ue.group,f=Ue.groupOption,m=Ue.data,v=m.label,x=m.key;if(S)return ye.createElement("div",{className:Ce()(ge,"".concat(ge,"-group"))},v!==void 0?v:x);var J=m.disabled,fe=m.value,De=m.title,et=m.children,nt=m.style,ot=m.className,xt=Object(M.a)(m,["disabled","value","title","children","style","className"]),bt=ke.has(fe),ht="".concat(ge,"-option"),Ft=Ce()(ge,ht,ot,(R={},Object($.a)(R,"".concat(ht,"-grouped"),f),Object($.a)(R,"".concat(ht,"-active"),Ke===U&&!J),Object($.a)(R,"".concat(ht,"-disabled"),J),Object($.a)(R,"".concat(ht,"-selected"),bt),R)),Ct=ce?et:v,zt=!P||typeof P=="function"||bt;return ye.createElement("div",Object.assign({},xt,{"aria-selected":bt,className:Ft,title:De,onMouseMove:function(){if(Ke===U||J)return;rt(U)},onClick:function(){J||qe(fe)},style:nt}),ye.createElement("div",{className:"".concat(ht,"-content")},Ct||fe),ye.isValidElement(P)||bt,zt&&ye.createElement(B.a,{className:"".concat(ge,"-option-state"),customizeIcon:P,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},F=ye.forwardRef(j);F.displayName="OptionList";var le=F,oe=function(){return null};oe.isSelectOption=!0;var Me=oe,We=function(){return null};We.isSelectOptGroup=!0;var he=We,Te=w("VTBJ"),Ne=w("Zm9Q");function be(l){var g=l.key,C=l.props,D=C.children,ee=C.value,we=Object(M.a)(C,["children","value"]);return Object(Te.a)({key:g,value:ee!==void 0?ee:g,children:D},we)}function me(l){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Ne.a)(l).map(function(C,D){if(!ye.isValidElement(C)||!C.type)return null;var ee=C.type.isSelectOptGroup,we=C.key,ce=C.props,ke=ce.children,ne=Object(M.a)(ce,["children"]);return g||!ee?be(C):Object(Te.a)(Object(Te.a)({key:"__RC_SELECT_GRP__".concat(we===null?D:we,"__"),label:we},ne),{},{options:me(ke)})}).filter(function(C){return C})}var de=w("2Qr1"),W=w("qNPg"),b=w("U8pU"),K=w("Kwbf"),G=w("WKfj");function E(l){var g=l.mode,C=l.options,D=l.children,ee=l.backfill,we=l.allowClear,ce=l.placeholder,ke=l.getInputElement,ne=l.showSearch,ue=l.onSearch,H=l.defaultOpen,ie=l.autoFocus,h=l.labelInValue,T=l.value,p=l.inputValue,P=l.optionLabelProp,Z=g==="multiple"||g==="tags",z=ne!==void 0?ne:Z||g==="combobox",te=C||me(D);if(Object(K.a)(g!=="tags"||te.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),g==="tags"||g==="combobox"){var Se=te.some(function(ge){return ge.options?ge.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(K.a)(!Se,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(K.a)(g!=="combobox"||!P,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(K.a)(g==="combobox"||!ee,"`backfill` only works with `combobox` mode."),Object(K.a)(g==="combobox"||!ke,"`getInputElement` only work with `combobox` mode."),Object(K.b)(g!=="combobox"||!ke||!we||!ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ue&&!z&&g!=="combobox"&&g!=="tags"&&Object(K.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(K.b)(!H||ie,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),T!=null){var Pe=Object(G.d)(T);Object(K.a)(!h||Pe.every(function(ge){return Object(b.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(K.a)(!Z||Array.isArray(T),"`value` should be array when `mode` is `multiple` or `tags`")}if(D){var Le=null;Object(Ne.a)(D).some(function(ge){if(!ye.isValidElement(ge)||!ge.type)return!1;var Ae=ge.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var Ie=Object(Ne.a)(ge.props.children).every(function($e){return!ye.isValidElement($e)||!ge.type||$e.type.isSelectOption?!0:(Le=$e.type,!1)});return!Ie}return Le=Ae,!0}),Le&&Object(K.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Le.displayName||Le.name||Le,"`.")),Object(K.a)(p===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var q=E,N=Object(W.a)({prefixCls:"rc-select",components:{optionList:le},convertChildrenToData:me,flattenOptions:de.d,getLabeledValue:de.e,filterOptions:de.b,isValueDisabled:de.g,findValueOption:de.c,warningProps:q,fillOptionsWithMissingValue:de.a}),O=function(l){Object(re.a)(C,l);var g=Object(Ee.a)(C);function C(){var D;return Object(I.a)(this,C),D=g.apply(this,arguments),D.selectRef=ye.createRef(),D.focus=function(){D.selectRef.current.focus()},D.blur=function(){D.selectRef.current.blur()},D}return Object(ve.a)(C,[{key:"render",value:function(){return ye.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),C}(ye.Component);O.Option=Me,O.OptGroup=he;var _=O,c=Xe.c=_},M8RZ:function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return y});var I=w("fWQN"),ve=w("mtLc"),re=w("yKVA"),Ee=w("879j"),ye=w("q1tI"),$=w.n(ye),M=w("i8i4"),L=w.n(M),y=function(X){Object(re.a)(ae,X);var V=Object(Ee.a)(ae);function ae(Ce){var se;Object(I.a)(this,ae),se=V.call(this,Ce);var B=window.document;return se.node=B.createElement("div"),B.body.appendChild(se.node),se}return Object(ve.a)(ae,[{key:"render",value:function(){var se=this.props.children;return Object(M.createPortal)(se,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),ae}($.a.Component)},OLES:function(ft,Xe,w){"use strict";var I=w("U8pU"),ve=w("VTBJ"),re=w("Ff2n"),Ee=w("q1tI"),ye=w("uciX"),$=w("7ixt"),M=function(Ce){var se=Ce.overlay,B=Ce.prefixCls,j=Ce.id,F=Ce.overlayInnerStyle;return Ee.createElement("div",{className:"".concat(B,"-inner"),id:j,role:"tooltip",style:F},typeof se=="function"?se():se)},L=M,y=function(Ce,se){var B=Ce.overlayClassName,j=Ce.trigger,F=j===void 0?["hover"]:j,le=Ce.mouseEnterDelay,oe=le===void 0?0:le,Me=Ce.mouseLeaveDelay,We=Me===void 0?.1:Me,he=Ce.overlayStyle,Te=Ce.prefixCls,Ne=Te===void 0?"rc-tooltip":Te,be=Ce.children,me=Ce.onVisibleChange,de=Ce.afterVisibleChange,W=Ce.transitionName,b=Ce.animation,K=Ce.placement,G=K===void 0?"right":K,E=Ce.align,q=E===void 0?{}:E,N=Ce.destroyTooltipOnHide,O=N===void 0?!1:N,_=Ce.defaultVisible,c=Ce.getTooltipContainer,l=Ce.overlayInnerStyle,g=Object(re.a)(Ce,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),C=Object(Ee.useRef)(null);Object(Ee.useImperativeHandle)(se,function(){return C.current});var D=Object(ve.a)({},g);"visible"in Ce&&(D.popupVisible=Ce.visible);var ee=function(){var ue=Ce.arrowContent,H=ue===void 0?null:ue,ie=Ce.overlay,h=Ce.id;return[Ee.createElement("div",{className:"".concat(Ne,"-arrow"),key:"arrow"},H),Ee.createElement(L,{key:"content",prefixCls:Ne,id:h,overlay:ie,overlayInnerStyle:l})]},we=!1,ce=!1;if(typeof O=="boolean")we=O;else if(O&&Object(I.a)(O)==="object"){var ke=O.keepParent;we=ke===!0,ce=ke===!1}return Ee.createElement(ye.a,Object.assign({popupClassName:B,prefixCls:Ne,popup:ee,action:F,builtinPlacements:$.a,popupPlacement:G,ref:C,popupAlign:q,getPopupContainer:c,onPopupVisibleChange:me,afterPopupVisibleChange:de,popupTransitionName:W,popupAnimation:b,defaultPopupVisible:_,destroyPopupOnHide:we,autoDestroy:ce,mouseLeaveDelay:We,popupStyle:he,mouseEnterDelay:oe},D),be)},X=Object(Ee.forwardRef)(y),V=Xe.a=X},Ot1p:function(ft,Xe,w){"use strict";var I=w("2qtc"),ve=w("kLXV"),re=w("rAM+"),Ee=w("miYZ"),ye=w("tsqr"),$=w("tJVT"),M=w("jrin"),L=w("q1tI"),y=w.n(L),X=w("VrN/"),V=w.n(X),ae=w("bdgK"),Ce=w("p77/"),se=w("Bd2K"),B=w("ELLl"),j=w("19Vz"),F=w("lZu9"),le=w("+NIl"),oe=w("kSUc"),Me=w("9Bee"),We=function(S){var f=S.value,m=f===void 0?"":f,v=S.className,x=S.showTextOnly,J=S.showLines,fe=S.style,De=fe===void 0?{}:fe,et=Object(L.useMemo)(function(){return""},[m]);return y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{dangerouslySetInnerHTML:{__html:et}}))},he=w("0Owb"),Te=w("dejd"),Ne=w("C+DQ"),be=[{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 me(S){var f=S.onActionCallback,m=S.title,v=S.icon,x=S.actionName,J=S.className,fe=J===void 0?"":J,De=S.children;function et(){f(x)}return y.a.createElement("a",{title:m,className:fe,onClick:et},y.a.createElement("i",{className:"md-iconfont ".concat(v)}),De)}var de=function(S){var f=S.watch,m=S.showNullButton,v=S.onActionCallback,x=S.fullScreen,J=S.insertTemp,fe=S.hidetoolBar,De=[].concat(be,[{title:"".concat(f?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(f?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return y.a.createElement("ul",{className:"markdown-toolbar-container"},!fe&&De.map(function(et,nt){return y.a.createElement("li",{key:nt},et.actionName?y.a.createElement(me,Object(he.a)({},et,{onActionCallback:v})):y.a.createElement("span",{className:"v-line"}))}),m?y.a.createElement("li",null,y.a.createElement(me,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:v},y.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,J&&y.a.createElement("li",null,y.a.createElement(me,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(J),onActionCallback:v},y.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),y.a.createElement("li",{className:"btn-full-screen"},y.a.createElement(me,{icon:"".concat(x?"icon-shrink":"icon-enlarge"),title:x?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:v})))},W=w("M8RZ"),b=w("+L6B"),K=w("2/Rp"),G=w("y8nQ"),E=w("Vl3Y"),q=w("5NDa"),N=w("5rEg"),O={labelCol:{span:4},wrapperCol:{span:20}},_=function(S){var f=S.callback,m=S.onCancel;function v(x){f(x)}return y.a.createElement(E.a,Object(he.a)({},O,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:v}),y.a.createElement(E.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},y.a.createElement(N.a,null)),y.a.createElement(E.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},y.a.createElement(N.a,null)),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(K.a,{type:"ghost",onClick:m},"\u53D6\u6D88")))},c=w("7ahc"),l=w("HmJG"),g=w("BjJ7"),C=E.a.useForm,D={width:280,marginRight:10},ee={labelCol:{span:5},wrapperCol:{span:19}},we=function(S){var f=S.callback,m=S.onCancel,v=C(),x=Object($.a)(v,1),J=x[0];function fe(nt){f(nt)}function De(nt,ot){J.setFieldsValue({src:"/api/attachments/".concat(nt.id),type:ot.type})}function et(nt){var ot=nt.target.files[0];ke(ot,De)}return y.a.createElement(E.a,Object(he.a)({form:J},ee,{className:"upload-image-panel",onFinish:fe}),y.a.createElement(E.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},y.a.createElement("div",{className:"flex-container"},y.a.createElement(E.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},y.a.createElement(N.a,{style:D})),y.a.createElement(ce,{onFileChange:et}))),y.a.createElement(E.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},y.a.createElement(N.a,{style:{width:264}})),y.a.createElement(E.a.Item,{style:{textAlign:"right"}},y.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(K.a,{type:"ghost",onClick:m},"\u53D6\u6D88")))};function ce(S){var f=S.onFileChange;return y.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",y.a.createElement("input",{type:"file",onChange:f}))}function ke(S,f){if(!S)throw new String("\u6CA1\u6709\u6587\u4EF6");var m=new FormData;m.append("editormd-image-file",S),m.append("file_param_name","editormd-image-file"),m.append("byxhr","true");var v=new window.XMLHttpRequest;v.withCredentials=!0,v.addEventListener("load",function(x){f(JSON.parse(x.target.responseText),S)},!1),v.addEventListener("error",function(x){console.error(x)},!1),v.open("POST","".concat(g.a,"/api/attachments.json")),v.send(m)}var ne=w("giR+"),ue=w("fyUT"),H=w("7Kak"),ie=w("9yH6"),h=ie.a.Group,T={margin:"0 8px"},p=function(S){var f=S.callback,m=S.onCancel;function v(x){f(x)}return y.a.createElement(E.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:v},y.a.createElement("div",{className:"flex-container"},y.a.createElement("span",{style:T},"\u5355\u5143\u683C\u6570\uFF1A"),y.a.createElement("span",{style:T},"\u884C\u6570"),y.a.createElement(E.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},y.a.createElement(ue.a,null)),y.a.createElement("span",{style:T},"\u5217\u6570"),y.a.createElement(E.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},y.a.createElement(ue.a,null))),y.a.createElement("div",{className:"flex-container",style:{marginTop:12}},y.a.createElement("span",{style:T},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),y.a.createElement(E.a.Item,{name:"align"},y.a.createElement(h,null,y.a.createElement(ie.a,{value:"default"},y.a.createElement("i",{className:"fa fa-align-justify"})),y.a.createElement(ie.a,{value:"left"},y.a.createElement("i",{className:"fa fa-align-left"})),y.a.createElement(ie.a,{value:"center"},y.a.createElement("i",{className:"fa fa-align-center"})),y.a.createElement(ie.a,{value:"right"},y.a.createElement("i",{className:"fa fa-align-right"}))))),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(K.a,{type:"ghost",onClick:m},"\u53D6\u6D88")))},P=w("m3rI"),Z=w("wMS7"),z=w.n(Z),te="link",Se="upload-image",Pe="code-block",Le="add-table",ge="------------",Ae={default:ge,left:":".concat(ge),center:":".concat(ge,":"),right:"".concat(ge,":")},Ie=w("9VGf"),$e,He;function Ye(){}var lt=0,tt=1e4,Ke="\u2581",xe=`
**\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 rt(S){return/^\d+$/.test(S)?"".concat(S,"px"):S}var qe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Oe=qe?"Cmd":"Ctrl",Ue=($e={},Object(M.a)($e,Oe+"-B","bold"),Object(M.a)($e,Oe+"-I","italic"),$e),U=(He={},Object(M.a)(He,te,"\u6DFB\u52A0\u94FE\u63A5"),Object(M.a)(He,Pe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(M.a)(He,Se,"\u6DFB\u52A0\u56FE\u7247"),Object(M.a)(He,Le,"\u6DFB\u52A0\u8868\u683C"),He),R=Xe.a=function(S){var f=S.defaultValue,m=f===void 0?"":f,v=S.onChange,x=S.width,J=x===void 0?"100%":x,fe=S.height,De=fe===void 0?400:fe,et=S.miniToolbar,nt=et===void 0?!1:et,ot=S.isFocus,xt=ot===void 0?!1:ot,bt=S.watch,ht=S.insertTemp,Ft=S.mode,Ct=Ft===void 0?"markdown":Ft,zt=S.id,Rt=zt===void 0?"markdown-editor-id":zt,yt=S.showResizeBar,on=yt===void 0?!1:yt,Cn=S.noStorage,sn=Cn===void 0?!1:Cn,kn=S.showNullButton,tn=kn===void 0?!1:kn,nr=S.hidetoolBar,On=nr===void 0?!1:nr,Rn=S.fullScreen,Bn=Rn===void 0?!1:Rn,At=S.onBlur,Ze=S.onCMBeforeChange,Zt=S.onFullScreen,Xn=S.className,hn=Xn===void 0?"":Xn,wt=S.disablePaste,Sn=wt===void 0?!1:wt,Pn=S.placeholder,Ln=Pn===void 0?"":Pn,je=S.values,ct=je===void 0?"":je,_n=Object(L.useState)(null),Mn=Object($.a)(_n,2),Be=Mn[0],Kn=Mn[1],Tr=Object(L.useState)(m),ut=Object($.a)(Tr,2),ln=ut[0],Wn=ut[1],$n=Object(L.useState)(bt),un=Object($.a)($n,2),Dn=un[0],st=un[1],pe=Object(L.useState)(Bn),Je=Object($.a)(pe,2),it=Je[0],kt=Je[1],cn=Object(L.useState)(""),Xt=Object($.a)(cn,2),Pt=Xt[0],Lt=Xt[1],Ar=Object(L.useState)(0),xn=Object($.a)(Ar,2),Nn=xn[0],pn=xn[1],Si=Object(L.useState)(De),_i=Object($.a)(Si,2),pr=_i[0],rr=_i[1],Zi=Object(L.useState)(!1),Ti=Object($.a)(Zi,2),Ua=Ti[0],Jr=Ti[1],Vn=Object(L.useRef)(),Or=Object(L.useRef)(),Lr=Object(L.useRef)(),mr=Object(L.useRef)();Object(L.useEffect)(function(){Wn(ct),Be==null||Be.setValue(ct)},[ct]),Object(L.useEffect)(function(){Zt==null||Zt(it)},[it]),Object(L.useEffect)(function(){if(Vn.current){var pt=V.a.fromTextArea(Vn.current,{mode:Ct,lineNumbers:!nt,lineWrapping:!0,value:m,autoCloseTags:!0,autoCloseBrackets:!0});xt&&pt.focus();function mt(gt,Et){if(Sn){Et.preventDefault();return}var _t=Et.clipboardData;if(_t){var Mt=_t.types.toString(),jt=_t.items,Kt=["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(Mt==="Files"||_t.types.indexOf("Files")>-1){if(Et.preventDefault(),Ct=="stex")return;try{var $t,Jn=jt[1];(($t=jt[0])===null||$t===void 0?void 0:$t.kind)==="file"&&(Jn=jt[0]);var Bt=Jn.getAsFile(),ar=Bt.name.split(".").pop();ke(Bt,function(nn){if(nn.id){var qn,Zn,Qr;(Bt==null||((qn=Bt.type)===null||qn===void 0)?void 0:qn.indexOf("image"))>-1?pt.replaceSelection("![,](/api/attachments/".concat(nn.id,"?type=").concat(nn.content_type,")")):(Bt==null||((Zn=Bt.type)===null||Zn===void 0)?void 0:Zn.indexOf("video"))>-1?pt.replaceSelection('<video width="100%" controls src="'.concat(P.a.API_SERVER,"/api/attachments/").concat(nn.id,'"></video>')):(Bt==null||((Qr=Bt.type)===null||Qr===void 0)?void 0:Qr.indexOf("pdf"))>-1?pt.replaceSelection('<a href="'.concat(P.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(Bt.type,'&disposition=inline" target="_blank">').concat(Bt.name,"</a>")):Kt.includes(ar)?pt.replaceSelection('<a href="'.concat(P.a.API_SERVER,"/api/attachments/").concat(nn.id,'?type=office&disposition=inline" target="_blank">').concat(Bt.name,"</a>")):pt.replaceSelection("[".concat(Bt.name,"](").concat(P.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(nn.content_type,")"))}else(nn==null?void 0:nn.status)===401&&(document.location.href="/user/login")})}catch(nn){ye.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return pt.on("paste",mt),Kn(pt),function(){pt.off("paste",mt)}}},[]);var qr=Object(L.useCallback)(function(){if(Or.current)try{}catch(pt){console.log(pt,"---- to set md editor body height")}},[pr,Or,it]);Object(L.useEffect)(function(){function pt(){var gt=new ae.default(function(Et){var _t=Object(re.a)(Et),Mt;try{for(_t.s();!(Mt=_t.n()).done;){var jt=Mt.value;(jt.target.offsetHeight>0||jt.target.offsetWidth>0)&&(qr(),Be.setSize("100%","100%"),Be.refresh())}}catch(Kt){_t.e(Kt)}finally{_t.f()}});return gt.observe(Vn.current.parentElement),gt}if(Be){var mt=pt();return function(){mt.unobserve(Vn.current.parentElement)}}},[Be,qr]),Object(L.useEffect)(function(){if(Be){for(var pt=[],mt=function(){var jt=Et[gt];_t=Object($.a)(jt,2);var Kt=_t[0],$t=_t[1],Jn=Object(M.a)({},Kt,function(){gr($t)});pt.push(Jn),Be.addKeyMap(Jn)},gt=0,Et=Object.entries(Ue);gt<Et.length;gt++){var _t;mt()}return function(){var Mt=Object(re.a)(pt),jt;try{for(Mt.s();!(jt=Mt.n()).done;){var Kt=jt.value;Be.removeKeyMap(Kt)}}catch($t){Mt.e($t)}finally{Mt.f()}}}},[Be]),Object(L.useEffect)(function(){Bn!==it&&kt(Bn)},[Bn]),Object(Ie.a)(function(){if(!sn&&Nn>0){var pt=new Date().getTime(),mt=window.sessionStorage.getItem(Rt);pt>=Nn+tt&&(!mt||mt!==ln)&&(window.sessionStorage.setItem(Rt,ln),Jr(!0))}},tt),Object(L.useEffect)(function(){st(bt)},[Be,bt]),Object(L.useEffect)(function(){Be&&(xt&&Be.focus())},[Be,xt]),Object(L.useEffect)(function(){if(Dn&&Be){var pt=Be.getScrollerElement();function mt(gt){var Et=gt.target;if(mr.current){var _t=Et.scrollTop/Et.scrollHeight;mr.current.scrollTop=mr.current.scrollHeight*_t}}return pt.addEventListener("scroll",mt),function(){pt.removeEventListener("scroll",mt)}}},[Be,Dn]),Object(L.useEffect)(function(){if(Be&&Ze){function pt(mt,gt){Ze(mt,gt)}return Be.on("beforeChange",pt),function(){Be.off("beforeChange",pt)}}},[Be,Ze]),Object(L.useEffect)(function(){if(Be&&At){function pt(){At(Be.getValue())}return Be.on("blur",pt),function(){Be.off("blur",pt)}}},[Be,At]),Object(L.useEffect)(function(){if(Be){function pt(mt){var gt=z.a.sanitize(mt.getValue());Wn(gt),pn(new Date().getTime()),mt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),v&&v(gt)}return Be.on("change",pt),function(){Be.off("change",pt)}}},[Be,v]),Object(L.useEffect)(function(){Be&&(m==null?(Be.setValue(""),Wn("")):m!==Be.getValue()&&(Be.setValue(m),Wn(m),Be.setCursor(Be.lineCount(),0)))},[Be,m]);var gr=Object(L.useCallback)(function(pt){var mt=Be.getCursor(),gt=Be.getSelection(),Et=gt.split(`
`);switch(pt){case"bold":return Be.replaceSelection("**"+gt+"**"),gt===""&&Be.setCursor(mt.line,mt.ch+2),Be.focus();case"italic":return Be.replaceSelection("*"+gt+"*"),gt===""&&Be.setCursor(mt.line,mt.ch+1),Be.focus();case"code":return Be.replaceSelection("`"+gt+"`"),gt===""&&Be.setCursor(mt.line,mt.ch+1),Be.focus();case"inline-latex":return Be.replaceSelection("`$$"+gt+"$$`"),gt===""&&Be.setCursor(mt.line,mt.ch+3),Be.focus();case"latex":return Be.replaceSelection("```latex\n"+gt+"\n```"),Be.setCursor(mt.line+1,gt.length+1),Be.focus();case"line-break":return Be.replaceSelection(`<br/>
`),Be.focus();case"list-ul":return gt===""?Be.replaceSelection("- "+gt):Be.replaceSelection(Et.map(function(_t){return _t===""?"":"- ".concat(_t)}).join(`
`)),Be.focus();case"list-ol":return gt===""?Be.replaceSelection("1. "+gt):Be.replaceSelection(Et.map(function(_t,Mt){return _t===""?"":"".concat(Mt+1,". ").concat(_t)}).join(`
`)),Be.focus();case"add-null-ch":return gt===""&&Be.setCursor(mt.line,mt.ch+1),Be.replaceSelection(Ke),Be.focus();case"inster-template-1":return gt===""&&Be.setCursor(mt.line,mt.ch),Be.replaceSelection(xe),Be.focus();case"eraser":return Be.setValue(""),Be.focus();case"trigger-watch":return st(!Dn),Be.focus();case"trigger-full-screen":return kt(!it),Be.focus();case te:Lt(te);return;case Pe:Lt(Pe);return;case Se:Lt(Se);return;case Le:Lt(Le);return;default:throw new Error}},[Be,Dn,it]),Yn=Object(L.useCallback)(function(pt){Lt("");switch(Pt){case te:var mt=pt.title,gt=pt.link;return Be.replaceSelection("[".concat(mt,"](").concat(gt,")")),Be.focus();case Pe:var Et=pt.language,_t=pt.content;return Be.replaceSelection(["```"+Et,_t,"```"].join(`
`)),Be.focus();case Se:var Mt=pt.src,jt=pt.alt;return Be.replaceSelection("![ ".concat(jt," ]( ").concat(Mt,' "').concat(jt,'" )')),Be.focus();case Le:for(var Kt=pt.row,$t=pt.col,Jn=pt.align,Bt=`
`,ar=0;ar<Kt;ar++){for(var nn=[],qn=[],Zn=0;Zn<$t;Zn++)ar===1&&qn.push(Ae[Jn]),nn.push(" ");ar===1&&(Bt+="| ".concat(qn.join(" | "),` |
`)),Bt+="| ".concat(nn.join($t===1?"":" | "),` |
`)}return Be.replaceSelection(Bt+`
`),Be.focus();default:throw new Error}},[Be,Pt]),Zr=Object(L.useMemo)(function(){switch(Pt){case te:return y.a.createElement(_,{callback:Yn,onCancel:ir});case Pe:return y.a.createElement(c.b,{callback:Yn,onCancel:ir});case Se:return y.a.createElement(we,{callback:Yn,onCancel:ir});case Le:return y.a.createElement(p,{callback:Yn,onCancel:ir});default:return null}},[Pt]);function ir(){Lt("")}Object(L.useEffect)(function(){if(Lr.current){var pt=Lr.current,mt=!1,gt=0;function Et(jt){mt=!0,gt=jt.pageY}function _t(){mt=!1}function Mt(jt){if(mt){var Kt=jt.pageY-gt;Kt<0&&(Kt=0),Kt>300&&(Kt=300);var $t=De+Kt+"px";rr($t)}}return pt.addEventListener("mousedown",Et),document.addEventListener("mousemove",Mt),document.addEventListener("mouseup",_t),function(){pt.removeEventListener("mousedown",Et),document.removeEventListener("mousemove",Mt),document.removeEventListener("mouseup",_t)}}},[Be,Lr]),Object(L.useEffect)(function(){rr(De)},[De]);var Ai=rt(J),Mr=rt(pr),Qi={width:Ai,height:Mr},ea=Object(L.useMemo)(function(){if(Nn){var pt=new Date(Nn),mt=pt.getHours(),gt=pt.getMinutes(),Et=pt.getSeconds();return mt=mt<10?"0"+mt:mt,gt=gt<10?"0"+gt:gt,Et=Et<10?"0"+Et:Et,"".concat(mt,":").concat(gt,":").concat(Et)}return 0},[Nn]);function jn(){window.sessionStorage.removeItem(Rt),Jr(!1),pn(0)}function Ba(){Jr(!1),pn(0),Be.setValue(window.sessionStorage.getItem(Rt))}return y.a.createElement(L.Fragment,null,y.a.createElement("div",{className:"markdown-editor-wrapper",ref:Or},y.a.createElement("div",{className:"markdown-editor-container ".concat(hn," ").concat(Dn?"on-preview":""," ").concat(nt?"mini":""," ").concat(it?"full-screen":""),style:Qi},y.a.createElement(de,{insertTemp:ht,watch:Dn,fullScreen:it,showNullButton:tn,onActionCallback:gr,hidetoolBar:On}),y.a.createElement("div",{className:"markdown-editor-body"},y.a.createElement("div",{className:"codemirror-container"},y.a.createElement("textarea",{ref:Vn,placeholder:Ln})),Dn?y.a.createElement("div",{ref:mr,className:"preview-container"},Ct==="stex"&&y.a.createElement(We,{value:ln}),Ct!=="stex"&&y.a.createElement(Me.a,{value:ln})):null))),on?y.a.createElement("a",{ref:Lr,className:"editor-resize"}):null,y.a.createElement(W.a,null,U[Pt]?y.a.createElement(ve.a,{centered:!0,title:U[Pt],visible:!0,onCancel:ir,footer:null},Zr):null))}},SJMd:function(ft,Xe){/**
* @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 w,I,ve,re=!1,Ee,ye;window.PR_SHOULD_USE_CONTINUATION=!0;var $,M;(function(){var L=window,y=["break,continue,do,else,for,if,return,while"],X=[y,"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"],V=[X,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],ae=[V,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],Ce=[V,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],se=[V,"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"],B="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=[V,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],F="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",le=[y,"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"],oe=[y,"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"],Me=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],We=[ae,se,Ce,j,F,le,oe,Me],he=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Te="str",Ne="kwd",be="com",me="typ",de="lit",W="pun",b="pln",K="tag",G="dec",E="src",q="atn",N="atv",O="nocode",_="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(z){for(var te=0,Se=!1,Pe=!1,Le=0,ge=z.length;Le<ge;++Le){var Ae=z[Le];if(Ae.ignoreCase)Pe=!0;else if(/[a-z]/i.test(Ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Se=!0,Pe=!1;break}}var Ie={b:8,t:9,n:10,v:11,f:12,r:13};function $e(Ke){var xe=Ke.charCodeAt(0);if(xe!==92)return xe;var rt=Ke.charAt(1);return xe=Ie[rt],xe||("0"<=rt&&rt<="7"?parseInt(Ke.substring(1),8):rt==="u"||rt==="x"?parseInt(Ke.substring(2),16):Ke.charCodeAt(1))}function He(Ke){if(Ke<32)return(Ke<16?"\\x0":"\\x")+Ke.toString(16);var xe=String.fromCharCode(Ke);return xe==="\\"||xe==="-"||xe==="]"||xe==="^"?"\\"+xe:xe}function Ye(Ke){var xe=Ke.substring(1,Ke.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=xe[0]==="^",Oe=["["];qe&&Oe.push("^");for(var Ue=qe?1:0,U=xe.length;Ue<U;++Ue){var R=xe[Ue];if(/\\[bdsw]/i.test(R))Oe.push(R);else{var S=$e(R),f;Ue+2<U&&xe[Ue+1]==="-"?(f=$e(xe[Ue+2]),Ue+=2):f=S,rt.push([S,f]),f<65||S>122||(f<65||S>90||rt.push([Math.max(65,S)|32,Math.min(f,90)|32]),f<97||S>122||rt.push([Math.max(97,S)&~32,Math.min(f,122)&~32]))}}rt.sort(function(J,fe){return J[0]-fe[0]||fe[1]-J[1]});for(var m=[],v=[],Ue=0;Ue<rt.length;++Ue){var x=rt[Ue];x[0]<=v[1]+1?v[1]=Math.max(v[1],x[1]):m.push(v=x)}for(var Ue=0;Ue<m.length;++Ue){var x=m[Ue];Oe.push(He(x[0])),x[1]>x[0]&&(x[1]+1>x[0]&&Oe.push("-"),Oe.push(He(x[1])))}return Oe.push("]"),Oe.join("")}function lt(Ke){for(var xe=Ke.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=xe.length,qe=[],Oe=0,Ue=0;Oe<rt;++Oe){var U=xe[Oe];if(U==="(")++Ue;else if(U.charAt(0)==="\\"){var R=+U.substring(1);R&&(R<=Ue?qe[R]=-1:xe[Oe]=He(R))}}for(var Oe=1;Oe<qe.length;++Oe)qe[Oe]===-1&&(qe[Oe]=++te);for(var Oe=0,Ue=0;Oe<rt;++Oe){var U=xe[Oe];if(U==="(")++Ue,qe[Ue]||(xe[Oe]="(?:");else if(U.charAt(0)==="\\"){var R=+U.substring(1);R&&R<=Ue&&(xe[Oe]="\\"+qe[R])}}for(var Oe=0;Oe<rt;++Oe)xe[Oe]==="^"&&xe[Oe+1]!=="^"&&(xe[Oe]="");if(Ke.ignoreCase&&Se)for(var Oe=0;Oe<rt;++Oe){var U=xe[Oe],S=U.charAt(0);U.length>=2&&S==="["?xe[Oe]=Ye(U):S!=="\\"&&(xe[Oe]=U.replace(/[a-zA-Z]/g,function(v){var x=v.charCodeAt(0);return"["+String.fromCharCode(x&~32,x|32)+"]"}))}return xe.join("")}for(var tt=[],Le=0,ge=z.length;Le<ge;++Le){var Ae=z[Le];if(Ae.global||Ae.multiline)throw new Error(""+Ae);tt.push("(?:"+lt(Ae)+")")}return new RegExp(tt.join("|"),Pe?"gi":"g")}function l(z,te){var Se=/(?:^|\s)nocode(?:\s|$)/,Pe=[],Le=0,ge=[],Ae=0;function Ie($e){var He=$e.nodeType;if(He==1){if(Se.test($e.className))return;for(var Ye=$e.firstChild;Ye;Ye=Ye.nextSibling)Ie(Ye);var lt=$e.nodeName.toLowerCase();(lt==="br"||lt==="li")&&(Pe[Ae]=`
`,ge[Ae<<1]=Le++,ge[Ae++<<1|1]=$e)}else if(He==3||He==4){var tt=$e.nodeValue;tt.length&&(te?tt=tt.replace(/\r\n?/g,`
`):tt=tt.replace(/[ \t\r\n]+/g," "),Pe[Ae]=tt,ge[Ae<<1]=Le,Le+=tt.length,ge[Ae++<<1|1]=$e)}}return Ie(z),{sourceCode:Pe.join("").replace(/\n$/,""),spans:ge}}function g(z,te,Se,Pe,Le){if(!Se)return;var ge={sourceNode:z,pre:1,langExtension:null,numberLines:null,sourceCode:Se,spans:null,basePos:te,decorations:null};Pe(ge),Le.push.apply(Le,ge.decorations)}var C=/\S/;function D(z){for(var te=void 0,Se=z.firstChild;Se;Se=Se.nextSibling){var Pe=Se.nodeType;te=Pe===1?te?z:Se:Pe===3&&C.test(Se.nodeValue)?z:te}return te===z?void 0:te}function ee(z,te){var Se={},Pe;(function(){for(var Ae=z.concat(te),Ie=[],$e={},He=0,Ye=Ae.length;He<Ye;++He){var lt=Ae[He],tt=lt[3];if(tt)for(var Ke=tt.length;--Ke>=0;)Se[tt.charAt(Ke)]=lt;var xe=lt[1],rt=""+xe;$e.hasOwnProperty(rt)||(Ie.push(xe),$e[rt]=null)}Ie.push(/[\0-\uffff]/),Pe=c(Ie)})();var Le=te.length,ge=function(Ae){for(var Ie=Ae.sourceCode,$e=Ae.basePos,He=Ae.sourceNode,Ye=[$e,b],lt=0,tt=Ie.match(Pe)||[],Ke={},xe=0,rt=tt.length;xe<rt;++xe){var qe=tt[xe],Oe=Ke[qe],Ue=void 0,U;if(typeof Oe=="string")U=!1;else{var R=Se[qe.charAt(0)];if(R)Ue=qe.match(R[1]),Oe=R[0];else{for(var S=0;S<Le;++S)if(R=te[S],Ue=qe.match(R[1]),Ue){Oe=R[0];break}Ue||(Oe=b)}U=Oe.length>=5&&Oe.substring(0,5)==="lang-",U&&!(Ue&&typeof Ue[1]=="string")&&(U=!1,Oe=E),U||(Ke[qe]=Oe)}var f=lt;if(lt+=qe.length,!U)Ye.push($e+f,Oe);else{var m=Ue[1],v=qe.indexOf(m),x=v+m.length;Ue[2]&&(x=qe.length-Ue[2].length,v=x-m.length);var J=Oe.substring(5);g(He,$e+f,qe.substring(0,v),ge,Ye),g(He,$e+f+v,m,ie(J,m),Ye),g(He,$e+f+x,qe.substring(x),ge,Ye)}}Ae.decorations=Ye};return ge}function we(z){var te=[],Se=[];z.tripleQuotedStrings?te.push([Te,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):z.multiLineStrings?te.push([Te,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):te.push([Te,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),z.verbatimStrings&&Se.push([Te,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Pe=z.hashComments;Pe&&(z.cStyleComments?(Pe>1?te.push([be,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):te.push([be,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Se.push([Te,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):te.push([be,/^#[^\r\n]*/,null,"#"])),z.cStyleComments&&(Se.push([be,/^\/\/[^\r\n]*/,null]),Se.push([be,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Le=z.regexLiterals;if(Le){var ge=Le>1?"":`
\r`,Ae=ge?".":"[\\S\\s]",Ie="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+Ae+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+Ae+")*(?:\\x5D|$))+/";Se.push(["lang-regex",RegExp("^"+_+"("+Ie+")")])}var $e=z.types;$e&&Se.push([me,$e]);var He=(""+z.keywords).replace(/^ | $/g,"");He.length&&Se.push([Ne,new RegExp("^(?:"+He.replace(/[\s,]+/g,"|")+")\\b"),null]),te.push([b,/^\s+/,null,` \r
\xA0`]);var Ye="^.[^\\s\\w.$@'\"`/\\\\]*";return z.regexLiterals&&(Ye+="(?!s*/)"),Se.push([de,/^@[a-z_$][a-z_$@0-9]*/i,null],[me,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[b,/^[a-z_$][a-z_$@0-9]*/i,null],[de,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[b,/^\\[\s\S]?/,null],[W,new RegExp(Ye),null]),ee(te,Se)}var ce=we({keywords:We,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ke(z,te,Se){for(var Pe=/(?:^|\s)nocode(?:\s|$)/,Le=/\r\n?|\n/,ge=z.ownerDocument,Ae=ge.createElement("li");z.firstChild;)Ae.appendChild(z.firstChild);var Ie=[Ae];function $e(xe){var rt=xe.nodeType;if(rt==1&&!Pe.test(xe.className))if(xe.nodeName==="br")He(xe),xe.parentNode&&xe.parentNode.removeChild(xe);else for(var qe=xe.firstChild;qe;qe=qe.nextSibling)$e(qe);else if((rt==3||rt==4)&&Se){var Oe=xe.nodeValue,Ue=Oe.match(Le);if(Ue){var U=Oe.substring(0,Ue.index);xe.nodeValue=U;var R=Oe.substring(Ue.index+Ue[0].length);if(R){var S=xe.parentNode;S.insertBefore(ge.createTextNode(R),xe.nextSibling)}He(xe),U||xe.parentNode.removeChild(xe)}}}function He(xe){for(;!xe.nextSibling;)if(xe=xe.parentNode,!xe)return;function rt(Ue,U){var R=U?Ue.cloneNode(!1):Ue,S=Ue.parentNode;if(S){var f=rt(S,1),m=Ue.nextSibling;f.appendChild(R);for(var v=m;v;v=m)m=v.nextSibling,f.appendChild(v)}return R}for(var qe=rt(xe.nextSibling,0),Oe;(Oe=qe.parentNode)&&Oe.nodeType===1;)qe=Oe;Ie.push(qe)}for(var Ye=0;Ye<Ie.length;++Ye)$e(Ie[Ye]);te===(te|0)&&Ie[0].setAttribute("value",te);var lt=ge.createElement("ol");lt.className="linenums";for(var tt=Math.max(0,te-1|0)||0,Ye=0,Ke=Ie.length;Ye<Ke;++Ye)Ae=Ie[Ye],Ae.className="L"+(Ye+tt)%10,Ae.firstChild||Ae.appendChild(ge.createTextNode("\xA0")),lt.appendChild(Ae);z.appendChild(lt)}function ne(z){var te=/\bMSIE\s(\d+)/.exec(navigator.userAgent);te=te&&+te[1]<=8;var Se=/\n/g,Pe=z.sourceCode,Le=Pe.length,ge=0,Ae=z.spans,Ie=Ae.length,$e=0,He=z.decorations,Ye=He.length,lt=0;He[Ye]=Le;var tt,Ke;for(Ke=tt=0;Ke<Ye;)He[Ke]!==He[Ke+2]?(He[tt++]=He[Ke++],He[tt++]=He[Ke++]):Ke+=2;for(Ye=tt,Ke=tt=0;Ke<Ye;){for(var xe=He[Ke],rt=He[Ke+1],qe=Ke+2;qe+2<=Ye&&He[qe+1]===rt;)qe+=2;He[tt++]=xe,He[tt++]=rt,Ke=qe}Ye=He.length=tt;var Oe=z.sourceNode,Ue="";Oe&&(Ue=Oe.style.display,Oe.style.display="none");try{for(var U=null;$e<Ie;){var R=Ae[$e],S=Ae[$e+2]||Le,f=He[lt+2]||Le,qe=Math.min(S,f),m=Ae[$e+1],v;if(m.nodeType!==1&&(v=Pe.substring(ge,qe))){te&&(v=v.replace(Se,"\r")),m.nodeValue=v;var x=m.ownerDocument,J=x.createElement("span");J.className=He[lt+1];var fe=m.parentNode;fe.replaceChild(J,m),J.appendChild(m),ge<S&&(Ae[$e+1]=m=x.createTextNode(Pe.substring(qe,S)),fe.insertBefore(m,J.nextSibling))}ge=qe,ge>=S&&($e+=2),ge>=f&&(lt+=2)}}finally{Oe&&(Oe.style.display=Ue)}}var ue={};function H(z,te){for(var Se=te.length;--Se>=0;){var Pe=te[Se];ue.hasOwnProperty(Pe)?L.console&&console.warn("cannot override language handler %s",Pe):ue[Pe]=z}}function ie(z,te){return z&&ue.hasOwnProperty(z)||(z=/^\s*</.test(te)?"default-markup":"default-code"),ue[z]}H(ce,["default-code"]),H(ee([],[[b,/^[^<?]+/],[G,/^<!\w[^>]*(?:>|$)/],[be,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[W,/^(?:<[%?]|[%?]>)/],["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(ee([[b,/^[\s]+/,null,` \r
`],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[K,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[q,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[W,/^[=<>\/]+/],["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(ee([],[[N,/^[\s\S]+/]]),["uq.val"]),H(we({keywords:ae,hashComments:!0,cStyleComments:!0,types:he}),["c","cc","cpp","cxx","cyc","m"]),H(we({keywords:"null,true,false"}),["json"]),H(we({keywords:se,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:he}),["cs"]),H(we({keywords:Ce,cStyleComments:!0}),["java"]),H(we({keywords:Me,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),H(we({keywords:le,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),H(we({keywords:F,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),H(we({keywords:oe,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),H(we({keywords:j,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),H(we({keywords:B,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),H(ee([],[[Te,/^[\s\S]+/]]),["regex"]);function h(z){var te=z.langExtension;try{var Se=l(z.sourceNode,z.pre),Pe=Se.sourceCode;z.sourceCode=Pe,z.spans=Se.spans,z.basePos=0,ie(te,Pe)(z),ne(z)}catch(Le){L.console&&console.log(Le&&Le.stack||Le)}}function T(z,te,Se){var Pe=Se||!1,Le=te||null,ge=document.createElement("div");ge.innerHTML="<pre>"+z+"</pre>",ge=ge.firstChild,Pe&&ke(ge,Pe,!0);var Ae={langExtension:Le,numberLines:Pe,sourceNode:ge,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(Ae),ge.innerHTML}function p(z,te){var Se=te||document.body,Pe=Se.ownerDocument||document;function Le(R){return Se.getElementsByTagName(R)}for(var ge=[Le("pre"),Le("code"),Le("xmp")],Ae=[],Ie=0;Ie<ge.length;++Ie)for(var $e=0,He=ge[Ie].length;$e<He;++$e)Ae.push(ge[Ie][$e]);ge=null;var Ye=Date;Ye.now||(Ye={now:function(){return+new Date}});var lt=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ke=/\bprettyprint\b/,xe=/\bprettyprinted\b/,rt=/pre|xmp/i,qe=/^code$/i,Oe=/^(?:pre|code|xmp)$/i,Ue={};function U(){for(var R=L.PR_SHOULD_USE_CONTINUATION?Ye.now()+250:Infinity;lt<Ae.length&&Ye.now()<R;lt++){for(var S=Ae[lt],f=Ue,m=S;m=m.previousSibling;){var v=m.nodeType,x=(v===7||v===8)&&m.nodeValue;if(x?!/^\??prettify\b/.test(x):v!==3||/\S/.test(m.nodeValue))break;if(x){f={},x.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Rt,yt,on){f[yt]=on});break}}var J=S.className;if((f!==Ue||Ke.test(J))&&!xe.test(J)){for(var fe=!1,De=S.parentNode;De;De=De.parentNode){var et=De.tagName;if(Oe.test(et)&&De.className&&Ke.test(De.className)){fe=!0;break}}if(!fe){S.className+=" prettyprinted";var nt=f.lang;if(!nt){nt=J.match(tt);var ot;!nt&&(ot=D(S))&&qe.test(ot.tagName)&&(nt=ot.className.match(tt)),nt&&(nt=nt[1])}var xt;if(rt.test(S.tagName))xt=1;else{var bt=S.currentStyle,ht=Pe.defaultView,Ft=bt?bt.whiteSpace:ht&&ht.getComputedStyle?ht.getComputedStyle(S,null).getPropertyValue("white-space"):0;xt=Ft&&Ft.substring(0,3)==="pre"}var Ct=f.linenums;(Ct=Ct==="true"||+Ct)||(Ct=J.match(/\blinenums\b(?::(\d+))?/),Ct=Ct?Ct[1]&&Ct[1].length?+Ct[1]:!0:!1),Ct&&ke(S,Ct,xt);var zt={langExtension:nt,sourceNode:S,numberLines:Ct,pre:xt,sourceCode:null,basePos:null,spans:null,decorations:null};h(zt)}}}lt<Ae.length?L.setTimeout(U,250):typeof z=="function"&&z()}U()}var P=L.PR={createSimpleLexer:ee,registerLangHandler:H,sourceDecorator:we,PR_ATTRIB_NAME:q,PR_ATTRIB_VALUE:N,PR_COMMENT:be,PR_DECLARATION:G,PR_KEYWORD:Ne,PR_LITERAL:de,PR_NOCODE:O,PR_PLAIN:b,PR_PUNCTUATION:W,PR_SOURCE:E,PR_STRING:Te,PR_TAG:K,PR_TYPE:me,prettyPrintOne:re?L.prettyPrintOne=T:$=T,prettyPrint:M=re?L.prettyPrint=p:M=p},Z=L.define;typeof Z=="function"&&Z.amd&&Z("google-code-prettify",[],function(){return P})})()},"VrN/":function(ft,Xe,w){(function(I,ve){ft.exports=ve()})(this,function(){"use strict";var I=navigator.userAgent,ve=navigator.platform,re=/gecko\/\d/i.test(I),Ee=/MSIE \d/.test(I),ye=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(I),$=/Edge\/(\d+)/.exec(I),M=Ee||ye||$,L=M&&(Ee?document.documentMode||6:+($||ye)[1]),y=!$&&/WebKit\//.test(I),X=y&&/Qt\/\d+\.\d+/.test(I),V=!$&&/Chrome\//.test(I),ae=/Opera\//.test(I),Ce=/Apple Computer/.test(navigator.vendor),se=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(I),B=/PhantomJS/.test(I),j=!$&&/AppleWebKit/.test(I)&&/Mobile\/\w+/.test(I),F=/Android/.test(I),le=j||F||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(I),oe=j||/Mac/.test(ve),Me=/\bCrOS\b/.test(I),We=/win/i.test(ve),he=ae&&I.match(/Version\/(\d*\.\d*)/);he&&(he=Number(he[1])),he&&he>=15&&(ae=!1,y=!0);var Te=oe&&(X||ae&&(he==null||he<12.11)),Ne=re||M&&L>=9;function be(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var me=function(e,t){var r=e.className,n=be(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 de(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function W(e,t){return de(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 K(e,t,r,n){var i=b(e,t,r,n);return i.setAttribute("role","presentation"),i}var G;document.createRange?G=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:G=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 E(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 q(){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 N(e,t){var r=e.className;be(t).test(r)||(e.className+=(r?" ":"")+t)}function O(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!be(r[n]).test(t)&&(t+=" "+r[n]);return t}var _=function(e){e.select()};j?_=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:M&&(_=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 l(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 g(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var s=e.indexOf(" ",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=r-o%r,a=s+1}}var C=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};C.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},C.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 D(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var ee=50,we={toString:function(){return"CodeMirror.Pass"}},ce={scroll:!1},ke={origin:"*mouse"},ne={origin:"+move"};function ue(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 ie(e){for(;H.length<=e;)H.push(h(H)+" ");return H[e]}function h(e){return e[e.length-1]}function T(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function p(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function P(){}function Z(e,t){var r;return Object.create?r=Object.create(e):(P.prototype=e,r=new P),t&&l(t,r),r}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||z.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&te(e)?!0:t.test(e):te(e)}function Pe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Le=/[\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 ge(e){return e.charCodeAt(0)>=768&&Le.test(e)}function Ae(e,t,r){for(;(r<0?t>0:t<e.length)&&ge(e.charAt(t));)t+=r;return t}function Ie(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function $e(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var He=null;function Ye(e,t,r){var n;He=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:He=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:He=i)}return n!=null?n:He}var lt=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]/,s=/[1n]/;function u(d,k,A){this.level=d,this.from=k,this.to=A}return function(d,k){var A=k=="ltr"?"L":"R";if(d.length==0||k=="ltr"&&!n.test(d))return!1;for(var Q=d.length,Y=[],_e=0;_e<Q;++_e)Y.push(r(d.charCodeAt(_e)));for(var Re=0,Fe=A;Re<Q;++Re){var ze=Y[Re];ze=="m"?Y[Re]=Fe:Fe=ze}for(var Ve=0,Ge=A;Ve<Q;++Ve){var Qe=Y[Ve];Qe=="1"&&Ge=="r"?Y[Ve]="n":a.test(Qe)&&(Ge=Qe,Qe=="r"&&(Y[Ve]="R"))}for(var dt=1,at=Y[0];dt<Q-1;++dt){var vt=Y[dt];vt=="+"&&at=="1"&&Y[dt+1]=="1"?Y[dt]="1":vt==","&&at==Y[dt+1]&&(at=="1"||at=="n")&&(Y[dt]=at),at=vt}for(var Ot=0;Ot<Q;++Ot){var Jt=Y[Ot];if(Jt==",")Y[Ot]="N";else if(Jt=="%"){var Nt=void 0;for(Nt=Ot+1;Nt<Q&&Y[Nt]=="%";++Nt);for(var En=Ot&&Y[Ot-1]=="!"||Nt<Q&&Y[Nt]=="1"?"1":"N",vn=Ot;vn<Nt;++vn)Y[vn]=En;Ot=Nt-1}}for(var Wt=0,bn=A;Wt<Q;++Wt){var en=Y[Wt];bn=="L"&&en=="1"?Y[Wt]="L":a.test(en)&&(bn=en)}for(var Gt=0;Gt<Q;++Gt)if(i.test(Y[Gt])){var Ht=void 0;for(Ht=Gt+1;Ht<Q&&i.test(Y[Ht]);++Ht);for(var It=(Gt?Y[Gt-1]:A)=="L",yn=(Ht<Q?Y[Ht]:A)=="L",Vr=It==yn?It?"L":"R":A,hr=Gt;hr<Ht;++hr)Y[hr]=Vr;Gt=Ht-1}for(var an=[],Gn,qt=0;qt<Q;)if(o.test(Y[qt])){var Ia=qt;for(++qt;qt<Q&&o.test(Y[qt]);++qt);an.push(new u(0,Ia,qt))}else{var tr=qt,Sr=an.length,_r=k=="rtl"?1:0;for(++qt;qt<Q&&Y[qt]!="L";++qt);for(var fn=tr;fn<qt;)if(s.test(Y[fn])){tr<fn&&(an.splice(Sr,0,new u(1,tr,fn)),Sr+=_r);var Yr=fn;for(++fn;fn<qt&&s.test(Y[fn]);++fn);an.splice(Sr,0,new u(2,Yr,fn)),Sr+=_r,tr=fn}else++fn;tr<qt&&an.splice(Sr,0,new u(1,tr,qt))}return k=="ltr"&&(an[0].level==1&&(Gn=d.match(/^\s+/))&&(an[0].from=Gn[0].length,an.unshift(new u(0,0,Gn[0].length))),h(an).level==1&&(Gn=d.match(/\s+$/))&&(h(an).to-=Gn[0].length,an.push(new u(0,Q-Gn[0].length,Q)))),k=="rtl"?an.reverse():an}}();function tt(e,t){var r=e.order;return r==null&&(r=e.order=lt(e.text,t)),r}var Ke=[],xe=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]||Ke).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Ke}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=D(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function Oe(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 Ue(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,r||t.type,e,t),v(t)||t.codemirrorIgnore}function U(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)D(r,t[n])==-1&&r.push(t[n])}function R(e,t){return rt(e,t).length>0}function S(e){e.prototype.on=function(t,r){xe(this,t,r)},e.prototype.off=function(t,r){qe(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function m(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function v(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function x(e){f(e),m(e)}function J(e){return e.target||e.srcElement}function fe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),oe&&e.ctrlKey&&t==1&&(t=3),t}var De=function(){if(M&&L<9)return!1;var e=b("div");return"draggable"in e||"dragDrop"in e}(),et;function nt(e){if(et==null){var t=b("span","\u200B");W(e,b("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(et=t.offsetWidth<=1&&t.offsetHeight>2&&!(M&&L<8))}var r=et?b("span","\u200B"):b("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var ot;function xt(e){if(ot!=null)return ot;var t=W(e,document.createTextNode("A\u062EA")),r=G(t,0,1).getBoundingClientRect(),n=G(t,1,2).getBoundingClientRect();return de(e),!r||r.left==r.right?!1:ot=n.right-r.right<3}var bt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ht=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},Ft=function(){var e=b("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ct=null;function zt(e){if(Ct!=null)return Ct;var t=W(e,b("span","x")),r=t.getBoundingClientRect(),n=G(t,0,1).getBoundingClientRect();return Ct=Math.abs(r.left-n.left)>1}var Rt={},yt={};function on(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Rt[e]=t}function Cn(e,t){yt[e]=t}function sn(e){if(typeof e=="string"&&yt.hasOwnProperty(e))e=yt[e];else if(e&&typeof e.name=="string"&&yt.hasOwnProperty(e.name)){var t=yt[e.name];typeof t=="string"&&(t={name:t}),e=Z(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return sn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return sn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function kn(e,t){t=sn(t);var r=Rt[t.name];if(!r)return kn(e,"text/plain");var n=r(e,t);if(tn.hasOwnProperty(t.name)){var i=tn[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 tn={};function nr(e,t){var r=tn.hasOwnProperty(e)?tn[e]:tn[e]={};l(t,r)}function On(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 Rn(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 Bn(e,t,r){return e.startState?e.startState(t,r):!0}var At=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};At.prototype.eol=function(){return this.pos>=this.string.length},At.prototype.sol=function(){return this.pos==this.lineStart},At.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},At.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},At.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},At.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},At.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},At.prototype.skipToEnd=function(){this.pos=this.string.length},At.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},At.prototype.backUp=function(e){this.pos-=e},At.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=g(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?g(this.string,this.lineStart,this.tabSize):0)},At.prototype.indentation=function(){return g(this.string,null,this.tabSize)-(this.lineStart?g(this.string,this.lineStart,this.tabSize):0)},At.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)}},At.prototype.current=function(){return this.string.slice(this.start,this.pos)},At.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},At.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},At.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ze(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function Zt(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 Xn(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function hn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function wt(e){if(e.parent==null)return null;for(var t=e.parent,r=D(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 Sn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o],u=s.height;if(t<u)break;t-=u}return r+o}function Pn(e,t){return t>=e.first&&t<e.first+e.size}function Ln(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function je(e,t,r){if(r===void 0&&(r=null),!(this instanceof je))return new je(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ct(e,t){return e.line-t.line||e.ch-t.ch}function _n(e,t){return e.sticky==t.sticky&&ct(e,t)==0}function Mn(e){return je(e.line,e.ch)}function Be(e,t){return ct(e,t)<0?t:e}function Kn(e,t){return ct(e,t)<0?e:t}function Tr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ut(e,t){if(t.line<e.first)return je(e.first,0);var r=e.first+e.size-1;return t.line>r?je(r,Ze(e,r).text.length):ln(t,Ze(e,t.line).text.length)}function ln(e,t){var r=e.ch;return r==null||r>t?je(e.line,t):r<0?je(e.line,0):e}function Wn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ut(e,t[n]);return r}var $n=function(e,t){this.state=e,this.lookAhead=t},un=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},un.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}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,t,r){return t instanceof $n?new un(e,On(e.mode,t.state),r,t.lookAhead):new un(e,On(e.mode,t),r)},un.prototype.save=function(e){var t=e!==!1?On(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new $n(t,this.maxLookAhead):t};function Dn(e,t,r,n){var i=[e.state.modeGen],a={};Lt(e,t.text,e.doc.mode,r,function(d,k){return i.push(d,k)},a,n);for(var o=r.state,s=function(d){r.baseTokens=i;var k=e.state.overlays[d],A=1,Q=0;r.state=!0,Lt(e,t.text,k.mode,r,function(Y,_e){for(var Re=A;Q<Y;){var Fe=i[A];Fe>Y&&i.splice(A,1,Y,i[A+1],Fe),A+=2,Q=Math.min(Y,Fe)}if(!_e)return;if(k.opaque)i.splice(Re,A-Re,Y,"overlay "+_e),A=Re+2;else for(;Re<A;Re+=2){var ze=i[Re+1];i[Re+1]=(ze?ze+" ":"")+"overlay "+_e}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)s(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function st(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=pe(e,wt(t)),i=t.text.length>e.options.maxHighlightLength&&On(e.doc.mode,n.state),a=Dn(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 pe(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new un(n,!0,t);var a=Ar(e,t,r),o=a>n.first&&Ze(n,a-1).stateAfter,s=o?un.fromSaved(n,o,a):new un(n,Bn(n.mode),a);return n.iter(a,t,function(u){Je(e,u.text,s);var d=s.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Je(e,t,r,n){var i=e.doc.mode,a=new At(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&it(i,r.state);!a.eol();)kt(i,a,r.state),a.start=a.pos}function it(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Rn(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function kt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Rn(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 cn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Xt(e,t,r,n){var i=e.doc,a=i.mode,o;t=ut(i,t);var s=Ze(i,t.line),u=pe(e,t.line,r),d=new At(s.text,e.options.tabSize,u),k;for(n&&(k=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=kt(a,d,u.state),n&&k.push(new cn(d,o,On(i.mode,u.state)));return n?k:new cn(d,o,u.state)}function Pt(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 Lt(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var u=0,d=null,k=new At(t,e.options.tabSize,n),A,Q=e.options.addModeClass&&[null];for(t==""&&Pt(it(r,n.state),a);!k.eol();){if(k.pos>e.options.maxHighlightLength?(s=!1,o&&Je(e,t,n,k.pos),k.pos=t.length,A=null):A=Pt(kt(r,k,n.state,Q),a),Q){var Y=Q[0].name;Y&&(A="m-"+(A?Y+" "+A:Y))}if(!s||d!=A){for(;u<k.start;)u=Math.min(k.start,u+5e3),i(u,d);d=A}k.start=k.pos}for(;u<k.pos;){var _e=Math.min(k.pos,u+5e3);i(_e,d),u=_e}}function Ar(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var u=Ze(a,s-1),d=u.stateAfter;if(d&&(!r||s+(d instanceof $n?d.lookAhead:0)<=a.modeFrontier))return s;var k=g(u.text,null,e.options.tabSize);(i==null||n>k)&&(i=s-1,n=k)}return i}function xn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof $n)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Nn=!1,pn=!1;function Si(){Nn=!0}function _i(){pn=!0}function pr(e,t,r){this.marker=e,this.from=t,this.to=r}function rr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Zi(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ti(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Ua(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(s||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new pr(o,a.from,u?null:a.to))}}return n}function Jr(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(s||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new pr(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Vn(e,t){if(t.full)return null;var r=Pn(e,t.from.line)&&Ze(e,t.from.line).markedSpans,n=Pn(e,t.to.line)&&Ze(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ct(t.from,t.to)==0,s=Ua(r,i,o),u=Jr(n,a,o),d=t.text.length==1,k=h(t.text).length+(d?i:0);if(s)for(var A=0;A<s.length;++A){var Q=s[A];if(Q.to==null){var Y=rr(u,Q.marker);Y?d&&(Q.to=Y.to==null?null:Y.to+k):Q.to=i}}if(u)for(var _e=0;_e<u.length;++_e){var Re=u[_e];if(Re.to!=null&&(Re.to+=k),Re.from==null){var Fe=rr(s,Re.marker);Fe||(Re.from=k,d&&(s||(s=[])).push(Re))}else Re.from+=k,d&&(s||(s=[])).push(Re)}s&&(s=Or(s)),u&&u!=s&&(u=Or(u));var ze=[s];if(!d){var Ve=t.text.length-2,Ge;if(Ve>0&&s)for(var Qe=0;Qe<s.length;++Qe)s[Qe].to==null&&(Ge||(Ge=[])).push(new pr(s[Qe].marker,null,null));for(var dt=0;dt<Ve;++dt)ze.push(Ge);ze.push(u)}return ze}function Or(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 Lr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(Y){if(Y.markedSpans)for(var _e=0;_e<Y.markedSpans.length;++_e){var Re=Y.markedSpans[_e].marker;Re.readOnly&&(!n||D(n,Re)==-1)&&(n||(n=[])).push(Re)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],s=o.find(0),u=0;u<i.length;++u){var d=i[u];if(ct(d.to,s.from)<0||ct(d.from,s.to)>0)continue;var k=[u,1],A=ct(d.from,s.from),Q=ct(d.to,s.to);(A<0||!o.inclusiveLeft&&!A)&&k.push({from:d.from,to:s.from}),(Q>0||!o.inclusiveRight&&!Q)&&k.push({from:s.to,to:d.to}),i.splice.apply(i,k),u+=k.length-3}return i}function mr(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 qr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function gr(e){return e.inclusiveLeft?-1:0}function Yn(e){return e.inclusiveRight?1:0}function Zr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=ct(n.from,i.from)||gr(e)-gr(t);if(a)return-a;var o=ct(n.to,i.to)||Yn(e)-Yn(t);return o||t.id-e.id}function ir(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||Zr(n,i.marker)<0)&&(n=i.marker);return n}function Ai(e){return ir(e,!0)}function Mr(e){return ir(e,!1)}function Qi(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||Zr(n,a.marker)<0)&&(n=a.marker)}return n}function ea(e,t,r,n,i){var a=Ze(e,t),o=pn&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var u=o[s];if(!u.marker.collapsed)continue;var d=u.marker.find(0),k=ct(d.from,r)||gr(u.marker)-gr(i),A=ct(d.to,n)||Yn(u.marker)-Yn(i);if(k>=0&&A<=0||k<=0&&A>=0)continue;if(k<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ct(d.to,r)>=0:ct(d.to,r)>0)||k>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ct(d.from,n)<=0:ct(d.from,n)<0))return!0}}function jn(e){for(var t;t=Ai(e);)e=t.find(-1,!0).line;return e}function Ba(e){for(var t;t=Mr(e);)e=t.find(1,!0).line;return e}function pt(e){for(var t,r;t=Mr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function mt(e,t){var r=Ze(e,t),n=jn(r);return r==n?t:wt(n)}function gt(e,t){if(t>e.lastLine())return t;var r=Ze(e,t),n;if(!Et(e,r))return t;for(;n=Mr(r);)r=n.find(1,!0).line;return wt(r)+1}function Et(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&&_t(e,t,n))return!0}}function _t(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return _t(e,n.line,rr(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)&&_t(e,t,i))return!0}function Mt(e){e=jn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==r)break;t+=s.height}return t}function jt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ai(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Mr(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 Kt(e){var t=e.display,r=e.doc;t.maxLine=Ze(r,r.first),t.maxLineLength=jt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=jt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var $t=function(e,t,r){this.text=e,qr(this,t),this.height=r?r(this):1};$t.prototype.lineNo=function(){return wt(this)},S($t);function Jn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),mr(e),qr(e,r);var i=n?n(e):1;i!=e.height&&hn(e,i)}function Bt(e){e.parent=null,mr(e)}var ar={},nn={};function qn(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?nn:ar;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zn(e,t){var r=K("span",null,null,y?"padding-right: .1px":null),n={pre:K("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,xt(e.display.measure)&&(o=tt(a,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&wt(a);As(a,n,st(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=O(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=O(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(nt(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(y){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 Oe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=O(n.pre.className,n.textClass||"")),n}function Qr(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 s=e.splitSpaces?_s(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,k;if(!u.test(t))e.col+=t.length,k=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,k),M&&L<9&&(d=!0),e.pos+=t.length;else{k=document.createDocumentFragment();for(var A=0;;){u.lastIndex=A;var Q=u.exec(t),Y=Q?Q.index-A:t.length-A;if(Y){var _e=document.createTextNode(s.slice(A,A+Y));M&&L<9?k.appendChild(b("span",[_e])):k.appendChild(_e),e.map.push(e.pos,e.pos+Y,_e),e.col+=Y,e.pos+=Y}if(!Q)break;A+=Y+1;var Re=void 0;if(Q[0]==" "){var Fe=e.cm.options.tabSize,ze=Fe-e.col%Fe;Re=k.appendChild(b("span",ie(ze),"cm-tab")),Re.setAttribute("role","presentation"),Re.setAttribute("cm-text"," "),e.col+=ze}else Q[0]=="\r"||Q[0]==`
`?(Re=k.appendChild(b("span",Q[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Re.setAttribute("cm-text",Q[0]),e.col+=1):(Re=e.cm.options.specialCharPlaceholder(Q[0]),Re.setAttribute("cm-text",Q[0]),M&&L<9?k.appendChild(b("span",[Re])):k.appendChild(Re),e.col+=1);e.map.push(e.pos,e.pos+1,Re),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Ve=r||"";n&&(Ve+=n),i&&(Ve+=i);var Ge=b("span",[k],Ve,a);if(o)for(var Qe in o)o.hasOwnProperty(Qe)&&Qe!="style"&&Qe!="class"&&Ge.setAttribute(Qe,o[Qe]);return e.content.appendChild(Ge)}e.content.appendChild(k)}function _s(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),n+=a,r=a==" "}return n}function Ts(e,t){return function(r,n,i,a,o,s,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,k=d+n.length;;){for(var A=void 0,Q=0;Q<t.length&&!(A=t[Q],A.to>d&&A.from<=d);Q++);if(A.to>=k)return e(r,n,i,a,o,s,u);e(r,n.slice(0,A.to-d),i,a,null,s,u),a=null,n=n.slice(A.to-d),d=A.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 As(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]),qn(r[o+1],t.cm.options));return}for(var s=i.length,u=0,d=1,k="",A,Q,Y=0,_e,Re,Fe,ze,Ve;;){if(Y==u){_e=Re=Fe=Q="",Ve=null,ze=null,Y=Infinity;for(var Ge=[],Qe=void 0,dt=0;dt<n.length;++dt){var at=n[dt],vt=at.marker;if(vt.type=="bookmark"&&at.from==u&&vt.widgetNode)Ge.push(vt);else if(at.from<=u&&(at.to==null||at.to>u||vt.collapsed&&at.to==u&&at.from==u)){if(at.to!=null&&at.to!=u&&Y>at.to&&(Y=at.to,Re=""),vt.className&&(_e+=" "+vt.className),vt.css&&(Q=(Q?Q+";":"")+vt.css),vt.startStyle&&at.from==u&&(Fe+=" "+vt.startStyle),vt.endStyle&&at.to==Y&&(Qe||(Qe=[])).push(vt.endStyle,at.to),vt.title&&((Ve||(Ve={})).title=vt.title),vt.attributes)for(var Ot in vt.attributes)(Ve||(Ve={}))[Ot]=vt.attributes[Ot];vt.collapsed&&(!ze||Zr(ze.marker,vt)<0)&&(ze=at)}else at.from>u&&Y>at.from&&(Y=at.from)}if(Qe)for(var Jt=0;Jt<Qe.length;Jt+=2)Qe[Jt+1]==Y&&(Re+=" "+Qe[Jt]);if(!ze||ze.from==u)for(var Nt=0;Nt<Ge.length;++Nt)Wa(t,0,Ge[Nt]);if(ze&&(ze.from||0)==u){if(Wa(t,(ze.to==null?s+1:ze.to)-u,ze.marker,ze.from==null),ze.to==null)return;ze.to==u&&(ze=!1)}}if(u>=s)break;for(var En=Math.min(s,Y);;){if(k){var vn=u+k.length;if(!ze){var Wt=vn>En?k.slice(0,En-u):k;t.addToken(t,Wt,A?A+_e:_e,Fe,u+Wt.length==Y?Re:"",Q,Ve)}if(vn>=En){k=k.slice(En-u),u=En;break}u=vn,Fe=""}k=i.slice(a,a=r[d++]),A=qn(r[d++],t.cm.options)}}}function Ha(e,t,r){this.line=t,this.rest=pt(t),this.size=this.rest?wt(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Et(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Ha(e.doc,Ze(e.doc,a),a);i=a+o.size,n.push(o)}return n}var Dr=null;function Os(e){Dr?Dr.ops.push(e):e.ownsGroup=Dr={ops:[e],delayedCallbacks:[]}}function Ls(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{Ls(r)}finally{Dr=null,t(r)}}var ei=null;function Qt(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;Dr?i=Dr.delayedCallbacks:ei?i=ei:(i=ei=[],setTimeout(Ds,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){var e=ei;ei=null;for(var t=0;t<e.length;++t)e[t]()}function za(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ps(e,t):a=="gutter"?Xa(e,t,r,n):a=="class"?ta(e,t):a=="widget"&&Ns(e,t,n)}t.changes=null}function ti(e){return e.node==e.text&&(e.node=b("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),M&&L<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=ti(t);t.background=n.insertBefore(b("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ga(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zn(e,t)}function Ps(e,t){var r=t.text.className,n=Ga(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,ta(e,t)):r&&(t.text.className=r)}function ta(e,t){Rs(e,t),t.line.wrapClass?ti(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=ti(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=ti(t),s=t.gutter=b("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(b("div",Ln(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,k=a.hasOwnProperty(d)&&a[d];k&&s.appendChild(b("div",[k],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=be("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ka(e,t,r)}function js(e,t,r,n){var i=Ga(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ta(e,t),Xa(e,t,r,n),Ka(e,t,n),t.node}function Ka(e,t,r){if($a(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)$a(e,t.rest[n],t,r,!1)}function $a(e,t,r,n,i){if(!t.widgets)return;for(var a=ti(r),o=0,s=t.widgets;o<s.length;++o){var u=s[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),Qt(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 ni(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!E(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;"),W(t.display.measure,b("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Qn(e,t){for(var r=J(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 na(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Va(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=W(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 Hn(e){return ee-e.display.nativeBarWidth}function vr(e){return e.display.scroller.clientWidth-Hn(e)-e.display.barWidth}function ra(e){return e.display.scroller.clientHeight-Hn(e)-e.display.barHeight}function Fs(e,t,r){var n=e.options.lineWrapping,i=n&&vr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var u=o[s],d=o[s+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function Ya(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(wt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Us(e,t){t=jn(t);var r=wt(t),n=e.display.externalMeasured=new Ha(e.doc,t,r);n.lineN=r;var i=n.built=Zn(e,n);return n.text=i.pre,W(e.display.lineMeasure,i.pre),n}function Ja(e,t,r,n){return zn(e,Rr(e,t),r,n)}function ia(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[xr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Rr(e,t){var r=wt(t),n=ia(e,r);n&&!n.text?n=null:n&&n.changes&&(za(e,n,r,ca(e)),e.curOp.forceUpdate=!0),n||(n=Us(e,t));var i=Ya(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function zn(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||(Fs(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var qa={left:0,right:0,top:0,bottom:0};function Za(e,t,r){for(var n,i,a,o,s,u,d=0;d<e.length;d+=3)if(s=e[d],u=e[d+1],t<s?(i=0,a=1,o="left"):t<u?(i=t-s,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-s,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],s==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-s)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:s,coverEnd:u}}function Bs(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 Ws(e,t,r,n){var i=Za(t.map,r,n),a=i.node,o=i.start,s=i.end,u=i.collapse,d;if(a.nodeType==3){for(var k=0;k<4;k++){for(;o&&ge(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&ge(t.line.text.charAt(i.coverStart+s));)++s;if(M&&L<9&&o==0&&s==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Bs(G(a,o,s).getClientRects(),n),d.left||d.right||o==0)break;s=o,o=o-1,u="right"}M&&L<11&&(d=Hs(e.display.measure,d))}else{o>0&&(u=n="right");var A;e.options.lineWrapping&&(A=a.getClientRects()).length>1?d=A[n=="right"?A.length-1:0]:d=a.getBoundingClientRect()}if(M&&L<9&&!o&&(!d||!d.left&&!d.right)){var Q=a.parentNode.getClientRects()[0];Q?d={left:Q.left,right:Q.left+Nr(e.display),top:Q.top,bottom:Q.bottom}:d=qa}for(var Y=d.top-t.rect.top,_e=d.bottom-t.rect.top,Re=(Y+_e)/2,Fe=t.view.measure.heights,ze=0;ze<Fe.length-1&&!(Re<Fe[ze]);ze++);var Ve=ze?Fe[ze-1]:0,Ge=Fe[ze],Qe={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:Ve,bottom:Ge};return!d.left&&!d.right&&(Qe.bogus=!0),e.options.singleCursorHeightPerLine||(Qe.rtop=Y,Qe.rbottom=_e),Qe}function Hs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Qa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function eo(e){e.display.externalMeasure=null,de(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Qa(e.display.view[t])}function ri(e){eo(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function to(){return V&&F?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function no(){return V&&F?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function aa(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ni(e.widgets[r]));return t}function Mi(e,t,r,n,i){if(!i){var a=aa(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Mt(t);if(n=="local"?o+=Li(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:no());var u=s.left+(n=="window"?0:to());r.left+=u,r.right+=u}return r.top+=o,r.bottom+=o,r}function ro(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=to(),i-=no();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 oa(e,t,r,n,i){return n||(n=Ze(e.doc,t.line)),Mi(e,n,Ja(e,n,t.ch,i),r)}function In(e,t,r,n,i,a){n=n||Ze(e.doc,t.line),i||(i=Rr(e,n));function o(_e,Re){var Fe=zn(e,i,_e,Re?"right":"left",a);return Re?Fe.left=Fe.right:Fe.right=Fe.left,Mi(e,n,Fe,r)}var s=tt(n,e.doc.direction),u=t.ch,d=t.sticky;if(u>=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!s)return o(d=="before"?u-1:u,d=="before");function k(_e,Re,Fe){var ze=s[Re],Ve=ze.level==1;return o(Fe?_e-1:_e,Ve!=Fe)}var A=Ye(s,u,d),Q=He,Y=k(u,A,d=="before");return Q!=null&&(Y.other=k(u,Q,d!="before")),Y}function io(e,t){var r=0;t=ut(e.doc,t),e.options.lineWrapping||(r=Nr(e.display)*t.ch);var n=Ze(e.doc,t.line),i=Mt(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function sa(e,t,r,n,i){var a=je(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function la(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return sa(n.first,0,null,-1,-1);var i=Sn(n,r),a=n.first+n.size-1;if(i>a)return sa(n.first+n.size-1,Ze(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ze(n,i);;){var s=zs(e,o,i,t,r),u=Qi(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var d=u.find(1);if(d.line==i)return d;o=Ze(n,i=d.line)}}function ao(e,t,r,n){n-=aa(t);var i=t.text.length,a=Ie(function(o){return zn(e,r,o-1).bottom<=n},i,0);return i=Ie(function(o){return zn(e,r,o).top>n},a,i),{begin:a,end:i}}function oo(e,t,r,n){r||(r=Rr(e,t));var i=Mi(e,t,zn(e,r,n),"line").top;return ao(e,t,r,i)}function ua(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function zs(e,t,r,n,i){i-=Mt(t);var a=Rr(e,t),o=aa(t),s=0,u=t.text.length,d=!0,k=tt(t,e.doc.direction);if(k){var A=(e.options.lineWrapping?Xs:Gs)(e,t,r,a,k,n,i);d=A.level!=1,s=d?A.from:A.to-1,u=d?A.to:A.from-1}var Q=null,Y=null,_e=Ie(function(dt){var at=zn(e,a,dt);return at.top+=o,at.bottom+=o,ua(at,n,i,!1)?(at.top<=i&&at.left<=n&&(Q=dt,Y=at),!0):!1},s,u),Re,Fe,ze=!1;if(Y){var Ve=n-Y.left<Y.right-n,Ge=Ve==d;_e=Q+(Ge?0:1),Fe=Ge?"after":"before",Re=Ve?Y.left:Y.right}else{!d&&(_e==u||_e==s)&&_e++,Fe=_e==0?"after":_e==t.text.length?"before":zn(e,a,_e-(d?1:0)).bottom+o<=i==d?"after":"before";var Qe=In(e,je(r,_e,Fe),"line",t,a);Re=Qe.left,ze=i<Qe.top?-1:i>=Qe.bottom?1:0}return _e=Ae(t.text,_e,1),sa(r,_e,Fe,ze,n-Re)}function Gs(e,t,r,n,i,a,o){var s=Ie(function(A){var Q=i[A],Y=Q.level!=1;return ua(In(e,je(r,Y?Q.to:Q.from,Y?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[s];if(s>0){var d=u.level!=1,k=In(e,je(r,d?u.from:u.to,d?"after":"before"),"line",t,n);ua(k,a,o,!0)&&k.top>o&&(u=i[s-1])}return u}function Xs(e,t,r,n,i,a,o){var s=ao(e,t,n,o),u=s.begin,d=s.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var k=null,A=null,Q=0;Q<i.length;Q++){var Y=i[Q];if(Y.from>=d||Y.to<=u)continue;var _e=Y.level!=1,Re=zn(e,n,_e?Math.min(d,Y.to)-1:Math.max(u,Y.from)).right,Fe=Re<a?a-Re+1e9:Re-a;(!k||A>Fe)&&(k=Y,A=Fe)}return k||(k=i[i.length-1]),k.from<u&&(k={from:u,to:k.to,level:k.level}),k.to>d&&(k={from:k.from,to:d,level:k.level}),k}var br;function Pr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(br==null){br=b("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)br.appendChild(document.createTextNode("x")),br.appendChild(b("br"));br.appendChild(document.createTextNode("x"))}W(e.measure,br);var r=br.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),de(e.measure),r||1}function Nr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=b("span","xxxxxxxxxx"),r=b("pre",[t],"CodeMirror-line-like");W(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ca(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=a.offsetLeft+a.clientLeft+i,n[s]=a.clientWidth}return{fixedPos:da(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function da(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function so(e){var t=Pr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(i){if(Et(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 fa(e){var t=e.doc,r=so(e);t.iter(function(n){var i=r(n);i!=n.height&&hn(n,i)})}function yr(e,t,r,n){var i=e.display;if(!r&&J(t).getAttribute("cm-not-content")=="true")return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(A){return null}var u=la(e,a,o),d;if(n&&u.xRel>0&&(d=Ze(e.doc,u.line).text).length==u.ch){var k=g(d,d.length,e.options.tabSize)-d.length;u=je(u.line,Math.max(0,Math.round((a-Va(e.display).left)/Nr(e.display))-k))}return u}function xr(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 mn(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&&mt(e.doc,t)<i.viewTo&&sr(e);else if(r<=i.viewFrom)pn&&gt(e.doc,r+n)>i.viewFrom?sr(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)sr(e);else if(t<=i.viewFrom){var a=Di(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):sr(e)}else if(r>=i.viewTo){var o=Di(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):sr(e)}else{var s=Di(e,t,t,-1),u=Di(e,r,r+n,1);s&&u?(i.view=i.view.slice(0,s.index).concat(Oi(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):sr(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function or(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[xr(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);D(o,r)==-1&&o.push(r)}function sr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Di(e,t,r,n){var i=xr(e,t),a,o=e.display.view;if(!pn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,u=0;u<i;u++)s+=o[u].size;if(s!=t){if(n>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,r+=a}for(;mt(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(xr(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,xr(e,r)))),n.viewTo=r}function lo(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 ii(e){e.display.input.showSelection(e.display.input.prepareSelection())}function uo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var u=s.empty();(u||e.options.showCursorWhenSelecting)&&co(e,s.head,i),u||$s(e,s,a)}return n}function co(e,t,r){var n=In(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 Ri(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=Va(e.display),s=o.left,u=Math.max(n.sizerWidth,vr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function k(Ge,Qe,dt,at){Qe<0&&(Qe=0),Qe=Math.round(Qe),at=Math.round(at),a.appendChild(b("div",null,"CodeMirror-selected","position: absolute; left: "+Ge+`px;
top: `+Qe+"px; width: "+(dt==null?u-Ge:dt)+`px;
height: `+(at-Qe)+"px"))}function A(Ge,Qe,dt){var at=Ze(i,Ge),vt=at.text.length,Ot,Jt;function Nt(Wt,bn){return oa(e,je(Ge,Wt),"div",at,bn)}function En(Wt,bn,en){var Gt=oo(e,at,null,Wt),Ht=bn=="ltr"==(en=="after")?"left":"right",It=en=="after"?Gt.begin:Gt.end-(/\s/.test(at.text.charAt(Gt.end-1))?2:1);return Nt(It,Ht)[Ht]}var vn=tt(at,i.direction);return $e(vn,Qe||0,dt==null?vt:dt,function(Wt,bn,en,Gt){var Ht=en=="ltr",It=Nt(Wt,Ht?"left":"right"),yn=Nt(bn-1,Ht?"right":"left"),Vr=Qe==null&&Wt==0,hr=dt==null&&bn==vt,an=Gt==0,Gn=!vn||Gt==vn.length-1;if(yn.top-It.top<=3){var qt=(d?Vr:hr)&&an,Ia=(d?hr:Vr)&&Gn,tr=qt?s:(Ht?It:yn).left,Sr=Ia?u:(Ht?yn:It).right;k(tr,It.top,Sr-tr,It.bottom)}else{var _r,fn,Yr,Fa;Ht?(_r=d&&Vr&&an?s:It.left,fn=d?u:En(Wt,en,"before"),Yr=d?s:En(bn,en,"after"),Fa=d&&hr&&Gn?u:yn.right):(_r=d?En(Wt,en,"before"):s,fn=!d&&Vr&&an?u:It.right,Yr=!d&&hr&&Gn?s:yn.left,Fa=d?En(bn,en,"after"):u),k(_r,It.top,fn-_r,It.bottom),It.bottom<yn.top&&k(s,It.bottom,null,yn.top),k(Yr,yn.top,Fa-Yr,yn.bottom)}(!Ot||Ri(It,Ot)<0)&&(Ot=It),Ri(yn,Ot)<0&&(Ot=yn),(!Jt||Ri(It,Jt)<0)&&(Jt=It),Ri(yn,Jt)<0&&(Jt=yn)}),{start:Ot,end:Jt}}var Q=t.from(),Y=t.to();if(Q.line==Y.line)A(Q.line,Q.ch,Y.ch);else{var _e=Ze(i,Q.line),Re=Ze(i,Y.line),Fe=jn(_e)==jn(Re),ze=A(Q.line,Q.ch,Fe?_e.text.length+1:null).end,Ve=A(Y.line,Fe?0:null,Y.ch).start;Fe&&(ze.top<Ve.top-2?(k(ze.right,ze.top,null,ze.bottom),k(s,Ve.top,Ve.left,Ve.bottom)):k(ze.right,ze.top,Ve.left-ze.right,ze.bottom)),ze.bottom<Ve.top&&k(s,ze.bottom,null,Ve.top)}r.appendChild(a)}function ha(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()||jr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function fo(e){e.state.focused||(e.display.input.focus(),pa(e))}function ho(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jr(e))},100)}function pa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),y&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ha(e)}function jr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,me(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,s=0;if(i.hidden)continue;if(M&&L<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&&(s=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var k=i.line.height-o;if((k>.005||k<-.005)&&(hn(i.line,o),po(i.line),i.rest))for(var A=0;A<i.rest.length;A++)po(i.rest[A]);if(s>e.display.sizerWidth){var Q=Math.ceil(s/Nr(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function po(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=Sn(t,n),o=Sn(t,i);if(r&&r.ensure){var s=r.ensure.from.line,u=r.ensure.to.line;s<a?(a=s,o=Sn(t,Mt(Ze(t,s))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=Sn(t,Mt(Ze(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function Vs(e,t){if(Ue(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&&!B){var a=b("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Li(e.display))+`px;
height: `+(t.bottom-t.top+Hn(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?je(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?je(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=In(e,t),u=!r||r==t?s:In(e,r);i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-n,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+n};var d=ma(e,i),k=e.doc.scrollTop,A=e.doc.scrollLeft;if(d.scrollTop!=null&&(oi(e,d.scrollTop),Math.abs(e.doc.scrollTop-k)>1&&(o=!0)),d.scrollLeft!=null&&(wr(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-A)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=ma(e,t);r.scrollTop!=null&&oi(e,r.scrollTop),r.scrollLeft!=null&&wr(e,r.scrollLeft)}function ma(e,t){var r=e.display,n=Pr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ra(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+na(r),u=t.top<n,d=t.bottom>s-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var k=Math.min(t.top,(d?s:t.bottom)-a);k!=i&&(o.scrollTop=k)}var A=e.options.fixedGutter?0:r.gutters.offsetWidth,Q=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-A,Y=vr(e)-r.gutters.offsetWidth,_e=t.right-t.left>Y;return _e&&(t.right=t.left+Y),t.left<10?o.scrollLeft=0:t.left<Q?o.scrollLeft=Math.max(0,t.left+A-(_e?0:10)):t.right>Y+Q-3&&(o.scrollLeft=t.right+(_e?0:10)-Y),o}function ga(e,t){if(t==null)return;ji(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ir(e){ji(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ai(e,t,r){(t!=null||r!=null)&&ji(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function qs(e,t){ji(e),e.curOp.scrollToPos=t}function ji(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=io(e,t.from),n=io(e,t.to);mo(e,r,n,t.margin)}}function mo(e,t,r,n){var i=ma(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});ai(e,i.scrollLeft,i.scrollTop)}function oi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;re||ba(e,{top:t}),go(e,t,!0),re&&ba(e),ui(e,100)}function go(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 wr(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,wo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function si(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+na(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+Hn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Er=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),xe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),xe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,M&&L<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Er.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}},Er.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Er.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Er.prototype.zeroWidthHack=function(){var e=oe&&!se?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new C,this.disableVert=new C},Er.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)},Er.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var li=function(){};li.prototype.update=function(){return{bottom:0,right:0}},li.prototype.setScrollLeft=function(){},li.prototype.setScrollTop=function(){},li.prototype.clear=function(){};function Fr(e,t){t||(t=si(e));var r=e.display.barWidth,n=e.display.barHeight;vo(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Pi(e),vo(e,si(e)),r=e.display.barWidth,n=e.display.barHeight}function vo(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 bo={native:Er,null:li};function yo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&me(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),xe(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"?wr(e,t):oi(e,t)},e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function Cr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},Os(e.curOp)}function kr(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&&Kt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&va(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Pi(t),e.barMeasure=si(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ja(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+Hn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-vr(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&&wr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==q();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Fr(t,e.barMeasure),e.updatedDisplay&&xa(t,e.barMeasure),e.selectionChanged&&ha(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&fo(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&xo(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&go(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&wr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,ut(n,e.scrollToPos.from),ut(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||Oe(a[s],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&Oe(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Oe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wn(e,t){if(e.curOp)return t();Cr(e);try{return t()}finally{kr(e)}}function Vt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Cr(e);try{return t.apply(e,arguments)}finally{kr(e)}}}function dn(e){return function(){if(this.curOp)return e.apply(this,arguments);Cr(this);try{return e.apply(this,arguments)}finally{kr(this)}}}function Yt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Cr(t);try{return e.apply(this,arguments)}finally{kr(t)}}}function ui(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=pe(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?On(t.mode,n.state):null,u=Dn(e,a,n,!0);s&&(n.state=s),a.styles=u.styles;var d=a.styleClasses,k=u.classes;k?a.styleClasses=k:d&&(a.styleClasses=null);for(var A=!o||o.length!=a.styles.length||d!=k&&(!d||!k||d.bgClass!=k.bgClass||d.textClass!=k.textClass),Q=0;!A&&Q<o.length;++Q)A=o[Q]!=a.styles[Q];A&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Je(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ui(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&wn(e,function(){for(var a=0;a<i.length;a++)or(e,i[a],"text")})}var Ii=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=vr(e),this.force=r,this.dims=ca(e),this.events=[]};Ii.prototype.signal=function(e,t){R(e,t)&&this.events.push(arguments)},Ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.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=Hn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Hn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=q();if(!t||!E(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&E(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==q())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&E(document.body,e.anchorNode)&&E(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 va(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return sr(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&&lo(e)==0)return!1;Eo(e)&&(sr(e),t.dims=ca(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=mt(e.doc,a),o=gt(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ks(e,a,o),r.viewOffset=Mt(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=lo(e);if(!s&&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),de(r.cursorDiv),de(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ui(e,400)),r.updateLineNumbers=null,!0}function xo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==vr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+na(e.display)-ra(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(!va(e,t))break;Pi(e);var i=si(e);ii(e),Fr(e,i),xa(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 ba(e,t){var r=new Ii(e,t);if(va(e,r)){Pi(e),xo(e,r);var n=si(e);ii(e),Fr(e,n),xa(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(_e){var Re=_e.nextSibling;return y&&oe&&e.display.currentWheelTarget==_e?_e.style.display="none":_e.parentNode.removeChild(_e),Re}for(var u=n.view,d=n.viewFrom,k=0;k<u.length;k++){var A=u[k];if(!A.hidden)if(!A.node||A.node.parentNode!=a){var Q=js(e,A,d,r);a.insertBefore(Q,o)}else{for(;o!=A.node;)o=s(o);var Y=i&&t!=null&&t<=d&&A.lineNumber;A.changes&&(D(A.changes,"gutter")>-1&&(Y=!1),za(e,A,d,r)),Y&&(de(A.lineNumber),A.lineNumber.appendChild(document.createTextNode(Ln(e.options,d)))),o=A.node.nextSibling}d+=A.size}for(;o;)o=s(o)}function ya(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function xa(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+Hn(e)+"px"}function wo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=da(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var s=r[o].alignable;if(s)for(var u=0;u<s.length;u++)s[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function Eo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Ln(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",ya(e.display),!0}return!1}function wa(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 Co(e){var t=e.gutters,r=e.gutterSpecs;de(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,s=t.appendChild(b("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ya(e)}function ci(e){Co(e.display),mn(e),wo(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=K("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=K("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=K("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: "+ee+"px; width: 1px;"),i.gutters=b("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=b("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=b("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),M&&L<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!y&&!(re&&le)&&(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=wa(n.gutters,n.lineNumbers),Co(i),r.init(i)}var Fi=0,Tn=null;M?Tn=-.53:re?Tn=15:V?Tn=-.7:Ce&&(Tn=-1/3);function ko(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=ko(e);return t.x*=Tn,t.y*=Tn,t}function So(e,t){var r=ko(t),n=r.x,i=r.y,a=e.display,o=a.scroller,s=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&u))return;if(i&&oe&&y){e:for(var d=t.target,k=a.view;d!=o;d=d.parentNode)for(var A=0;A<k.length;A++)if(k[A].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!re&&!ae&&Tn!=null){i&&u&&oi(e,Math.max(0,o.scrollTop+i*Tn)),wr(e,Math.max(0,o.scrollLeft+n*Tn)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&Tn!=null){var Q=i*Tn,Y=e.doc.scrollTop,_e=Y+a.wrapper.clientHeight;Q<0?Y=Math.max(0,Y+Q-50):_e=Math.min(e.doc.height,_e+Q+50),ba(e,{top:Y,bottom:_e})}Fi<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 Re=o.scrollLeft-a.wheelStartX,Fe=o.scrollTop-a.wheelStartY,ze=Fe&&a.wheelDY&&Fe/a.wheelDY||Re&&a.wheelDX&&Re/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!ze)return;Tn=(Tn*Fi+ze)/(Fi+1),++Fi},200)):(a.wheelDX+=n,a.wheelDY+=i))}var An=function(e,t){this.ranges=e,this.primIndex=t};An.prototype.primary=function(){return this.ranges[this.primIndex]},An.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(!_n(r.anchor,n.anchor)||!_n(r.head,n.head))return!1}return!0},An.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new St(Mn(this.ranges[t].anchor),Mn(this.ranges[t].head));return new An(e,this.primIndex)},An.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},An.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ct(t,n.from())>=0&&ct(e,n.to())<=0)return r}return-1};var St=function(e,t){this.anchor=e,this.head=t};St.prototype.from=function(){return Kn(this.anchor,this.head)},St.prototype.to=function(){return Be(this.anchor,this.head)},St.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Fn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(Q,Y){return ct(Q.from(),Y.from())}),r=D(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],u=ct(s.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Kn(s.from(),o.from()),k=Be(s.to(),o.to()),A=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new St(A?k:d,A?d:k))}}return new An(t,r)}function lr(e,t){return new An([new St(e,t||e)],0)}function ur(e){return e.text?je(e.from.line+e.text.length-1,h(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function _o(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return ur(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+=ur(t).ch-t.to.ch),je(r,n)}function Ea(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new St(_o(i.anchor,t),_o(i.head,t)))}return Fn(e.cm,r,e.sel.primIndex)}function To(e,t,r){return e.line==t.line?je(r.line,e.ch-t.ch+r.ch):je(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=je(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],u=To(s.from,i,a),d=To(ur(s),i,a);if(i=s.to,a=d,r=="around"){var k=e.sel.ranges[o],A=ct(k.head,k.anchor)<0;n[o]=new St(A?d:u,A?u:d)}else n[o]=new St(u,u)}return new An(n,e.sel.primIndex)}function Ca(e){e.doc.mode=kn(e.options,e.doc.modeOption),di(e)}function di(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,ui(e,100),e.state.modeGen++,e.curOp&&mn(e)}function Ao(e,t){return t.from.ch==0&&t.to.ch==0&&h(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ka(e,t,r,n){function i(Ve){return r?r[Ve]:null}function a(Ve,Ge,Qe){Jn(Ve,Ge,Qe,n),Qt(Ve,"change",Ve,t)}function o(Ve,Ge){for(var Qe=[],dt=Ve;dt<Ge;++dt)Qe.push(new $t(d[dt],i(dt),n));return Qe}var s=t.from,u=t.to,d=t.text,k=Ze(e,s.line),A=Ze(e,u.line),Q=h(d),Y=i(d.length-1),_e=u.line-s.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(Ao(e,t)){var Re=o(0,d.length-1);a(A,A.text,Y),_e&&e.remove(s.line,_e),Re.length&&e.insert(s.line,Re)}else if(k==A)if(d.length==1)a(k,k.text.slice(0,s.ch)+Q+k.text.slice(u.ch),Y);else{var Fe=o(1,d.length-1);Fe.push(new $t(Q+k.text.slice(u.ch),Y,n)),a(k,k.text.slice(0,s.ch)+d[0],i(0)),e.insert(s.line+1,Fe)}else if(d.length==1)a(k,k.text.slice(0,s.ch)+d[0]+A.text.slice(u.ch),i(0)),e.remove(s.line+1,_e);else{a(k,k.text.slice(0,s.ch)+d[0],i(0)),a(A,Q+A.text.slice(u.ch),Y);var ze=o(1,d.length-1);_e>1&&e.remove(s.line+1,_e-1),e.insert(s.line+1,ze)}Qt(e,"change",e,t)}function cr(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var u=i.linked[s];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,fa(e),Ca(e),Lo(e),e.options.lineWrapping||Kt(e),e.options.mode=t.modeOption,mn(e)}function Lo(e){(e.doc.direction=="rtl"?N:me)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){wn(e,function(){Lo(e),mn(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 Sa(e,t){var r={from:Mn(t.from),to:ur(t),text:Zt(e,t.from,t.to)};return Ro(e,r,t.from.line,t.to.line+1),cr(e,function(n){return Ro(n,r,t.from.line,t.to.line+1)},!0),r}function Mo(e){for(;e.length;){var t=h(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Mo(e.done),h(e.done);if(e.done.length&&!h(e.done).ranges)return h(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),h(e.done)}function Do(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))s=h(o.changes),ct(t.from,t.to)==0&&ct(t.from,s.to)==0?s.to=ur(t):o.changes.push(Sa(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Bi(e.sel,i.done),o={changes:[Sa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||Oe(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,h(i.done),t))?i.done[i.done.length-1]=t:Bi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Mo(i.undone)}function Bi(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ro(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 Po(e,t){var r=bl(e,t),n=Vn(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var s=0;s<o.length;++s){for(var u=o[s],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 Ur(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?An.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];n.push({changes:s});for(var u=0;u<o.length;++u){var d=o[u],k=void 0;if(s.push({from:d.from,to:d.to,text:d.text}),t)for(var A in d)(k=A.match(/^spans_(\d+)$/))&&(D(t,Number(k[1]))>-1&&(h(s)[A]=d[A],delete d[A]))}}return n}function _a(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ct(t,i)<0;a!=ct(r,i)<0?(i=t,t=r):a!=ct(t,r)<0&&(t=r)}return new St(i,t)}else return new St(r||t,t)}function Wi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rn(e,new An([_a(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]=_a(e.sel.ranges[a],t[a],null,i);var o=Fn(e.cm,n,e.sel.primIndex);rn(e,o,r)}function Ta(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rn(e,Fn(e.cm,i,e.sel.primIndex),n)}function jo(e,t,r,n){rn(e,lr(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 St(ut(e,i[a].anchor),ut(e,i[a].head))},origin:r&&r.origin};return Oe(e,"beforeSelectionChange",e,n),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Fn(e.cm,n.ranges,n.ranges.length-1):t}function Io(e,t,r){var n=e.history.done,i=h(n);i&&i.ranges?(n[n.length-1]=t,Hi(e,t,r)):rn(e,t,r)}function rn(e,t,r){Hi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Hi(e,t,r){(R(e,"beforeSelectionChange")||e.cm&&R(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ct(t.primary().head,e.sel.primary().head)<0?-1:1);Fo(e,Bo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Ir(e.cm)}function Fo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,U(e.cm)),Qt(e,"cursorActivity",e)}function Uo(e){Fo(e,Bo(e,e.sel,null,!1))}function Bo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=zi(e,o.anchor,s&&s.anchor,r,n),d=zi(e,o.head,s&&s.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new St(u,d))}return i?Fn(e.cm,i,t.primIndex):t}function Br(e,t,r,n,i){var a=Ze(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],u=s.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,k="selectRight"in u?!u.selectRight:u.inclusiveRight;if((s.from==null||(d?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(k?s.to>=t.ch:s.to>t.ch))){if(i&&(Oe(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var A=u.find(n<0?1:-1),Q=void 0;if((n<0?k:d)&&(A=Wo(e,A,-n,A&&A.line==t.line?a:null)),A&&A.line==t.line&&(Q=ct(A,r))&&(n<0?Q<0:Q>0))return Br(e,A,t,n,i)}var Y=u.find(n<0?-1:1);return(n<0?d:k)&&(Y=Wo(e,Y,n,Y.line==t.line?a:null)),Y?Br(e,Y,t,n,i):null}}return t}function zi(e,t,r,n,i){var a=n||1,o=Br(e,t,r,a,i)||!i&&Br(e,t,r,a,!0)||Br(e,t,r,-a,i)||!i&&Br(e,t,r,-a,!0);return o||(e.cantEdit=!0,je(e.first,0))}function Wo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ut(e,je(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?je(t.line+1,0):null:new je(t.line,t.ch+r)}function Ho(e){e.setSelection(je(e.firstLine(),0),je(e.lastLine()),ce)}function zo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,s){i&&(n.from=ut(e,i)),a&&(n.to=ut(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),Oe(e,"beforeChange",e,n),e.cm&&Oe(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 Wr(e,t,r){if(e.cm){if(!e.cm.curOp)return Vt(e.cm,Wr)(e,t,r);if(e.cm.state.suppressEdits)return}if((R(e,"beforeChange")||e.cm&&R(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))return;var n=Nn&&!r&&Lr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Go(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Go(e,t)}function Go(e,t){if(t.text.length==1&&t.text[0]==""&&ct(t.from,t.to)==0)return;var r=Ea(e,t);Do(e,t,r,e.cm?e.cm.curOp.id:NaN),fi(e,t,r,Vn(e,t));var n=[];cr(e,function(i,a){!a&&D(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),fi(i,t,null,Vn(i,t))})}function Gi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,s=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d<s.length&&!(a=s[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==s.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Bi(a,u),r&&!a.equals(e.sel)){rn(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var k=[];Bi(o,u),u.push({changes:k,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var A=R(e,"beforeChange")||e.cm&&R(e.cm,"beforeChange"),Q=function(Re){var Fe=a.changes[Re];if(Fe.origin=t,A&&!zo(e,Fe,!1))return s.length=0,{};k.push(Sa(e,Fe));var ze=Re?Ea(e,Fe):h(s);fi(e,Fe,ze,Po(e,Fe)),!Re&&e.cm&&e.cm.scrollIntoView({from:Fe.from,to:ur(Fe)});var Ve=[];cr(e,function(Ge,Qe){!Qe&&D(Ve,Ge.history)==-1&&(Vo(Ge.history,Fe),Ve.push(Ge.history)),fi(Ge,Fe,null,Po(Ge,Fe))})},Y=a.changes.length-1;Y>=0;--Y){var _e=Q(Y);if(_e)return _e.v}}function Xo(e,t){if(t==0)return;if(e.first+=t,e.sel=new An(T(e.sel.ranges,function(i){return new St(je(i.anchor.line+t,i.anchor.ch),je(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){mn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)or(e.cm,n,"gutter")}}function fi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Vt(e.cm,fi)(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:je(e.first,0),to:je(t.to.line+i,t.to.ch),text:[h(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:je(a,Ze(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Zt(e,t.from,t.to),r||(r=Ea(e,t)),e.cm?xl(e.cm,t,n):ka(e,t,n),Hi(e,r,ce),e.cantEdit&&zi(e,je(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,s=!1,u=a.line;e.options.lineWrapping||(u=wt(jn(Ze(n,a.line))),n.iter(u,o.line+1,function(Y){if(Y==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&U(e),ka(n,t,r,so(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(Y){var _e=jt(Y);_e>i.maxLineLength&&(i.maxLine=Y,i.maxLineLength=_e,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),xn(n,a.line),ui(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?mn(e):a.line==o.line&&t.text.length==1&&!Ao(e.doc,t)?or(e,a.line,"text"):mn(e,a.line,o.line+1,d);var k=R(e,"changes"),A=R(e,"change");if(A||k){var Q={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};A&&Qt(e,"change",e,Q),k&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Q)}e.display.selForContextMenu=null}function Hr(e,t,r,n,i){var a;n||(n=r),ct(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Wr(e,{from:r,to:n,text:t,origin:i})}function Ko(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function $o(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var s=0;s<a.ranges.length;s++)Ko(a.ranges[s].anchor,t,r,n),Ko(a.ranges[s].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=je(d.from.line+n,d.from.ch),d.to=je(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 Vo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;$o(e.done,r,n,i),$o(e.undone,r,n,i)}function hi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=Ze(e,Tr(e,t)):i=wt(t),i==null?null:(n(a,i)&&e.cm&&or(e.cm,i,r),a)}function pi(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}pi.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,Bt(i),Qt(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 mi(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}mi.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 pi))){var s=[];this.collapse(s),this.children=[new pi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var u=new pi(i.lines.slice(s,s+=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 mi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=D(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new mi(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 gi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};gi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=wt(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=ni(this);hn(r,Math.max(0,r.height-a)),e&&(wn(e,function(){Yo(e,r,-a),or(e,n,"widget")}),Qt(e,"lineWidgetCleared",e,this,n))},gi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=ni(this)-t;if(!i)return;Et(this.doc,n)||hn(n,n.height+i),r&&wn(r,function(){r.curOp.forceUpdate=!0,Yo(r,n,i),Qt(r,"lineWidgetChanged",r,e,wt(n))})},S(gi);function Yo(e,t,r){Mt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ga(e,r)}function wl(e,t,r,n){var i=new gi(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),hi(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(i.insertAt==null?s.push(i):s.splice(Math.min(s.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!Et(e,o)){var u=Mt(o)<e.scrollTop;hn(o,o.height+ni(i)),u&&ga(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Qt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:wt(t)),i}var Jo=0,dr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Jo};dr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Cr(e),R(this,"clear")){var r=this.find();r&&Qt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=rr(o.markedSpans,this);e&&!this.collapsed?or(e,wt(o),"text"):e&&(s.to!=null&&(i=wt(o)),s.from!=null&&(n=wt(o))),o.markedSpans=Zi(o.markedSpans,s),s.from==null&&this.collapsed&&!Et(this.doc,o)&&e&&hn(o,Pr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=jn(this.lines[u]),k=jt(d);k>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=k,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&mn(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&&Qt(e,"markerCleared",e,this,n,i),t&&kr(e),this.parent&&this.parent.clear()},dr.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=rr(a.markedSpans,this);if(o.from!=null&&(r=je(t?a:wt(a),o.from),e==-1))return r;if(o.to!=null&&(n=je(t?a:wt(a),o.to),e==1))return n}return r&&{from:r,to:n}},dr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;wn(n,function(){var i=t.line,a=wt(t.line),o=ia(n,a);if(o&&(Qa(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Et(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var u=ni(r)-s;u&&hn(i,i.height+u)}Qt(n,"markerChanged",n,e)})},dr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||D(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},dr.prototype.detachLine=function(e){if(this.lines.splice(D(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},S(dr);function zr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Vt(e.cm,zr)(e,t,r,n,i);var a=new dr(e,i),o=ct(t,r);if(n&&l(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=K("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ea(e,t.line,t,r,a)||t.line!=r.line&&ea(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");_i()}a.addToHistory&&Do(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,u=e.cm,d;if(e.iter(s,r.line+1,function(A){u&&a.collapsed&&!u.options.lineWrapping&&jn(A)==u.display.maxLine&&(d=!0),a.collapsed&&s!=t.line&&hn(A,0),Ti(A,new pr(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(A){Et(e,A)&&hn(A,0)}),a.clearOnEnter&&xe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Si(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Jo,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)mn(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var k=t.line;k<=r.line;k++)or(u,k,"text");a.atomic&&Uo(u.doc),Qt(u,"markerAdded",u,a)}return a}var vi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};vi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qt(this,"clear")},vi.prototype.find=function(e,t){return this.primary.find(e,t)},S(vi);function El(e,t,r,n,i){n=l(n),n.shared=!1;var a=[zr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return cr(e,function(u){s&&(n.widgetNode=s.cloneNode(!0)),a.push(zr(u,ut(u,t),ut(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=h(a)}),new vi(a,o)}function qo(e){return e.findMarks(je(e.first,0),e.clipPos(je(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(ct(a,o)){var s=zr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function kl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];cr(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];D(a,s.doc)==-1&&(s.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,gn=function(e,t,r,n,i){if(!(this instanceof gn))return new gn(e,t,r,n,i);r==null&&(r=0),mi.call(this,[new pi([new $t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=je(r,0);this.sel=lr(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)),ka(this,{from:a,to:a,text:e}),rn(this,lr(a),ce)};gn.prototype=Z(mi.prototype,{constructor:gn,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=Xn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yt(function(e){var t=je(this.first,0),r=this.first+this.size-1;Wr(this,{from:t,to:je(r,Ze(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),rn(this,lr(t),ce)}),replaceRange:function(e,t,r,n){t=ut(this,t),r=r?ut(this,r):t,Hr(this,e,t,r,n)},getRange:function(e,t,r){var n=Zt(this,ut(this,e),ut(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Pn(this,e))return Ze(this,e)},getLineNumber:function(e){return wt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ze(this,e)),jn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ut(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yt(function(e,t,r){jo(this,ut(this,typeof e=="number"?je(e,t||0):e),null,r)}),setSelection:Yt(function(e,t,r){jo(this,ut(this,e),ut(this,t||e),r)}),extendSelection:Yt(function(e,t,r){Wi(this,ut(this,e),t&&ut(this,t),r)}),extendSelections:Yt(function(e,t){No(this,Wn(this,e),t)}),extendSelectionsBy:Yt(function(e,t){var r=T(this.sel.ranges,e);No(this,Wn(this,r),t)}),setSelections:Yt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new St(ut(this,e[i].anchor),ut(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rn(this,Fn(this.cm,n,t),r)}),addSelection:Yt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new St(ut(this,e),ut(this,t||e))),rn(this,Fn(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=Zt(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=Zt(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:Yt(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var s=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)Wr(this,n[u]);s?Io(this,s):this.cm&&Ir(this.cm)}),undo:Yt(function(){Gi(this,"undo")}),redo:Yt(function(){Gi(this,"redo")}),undoSelection:Yt(function(){Gi(this,"undo",!0)}),redoSelection:Yt(function(){Gi(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),cr(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:Ur(this.history.done),undone:Ur(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=Ur(e.done.slice(0),null,!0),t.undone=Ur(e.undone.slice(0),null,!0)},setGutterMarker:Yt(function(e,t,r){return hi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&Pe(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&hi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Pe(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Pn(this,e))return null;if(t=e,e=Ze(this,e),!e)return null}else if(t=wt(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:Yt(function(e,t,r){return hi(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(be(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yt(function(e,t,r){return hi(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(be(r));if(!o)return!1;var s=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||s==a.length?"":" ")+a.slice(s)||null}else return!1;return!0})}),addLineWidget:Yt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return zr(this,ut(this,e),ut(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ut(this,e),zr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ut(this,e);var t=[],r=Ze(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ut(this,e),t=ut(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var u=o[s];!(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}),ut(this,je(r,t))},indexFromPos:function(e){e=ut(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new gn(Xn(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 gn(Xn(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 Dt&&(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];cr(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=Ur(this.history.done,n),e.history.undone=Ur(this.history.undone,n)}},iterLinkedDocs:function(e){cr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yt(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)})}),gn.prototype.eachLine=gn.prototype.iter;var Zo=0;function _l(e){var t=this;if(Qo(t),Ue(t,e)||Qn(t.display,e))return;f(e),M&&(Zo=+new Date);var r=yr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,s=function(){++o==i&&Vt(t,function(){r=ut(t.doc,r);var Y={from:r,to:r,text:t.doc.splitLines(a.filter(function(_e){return _e!=null}).join(t.doc.lineSeparator())),origin:"paste"};Wr(t.doc,Y),Io(t.doc,lr(ut(t.doc,r),ut(t.doc,ur(Y))))})()},u=function(Y,_e){if(t.options.allowDropFileTypes&&D(t.options.allowDropFileTypes,Y.type)==-1){s();return}var Re=new FileReader;Re.onerror=function(){return s()},Re.onload=function(){var Fe=Re.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Fe)){s();return}a[_e]=Fe,s()},Re.readAsText(Y)},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 k=e.dataTransfer.getData("Text");if(k){var A;if(t.state.draggingText&&!t.state.draggingText.copy&&(A=t.listSelections()),Hi(t.doc,lr(r,r)),A)for(var Q=0;Q<A.length;++Q)Hr(t.doc,"",A[Q].anchor,A[Q].head,"drag");t.replaceSelection(k,"around","paste"),t.display.input.focus()}}catch(Y){}}}function Tl(e,t){if(M&&(!e.state.draggingText||+new Date-Zo<100)){x(t);return}if(Ue(e,t)||Qn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce){var r=b("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ae&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ae&&r.parentNode.removeChild(r)}}function Al(e,t){var r=yr(e,t);if(!r)return;var n=document.createDocumentFragment();co(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)),W(e.display.dragCursor,n)}function Qo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function es(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 ts=!1;function Ol(){if(ts)return;Ll(),ts=!0}function Ll(){var e;xe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,es(Ml)},100))}),xe(window,"blur",function(){return es(jr)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var fr={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"},bi=0;bi<10;bi++)fr[bi+48]=fr[bi+96]=String(bi);for(var Xi=65;Xi<=90;Xi++)fr[Xi]=String.fromCharCode(Xi);for(var yi=1;yi<=12;yi++)fr[yi+111]=fr[yi+63235]="F"+yi;var er={};er.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"},er.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"},er.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"},er.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"]},er.default=oe?er.macDefault:er.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 s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=T(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=n):(s=i.slice(0,a+1).join(" "),o="...");var u=t[s];if(!u)t[s]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var d in t)e[d]=t[d];return e}function Gr(e,t,r,n){t=Ki(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 Gr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Gr(e,t.fallthrough[a],r,n);if(o)return o}}}function ns(e){var t=typeof e=="string"?e:fr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function rs(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Te?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Te?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function is(e,t){if(ae&&e.keyCode==34&&e.char)return!1;var r=fr[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),rs(r,e,t))}function Ki(e){return typeof e=="string"?er[e]:e}function Xr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ct(a.from,h(n).to)<=0;){var o=n.pop();if(ct(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}wn(e,function(){for(var s=n.length-1;s>=0;s--)Hr(e.doc,"",n[s].from,n[s].to,"+delete");Ir(e)})}function Aa(e,t,r){var n=Ae(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Oa(e,t,r){var n=Aa(e,t.ch,r);return n==null?null:new je(t.line,n,r<0?"after":"before")}function La(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=tt(r,t.doc.direction);if(a){var o=i<0?h(a):a[0],s=i<0==(o.level==1),u=s?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var k=Rr(t,r);d=i<0?r.text.length-1:0;var A=zn(t,k,d).top;d=Ie(function(Q){return zn(t,k,Q).top==A},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Aa(r,d,1))}else d=i<0?o.to:o.from;return new je(n,d,u)}}return new je(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=tt(t,e.doc.direction);if(!i)return Oa(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=Ye(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 Oa(t,r,n);var s=function(ze,Ve){return Aa(t,ze instanceof je?ze.ch:ze,Ve)},u,d=function(ze){return e.options.lineWrapping?(u=u||Rr(e,t),oo(e,t,u,ze)):{begin:0,end:t.text.length}},k=d(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var A=o.level==1==n<0,Q=s(r,A?1:-1);if(Q!=null&&(A?Q<=o.to&&Q<=k.end:Q>=o.from&&Q>=k.begin)){var Y=A?"before":"after";return new je(r.line,Q,Y)}}var _e=function(ze,Ve,Ge){for(var Qe=function(Ot,Jt){return Jt?new je(r.line,s(Ot,1),"before"):new je(r.line,Ot,"after")};ze>=0&&ze<i.length;ze+=Ve){var dt=i[ze],at=Ve>0==(dt.level!=1),vt=at?Ge.begin:s(Ge.end,-1);if(dt.from<=vt&&vt<dt.to)return Qe(vt,at);if(vt=at?dt.from:s(dt.to,-1),Ge.begin<=vt&&vt<Ge.end)return Qe(vt,at)}},Re=_e(a+n,n,k);if(Re)return Re;var Fe=n>0?k.end:s(k.begin,-1);return Fe!=null&&!(n>0&&Fe==t.text.length)&&(Re=_e(n>0?0:i.length-1,n,d(Fe)),Re)?Re:null}var xi={selectAll:Ho,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ce)},killLine:function(e){return Xr(e,function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:je(t.head.line+1,0)}:{from:t.head,to:je(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xr(e,function(t){return{from:je(t.from().line,0),to:ut(e.doc,je(t.to().line+1,0))}})},delLineLeft:function(e){return Xr(e,function(t){return{from:je(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Xr(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 Xr(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(je(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(je(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return os(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},ne)},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")},ne)},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/)?os(e,t.head):n},ne)},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=g(e.getLine(a.line),a.ch,n);t.push(ie(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=Ze(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new je(i.line,i.ch-1)),i.ch>0)i=new je(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),je(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ze(e.doc,i.line-1).text;o&&(i=new je(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),je(i.line-1,o.length-1),i,"+transpose"))}}r.push(new St(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return wn(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);Ir(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function as(e,t){var r=Ze(e.doc,t),n=jn(r);return n!=r&&(t=wt(n)),La(!0,e,n,t,1)}function Nl(e,t){var r=Ze(e.doc,t),n=Ba(r);return n!=r&&(t=wt(n)),La(!0,e,r,t,-1)}function os(e,t){var r=as(e,t.line),n=Ze(e.doc,r.line),i=tt(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return je(r.line,o?0:a,r.sticky)}return r}function $i(e,t,r){if(typeof t=="string"&&(t=xi[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)!=we}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=Gr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Gr(t,e.options.extraKeys,r,e)||Gr(t,e.options.keyMap,r,e)}var Il=new C;function wi(e,t,r,n){var i=e.state.keySeq;if(i){if(ns(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())}),ss(e,i+" "+t,r,n))return!0}return ss(e,t,r,n)}function ss(e,t,r,n){var i=jl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Qt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),ha(e)),!!i}function ls(e,t){var r=is(t,!0);return r?t.shiftKey&&!e.state.keySeq?wi(e,"Shift-"+r,t,function(n){return $i(e,n,!0)})||wi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $i(e,n)}):wi(e,r,t,function(n){return $i(e,n)}):!1}function Fl(e,t,r){return wi(e,"'"+r+"'",t,function(n){return $i(e,n,!0)})}var Ma=null;function us(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=q(),Ue(t,e))return;M&&L<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ls(t,e);ae&&(Ma=n?r:null,!n&&r==88&&!Ft&&(oe?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),re&&!oe&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;N(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(me(t,"CodeMirror-crosshair"),qe(document,"keyup",r),qe(document,"mouseover",r))}xe(document,"keyup",r),xe(document,"mouseover",r)}function cs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ue(this,e)}function ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Qn(t.display,e)||Ue(t,e)||e.ctrlKey&&!e.altKey||oe&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(ae&&r==Ma){Ma=null,f(e);return}if(ae&&(!e.which||e.which<10)&&ls(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Fl(t,e,i))return;t.display.input.onKeyPress(e)}var Bl=400,Da=function(e,t,r){this.time=e,this.pos=t,this.button=r};Da.prototype.compare=function(e,t,r){return this.time+Bl>e&&ct(t,this.pos)==0&&r==this.button};var Ei,Ci;function Wl(e,t){var r=+new Date;return Ci&&Ci.compare(r,e,t)?(Ei=Ci=null,"triple"):Ei&&Ei.compare(r,e,t)?(Ci=new Da(r,e,t),Ei=null,"double"):(Ei=new Da(r,e,t),Ci=null,"single")}function fs(e){var t=this,r=t.display;if(Ue(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Qn(r,e)){y||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ra(t,e))return;var n=yr(t,e),i=fe(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&Hl(t,i,n,a,e))return;i==1?n?Gl(t,n,a,e):J(e)==r.scroller&&f(e):i==2?(n&&Wi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Ne?t.display.input.onContextMenu(e):ho(t))}function Hl(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,wi(e,rs(a,i),i,function(o){if(typeof o=="string"&&(o=xi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=we}finally{e.state.suppressEdits=!1}return s})}function zl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Me?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=oe?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(oe?r.altKey:r.ctrlKey)),i}function Gl(e,t,r,n){M?setTimeout(c(fo,e),0):e.curOp.focus=q();var i=zl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&De&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ct((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ct(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,i):Kl(e,n,t,i)}function Xl(e,t,r,n){var i=e.display,a=!1,o=Vt(e,function(d){y&&(i.scroller.draggable=!1),e.state.draggingText=!1,qe(i.wrapper.ownerDocument,"mouseup",o),qe(i.wrapper.ownerDocument,"mousemove",s),qe(i.scroller,"dragstart",u),qe(i.scroller,"drop",o),a||(f(d),n.addNew||Wi(e.doc,r,null,null,n.extend),y&&!Ce||M&&L==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};y&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),xe(i.wrapper.ownerDocument,"mouseup",o),xe(i.wrapper.ownerDocument,"mousemove",s),xe(i.scroller,"dragstart",u),xe(i.scroller,"drop",o),ho(e),setTimeout(function(){return i.input.focus()},20)}function hs(e,t,r){if(r=="char")return new St(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new St(je(t.line,0),ut(e.doc,je(t.line+1,0)));var n=r(e,t);return new St(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,s,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=d[s]:o=new St(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new St(r,r)),r=yr(e,t,!0,!0),s=-1;else{var k=hs(e,r,n.unit);n.extend?o=_a(o,k.anchor,k.head,n.extend):o=k}n.addNew?s==-1?(s=d.length,rn(a,Fn(e,d.concat([o]),s),{scroll:!1,origin:"*mouse"})):d.length>1&&d[s].empty()&&n.unit=="char"&&!n.extend?(rn(a,Fn(e,d.slice(0,s).concat(d.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Ta(a,s,o,ke):(s=0,rn(a,new An([o],0),ke),u=a.sel);var A=r;function Q(Ge){if(ct(A,Ge)==0)return;if(A=Ge,n.unit=="rectangle"){for(var Qe=[],dt=e.options.tabSize,at=g(Ze(a,r.line).text,r.ch,dt),vt=g(Ze(a,Ge.line).text,Ge.ch,dt),Ot=Math.min(at,vt),Jt=Math.max(at,vt),Nt=Math.min(r.line,Ge.line),En=Math.min(e.lastLine(),Math.max(r.line,Ge.line));Nt<=En;Nt++){var vn=Ze(a,Nt).text,Wt=ue(vn,Ot,dt);Ot==Jt?Qe.push(new St(je(Nt,Wt),je(Nt,Wt))):vn.length>Wt&&Qe.push(new St(je(Nt,Wt),je(Nt,ue(vn,Jt,dt))))}Qe.length||Qe.push(new St(r,r)),rn(a,Fn(e,u.ranges.slice(0,s).concat(Qe),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ge)}else{var bn=o,en=hs(e,Ge,n.unit),Gt=bn.anchor,Ht;ct(en.anchor,Gt)>0?(Ht=en.head,Gt=Kn(bn.from(),en.anchor)):(Ht=en.anchor,Gt=Be(bn.to(),en.head));var It=u.ranges.slice(0);It[s]=$l(e,new St(ut(a,Gt),Ht)),rn(a,Fn(e,It,s),ke)}}var Y=i.wrapper.getBoundingClientRect(),_e=0;function Re(Ge){var Qe=++_e,dt=yr(e,Ge,!0,n.unit=="rectangle");if(!dt)return;if(ct(dt,A)!=0){e.curOp.focus=q(),Q(dt);var at=Ni(i,a);(dt.line>=at.to||dt.line<at.from)&&setTimeout(Vt(e,function(){_e==Qe&&Re(Ge)}),150)}else{var vt=Ge.clientY<Y.top?-20:Ge.clientY>Y.bottom?20:0;vt&&setTimeout(Vt(e,function(){if(_e!=Qe)return;i.scroller.scrollTop+=vt,Re(Ge)}),50)}}function Fe(Ge){e.state.selectingText=!1,_e=Infinity,Ge&&(f(Ge),i.input.focus()),qe(i.wrapper.ownerDocument,"mousemove",ze),qe(i.wrapper.ownerDocument,"mouseup",Ve),a.history.lastSelOrigin=null}var ze=Vt(e,function(Ge){Ge.buttons===0||!fe(Ge)?Fe(Ge):Re(Ge)}),Ve=Vt(e,Fe);e.state.selectingText=Ve,xe(i.wrapper.ownerDocument,"mousemove",ze),xe(i.wrapper.ownerDocument,"mouseup",Ve)}function $l(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(ct(r,n)==0&&r.sticky==n.sticky)return t;var a=tt(i);if(!a)return t;var o=Ye(a,r.ch,r.sticky),s=a[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var u=o+(s.from==r.ch==(s.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 k=Ye(a,n.ch,n.sticky),A=k-o||(n.ch-r.ch)*(s.level==1?-1:1);k==u-1||k==u?d=A<0:d=A>0}var Q=a[u+(d?-1:0)],Y=d==(Q.level==1),_e=Y?Q.from:Q.to,Re=Y?"after":"before";return r.ch==_e&&r.sticky==Re?t:new St(new je(r.line,_e,Re),n)}function ps(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(Q){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!R(e,r))return v(t);a-=s.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 k=Sn(e.doc,a),A=e.display.gutterSpecs[u];return Oe(e,r,e,k,A.className,t),v(t)}}}function Ra(e,t){return ps(e,t,"gutterClick",!0)}function ms(e,t){if(Qn(e.display,t)||Vl(e,t))return;if(Ue(e,t,"contextmenu"))return;Ne||e.display.input.onContextMenu(t)}function Vl(e,t){return R(e,"gutterContextMenu")?ps(e,t,"gutterContextMenu",!1):!1}function gs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ri(e)}var Kr={toString:function(){return"CodeMirror.Init"}},vs={},Vi={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(s,u,d){d!=Kr&&a(s,u,d)}:a)}e.defineOption=r,e.Init=Kr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Ca(n)},!0),r("indentUnit",2,Ca,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){di(n),ri(n),mn(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 k=u.text.indexOf(i,d);if(k==-1)break;d=k+i.length,a.push(je(o,k))}o++});for(var s=a.length-1;s>=0;s--)Hr(n.doc,i,a[s],je(a[s].line,a[s].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Kr&&n.refresh()}),r("specialCharPlaceholder",Qr,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",le?"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",!We),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){gs(n),ci(n)},!0),r("keyMap","default",function(n,i,a){var o=Ki(i),s=a!=Kr&&Ki(a);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,ql,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=wa(i,n.options.lineNumbers),ci(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?da(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Fr(n)},!0),r("scrollbarStyle","native",function(n){yo(n),Fr(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=wa(n.options.gutters,i),ci(n)},!0),r("firstLineNumber",1,ci,!0),r("lineNumberFormatter",function(n){return n},ci,!0),r("showCursorWhenSelecting",!1,ii,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(jr(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ii,!0),r("singleCursorHeightPerLine",!0,ii,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,di,!0),r("addModeClass",!1,di,!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,di,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Kr;if(!t!=!n){var i=e.display.dragFunctions,a=t?xe: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 ql(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(me(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),fa(e),mn(e),ri(e),setTimeout(function(){return Fr(e)},100)}function Dt(e,t){var r=this;if(!(this instanceof Dt))return new Dt(e,t);this.options=t=t?l(t):{},l(vs,t,!1);var n=t.value;typeof n=="string"?n=new gn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Dt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,gs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yo(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 C,keySeq:null,specialChars:null},t.autofocus&&!le&&a.input.focus(),M&&L<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Ol(),Cr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!le||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&pa(r)},20):jr(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Kr);Eo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Pa.length;++s)Pa[s](this);kr(this),y&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Dt.defaults=vs,Dt.optionHandlers=Vi;function Zl(e){var t=e.display;xe(t.scroller,"mousedown",Vt(e,fs)),M&&L<11?xe(t.scroller,"dblclick",Vt(e,function(u){if(Ue(e,u))return;var d=yr(e,u);if(!d||Ra(e,u)||Qn(e.display,u))return;f(u);var k=e.findWordAt(d);Wi(e.doc,k.anchor,k.head)})):xe(t.scroller,"dblclick",function(u){return Ue(e,u)||f(u)}),xe(t.scroller,"contextmenu",function(u){return ms(e,u)}),xe(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||ms(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 k=d.left-u.left,A=d.top-u.top;return k*k+A*A>20*20}xe(t.scroller,"touchstart",function(u){if(!Ue(e,u)&&!a(u)&&!Ra(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)}}),xe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),xe(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Qn(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var k=e.coordsChar(t.activeTouch,"page"),A;!d.prev||o(d,d.prev)?A=new St(k,k):!d.prev.prev||o(d,d.prev.prev)?A=e.findWordAt(k):A=new St(je(k.line,0),ut(e.doc,je(k.line+1,0))),e.setSelection(A.anchor,A.head),e.focus(),f(u)}i()}),xe(t.scroller,"touchcancel",i),xe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(oi(e,t.scroller.scrollTop),wr(e,t.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),xe(t.scroller,"mousewheel",function(u){return So(e,u)}),xe(t.scroller,"DOMMouseScroll",function(u){return So(e,u)}),xe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Ue(e,u)||x(u)},over:function(u){Ue(e,u)||(Al(e,u),x(u))},start:function(u){return Tl(e,u)},drop:Vt(e,_l),leave:function(u){Ue(e,u)||Qo(e)}};var s=t.input.getField();xe(s,"keyup",function(u){return cs.call(e,u)}),xe(s,"keydown",Vt(e,us)),xe(s,"keypress",Vt(e,ds)),xe(s,"focus",function(u){return pa(e,u)}),xe(s,"blur",function(u){return jr(e,u)})}var Pa=[];Dt.defineInitHook=function(e){return Pa.push(e)};function ki(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=pe(e,t).state:r="prev");var o=e.options.tabSize,s=Ze(i,t),u=g(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var d=s.text.match(/^\s*/)[0],k;if(!n&&!/\S/.test(s.text))k=0,r="not";else if(r=="smart"&&(k=i.mode.indent(a,s.text.slice(d.length),s.text),k==we||k>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?k=g(Ze(i,t-1).text,null,o):k=0:r=="add"?k=u+e.options.indentUnit:r=="subtract"?k=u-e.options.indentUnit:typeof r=="number"&&(k=u+r),k=Math.max(0,k);var A="",Q=0;if(e.options.indentWithTabs)for(var Y=Math.floor(k/o);Y;--Y)Q+=o,A+=" ";if(Q<k&&(A+=ie(k-Q)),A!=d)return Hr(i,A,je(t,0),je(t,d.length),"+input"),s.stateAfter=null,!0;for(var _e=0;_e<i.sel.ranges.length;_e++){var Re=i.sel.ranges[_e];if(Re.head.line==t&&Re.head.ch<d.length){var Fe=je(t,d.length);Ta(i,_e,new St(Fe,Fe));break}}}var Un=null;function Yi(e){Un=e}function Na(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,s=i=="paste"||e.state.pasteIncoming>o,u=bt(t),d=null;if(s&&n.ranges.length>1)if(Un&&Un.text.join(`
`)==t){if(n.ranges.length%Un.text.length==0){d=[];for(var k=0;k<Un.text.length;k++)d.push(a.splitLines(Un.text[k]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=T(u,function(ze){return[ze]}));for(var A=e.curOp.updateInput,Q=n.ranges.length-1;Q>=0;Q--){var Y=n.ranges[Q],_e=Y.from(),Re=Y.to();Y.empty()&&(r&&r>0?_e=je(_e.line,_e.ch-r):e.state.overwrite&&!s?Re=je(Re.line,Math.min(Ze(a,Re.line).text.length,Re.ch+h(u).length)):s&&Un&&Un.lineWise&&Un.text.join(`
`)==u.join(`
`)&&(_e=Re=je(_e.line,0)));var Fe={from:_e,to:Re,text:d?d[Q%d.length]:u,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Wr(e.doc,Fe),Qt(e,"inputRead",e,Fe)}t&&!s&&ys(e,t),Ir(e),e.curOp.updateInput<2&&(e.curOp.updateInput=A),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function bs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&wn(t,function(){return Na(t,r,0,null,"paste")}),!0}function ys(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=ki(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=ki(e,i.head.line,"smart")));o&&Qt(e,"electricInput",e,i.head.line)}}function xs(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:je(i,0),head:je(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function ws(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Es(){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 y?e.style.width="1000px":e.setAttribute("wrap","off"),j&&(e.style.border="1px solid black"),ws(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)&&Vt(this,t[n])(this,i,o),Oe(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"](Ki(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:dn(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");p(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,mn(this)}),removeOverlay:dn(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++,mn(this);return}}}),indentLine:dn(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Pn(this.doc,n)&&ki(this,n,i,a)}),indentSelection:dn(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var s=i[o];if(s.empty())s.head.line>a&&(ki(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&Ir(this));else{var u=s.from(),d=s.to(),k=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var A=k;A<a;++A)ki(this,A,n);var Q=this.doc.sel.ranges;u.ch==0&&i.length==Q.length&&Q[o].from().ch>0&&Ta(this.doc,o,new St(u,Q[o].to()),ce)}}}),getTokenAt:function(n,i){return Xt(this,n,i)},getLineTokens:function(n,i){return Xt(this,je(n),i,!0)},getTokenTypeAt:function(n){n=ut(this.doc,n);var i=st(this,Ze(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,u;if(s==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=s)o=d;else if(i[d*2+1]<s)a=d+1;else{u=i[d*2+2];break}}var k=u?u.indexOf("overlay "):-1;return k<0?u:k==0?null:u.slice(0,k-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],s=this.getModeAt(n);if(typeof s[i]=="string")o[s[i]]&&a.push(o[s[i]]);else if(s[i])for(var u=0;u<s[i].length;u++){var d=o[s[i][u]];d&&a.push(d)}else s.helperType&&o[s.helperType]?a.push(o[s.helperType]):o[s.name]&&a.push(o[s.name]);for(var k=0;k<o._global.length;k++){var A=o._global[k];A.pred(s,this)&&D(a,A.val)==-1&&a.push(A.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Tr(a,n==null?a.first+a.size-1:n),pe(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=ut(this.doc,n):a=n?o.from():o.to(),In(this,a,i||"page")},charCoords:function(n,i){return oa(this,ut(this.doc,n),i||"page")},coordsChar:function(n,i){return n=ro(this,n,i||"page"),la(this,n.left,n.top)},lineAtHeight:function(n,i){return n=ro(this,{top:n,left:0},i||"page").top,Sn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,s;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),s=Ze(this.doc,n)}else s=n;return Mi(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Mt(s):0)},defaultTextHeight:function(){return Pr(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,s){var u=this.display;n=In(this,ut(this.doc,n));var d=n.bottom,k=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 A=Math.max(u.wrapper.clientHeight,this.doc.height),Q=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>A)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=A&&(d=n.bottom),k+i.offsetWidth>Q&&(k=Q-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",s=="right"?(k=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?k=0:s=="middle"&&(k=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=k+"px"),a&&Js(this,{left:k,top:d,right:k+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:dn(us),triggerOnKeyPress:dn(ds),triggerOnKeyUp:cs,triggerOnMouseDown:dn(fs),execCommand:function(n){if(xi.hasOwnProperty(n))return xi[n].call(null,this)},triggerElectric:dn(function(n){ys(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var u=ut(this.doc,n),d=0;d<i&&!(u=ja(this.doc,u,s,a,o),u.hitSide);++d);return u},moveH:dn(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?ja(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},ne)}),deleteH:dn(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Xr(this,function(s){var u=ja(o,s.head,n,i,!1);return n<0?{from:u,to:s.head}:{from:s.head,to:u}})}),findPosV:function(n,i,a,o){var s=1,u=o;i<0&&(s=-1,i=-i);for(var d=ut(this.doc,n),k=0;k<i;++k){var A=In(this,d,"div");if(u==null?u=A.left:A.left=u,d=Cs(this,A,s,a),d.hitSide)break}return d},moveV:dn(function(n,i){var a=this,o=this.doc,s=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(k){if(u)return n<0?k.from():k.to();var A=In(a,k.head,"div");k.goalColumn!=null&&(A.left=k.goalColumn),s.push(A.left);var Q=Cs(a,A,n,i);return i=="page"&&k==o.sel.primary()&&ga(a,oa(a,Q,"div").top-A.top),Q},ne),s.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=s[d]}),findWordAt:function(n){var i=this.doc,a=Ze(i,n.line).text,o=n.ch,s=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||s==a.length)&&o?--o:++s;for(var d=a.charAt(o),k=Se(d,u)?function(A){return Se(A,u)}:/\s/.test(d)?function(A){return/\s/.test(A)}:function(A){return!/\s/.test(A)&&!Se(A)};o>0&&k(a.charAt(o-1));)--o;for(;s<a.length&&k(a.charAt(s));)++s}return new St(je(n.line,o),je(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?N(this.display.cursorDiv,"CodeMirror-overwrite"):me(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==q()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dn(function(n,i){ai(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Hn(this)-this.display.barHeight,width:n.scrollWidth-Hn(this)-this.display.barWidth,clientHeight:ra(this),clientWidth:vr(this)}},scrollIntoView:dn(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:je(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?qs(this,n):mo(this,n.from,n.to,n.margin)}),setSize:dn(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&&eo(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){or(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(n){return wn(this,n)},startOperation:function(){return Cr(this)},endOperation:function(){return kr(this)},refresh:dn(function(){var n=this.display.cachedTextHeight;mn(this),this.curOp.forceUpdate=!0,ri(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),ya(this.display),(n==null||Math.abs(n-Pr(this.display))>.5||this.options.lineWrapping)&&fa(this),Oe(this,"refresh",this)}),swapDoc:dn(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Oo(this,n),ri(this),this.display.input.reset(),ai(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Qt(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}},S(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 ja(e,t,r,n,i){var a=t,o=r,s=Ze(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var Ve=t.line+u;return Ve<e.first||Ve>=e.first+e.size?!1:(t=new je(Ve,t.ch,t.sticky),s=Ze(e,Ve))}function k(Ve){var Ge;if(n=="codepoint"){var Qe=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Qe)?Ge=null:Ge=new je(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(Qe>=55296&&Qe<56320?2:1))),-r)}else i?Ge=Pl(e.cm,s,t,r):Ge=Oa(s,t,r);if(Ge==null)if(!Ve&&d())t=La(i,e.cm,s,t.line,u);else return!1;else t=Ge;return!0}if(n=="char"||n=="codepoint")k();else if(n=="column")k(!0);else if(n=="word"||n=="group")for(var A=null,Q=n=="group",Y=e.cm&&e.cm.getHelper(t,"wordChars"),_e=!0;!(r<0&&!k(!_e));_e=!1){var Re=s.text.charAt(t.ch)||`
`,Fe=Se(Re,Y)?"w":Q&&Re==`
`?"n":!Q||/\s/.test(Re)?null:"p";if(Q&&!_e&&!Fe&&(Fe="s"),A&&A!=Fe){r<0&&(r=1,k(),t.sticky="after");break}if(Fe&&(A=Fe),r>0&&!k(!_e))break}var ze=zi(e,t,a,o,!0);return _n(a,ze)&&(ze.hitSide=!0),ze}function Cs(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Pr(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=la(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var Tt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new C,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Tt.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;ws(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(s){for(var u=s.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}xe(i,"paste",function(s){if(!a(s)||Ue(n,s)||bs(s,n))return;L<=11&&setTimeout(Vt(n,function(){return t.updateFromDOM()}),20)}),xe(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),xe(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),xe(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),xe(i,"touchstart",function(){return r.forceCompositionEnd()}),xe(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||Ue(n,s))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=xs(n);Yi({lineWise:!0,text:u.text}),s.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,ce),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var d=Un.text.join(`
`);if(s.clipboardData.setData("Text",d),s.clipboardData.getData("Text")==d){s.preventDefault();return}}var k=Es(),A=k.firstChild;n.display.lineSpace.insertBefore(k,n.display.lineSpace.firstChild),A.value=Un.text.join(`
`);var Q=document.activeElement;_(A),setTimeout(function(){n.display.lineSpace.removeChild(k),Q.focus(),Q==i&&r.showPrimarySelection()},50)}xe(i,"copy",o),xe(i,"cut",o)},Tt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Tt.prototype.prepareSelection=function(){var e=uo(this.cm,!1);return e.focus=document.activeElement==this.div,e},Tt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Tt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Tt.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=Ji(t,e.anchorNode,e.anchorOffset),o=Ji(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&ct(Kn(a,o),n)==0&&ct(Be(a,o),i)==0)return;var s=t.display.view,u=n.line>=t.display.viewFrom&&ks(t,n)||{node:s[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&ks(t,i);if(!d){var k=s[s.length-1].measure,A=k.maps?k.maps[k.maps.length-1]:k.map;d={node:A[A.length-1],offset:A[A.length-2]-A[A.length-3]}}if(!u||!d){e.removeAllRanges();return}var Q=e.rangeCount&&e.getRangeAt(0),Y;try{Y=G(u.node,u.offset,d.offset,d.node)}catch(_e){}Y&&(!re&&t.state.focused?(e.collapse(u.node,u.offset),Y.collapsed||(e.removeAllRanges(),e.addRange(Y))):(e.removeAllRanges(),e.addRange(Y)),Q&&e.anchorNode==null?e.addRange(Q):re&&this.startGracePeriod()),this.rememberSelection()},Tt.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)},Tt.prototype.showMultipleSelections=function(e){W(this.cm.display.cursorDiv,e.cursors),W(this.cm.display.selectionDiv,e.selection)},Tt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Tt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return E(this.div,t)},Tt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Tt.prototype.blur=function(){this.div.blur()},Tt.prototype.getField=function(){return this.div},Tt.prototype.supportsTouch=function(){return!0},Tt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():wn(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)},Tt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Tt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(F&&V&&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=Ji(t,e.anchorNode,e.anchorOffset),n=Ji(t,e.focusNode,e.focusOffset);r&&n&&wn(t,function(){rn(t.doc,lr(r,n),ce),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},Tt.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=je(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=je(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=xr(e,n.line))==0?(o=wt(t.view[0].line),s=t.view[0].node):(o=wt(t.view[a].line),s=t.view[a-1].node.nextSibling);var u=xr(e,i.line),d,k;if(u==t.view.length-1?(d=t.viewTo-1,k=t.lineDiv.lastChild):(d=wt(t.view[u+1].line)-1,k=t.view[u+1].node.previousSibling),!s)return!1;for(var A=e.doc.splitLines(tu(e,s,k,o,d)),Q=Zt(e.doc,je(o,0),je(d,Ze(e.doc,d).text.length));A.length>1&&Q.length>1;)if(h(A)==h(Q))A.pop(),Q.pop(),d--;else if(A[0]==Q[0])A.shift(),Q.shift(),o++;else break;for(var Y=0,_e=0,Re=A[0],Fe=Q[0],ze=Math.min(Re.length,Fe.length);Y<ze&&Re.charCodeAt(Y)==Fe.charCodeAt(Y);)++Y;for(var Ve=h(A),Ge=h(Q),Qe=Math.min(Ve.length-(A.length==1?Y:0),Ge.length-(Q.length==1?Y:0));_e<Qe&&Ve.charCodeAt(Ve.length-_e-1)==Ge.charCodeAt(Ge.length-_e-1);)++_e;if(A.length==1&&Q.length==1&&o==n.line)for(;Y&&Y>n.ch&&Ve.charCodeAt(Ve.length-_e-1)==Ge.charCodeAt(Ge.length-_e-1);)Y--,_e++;A[A.length-1]=Ve.slice(0,Ve.length-_e).replace(/^\u200b+/,""),A[0]=A[0].slice(Y).replace(/\u200b+$/,"");var dt=je(o,Y),at=je(d,Q.length?h(Q).length-_e:0);if(A.length>1||A[0]||ct(dt,at))return Hr(e.doc,A,dt,at,"+input"),!0},Tt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Tt.prototype.reset=function(){this.forceCompositionEnd()},Tt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Tt.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)},Tt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&wn(this.cm,function(){return mn(e.cm)})},Tt.prototype.setUneditable=function(e){e.contentEditable="false"},Tt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Vt(this.cm,Na)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Tt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Tt.prototype.onContextMenu=function(){},Tt.prototype.resetPosition=function(){},Tt.prototype.needsContentAttribute=!0;function ks(e,t){var r=ia(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=Ya(r,n,t.line),a=tt(n,e.doc.direction),o="left";if(a){var s=Ye(a,t.ch);o=s%2?"right":"left"}var u=Za(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 $r(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,s=e.doc.lineSeparator(),u=!1;function d(Y){return function(_e){return _e.id==Y}}function k(){o&&(a+=s,u&&(a+=s),o=u=!1)}function A(Y){Y&&(k(),a+=Y)}function Q(Y){if(Y.nodeType==1){var _e=Y.getAttribute("cm-text");if(_e){A(_e);return}var Re=Y.getAttribute("cm-marker"),Fe;if(Re){var ze=e.findMarks(je(n,0),je(i+1,0),d(+Re));ze.length&&(Fe=ze[0].find(0))&&A(Zt(e.doc,Fe.from,Fe.to).join(s));return}if(Y.getAttribute("contenteditable")=="false")return;var Ve=/^(pre|div|p|li|table|br)$/i.test(Y.nodeName);if(!/^br$/i.test(Y.nodeName)&&Y.textContent.length==0)return;Ve&&k();for(var Ge=0;Ge<Y.childNodes.length;Ge++)Q(Y.childNodes[Ge]);/^(pre|p)$/i.test(Y.nodeName)&&(u=!0),Ve&&(o=!0)}else Y.nodeType==3&&A(Y.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Q(t),t==r);)t=t.nextSibling,u=!1;return a}function Ji(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $r(e.clipPos(je(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||!E(n,t))return $r(je(wt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?h(e.rest):e.line;return $r(je(wt(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var u=e.measure,d=u.maps;function k(Fe,ze,Ve){for(var Ge=-1;Ge<(d?d.length:0);Ge++)for(var Qe=Ge<0?u.map:d[Ge],dt=0;dt<Qe.length;dt+=3){var at=Qe[dt+2];if(at==Fe||at==ze){var vt=wt(Ge<0?e.line:e.rest[Ge]),Ot=Qe[dt]+Ve;return(Ve<0||at!=Fe)&&(Ot=Qe[dt+(Ve?1:0)]),je(vt,Ot)}}}var A=k(o,s,r);if(A)return $r(A,i);for(var Q=s.nextSibling,Y=o?o.nodeValue.length-r:0;Q;Q=Q.nextSibling){if(A=k(Q,Q.firstChild,0),A)return $r(je(A.line,A.ch-Y),i);Y+=Q.textContent.length}for(var _e=s.previousSibling,Re=r;_e;_e=_e.previousSibling){if(A=k(_e,_e.firstChild,-1),A)return $r(je(A.line,A.ch+Re),i);Re+=_e.textContent.length}}var Ut=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new C,this.hasSelection=!1,this.composing=null};Ut.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"),xe(i,"input",function(){M&&L>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),xe(i,"paste",function(o){if(Ue(n,o)||bs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Ue(n,o))return;if(n.somethingSelected())Yi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=xs(n);Yi({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,ce):(r.prevInput="",i.value=s.text.join(`
`),_(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}xe(i,"cut",a),xe(i,"copy",a),xe(e.scroller,"paste",function(o){if(Qn(e,o)||Ue(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),xe(e.lineSpace,"selectstart",function(o){Qn(e,o)||f(o)}),xe(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"})}}),xe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ut.prototype.createField=function(e){this.wrapper=Es(),this.textarea=this.wrapper.firstChild},Ut.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ut.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=uo(e);if(e.options.moveInputWithCursor){var i=In(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},Ut.prototype.showSelection=function(e){var t=this.cm,r=t.display;W(r.cursorDiv,e.cursors),W(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ut.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&&_(this.textarea),M&&L>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",M&&L>=9&&(this.hasSelection=null))},Ut.prototype.getField=function(){return this.textarea},Ut.prototype.supportsTouch=function(){return!1},Ut.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!le||q()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ut.prototype.blur=function(){this.textarea.blur()},Ut.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ut.prototype.receivedFocus=function(){this.slowPoll()},Ut.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()})},Ut.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)},Ut.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ht(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(M&&L>=9&&this.hasSelection===i||oe&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,i.length);o<s&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return wn(t,function(){Na(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},Ut.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ut.prototype.onKeyPress=function(){M&&L>=9&&(this.hasSelection=null),this.fastPoll()},Ut.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=yr(r,e),o=n.scroller.scrollTop;if(!a||ae)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Vt(r,rn)(r.doc,lr(a),ce);var u=i.style.cssText,d=t.wrapper.style.cssText,k=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-k.top-5)+"px; left: "+(e.clientX-k.left-5)+`px;
z-index: 1000; background: `+(M?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var A;y&&(A=window.scrollY),n.input.focus(),y&&window.scrollTo(null,A),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=Y,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Q(){if(i.selectionStart!=null){var Re=r.somethingSelected(),Fe="\u200B"+(Re?i.value:"");i.value="\u21DA",i.value=Fe,t.prevInput=Re?"":"\u200B",i.selectionStart=1,i.selectionEnd=Fe.length,n.selForContextMenu=r.doc.sel}}function Y(){if(t.contextMenuPending!=Y)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,M&&L<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!M||M&&L<9)&&Q();var Re=0,Fe=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Vt(r,Ho)(r):Re++<10?n.detectingSelectAll=setTimeout(Fe,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Fe,200)}}if(M&&L>=9&&Q(),Ne){x(e);var _e=function(){qe(window,"mouseup",_e),setTimeout(Y,20)};xe(window,"mouseup",_e)}else setTimeout(Y,50)},Ut.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ut.prototype.setUneditable=function(){},Ut.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?l(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=q();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(xe(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 s=Dt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function iu(e){e.off=qe,e.on=xe,e.wheelEventPixels=dl,e.Doc=gn,e.splitLines=bt,e.countColumn=g,e.findColumn=ue,e.isWordChar=te,e.Pass=we,e.signal=Oe,e.Line=$t,e.changeEnd=ur,e.scrollbarModel=bo,e.Pos=je,e.cmpPos=ct,e.modes=Rt,e.mimeModes=yt,e.resolveMode=sn,e.getMode=kn,e.modeExtensions=tn,e.extendMode=nr,e.copyState=On,e.startState=Bn,e.innerMode=Rn,e.commands=xi,e.keyMap=er,e.keyName=is,e.isModifierKey=ns,e.lookupKey=Gr,e.normalizeKeyMap=Rl,e.StringStream=At,e.SharedTextMarker=vi,e.TextMarker=dr,e.LineWidget=gi,e.e_preventDefault=f,e.e_stopPropagation=m,e.e_stop=x,e.addClass=N,e.contains=E,e.rmClass=me,e.keyNames=fr}Yl(Dt),Ql(Dt);var au="iter insert remove copy getEditor constructor".split(" ");for(var qi in gn.prototype)gn.prototype.hasOwnProperty(qi)&&D(au,qi)<0&&(Dt.prototype[qi]=function(e){return function(){return e.apply(this.doc,arguments)}}(gn.prototype[qi]));return S(gn),Dt.inputStyles={textarea:Ut,contenteditable:Tt},Dt.defineMode=function(e){!Dt.defaults.mode&&e!="null"&&(Dt.defaults.mode=e),on.apply(this,arguments)},Dt.defineMIME=Cn,Dt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Dt.defineMIME("text/plain","null"),Dt.defineExtension=function(e,t){Dt.prototype[e]=t},Dt.defineDocExtension=function(e,t){gn.prototype[e]=t},Dt.fromTextArea=ru,iu(Dt),Dt.version="5.58.2",Dt})},X0ci:function(ft,Xe,w){},Y1PL:function(ft,Xe,w){"use strict";w.r(Xe),w.d(Xe,"ResizableTextArea",function(){return D});var I=w("wx14"),ve=w("1OyB"),re=w("vuIU"),Ee=w("Ji7U"),ye=w("LK+K"),$=w("q1tI"),M=w("VTBJ"),L=w("rePB"),y=w("Zm9Q"),X=w("Kwbf"),V=w("c+Xe"),ae=w("m+aA"),Ce=w("bdgK"),se=new Map;function B(ce){ce.forEach(function(ke){var ne,ue=ke.target;(ne=se.get(ue))===null||ne===void 0||ne.forEach(function(H){return H(ue)})})}var j=new Ce.default(B),F=null,le=null;function oe(ce,ke){se.has(ce)||(se.set(ce,new Set),j.observe(ce)),se.get(ce).add(ke)}function Me(ce,ke){se.has(ce)&&(se.get(ce).delete(ke),se.get(ce).size||(j.unobserve(ce),se.delete(ce)))}var We=function(ce){Object(Ee.a)(ne,ce);var ke=Object(ye.a)(ne);function ne(){return Object(ve.a)(this,ne),ke.apply(this,arguments)}return Object(re.a)(ne,[{key:"render",value:function(){return this.props.children}}]),ne}($.Component),he=$.createContext(null);function Te(ce){var ke=ce.children,ne=ce.onBatchResize,ue=$.useRef(0),H=$.useRef([]),ie=$.useContext(he),h=$.useCallback(function(T,p,P){ue.current+=1;var Z=ue.current;H.current.push({size:T,element:p,data:P}),Promise.resolve().then(function(){Z===ue.current&&(ne==null||ne(H.current),H.current=[])}),ie==null||ie(T,p,P)},[ne,ie]);return $.createElement(he.Provider,{value:h},ke)}function Ne(ce){var ke=ce.children,ne=ce.disabled,ue=$.useRef(null),H=$.useRef(null),ie=$.useContext(he),h=$.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),T=$.isValidElement(ke)&&Object(V.c)(ke),p=T?ke.ref:null,P=$.useMemo(function(){return Object(V.a)(p,ue)},[p,ue]),Z=$.useRef(ce);Z.current=ce;var z=$.useCallback(function(te){var Se=Z.current,Pe=Se.onResize,Le=Se.data,ge=te.getBoundingClientRect(),Ae=ge.width,Ie=ge.height,$e=te.offsetWidth,He=te.offsetHeight,Ye=Math.floor(Ae),lt=Math.floor(Ie);if(h.current.width!==Ye||h.current.height!==lt||h.current.offsetWidth!==$e||h.current.offsetHeight!==He){var tt={width:Ye,height:lt,offsetWidth:$e,offsetHeight:He};h.current=tt;var Ke=$e===Math.round(Ae)?Ae:$e,xe=He===Math.round(Ie)?Ie:He,rt=Object(M.a)(Object(M.a)({},tt),{},{offsetWidth:Ke,offsetHeight:xe});ie==null||ie(rt,te,Le),Pe&&Promise.resolve().then(function(){Pe(rt,te)})}},[]);return $.useEffect(function(){var te=Object(ae.a)(ue.current)||Object(ae.a)(H.current);return te&&!ne&&oe(te,z),function(){return Me(te,z)}},[ue.current,ne]),$.createElement(We,{ref:H},T?$.cloneElement(ke,{ref:P}):ke)}var be="rc-observer-key";function me(ce){var ke=ce.children,ne=Object(y.a)(ke);return ne.map(function(ue,H){var ie=(ue==null?void 0:ue.key)||"".concat(be,"-").concat(H);return $.createElement(Ne,Object(I.a)({},ce,{key:ie}),ue)})}me.Collection=Te;var de=me,W=w("bT9E"),b=w("TSYQ"),K=w.n(b),G=`
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
`,E=["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"],q={},N;function O(ce){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ne=ce.getAttribute("id")||ce.getAttribute("data-reactid")||ce.getAttribute("name");if(ke&&q[ne])return q[ne];var ue=window.getComputedStyle(ce),H=ue.getPropertyValue("box-sizing")||ue.getPropertyValue("-moz-box-sizing")||ue.getPropertyValue("-webkit-box-sizing"),ie=parseFloat(ue.getPropertyValue("padding-bottom"))+parseFloat(ue.getPropertyValue("padding-top")),h=parseFloat(ue.getPropertyValue("border-bottom-width"))+parseFloat(ue.getPropertyValue("border-top-width")),T=E.map(function(P){return"".concat(P,":").concat(ue.getPropertyValue(P))}).join(";"),p={sizingStyle:T,paddingSize:ie,borderSize:h,boxSizing:H};return ke&&ne&&(q[ne]=p),p}function _(ce){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;N||(N=document.createElement("textarea"),N.setAttribute("tab-index","-1"),N.setAttribute("aria-hidden","true"),document.body.appendChild(N)),ce.getAttribute("wrap")?N.setAttribute("wrap",ce.getAttribute("wrap")):N.removeAttribute("wrap");var H=O(ce,ke),ie=H.paddingSize,h=H.borderSize,T=H.boxSizing,p=H.sizingStyle;N.setAttribute("style","".concat(p,";").concat(G)),N.value=ce.value||ce.placeholder||"";var P=Number.MIN_SAFE_INTEGER,Z=Number.MAX_SAFE_INTEGER,z=N.scrollHeight,te;if(T==="border-box"?z+=h:T==="content-box"&&(z-=ie),ne!==null||ue!==null){N.value=" ";var Se=N.scrollHeight-ie;ne!==null&&(P=Se*ne,T==="border-box"&&(P=P+ie+h),z=Math.max(P,z)),ue!==null&&(Z=Se*ue,T==="border-box"&&(Z=Z+ie+h),te=z>Z?"":"hidden",z=Math.min(Z,z))}return{height:z,minHeight:P,maxHeight:Z,overflowY:te,resize:"none"}}var c=w("Gytx"),l=w.n(c),g;(function(ce){ce[ce.NONE=0]="NONE",ce[ce.RESIZING=1]="RESIZING",ce[ce.RESIZED=2]="RESIZED"})(g||(g={}));var C=function(ce){Object(Ee.a)(ne,ce);var ke=Object(ye.a)(ne);function ne(ue){var H;return Object(ve.a)(this,ne),H=ke.call(this,ue),H.nextFrameActionId=void 0,H.resizeFrameId=void 0,H.textArea=void 0,H.saveTextArea=function(ie){H.textArea=ie},H.handleResize=function(ie){var h=H.state.resizeStatus,T=H.props,p=T.autoSize,P=T.onResize;if(h!==g.NONE)return;typeof P=="function"&&P(ie),p&&H.resizeOnNextFrame()},H.resizeOnNextFrame=function(){cancelAnimationFrame(H.nextFrameActionId),H.nextFrameActionId=requestAnimationFrame(H.resizeTextarea)},H.resizeTextarea=function(){var ie=H.props.autoSize;if(!ie||!H.textArea)return;var h=ie.minRows,T=ie.maxRows,p=_(H.textArea,!1,h,T);H.setState({textareaStyles:p,resizeStatus:g.RESIZING},function(){cancelAnimationFrame(H.resizeFrameId),H.resizeFrameId=requestAnimationFrame(function(){H.setState({resizeStatus:g.RESIZED},function(){H.resizeFrameId=requestAnimationFrame(function(){H.setState({resizeStatus:g.NONE}),H.fixFirefoxAutoScroll()})})})})},H.renderTextArea=function(){var ie=H.props,h=ie.prefixCls,T=h===void 0?"rc-textarea":h,p=ie.autoSize,P=ie.onResize,Z=ie.className,z=ie.disabled,te=H.state,Se=te.textareaStyles,Pe=te.resizeStatus,Le=Object(W.a)(H.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ge=K()(T,Z,Object(L.a)({},"".concat(T,"-disabled"),z));"value"in Le&&(Le.value=Le.value||"");var Ae=Object(M.a)(Object(M.a)(Object(M.a)({},H.props.style),Se),Pe===g.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return $.createElement(de,{onResize:H.handleResize,disabled:!(p||P)},$.createElement("textarea",Object(I.a)({},Le,{className:ge,style:Ae,ref:H.saveTextArea})))},H.state={textareaStyles:{},resizeStatus:g.NONE},H}return Object(re.a)(ne,[{key:"componentDidUpdate",value:function(H){(H.value!==this.props.value||!l()(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,ie=this.textArea.selectionEnd;this.textArea.setSelectionRange(H,ie)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ne}($.Component),D=C,ee=function(ce){Object(Ee.a)(ne,ce);var ke=Object(ye.a)(ne);function ne(ue){var H;Object(ve.a)(this,ne),H=ke.call(this,ue),H.resizableTextArea=void 0,H.focus=function(){H.resizableTextArea.textArea.focus()},H.saveTextArea=function(h){H.resizableTextArea=h},H.handleChange=function(h){var T=H.props.onChange;H.setValue(h.target.value,function(){H.resizableTextArea.resizeTextarea()}),T&&T(h)},H.handleKeyDown=function(h){var T=H.props,p=T.onPressEnter,P=T.onKeyDown;h.keyCode===13&&p&&p(h),P&&P(h)};var ie=typeof ue.value=="undefined"||ue.value===null?ue.defaultValue:ue.value;return H.state={value:ie},H}return Object(re.a)(ne,[{key:"setValue",value:function(H,ie){"value"in this.props||this.setState({value:H},ie)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return $.createElement(D,Object(I.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}}]),ne}($.Component),we=Xe.default=ee},ZW9T:function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return We});var I=w("k1fw"),ve=w("miYZ"),re=w("tsqr"),Ee=w("rAM+"),ye=w("tJVT"),$=w("PpiC"),M=w("q1tI"),L=w.n(M),y=w("bdgK");function X(he,Te,Ne,be,me){var de=Te.getWordUntilPosition(Ne),W={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},b=be.map(function(K){return{label:K,kind:he.languages.CompletionItemKind.Keyword,insertText:K,insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:W}});return me.map(function(K){b.push(Object(I.a)(Object(I.a)({},K),{},{range:W}))}),b}var V=function(he){var Te={label:"ifelse",kind:he.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet},Ne=["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"];he.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(W,b){var K=X(he,W,b,Ne,[Te]);return{suggestions:K}}});var be=["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"];he.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(W,b){var K=[{label:"print",kind:he.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet}],G=X(he,W,b,be,K);return{suggestions:G}}});var me=["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"];he.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(W,b){var K=[Te,{label:"main",kind:he.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:he.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:he.languages.CompletionItemInsertTextRule.InsertAsSnippet}],G=X(he,W,b,me,K);return{suggestions:G}}})},ae="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",Ce=w("LvDl");function se(he){return/^\d+$/.test(he)?"".concat(he,"px"):he}function B(){}var j=!1,F={"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 le(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Te=he;if(Array.isArray(he)){for(var Ne=0;Ne<he.length;Ne++){var be=F[he[Ne]];if(be)return be}return Te[0]}return F[Te]||Te}var oe=null,Me=Xe.b=function(he){var Te=he.width,Ne=Te===void 0?"100%":Te,be=he.height,me=be===void 0?"100%":be,de=he.value,W=he.language,b=W===void 0?"javascript":W,K=he.style,G=K===void 0?{}:K,E=he.options,q=E===void 0?{}:E,N=he.overrideServices,O=N===void 0?{}:N,_=he.theme,c=_===void 0?"vs-dark":_,l=he.onEditBlur,g=he.onSave,C=he.autoHeight,D=C===void 0?!1:C,ee=he.forbidCopy,we=ee===void 0?!1:ee,ce=he.onChange,ke=ce===void 0?B:ce,ne=he.editorDidMount,ue=ne===void 0?B:ne,H=he.onFocus,ie=H===void 0?B:H,h=he.filename,T=h===void 0?"educoder.txt":h,p=Object($.a)(he,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),P=Object(M.useRef)(),Z=Object(M.useRef)({}),z=Object(M.useRef)(),te=Object(M.useRef)(!1),Se=Object(M.useRef)(),Pe=Object(M.useState)(!1),Le=Object(ye.a)(Pe,2),ge=Le[0],Ae=Le[1];function Ie(){var v;return P.current&&(v=new y.default(function(x){var J=Object(Ee.a)(x),fe;try{for(J.s();!(fe=J.n()).done;){var De=fe.value;(De.target.offsetHeight>0||De.target.offsetWidth>0)&&Z.current.instance.layout()}}catch(et){J.e(et)}finally{J.f()}}),v.observe(P.current)),v}function $e(){re.b.warn(decodeURIComponent(ae))}var He=function(){var x=Z.current.instance;if(de!=null&&x&&ge){var J=x.getModel();J&&de!==J.getValue()&&(j=!0,J.setValue(de),x.layout(),j=!1)}};Object(M.useEffect)(function(){z.current&&clearTimeout(z.current),z.current=setTimeout(function(){He()},500)},[de,ge,Z.current]);function Ye(){var v=Z.current.instance;if(v){var x=v.getSelection(),J=Z.current.pastePos||{},fe=new oe.Range(J.startLineNumber||x.endLineNumber,J.startColumn||x.endColumn,J.endLineNumber||x.endLineNumber,J.endColumn||x.endColumn);setTimeout(function(){v.executeEdits("",[{range:fe,text:""}])},300)}}function lt(v){(window.navigator.platform.match("Mac")?v.metaKey:v.ctrlKey)&&v.keyCode==83&&(v.preventDefault(),g())}var tt=function(){if(D&&Z.current.instance){var x=Z.current.instance.getContentHeight();f(x<me?me:x)}else f(me)};function Ke(v){var x=document.createEvent("MouseEvents");x.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),v.dispatchEvent(x)}function xe(v,x){var J=window.URL||window.webkitURL||window,fe=new Blob([x]),De=document.createElementNS("http://www.w3.org/1999/xhtml","a");De.href=J.createObjectURL(fe),De.download=v,Ke(De)}Object(M.useEffect)(function(){tt()},[tt]),Object(M.useEffect)(function(){P.current&&!ge&&w.e(26).then(w.t.bind(null,"M/lh",7)).then(function(v){try{oe=v,Z.current.instance=oe.editor.create(P.current,{value:de,language:le(b),theme:c,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},O);var x=Z.current.instance;if(ue(x,oe),setTimeout(function(){tt(),Z.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){xe(T||"educoder.txt",x.getValue())}})},500),Z.current.subscription=x.onDidChangeModelContent(function(fe){te.current?clearTimeout(Se.current):(tt(),ke(x.getValue(),fe)),Se.current=setTimeout(function(){te.current=!1},500)}),window.Monaco||V(oe),we&&(x.addCommand(oe.KeyMod.CtrlCmd|oe.KeyMod.Shift|oe.KeyCode.KEY_V,function(){return $e(),null}),x.addCommand(oe.KeyMod.CtrlCmd|oe.KeyCode.KEY_C,function(){return $e(),null})),window.Monaco=oe,l&&x.onDidBlurEditorWidget(function(){l(x.getValue())}),ie&&x.onDidFocusEditorText(function(){ie(x.getValue())}),we){x.addCommand(oe.KeyMod.CtrlCmd|oe.KeyCode.KEY_V,function(){return $e(),null}),x.onDidPaste(function(fe){Z.current.pastePos=fe});try{window.addEventListener("paste",Ye)}catch(fe){}}var J=Ie();return Ae(!0),function(){var fe=Z.current.instance;fe.dispose();var De=fe.getModel();De&&De.dispose(),Z.current.subscription&&Z.current.subscription.dispose(),we&&window.removeEventListener("paste",Ye),J.unobserve(P.current)}}catch(fe){}})},[]),Object(M.useEffect)(function(){var v=Z.current.instance;if(v&&ge)return document.addEventListener("keydown",lt,!1),function(){document.removeEventListener("keydown",lt)}},[g,ge]),Object(M.useEffect)(function(){var v=Z.current.instance;if(v&&ge){var x=le(b);oe.editor.setModelLanguage(v.getModel(),x),console.log("language:",b,v.getModel(),x)}},[b,ge]),Object(M.useEffect)(function(){var v=Z.current.instance;v&&ge&&oe.editor.setTheme(c)},[c,ge]),Object(M.useEffect)(function(){var v=Z.current.instance;v&&ge&&(v.updateOptions(Object(I.a)({},q)),setTimeout(function(){v.getModel().updateOptions(Object(I.a)({},q))},200))},[JSON.stringify(q),ge]),Object(M.useEffect)(function(){var v=Z.current.instance;v&&ge&&v.layout()},[Ne,me,ge]);var rt=Object(M.useState)(se(Ne)),qe=Object(ye.a)(rt,2),Oe=qe[0],Ue=qe[1],U=Object(M.useState)(se(me)),R=Object(ye.a)(U,2),S=R[0],f=R[1],m=Object(I.a)(Object(I.a)({},G),{},{width:Oe,height:S});return L.a.createElement("div",{className:"my-monaco-editor",ref:P,style:m})};function We(he){var Te=he.width,Ne=Te===void 0?"100%":Te,be=he.height,me=be===void 0?"100%":be,de=he.original,W=he.modified,b=he.language,K=he.options,G=K===void 0?{}:K,E=Object(M.useRef)(),q=Object(M.useState)(null),N=Object(ye.a)(q,2),O=N[0],_=N[1];function c(D){var ee;return E.current&&(ee=new y.default(function(we){var ce=Object(Ee.a)(we),ke;try{for(ce.s();!(ke=ce.n()).done;){var ne=ke.value;(ne.target.offsetHeight>0||ne.target.offsetWidth>0)&&D.layout()}}catch(ue){ce.e(ue)}finally{ce.f()}}),ee.observe(E.current)),ee}Object(M.useEffect)(function(){E.current&&w.e(26).then(w.t.bind(null,"M/lh",7)).then(function(D){oe=D;var ee=oe.editor.createDiffEditor(E.current,Object(I.a)(Object(I.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},G),{},{wordWrap:!0}));_(ee);var we=c(ee);return function(){ee.dispose();var ce=ee.getModel();ce&&ce.dispose(),we.unobserve(E.current)}})},[]),Object(M.useEffect)(function(){O&&O.setModel({original:oe.editor.createModel(de,b),modified:oe.editor.createModel(W,b)})},[de,W,b,O]);var l=se(Ne),g=se(me),C={width:l,height:g};return L.a.createElement("div",{className:"my-diff-editor",ref:E,style:C})}},ZpRC:function(ft,Xe,w){"use strict";function I(V){return typeof V=="object"&&V!=null&&V.nodeType===1}function ve(V,ae){return(!ae||V!=="hidden")&&V!=="visible"&&V!=="clip"}function re(V,ae){if(V.clientHeight<V.scrollHeight||V.clientWidth<V.scrollWidth){var Ce=getComputedStyle(V,null);return ve(Ce.overflowY,ae)||ve(Ce.overflowX,ae)||function(se){var B=function(j){if(!j.ownerDocument||!j.ownerDocument.defaultView)return null;try{return j.ownerDocument.defaultView.frameElement}catch(F){return null}}(se);return!!B&&(B.clientHeight<se.scrollHeight||B.clientWidth<se.scrollWidth)}(V)}return!1}function Ee(V,ae,Ce,se,B,j,F,le){return j<V&&F>ae||j>V&&F<ae?0:j<=V&&le<=Ce||F>=ae&&le>=Ce?j-V-se:F>ae&&le<Ce||j<V&&le>Ce?F-ae+B:0}var ye=function(V,ae){var Ce=window,se=ae.scrollMode,B=ae.block,j=ae.inline,F=ae.boundary,le=ae.skipOverflowHiddenElements,oe=typeof F=="function"?F:function(Se){return Se!==F};if(!I(V))throw new TypeError("Invalid target");for(var Me=document.scrollingElement||document.documentElement,We=[],he=V;I(he)&&oe(he);){if((he=he.parentElement)===Me){We.push(he);break}he!=null&&he===document.body&&re(he)&&!re(document.documentElement)||he!=null&&re(he,le)&&We.push(he)}for(var Te=Ce.visualViewport?Ce.visualViewport.width:innerWidth,Ne=Ce.visualViewport?Ce.visualViewport.height:innerHeight,be=window.scrollX||pageXOffset,me=window.scrollY||pageYOffset,de=V.getBoundingClientRect(),W=de.height,b=de.width,K=de.top,G=de.right,E=de.bottom,q=de.left,N=B==="start"||B==="nearest"?K:B==="end"?E:K+W/2,O=j==="center"?q+b/2:j==="end"?G:q,_=[],c=0;c<We.length;c++){var l=We[c],g=l.getBoundingClientRect(),C=g.height,D=g.width,ee=g.top,we=g.right,ce=g.bottom,ke=g.left;if(se==="if-needed"&&K>=0&&q>=0&&E<=Ne&&G<=Te&&K>=ee&&E<=ce&&q>=ke&&G<=we)return _;var ne=getComputedStyle(l),ue=parseInt(ne.borderLeftWidth,10),H=parseInt(ne.borderTopWidth,10),ie=parseInt(ne.borderRightWidth,10),h=parseInt(ne.borderBottomWidth,10),T=0,p=0,P="offsetWidth"in l?l.offsetWidth-l.clientWidth-ue-ie:0,Z="offsetHeight"in l?l.offsetHeight-l.clientHeight-H-h:0;if(Me===l)T=B==="start"?N:B==="end"?N-Ne:B==="nearest"?Ee(me,me+Ne,Ne,H,h,me+N,me+N+W,W):N-Ne/2,p=j==="start"?O:j==="center"?O-Te/2:j==="end"?O-Te:Ee(be,be+Te,Te,ue,ie,be+O,be+O+b,b),T=Math.max(0,T+me),p=Math.max(0,p+be);else{T=B==="start"?N-ee-H:B==="end"?N-ce+h+Z:B==="nearest"?Ee(ee,ce,C,H,h+Z,N,N+W,W):N-(ee+C/2)+Z/2,p=j==="start"?O-ke-ue:j==="center"?O-(ke+D/2)+P/2:j==="end"?O-we+ie+P:Ee(ke,we,D,ue,ie+P,O,O+b,b);var z=l.scrollLeft,te=l.scrollTop;N+=te-(T=Math.max(0,Math.min(te+T,l.scrollHeight-C+Z))),O+=z-(p=Math.max(0,Math.min(z+p,l.scrollWidth-D+P)))}_.push({el:l,top:T,left:p})}return _};function $(V){return V===Object(V)&&Object.keys(V).length!==0}function M(V,ae){ae===void 0&&(ae="auto");var Ce="scrollBehavior"in document.body.style;V.forEach(function(se){var B=se.el,j=se.top,F=se.left;B.scroll&&Ce?B.scroll({top:j,left:F,behavior:ae}):(B.scrollTop=j,B.scrollLeft=F)})}function L(V){return V===!1?{block:"end",inline:"nearest"}:$(V)?V:{block:"start",inline:"nearest"}}function y(V,ae){var Ce=!V.ownerDocument.documentElement.contains(V);if($(ae)&&typeof ae.behavior=="function")return ae.behavior(Ce?[]:ye(V,ae));if(Ce)return;var se=L(ae);return M(ye(V,se),se.behavior)}var X=Xe.a=y},Zss7:function(ft,Xe,w){var I;(function(ve){var re=/^\s+/,Ee=/\s+$/,ye=0,$=ve.round,M=ve.min,L=ve.max,y=ve.random;function X(h,T){if(h=h||"",T=T||{},h instanceof X)return h;if(!(this instanceof X))return new X(h,T);var p=V(h);this._originalInput=h,this._r=p.r,this._g=p.g,this._b=p.b,this._a=p.a,this._roundA=$(100*this._a)/100,this._format=T.format||p.format,this._gradientType=T.gradientType,this._r<1&&(this._r=$(this._r)),this._g<1&&(this._g=$(this._g)),this._b<1&&(this._b=$(this._b)),this._ok=p.ok,this._tc_id=ye++}X.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),T,p,P,Z,z,te;return T=h.r/255,p=h.g/255,P=h.b/255,T<=.03928?Z=T/12.92:Z=ve.pow((T+.055)/1.055,2.4),p<=.03928?z=p/12.92:z=ve.pow((p+.055)/1.055,2.4),P<=.03928?te=P/12.92:te=ve.pow((P+.055)/1.055,2.4),.2126*Z+.7152*z+.0722*te},setAlpha:function(h){return this._a=_(h),this._roundA=$(100*this._a)/100,this},toHsv:function(){var h=B(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=B(this._r,this._g,this._b),T=$(h.h*360),p=$(h.s*100),P=$(h.v*100);return this._a==1?"hsv("+T+", "+p+"%, "+P+"%)":"hsva("+T+", "+p+"%, "+P+"%, "+this._roundA+")"},toHsl:function(){var h=Ce(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=Ce(this._r,this._g,this._b),T=$(h.h*360),p=$(h.s*100),P=$(h.l*100);return this._a==1?"hsl("+T+", "+p+"%, "+P+"%)":"hsla("+T+", "+p+"%, "+P+"%, "+this._roundA+")"},toHex:function(h){return F(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return le(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:$(this._r),g:$(this._g),b:$(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+$(this._r)+", "+$(this._g)+", "+$(this._b)+")":"rgba("+$(this._r)+", "+$(this._g)+", "+$(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:$(c(this._r,255)*100)+"%",g:$(c(this._g,255)*100)+"%",b:$(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+$(c(this._r,255)*100)+"%, "+$(c(this._g,255)*100)+"%, "+$(c(this._b,255)*100)+"%)":"rgba("+$(c(this._r,255)*100)+"%, "+$(c(this._g,255)*100)+"%, "+$(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:N[F(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var T="#"+oe(this._r,this._g,this._b,this._a),p=T,P=this._gradientType?"GradientType = 1, ":"";if(h){var Z=X(h);p="#"+oe(Z._r,Z._g,Z._b,Z._a)}return"progid:DXImageTransform.Microsoft.gradient("+P+"startColorstr="+T+",endColorstr="+p+")"},toString:function(h){var T=!!h;h=h||this._format;var p=!1,P=this._a<1&&this._a>=0,Z=!T&&P&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return Z?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(p=this.toRgbString()),h==="prgb"&&(p=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(p=this.toHexString()),h==="hex3"&&(p=this.toHexString(!0)),h==="hex4"&&(p=this.toHex8String(!0)),h==="hex8"&&(p=this.toHex8String()),h==="name"&&(p=this.toName()),h==="hsl"&&(p=this.toHslString()),h==="hsv"&&(p=this.toHsvString()),p||this.toHexString())},clone:function(){return X(this.toString())},_applyModification:function(h,T){var p=h.apply(null,[this].concat([].slice.call(T)));return this._r=p._r,this._g=p._g,this._b=p._b,this.setAlpha(p._a),this},lighten:function(){return this._applyModification(Te,arguments)},brighten:function(){return this._applyModification(Ne,arguments)},darken:function(){return this._applyModification(be,arguments)},desaturate:function(){return this._applyModification(Me,arguments)},saturate:function(){return this._applyModification(We,arguments)},greyscale:function(){return this._applyModification(he,arguments)},spin:function(){return this._applyModification(me,arguments)},_applyCombination:function(h,T){return h.apply(null,[this].concat([].slice.call(T)))},analogous:function(){return this._applyCombination(G,arguments)},complement:function(){return this._applyCombination(de,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(K,arguments)},triad:function(){return this._applyCombination(W,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},X.fromRatio=function(h,T){if(typeof h=="object"){var p={};for(var P in h)h.hasOwnProperty(P)&&(P==="a"?p[P]=h[P]:p[P]=we(h[P]));h=p}return X(h,T)};function V(h){var T={r:0,g:0,b:0},p=1,P=null,Z=null,z=null,te=!1,Se=!1;return typeof h=="string"&&(h=H(h)),typeof h=="object"&&(ue(h.r)&&ue(h.g)&&ue(h.b)?(T=ae(h.r,h.g,h.b),te=!0,Se=String(h.r).substr(-1)==="%"?"prgb":"rgb"):ue(h.h)&&ue(h.s)&&ue(h.v)?(P=we(h.s),Z=we(h.v),T=j(h.h,P,Z),te=!0,Se="hsv"):ue(h.h)&&ue(h.s)&&ue(h.l)&&(P=we(h.s),z=we(h.l),T=se(h.h,P,z),te=!0,Se="hsl"),h.hasOwnProperty("a")&&(p=h.a)),p=_(p),{ok:te,format:h.format||Se,r:M(255,L(T.r,0)),g:M(255,L(T.g,0)),b:M(255,L(T.b,0)),a:p}}function ae(h,T,p){return{r:c(h,255)*255,g:c(T,255)*255,b:c(p,255)*255}}function Ce(h,T,p){h=c(h,255),T=c(T,255),p=c(p,255);var P=L(h,T,p),Z=M(h,T,p),z,te,Se=(P+Z)/2;if(P==Z)z=te=0;else{var Pe=P-Z;te=Se>.5?Pe/(2-P-Z):Pe/(P+Z);switch(P){case h:z=(T-p)/Pe+(T<p?6:0);break;case T:z=(p-h)/Pe+2;break;case p:z=(h-T)/Pe+4;break}z/=6}return{h:z,s:te,l:Se}}function se(h,T,p){var P,Z,z;h=c(h,360),T=c(T,100),p=c(p,100);function te(Le,ge,Ae){return Ae<0&&(Ae+=1),Ae>1&&(Ae-=1),Ae<1/6?Le+(ge-Le)*6*Ae:Ae<1/2?ge:Ae<2/3?Le+(ge-Le)*(2/3-Ae)*6:Le}if(T===0)P=Z=z=p;else{var Se=p<.5?p*(1+T):p+T-p*T,Pe=2*p-Se;P=te(Pe,Se,h+1/3),Z=te(Pe,Se,h),z=te(Pe,Se,h-1/3)}return{r:P*255,g:Z*255,b:z*255}}function B(h,T,p){h=c(h,255),T=c(T,255),p=c(p,255);var P=L(h,T,p),Z=M(h,T,p),z,te,Se=P,Pe=P-Z;if(te=P===0?0:Pe/P,P==Z)z=0;else{switch(P){case h:z=(T-p)/Pe+(T<p?6:0);break;case T:z=(p-h)/Pe+2;break;case p:z=(h-T)/Pe+4;break}z/=6}return{h:z,s:te,v:Se}}function j(h,T,p){h=c(h,360)*6,T=c(T,100),p=c(p,100);var P=ve.floor(h),Z=h-P,z=p*(1-T),te=p*(1-Z*T),Se=p*(1-(1-Z)*T),Pe=P%6,Le=[p,te,z,z,Se,p][Pe],ge=[Se,p,p,te,z,z][Pe],Ae=[z,z,Se,p,p,te][Pe];return{r:Le*255,g:ge*255,b:Ae*255}}function F(h,T,p,P){var Z=[ee($(h).toString(16)),ee($(T).toString(16)),ee($(p).toString(16))];return P&&Z[0].charAt(0)==Z[0].charAt(1)&&Z[1].charAt(0)==Z[1].charAt(1)&&Z[2].charAt(0)==Z[2].charAt(1)?Z[0].charAt(0)+Z[1].charAt(0)+Z[2].charAt(0):Z.join("")}function le(h,T,p,P,Z){var z=[ee($(h).toString(16)),ee($(T).toString(16)),ee($(p).toString(16)),ee(ce(P))];return Z&&z[0].charAt(0)==z[0].charAt(1)&&z[1].charAt(0)==z[1].charAt(1)&&z[2].charAt(0)==z[2].charAt(1)&&z[3].charAt(0)==z[3].charAt(1)?z[0].charAt(0)+z[1].charAt(0)+z[2].charAt(0)+z[3].charAt(0):z.join("")}function oe(h,T,p,P){var Z=[ee(ce(P)),ee($(h).toString(16)),ee($(T).toString(16)),ee($(p).toString(16))];return Z.join("")}X.equals=function(h,T){return!h||!T?!1:X(h).toRgbString()==X(T).toRgbString()},X.random=function(){return X.fromRatio({r:y(),g:y(),b:y()})};function Me(h,T){T=T===0?0:T||10;var p=X(h).toHsl();return p.s-=T/100,p.s=l(p.s),X(p)}function We(h,T){T=T===0?0:T||10;var p=X(h).toHsl();return p.s+=T/100,p.s=l(p.s),X(p)}function he(h){return X(h).desaturate(100)}function Te(h,T){T=T===0?0:T||10;var p=X(h).toHsl();return p.l+=T/100,p.l=l(p.l),X(p)}function Ne(h,T){T=T===0?0:T||10;var p=X(h).toRgb();return p.r=L(0,M(255,p.r-$(255*-(T/100)))),p.g=L(0,M(255,p.g-$(255*-(T/100)))),p.b=L(0,M(255,p.b-$(255*-(T/100)))),X(p)}function be(h,T){T=T===0?0:T||10;var p=X(h).toHsl();return p.l-=T/100,p.l=l(p.l),X(p)}function me(h,T){var p=X(h).toHsl(),P=(p.h+T)%360;return p.h=P<0?360+P:P,X(p)}function de(h){var T=X(h).toHsl();return T.h=(T.h+180)%360,X(T)}function W(h){var T=X(h).toHsl(),p=T.h;return[X(h),X({h:(p+120)%360,s:T.s,l:T.l}),X({h:(p+240)%360,s:T.s,l:T.l})]}function b(h){var T=X(h).toHsl(),p=T.h;return[X(h),X({h:(p+90)%360,s:T.s,l:T.l}),X({h:(p+180)%360,s:T.s,l:T.l}),X({h:(p+270)%360,s:T.s,l:T.l})]}function K(h){var T=X(h).toHsl(),p=T.h;return[X(h),X({h:(p+72)%360,s:T.s,l:T.l}),X({h:(p+216)%360,s:T.s,l:T.l})]}function G(h,T,p){T=T||6,p=p||30;var P=X(h).toHsl(),Z=360/p,z=[X(h)];for(P.h=(P.h-(Z*T>>1)+720)%360;--T;)P.h=(P.h+Z)%360,z.push(X(P));return z}function E(h,T){T=T||6;for(var p=X(h).toHsv(),P=p.h,Z=p.s,z=p.v,te=[],Se=1/T;T--;)te.push(X({h:P,s:Z,v:z})),z=(z+Se)%1;return te}X.mix=function(h,T,p){p=p===0?0:p||50;var P=X(h).toRgb(),Z=X(T).toRgb(),z=p/100,te={r:(Z.r-P.r)*z+P.r,g:(Z.g-P.g)*z+P.g,b:(Z.b-P.b)*z+P.b,a:(Z.a-P.a)*z+P.a};return X(te)},X.readability=function(h,T){var p=X(h),P=X(T);return(ve.max(p.getLuminance(),P.getLuminance())+.05)/(ve.min(p.getLuminance(),P.getLuminance())+.05)},X.isReadable=function(h,T,p){var P=X.readability(h,T),Z,z;z=!1,Z=ie(p);switch(Z.level+Z.size){case"AAsmall":case"AAAlarge":z=P>=4.5;break;case"AAlarge":z=P>=3;break;case"AAAsmall":z=P>=7;break}return z},X.mostReadable=function(h,T,p){var P=null,Z=0,z,te,Se,Pe;p=p||{},te=p.includeFallbackColors,Se=p.level,Pe=p.size;for(var Le=0;Le<T.length;Le++)z=X.readability(h,T[Le]),z>Z&&(Z=z,P=X(T[Le]));return X.isReadable(h,P,{level:Se,size:Pe})||!te?P:(p.includeFallbackColors=!1,X.mostReadable(h,["#fff","#000"],p))};var q=X.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=X.hexNames=O(q);function O(h){var T={};for(var p in h)h.hasOwnProperty(p)&&(T[h[p]]=p);return T}function _(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,T){C(h)&&(h="100%");var p=D(h);return h=M(T,L(0,parseFloat(h))),p&&(h=parseInt(h*T,10)/100),ve.abs(h-T)<1e-6?1:h%T/parseFloat(T)}function l(h){return M(1,L(0,h))}function g(h){return parseInt(h,16)}function C(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function D(h){return typeof h=="string"&&h.indexOf("%")!=-1}function ee(h){return h.length==1?"0"+h:""+h}function we(h){return h<=1&&(h=h*100+"%"),h}function ce(h){return ve.round(parseFloat(h)*255).toString(16)}function ke(h){return g(h)/255}var ne=function(){var h="[-\\+]?\\d+%?",T="[-\\+]?\\d*\\.\\d+%?",p="(?:"+T+")|(?:"+h+")",P="[\\s|\\(]+("+p+")[,|\\s]+("+p+")[,|\\s]+("+p+")\\s*\\)?",Z="[\\s|\\(]+("+p+")[,|\\s]+("+p+")[,|\\s]+("+p+")[,|\\s]+("+p+")\\s*\\)?";return{CSS_UNIT:new RegExp(p),rgb:new RegExp("rgb"+P),rgba:new RegExp("rgba"+Z),hsl:new RegExp("hsl"+P),hsla:new RegExp("hsla"+Z),hsv:new RegExp("hsv"+P),hsva:new RegExp("hsva"+Z),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 ue(h){return!!ne.CSS_UNIT.exec(h)}function H(h){h=h.replace(re,"").replace(Ee,"").toLowerCase();var T=!1;if(q[h])h=q[h],T=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var p;return(p=ne.rgb.exec(h))?{r:p[1],g:p[2],b:p[3]}:(p=ne.rgba.exec(h))?{r:p[1],g:p[2],b:p[3],a:p[4]}:(p=ne.hsl.exec(h))?{h:p[1],s:p[2],l:p[3]}:(p=ne.hsla.exec(h))?{h:p[1],s:p[2],l:p[3],a:p[4]}:(p=ne.hsv.exec(h))?{h:p[1],s:p[2],v:p[3]}:(p=ne.hsva.exec(h))?{h:p[1],s:p[2],v:p[3],a:p[4]}:(p=ne.hex8.exec(h))?{r:g(p[1]),g:g(p[2]),b:g(p[3]),a:ke(p[4]),format:T?"name":"hex8"}:(p=ne.hex6.exec(h))?{r:g(p[1]),g:g(p[2]),b:g(p[3]),format:T?"name":"hex"}:(p=ne.hex4.exec(h))?{r:g(p[1]+""+p[1]),g:g(p[2]+""+p[2]),b:g(p[3]+""+p[3]),a:ke(p[4]+""+p[4]),format:T?"name":"hex8"}:(p=ne.hex3.exec(h))?{r:g(p[1]+""+p[1]),g:g(p[2]+""+p[2]),b:g(p[3]+""+p[3]),format:T?"name":"hex"}:!1}function ie(h){var T,p;return h=h||{level:"AA",size:"small"},T=(h.level||"AA").toUpperCase(),p=(h.size||"small").toLowerCase(),T!=="AA"&&T!=="AAA"&&(T="AA"),p!=="small"&&p!=="large"&&(p="small"),{level:T,size:p}}ft.exports?ft.exports=X:!(I=function(){return X}.call(Xe,w,Xe,ft),I!==void 0&&(ft.exports=I))})(Math)},bT9E:function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return ve});var I=w("VTBJ");function ve(re,Ee){var ye=Object(I.a)({},re);return Array.isArray(Ee)&&Ee.forEach(function($){delete ye[$]}),ye}},c5Ni:function(ft,Xe,w){},dejd:function(ft,Xe,w){},dmUQ:function(ft,Xe,w){"use strict";var I=w("Ff2n"),ve=w("rePB"),re=w("1OyB"),Ee=w("vuIU"),ye=w("Ji7U"),$=w("md7G"),M=w("foSv"),L=w("q1tI"),y=w.n(L),X=w("TSYQ"),V=w.n(X),ae=w("4IlW");function Ce(W,b){var K=Object.keys(W);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(W);b&&(G=G.filter(function(E){return Object.getOwnPropertyDescriptor(W,E).enumerable})),K.push.apply(K,G)}return K}function se(W){for(var b=1;b<arguments.length;b++){var K=arguments[b]!=null?arguments[b]:{};b%2?Ce(Object(K),!0).forEach(function(G){Object(ve.a)(W,G,K[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(K)):Ce(Object(K)).forEach(function(G){Object.defineProperty(W,G,Object.getOwnPropertyDescriptor(K,G))})}return W}function B(W){var b=j();return function(){var G=Object(M.a)(W),E;if(b){var q=Object(M.a)(this).constructor;E=Reflect.construct(G,arguments,q)}else E=G.apply(this,arguments);return Object($.a)(this,E)}}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(W){return!1}}function F(){}function le(W){W.preventDefault()}var oe=function(b){return b.replace(/[^\w.-]+/g,"")},Me=200,We=600,he=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Te=function(b){return b!=null},Ne=function(b,K){return K===b||typeof K=="number"&&typeof b=="number"&&isNaN(K)&&isNaN(b)},be=function(W){Object(ye.a)(K,W);var b=B(K);function K(G){var E;Object(re.a)(this,K),E=b.call(this,G),E.onKeyDown=function(O){var _=E.props,c=_.onKeyDown,l=_.onPressEnter;if(O.keyCode===ae.a.UP){var g=E.getRatio(O);E.up(O,g,null),E.stop()}else if(O.keyCode===ae.a.DOWN){var C=E.getRatio(O);E.down(O,C,null),E.stop()}else O.keyCode===ae.a.ENTER&&l&&l(O);if(E.recordCursorPosition(),E.lastKeyCode=O.keyCode,c){for(var D=arguments.length,ee=new Array(D>1?D-1:0),we=1;we<D;we++)ee[we-1]=arguments[we];c.apply(void 0,[O].concat(ee))}},E.onKeyUp=function(O){var _=E.props.onKeyUp;if(E.stop(),E.recordCursorPosition(),_){for(var c=arguments.length,l=new Array(c>1?c-1:0),g=1;g<c;g++)l[g-1]=arguments[g];_.apply(void 0,[O].concat(l))}},E.onChange=function(O){var _=E.props.onChange;E.state.focused&&(E.inputting=!0),E.rawInput=E.props.parser(E.getValueFromEvent(O)),E.setState({inputValue:E.rawInput}),_(E.toNumber(E.rawInput))},E.onMouseUp=function(){var O=E.props.onMouseUp;E.recordCursorPosition(),O&&O.apply(void 0,arguments)},E.onFocus=function(){var O;E.setState({focused:!0}),(O=E.props).onFocus.apply(O,arguments)},E.onBlur=function(){var O=E.props.onBlur;E.inputting=!1,E.setState({focused:!1});var _=E.getCurrentValidValue(E.state.inputValue),c=E.setValue(_,F);if(O){var l=E.input.value,g=E.getInputDisplayValue({focus:!1,value:c});E.input.value=g&&Number(g),O.apply(void 0,arguments),E.input.value=l}},E.getRatio=function(O){var _=1;return O.metaKey||O.ctrlKey?_=.1:O.shiftKey&&(_=10),_},E.getFullNum=function(O){return isNaN(O)?O:/e/i.test(String(O))?Number(O).toFixed(18).replace(/\.?0+$/,""):O},E.getPrecision=function(O){if(Te(E.props.precision))return E.props.precision;var _=String(O);if(_.indexOf("e-")>=0)return parseInt(_.slice(_.indexOf("e-")+2),10);var c=0;return _.indexOf(".")>=0&&(c=_.length-_.indexOf(".")-1),c},E.getInputDisplayValue=function(O){var _=O||E.state,c=_.focused,l=_.inputValue,g=_.value,C;c?C=l:C=E.toPrecisionAsStep(g),C==null&&(C="");var D=E.formatWrapper(C);return Te(E.props.decimalSeparator)&&(D=D.toString().replace(".",E.props.decimalSeparator)),D},E.recordCursorPosition=function(){try{E.cursorStart=E.input.selectionStart,E.cursorEnd=E.input.selectionEnd,E.currentValue=E.input.value,E.cursorBefore=E.input.value.substring(0,E.cursorStart),E.cursorAfter=E.input.value.substring(E.cursorEnd)}catch(O){}},E.restoreByAfter=function(O){if(O===void 0)return!1;var _=E.input.value,c=_.lastIndexOf(O);if(c===-1)return!1;var l=E.cursorBefore.length;return E.lastKeyCode===ae.a.DELETE&&E.cursorBefore.charAt(l-1)===O[0]?(E.fixCaret(l,l),!0):c+O.length===_.length?(E.fixCaret(c,c),!0):!1},E.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(_,c){var l=O.substring(c);return E.restoreByAfter(l)})},E.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},E.stop=function(){E.autoStepTimer&&clearTimeout(E.autoStepTimer)},E.down=function(O,_,c){E.pressingUpOrDown=!0,E.step("down",O,_,c)},E.up=function(O,_,c){E.pressingUpOrDown=!0,E.step("up",O,_,c)},E.saveInput=function(O){E.input=O};var q=G.value;q===void 0&&(q=G.defaultValue),E.state={focused:G.autoFocus};var N=E.getValidValue(E.toNumber(q));return E.state=se(se({},E.state),{},{inputValue:E.toPrecisionAsStep(N),value:N}),E}return Object(Ee.a)(K,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(E){var q=this.props,N=q.value,O=q.onChange,_=q.max,c=q.min,l=this.state.focused;if(E){if(!Ne(E.value,N)||!Ne(E.max,_)||!Ne(E.min,c)){var g=l?N:this.getValidValue(N),C;this.pressingUpOrDown?C=g:this.inputting?C=this.rawInput:C=this.toPrecisionAsStep(g),this.setState({value:g,inputValue:C})}var D="value"in this.props?N:this.state.value;"max"in this.props&&E.max!==_&&typeof D=="number"&&D>_&&O&&O(_),"min"in this.props&&E.min!==c&&typeof D=="number"&&D<c&&O&&O(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ee=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===ae.a.BACKSPACE?ee=this.cursorStart-1:this.lastKeyCode===ae.a.DELETE&&(ee=this.cursorStart):ee=this.input.value.length,this.fixCaret(ee,ee)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case ae.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case ae.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(we){}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(E){var q=E;return q===""?q="":this.isNotCompleteNumber(parseFloat(q))?q=this.state.value:q=this.getValidValue(q),this.toNumber(q)}},{key:"getValueFromEvent",value:function(E){var q=E.target.value.trim().replace(/。/g,".");return Te(this.props.decimalSeparator)&&(q=q.replace(this.props.decimalSeparator,".")),q}},{key:"getValidValue",value:function(E){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(E);return isNaN(O)?E:(O<q&&(O=q),O>N&&(O=N),O)}},{key:"setValue",value:function(E,q){var N=this.props.precision,O=this.isNotCompleteNumber(parseFloat(E))?null:parseFloat(E),_=this.state.value,c=_===void 0?null:_,l=this.state.inputValue,g=l===void 0?null:l,C=typeof O=="number"?O.toFixed(N):"".concat(O),D=O!==c||C!=="".concat(g);return"value"in this.props?(g=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:g},q)):this.setState({value:O,inputValue:this.toPrecisionAsStep(E)},q),D&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(E){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.props,O=N.precision,_=N.step;if(Te(O))return O;var c=this.getPrecision(q),l=this.getPrecision(_),g=this.getPrecision(E);return E?Math.max(g,c+l):c+l}},{key:"getPrecisionFactor",value:function(E){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.getMaxPrecision(E,q);return Math.pow(10,N)}},{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(E){return this.props.formatter?this.props.formatter(E):E}},{key:"toPrecisionAsStep",value:function(E){if(this.isNotCompleteNumber(E)||E==="")return E;var q=Math.abs(this.getMaxPrecision(E));return isNaN(q)?E.toString():Number(E).toFixed(q)}},{key:"toNumber",value:function(E){var q=this.props.precision,N=this.state.focused,O=E&&E.length>16&&N;return this.isNotCompleteNumber(E)||O?E:Te(q)?Math.round(E*Math.pow(10,q))/Math.pow(10,q):Number(E)}},{key:"upStep",value:function(E,q){var N=this.props.step,O=this.getPrecisionFactor(E,q),_=Math.abs(this.getMaxPrecision(E,q)),c=((O*E+O*N*q)/O).toFixed(_);return this.toNumber(c)}},{key:"downStep",value:function(E,q){var N=this.props.step,O=this.getPrecisionFactor(E,q),_=Math.abs(this.getMaxPrecision(E,q)),c=((O*E-O*N*q)/O).toFixed(_);return this.toNumber(c)}},{key:"step",value:function(E,q){var N=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=arguments.length>3?arguments[3]:void 0;this.stop(),q&&(q.persist(),q.preventDefault());var c=this.props;if(c.disabled)return;var l=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(l))return;var g=this["".concat(E,"Step")](l,O),C=g>c.max||g<c.min;if(g>c.max?g=c.max:g<c.min&&(g=c.min),this.setValue(g,null),this.setState({focused:!0},function(){N.pressingUpOrDown=!1}),C)return;this.autoStepTimer=setTimeout(function(){N[E](q,O,!0)},_?Me:We)}},{key:"fixCaret",value:function(E,q){if(E===void 0||q===void 0||!this.input||!this.input.value)return;try{var N=this.input.selectionStart,O=this.input.selectionEnd;(E!==N||q!==O)&&this.input.setSelectionRange(E,q)}catch(_){}}},{key:"render",value:function(){var E,q=this.props,N=q.prefixCls,O=q.disabled,_=q.readOnly,c=q.useTouch,l=q.autoComplete,g=q.upHandler,C=q.downHandler,D=q.className,ee=q.max,we=q.min,ce=q.style,ke=q.title,ne=q.onMouseEnter,ue=q.onMouseLeave,H=q.onMouseOver,ie=q.onMouseOut,h=q.required,T=q.onClick,p=q.tabIndex,P=q.type,Z=q.placeholder,z=q.id,te=q.inputMode,Se=q.pattern,Pe=q.step,Le=q.maxLength,ge=q.autoFocus,Ae=q.name,Ie=q.onPaste,$e=q.onInput,He=Object(I.a)(q,["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"]),Ye=this.state,lt=Ye.value,tt=Ye.focused,Ke=V()(N,(E={},Object(ve.a)(E,D,!!D),Object(ve.a)(E,"".concat(N,"-disabled"),O),Object(ve.a)(E,"".concat(N,"-focused"),tt),E)),xe={};Object.keys(He).forEach(function(x){(x.substr(0,5)==="data-"||x.substr(0,5)==="aria-"||x==="role")&&(xe[x]=He[x])});var rt=!_&&!O,qe=this.getInputDisplayValue(null),Oe=(lt||lt===0)&&(isNaN(lt)||Number(lt)>=ee),Ue=(lt||lt===0)&&(isNaN(lt)||Number(lt)<=we),U=Oe||O||_,R=Ue||O||_,S=V()("".concat(N,"-handler"),"".concat(N,"-handler-up"),Object(ve.a)({},"".concat(N,"-handler-up-disabled"),U)),f=V()("".concat(N,"-handler"),"".concat(N,"-handler-down"),Object(ve.a)({},"".concat(N,"-handler-down-disabled"),R)),m=c?{onTouchStart:U?F:this.up,onTouchEnd:this.stop}:{onMouseDown:U?F:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},v=c?{onTouchStart:R?F:this.down,onTouchEnd:this.stop}:{onMouseDown:R?F:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return y.a.createElement("div",{className:Ke,style:ce,title:ke,onMouseEnter:ne,onMouseLeave:ue,onMouseOver:H,onMouseOut:ie,onFocus:function(){return null},onBlur:function(){return null}},y.a.createElement("div",{className:"".concat(N,"-handler-wrap")},y.a.createElement("span",Object.assign({unselectable:"on"},m,{role:"button","aria-label":"Increase Value","aria-disabled":U,className:S}),g||y.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-up-inner"),onClick:le})),y.a.createElement("span",Object.assign({unselectable:"on"},v,{role:"button","aria-label":"Decrease Value","aria-disabled":R,className:f}),C||y.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-down-inner"),onClick:le}))),y.a.createElement("div",{className:"".concat(N,"-input-wrap")},y.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":we,"aria-valuemax":ee,"aria-valuenow":lt,required:h,type:P,placeholder:Z,onPaste:Ie,onClick:T,onMouseUp:this.onMouseUp,className:"".concat(N,"-input"),tabIndex:p,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:F,onKeyUp:rt?this.onKeyUp:F,autoFocus:ge,maxLength:Le,readOnly:_,disabled:O,max:ee,min:we,step:Pe,name:Ae,title:ke,id:z,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(qe),pattern:Se,inputMode:te,onInput:$e},xe))))}}]),K}(y.a.Component);be.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:he,min:-he,step:1,style:{},onChange:F,onKeyDown:F,onPressEnter:F,onFocus:F,onBlur:F,parser:oe,required:!1,autoComplete:"off"};var me=be,de=Xe.a=me},h78n:function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return E});var I=w("q1tI"),ve=w.n(I),re=w("TSYQ"),Ee=w.n(re),ye={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},$=function(O){var _=O.map(function(){return Object(I.useRef)()}),c=Object(I.useRef)();return Object(I.useEffect)(function(){var l=Date.now(),g=!1;Object.keys(_).forEach(function(C){var D=_[C].current;if(!D)return;g=!0;var ee=D.style;ee.transitionDuration=".3s, .3s, .3s, .06s",c.current&&l-c.current<100&&(ee.transitionDuration="0s, 0s")}),g&&(c.current=Date.now())}),[_]};function M(){return M=Object.assign||function(N){for(var O=1;O<arguments.length;O++){var _=arguments[O];for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&(N[c]=_[c])}return N},M.apply(this,arguments)}function L(N,O){return Ce(N)||ae(N,O)||X(N,O)||y()}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(N,O){if(!N)return;if(typeof N=="string")return V(N,O);var _=Object.prototype.toString.call(N).slice(8,-1);if(_==="Object"&&N.constructor&&(_=N.constructor.name),_==="Map"||_==="Set")return Array.from(N);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return V(N,O)}function V(N,O){(O==null||O>N.length)&&(O=N.length);for(var _=0,c=new Array(O);_<O;_++)c[_]=N[_];return c}function ae(N,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(N)))return;var _=[],c=!0,l=!1,g=void 0;try{for(var C=N[Symbol.iterator](),D;!(c=(D=C.next()).done)&&!(_.push(D.value),O&&_.length===O);c=!0);}catch(ee){l=!0,g=ee}finally{try{!c&&C.return!=null&&C.return()}finally{if(l)throw g}}return _}function Ce(N){if(Array.isArray(N))return N}function se(N,O){if(N==null)return{};var _=B(N,O),c,l;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(N);for(l=0;l<g.length;l++){if(c=g[l],O.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(N,c))continue;_[c]=N[c]}}return _}function B(N,O){if(N==null)return{};var _={},c=Object.keys(N),l,g;for(g=0;g<c.length;g++){if(l=c[g],O.indexOf(l)>=0)continue;_[l]=N[l]}return _}var j=function(O){var _=O.className,c=O.percent,l=O.prefixCls,g=O.strokeColor,C=O.strokeLinecap,D=O.strokeWidth,ee=O.style,we=O.trailColor,ce=O.trailWidth,ke=O.transition,ne=se(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ne.gapPosition;var ue=Array.isArray(c)?c:[c],H=Array.isArray(g)?g:[g],ie=$(ue),h=L(ie,1),T=h[0],p=D/2,P=100-D/2,Z="M ".concat(C==="round"?p:0,",").concat(p,`
L `).concat(C==="round"?P:100,",").concat(p),z="0 0 100 ".concat(D),te=0;return ve.a.createElement("svg",M({className:Ee()("".concat(l,"-line"),_),viewBox:z,preserveAspectRatio:"none",style:ee},ne),ve.a.createElement("path",{className:"".concat(l,"-line-trail"),d:Z,strokeLinecap:C,stroke:we,strokeWidth:ce||D,fillOpacity:"0"}),ue.map(function(Se,Pe){var Le={strokeDasharray:"".concat(Se,"px, 100px"),strokeDashoffset:"-".concat(te,"px"),transition:ke||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ge=H[Pe]||H[H.length-1];return te+=Se,ve.a.createElement("path",{key:Pe,className:"".concat(l,"-line-path"),d:Z,strokeLinecap:C,stroke:ge,strokeWidth:D,fillOpacity:"0",ref:T[Pe],style:Le})}))};j.defaultProps=ye;var F=j;function le(){return le=Object.assign||function(N){for(var O=1;O<arguments.length;O++){var _=arguments[O];for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&(N[c]=_[c])}return N},le.apply(this,arguments)}function oe(N,O){return Ne(N)||Te(N,O)||We(N,O)||Me()}function Me(){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 We(N,O){if(!N)return;if(typeof N=="string")return he(N,O);var _=Object.prototype.toString.call(N).slice(8,-1);if(_==="Object"&&N.constructor&&(_=N.constructor.name),_==="Map"||_==="Set")return Array.from(N);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return he(N,O)}function he(N,O){(O==null||O>N.length)&&(O=N.length);for(var _=0,c=new Array(O);_<O;_++)c[_]=N[_];return c}function Te(N,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(N)))return;var _=[],c=!0,l=!1,g=void 0;try{for(var C=N[Symbol.iterator](),D;!(c=(D=C.next()).done)&&!(_.push(D.value),O&&_.length===O);c=!0);}catch(ee){l=!0,g=ee}finally{try{!c&&C.return!=null&&C.return()}finally{if(l)throw g}}return _}function Ne(N){if(Array.isArray(N))return N}function be(N,O){if(N==null)return{};var _=me(N,O),c,l;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(N);for(l=0;l<g.length;l++){if(c=g[l],O.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(N,c))continue;_[c]=N[c]}}return _}function me(N,O){if(N==null)return{};var _={},c=Object.keys(N),l,g;for(g=0;g<c.length;g++){if(l=c[g],O.indexOf(l)>=0)continue;_[l]=N[l]}return _}var de=0;function W(N){return+N.replace("%","")}function b(N){return Array.isArray(N)?N:[N]}function K(N,O,_,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,g=arguments.length>5?arguments[5]:void 0,C=50-c/2,D=0,ee=-C,we=0,ce=-2*C;switch(g){case"left":D=-C,ee=0,we=2*C,ce=0;break;case"right":D=C,ee=0,we=-2*C,ce=0;break;case"bottom":ee=C,ce=2*C;break;default:}var ke="M 50,50 m ".concat(D,",").concat(ee,`
a `).concat(C,",").concat(C," 0 1 1 ").concat(we,",").concat(-ce,`
a `).concat(C,",").concat(C," 0 1 1 ").concat(-we,",").concat(ce),ne=Math.PI*2*C,ue={stroke:_,strokeDasharray:"".concat(O/100*(ne-l),"px ").concat(ne,"px"),strokeDashoffset:"-".concat(l/2+N/100*(ne-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ke,pathStyle:ue}}var G=function(O){var _=O.prefixCls,c=O.strokeWidth,l=O.trailWidth,g=O.gapDegree,C=O.gapPosition,D=O.trailColor,ee=O.strokeLinecap,we=O.style,ce=O.className,ke=O.strokeColor,ne=O.percent,ue=be(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),H=Object(I.useMemo)(function(){return de+=1,de},[]),ie=K(0,100,D,c,g,C),h=ie.pathString,T=ie.pathStyle,p=b(ne),P=b(ke),Z=P.find(function(Le){return Object.prototype.toString.call(Le)==="[object Object]"}),z=$(p),te=oe(z,1),Se=te[0],Pe=function(){var ge=0;return p.map(function(Ae,Ie){var $e=P[Ie]||P[P.length-1],He=Object.prototype.toString.call($e)==="[object Object]"?"url(#".concat(_,"-gradient-").concat(H,")"):"",Ye=K(ge,Ae,$e,c,g,C);return ge+=Ae,ve.a.createElement("path",{key:Ie,className:"".concat(_,"-circle-path"),d:Ye.pathString,stroke:He,strokeLinecap:ee,strokeWidth:c,opacity:Ae===0?0:1,fillOpacity:"0",style:Ye.pathStyle,ref:Se[Ie]})})};return ve.a.createElement("svg",le({className:Ee()("".concat(_,"-circle"),ce),viewBox:"0 0 100 100",style:we},ue),Z&&ve.a.createElement("defs",null,ve.a.createElement("linearGradient",{id:"".concat(_,"-gradient-").concat(H),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Z).sort(function(Le,ge){return W(Le)-W(ge)}).map(function(Le,ge){return ve.a.createElement("stop",{key:ge,offset:Le,stopColor:Z[Le]})}))),ve.a.createElement("path",{className:"".concat(_,"-circle-trail"),d:h,stroke:D,strokeLinecap:ee,strokeWidth:l||c,fillOpacity:"0",style:T}),Pe().reverse())};G.defaultProps=ye;var E=G,q={Line:F,Circle:E}},iIVh:function(ft,Xe,w){},kSUc:function(ft,Xe,w){},lZu9:function(ft,Xe,w){(function(I){I(w("VrN/"),w("1eCo"),w("8EBN"))})(function(I){"use strict";I.defineMode("markdown",function(ve,re){var Ee=I.getMode(ve,"text/html"),ye=Ee.name=="null";function $(c){if(I.findModeByName){var l=I.findModeByName(c);l&&(c=l.mime||l.mimes[0])}var g=I.getMode(ve,c);return g.name=="null"?null:g}re.highlightFormatting===void 0&&(re.highlightFormatting=!1),re.maxBlockquoteDepth===void 0&&(re.maxBlockquoteDepth=0),re.taskLists===void 0&&(re.taskLists=!1),re.strikethrough===void 0&&(re.strikethrough=!1),re.emoji===void 0&&(re.emoji=!1),re.fencedCodeBlockHighlighting===void 0&&(re.fencedCodeBlockHighlighting=!0),re.fencedCodeBlockDefaultMode===void 0&&(re.fencedCodeBlockDefaultMode="text/plain"),re.xml===void 0&&(re.xml=!0),re.tokenTypeOverrides===void 0&&(re.tokenTypeOverrides={});var M={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var L in M)M.hasOwnProperty(L)&&re.tokenTypeOverrides[L]&&(M[L]=re.tokenTypeOverrides[L]);var y=/^([*\-_])(?:\s*\1){2,}\s*$/,X=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,V=/^\[(x| )\](?=\s)/i,ae=re.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Ce=/^ {0,3}(?:\={1,}|-{2,})\s*$/,se=/^[^#!\[\]*_\\<>` "'(~:]+/,B=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,j=/^\s*\[[^\]]+?\]:.*$/,F=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,le=" ";function oe(c,l,g){return l.f=l.inline=g,g(c,l)}function Me(c,l,g){return l.f=l.block=g,g(c,l)}function We(c){return!c||!/\S/.test(c.string)}function he(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==Ne){var l=ye;if(!l){var g=I.innerMode(Ee,c.htmlState);l=g.mode.name=="xml"&&g.state.tagStart===null&&!g.state.context&&g.state.tokenize.isInText}l&&(c.f=W,c.block=Te,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function Te(c,l){var g=c.column()===l.indentation,C=We(l.prevLine.stream),D=l.indentedCode,ee=l.prevLine.hr,we=l.list!==!1,ce=(l.listStack[l.listStack.length-1]||0)+3;l.indentedCode=!1;var ke=l.indentation;if(l.indentationDiff===null&&(l.indentationDiff=l.indentation,we)){for(l.list=null;ke<l.listStack[l.listStack.length-1];)l.listStack.pop(),l.listStack.length?l.indentation=l.listStack[l.listStack.length-1]:l.list=!1;l.list!==!1&&(l.indentationDiff=ke-l.listStack[l.listStack.length-1])}var ne=!C&&!ee&&!l.prevLine.header&&(!we||!D)&&!l.prevLine.fencedCodeEnd,ue=(l.list===!1||ee||C)&&l.indentation<=ce&&c.match(y),H=null;if(l.indentationDiff>=4&&(D||l.prevLine.fencedCodeEnd||l.prevLine.header||C))return c.skipToEnd(),l.indentedCode=!0,M.code;if(c.eatSpace())return null;if(g&&l.indentation<=ce&&(H=c.match(ae))&&H[1].length<=6)return l.quote=0,l.header=H[1].length,l.thisLine.header=!0,re.highlightFormatting&&(l.formatting="header"),l.f=l.inline,me(l);if(l.indentation<=ce&&c.eat(">"))return l.quote=g?1:l.quote+1,re.highlightFormatting&&(l.formatting="quote"),c.eatSpace(),me(l);if(!ue&&!l.setext&&g&&l.indentation<=ce&&(H=c.match(X))){var ie=H[1]?"ol":"ul";return l.indentation=ke+c.current().length,l.list=!0,l.quote=0,l.listStack.push(l.indentation),l.em=!1,l.strong=!1,l.code=!1,l.strikethrough=!1,re.taskLists&&c.match(V,!1)&&(l.taskList=!0),l.f=l.inline,re.highlightFormatting&&(l.formatting=["list","list-"+ie]),me(l)}else{if(g&&l.indentation<=ce&&(H=c.match(B,!0)))return l.quote=0,l.fencedEndRE=new RegExp(H[1]+"+ *$"),l.localMode=re.fencedCodeBlockHighlighting&&$(H[2]||re.fencedCodeBlockDefaultMode),l.localMode&&(l.localState=I.startState(l.localMode)),l.f=l.block=be,re.highlightFormatting&&(l.formatting="code-block"),l.code=-1,me(l);if(l.setext||(!ne||!we)&&!l.quote&&l.list===!1&&!l.code&&!ue&&!j.test(c.string)&&(H=c.lookAhead(1))&&(H=H.match(Ce)))return l.setext?(l.header=l.setext,l.setext=0,c.skipToEnd(),re.highlightFormatting&&(l.formatting="header")):(l.header=H[0].charAt(0)=="="?1:2,l.setext=l.header),l.thisLine.header=!0,l.f=l.inline,me(l);if(ue)return c.skipToEnd(),l.hr=!0,l.thisLine.hr=!0,M.hr;if(c.peek()==="[")return oe(c,l,q)}return oe(c,l,l.inline)}function Ne(c,l){var g=Ee.token(c,l.htmlState);if(!ye){var C=I.innerMode(Ee,l.htmlState);(C.mode.name=="xml"&&C.state.tagStart===null&&!C.state.context&&C.state.tokenize.isInText||l.md_inside&&c.current().indexOf(">")>-1)&&(l.f=W,l.block=Te,l.htmlState=null)}return g}function be(c,l){var g=l.listStack[l.listStack.length-1]||0,C=l.indentation<g,D=g+3;if(l.fencedEndRE&&l.indentation<=D&&(C||c.match(l.fencedEndRE))){re.highlightFormatting&&(l.formatting="code-block");var ee;return C||(ee=me(l)),l.localMode=l.localState=null,l.block=Te,l.f=W,l.fencedEndRE=null,l.code=0,l.thisLine.fencedCodeEnd=!0,C?Me(c,l,l.block):ee}else return l.localMode?l.localMode.token(c,l.localState):(c.skipToEnd(),M.code)}function me(c){var l=[];if(c.formatting){l.push(M.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var g=0;g<c.formatting.length;g++)l.push(M.formatting+"-"+c.formatting[g]),c.formatting[g]==="header"&&l.push(M.formatting+"-"+c.formatting[g]+"-"+c.header),c.formatting[g]==="quote"&&(!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=c.quote?l.push(M.formatting+"-"+c.formatting[g]+"-"+c.quote):l.push("error"))}if(c.taskOpen)return l.push("meta"),l.length?l.join(" "):null;if(c.taskClosed)return l.push("property"),l.length?l.join(" "):null;if(c.linkHref?l.push(M.linkHref,"url"):(c.strong&&l.push(M.strong),c.em&&l.push(M.em),c.strikethrough&&l.push(M.strikethrough),c.emoji&&l.push(M.emoji),c.linkText&&l.push(M.linkText),c.code&&l.push(M.code),c.image&&l.push(M.image),c.imageAltText&&l.push(M.imageAltText,"link"),c.imageMarker&&l.push(M.imageMarker)),c.header&&l.push(M.header,M.header+"-"+c.header),c.quote&&(l.push(M.quote),!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=c.quote?l.push(M.quote+"-"+c.quote):l.push(M.quote+"-"+re.maxBlockquoteDepth)),c.list!==!1){var C=(c.listStack.length-1)%3;C?C===1?l.push(M.list2):l.push(M.list3):l.push(M.list1)}return c.trailingSpaceNewLine?l.push("trailing-space-new-line"):c.trailingSpace&&l.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),l.length?l.join(" "):null}function de(c,l){return c.match(se,!0)?me(l):void 0}function W(c,l){var g=l.text(c,l);if(typeof g!="undefined")return g;if(l.list)return l.list=null,me(l);if(l.taskList){var C=c.match(V,!0)[1]===" ";return C?l.taskOpen=!0:l.taskClosed=!0,re.highlightFormatting&&(l.formatting="task"),l.taskList=!1,me(l)}if(l.taskOpen=!1,l.taskClosed=!1,l.header&&c.match(/^#+$/,!0))return re.highlightFormatting&&(l.formatting="header"),me(l);var D=c.next();if(l.linkTitle){l.linkTitle=!1;var ee=D;D==="("&&(ee=")"),ee=(ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var we="^\\s*(?:[^"+ee+"\\\\]+|\\\\\\\\|\\\\.)"+ee;if(c.match(new RegExp(we),!0))return M.linkHref}if(D==="`"){var ce=l.formatting;re.highlightFormatting&&(l.formatting="code"),c.eatWhile("`");var ke=c.current().length;if(l.code==0&&(!l.quote||ke==1))return l.code=ke,me(l);if(ke==l.code){var ne=me(l);return l.code=0,ne}else return l.formatting=ce,me(l)}else if(l.code)return me(l);if(D==="\\"&&(c.next(),re.highlightFormatting)){var ue=me(l),H=M.formatting+"-escape";return ue?ue+" "+H:H}if(D==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return l.imageMarker=!0,l.image=!0,re.highlightFormatting&&(l.formatting="image"),me(l);if(D==="["&&l.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return l.imageMarker=!1,l.imageAltText=!0,re.highlightFormatting&&(l.formatting="image"),me(l);if(D==="]"&&l.imageAltText){re.highlightFormatting&&(l.formatting="image");var ue=me(l);return l.imageAltText=!1,l.image=!1,l.inline=l.f=K,ue}if(D==="["&&!l.image)return l.linkText&&c.match(/^.*?\]/)||(l.linkText=!0,re.highlightFormatting&&(l.formatting="link")),me(l);if(D==="]"&&l.linkText){re.highlightFormatting&&(l.formatting="link");var ue=me(l);return l.linkText=!1,l.inline=l.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?K:W,ue}if(D==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=b,re.highlightFormatting&&(l.formatting="link");var ue=me(l);return ue?ue+=" ":ue="",ue+M.linkInline}if(D==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=b,re.highlightFormatting&&(l.formatting="link");var ue=me(l);return ue?ue+=" ":ue="",ue+M.linkEmail}if(re.xml&&D==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ie=c.string.indexOf(">",c.pos);if(ie!=-1){var h=c.string.substring(c.start,ie);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(h)&&(l.md_inside=!0)}return c.backUp(1),l.htmlState=I.startState(Ee),Me(c,l,Ne)}if(re.xml&&D==="<"&&c.match(/^\/\w*?>/))return l.md_inside=!1,"tag";if(D==="*"||D==="_"){for(var T=1,p=c.pos==1?" ":c.string.charAt(c.pos-2);T<3&&c.eat(D);)T++;var P=c.peek()||" ",Z=!/\s/.test(P)&&(!F.test(P)||/\s/.test(p)||F.test(p)),z=!/\s/.test(p)&&(!F.test(p)||/\s/.test(P)||F.test(P)),te=null,Se=null;if(T%2&&(!l.em&&Z&&(D==="*"||!z||F.test(p))?te=!0:l.em==D&&z&&(D==="*"||!Z||F.test(P))&&(te=!1)),T>1&&(!l.strong&&Z&&(D==="*"||!z||F.test(p))?Se=!0:l.strong==D&&z&&(D==="*"||!Z||F.test(P))&&(Se=!1)),Se!=null||te!=null){re.highlightFormatting&&(l.formatting=te==null?"strong":Se==null?"em":"strong em"),te===!0&&(l.em=D),Se===!0&&(l.strong=D);var ne=me(l);return te===!1&&(l.em=!1),Se===!1&&(l.strong=!1),ne}}else if(D===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return me(l);c.backUp(1)}if(re.strikethrough){if(D==="~"&&c.eatWhile(D)){if(l.strikethrough){re.highlightFormatting&&(l.formatting="strikethrough");var ne=me(l);return l.strikethrough=!1,ne}else if(c.match(/^[^\s]/,!1))return l.strikethrough=!0,re.highlightFormatting&&(l.formatting="strikethrough"),me(l)}else if(D===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return me(l);c.backUp(2)}}if(re.emoji&&D===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){l.emoji=!0,re.highlightFormatting&&(l.formatting="emoji");var Pe=me(l);return l.emoji=!1,Pe}return D===" "&&(c.match(/^ +$/,!1)?l.trailingSpace++:l.trailingSpace&&(l.trailingSpaceNewLine=!0)),me(l)}function b(c,l){var g=c.next();if(g===">"){l.f=l.inline=W,re.highlightFormatting&&(l.formatting="link");var C=me(l);return C?C+=" ":C="",C+M.linkInline}return c.match(/^[^>]+/,!0),M.linkInline}function K(c,l){if(c.eatSpace())return null;var g=c.next();return g==="("||g==="["?(l.f=l.inline=E(g==="("?")":"]"),re.highlightFormatting&&(l.formatting="link-string"),l.linkHref=!0,me(l)):"error"}var G={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(c){return function(l,g){var C=l.next();if(C===c){g.f=g.inline=W,re.highlightFormatting&&(g.formatting="link-string");var D=me(g);return g.linkHref=!1,D}return l.match(G[c]),g.linkHref=!0,me(g)}}function q(c,l){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(l.f=N,c.next(),re.highlightFormatting&&(l.formatting="link"),l.linkText=!0,me(l)):oe(c,l,W)}function N(c,l){if(c.match(/^\]:/,!0)){l.f=l.inline=O,re.highlightFormatting&&(l.formatting="link");var g=me(l);return l.linkText=!1,g}return c.match(/^([^\]\\]|\\.)+/,!0),M.linkText}function O(c,l){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?l.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),l.f=l.inline=W,M.linkHref+" url")}var _={startState:function(){return{f:Te,prevLine:{stream:null},thisLine:{stream:null},block:Te,htmlState:null,indentation:0,inline:W,text:de,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&&I.copyState(Ee,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?I.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,l){if(l.formatting=!1,c!=l.thisLine.stream){if(l.header=0,l.hr=!1,c.match(/^\s*$/,!0))return he(l),null;if(l.prevLine=l.thisLine,l.thisLine={stream:c},l.taskList=!1,l.trailingSpace=0,l.trailingSpaceNewLine=!1,!l.localState&&(l.f=l.block,l.f!=Ne)){var g=c.match(/^\s*/,!0)[0].replace(/\t/g,le).length;if(l.indentation=g,l.indentationDiff=null,g>0)return null}}return l.f(c,l)},innerMode:function(c){return c.block==Ne?{state:c.htmlState,mode:Ee}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:_}},indent:function(c,l,g){return c.block==Ne&&Ee.indent?Ee.indent(c.htmlState,l,g):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,l,g):I.Pass},blankLine:he,getType:me,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return _},"xml"),I.defineMIME("text/markdown","markdown"),I.defineMIME("text/x-markdown","markdown")})},nojB:function(ft,Xe,w){"use strict";w.r(Xe);var I=w("T2oS"),ve=w("W9HT"),re=w("9og8"),Ee=w("tJVT"),ye=w("k1fw"),$=w("WmNS"),M=w.n($),L=w("q1tI"),y=w.n(L),X=w("X0ci"),V=w("iIVh"),ae=w("Ty5D"),Ce=w("55Ip"),se=w("+L6B"),B=w("2/Rp"),j=w("5NDa"),F=w("5rEg"),le=w("2qtc"),oe=w("kLXV"),Me=w("miYZ"),We=w("tsqr"),he=w("PpiC"),Te=w("y8nQ"),Ne=w("Vl3Y"),be=w("DZo9"),me=w("8z0m"),de=w("sRBo"),W=w("kaz8"),b=w("LtfV"),K=w("m3rI"),G=w("Ot1p"),E=W.a.Group,q=me.a.Dragger;function N(D,ee){var we=new FileReader;we.addEventListener("load",function(){return ee(we.result)}),we.readAsDataURL(D)}var O=function(D){var ee=D.callback,we=D.tags,ce=we===void 0?[]:we,ke=D.initialValues,ne=ke===void 0?{}:ke,ue=D.removeAttachment,H=Object(L.useState)(""),ie=Object(Ee.a)(H,2),h=ie[0],T=ie[1],p=Ne.a.useForm(),P=Object(Ee.a)(p,1),Z=P[0];function z(ge){var Ae=ge.cover_id,Ie=ge.attachment_ids,$e=Object(he.a)(ge,["cover_id","attachment_ids"]);ee(Object(ye.a)(Object(ye.a)({},$e),{},{cover_id:Ae==null?void 0:Ae.map(function(He){return He.response?He.response.id:He.uid})[(Ae==null?void 0:Ae.length)-1],attachment_ids:Ie?Ie==null?void 0:Ie.map(function(He){return He.response?He.response.id:He.uid}):[]}))}function te(ge){return Array.isArray(ge)?ge:ge&&ge.fileList}var Se={multiple:!0,beforeUpload:function(Ae){var Ie=Ae.size/1024/1024<100;if(!Ie)return We.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),Ie},action:"".concat(K.a.API_SERVER,"/api/attachments.json"),onRemove:function(Ae){oe.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){return ue(Ae.response?Ae.response.id:Ae.uid)},onCancel:function(){return!1}})}};function Pe(ge){ge.file.status==="done"&&N(ge.file.originFileObj,function(Ae){return T(Ae)})}var Le={showUploadList:!1,withCredentials:!0,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),onChange:Pe};return Object(L.useEffect)(function(){ne.title&&(Z.setFieldsValue(ne),ne.cover_id.length>0&&T(K.a.IMG_SERVER+ne.cover_id[0].url))},[ne]),y.a.createElement(Ne.a,{form:Z,initialValues:ne,className:"moop-panel",onFinish:z},y.a.createElement(Ne.a.Item,{label:"\u6807\u9898",name:"title",extra:y.a.createElement("p",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},y.a.createElement(F.a,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),y.a.createElement("div",{className:"flex-container"},y.a.createElement(Ne.a.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},y.a.createElement(F.a,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),y.a.createElement(Ne.a.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},y.a.createElement(F.a,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),y.a.createElement(Ne.a.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},y.a.createElement(E,null,ce.map(function(ge){return y.a.createElement(W.a,{key:ge.id,value:ge.id}," ",ge.name," ")}))),y.a.createElement(Ne.a.Item,{name:"publish",valuePropName:"checked"},y.a.createElement(W.a,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),y.a.createElement(Ne.a.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},y.a.createElement(G.a,{id:"moop_cases_content",height:400})),y.a.createElement(Ne.a.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:te},y.a.createElement(q,Se,y.a.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),y.a.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),y.a.createElement(Ne.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:te,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},y.a.createElement(me.a,Le,h?y.a.createElement("img",{src:h,width:120}):y.a.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",y.a.createElement(b.a,null)," "))),y.a.createElement("div",{className:"desc"},y.a.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),y.a.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),y.a.createElement("div",{className:"desc"},y.a.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),y.a.createElement("ul",{style:{padding:0}},y.a.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),y.a.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",y.a.createElement("a",{href:"/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",y.a.createElement("a",{href:"/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),y.a.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),y.a.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),y.a.createElement(Ne.a.Item,{style:{marginTop:10}},y.a.createElement(B.a,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},_=w("wzkS"),c={loading:!1,data:{},tags:[]},l;(function(D){D[D.GET_DATA=0]="GET_DATA",D[D.SET_LOADING=1]="SET_LOADING",D[D.GET_TAGS=2]="GET_TAGS"})(l||(l={}));function g(D,ee){switch(ee.type){case l.GET_DATA:return Object(ye.a)(Object(ye.a)({},D),ee.payload);case l.GET_TAGS:return Object(ye.a)(Object(ye.a)({},D),{},{tags:ee.payload});case l.SET_LOADING:return Object(ye.a)(Object(ye.a)({},D),{},{loading:ee.payload});default:throw new Error}}var C=Xe.default=function(){var D=Object(ae.i)(),ee=D.caseId,we=Object(ae.g)(),ce=Object(L.useReducer)(g,c),ke=Object(Ee.a)(ce,2),ne=ke[0],ue=ke[1],H=ne.loading,ie=ne.tags,h=ne.data;Object(L.useEffect)(function(){function Z(){return z.apply(this,arguments)}function z(){return z=Object(re.a)(M.a.mark(function te(){var Se;return M.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,Object(_.b)();case 2:Se=Le.sent,ue({type:l.GET_TAGS,payload:Se.library_tags});case 4:case"end":return Le.stop()}},te)})),z.apply(this,arguments)}Z()},[]),Object(L.useEffect)(function(){var Z=!1;function z(){return te.apply(this,arguments)}function te(){return te=Object(re.a)(M.a.mark(function Se(){var Pe,Le,ge,Ae,Ie,$e,He,Ye,lt;return M.a.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return ue({type:l.SET_LOADING,payload:!1}),Ke.next=3,Object(_.c)(ee);case 3:Pe=Ke.sent,Le=Pe.author_name,ge=Pe.author_school_name,Ae=Pe.content,Ie=Pe.cover,$e=Pe.attachments,He=Pe.status,Ye=Pe.title,lt=Pe.tags,Z||(Pe.status===404?we.push("/moop_cases"):ue({type:l.GET_DATA,payload:{data:{title:Ye,author_name:Le,author_school_name:ge,content:Ae,tag_ids:lt.map(function(xe){return xe.id}),publish:He==="published",attachment_ids:$e.map(function(xe){return{uid:xe.id,id:xe.id,name:xe.title,url:xe.url,filesize:xe.filesize,status:"done"}}),cover_id:Ie!=null&&Ie.id?[{uid:Ie==null?void 0:Ie.id,id:Ie==null?void 0:Ie.id,name:Ie==null?void 0:Ie.title,url:Ie==null?void 0:Ie.url,filesize:Ie==null?void 0:Ie.filesize,status:"done"}]:[]},loading:!1}}));case 6:case"end":return Ke.stop()}},Se)})),te.apply(this,arguments)}return!Z&&ee&&z(),function(){Z=!0}},[ee]);function T(Z){return p.apply(this,arguments)}function p(){return p=Object(re.a)(M.a.mark(function Z(z){var te,Se;return M.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!ee){Le.next=6;break}return Le.next=3,Object(_.e)(ee,z);case 3:we.push("/moop_cases/".concat(ee,"/publish-success")),Le.next=11;break;case 6:return Le.next=8,Object(_.a)(z);case 8:te=Le.sent,Se=te.id,Se&&we.push("/moop_cases/".concat(Se,"/publish-success"));case 11:case"end":return Le.stop()}},Z)})),p.apply(this,arguments)}var P={initialValues:h,tags:ie,removeAttachment:_.d,callback:T};return y.a.createElement(ve.a,{spinning:H,delay:500},y.a.createElement("div",{className:"moop-info"},y.a.createElement("div",{className:"crumb"},y.a.createElement(Ce.a,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),y.a.createElement("span",null,"\u65B0\u5EFA")),y.a.createElement("div",{className:"title"},y.a.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),y.a.createElement(Ce.a,{to:"/moop_cases"},"\u8FD4\u56DE")),y.a.createElement(O,P)))}},osHv:function(ft,Xe,w){(function(I){I(w("VrN/"))})(function(I){"use strict";var ve=I.Pos;function re(F,le){return F.line-le.line||F.ch-le.ch}var Ee="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",ye=Ee+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$=new RegExp("<(/?)(["+Ee+"]["+ye+"]*)","g");function M(F,le,oe,Me){this.line=le,this.ch=oe,this.cm=F,this.text=F.getLine(le),this.min=Me?Math.max(Me.from,F.firstLine()):F.firstLine(),this.max=Me?Math.min(Me.to-1,F.lastLine()):F.lastLine()}function L(F,le){var oe=F.cm.getTokenTypeAt(ve(F.line,le));return oe&&/\btag\b/.test(oe)}function y(F){return F.line>=F.max?void 0:(F.ch=0,F.text=F.cm.getLine(++F.line),!0)}function X(F){return F.line<=F.min?void 0:(F.text=F.cm.getLine(--F.line),F.ch=F.text.length,!0)}function V(F){for(;;){var le=F.text.indexOf(">",F.ch);if(le==-1){if(y(F))continue;return}if(!L(F,le+1)){F.ch=le+1;continue}var oe=F.text.lastIndexOf("/",le),Me=oe>-1&&!/\S/.test(F.text.slice(oe+1,le));return F.ch=le+1,Me?"selfClose":"regular"}}function ae(F){for(;;){var le=F.ch?F.text.lastIndexOf("<",F.ch-1):-1;if(le==-1){if(X(F))continue;return}if(!L(F,le+1)){F.ch=le;continue}$.lastIndex=le,F.ch=le;var oe=$.exec(F.text);if(oe&&oe.index==le)return oe}}function Ce(F){for(;;){$.lastIndex=F.ch;var le=$.exec(F.text);if(!le){if(y(F))continue;return}if(!L(F,le.index+1)){F.ch=le.index+1;continue}return F.ch=le.index+le[0].length,le}}function se(F){for(;;){var le=F.ch?F.text.lastIndexOf(">",F.ch-1):-1;if(le==-1){if(X(F))continue;return}if(!L(F,le+1)){F.ch=le;continue}var oe=F.text.lastIndexOf("/",le),Me=oe>-1&&!/\S/.test(F.text.slice(oe+1,le));return F.ch=le+1,Me?"selfClose":"regular"}}function B(F,le){for(var oe=[];;){var Me=Ce(F),We,he=F.line,Te=F.ch-(Me?Me[0].length:0);if(!Me||!(We=V(F)))return;if(We=="selfClose")continue;if(Me[1]){for(var Ne=oe.length-1;Ne>=0;--Ne)if(oe[Ne]==Me[2]){oe.length=Ne;break}if(Ne<0&&(!le||le==Me[2]))return{tag:Me[2],from:ve(he,Te),to:ve(F.line,F.ch)}}else oe.push(Me[2])}}function j(F,le){for(var oe=[];;){var Me=se(F);if(!Me)return;if(Me=="selfClose"){ae(F);continue}var We=F.line,he=F.ch,Te=ae(F);if(!Te)return;if(Te[1])oe.push(Te[2]);else{for(var Ne=oe.length-1;Ne>=0;--Ne)if(oe[Ne]==Te[2]){oe.length=Ne;break}if(Ne<0&&(!le||le==Te[2]))return{tag:Te[2],from:ve(F.line,F.ch),to:ve(We,he)}}}}I.registerHelper("fold","xml",function(F,le){for(var oe=new M(F,le.line,0);;){var Me=Ce(oe);if(!Me||oe.line!=le.line)return;var We=V(oe);if(!We)return;if(!Me[1]&&We!="selfClose"){var he=ve(oe.line,oe.ch),Te=B(oe,Me[2]);return Te&&re(Te.from,he)>0?{from:he,to:Te.from}:null}}}),I.findMatchingTag=function(F,le,oe){var Me=new M(F,le.line,le.ch,oe);if(Me.text.indexOf(">")==-1&&Me.text.indexOf("<")==-1)return;var We=V(Me),he=We&&ve(Me.line,Me.ch),Te=We&&ae(Me);if(!We||!Te||re(Me,le)>0)return;var Ne={from:ve(Me.line,Me.ch),to:he,tag:Te[2]};return We=="selfClose"?{open:Ne,close:null,at:"open"}:Te[1]?{open:j(Me,Te[2]),close:Ne,at:"close"}:(Me=new M(F,he.line,he.ch,oe),{open:Ne,close:B(Me,Te[2]),at:"open"})},I.findEnclosingTag=function(F,le,oe,Me){for(var We=new M(F,le.line,le.ch,oe);;){var he=j(We,Me);if(!he)break;var Te=new M(F,le.line,le.ch,oe),Ne=B(Te,he.tag);if(Ne)return{open:he,close:Ne}}},I.scanForClosingTag=function(F,le,oe,Me){var We=new M(F,le.line,le.ch,Me?{from:0,to:Me}:null);return B(We,oe)}})},p5ED:function(ft,Xe,w){"use strict";var I=w("+L6B"),ve=w("2/Rp"),re=w("5Dmo"),Ee=w("3S7+"),ye=w("k1fw"),$=w("tJVT"),M=w("q1tI"),L=w.n(M),y=w("vHTk"),X=w.n(y),V=w("yEEn"),ae=w("ZW9T"),Ce=w("1vsH");Xe.a=function(se){var B=se.name,j=se.data,F=se.theme,le=se.type,oe=se.filename,Me=se.monacoEditor,We=se.className,he=se.style,Te=se.close,Ne=se.onClose,be=se.hasMask,me=Object(M.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),de=Object($.a)(me,2),W=de[0],b=de[1],K=Object(M.useState)(""),G=Object($.a)(K,2),E=G[0],q=G[1],N=Object(M.useRef)();oe&&(Me.filename=oe),Object(M.useEffect)(function(){var c,l,g=(c=document.cookie)===null||c===void 0||((l=c.replace(/\s/g,""))===null||l===void 0)?void 0:l.split(";");g==null||g.map(function(C){var D=C.split("=");D[0]==="_educoder_session"&&q(D[1])})},[]);var O=function(){if(j.startsWith("http")||j.startsWith("/")){_();return}Object(Ce.y)(oe||"educoder",j,oe)},_=function(){Object(Ce.w)(oe||B,j)};return console.log("data:",j,"fileanme:",oe," name:",B),L.a.createElement("div",{style:Object(ye.a)({},he||{}),className:"".concat(be&&X.a.bgBlack," ").concat(le?X.a.wrp:"hide")},Te&&L.a.createElement("div",{className:X.a.close,ref:N},L.a.createElement(Ee.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return N.current}},L.a.createElement("span",{onClick:_},L.a.createElement("i",{className:"icon-quxiaozhiding"}))),L.a.createElement(Ee.a,{title:"\u5173\u95ED",getPopupContainer:function(){return N.current}},L.a.createElement("span",{className:"",onClick:Ne},L.a.createElement("i",{className:"icon-guanbi1"})))),L.a.createElement("div",{className:"".concat(X.a[We]," ").concat(We," ").concat(X.a.monaco," ").concat(le==="txt"?"show":"hide")},le==="txt"&&L.a.createElement(ae.b,Me)),le==="audio"&&L.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}),le==="video"&&L.a.createElement(L.a.Fragment,null,j!=null&&j.startsWith("/")?L.a.createElement("video",{controls:!0,src:"".concat(j),autoPlay:!0}):L.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(j),autoPlay:!0})),le==="pdf"&&L.a.createElement("embed",{className:X.a.embed,src:j}),le==="image"&&L.a.createElement(L.a.Fragment,null,L.a.createElement("img",{src:"".concat(j!=null&&j.startsWith("/")||(j==null?void 0:j.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(j)})),le==="other"&&L.a.createElement("div",null,L.a.createElement(ve.a,{type:"primary",size:"large",onClick:O},L.a.createElement(V.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(le==="download"||le==="office")&&L.a.createElement(ve.a,{type:"primary",size:"large",onClick:O},L.a.createElement(V.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(ft,Xe,w){},"rAM+":function(ft,Xe,w){"use strict";w.d(Xe,"a",function(){return ve});var I=w("Qw5x");function ve(re,Ee){var ye;if(typeof Symbol=="undefined"||re[Symbol.iterator]==null){if(Array.isArray(re)||(ye=Object(I.a)(re))||Ee&&re&&typeof re.length=="number"){ye&&(re=ye);var $=0,M=function(){};return{s:M,n:function(){return $>=re.length?{done:!0}:{done:!1,value:re[$++]}},e:function(ae){throw ae},f:M}}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 L=!0,y=!1,X;return{s:function(){ye=re[Symbol.iterator]()},n:function(){var ae=ye.next();return L=ae.done,ae},e:function(ae){y=!0,X=ae},f:function(){try{!L&&ye.return!=null&&ye.return()}finally{if(y)throw X}}}}},rUJ1:function(ft,Xe){const w=/[&<>"']/,I=/[&<>"']/g,ve=/[<>"']|&(?!#?\w+;)/,re=/[<>"']|&(?!#?\w+;)/g,Ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ye=be=>Ee[be];function $(be,me){if(me){if(w.test(be))return be.replace(I,ye)}else if(ve.test(be))return be.replace(re,ye);return be}const M=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L(be){return be.replace(M,(me,de)=>(de=de.toLowerCase(),de==="colon"?":":de.charAt(0)==="#"?de.charAt(1)==="x"?String.fromCharCode(parseInt(de.substring(2),16)):String.fromCharCode(+de.substring(1)):""))}const y=/(^|[^\[])\^/g;function X(be,me){be=be.source||be,me=me||"";const de={replace:(W,b)=>(b=b.source||b,b=b.replace(y,"$1"),be=be.replace(W,b),de),getRegex:()=>new RegExp(be,me)};return de}const V=/[^\w:]/g,ae=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ce(be,me,de){if(be){let W;try{W=decodeURIComponent(L(de)).replace(V,"").toLowerCase()}catch(b){return null}if(W.indexOf("javascript:")===0||W.indexOf("vbscript:")===0||W.indexOf("data:")===0)return null}me&&!ae.test(de)&&(de=le(me,de));try{de=encodeURI(de).replace(/%25/g,"%")}catch(W){return null}return de}const se={},B=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,F=/^([^:]+:\/*[^/]*)[\s\S]*$/;function le(be,me){se[" "+be]||(B.test(be)?se[" "+be]=be+"/":se[" "+be]=he(be,"/",!0)),be=se[" "+be];const de=be.indexOf(":")===-1;return me.substring(0,2)==="//"?de?me:be.replace(j,"$1")+me:me.charAt(0)==="/"?de?me:be.replace(F,"$1")+me:be+me}const oe={exec:function(){}};function Me(be){let me=1,de,W;for(;me<arguments.length;me++){de=arguments[me];for(W in de)Object.prototype.hasOwnProperty.call(de,W)&&(be[W]=de[W])}return be}function We(be,me){const de=be.replace(/\|/g,(K,G,E)=>{let q=!1,N=G;for(;--N>=0&&E[N]==="\\";)q=!q;return q?"|":" |"}),W=de.split(/ \|/);let b=0;if(W.length>me)W.splice(me);else for(;W.length<me;)W.push("");for(;b<W.length;b++)W[b]=W[b].trim().replace(/\\\|/g,"|");return W}function he(be,me,de){const W=be.length;if(W===0)return"";let b=0;for(;b<W;){const K=be.charAt(W-b-1);if(K===me&&!de)b++;else if(K!==me&&de)b++;else break}return be.substr(0,W-b)}function Te(be,me){if(be.indexOf(me[1])===-1)return-1;const de=be.length;let W=0,b=0;for(;b<de;b++)if(be[b]==="\\")b++;else if(be[b]===me[0])W++;else if(be[b]===me[1]&&(W--,W<0))return b;return-1}function Ne(be){be&&be.sanitize&&!be.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")}ft.exports={escape:$,unescape:L,edit:X,cleanUrl:Ce,resolveUrl:le,noopTest:oe,merge:Me,splitCells:We,rtrim:he,findClosingBracket:Te,checkSanitizeDeprecation:Ne}},vHTk:function(ft,Xe,w){ft.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wMS7:function(ft,Xe,w){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(I,ve){ft.exports=ve()})(this,function(){"use strict";function I(p){if(Array.isArray(p)){for(var P=0,Z=Array(p.length);P<p.length;P++)Z[P]=p[P];return Z}else return Array.from(p)}var ve=Object.hasOwnProperty,re=Object.setPrototypeOf,Ee=Object.isFrozen,ye=Object.keys,$=Object.freeze,M=Object.seal,L=Object.create,y=typeof Reflect!="undefined"&&Reflect,X=y.apply,V=y.construct;X||(X=function(P,Z,z){return P.apply(Z,z)}),$||($=function(P){return P}),M||(M=function(P){return P}),V||(V=function(P,Z){return new(Function.prototype.bind.apply(P,[null].concat(I(Z))))});var ae=me(Array.prototype.forEach),Ce=me(Array.prototype.indexOf),se=me(Array.prototype.join),B=me(Array.prototype.pop),j=me(Array.prototype.push),F=me(Array.prototype.slice),le=me(String.prototype.toLowerCase),oe=me(String.prototype.match),Me=me(String.prototype.replace),We=me(String.prototype.indexOf),he=me(String.prototype.trim),Te=me(RegExp.prototype.test),Ne=de(RegExp),be=de(TypeError);function me(p){return function(P){for(var Z=arguments.length,z=Array(Z>1?Z-1:0),te=1;te<Z;te++)z[te-1]=arguments[te];return X(p,P,z)}}function de(p){return function(){for(var P=arguments.length,Z=Array(P),z=0;z<P;z++)Z[z]=arguments[z];return V(p,Z)}}function W(p,P){re&&re(p,null);for(var Z=P.length;Z--;){var z=P[Z];if(typeof z=="string"){var te=le(z);te!==z&&(Ee(P)||(P[Z]=te),z=te)}p[z]=!0}return p}function b(p){var P=L(null),Z=void 0;for(Z in p)X(ve,p,[Z])&&(P[Z]=p[Z]);return P}var K=$(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),G=$(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),E=$(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),q=$(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),N=$(["#text"]),O=$(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),_=$(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),c=$(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),l=$(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),g=M(/\{\{[\s\S]*|[\s\S]*\}\}/gm),C=M(/<%[\s\S]*|[\s\S]*%>/gm),D=M(/^data-[\-\w.\u00B7-\uFFFF]/),ee=M(/^aria-[\-\w]+$/),we=M(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ce=M(/^(?:\w+script|data):/i),ke=M(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p};function ue(p){if(Array.isArray(p)){for(var P=0,Z=Array(p.length);P<p.length;P++)Z[P]=p[P];return Z}else return Array.from(p)}var H=function(){return typeof window=="undefined"?null:window},ie=function(P,Z){if((typeof P=="undefined"?"undefined":ne(P))!=="object"||typeof P.createPolicy!="function")return null;var z=null,te="data-tt-policy-suffix";Z.currentScript&&Z.currentScript.hasAttribute(te)&&(z=Z.currentScript.getAttribute(te));var Se="dompurify"+(z?"#"+z:"");try{return P.createPolicy(Se,{createHTML:function(Le){return Le}})}catch(Pe){return console.warn("TrustedTypes policy "+Se+" could not be created."),null}};function h(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H(),P=function(pe){return h(pe)};if(P.version="2.0.15",P.removed=[],!p||!p.document||p.document.nodeType!==9)return P.isSupported=!1,P;var Z=p.document,z=!1,te=p.document,Se=p.DocumentFragment,Pe=p.HTMLTemplateElement,Le=p.Node,ge=p.NodeFilter,Ae=p.NamedNodeMap,Ie=Ae===void 0?p.NamedNodeMap||p.MozNamedAttrMap:Ae,$e=p.Text,He=p.Comment,Ye=p.DOMParser,lt=p.trustedTypes;if(typeof Pe=="function"){var tt=te.createElement("template");tt.content&&tt.content.ownerDocument&&(te=tt.content.ownerDocument)}var Ke=ie(lt,Z),xe=Ke&&Rn?Ke.createHTML(""):"",rt=te,qe=rt.implementation,Oe=rt.createNodeIterator,Ue=rt.getElementsByTagName,U=rt.createDocumentFragment,R=Z.importNode,S=b(te).documentMode?te.documentMode:{},f={};P.isSupported=qe&&typeof qe.createHTMLDocument!="undefined"&&S!==9;var m=g,v=C,x=D,J=ee,fe=ce,De=ke,et=we,nt=null,ot=W({},[].concat(ue(K),ue(G),ue(E),ue(q),ue(N))),xt=null,bt=W({},[].concat(ue(O),ue(_),ue(c),ue(l))),ht=null,Ft=null,Ct=!0,zt=!0,Rt=!1,yt=!1,on=!1,Cn=!1,sn=!1,kn=!1,tn=!1,nr=!1,On=!1,Rn=!1,Bn=!0,At=!0,Ze=!1,Zt={},Xn=W({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),hn=null,wt=W({},["audio","video","img","source","image","track"]),Sn=null,Pn=W({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ln=null,je=te.createElement("form"),ct=function(pe){if(Ln&&Ln===pe)return;(!pe||(typeof pe=="undefined"?"undefined":ne(pe))!=="object")&&(pe={}),pe=b(pe),nt="ALLOWED_TAGS"in pe?W({},pe.ALLOWED_TAGS):ot,xt="ALLOWED_ATTR"in pe?W({},pe.ALLOWED_ATTR):bt,Sn="ADD_URI_SAFE_ATTR"in pe?W(b(Pn),pe.ADD_URI_SAFE_ATTR):Pn,hn="ADD_DATA_URI_TAGS"in pe?W(b(wt),pe.ADD_DATA_URI_TAGS):wt,ht="FORBID_TAGS"in pe?W({},pe.FORBID_TAGS):{},Ft="FORBID_ATTR"in pe?W({},pe.FORBID_ATTR):{},Zt="USE_PROFILES"in pe?pe.USE_PROFILES:!1,Ct=pe.ALLOW_ARIA_ATTR!==!1,zt=pe.ALLOW_DATA_ATTR!==!1,Rt=pe.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=pe.SAFE_FOR_JQUERY||!1,on=pe.SAFE_FOR_TEMPLATES||!1,Cn=pe.WHOLE_DOCUMENT||!1,tn=pe.RETURN_DOM||!1,nr=pe.RETURN_DOM_FRAGMENT||!1,On=pe.RETURN_DOM_IMPORT||!1,Rn=pe.RETURN_TRUSTED_TYPE||!1,kn=pe.FORCE_BODY||!1,Bn=pe.SANITIZE_DOM!==!1,At=pe.KEEP_CONTENT!==!1,Ze=pe.IN_PLACE||!1,et=pe.ALLOWED_URI_REGEXP||et,on&&(zt=!1),nr&&(tn=!0),Zt&&(nt=W({},[].concat(ue(N))),xt=[],Zt.html===!0&&(W(nt,K),W(xt,O)),Zt.svg===!0&&(W(nt,G),W(xt,_),W(xt,l)),Zt.svgFilters===!0&&(W(nt,E),W(xt,_),W(xt,l)),Zt.mathMl===!0&&(W(nt,q),W(xt,c),W(xt,l))),pe.ADD_TAGS&&(nt===ot&&(nt=b(nt)),W(nt,pe.ADD_TAGS)),pe.ADD_ATTR&&(xt===bt&&(xt=b(xt)),W(xt,pe.ADD_ATTR)),pe.ADD_URI_SAFE_ATTR&&W(Sn,pe.ADD_URI_SAFE_ATTR),At&&(nt["#text"]=!0),Cn&&W(nt,["html","head","body"]),nt.table&&(W(nt,["tbody"]),delete ht.tbody),$&&$(pe),Ln=pe},_n=function(pe){j(P.removed,{element:pe});try{pe.parentNode.removeChild(pe)}catch(Je){pe.outerHTML=xe}},Mn=function(pe,Je){try{j(P.removed,{attribute:Je.getAttributeNode(pe),from:Je})}catch(it){j(P.removed,{attribute:null,from:Je})}Je.removeAttribute(pe)},Be=function(pe){var Je=void 0,it=void 0;if(kn)pe="<remove></remove>"+pe;else{var kt=oe(pe,/^[\r\n\t ]+/);it=kt&&kt[0]}var cn=Ke?Ke.createHTML(pe):pe;try{Je=new Ye().parseFromString(cn,"text/html")}catch(Lt){}if(z&&W(ht,["title"]),!Je||!Je.documentElement){Je=qe.createHTMLDocument("");var Xt=Je,Pt=Xt.body;Pt.parentNode.removeChild(Pt.parentNode.firstElementChild),Pt.outerHTML=cn}return pe&&it&&Je.body.insertBefore(te.createTextNode(it),Je.body.childNodes[0]||null),Ue.call(Je,Cn?"html":"body")[0]};P.isSupported&&function(){try{var st=Be("<x/><title>&lt;/title&gt;&lt;img&gt;");Te(/<\/title/,st.querySelector("title").innerHTML)&&(z=!0)}catch(pe){}}();var Kn=function(pe){return Oe.call(pe.ownerDocument||pe,pe,ge.SHOW_ELEMENT|ge.SHOW_COMMENT|ge.SHOW_TEXT,function(){return ge.FILTER_ACCEPT},!1)},Tr=function(pe){return pe instanceof $e||pe instanceof He?!1:typeof pe.nodeName!="string"||typeof pe.textContent!="string"||typeof pe.removeChild!="function"||!(pe.attributes instanceof Ie)||typeof pe.removeAttribute!="function"||typeof pe.setAttribute!="function"||typeof pe.namespaceURI!="string"},ut=function(pe){return(typeof Le=="undefined"?"undefined":ne(Le))==="object"?pe instanceof Le:pe&&(typeof pe=="undefined"?"undefined":ne(pe))==="object"&&typeof pe.nodeType=="number"&&typeof pe.nodeName=="string"},ln=function(pe,Je,it){if(!f[pe])return;ae(f[pe],function(kt){kt.call(P,Je,it,Ln)})},Wn=function(pe){var Je=void 0;if(ln("beforeSanitizeElements",pe,null),Tr(pe))return _n(pe),!0;if(oe(pe.nodeName,/[\u0080-\uFFFF]/))return _n(pe),!0;var it=le(pe.nodeName);if(ln("uponSanitizeElement",pe,{tagName:it,allowedTags:nt}),(it==="svg"||it==="math")&&pe.querySelectorAll("p, br").length!==0)return _n(pe),!0;if(!nt[it]||ht[it]){if(At&&!Xn[it]&&typeof pe.insertAdjacentHTML=="function")try{var kt=pe.innerHTML;pe.insertAdjacentHTML("AfterEnd",Ke?Ke.createHTML(kt):kt)}catch(cn){}return _n(pe),!0}return it==="noscript"&&Te(/<\/noscript/i,pe.innerHTML)||it==="noembed"&&Te(/<\/noembed/i,pe.innerHTML)?(_n(pe),!0):(yt&&!ut(pe.firstElementChild)&&(!ut(pe.content)||!ut(pe.content.firstElementChild))&&Te(/</g,pe.textContent)&&(j(P.removed,{element:pe.cloneNode()}),pe.innerHTML?pe.innerHTML=Me(pe.innerHTML,/</g,"&lt;"):pe.innerHTML=Me(pe.textContent,/</g,"&lt;")),on&&pe.nodeType===3&&(Je=pe.textContent,Je=Me(Je,m," "),Je=Me(Je,v," "),pe.textContent!==Je&&(j(P.removed,{element:pe.cloneNode()}),pe.textContent=Je)),ln("afterSanitizeElements",pe,null),!1)},$n=function(pe,Je,it){if(Bn&&(Je==="id"||Je==="name")&&(it in te||it in je))return!1;if(!(zt&&Te(x,Je))){if(!(Ct&&Te(J,Je))){if(!xt[Je]||Ft[Je])return!1;if(!Sn[Je]){if(!Te(et,Me(it,De,""))){if(!((Je==="src"||Je==="xlink:href"||Je==="href")&&pe!=="script"&&We(it,"data:")===0&&hn[pe])){if(!(Rt&&!Te(fe,Me(it,De,"")))){if(it)return!1}}}}}}return!0},un=function(pe){var Je=void 0,it=void 0,kt=void 0,cn=void 0,Xt=void 0;ln("beforeSanitizeAttributes",pe,null);var Pt=pe.attributes;if(!Pt)return;var Lt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt};for(Xt=Pt.length;Xt--;){Je=Pt[Xt];var Ar=Je,xn=Ar.name,Nn=Ar.namespaceURI;if(it=he(Je.value),kt=le(xn),Lt.attrName=kt,Lt.attrValue=it,Lt.keepAttr=!0,Lt.forceKeepAttr=void 0,ln("uponSanitizeAttribute",pe,Lt),it=Lt.attrValue,Lt.forceKeepAttr)continue;if(kt==="name"&&pe.nodeName==="IMG"&&Pt.id)cn=Pt.id,Pt=F(Pt,[]),Mn("id",pe),Mn(xn,pe),Ce(Pt,cn)>Xt&&pe.setAttribute("id",cn.value);else{if(pe.nodeName==="INPUT"&&kt==="type"&&it==="file"&&Lt.keepAttr&&(xt[kt]||!Ft[kt]))continue;xn==="id"&&pe.setAttribute(xn,""),Mn(xn,pe)}if(!Lt.keepAttr)continue;if(yt&&Te(/\/>/i,it)){Mn(xn,pe);continue}if(Te(/svg|math/i,pe.namespaceURI)&&Te(Ne("</("+se(ye(Xn),"|")+")","i"),it)){Mn(xn,pe);continue}on&&(it=Me(it,m," "),it=Me(it,v," "));var pn=pe.nodeName.toLowerCase();if(!$n(pn,kt,it))continue;try{Nn?pe.setAttributeNS(Nn,xn,it):pe.setAttribute(xn,it),B(P.removed)}catch(Si){}}ln("afterSanitizeAttributes",pe,null)},Dn=function st(pe){var Je=void 0,it=Kn(pe);for(ln("beforeSanitizeShadowDOM",pe,null);Je=it.nextNode();){if(ln("uponSanitizeShadowNode",Je,null),Wn(Je))continue;Je.content instanceof Se&&st(Je.content),un(Je)}ln("afterSanitizeShadowDOM",pe,null)};return P.sanitize=function(st,pe){var Je=void 0,it=void 0,kt=void 0,cn=void 0,Xt=void 0;if(st||(st="<!-->"),typeof st!="string"&&!ut(st)){if(typeof st.toString!="function")throw be("toString is not a function");if(st=st.toString(),typeof st!="string")throw be("dirty is not a string, aborting")}if(!P.isSupported){if(ne(p.toStaticHTML)==="object"||typeof p.toStaticHTML=="function"){if(typeof st=="string")return p.toStaticHTML(st);if(ut(st))return p.toStaticHTML(st.outerHTML)}return st}if(sn||ct(pe),P.removed=[],typeof st=="string"&&(Ze=!1),!Ze)if(st instanceof Le)Je=Be("<!-->"),it=Je.ownerDocument.importNode(st,!0),it.nodeType===1&&it.nodeName==="BODY"||it.nodeName==="HTML"?Je=it:Je.appendChild(it);else{if(!tn&&!on&&!Cn&&st.indexOf("<")===-1)return Ke&&Rn?Ke.createHTML(st):st;if(Je=Be(st),!Je)return tn?null:xe}Je&&kn&&_n(Je.firstChild);for(var Pt=Kn(Ze?st:Je);kt=Pt.nextNode();){if(kt.nodeType===3&&kt===cn)continue;if(Wn(kt))continue;kt.content instanceof Se&&Dn(kt.content),un(kt),cn=kt}if(cn=null,Ze)return st;if(tn){if(nr)for(Xt=U.call(Je.ownerDocument);Je.firstChild;)Xt.appendChild(Je.firstChild);else Xt=Je;return On&&(Xt=R.call(Z,Xt,!0)),Xt}var Lt=Cn?Je.outerHTML:Je.innerHTML;return on&&(Lt=Me(Lt,m," "),Lt=Me(Lt,v," ")),Ke&&Rn?Ke.createHTML(Lt):Lt},P.setConfig=function(st){ct(st),sn=!0},P.clearConfig=function(){Ln=null,sn=!1},P.isValidAttribute=function(st,pe,Je){Ln||ct({});var it=le(st),kt=le(pe);return $n(it,kt,Je)},P.addHook=function(st,pe){if(typeof pe!="function")return;f[st]=f[st]||[],j(f[st],pe)},P.removeHook=function(st){f[st]&&B(f[st])},P.removeHooks=function(st){f[st]&&(f[st]=[])},P.removeAllHooks=function(){f={}},P}var T=h();return T})},wzkS:function(ft,Xe,w){"use strict";w.d(Xe,"c",function(){return ye}),w.d(Xe,"b",function(){return $}),w.d(Xe,"d",function(){return M}),w.d(Xe,"a",function(){return y}),w.d(Xe,"e",function(){return X});var I=w("9og8"),ve=w("WmNS"),re=w.n(ve),Ee=w("ErOA");function ye(V){return Object(Ee.c)("libraries/".concat(V,".json"))}function $(){return Object(Ee.c)("library_tags.json")}function M(V){return L.apply(this,arguments)}function L(){return L=Object(I.a)(re.a.mark(function V(ae){var Ce;return re.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,Object(Ee.b)("attachments/".concat(ae,".json"));case 2:return Ce=B.sent,B.abrupt("return",Ce.status===0);case 4:case"end":return B.stop()}},V)})),L.apply(this,arguments)}function y(V){return Object(Ee.f)("libraries.json",V)}function X(V,ae){return Object(Ee.g)("libraries/".concat(V,".json"),ae)}}}]);