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.
117 lines
420 KiB
117 lines
420 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[168,7,9],{"+NIl":function(mt,Ke,m){(function(F){F(m("VrN/"))})(function(F){"use strict";F.defineMode("stex",function(we,V){"use strict";function ge(j,I){j.cmdState.push(I)}function me(j){return j.cmdState.length>0?j.cmdState[j.cmdState.length-1]:null}function le(j){var I=j.cmdState.pop();I&&I.closeBracket()}function L(j){for(var I=j.cmdState,N=I.length-1;N>=0;N--){var M=I[N];if(M.name=="DEFAULT")continue;return M}return{styleIdentifier:function(){return null}}}function P(j,I,N){return function(){this.name=j,this.bracketNo=0,this.style=I,this.styles=N,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var x={};x.importmodule=P("importmodule","tag",["string","builtin"]),x.documentclass=P("documentclass","tag",["","atom"]),x.usepackage=P("usepackage","tag",["atom"]),x.begin=P("begin","tag",["atom"]),x.end=P("end","tag",["atom"]),x.label=P("label","tag",["atom"]),x.ref=P("ref","tag",["atom"]),x.eqref=P("eqref","tag",["atom"]),x.cite=P("cite","tag",["atom"]),x.bibitem=P("bibitem","tag",["atom"]),x.Bibitem=P("Bibitem","tag",["atom"]),x.RBibitem=P("RBibitem","tag",["atom"]),x.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ne(j,I){j.f=I}function H(j,I){var N;if(j.match(/^\\[a-zA-Z@]+/)){var M=j.current().slice(1);return N=x.hasOwnProperty(M)?x[M]:x.DEFAULT,N=new N,ge(I,N),ne(I,ce),N.style}if(j.match(/^\\[$&%#{}_]/))return"tag";if(j.match(/^\\[,;!\/\\]/))return"tag";if(j.match("\\["))return ne(I,function(G,ae){return q(G,ae,"\\]")}),"keyword";if(j.match("\\("))return ne(I,function(G,ae){return q(G,ae,"\\)")}),"keyword";if(j.match("$$"))return ne(I,function(G,ae){return q(G,ae,"$$")}),"keyword";if(j.match("$"))return ne(I,function(G,ae){return q(G,ae,"$")}),"keyword";var ee=j.next();if(ee=="%")return j.skipToEnd(),"comment";if(ee=="}"||ee=="]"){if(N=me(I),N)N.closeBracket(ee),ne(I,ce);else return"error";return"bracket"}else return ee=="{"||ee=="["?(N=x.DEFAULT,N=new N,ge(I,N),"bracket"):/\d/.test(ee)?(j.eatWhile(/[\w.%]/),"atom"):(j.eatWhile(/[\w\-_]/),N=L(I),N.name=="begin"&&(N.argument=j.current()),N.styleIdentifier())}function q(j,I,N){if(j.eatSpace())return null;if(N&&j.match(N))return ne(I,H),"keyword";if(j.match(/^\\[a-zA-Z@]+/))return"tag";if(j.match(/^[a-zA-Z]+/))return"variable-2";if(j.match(/^\\[$&%#{}_]/))return"tag";if(j.match(/^\\[,;!\/]/))return"tag";if(j.match(/^[\^_&]/))return"tag";if(j.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(j.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var M=j.next();return M=="{"||M=="}"||M=="["||M=="]"||M=="("||M==")"?"bracket":M=="%"?(j.skipToEnd(),"comment"):"error"}function ce(j,I){var N=j.peek(),M;return N=="{"||N=="["?(M=me(I),M.openBracket(N),j.eat(N),ne(I,H),"bracket"):/[ \t\r]/.test(N)?(j.eat(N),null):(ne(I,H),le(I),H(j,I))}return{startState:function(){var j=V.inMathMode?function(I,N){return q(I,N)}:H;return{cmdState:[],f:j}},copyState:function(j){return{cmdState:j.cmdState.slice(),f:j.f}},token:function(j,I){return I.f(j,I)},blankLine:function(j){j.f=H,j.cmdState.length=0},lineComment:"%"}}),F.defineMIME("text/x-stex","stex"),F.defineMIME("text/x-latex","stex")})},"+yhJ":function(mt,Ke,m){mt.exports=m.p+"static/xixi.d492fb65.svg"},"0eGx":function(mt,Ke,m){mt.exports=m.p+"static/zhong.c1924b73.svg"},"19Vz":function(mt,Ke,m){(function(F){F(m("VrN/"))})(function(F){F.defineOption("placeholder","",function(P,x,ne){var H=ne&&ne!=F.Init;if(x&&!H)P.on("blur",me),P.on("change",le),P.on("swapDoc",le),F.on(P.getInputField(),"compositionupdate",P.state.placeholderCompose=function(){ge(P)}),le(P);else if(!x&&H){P.off("blur",me),P.off("change",le),P.off("swapDoc",le),F.off(P.getInputField(),"compositionupdate",P.state.placeholderCompose),we(P);var q=P.getWrapperElement();q.className=q.className.replace(" CodeMirror-empty","")}x&&!P.hasFocus()&&me(P)});function we(P){P.state.placeholder&&(P.state.placeholder.parentNode.removeChild(P.state.placeholder),P.state.placeholder=null)}function V(P){we(P);var x=P.state.placeholder=document.createElement("pre");x.style.cssText="height: 0; overflow: visible",x.style.direction=P.getOption("direction"),x.className="CodeMirror-placeholder CodeMirror-line-like";var ne=P.getOption("placeholder");typeof ne=="string"&&(ne=document.createTextNode(ne)),x.appendChild(ne),P.display.lineSpace.insertBefore(x,P.display.lineSpace.firstChild)}function ge(P){setTimeout(function(){var x=!1,ne=P.getInputField();ne.nodeName=="TEXTAREA"?x=!ne.value:P.lineCount()==1&&(x=!/[^\u200b]/.test(ne.querySelector(".CodeMirror-line").textContent)),x?V(P):we(P)},20)}function me(P){L(P)&&V(P)}function le(P){var x=P.getWrapperElement(),ne=L(P);x.className=x.className.replace(" CodeMirror-empty","")+(ne?" CodeMirror-empty":""),ne?V(P):we(P)}function L(P){return P.lineCount()===1&&P.getLine(0)===""}})},"1eCo":function(mt,Ke,m){(function(F){F(m("VrN/"))})(function(F){"use strict";var we={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},V={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};F.defineMode("xml",function(ge,me){var le=ge.indentUnit,L={},P=me.htmlMode?we:V;for(var x in P)L[x]=P[x];for(var x in me)L[x]=me[x];var ne,H;function q(p,T){function R(te){return T.tokenize=te,te(p,T)}var _=p.next();if(_=="<")return p.eat("!")?p.eat("[")?p.match("CDATA[")?R(I("atom","]]>")):null:p.match("--")?R(I("comment","-->")):p.match("DOCTYPE",!0,!0)?(p.eatWhile(/[\w\._\-]/),R(N(1))):null:p.eat("?")?(p.eatWhile(/[\w\._\-]/),T.tokenize=I("meta","?>"),"meta"):(ne=p.eat("/")?"closeTag":"openTag",T.tokenize=ce,"tag bracket");if(_=="&"){var D;return p.eat("#")?p.eat("x")?D=p.eatWhile(/[a-fA-F\d]/)&&p.eat(";"):D=p.eatWhile(/[\d]/)&&p.eat(";"):D=p.eatWhile(/[\w\.\-:]/)&&p.eat(";"),D?"atom":"error"}else return p.eatWhile(/[^&<]/),null}q.isInText=!0;function ce(p,T){var R=p.next();if(R==">"||R=="/"&&p.eat(">"))return T.tokenize=q,ne=R==">"?"endTag":"selfcloseTag","tag bracket";if(R=="=")return ne="equals",null;if(R=="<"){T.tokenize=q,T.state=ae,T.tagName=T.tagStart=null;var _=T.tokenize(p,T);return _?_+" tag error":"tag error"}else return/[\'\"]/.test(R)?(T.tokenize=j(R),T.stringStartCol=p.column(),T.tokenize(p,T)):(p.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function j(p){var T=function(R,_){for(;!R.eol();)if(R.next()==p){_.tokenize=ce;break}return"string"};return T.isInAttribute=!0,T}function I(p,T){return function(R,_){for(;!R.eol();){if(R.match(T)){_.tokenize=q;break}R.next()}return p}}function N(p){return function(T,R){for(var _;(_=T.next())!=null;){if(_=="<")return R.tokenize=N(p+1),R.tokenize(T,R);if(_==">")if(p==1){R.tokenize=q;break}else return R.tokenize=N(p-1),R.tokenize(T,R)}return"meta"}}function M(p,T,R){this.prev=p.context,this.tagName=T,this.indent=p.indented,this.startOfLine=R,(L.doNotIndent.hasOwnProperty(T)||p.context&&p.context.noIndent)&&(this.noIndent=!0)}function ee(p){p.context&&(p.context=p.context.prev)}function G(p,T){for(var R;;){if(!p.context)return;if(R=p.context.tagName,!L.contextGrabbers.hasOwnProperty(R)||!L.contextGrabbers[R].hasOwnProperty(T))return;ee(p)}}function ae(p,T,R){return p=="openTag"?(R.tagStart=T.column(),Te):p=="closeTag"?Y:ae}function Te(p,T,R){return p=="word"?(R.tagName=T.current(),H="tag",Q):L.allowMissingTagName&&p=="endTag"?(H="tag bracket",Q(p,T,R)):(H="error",Te)}function Y(p,T,R){if(p=="word"){var _=T.current();return R.context&&R.context.tagName!=_&&L.implicitlyClosed.hasOwnProperty(R.context.tagName)&&ee(R),R.context&&R.context.tagName==_||L.matchClosing===!1?(H="tag",J):(H="tag error",d)}else return L.allowMissingTagName&&p=="endTag"?(H="tag bracket",J(p,T,R)):(H="error",d)}function J(p,T,R){return p!="endTag"?(H="error",J):(ee(R),ae)}function d(p,T,R){return H="error",J(p,T,R)}function Q(p,T,R){if(p=="word")return H="attribute",U;if(p=="endTag"||p=="selfcloseTag"){var _=R.tagName,D=R.tagStart;return R.tagName=R.tagStart=null,p=="selfcloseTag"||L.autoSelfClosers.hasOwnProperty(_)?G(R,_):(G(R,_),R.context=new M(R,_,D==R.indented)),ae}return H="error",Q}function U(p,T,R){return p=="equals"?re:(L.allowMissing||(H="error"),Q(p,T,R))}function re(p,T,R){return p=="string"?S:p=="word"&&L.allowUnquoted?(H="string",Q):(H="error",Q(p,T,R))}function S(p,T,R){return p=="string"?S:Q(p,T,R)}return{startState:function(p){var T={tokenize:q,state:ae,indented:p||0,tagName:null,tagStart:null,context:null};return p!=null&&(T.baseIndent=p),T},token:function(p,T){if(!T.tagName&&p.sol()&&(T.indented=p.indentation()),p.eatSpace())return null;ne=null;var R=T.tokenize(p,T);return(R||ne)&&R!="comment"&&(H=null,T.state=T.state(ne||R,p,T),H&&(R=H=="error"?R+" error":H)),R},indent:function(p,T,R){var _=p.context;if(p.tokenize.isInAttribute)return p.tagStart==p.indented?p.stringStartCol+1:p.indented+le;if(_&&_.noIndent)return F.Pass;if(p.tokenize!=ce&&p.tokenize!=q)return R?R.match(/^(\s*)/)[0].length:0;if(p.tagName)return L.multilineTagIndentPastTag!==!1?p.tagStart+p.tagName.length+2:p.tagStart+le*(L.multilineTagIndentFactor||1);if(L.alignCDATA&&/<!\[CDATA\[/.test(T))return 0;var D=T&&/^<(\/)?([\w_:\.-]*)/.exec(T);if(D&&D[1])for(;_;)if(_.tagName==D[2]){_=_.prev;break}else if(L.implicitlyClosed.hasOwnProperty(_.tagName))_=_.prev;else break;else if(D)for(;_;){var te=L.contextGrabbers[_.tagName];if(te&&te.hasOwnProperty(D[2]))_=_.prev;else break}for(;_&&_.prev&&!_.startOfLine;)_=_.prev;return _?_.indent+le:p.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:L.htmlMode?"html":"xml",helperType:L.htmlMode?"html":"xml",skipAttribute:function(p){p.state==re&&(p.state=Q)},xmlCurrentTag:function(p){return p.tagName?{name:p.tagName,close:p.type=="closeTag"}:null},xmlCurrentContext:function(p){for(var T=[],R=p.context;R;R=R.prev)R.tagName&&T.push(R.tagName);return T.reverse()}}}),F.defineMIME("text/xml","xml"),F.defineMIME("application/xml","xml"),F.mimeModes.hasOwnProperty("text/html")||F.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"6+eU":function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return J});var F=m("wx14"),we=m("rePB"),V=m("VTBJ"),ge=m("1OyB"),me=m("vuIU"),le=m("Ji7U"),L=m("LK+K"),P=m("cDcd"),x=m.n(P),ne=m("TSYQ"),H=m.n(ne),q=function(Q){var U,re="".concat(Q.rootPrefixCls,"-item"),S=H()(re,"".concat(re,"-").concat(Q.page),(U={},Object(we.a)(U,"".concat(re,"-active"),Q.active),Object(we.a)(U,Q.className,!!Q.className),Object(we.a)(U,"".concat(re,"-disabled"),!Q.page),U)),p=function(){Q.onClick(Q.page)},T=function(_){Q.onKeyPress(_,Q.onClick,Q.page)};return x.a.createElement("li",{title:Q.showTitle?Q.page:null,className:S,onClick:p,onKeyPress:T,tabIndex:"0"},Q.itemRender(Q.page,"page",x.a.createElement("a",{rel:"nofollow"},Q.page)))},ce=q,j={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},I=function(d){Object(le.a)(U,d);var Q=Object(L.a)(U);function U(){var re;Object(ge.a)(this,U);for(var S=arguments.length,p=new Array(S),T=0;T<S;T++)p[T]=arguments[T];return re=Q.call.apply(Q,[this].concat(p)),re.state={goInputText:""},re.buildOptionText=function(R){return"".concat(R," ").concat(re.props.locale.items_per_page)},re.changeSize=function(R){re.props.changeSize(Number(R))},re.handleChange=function(R){re.setState({goInputText:R.target.value})},re.handleBlur=function(R){var _=re.props,D=_.goButton,te=_.quickGo,B=_.rootPrefixCls,fe=re.state.goInputText;if(D||fe==="")return;if(R.relatedTarget&&(R.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||R.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;re.setState({goInputText:""}),te(re.getValidValue())},re.go=function(R){var _=re.state.goInputText;if(_==="")return;(R.keyCode===j.ENTER||R.type==="click")&&(re.setState({goInputText:""}),re.props.quickGo(re.getValidValue()))},re}return Object(me.a)(U,[{key:"getValidValue",value:function(){var S=this.state,p=S.goInputText,T=S.current;return!p||isNaN(p)?T:Number(p)}},{key:"getPageSizeOptions",value:function(){var S=this.props,p=S.pageSize,T=S.pageSizeOptions;return T.some(function(R){return R.toString()===p.toString()})?T:T.concat([p.toString()]).sort(function(R,_){var D=isNaN(Number(R))?0:Number(R),te=isNaN(Number(_))?0:Number(_);return D-te})}},{key:"render",value:function(){var S=this,p=this.props,T=p.pageSize,R=p.locale,_=p.rootPrefixCls,D=p.changeSize,te=p.quickGo,B=p.goButton,fe=p.selectComponentClass,y=p.buildOptionText,c=p.selectPrefixCls,A=p.disabled,se=this.state.goInputText,oe="".concat(_,"-options"),Oe=fe,je=null,ue=null,De=null;if(!D&&!te)return null;var be=this.getPageSizeOptions();if(D&&Oe){var xe=be.map(function(K,O){return x.a.createElement(Oe.Option,{key:O,value:K.toString()},(y||S.buildOptionText)(K))});je=x.a.createElement(Oe,{disabled:A,prefixCls:c,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(T||be[0]).toString(),onChange:this.changeSize,getPopupContainer:function(O){return O.parentNode}},xe)}return te&&(B&&(De=typeof B=="boolean"?x.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:A,className:"".concat(oe,"-quick-jumper-button")},R.jump_to_confirm):x.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),ue=x.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},R.jump_to,x.a.createElement("input",{disabled:A,type:"text",value:se,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),R.page,De)),x.a.createElement("li",{className:"".concat(oe)},je,ue)}}]),U}(x.a.Component);I.defaultProps={pageSizeOptions:["10","20","50","100"]};var N=I,M=m("N2Kk");function ee(){}function G(d){return typeof d=="number"&&isFinite(d)&&Math.floor(d)===d}function ae(d,Q,U){return U}function Te(d,Q,U){var re=typeof d=="undefined"?Q.pageSize:d;return Math.floor((U.total-1)/re)+1}var Y=function(d){Object(le.a)(U,d);var Q=Object(L.a)(U);function U(re){var S;Object(ge.a)(this,U),S=Q.call(this,re),S.getJumpPrevPage=function(){return Math.max(1,S.state.current-(S.props.showLessItems?3:5))},S.getJumpNextPage=function(){return Math.min(Te(void 0,S.state,S.props),S.state.current+(S.props.showLessItems?3:5))},S.getItemIcon=function(D,te){var B=S.props.prefixCls,fe=D||x.a.createElement("button",{type:"button","aria-label":te,className:"".concat(B,"-item-link")});return typeof D=="function"&&(fe=x.a.createElement(D,Object(V.a)({},S.props))),fe},S.savePaginationNode=function(D){S.paginationNode=D},S.isValid=function(D){return G(D)&&D!==S.state.current},S.shouldDisplayQuickJumper=function(){var D=S.props,te=D.showQuickJumper,B=D.pageSize,fe=D.total;return fe<=B?!1:te},S.handleKeyDown=function(D){(D.keyCode===j.ARROW_UP||D.keyCode===j.ARROW_DOWN)&&D.preventDefault()},S.handleKeyUp=function(D){var te=S.getValidValue(D),B=S.state.currentInputValue;te!==B&&S.setState({currentInputValue:te}),D.keyCode===j.ENTER?S.handleChange(te):D.keyCode===j.ARROW_UP?S.handleChange(te-1):D.keyCode===j.ARROW_DOWN&&S.handleChange(te+1)},S.changePageSize=function(D){var te=S.state.current,B=Te(D,S.state,S.props);te=te>B?B:te,B===0&&(te=S.state.current),typeof D=="number"&&("pageSize"in S.props||S.setState({pageSize:D}),"current"in S.props||S.setState({current:te,currentInputValue:te})),S.props.onShowSizeChange(te,D),"onChange"in S.props&&S.props.onChange&&S.props.onChange(te,D)},S.handleChange=function(D){var te=S.props.disabled,B=D;if(S.isValid(B)&&!te){var fe=Te(void 0,S.state,S.props);B>fe?B=fe:B<1&&(B=1),"current"in S.props||S.setState({current:B,currentInputValue:B});var y=S.state.pageSize;return S.props.onChange(B,y),B}return S.state.current},S.prev=function(){S.hasPrev()&&S.handleChange(S.state.current-1)},S.next=function(){S.hasNext()&&S.handleChange(S.state.current+1)},S.jumpPrev=function(){S.handleChange(S.getJumpPrevPage())},S.jumpNext=function(){S.handleChange(S.getJumpNextPage())},S.hasPrev=function(){return S.state.current>1},S.hasNext=function(){return S.state.current<Te(void 0,S.state,S.props)},S.runIfEnter=function(D,te){if(D.key==="Enter"||D.charCode===13){for(var B=arguments.length,fe=new Array(B>2?B-2:0),y=2;y<B;y++)fe[y-2]=arguments[y];te.apply(void 0,fe)}},S.runIfEnterPrev=function(D){S.runIfEnter(D,S.prev)},S.runIfEnterNext=function(D){S.runIfEnter(D,S.next)},S.runIfEnterJumpPrev=function(D){S.runIfEnter(D,S.jumpPrev)},S.runIfEnterJumpNext=function(D){S.runIfEnter(D,S.jumpNext)},S.handleGoTO=function(D){(D.keyCode===j.ENTER||D.type==="click")&&S.handleChange(S.state.currentInputValue)};var p=re.onChange!==ee,T="current"in re;T&&!p&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var R=re.defaultCurrent;"current"in re&&(R=re.current);var _=re.defaultPageSize;return"pageSize"in re&&(_=re.pageSize),R=Math.min(R,Te(_,void 0,re)),S.state={current:R,currentInputValue:R,pageSize:_},S}return Object(me.a)(U,[{key:"componentDidUpdate",value:function(S,p){var T=this.props.prefixCls;if(p.current!==this.state.current&&this.paginationNode){var R=this.paginationNode.querySelector(".".concat(T,"-item-").concat(p.current));R&&document.activeElement===R&&R.blur()}}},{key:"getValidValue",value:function(S){var p=S.target.value,T=Te(void 0,this.state,this.props),R=this.state.currentInputValue,_;return p===""?_=p:isNaN(Number(p))?_=R:p>=T?_=T:_=Number(p),_}},{key:"getShowSizeChanger",value:function(){var S=this.props,p=S.showSizeChanger,T=S.total,R=S.totalBoundaryShowSizeChanger;return typeof p!="undefined"?p:T>R}},{key:"renderPrev",value:function(S){var p=this.props,T=p.prevIcon,R=p.itemRender,_=R(S,"prev",this.getItemIcon(T,"prev page")),D=!this.hasPrev();return Object(P.isValidElement)(_)?Object(P.cloneElement)(_,{disabled:D}):_}},{key:"renderNext",value:function(S){var p=this.props,T=p.nextIcon,R=p.itemRender,_=R(S,"next",this.getItemIcon(T,"next page")),D=!this.hasNext();return Object(P.isValidElement)(_)?Object(P.cloneElement)(_,{disabled:D}):_}},{key:"render",value:function(){var S=this,p=this.props,T=p.prefixCls,R=p.className,_=p.style,D=p.disabled,te=p.hideOnSinglePage,B=p.total,fe=p.locale,y=p.showQuickJumper,c=p.showLessItems,A=p.showTitle,se=p.showTotal,oe=p.simple,Oe=p.itemRender,je=p.showPrevNextJumpers,ue=p.jumpPrevIcon,De=p.jumpNextIcon,be=p.selectComponentClass,xe=p.selectPrefixCls,K=p.pageSizeOptions,O=this.state,Re=O.current,Xe=O.pageSize,ut=O.currentInputValue;if(te===!0&&B<=Xe)return null;var Fe=Te(void 0,this.state,this.props),Ie=[],Ee=null,Se=null,Ae=null,Ue=null,Le=null,ye=y&&y.goButton,ve=c?1:2,st=Re-1>0?Re-1:0,Qe=Re+1<Fe?Re+1:Fe,Ge=Object.keys(this.props).reduce(function(f,h){return(h.substr(0,5)==="data-"||h.substr(0,5)==="aria-"||h==="role")&&(f[h]=S.props[h]),f},{});if(oe)return ye&&(typeof ye=="boolean"?Le=x.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fe.jump_to_confirm):Le=x.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ye),Le=x.a.createElement("li",{title:A?"".concat(fe.jump_to).concat(Re,"/").concat(Fe):null,className:"".concat(T,"-simple-pager")},Le)),x.a.createElement("ul",Object(F.a)({className:H()(T,"".concat(T,"-simple"),Object(we.a)({},"".concat(T,"-disabled"),D),R),style:_,ref:this.savePaginationNode},Ge),x.a.createElement("li",{title:A?fe.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:H()("".concat(T,"-prev"),Object(we.a)({},"".concat(T,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(st)),x.a.createElement("li",{title:A?"".concat(Re,"/").concat(Fe):null,className:"".concat(T,"-simple-pager")},x.a.createElement("input",{type:"text",value:ut,disabled:D,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),x.a.createElement("span",{className:"".concat(T,"-slash")},"/"),Fe),x.a.createElement("li",{title:A?fe.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:H()("".concat(T,"-next"),Object(we.a)({},"".concat(T,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Qe)),Le);if(Fe<=3+ve*2){var Ve={locale:fe,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:A,itemRender:Oe};Fe||Ie.push(x.a.createElement(ce,Object(F.a)({},Ve,{key:"noPager",page:Fe,className:"".concat(T,"-disabled")})));for(var ht=1;ht<=Fe;ht+=1){var ct=Re===ht;Ie.push(x.a.createElement(ce,Object(F.a)({},Ve,{key:ht,page:ht,active:ct})))}}else{var nt=c?fe.prev_3:fe.prev_5,de=c?fe.next_3:fe.next_5;je&&(Ee=x.a.createElement("li",{title:A?nt:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:H()("".concat(T,"-jump-prev"),Object(we.a)({},"".concat(T,"-jump-prev-custom-icon"),!!ue))},Oe(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ue,"prev page"))),Se=x.a.createElement("li",{title:A?de:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:H()("".concat(T,"-jump-next"),Object(we.a)({},"".concat(T,"-jump-next-custom-icon"),!!De))},Oe(this.getJumpNextPage(),"jump-next",this.getItemIcon(De,"next page")))),Ue=x.a.createElement(ce,{locale:fe,last:!0,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Fe,page:Fe,active:!1,showTitle:A,itemRender:Oe}),Ae=x.a.createElement(ce,{locale:fe,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:A,itemRender:Oe});var dt=Math.max(1,Re-ve),$e=Math.min(Re+ve,Fe);Re-1<=ve&&($e=1+ve*2),Fe-Re<=ve&&(dt=Fe-ve*2);for(var he=dt;he<=$e;he+=1){var _e=Re===he;Ie.push(x.a.createElement(ce,{locale:fe,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:he,page:he,active:_e,showTitle:A,itemRender:Oe}))}Re-1>=ve*2&&Re!==1+2&&(Ie[0]=Object(P.cloneElement)(Ie[0],{className:"".concat(T,"-item-after-jump-prev")}),Ie.unshift(Ee)),Fe-Re>=ve*2&&Re!==Fe-2&&(Ie[Ie.length-1]=Object(P.cloneElement)(Ie[Ie.length-1],{className:"".concat(T,"-item-before-jump-next")}),Ie.push(Se)),dt!==1&&Ie.unshift(Ae),$e!==Fe&&Ie.push(Ue)}var g=null;se&&(g=x.a.createElement("li",{className:"".concat(T,"-total-text")},se(B,[B===0?0:(Re-1)*Xe+1,Re*Xe>B?B:Re*Xe])));var w=!this.hasPrev()||!Fe,E=!this.hasNext()||!Fe;return x.a.createElement("ul",Object(F.a)({className:H()(T,R,Object(we.a)({},"".concat(T,"-disabled"),D)),style:_,unselectable:"unselectable",ref:this.savePaginationNode},Ge),g,x.a.createElement("li",{title:A?fe.prev_page:null,onClick:this.prev,tabIndex:w?null:0,onKeyPress:this.runIfEnterPrev,className:H()("".concat(T,"-prev"),Object(we.a)({},"".concat(T,"-disabled"),w)),"aria-disabled":w},this.renderPrev(st)),Ie,x.a.createElement("li",{title:A?fe.next_page:null,onClick:this.next,tabIndex:E?null:0,onKeyPress:this.runIfEnterNext,className:H()("".concat(T,"-next"),Object(we.a)({},"".concat(T,"-disabled"),E)),"aria-disabled":E},this.renderNext(Qe)),x.a.createElement(N,{disabled:D,locale:fe,rootPrefixCls:T,selectComponentClass:be,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Re,pageSize:Xe,pageSizeOptions:K,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ye}))}}],[{key:"getDerivedStateFromProps",value:function(S,p){var T={};if("current"in S&&(T.current=S.current,S.current!==p.current&&(T.currentInputValue=T.current)),"pageSize"in S&&S.pageSize!==p.pageSize){var R=p.current,_=Te(S.pageSize,p,S);R=R>_?_:R,"current"in S||(T.current=R,T.currentInputValue=R),T.pageSize=S.pageSize}return T}}]),U}(x.a.Component);Y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:ee,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:ee,locale:M.a,style:{},itemRender:ae,totalBoundaryShowSizeChanger:50};var J=Y},"6K3P":function(mt,Ke,m){mt.exports=m.p+"static/jinshi.9b74f304.svg"},"7ahc":function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return Te});var F=m("k1fw"),we=m("0Owb"),V=m("+L6B"),ge=m("2/Rp"),me=m("y8nQ"),le=m("Vl3Y"),L=m("tJVT"),P=m("OaEy"),x=m("2fM7"),ne=m("cDcd"),H=m.n(ne),q=m("VrN/"),ce=m.n(q),j=m("p77/"),I=m.n(j),N=m("c5Ni"),M=m.n(N),ee=x.a.Option,G={labelCol:{span:4},wrapperCol:{span:20}},ae={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Ke.b=function(Y){var J=Y.callback,d=Y.onCancel,Q=Object(ne.useState)("python"),U=Object(L.a)(Q,2),re=U[0],S=U[1];function p(R){S(ae[R][1])}function T(R){J(R)}return H.a.createElement(le.a,Object(we.a)({},G,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:T}),H.a.createElement(le.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},H.a.createElement(x.a,{onChange:p},Object.keys(ae).map(function(R){return H.a.createElement(ee,{key:R,value:R},ae[R][0])}))),H.a.createElement(le.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},H.a.createElement(Te,{mode:re})),H.a.createElement("div",{className:"flex-container flex-end"},H.a.createElement(ge.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),H.a.createElement(ge.a,{type:"ghost",onClick:d},"\u53D6\u6D88")))};function Te(Y){var J=Y.value,d=Y.onChange,Q=Y.mode,U=Y.options,re=U===void 0?{}:U,S=Object(ne.useRef)(),p=Object(ne.useState)(),T=Object(L.a)(p,2),R=T[0],_=T[1];return Object(ne.useEffect)(function(){if(R){function D(te){var B=te.getValue();d&&d(B)}return R.on("change",D),function(){R.off("change",D)}}},[R,d]),Object(ne.useEffect)(function(){R&&R.setOption("mode",Q)},[R,Q]),Object(ne.useEffect)(function(){R&&((J!==R.getValue()||J==="")&&setTimeout(function(){R.setValue(J||" ")},300))},[R,J]),Object(ne.useEffect)(function(){if(S.current&&!R){var D=ce.a.fromTextArea(S.current,Object(F.a)({mode:Q,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},re));_(D)}},[S.current,R]),H.a.createElement("div",{className:"my-codemirror-container"},H.a.createElement("textarea",{ref:S}))}},"7ixt":function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return V});var F={adjustX:1,adjustY:1},we=[0,0],V={left:{points:["cr","cl"],overflow:F,offset:[-4,0],targetOffset:we},right:{points:["cl","cr"],overflow:F,offset:[4,0],targetOffset:we},top:{points:["bc","tc"],overflow:F,offset:[0,-4],targetOffset:we},bottom:{points:["tc","bc"],overflow:F,offset:[0,4],targetOffset:we},topLeft:{points:["bl","tl"],overflow:F,offset:[0,-4],targetOffset:we},leftTop:{points:["tr","tl"],overflow:F,offset:[-4,0],targetOffset:we},topRight:{points:["br","tr"],overflow:F,offset:[0,-4],targetOffset:we},rightTop:{points:["tl","tr"],overflow:F,offset:[4,0],targetOffset:we},bottomRight:{points:["tr","br"],overflow:F,offset:[0,4],targetOffset:we},rightBottom:{points:["bl","br"],overflow:F,offset:[4,0],targetOffset:we},bottomLeft:{points:["tl","bl"],overflow:F,offset:[0,4],targetOffset:we},leftBottom:{points:["br","bl"],overflow:F,offset:[-4,0],targetOffset:we}},ge=V},"7qnI":function(mt,Ke,m){"use strict";var F=m("5Dmo"),we=m("3S7+"),V=m("fWQN"),ge=m("mtLc"),me=m("yKVA"),le=m("879j"),L=m("5NDa"),P=m("5rEg"),x=m("cDcd"),ne=m.n(x),H=m("O2Wb"),q=m.n(H),ce=P.a.TextArea,j=function(I){Object(me.a)(M,I);var N=Object(le.a)(M);function M(){return Object(V.a)(this,M),N.apply(this,arguments)}return Object(ge.a)(M,[{key:"render",value:function(){var G=this,ae=this.props,Te=ae.index,Y=ae.onAnswerChange,J=ae.addChildAnswer,d=ae.exerciseIsPublish,Q=ae.answers,U=ae.activeOptionErrorIndex,re=ae.flex,S=re===void 0?"0 0 1000px":re;return ne.a.createElement("div",{className:q.a.flex},ne.a.createElement("div",{className:"".concat(q.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Te+1,"):"),ne.a.createElement("div",{className:"".concat(q.a.flex," ").concat(q.a.flex1),style:{flexDirection:"column"}},Q.map(function(p,T){var R="".concat(Te,"-").concat(T);return ne.a.createElement("div",{className:"".concat(q.a.flex," ").concat(q.a.flex1),key:T},ne.a.createElement("div",{className:q.a.flex1,style:{flex:S}},ne.a.createElement("div",null,ne.a.createElement(ce,{className:R===U?q.a.error:"",spellCheck:!1,rows:4,value:p||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(T==0?"":"(\u53EF\u9009)"),onChange:function(D){return Y(Te,T,D.target.value)},style:{minHeight:95}}))),!d&&ne.a.createElement(ne.a.Fragment,null,T!=0&&ne.a.createElement(we.a,{title:"\u5220\u9664"},ne.a.createElement("i",{className:"".concat(q.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return G.props.deleteChildAnswer(Te,T)},style:{float:"right"}})),T===0&&ne.a.createElement(we.a,{title:"\u5220\u9664"},ne.a.createElement("i",{className:"".concat(q.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return G.props.deleteChildAnswermain(Te,T)},style:{float:"right"}})),ne.a.createElement(we.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ne.a.createElement("i",{className:"".concat(q.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return J(Te)},style:{float:"right",visibility:T==Q.length-1?"":"hidden"}}))))})))}}]),M}(x.Component);Ke.a=j},"8EBN":function(mt,Ke,m){(function(F){F(m("VrN/"))})(function(F){"use strict";F.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 we=0;we<F.modeInfo.length;we++){var V=F.modeInfo[we];V.mimes&&(V.mime=V.mimes[0])}F.findModeByMIME=function(ge){ge=ge.toLowerCase();for(var me=0;me<F.modeInfo.length;me++){var le=F.modeInfo[me];if(le.mime==ge)return le;if(le.mimes){for(var L=0;L<le.mimes.length;L++)if(le.mimes[L]==ge)return le}}if(/\+xml$/.test(ge))return F.findModeByMIME("application/xml");if(/\+json$/.test(ge))return F.findModeByMIME("application/json")},F.findModeByExtension=function(ge){ge=ge.toLowerCase();for(var me=0;me<F.modeInfo.length;me++){var le=F.modeInfo[me];if(le.ext){for(var L=0;L<le.ext.length;L++)if(le.ext[L]==ge)return le}}},F.findModeByFileName=function(ge){for(var me=0;me<F.modeInfo.length;me++){var le=F.modeInfo[me];if(le.file&&le.file.test(ge))return le}var L=ge.lastIndexOf("."),P=L>-1&&ge.substring(L+1,ge.length);if(P)return F.findModeByExtension(P)},F.findModeByName=function(ge){ge=ge.toLowerCase();for(var me=0;me<F.modeInfo.length;me++){var le=F.modeInfo[me];if(le.name.toLowerCase()==ge)return le;if(le.alias){for(var L=0;L<le.alias.length;L++)if(le.alias[L].toLowerCase()==ge)return le}}}})},"9Bee":function(mt,Ke,m){"use strict";var F=m("k1fw"),we=m("tJVT"),V=m("cDcd"),ge=m.n(V),me=m("vg9a"),le=m("DlQD"),L=m.n(le),P=m("rUJ1");function x(A,se){var oe=A.match(/^(\s+)(?:```)/);if(oe===null)return se;var Oe=oe[1];return se.split(`
|
|
`).map(function(je){var ue=je.match(/^\s+/);if(ue===null)return je;var De=Object(we.a)(ue,1),be=De[0];return be.length>=Oe.length?je.slice(Oe.length):je}).join(`
|
|
`)}var ne=[],H=["<ul>"],q=new L.a.Renderer,ce=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function j(){ne.length=0,H=["<ul>"]}var I={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function N(A,se,oe,Oe){if(se>=A.length||A[se].level<=oe)return se;var je=A[se];Oe.push("<li><a href='#"+je.anchor+"'>"+je.text+"</a>"),se++;var ue=[];return se=N(A,se,je.level,ue),ue.length>0&&(Oe.push("<ul>"),ue.forEach(function(De){Oe.push(De)}),Oe.push("</ul>")),Oe.push("</li>"),se=N(A,se,oe,Oe),se}function M(){return N(ne,0,0,H),H.push("</ul>"),H.join("")}var ee={heading:function(se){var oe=ce.exec(se);if(oe)return{type:"heading",raw:oe[0],depth:oe[1].length,text:oe[2]}},fences:function(se){var oe=this.rules.block.fences.exec(se);if(oe){var Oe=oe[0],je=x(Oe,oe[3]||""),ue=oe[2]?oe[2].trim():oe[2];if(["latex","katex","math"].indexOf(ue)>=0){var De=Te(),be=je;je=De,Y[De]={type:"block",expression:be}}return{type:"code",raw:Oe,lang:ue,text:je}}}},G=/(?:\${2})([^\n`]+?)(?:\${2})/gi,ae=0,Te=function(){return"__special_katext_id_".concat(ae++,"__")},Y={};function J(){return Y}function d(){ae=0,Y={}}function Q(A){return A=A.replace(G,function(se,oe){var Oe=Te();return Y[Oe]={type:"inline",expression:oe},Oe}),A}var U=q.listitem;q.listitem=function(A){return U(Q(A))};var re=q.paragraph;q.paragraph=function(A){return re(Q(A))};var S=q.tablecell;q.tablecell=function(A,se){return S(Q(A),se)},q.code=function(A,se,oe){var Oe=(se||"").match(/\S*/)[0];return Oe?["latex","katex","math"].indexOf(Oe)>=0?"<p class='editormd-tex'>".concat(A,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(se,'">').concat(oe?A:Object(P.escape)(A,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(oe?A:Object(P.escape)(A,!0))+"</code></pre>"},q.heading=function(A,se,oe){var Oe=this.options.headerPrefix+oe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ne.push({anchor:Oe,level:se,text:A}),"<h"+se+' id="'+Oe+'">'+A+"</h"+se+">"},L.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),L.a.use({tokenizer:ee,renderer:q});var p=L.a,T=m("SJMd"),R=m("ulZh"),_=m.n(R),D=m("m3rI"),te=m("Oy/b"),B=m("p5ED"),fe=/<pre[^>]*>/g;function y(A){var se=document.createElement("div");return se.innerHTML=A,se.childNodes.length===0?"":se.childNodes[0].nodeValue}var c=Ke.a=function(A){var se=A.value,oe=se===void 0?"":se,Oe=A.className,je=A.showTextOnly,ue=A.showLines,De=A.style,be=De===void 0?{}:De,xe=A.stylesPrev,K=xe===void 0?{}:xe,O=String(oe),Re=Object(V.useState)(""),Xe=Object(we.a)(Re,2),ut=Xe[0],Fe=Xe[1],Ie=Object(V.useMemo)(function(){try{var Ue=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Le=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ye=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;O=O.replace(Ue,"("+D.a.API_SERVER+"/api/attachments/").replace(Le,'"'+D.a.API_SERVER+"/api/attachments/").replace(ye,'"'+D.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),O=O.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(Ge){}var ve=p(O),st=J();if(O.match(/\[TOC\]/)&&(ve=ve.replace("<p>[TOC]</p>",M()),j()),ve=ve.replace(/(__special_katext_id_\d+__)/g,function(Ge,Ve){var ht=st[Ve],ct=ht.type,nt=ht.expression;return Object(te.renderToString)(y(nt)||"",{displayMode:ct==="block",throwOnError:!1,output:"html"})}),ve=ve.replace(/▁/g,"\u2581\u2581\u2581"),d(),je){var Qe=document.createElement("div");return Qe.innerHTML=ve,Qe.innerText}return setTimeout(function(){return Ae()},500),ve},[O]),Ee=Object(V.useRef)();I.WebkitLineClamp=ue,ue&&(be=Object(F.a)(Object(F.a)({},be),I));function Se(Ue){var Le=Ue.target;if(Le.tagName.toUpperCase()==="A"){var ye=Le.getAttribute("href");if(ye.indexOf("office")>-1)Ue.preventDefault(),Fe(ye);else if(ye.startsWith("#")){Ue.preventDefault();var ve=document.getElementById(ye.replace("#",""));ve&&ve.scrollIntoView(!0)}}}var Ae=function(){var Le,ye=(Le=Ee.current)===null||Le===void 0?void 0:Le.querySelectorAll("video");ye==null||ye.forEach(function(ve){if(ve.oncontextmenu=function(){return!1},ve.src.indexOf(".m3u8")>-1&&!ve.canPlayType("application/vnd.apple.mpegurl")){if(_.a.isSupported()){var st=new _.a;st.loadSource(ve.src),st.attachMedia(ve)}}})};return Object(V.useEffect)(function(){if(Ee.current&&Ie&&(Ie.match(fe)&&window.PR.prettyPrint()),Ee.current)return Ee.current.addEventListener("click",Se),function(){Ee.current.removeEventListener("click",Se),d(),j()}},[Ie,Ee.current,Se]),ge.a.createElement(ge.a.Fragment,null,ge.a.createElement("div",{ref:Ee,style:Object(F.a)({},be),className:"".concat(Oe||""," markdown-body "),dangerouslySetInnerHTML:{__html:Ie}}),ge.a.createElement(B.a,{close:!0,data:ut,type:ut!=null&&ut.length?"office":"",style:Object(F.a)({},K),onClose:function(){return Fe("")}}))}},"9VGf":function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return V});var F=m("cDcd"),we=m.n(F);function V(ge,me){var le=Object(F.useRef)();Object(F.useEffect)(function(){le.current=ge}),Object(F.useEffect)(function(){function L(){le.current()}if(me!==null){var P=setInterval(L,me);return function(){return clearInterval(P)}}},[me])}},Bd2K:function(mt,Ke,m){(function(F){F(m("VrN/"),m("osHv"))})(function(F){F.defineOption("autoCloseTags",!1,function(x,ne,H){if(H!=F.Init&&H&&x.removeKeyMap("autoCloseTags"),!ne)return;var q={name:"autoCloseTags"};(typeof ne!="object"||ne.whenClosing!==!1)&&(q["'/'"]=function(ce){return le(ce)}),(typeof ne!="object"||ne.whenOpening!==!1)&&(q["'>'"]=function(ce){return ge(ce)}),x.addKeyMap(q)});var we=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],V=["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 ge(x){if(x.getOption("disableInput"))return F.Pass;for(var ne=x.listSelections(),H=[],q=x.getOption("autoCloseTags"),ce=0;ce<ne.length;ce++){if(!ne[ce].empty())return F.Pass;var j=ne[ce].head,I=x.getTokenAt(j),N=F.innerMode(x.getMode(),I.state),M=N.state,ee=N.mode.xmlCurrentTag&&N.mode.xmlCurrentTag(M),G=ee&&ee.name;if(!G)return F.Pass;var ae=N.mode.configuration=="html",Te=typeof q=="object"&&q.dontCloseTags||ae&&we,Y=typeof q=="object"&&q.indentTags||ae&&V;I.end>j.ch&&(G=G.slice(0,G.length-I.end+j.ch));var J=G.toLowerCase();if(!G||I.type=="string"&&(I.end!=j.ch||!/[\"\']/.test(I.string.charAt(I.string.length-1))||I.string.length==1)||I.type=="tag"&&ee.close||I.string.indexOf("/")==j.ch-I.start-1||Te&&L(Te,J)>-1||P(x,N.mode.xmlCurrentContext&&N.mode.xmlCurrentContext(M)||[],G,j,!0))return F.Pass;var d=typeof q=="object"&&q.emptyTags;if(d&&L(d,G)>-1){H[ce]={text:"/>",newPos:F.Pos(j.line,j.ch+2)};continue}var Q=Y&&L(Y,J)>-1;H[ce]={indent:Q,text:">"+(Q?`
|
|
|
|
`:"")+"</"+G+">",newPos:Q?F.Pos(j.line+1,0):F.Pos(j.line,j.ch+1)}}for(var U=typeof q=="object"&&q.dontIndentOnAutoClose,ce=ne.length-1;ce>=0;ce--){var re=H[ce];x.replaceRange(re.text,ne[ce].head,ne[ce].anchor,"+insert");var S=x.listSelections().slice(0);S[ce]={head:re.newPos,anchor:re.newPos},x.setSelections(S),!U&&re.indent&&(x.indentLine(re.newPos.line,null,!0),x.indentLine(re.newPos.line+1,null,!0))}}function me(x,ne){for(var H=x.listSelections(),q=[],ce=ne?"/":"</",j=x.getOption("autoCloseTags"),I=typeof j=="object"&&j.dontIndentOnSlash,N=0;N<H.length;N++){if(!H[N].empty())return F.Pass;var M=H[N].head,ee=x.getTokenAt(M),G=F.innerMode(x.getMode(),ee.state),ae=G.state;if(ne&&(ee.type=="string"||ee.string.charAt(0)!="<"||ee.start!=M.ch-1))return F.Pass;var Te,Y=G.mode.name!="xml"&&x.getMode().name=="htmlmixed";if(Y&&G.mode.name=="javascript")Te=ce+"script";else if(Y&&G.mode.name=="css")Te=ce+"style";else{var J=G.mode.xmlCurrentContext&&G.mode.xmlCurrentContext(ae);if(!J||J.length&&P(x,J,J[J.length-1],M))return F.Pass;Te=ce+J[J.length-1]}x.getLine(M.line).charAt(ee.end)!=">"&&(Te+=">"),q[N]=Te}if(x.replaceSelections(q),H=x.listSelections(),!I)for(var N=0;N<H.length;N++)(N==H.length-1||H[N].head.line<H[N+1].head.line)&&x.indentLine(H[N].head.line)}function le(x){return x.getOption("disableInput")?F.Pass:me(x,!0)}F.commands.closeTag=function(x){return me(x)};function L(x,ne){if(x.indexOf)return x.indexOf(ne);for(var H=0,q=x.length;H<q;++H)if(x[H]==ne)return H;return-1}function P(x,ne,H,q,ce){if(!F.scanForClosingTag)return!1;var j=Math.min(x.lastLine()+1,q.line+500),I=F.scanForClosingTag(x,q,null,j);if(!I||I.tag!=H)return!1;for(var N=ce?1:0,M=ne.length-1;M>=0&&ne[M]==H;M--)++N;q=I.to;for(var M=1;M<N;M++){var ee=F.scanForClosingTag(x,q,null,j);if(!ee||ee.tag!=H)return!1;q=ee.to}return!0}})},BjJ7:function(mt,Ke,m){"use strict";m.d(Ke,"d",function(){return we}),m.d(Ke,"c",function(){return V}),m.d(Ke,"e",function(){return ge}),m.d(Ke,"b",function(){return me}),m.d(Ke,"a",function(){return L});var F=m("m3rI");function we(P){var x=!0;if(P.length>0){for(var ne=0;ne<P.length;ne++)if(P[ne].compile_success==0||!P[ne].compile_success){x=!1;break}}else x=!1;return x}function V(P){for(var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ne=[],H=0;H<P.length;H++){var q=P[H],ce=x?"".concat(x,"/").concat(q.name):"".concat(q.name);ne.push({title:q.name,isLeaf:!(q.type==="tree"),key:ce})}return ne}function ge(P,x,ne){for(var H=0;H<P.length;H++){var q=P[H];if(q.key===x){q.children=ne;break}q.children&&ge(q.children,x,ne)}return P}function me(P,x,ne){var H;return function(){var q=this,ce=arguments,j=function(){H=null,ne||P.apply(q,ce)},I=ne&&!H;clearTimeout(H),H=setTimeout(j,x),I&&P.apply(q,ce)}}var le=!0,L=F.a.API_SERVER},"C+DQ":function(mt,Ke,m){},DlQD:function(mt,Ke,m){(function(F,we){mt.exports=we()})(this,function(){"use strict";function F(g,w){for(var E=0;E<w.length;E++){var f=w[E];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(g,f.key,f)}}function we(g,w,E){return w&&F(g.prototype,w),E&&F(g,E),g}function V(g,w){if(!g)return;if(typeof g=="string")return ge(g,w);var E=Object.prototype.toString.call(g).slice(8,-1);if(E==="Object"&&g.constructor&&(E=g.constructor.name),E==="Map"||E==="Set")return Array.from(g);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return ge(g,w)}function ge(g,w){(w==null||w>g.length)&&(w=g.length);for(var E=0,f=new Array(w);E<w;E++)f[E]=g[E];return f}function me(g,w){var E;if(typeof Symbol=="undefined"||g[Symbol.iterator]==null){if(Array.isArray(g)||(E=V(g))||w&&g&&typeof g.length=="number"){E&&(g=E);var f=0;return function(){return f>=g.length?{done:!0}:{done:!1,value:g[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 E=g[Symbol.iterator](),E.next.bind(E)}function le(g,w){return w={exports:{}},g(w,w.exports),w.exports}var L=le(function(g){function w(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function E(f){g.exports.defaults=f}g.exports={defaults:w(),getDefaults:w,changeDefaults:E}}),P=L.defaults,x=L.getDefaults,ne=L.changeDefaults,H=/[&<>"']/,q=/[&<>"']/g,ce=/[<>"']|&(?!#?\w+;)/,j=/[<>"']|&(?!#?\w+;)/g,I={"&":"&","<":"<",">":">",'"':""","'":"'"},N=function(w){return I[w]};function M(g,w){if(w){if(H.test(g))return g.replace(q,N)}else if(ce.test(g))return g.replace(j,N);return g}var ee=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function G(g){return g.replace(ee,function(w,E){return E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""})}var ae=/(^|[^\[])\^/g;function Te(g,w){g=g.source||g,w=w||"";var E={replace:function(h,v){return v=v.source||v,v=v.replace(ae,"$1"),g=g.replace(h,v),E},getRegex:function(){return new RegExp(g,w)}};return E}var Y=/[^\w:]/g,J=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(g,w,E){if(g){var f;try{f=decodeURIComponent(G(E)).replace(Y,"").toLowerCase()}catch(h){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}w&&!J.test(E)&&(E=p(w,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(h){return null}return E}var Q={},U=/^[^:]+:\/*[^/]*$/,re=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function p(g,w){Q[" "+g]||(U.test(g)?Q[" "+g]=g+"/":Q[" "+g]=D(g,"/",!0)),g=Q[" "+g];var E=g.indexOf(":")===-1;return w.substring(0,2)==="//"?E?w:g.replace(re,"$1")+w:w.charAt(0)==="/"?E?w:g.replace(S,"$1")+w:g+w}var T={exec:function(){}};function R(g){for(var w=1,E,f;w<arguments.length;w++){E=arguments[w];for(f in E)Object.prototype.hasOwnProperty.call(E,f)&&(g[f]=E[f])}return g}function _(g,w){var E=g.replace(/\|/g,function(v,b,W){for(var Z=!1,ie=b;--ie>=0&&W[ie]==="\\";)Z=!Z;return Z?"|":" |"}),f=E.split(/ \|/),h=0;if(f.length>w)f.splice(w);else for(;f.length<w;)f.push("");for(;h<f.length;h++)f[h]=f[h].trim().replace(/\\\|/g,"|");return f}function D(g,w,E){var f=g.length;if(f===0)return"";for(var h=0;h<f;){var v=g.charAt(f-h-1);if(v===w&&!E)h++;else if(v!==w&&E)h++;else break}return g.substr(0,f-h)}function te(g,w){if(g.indexOf(w[1])===-1)return-1;for(var E=g.length,f=0,h=0;h<E;h++)if(g[h]==="\\")h++;else if(g[h]===w[0])f++;else if(g[h]===w[1]&&(f--,f<0))return h;return-1}function B(g){g&&g.sanitize&&!g.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 fe={escape:M,unescape:G,edit:Te,cleanUrl:d,resolveUrl:p,noopTest:T,merge:R,splitCells:_,rtrim:D,findClosingBracket:te,checkSanitizeDeprecation:B},y=L.defaults,c=fe.rtrim,A=fe.splitCells,se=fe.escape,oe=fe.findClosingBracket;function Oe(g,w,E){var f=w.href,h=w.title?se(w.title):null,v=g[1].replace(/\\([\[\]])/g,"$1");return g[0].charAt(0)!=="!"?{type:"link",raw:E,href:f,title:h,text:v}:{type:"image",raw:E,href:f,title:h,text:se(v)}}function je(g,w){var E=g.match(/^(\s+)(?:```)/);if(E===null)return w;var f=E[1];return w.split(`
|
|
`).map(function(h){var v=h.match(/^\s+/);if(v===null)return h;var b=v[0];return b.length>=f.length?h.slice(f.length):h}).join(`
|
|
`)}var ue=function(){function g(E){this.options=E||y}var w=g.prototype;return w.space=function(f){var h=this.rules.block.newline.exec(f);if(h)return h[0].length>1?{type:"space",raw:h[0]}:{raw:`
|
|
`}},w.code=function(f,h){var v=this.rules.block.code.exec(f);if(v){var b=h[h.length-1];if(b&&b.type==="paragraph")return{raw:v[0],text:v[0].trimRight()};var W=v[0].replace(/^ {4}/gm,"");return{type:"code",raw:v[0],codeBlockStyle:"indented",text:this.options.pedantic?W:c(W,`
|
|
`)}}},w.fences=function(f){var h=this.rules.block.fences.exec(f);if(h){var v=h[0],b=je(v,h[3]||"");return{type:"code",raw:v,lang:h[2]?h[2].trim():h[2],text:b}}},w.heading=function(f){var h=this.rules.block.heading.exec(f);if(h)return{type:"heading",raw:h[0],depth:h[1].length,text:h[2]}},w.nptable=function(f){var h=this.rules.block.nptable.exec(f);if(h){var v={type:"table",header:A(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[],raw:h[0]};if(v.header.length===v.align.length){var b=v.align.length,W;for(W=0;W<b;W++)/^ *-+: *$/.test(v.align[W])?v.align[W]="right":/^ *:-+: *$/.test(v.align[W])?v.align[W]="center":/^ *:-+ *$/.test(v.align[W])?v.align[W]="left":v.align[W]=null;for(b=v.cells.length,W=0;W<b;W++)v.cells[W]=A(v.cells[W],v.header.length);return v}}},w.hr=function(f){var h=this.rules.block.hr.exec(f);if(h)return{type:"hr",raw:h[0]}},w.blockquote=function(f){var h=this.rules.block.blockquote.exec(f);if(h){var v=h[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:h[0],text:v}}},w.list=function(f){var h=this.rules.block.list.exec(f);if(h){for(var v=h[0],b=h[2],W=b.length>1,Z=b[b.length-1]===")",ie={type:"list",raw:v,ordered:W,start:W?+b.slice(0,-1):"",loose:!1,items:[]},Je=h[0].match(this.rules.block.item),ft=!1,Be,St,kt,qe,Lt,yt,Ut,Rt=Je.length,ot=0;ot<Rt;ot++)Be=Je[ot],v=Be,St=Be.length,Be=Be.replace(/^ *([*+-]|\d+[.)]) */,""),~Be.indexOf(`
|
|
`)&&(St-=Be.length,Be=this.options.pedantic?Be.replace(/^ {1,4}/gm,""):Be.replace(new RegExp("^ {1,"+St+"}","gm"),"")),ot!==Rt-1&&(kt=this.rules.block.bullet.exec(Je[ot+1])[0],(W?kt.length===1||!Z&&kt[kt.length-1]===")":kt.length>1||this.options.smartLists&&kt!==b)&&(qe=Je.slice(ot+1).join(`
|
|
`),ie.raw=ie.raw.substring(0,ie.raw.length-qe.length),ot=Rt-1)),Lt=ft||/\n\n(?!\s*$)/.test(Be),ot!==Rt-1&&(ft=Be.charAt(Be.length-1)===`
|
|
`,Lt||(Lt=ft)),Lt&&(ie.loose=!0),yt=/^\[[ xX]\] /.test(Be),Ut=void 0,yt&&(Ut=Be[1]!==" ",Be=Be.replace(/^\[[ xX]\] +/,"")),ie.items.push({type:"list_item",raw:v,task:yt,checked:Ut,loose:Lt,text:Be});return ie}},w.html=function(f){var h=this.rules.block.html.exec(f);if(h)return{type:this.options.sanitize?"paragraph":"html",raw:h[0],pre:!this.options.sanitizer&&(h[1]==="pre"||h[1]==="script"||h[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(h[0]):se(h[0]):h[0]}},w.def=function(f){var h=this.rules.block.def.exec(f);if(h){h[3]&&(h[3]=h[3].substring(1,h[3].length-1));var v=h[1].toLowerCase().replace(/\s+/g," ");return{tag:v,raw:h[0],href:h[2],title:h[3]}}},w.table=function(f){var h=this.rules.block.table.exec(f);if(h){var v={type:"table",header:A(h[1].replace(/^ *| *\| *$/g,"")),align:h[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:h[3]?h[3].replace(/\n$/,"").split(`
|
|
`):[]};if(v.header.length===v.align.length){v.raw=h[0];var b=v.align.length,W;for(W=0;W<b;W++)/^ *-+: *$/.test(v.align[W])?v.align[W]="right":/^ *:-+: *$/.test(v.align[W])?v.align[W]="center":/^ *:-+ *$/.test(v.align[W])?v.align[W]="left":v.align[W]=null;for(b=v.cells.length,W=0;W<b;W++)v.cells[W]=A(v.cells[W].replace(/^ *\| *| *\| *$/g,""),v.header.length);return v}}},w.lheading=function(f){var h=this.rules.block.lheading.exec(f);if(h)return{type:"heading",raw:h[0],depth:h[2].charAt(0)==="="?1:2,text:h[1]}},w.paragraph=function(f){var h=this.rules.block.paragraph.exec(f);if(h)return{type:"paragraph",raw:h[0],text:h[1].charAt(h[1].length-1)===`
|
|
`?h[1].slice(0,-1):h[1]}},w.text=function(f,h){var v=this.rules.block.text.exec(f);if(v){var b=h[h.length-1];return b&&b.type==="text"?{raw:v[0],text:v[0]}:{type:"text",raw:v[0],text:v[0]}}},w.escape=function(f){var h=this.rules.inline.escape.exec(f);if(h)return{type:"escape",raw:h[0],text:se(h[1])}},w.tag=function(f,h,v){var b=this.rules.inline.tag.exec(f);if(b)return!h&&/^<a /i.test(b[0])?h=!0:h&&/^<\/a>/i.test(b[0])&&(h=!1),!v&&/^<(pre|code|kbd|script)(\s|>)/i.test(b[0])?v=!0:v&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(b[0])&&(v=!1),{type:this.options.sanitize?"text":"html",raw:b[0],inLink:h,inRawBlock:v,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):se(b[0]):b[0]}},w.link=function(f){var h=this.rules.inline.link.exec(f);if(h){var v=oe(h[2],"()");if(v>-1){var b=h[0].indexOf("!")===0?5:4,W=b+h[1].length+v;h[2]=h[2].substring(0,v),h[0]=h[0].substring(0,W).trim(),h[3]=""}var Z=h[2],ie="";if(this.options.pedantic){var Je=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Z);Je?(Z=Je[1],ie=Je[3]):ie=""}else ie=h[3]?h[3].slice(1,-1):"";Z=Z.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=Oe(h,{href:Z&&Z.replace(this.rules.inline._escapes,"$1"),title:ie&&ie.replace(this.rules.inline._escapes,"$1")},h[0]);return ft}},w.reflink=function(f,h){var v;if((v=this.rules.inline.reflink.exec(f))||(v=this.rules.inline.nolink.exec(f))){var b=(v[2]||v[1]).replace(/\s+/g," ");if(b=h[b.toLowerCase()],!b||!b.href){var W=v[0].charAt(0);return{type:"text",raw:W,text:W}}var Z=Oe(v,b,v[0]);return Z}},w.strong=function(f,h,v){v===void 0&&(v="");var b=this.rules.inline.strong.start.exec(f);if(b&&(!b[1]||b[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){h=h.slice(-1*f.length);var W=b[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;W.lastIndex=0;for(var Z;(b=W.exec(h))!=null;)if(Z=this.rules.inline.strong.middle.exec(h.slice(0,b.index+3)),Z)return{type:"strong",raw:f.slice(0,Z[0].length),text:f.slice(2,Z[0].length-2)}}},w.em=function(f,h,v){v===void 0&&(v="");var b=this.rules.inline.em.start.exec(f);if(b&&(!b[1]||b[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){h=h.slice(-1*f.length);var W=b[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;W.lastIndex=0;for(var Z;(b=W.exec(h))!=null;)if(Z=this.rules.inline.em.middle.exec(h.slice(0,b.index+2)),Z)return{type:"em",raw:f.slice(0,Z[0].length),text:f.slice(1,Z[0].length-1)}}},w.codespan=function(f){var h=this.rules.inline.code.exec(f);if(h){var v=h[2].replace(/\n/g," "),b=/[^ ]/.test(v),W=v.startsWith(" ")&&v.endsWith(" ");return b&&W&&(v=v.substring(1,v.length-1)),v=se(v,!0),{type:"codespan",raw:h[0],text:v}}},w.br=function(f){var h=this.rules.inline.br.exec(f);if(h)return{type:"br",raw:h[0]}},w.del=function(f){var h=this.rules.inline.del.exec(f);if(h)return{type:"del",raw:h[0],text:h[1]}},w.autolink=function(f,h){var v=this.rules.inline.autolink.exec(f);if(v){var b,W;return v[2]==="@"?(b=se(this.options.mangle?h(v[1]):v[1]),W="mailto:"+b):(b=se(v[1]),W=b),{type:"link",raw:v[0],text:b,href:W,tokens:[{type:"text",raw:b,text:b}]}}},w.url=function(f,h){var v;if(v=this.rules.inline.url.exec(f)){var b,W;if(v[2]==="@")b=se(this.options.mangle?h(v[0]):v[0]),W="mailto:"+b;else{var Z;do Z=v[0],v[0]=this.rules.inline._backpedal.exec(v[0])[0];while(Z!==v[0]);b=se(v[0]),v[1]==="www."?W="http://"+b:W=b}return{type:"link",raw:v[0],text:b,href:W,tokens:[{type:"text",raw:b,text:b}]}}},w.inlineText=function(f,h,v){var b=this.rules.inline.text.exec(f);if(b){var W;return h?W=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):se(b[0]):b[0]:W=se(this.options.smartypants?v(b[0]):b[0]),{type:"text",raw:b[0],text:W}}},g}(),De=fe.noopTest,be=fe.edit,xe=fe.merge,K={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:De,table:De,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};K._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,K._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,K.def=be(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,K.item=be(K.item,"gm").replace(/bull/g,K.bullet).getRegex(),K.list=be(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._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",K._comment=/<!--(?!-?>)[\s\S]*?-->/,K.html=be(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=be(K._paragraph).replace("hr",K.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",K._tag).getRegex(),K.blockquote=be(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=xe({},K),K.gfm=xe({},K.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*|$)"}),K.gfm.nptable=be(K.gfm.nptable).replace("hr",K.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",K._tag).getRegex(),K.gfm.table=be(K.gfm.table).replace("hr",K.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",K._tag).getRegex(),K.pedantic=xe({},K.normal,{html:be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K._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:De,paragraph:be(K.normal._paragraph).replace("hr",K.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var O={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:De,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:De,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};O._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",O.punctuation=be(O.punctuation).replace(/punctuation/g,O._punctuation).getRegex(),O._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",O._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",O.em.start=be(O.em.start).replace(/punctuation/g,O._punctuation).getRegex(),O.em.middle=be(O.em.middle).replace(/punctuation/g,O._punctuation).replace(/overlapSkip/g,O._overlapSkip).getRegex(),O.em.endAst=be(O.em.endAst,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.em.endUnd=be(O.em.endUnd,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.strong.start=be(O.strong.start).replace(/punctuation/g,O._punctuation).getRegex(),O.strong.middle=be(O.strong.middle).replace(/punctuation/g,O._punctuation).replace(/blockSkip/g,O._blockSkip).getRegex(),O.strong.endAst=be(O.strong.endAst,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.strong.endUnd=be(O.strong.endUnd,"g").replace(/punctuation/g,O._punctuation).getRegex(),O.blockSkip=be(O._blockSkip,"g").getRegex(),O.overlapSkip=be(O._overlapSkip,"g").getRegex(),O._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,O._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,O._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])?)+(?![-_])/,O.autolink=be(O.autolink).replace("scheme",O._scheme).replace("email",O._email).getRegex(),O._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,O.tag=be(O.tag).replace("comment",K._comment).replace("attribute",O._attribute).getRegex(),O._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,O._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,O._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,O.link=be(O.link).replace("label",O._label).replace("href",O._href).replace("title",O._title).getRegex(),O.reflink=be(O.reflink).replace("label",O._label).getRegex(),O.reflinkSearch=be(O.reflinkSearch,"g").replace("reflink",O.reflink).replace("nolink",O.nolink).getRegex(),O.normal=xe({},O),O.pedantic=xe({},O.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:be(/^!?\[(label)\]\((.*?)\)/).replace("label",O._label).getRegex(),reflink:be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O._label).getRegex()}),O.gfm=xe({},O.normal,{escape:be(O.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),O.gfm.url=be(O.gfm.url,"i").replace("email",O.gfm._extended_email).getRegex(),O.breaks=xe({},O.gfm,{br:be(O.br).replace("{2,}","*").getRegex(),text:be(O.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Re={block:K,inline:O},Xe=L.defaults,ut=Re.block,Fe=Re.inline;function Ie(g){return g.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 Ee(g){var w="",E,f,h=g.length;for(E=0;E<h;E++)f=g.charCodeAt(E),Math.random()>.5&&(f="x"+f.toString(16)),w+="&#"+f+";";return w}var Se=function(){function g(E){this.tokens=[],this.tokens.links=Object.create(null),this.options=E||Xe,this.options.tokenizer=this.options.tokenizer||new ue,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:ut.normal,inline:Fe.normal};this.options.pedantic?(f.block=ut.pedantic,f.inline=Fe.pedantic):this.options.gfm&&(f.block=ut.gfm,this.options.breaks?f.inline=Fe.breaks:f.inline=Fe.gfm),this.tokenizer.rules=f}g.lex=function(f,h){var v=new g(h);return v.lex(f)};var w=g.prototype;return w.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},w.blockTokens=function(f,h,v){h===void 0&&(h=[]),v===void 0&&(v=!0),f=f.replace(/^ +$/gm,"");for(var b,W,Z,ie;f;){if(b=this.tokenizer.space(f)){f=f.substring(b.raw.length),b.type&&h.push(b);continue}if(b=this.tokenizer.code(f,h)){f=f.substring(b.raw.length),b.type?h.push(b):(ie=h[h.length-1],ie.raw+=`
|
|
`+b.raw,ie.text+=`
|
|
`+b.text);continue}if(b=this.tokenizer.fences(f)){f=f.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.heading(f)){f=f.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.nptable(f)){f=f.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.hr(f)){f=f.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.blockquote(f)){f=f.substring(b.raw.length),b.tokens=this.blockTokens(b.text,[],v),h.push(b);continue}if(b=this.tokenizer.list(f)){for(f=f.substring(b.raw.length),Z=b.items.length,W=0;W<Z;W++)b.items[W].tokens=this.blockTokens(b.items[W].text,[],!1);h.push(b);continue}if(b=this.tokenizer.html(f)){f=f.substring(b.raw.length),h.push(b);continue}if(v&&(b=this.tokenizer.def(f))){f=f.substring(b.raw.length),this.tokens.links[b.tag]||(this.tokens.links[b.tag]={href:b.href,title:b.title});continue}if(b=this.tokenizer.table(f)){f=f.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.lheading(f)){f=f.substring(b.raw.length),h.push(b);continue}if(v&&(b=this.tokenizer.paragraph(f))){f=f.substring(b.raw.length),h.push(b);continue}if(b=this.tokenizer.text(f,h)){f=f.substring(b.raw.length),b.type?h.push(b):(ie=h[h.length-1],ie.raw+=`
|
|
`+b.raw,ie.text+=`
|
|
`+b.text);continue}if(f){var Je="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Je);break}else throw new Error(Je)}}return h},w.inline=function(f){var h,v,b,W,Z,ie,Je=f.length;for(h=0;h<Je;h++){ie=f[h];switch(ie.type){case"paragraph":case"text":case"heading":{ie.tokens=[],this.inlineTokens(ie.text,ie.tokens);break}case"table":{for(ie.tokens={header:[],cells:[]},W=ie.header.length,v=0;v<W;v++)ie.tokens.header[v]=[],this.inlineTokens(ie.header[v],ie.tokens.header[v]);for(W=ie.cells.length,v=0;v<W;v++)for(Z=ie.cells[v],ie.tokens.cells[v]=[],b=0;b<Z.length;b++)ie.tokens.cells[v][b]=[],this.inlineTokens(Z[b],ie.tokens.cells[v][b]);break}case"blockquote":{this.inline(ie.tokens);break}case"list":{for(W=ie.items.length,v=0;v<W;v++)this.inline(ie.items[v].tokens);break}}}return f},w.inlineTokens=function(f,h,v,b,W){h===void 0&&(h=[]),v===void 0&&(v=!1),b===void 0&&(b=!1),W===void 0&&(W="");var Z,ie=f,Je;if(this.tokens.links){var ft=Object.keys(this.tokens.links);if(ft.length>0)for(;(Je=this.tokenizer.rules.inline.reflinkSearch.exec(ie))!=null;)ft.includes(Je[0].slice(Je[0].lastIndexOf("[")+1,-1))&&(ie=ie.slice(0,Je.index)+"["+"a".repeat(Je[0].length-2)+"]"+ie.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Je=this.tokenizer.rules.inline.blockSkip.exec(ie))!=null;)ie=ie.slice(0,Je.index)+"["+"a".repeat(Je[0].length-2)+"]"+ie.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(Z=this.tokenizer.escape(f)){f=f.substring(Z.raw.length),h.push(Z);continue}if(Z=this.tokenizer.tag(f,v,b)){f=f.substring(Z.raw.length),v=Z.inLink,b=Z.inRawBlock,h.push(Z);continue}if(Z=this.tokenizer.link(f)){f=f.substring(Z.raw.length),Z.type==="link"&&(Z.tokens=this.inlineTokens(Z.text,[],!0,b)),h.push(Z);continue}if(Z=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(Z.raw.length),Z.type==="link"&&(Z.tokens=this.inlineTokens(Z.text,[],!0,b)),h.push(Z);continue}if(Z=this.tokenizer.strong(f,ie,W)){f=f.substring(Z.raw.length),Z.tokens=this.inlineTokens(Z.text,[],v,b),h.push(Z);continue}if(Z=this.tokenizer.em(f,ie,W)){f=f.substring(Z.raw.length),Z.tokens=this.inlineTokens(Z.text,[],v,b),h.push(Z);continue}if(Z=this.tokenizer.codespan(f)){f=f.substring(Z.raw.length),h.push(Z);continue}if(Z=this.tokenizer.br(f)){f=f.substring(Z.raw.length),h.push(Z);continue}if(Z=this.tokenizer.del(f)){f=f.substring(Z.raw.length),Z.tokens=this.inlineTokens(Z.text,[],v,b),h.push(Z);continue}if(Z=this.tokenizer.autolink(f,Ee)){f=f.substring(Z.raw.length),h.push(Z);continue}if(!v&&(Z=this.tokenizer.url(f,Ee))){f=f.substring(Z.raw.length),h.push(Z);continue}if(Z=this.tokenizer.inlineText(f,b,Ie)){f=f.substring(Z.raw.length),W=Z.raw.slice(-1),h.push(Z);continue}if(f){var Be="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Be);break}else throw new Error(Be)}}return h},we(g,null,[{key:"rules",get:function(){return{block:ut,inline:Fe}}}]),g}(),Ae=L.defaults,Ue=fe.cleanUrl,Le=fe.escape,ye=function(){function g(E){this.options=E||Ae}var w=g.prototype;return w.code=function(f,h,v){var b=(h||"").match(/\S*/)[0];if(this.options.highlight){var W=this.options.highlight(f,b);W!=null&&W!==f&&(v=!0,f=W)}return b?'<pre><code class="'+this.options.langPrefix+Le(b,!0)+'">'+(v?f:Le(f,!0))+`</code></pre>
|
|
`:"<pre><code>"+(v?f:Le(f,!0))+`</code></pre>
|
|
`},w.blockquote=function(f){return`<blockquote>
|
|
`+f+`</blockquote>
|
|
`},w.html=function(f){return f},w.heading=function(f,h,v,b){return this.options.headerIds?"<h"+h+' id="'+this.options.headerPrefix+b.slug(v)+'">'+f+"</h"+h+`>
|
|
`:"<h"+h+">"+f+"</h"+h+`>
|
|
`},w.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},w.list=function(f,h,v){var b=h?"ol":"ul",W=h&&v!==1?' start="'+v+'"':"";return"<"+b+W+`>
|
|
`+f+"</"+b+`>
|
|
`},w.listitem=function(f){return"<li>"+f+`</li>
|
|
`},w.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},w.paragraph=function(f){return"<p>"+f+`</p>
|
|
`},w.table=function(f,h){return h&&(h="<tbody>"+h+"</tbody>"),`<table>
|
|
<thead>
|
|
`+f+`</thead>
|
|
`+h+`</table>
|
|
`},w.tablerow=function(f){return`<tr>
|
|
`+f+`</tr>
|
|
`},w.tablecell=function(f,h){var v=h.header?"th":"td",b=h.align?"<"+v+' align="'+h.align+'">':"<"+v+">";return b+f+"</"+v+`>
|
|
`},w.strong=function(f){return"<strong>"+f+"</strong>"},w.em=function(f){return"<em>"+f+"</em>"},w.codespan=function(f){return"<code>"+f+"</code>"},w.br=function(){return this.options.xhtml?"<br/>":"<br>"},w.del=function(f){return"<del>"+f+"</del>"},w.link=function(f,h,v){if(f=Ue(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var b='<a href="'+Le(f)+'"';return h&&(b+=' title="'+h+'"'),b+=">"+v+"</a>",b},w.image=function(f,h,v){if(f=Ue(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var b='<img src="'+f+'" alt="'+v+'"';return h&&(b+=' title="'+h+'"'),b+=this.options.xhtml?"/>":">",b},w.text=function(f){return f},g}(),ve=function(){function g(){}var w=g.prototype;return w.strong=function(f){return f},w.em=function(f){return f},w.codespan=function(f){return f},w.del=function(f){return f},w.html=function(f){return f},w.text=function(f){return f},w.link=function(f,h,v){return""+v},w.image=function(f,h,v){return""+v},w.br=function(){return""},g}(),st=function(){function g(){this.seen={}}var w=g.prototype;return w.slug=function(f){var h=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(h)){var v=h;do this.seen[v]++,h=v+"-"+this.seen[v];while(this.seen.hasOwnProperty(h))}return this.seen[h]=0,h},g}(),Qe=L.defaults,Ge=fe.unescape,Ve=function(){function g(E){this.options=E||Qe,this.options.renderer=this.options.renderer||new ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ve,this.slugger=new st}g.parse=function(f,h){var v=new g(h);return v.parse(f)};var w=g.prototype;return w.parse=function(f,h){h===void 0&&(h=!0);var v="",b,W,Z,ie,Je,ft,Be,St,kt,qe,Lt,yt,Ut,Rt,ot,Mt,Tt,pt,rt=f.length;for(b=0;b<rt;b++){qe=f[b];switch(qe.type){case"space":continue;case"hr":{v+=this.renderer.hr();continue}case"heading":{v+=this.renderer.heading(this.parseInline(qe.tokens),qe.depth,Ge(this.parseInline(qe.tokens,this.textRenderer)),this.slugger);continue}case"code":{v+=this.renderer.code(qe.text,qe.lang,qe.escaped);continue}case"table":{for(St="",Be="",ie=qe.header.length,W=0;W<ie;W++)Be+=this.renderer.tablecell(this.parseInline(qe.tokens.header[W]),{header:!0,align:qe.align[W]});for(St+=this.renderer.tablerow(Be),kt="",ie=qe.cells.length,W=0;W<ie;W++){for(ft=qe.tokens.cells[W],Be="",Je=ft.length,Z=0;Z<Je;Z++)Be+=this.renderer.tablecell(this.parseInline(ft[Z]),{header:!1,align:qe.align[Z]});kt+=this.renderer.tablerow(Be)}v+=this.renderer.table(St,kt);continue}case"blockquote":{kt=this.parse(qe.tokens),v+=this.renderer.blockquote(kt);continue}case"list":{for(Lt=qe.ordered,yt=qe.start,Ut=qe.loose,ie=qe.items.length,kt="",W=0;W<ie;W++)ot=qe.items[W],Mt=ot.checked,Tt=ot.task,Rt="",ot.task&&(pt=this.renderer.checkbox(Mt),Ut?ot.tokens.length>0&&ot.tokens[0].type==="text"?(ot.tokens[0].text=pt+" "+ot.tokens[0].text,ot.tokens[0].tokens&&ot.tokens[0].tokens.length>0&&ot.tokens[0].tokens[0].type==="text"&&(ot.tokens[0].tokens[0].text=pt+" "+ot.tokens[0].tokens[0].text)):ot.tokens.unshift({type:"text",text:pt}):Rt+=pt),Rt+=this.parse(ot.tokens,Ut),kt+=this.renderer.listitem(Rt,Tt,Mt);v+=this.renderer.list(kt,Lt,yt);continue}case"html":{v+=this.renderer.html(qe.text);continue}case"paragraph":{v+=this.renderer.paragraph(this.parseInline(qe.tokens));continue}case"text":{for(kt=qe.tokens?this.parseInline(qe.tokens):qe.text;b+1<rt&&f[b+1].type==="text";)qe=f[++b],kt+=`
|
|
`+(qe.tokens?this.parseInline(qe.tokens):qe.text);v+=h?this.renderer.paragraph(kt):kt;continue}default:{var lt='Token with "'+qe.type+'" type was not found.';if(this.options.silent){console.error(lt);return}else throw new Error(lt)}}}return v},w.parseInline=function(f,h){h=h||this.renderer;var v="",b,W,Z=f.length;for(b=0;b<Z;b++){W=f[b];switch(W.type){case"escape":{v+=h.text(W.text);break}case"html":{v+=h.html(W.text);break}case"link":{v+=h.link(W.href,W.title,this.parseInline(W.tokens,h));break}case"image":{v+=h.image(W.href,W.title,W.text);break}case"strong":{v+=h.strong(this.parseInline(W.tokens,h));break}case"em":{v+=h.em(this.parseInline(W.tokens,h));break}case"codespan":{v+=h.codespan(W.text);break}case"br":{v+=h.br();break}case"del":{v+=h.del(this.parseInline(W.tokens,h));break}case"text":{v+=h.text(W.text);break}default:{var ie='Token with "'+W.type+'" type was not found.';if(this.options.silent){console.error(ie);return}else throw new Error(ie)}}}return v},g}(),ht=fe.merge,ct=fe.checkSanitizeDeprecation,nt=fe.escape,de=L.getDefaults,dt=L.changeDefaults,$e=L.defaults;function he(g,w,E){if(typeof g=="undefined"||g===null)throw new Error("marked(): input parameter is undefined or null");if(typeof g!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(g)+", string expected");if(typeof w=="function"&&(E=w,w=null),w=ht({},he.defaults,w||{}),ct(w),E){var f=w.highlight,h;try{h=Se.lex(g,w)}catch(Z){return E(Z)}var v=function(ie){var Je;if(!ie)try{Je=Ve.parse(h,w)}catch(ft){ie=ft}return w.highlight=f,ie?E(ie):E(null,Je)};if(!f||f.length<3)return v();if(delete w.highlight,!h.length)return v();var b=0;he.walkTokens(h,function(Z){Z.type==="code"&&(b++,setTimeout(function(){f(Z.text,Z.lang,function(ie,Je){if(ie)return v(ie);Je!=null&&Je!==Z.text&&(Z.text=Je,Z.escaped=!0),b--,b===0&&v()})},0))}),b===0&&v();return}try{var W=Se.lex(g,w);return w.walkTokens&&he.walkTokens(W,w.walkTokens),Ve.parse(W,w)}catch(Z){if(Z.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,w.silent)return"<p>An error occurred:</p><pre>"+nt(Z.message+"",!0)+"</pre>";throw Z}}he.options=he.setOptions=function(g){return ht(he.defaults,g),dt(he.defaults),he},he.getDefaults=de,he.defaults=$e,he.use=function(g){var w=ht({},g);if(g.renderer&&function(){var f=he.defaults.renderer||new ye,h=function(W){var Z=f[W];f[W]=function(){for(var ie=arguments.length,Je=new Array(ie),ft=0;ft<ie;ft++)Je[ft]=arguments[ft];var Be=g.renderer[W].apply(f,Je);return Be===!1&&(Be=Z.apply(f,Je)),Be}};for(var v in g.renderer)h(v);w.renderer=f}(),g.tokenizer&&function(){var f=he.defaults.tokenizer||new ue,h=function(W){var Z=f[W];f[W]=function(){for(var ie=arguments.length,Je=new Array(ie),ft=0;ft<ie;ft++)Je[ft]=arguments[ft];var Be=g.tokenizer[W].apply(f,Je);return Be===!1&&(Be=Z.apply(f,Je)),Be}};for(var v in g.tokenizer)h(v);w.tokenizer=f}(),g.walkTokens){var E=he.defaults.walkTokens;w.walkTokens=function(f){g.walkTokens(f),E&&E(f)}}he.setOptions(w)},he.walkTokens=function(g,w){for(var E=me(g),f;!(f=E()).done;){var h=f.value;w(h);switch(h.type){case"table":{for(var v=me(h.tokens.header),b;!(b=v()).done;){var W=b.value;he.walkTokens(W,w)}for(var Z=me(h.tokens.cells),ie;!(ie=Z()).done;)for(var Je=ie.value,ft=me(Je),Be;!(Be=ft()).done;){var St=Be.value;he.walkTokens(St,w)}break}case"list":{he.walkTokens(h.items,w);break}default:h.tokens&&he.walkTokens(h.tokens,w)}}},he.Parser=Ve,he.parser=Ve.parse,he.Renderer=ye,he.TextRenderer=ve,he.Lexer=Se,he.lexer=Se.lex,he.Tokenizer=ue,he.Slugger=st,he.parse=he;var _e=he;return _e})},ELLl:function(mt,Ke,m){(function(F){F(m("VrN/"))})(function(F){var we={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},V=F.Pos;F.defineOption("autoCloseBrackets",!1,function(I,N,M){M&&M!=F.Init&&(I.removeKeyMap(me),I.state.closeBrackets=null),N&&(le(ge(N,"pairs")),I.state.closeBrackets=N,I.addKeyMap(me))});function ge(I,N){return N=="pairs"&&typeof I=="string"?I:typeof I=="object"&&I[N]!=null?I[N]:we[N]}var me={Backspace:x,Enter:ne};function le(I){for(var N=0;N<I.length;N++){var M=I.charAt(N),ee="'"+M+"'";me[ee]||(me[ee]=L(M))}}le(we.pairs+"`");function L(I){return function(N){return q(N,I)}}function P(I){var N=I.state.closeBrackets;if(!N||N.override)return N;var M=I.getModeAt(I.getCursor());return M.closeBrackets||N}function x(I){var N=P(I);if(!N||I.getOption("disableInput"))return F.Pass;for(var M=ge(N,"pairs"),ee=I.listSelections(),G=0;G<ee.length;G++){if(!ee[G].empty())return F.Pass;var ae=ce(I,ee[G].head);if(!ae||M.indexOf(ae)%2!=0)return F.Pass}for(var G=ee.length-1;G>=0;G--){var Te=ee[G].head;I.replaceRange("",V(Te.line,Te.ch-1),V(Te.line,Te.ch+1),"+delete")}}function ne(I){var N=P(I),M=N&&ge(N,"explode");if(!M||I.getOption("disableInput"))return F.Pass;for(var ee=I.listSelections(),G=0;G<ee.length;G++){if(!ee[G].empty())return F.Pass;var ae=ce(I,ee[G].head);if(!ae||M.indexOf(ae)%2!=0)return F.Pass}I.operation(function(){var Te=I.lineSeparator()||`
|
|
`;I.replaceSelection(Te+Te,null),I.execCommand("goCharLeft"),ee=I.listSelections();for(var Y=0;Y<ee.length;Y++){var J=ee[Y].head.line;I.indentLine(J,null,!0),I.indentLine(J+1,null,!0)}})}function H(I){var N=F.cmpPos(I.anchor,I.head)>0;return{anchor:new V(I.anchor.line,I.anchor.ch+(N?-1:1)),head:new V(I.head.line,I.head.ch+(N?1:-1))}}function q(I,N){var M=P(I);if(!M||I.getOption("disableInput"))return F.Pass;var ee=ge(M,"pairs"),G=ee.indexOf(N);if(G==-1)return F.Pass;for(var ae=ge(M,"closeBefore"),Te=ge(M,"triples"),Y=ee.charAt(G+1)==N,J=I.listSelections(),d=G%2==0,Q,U=0;U<J.length;U++){var re=J[U],S=re.head,p,T=I.getRange(S,V(S.line,S.ch+1));if(d&&!re.empty())p="surround";else if((Y||!d)&&T==N)Y&&j(I,S)?p="both":Te.indexOf(N)>=0&&I.getRange(S,V(S.line,S.ch+3))==N+N+N?p="skipThree":p="skip";else if(Y&&S.ch>1&&Te.indexOf(N)>=0&&I.getRange(V(S.line,S.ch-2),S)==N+N){if(S.ch>2&&/\bstring/.test(I.getTokenTypeAt(V(S.line,S.ch-2))))return F.Pass;p="addFour"}else if(Y){var R=S.ch==0?" ":I.getRange(V(S.line,S.ch-1),S);if(!F.isWordChar(T)&&R!=N&&!F.isWordChar(R))p="both";else return F.Pass}else if(d&&(T.length===0||/\s/.test(T)||ae.indexOf(T)>-1))p="both";else return F.Pass;if(!Q)Q=p;else if(Q!=p)return F.Pass}var _=G%2?ee.charAt(G-1):N,D=G%2?N:ee.charAt(G+1);I.operation(function(){if(Q=="skip")I.execCommand("goCharRight");else if(Q=="skipThree")for(var te=0;te<3;te++)I.execCommand("goCharRight");else if(Q=="surround"){for(var B=I.getSelections(),te=0;te<B.length;te++)B[te]=_+B[te]+D;I.replaceSelections(B,"around"),B=I.listSelections().slice();for(var te=0;te<B.length;te++)B[te]=H(B[te]);I.setSelections(B)}else Q=="both"?(I.replaceSelection(_+D,null),I.triggerElectric(_+D),I.execCommand("goCharLeft")):Q=="addFour"&&(I.replaceSelection(_+_+_+_,"before"),I.execCommand("goCharRight"))})}function ce(I,N){var M=I.getRange(V(N.line,N.ch-1),V(N.line,N.ch+1));return M.length==2?M:null}function j(I,N){var M=I.getTokenAt(V(N.line,N.ch+1));return/\bstring/.test(M.type)&&M.start==N.ch&&(N.ch==0||!/\bstring/.test(I.getTokenTypeAt(N)))}})},FIWC:function(mt,Ke,m){mt.exports={flex_box_center:"flex_box_center___gdHkq",flex_space_between:"flex_space_between___lk_Gv",flex_box_vertical_center:"flex_box_vertical_center___2WNVo",flex_box_center_end:"flex_box_center_end___13O11",flex_box_column:"flex_box_column___kMb8L",wrap:"wrap___1y6rg",crumbs:"crumbs___1vKDo"}},Gytx:function(mt,Ke){mt.exports=function(F,we,V,ge){var me=V?V.call(ge,F,we):void 0;if(me!==void 0)return!!me;if(F===we)return!0;if(typeof F!="object"||!F||typeof we!="object"||!we)return!1;var le=Object.keys(F),L=Object.keys(we);if(le.length!==L.length)return!1;for(var P=Object.prototype.hasOwnProperty.bind(we),x=0;x<le.length;x++){var ne=le[x];if(!P(ne))return!1;var H=F[ne],q=we[ne];if(me=V?V.call(ge,H,q,ne):void 0,me===!1||me===void 0&&H!==q)return!1}return!0}},HmJG:function(mt,Ke,m){},LdHM:function(mt,Ke,m){"use strict";m.d(Ke,"b",function(){return ae}),m.d(Ke,"a",function(){return Y});var F=m("1OyB"),we=m("vuIU"),V=m("Ji7U"),ge=m("LK+K"),me=m("cDcd"),le=m("rePB"),L=m("Ff2n"),P=m("ODXe"),x=m("4IlW"),ne=m("bX4T"),H=m("YrtM"),q=m("TSYQ"),ce=m.n(q),j=m("+nKL"),I=m("8OUc"),N=function(A,se){var oe=A.prefixCls,Oe=A.id,je=A.flattenOptions,ue=A.childrenAsData,De=A.values,be=A.searchValue,xe=A.multiple,K=A.defaultActiveFirstOption,O=A.height,Re=A.itemHeight,Xe=A.notFoundContent,ut=A.open,Fe=A.menuItemSelectedIcon,Ie=A.virtual,Ee=A.onSelect,Se=A.onToggleOpen,Ae=A.onActiveValue,Ue=A.onScroll,Le=A.onMouseEnter,ye="".concat(oe,"-item"),ve=Object(H.a)(function(){return je},[ut,je],function(_e,g){return g[0]&&_e[1]!==g[1]}),st=me.useRef(null),Qe=function(g){g.preventDefault()},Ge=function(g){st.current&&st.current.scrollTo({index:g})},Ve=function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,E=ve.length,f=0;f<E;f+=1){var h=(g+f*w+E)%E,v=ve[h],b=v.group,W=v.data;if(!b&&!W.disabled)return h}return-1},ht=me.useState(function(){return Ve(0)}),ct=Object(P.a)(ht,2),nt=ct[0],de=ct[1],dt=function(g){de(g);var w=ve[g];if(!w){Ae(null,-1);return}Ae(w.data.value,g)};me.useEffect(function(){dt(K!==!1?Ve(0):-1)},[ve.length,be]),me.useEffect(function(){var _e=setTimeout(function(){if(!xe&&ut&&De.size===1){var g=Array.from(De)[0],w=ve.findIndex(function(E){var f=E.data;return f.value===g});dt(w),Ge(w)}});return function(){return clearTimeout(_e)}},[ut]);var $e=function(g){g!==void 0&&Ee(g,{selected:!De.has(g)}),xe||Se(!1)};if(me.useImperativeHandle(se,function(){return{onKeyDown:function(g){var w=g.which;switch(w){case x.a.UP:case x.a.DOWN:{var E=0;if(w===x.a.UP?E=-1:w===x.a.DOWN&&(E=1),E!==0){var f=Ve(nt+E,E);Ge(f),dt(f)}break}case x.a.ENTER:{var h=ve[nt];h&&!h.data.disabled?$e(h.data.value):$e(void 0),ut&&g.preventDefault();break}case x.a.ESC:Se(!1)}},onKeyUp:function(){},scrollTo:function(g){Ge(g)}}}),ve.length===0)return me.createElement("div",{role:"listbox",id:"".concat(Oe,"_list"),className:"".concat(ye,"-empty"),onMouseDown:Qe},Xe);function he(_e){var g=ve[_e];if(!g)return null;var w=g.data||{},E=w.value,f=w.label,h=w.children,v=Object(ne.a)(w,!0),b=ue?h:f;return g?me.createElement("div",Object.assign({"aria-label":typeof b=="string"?b:null},v,{key:_e,role:"option",id:"".concat(Oe,"_list_").concat(_e),"aria-selected":De.has(E)}),E):null}return me.createElement(me.Fragment,null,me.createElement("div",{role:"listbox",id:"".concat(Oe,"_list"),style:{height:0,width:0,overflow:"hidden"}},he(nt-1),he(nt),he(nt+1)),me.createElement(j.a,{itemKey:"key",ref:st,data:ve,height:O,itemHeight:Re,fullHeight:!1,onMouseDown:Qe,onScroll:Ue,virtual:Ie,onMouseEnter:Le},function(_e,g){var w,E=_e.group,f=_e.groupOption,h=_e.data,v=h.label,b=h.key;if(E)return me.createElement("div",{className:ce()(ye,"".concat(ye,"-group"))},v!==void 0?v:b);var W=h.disabled,Z=h.value,ie=h.title,Je=h.children,ft=h.style,Be=h.className,St=Object(L.a)(h,["disabled","value","title","children","style","className"]),kt=De.has(Z),qe="".concat(ye,"-option"),Lt=ce()(ye,qe,Be,(w={},Object(le.a)(w,"".concat(qe,"-grouped"),f),Object(le.a)(w,"".concat(qe,"-active"),nt===g&&!W),Object(le.a)(w,"".concat(qe,"-disabled"),W),Object(le.a)(w,"".concat(qe,"-selected"),kt),w)),yt=ue?Je:v,Ut=!Fe||typeof Fe=="function"||kt;return me.createElement("div",Object.assign({},St,{"aria-selected":kt,className:Lt,title:ie,onMouseMove:function(){if(nt===g||W)return;dt(g)},onClick:function(){W||$e(Z)},style:ft}),me.createElement("div",{className:"".concat(qe,"-content")},yt||Z),me.isValidElement(Fe)||kt,Ut&&me.createElement(I.a,{className:"".concat(ye,"-option-state"),customizeIcon:Fe,customizeIconProps:{isSelected:kt}},kt?"\u2713":null))}))},M=me.forwardRef(N);M.displayName="OptionList";var ee=M,G=function(){return null};G.isSelectOption=!0;var ae=G,Te=function(){return null};Te.isSelectOptGroup=!0;var Y=Te,J=m("VTBJ"),d=m("Zm9Q");function Q(c){var A=c.key,se=c.props,oe=se.children,Oe=se.value,je=Object(L.a)(se,["children","value"]);return Object(J.a)({key:A,value:Oe!==void 0?Oe:A,children:oe},je)}function U(c){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(d.a)(c).map(function(se,oe){if(!me.isValidElement(se)||!se.type)return null;var Oe=se.type.isSelectOptGroup,je=se.key,ue=se.props,De=ue.children,be=Object(L.a)(ue,["children"]);return A||!Oe?Q(se):Object(J.a)(Object(J.a)({key:"__RC_SELECT_GRP__".concat(je===null?oe:je,"__"),label:je},be),{},{options:U(De)})}).filter(function(se){return se})}var re=m("2Qr1"),S=m("qNPg"),p=m("U8pU"),T=m("Kwbf"),R=m("WKfj");function _(c){var A=c.mode,se=c.options,oe=c.children,Oe=c.backfill,je=c.allowClear,ue=c.placeholder,De=c.getInputElement,be=c.showSearch,xe=c.onSearch,K=c.defaultOpen,O=c.autoFocus,Re=c.labelInValue,Xe=c.value,ut=c.inputValue,Fe=c.optionLabelProp,Ie=A==="multiple"||A==="tags",Ee=be!==void 0?be:Ie||A==="combobox",Se=se||U(oe);if(Object(T.a)(A!=="tags"||Se.every(function(ye){return!ye.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),A==="tags"||A==="combobox"){var Ae=Se.some(function(ye){return ye.options?ye.options.some(function(ve){return typeof("value"in ve?ve.value:ve.key)=="number"}):typeof("value"in ye?ye.value:ye.key)=="number"});Object(T.a)(!Ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(T.a)(A!=="combobox"||!Fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(T.a)(A==="combobox"||!Oe,"`backfill` only works with `combobox` mode."),Object(T.a)(A==="combobox"||!De,"`getInputElement` only work with `combobox` mode."),Object(T.b)(A!=="combobox"||!De||!je||!ue,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!Ee&&A!=="combobox"&&A!=="tags"&&Object(T.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(T.b)(!K||O,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Xe!=null){var Ue=Object(R.d)(Xe);Object(T.a)(!Re||Ue.every(function(ye){return Object(p.a)(ye)==="object"&&("key"in ye||"value"in ye)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(T.a)(!Ie||Array.isArray(Xe),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var Le=null;Object(d.a)(oe).some(function(ye){if(!me.isValidElement(ye)||!ye.type)return!1;var ve=ye.type;if(ve.isSelectOption)return!1;if(ve.isSelectOptGroup){var st=Object(d.a)(ye.props.children).every(function(Qe){return!me.isValidElement(Qe)||!ye.type||Qe.type.isSelectOption?!0:(Le=Qe.type,!1)});return!st}return Le=ve,!0}),Le&&Object(T.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Le.displayName||Le.name||Le,"`.")),Object(T.a)(ut===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var D=_,te=Object(S.a)({prefixCls:"rc-select",components:{optionList:ee},convertChildrenToData:U,flattenOptions:re.d,getLabeledValue:re.e,filterOptions:re.b,isValueDisabled:re.g,findValueOption:re.c,warningProps:D,fillOptionsWithMissingValue:re.a}),B=function(c){Object(V.a)(se,c);var A=Object(ge.a)(se);function se(){var oe;return Object(F.a)(this,se),oe=A.apply(this,arguments),oe.selectRef=me.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(we.a)(se,[{key:"render",value:function(){return me.createElement(te,Object.assign({ref:this.selectRef},this.props))}}]),se}(me.Component);B.Option=ae,B.OptGroup=Y;var fe=B,y=Ke.c=fe},M8RZ:function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return x});var F=m("fWQN"),we=m("mtLc"),V=m("yKVA"),ge=m("879j"),me=m("cDcd"),le=m.n(me),L=m("faye"),P=m.n(L),x=function(ne){Object(V.a)(q,ne);var H=Object(ge.a)(q);function q(ce){var j;Object(F.a)(this,q),j=H.call(this,ce);var I=window.document;return j.node=I.createElement("div"),I.body.appendChild(j.node),j}return Object(we.a)(q,[{key:"render",value:function(){var j=this.props.children;return Object(L.createPortal)(j,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),q}(le.a.Component)},O2Wb:function(mt,Ke,m){mt.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES:function(mt,Ke,m){"use strict";var F=m("U8pU"),we=m("VTBJ"),V=m("Ff2n"),ge=m("cDcd"),me=m("uciX"),le=m("7ixt"),L=function(ce){var j=ce.overlay,I=ce.prefixCls,N=ce.id,M=ce.overlayInnerStyle;return ge.createElement("div",{className:"".concat(I,"-inner"),id:N,role:"tooltip",style:M},typeof j=="function"?j():j)},P=L,x=function(ce,j){var I=ce.overlayClassName,N=ce.trigger,M=N===void 0?["hover"]:N,ee=ce.mouseEnterDelay,G=ee===void 0?0:ee,ae=ce.mouseLeaveDelay,Te=ae===void 0?.1:ae,Y=ce.overlayStyle,J=ce.prefixCls,d=J===void 0?"rc-tooltip":J,Q=ce.children,U=ce.onVisibleChange,re=ce.afterVisibleChange,S=ce.transitionName,p=ce.animation,T=ce.placement,R=T===void 0?"right":T,_=ce.align,D=_===void 0?{}:_,te=ce.destroyTooltipOnHide,B=te===void 0?!1:te,fe=ce.defaultVisible,y=ce.getTooltipContainer,c=ce.overlayInnerStyle,A=Object(V.a)(ce,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),se=Object(ge.useRef)(null);Object(ge.useImperativeHandle)(j,function(){return se.current});var oe=Object(we.a)({},A);"visible"in ce&&(oe.popupVisible=ce.visible);var Oe=function(){var xe=ce.arrowContent,K=xe===void 0?null:xe,O=ce.overlay,Re=ce.id;return[ge.createElement("div",{className:"".concat(d,"-arrow"),key:"arrow"},K),ge.createElement(P,{key:"content",prefixCls:d,id:Re,overlay:O,overlayInnerStyle:c})]},je=!1,ue=!1;if(typeof B=="boolean")je=B;else if(B&&Object(F.a)(B)==="object"){var De=B.keepParent;je=De===!0,ue=De===!1}return ge.createElement(me.a,Object.assign({popupClassName:I,prefixCls:d,popup:Oe,action:M,builtinPlacements:le.a,popupPlacement:R,ref:se,popupAlign:D,getPopupContainer:y,onPopupVisibleChange:U,afterPopupVisibleChange:re,popupTransitionName:S,popupAnimation:p,defaultPopupVisible:fe,destroyPopupOnHide:je,autoDestroy:ue,mouseLeaveDelay:Te,popupStyle:Y,mouseEnterDelay:G},oe),Q)},ne=Object(ge.forwardRef)(x),H=Ke.a=ne},Ot1p:function(mt,Ke,m){"use strict";var F=m("2qtc"),we=m("kLXV"),V=m("rAM+"),ge=m("miYZ"),me=m("tsqr"),le=m("tJVT"),L=m("jrin"),P=m("cDcd"),x=m.n(P),ne=m("VrN/"),H=m.n(ne),q=m("bdgK"),ce=m("p77/"),j=m("Bd2K"),I=m("ELLl"),N=m("19Vz"),M=m("lZu9"),ee=m("+NIl"),G=m("kSUc"),ae=m("9Bee"),Te=function(g){var w=g.value,E=w===void 0?"":w,f=g.className,h=g.showTextOnly,v=g.showLines,b=g.style,W=b===void 0?{}:b,Z=Object(P.useMemo)(function(){return""},[E]);return x.a.createElement(x.a.Fragment,null,x.a.createElement("div",{dangerouslySetInnerHTML:{__html:Z}}))},Y=m("0Owb"),J=m("dejd"),d=m("C+DQ"),Q=[{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 U(g){var w=g.onActionCallback,E=g.title,f=g.icon,h=g.actionName,v=g.className,b=v===void 0?"":v,W=g.children;function Z(){w(h)}return x.a.createElement("a",{title:E,className:b,onClick:Z},x.a.createElement("i",{className:"md-iconfont ".concat(f)}),W)}var re=function(g){var w=g.watch,E=g.showNullButton,f=g.onActionCallback,h=g.fullScreen,v=g.insertTemp,b=g.hidetoolBar,W=[].concat(Q,[{title:"".concat(w?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(w?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return x.a.createElement("ul",{className:"markdown-toolbar-container"},!b&&W.map(function(Z,ie){return x.a.createElement("li",{key:ie},Z.actionName?x.a.createElement(U,Object(Y.a)({},Z,{onActionCallback:f})):x.a.createElement("span",{className:"v-line"}))}),E?x.a.createElement("li",null,x.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:f},x.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,v&&x.a.createElement("li",null,x.a.createElement(U,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(v),onActionCallback:f},x.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),x.a.createElement("li",{className:"btn-full-screen"},x.a.createElement(U,{icon:"".concat(h?"icon-shrink":"icon-enlarge"),title:h?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:f})))},S=m("M8RZ"),p=m("+L6B"),T=m("2/Rp"),R=m("y8nQ"),_=m("Vl3Y"),D=m("5NDa"),te=m("5rEg"),B={labelCol:{span:4},wrapperCol:{span:20}},fe=function(g){var w=g.callback,E=g.onCancel;function f(h){w(h)}return x.a.createElement(_.a,Object(Y.a)({},B,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:f}),x.a.createElement(_.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},x.a.createElement(te.a,null)),x.a.createElement(_.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},x.a.createElement(te.a,null)),x.a.createElement("div",{className:"flex-container flex-end"},x.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(T.a,{type:"ghost",onClick:E},"\u53D6\u6D88")))},y=m("7ahc"),c=m("HmJG"),A=m("BjJ7"),se=_.a.useForm,oe={width:280,marginRight:10},Oe={labelCol:{span:5},wrapperCol:{span:19}},je=function(g){var w=g.callback,E=g.onCancel,f=se(),h=Object(le.a)(f,1),v=h[0];function b(ie){w(ie)}function W(ie,Je){v.setFieldsValue({src:"/api/attachments/".concat(ie.id),type:Je.type})}function Z(ie){var Je=ie.target.files[0];De(Je,W)}return x.a.createElement(_.a,Object(Y.a)({form:v},Oe,{className:"upload-image-panel",onFinish:b}),x.a.createElement(_.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},x.a.createElement("div",{className:"flex-container"},x.a.createElement(_.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},x.a.createElement(te.a,{style:oe})),x.a.createElement(ue,{onFileChange:Z}))),x.a.createElement(_.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},x.a.createElement(te.a,{style:{width:264}})),x.a.createElement(_.a.Item,{style:{textAlign:"right"}},x.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(T.a,{type:"ghost",onClick:E},"\u53D6\u6D88")))};function ue(g){var w=g.onFileChange;return x.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",x.a.createElement("input",{type:"file",onChange:w}))}function De(g,w){if(!g)throw new String("\u6CA1\u6709\u6587\u4EF6");var E=new FormData;E.append("editormd-image-file",g),E.append("file_param_name","editormd-image-file"),E.append("byxhr","true");var f=new window.XMLHttpRequest;f.withCredentials=!0,f.addEventListener("load",function(h){w(JSON.parse(h.target.responseText),g)},!1),f.addEventListener("error",function(h){console.error(h)},!1),f.open("POST","".concat(A.a,"/api/attachments.json")),f.send(E)}var be=m("giR+"),xe=m("fyUT"),K=m("7Kak"),O=m("9yH6"),Re=O.a.Group,Xe={margin:"0 8px"},ut=function(g){var w=g.callback,E=g.onCancel;function f(h){w(h)}return x.a.createElement(_.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:f},x.a.createElement("div",{className:"flex-container"},x.a.createElement("span",{style:Xe},"\u5355\u5143\u683C\u6570\uFF1A"),x.a.createElement("span",{style:Xe},"\u884C\u6570"),x.a.createElement(_.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},x.a.createElement(xe.a,null)),x.a.createElement("span",{style:Xe},"\u5217\u6570"),x.a.createElement(_.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},x.a.createElement(xe.a,null))),x.a.createElement("div",{className:"flex-container",style:{marginTop:12}},x.a.createElement("span",{style:Xe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),x.a.createElement(_.a.Item,{name:"align"},x.a.createElement(Re,null,x.a.createElement(O.a,{value:"default"},x.a.createElement("i",{className:"fa fa-align-justify"})),x.a.createElement(O.a,{value:"left"},x.a.createElement("i",{className:"fa fa-align-left"})),x.a.createElement(O.a,{value:"center"},x.a.createElement("i",{className:"fa fa-align-center"})),x.a.createElement(O.a,{value:"right"},x.a.createElement("i",{className:"fa fa-align-right"}))))),x.a.createElement("div",{className:"flex-container flex-end"},x.a.createElement(T.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),x.a.createElement(T.a,{type:"ghost",onClick:E},"\u53D6\u6D88")))},Fe=m("m3rI"),Ie="link",Ee="upload-image",Se="code-block",Ae="add-table",Ue="------------",Le={default:Ue,left:":".concat(Ue),center:":".concat(Ue,":"),right:"".concat(Ue,":")},ye=m("9VGf"),ve,st;function Qe(){}var Ge=0,Ve=1e4,ht="\u2581",ct=`
|
|
**\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 nt(g){return/^\d+$/.test(g)?"".concat(g,"px"):g}var de=navigator.platform.toUpperCase().indexOf("MAC")>=0,dt=de?"Cmd":"Ctrl",$e=(ve={},Object(L.a)(ve,dt+"-B","bold"),Object(L.a)(ve,dt+"-I","italic"),ve),he=(st={},Object(L.a)(st,Ie,"\u6DFB\u52A0\u94FE\u63A5"),Object(L.a)(st,Se,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(L.a)(st,Ee,"\u6DFB\u52A0\u56FE\u7247"),Object(L.a)(st,Ae,"\u6DFB\u52A0\u8868\u683C"),st),_e=Ke.a=function(g){var w=g.defaultValue,E=w===void 0?"":w,f=g.onChange,h=g.width,v=h===void 0?"100%":h,b=g.height,W=b===void 0?400:b,Z=g.miniToolbar,ie=Z===void 0?!1:Z,Je=g.isFocus,ft=Je===void 0?!1:Je,Be=g.watch,St=g.insertTemp,kt=g.mode,qe=kt===void 0?"markdown":kt,Lt=g.id,yt=Lt===void 0?"markdown-editor-id":Lt,Ut=g.showResizeBar,Rt=Ut===void 0?!1:Ut,ot=g.noStorage,Mt=ot===void 0?!1:ot,Tt=g.showNullButton,pt=Tt===void 0?!1:Tt,rt=g.hidetoolBar,lt=rt===void 0?!1:rt,Et=g.fullScreen,jt=Et===void 0?!1:Et,Dt=g.onBlur,Xt=g.onCMBeforeChange,It=g.onFullScreen,tt=g.className,Ft=tt===void 0?"":tt,vt=g.disablePaste,Bt=vt===void 0?!1:vt,xt=g.placeholder,un=xt===void 0?"":xt,Hn=g.values,Xn=Hn===void 0?"":Hn,Ce=Object(P.useState)(null),We=Object(le.a)(Ce,2),Pe=We[0],Yt=We[1],an=Object(P.useState)(E),nn=Object(le.a)(an,2),Bn=nn[0],Ct=nn[1],ir=Object(P.useState)(Be),or=Object(le.a)(ir,2),An=or[0],Ln=or[1],Lr=Object(P.useState)(jt),br=Object(le.a)(Lr,2),On=br[0],er=br[1],Ye=Object(P.useState)(""),$=Object(le.a)(Ye,2),Me=$[0],gt=$[1],at=Object(P.useState)(0),et=Object(le.a)(at,2),Ot=et[0],Vt=et[1],Zt=Object(P.useState)(W),$t=Object(le.a)(Zt,2),on=$t[0],Rn=$t[1],hn=Object(P.useState)(!1),En=Object(le.a)(hn,2),_r=En[0],xn=En[1],cn=Object(P.useRef)(),tr=Object(P.useRef)(),Kn=Object(P.useRef)(),yr=Object(P.useRef)();Object(P.useEffect)(function(){Ct(Xn),Pe==null||Pe.setValue(Xn)},[Xn]),Object(P.useEffect)(function(){It==null||It(On)},[On]),Object(P.useEffect)(function(){if(cn.current){var bt=H.a.fromTextArea(cn.current,{mode:qe,lineNumbers:!ie,lineWrapping:!0,value:E,autoCloseTags:!0,autoCloseBrackets:!0});ft&&bt.focus();function Pt(At,Ht){if(Bt){Ht.preventDefault();return}var Kt=Ht.clipboardData;if(Kt){var qt=Kt.types.toString(),sn=Kt.items,Qt=["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(qt==="Files"||Kt.types.indexOf("Files")>-1){if(Ht.preventDefault(),qe=="stex")return;try{var wn,Gn=sn[1];((wn=sn[0])===null||wn===void 0?void 0:wn.kind)==="file"&&(Gn=sn[0]);var Jt=Gn.getAsFile(),sr=Jt.name.split(".").pop();De(Jt,function(Cn){if(Cn.id){var lr,ur,Dr;(Jt==null||((lr=Jt.type)===null||lr===void 0)?void 0:lr.indexOf("image"))>-1?bt.replaceSelection(".concat(Cn.content_type,")")):(Jt==null||((ur=Jt.type)===null||ur===void 0)?void 0:ur.indexOf("video"))>-1?bt.replaceSelection('<video width="100%" controls src="'.concat(Fe.a.API_SERVER,"/api/attachments/").concat(Cn.id,'"></video>')):(Jt==null||((Dr=Jt.type)===null||Dr===void 0)?void 0:Dr.indexOf("pdf"))>-1?bt.replaceSelection('<a href="'.concat(Fe.a.API_SERVER,"/api/attachments/").concat(Cn.id,"?type=").concat(Jt.type,'&disposition=inline" target="_blank">').concat(Jt.name,"</a>")):Qt.includes(sr)?bt.replaceSelection('<a href="'.concat(Fe.a.API_SERVER,"/api/attachments/").concat(Cn.id,'?type=office&disposition=inline" target="_blank">').concat(Jt.name,"</a>")):bt.replaceSelection("[".concat(Jt.name,"](").concat(Fe.a.API_SERVER,"/api/attachments/").concat(Cn.id,"?type=").concat(Cn.content_type,")"))}else(Cn==null?void 0:Cn.status)===401&&(document.location.href="/user/login")})}catch(Cn){me.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return bt.on("paste",Pt),Yt(bt),function(){bt.off("paste",Pt)}}},[]);var Oa=Object(P.useCallback)(function(){if(tr.current)try{}catch(bt){console.log(bt,"---- to set md editor body height")}},[on,tr,On]);Object(P.useEffect)(function(){function bt(){var At=new q.default(function(Ht){var Kt=Object(V.a)(Ht),qt;try{for(Kt.s();!(qt=Kt.n()).done;){var sn=qt.value;(sn.target.offsetHeight>0||sn.target.offsetWidth>0)&&(Oa(),Pe.setSize("100%","100%"),Pe.refresh())}}catch(Qt){Kt.e(Qt)}finally{Kt.f()}});return At.observe(cn.current.parentElement),At}if(Pe){var Pt=bt();return function(){Pt.unobserve(cn.current.parentElement)}}},[Pe,Oa]),Object(P.useEffect)(function(){if(Pe){for(var bt=[],Pt=function(){var sn=Ht[At];Kt=Object(le.a)(sn,2);var Qt=Kt[0],wn=Kt[1],Gn=Object(L.a)({},Qt,function(){Qr(wn)});bt.push(Gn),Pe.addKeyMap(Gn)},At=0,Ht=Object.entries($e);At<Ht.length;At++){var Kt;Pt()}return function(){var qt=Object(V.a)(bt),sn;try{for(qt.s();!(sn=qt.n()).done;){var Qt=sn.value;Pe.removeKeyMap(Qt)}}catch(wn){qt.e(wn)}finally{qt.f()}}}},[Pe]),Object(P.useEffect)(function(){jt!==On&&er(jt)},[jt]),Object(ye.a)(function(){if(!Mt&&Ot>0){var bt=new Date().getTime(),Pt=window.sessionStorage.getItem(yt);bt>=Ot+Ve&&(!Pt||Pt!==Bn)&&(window.sessionStorage.setItem(yt,Bn),xn(!0))}},Ve),Object(P.useEffect)(function(){Ln(Be)},[Pe,Be]),Object(P.useEffect)(function(){Pe&&(ft&&Pe.focus())},[Pe,ft]),Object(P.useEffect)(function(){if(An&&Pe){var bt=Pe.getScrollerElement();function Pt(At){var Ht=At.target;if(yr.current){var Kt=Ht.scrollTop/Ht.scrollHeight;yr.current.scrollTop=yr.current.scrollHeight*Kt}}return bt.addEventListener("scroll",Pt),function(){bt.removeEventListener("scroll",Pt)}}},[Pe,An]),Object(P.useEffect)(function(){if(Pe&&Xt){function bt(Pt,At){Xt(Pt,At)}return Pe.on("beforeChange",bt),function(){Pe.off("beforeChange",bt)}}},[Pe,Xt]),Object(P.useEffect)(function(){if(Pe&&Dt){function bt(){Dt(Pe.getValue())}return Pe.on("blur",bt),function(){Pe.off("blur",bt)}}},[Pe,Dt]),Object(P.useEffect)(function(){if(Pe){function bt(Pt){var At=Pt.getValue();Ct(At),Vt(new Date().getTime()),Pt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),f&&f(At)}return Pe.on("change",bt),function(){Pe.off("change",bt)}}},[Pe,f]),Object(P.useEffect)(function(){Pe&&(E==null?(Pe.setValue(""),Ct("")):E!==Pe.getValue()&&(Pe.setValue(E),Ct(E),Pe.setCursor(Pe.lineCount(),0)))},[Pe,E]);var Qr=Object(P.useCallback)(function(bt){var Pt=Pe.getCursor(),At=Pe.getSelection(),Ht=At.split(`
|
|
`);switch(bt){case"bold":return Pe.replaceSelection("**"+At+"**"),At===""&&Pe.setCursor(Pt.line,Pt.ch+2),Pe.focus();case"italic":return Pe.replaceSelection("*"+At+"*"),At===""&&Pe.setCursor(Pt.line,Pt.ch+1),Pe.focus();case"code":return Pe.replaceSelection("`"+At+"`"),At===""&&Pe.setCursor(Pt.line,Pt.ch+1),Pe.focus();case"inline-latex":return Pe.replaceSelection("`$$"+At+"$$`"),At===""&&Pe.setCursor(Pt.line,Pt.ch+3),Pe.focus();case"latex":return Pe.replaceSelection("```latex\n"+At+"\n```"),Pe.setCursor(Pt.line+1,At.length+1),Pe.focus();case"line-break":return Pe.replaceSelection(`<br/>
|
|
`),Pe.focus();case"list-ul":return At===""?Pe.replaceSelection("- "+At):Pe.replaceSelection(Ht.map(function(Kt){return Kt===""?"":"- ".concat(Kt)}).join(`
|
|
`)),Pe.focus();case"list-ol":return At===""?Pe.replaceSelection("1. "+At):Pe.replaceSelection(Ht.map(function(Kt,qt){return Kt===""?"":"".concat(qt+1,". ").concat(Kt)}).join(`
|
|
`)),Pe.focus();case"add-null-ch":return At===""&&Pe.setCursor(Pt.line,Pt.ch+1),Pe.replaceSelection(ht),Pe.focus();case"inster-template-1":return At===""&&Pe.setCursor(Pt.line,Pt.ch),Pe.replaceSelection(ct),Pe.focus();case"eraser":return Pe.setValue(""),Pe.focus();case"trigger-watch":return Ln(!An),Pe.focus();case"trigger-full-screen":return er(!On),Pe.focus();case Ie:gt(Ie);return;case Se:gt(Se);return;case Ee:gt(Ee);return;case Ae:gt(Ae);return;default:throw new Error}},[Pe,An,On]),Er=Object(P.useCallback)(function(bt){gt("");switch(Me){case Ie:var Pt=bt.title,At=bt.link;return Pe.replaceSelection("[".concat(Pt,"](").concat(At,")")),Pe.focus();case Se:var Ht=bt.language,Kt=bt.content;return Pe.replaceSelection(["```"+Ht,Kt,"```"].join(`
|
|
`)),Pe.focus();case Ee:var qt=bt.src,sn=bt.alt;return Pe.replaceSelection(".concat(qt,' "').concat(sn,'" )')),Pe.focus();case Ae:for(var Qt=bt.row,wn=bt.col,Gn=bt.align,Jt=`
|
|
`,sr=0;sr<Qt;sr++){for(var Cn=[],lr=[],ur=0;ur<wn;ur++)sr===1&&lr.push(Le[Gn]),Cn.push(" ");sr===1&&(Jt+="| ".concat(lr.join(" | "),` |
|
|
`)),Jt+="| ".concat(Cn.join(wn===1?"":" | "),` |
|
|
`)}return Pe.replaceSelection(Jt+`
|
|
`),Pe.focus();default:throw new Error}},[Pe,Me]),Mr=Object(P.useMemo)(function(){switch(Me){case Ie:return x.a.createElement(fe,{callback:Er,onCancel:Jn});case Se:return x.a.createElement(y.b,{callback:Er,onCancel:Jn});case Ee:return x.a.createElement(je,{callback:Er,onCancel:Jn});case Ae:return x.a.createElement(ut,{callback:Er,onCancel:Jn});default:return null}},[Me]);function Jn(){gt("")}Object(P.useEffect)(function(){if(Kn.current){var bt=Kn.current,Pt=!1,At=0;function Ht(sn){Pt=!0,At=sn.pageY}function Kt(){Pt=!1}function qt(sn){if(Pt){var Qt=sn.pageY-At;Qt<0&&(Qt=0),Qt>300&&(Qt=300);var wn=W+Qt+"px";Rn(wn)}}return bt.addEventListener("mousedown",Ht),document.addEventListener("mousemove",qt),document.addEventListener("mouseup",Kt),function(){bt.removeEventListener("mousedown",Ht),document.removeEventListener("mousemove",qt),document.removeEventListener("mouseup",Kt)}}},[Pe,Kn]),Object(P.useEffect)(function(){Rn(W)},[W]);var ea=nt(v),Ra=nt(on),Ta={width:ea,height:Ra},ta=Object(P.useMemo)(function(){if(Ot){var bt=new Date(Ot),Pt=bt.getHours(),At=bt.getMinutes(),Ht=bt.getSeconds();return Pt=Pt<10?"0"+Pt:Pt,At=At<10?"0"+At:At,Ht=Ht<10?"0"+Ht:Ht,"".concat(Pt,":").concat(At,":").concat(Ht)}return 0},[Ot]);function Ii(){window.sessionStorage.removeItem(yt),xn(!1),Vt(0)}function Qa(){xn(!1),Vt(0),Pe.setValue(window.sessionStorage.getItem(yt))}return x.a.createElement(P.Fragment,null,x.a.createElement("div",{className:"markdown-editor-wrapper",ref:tr},x.a.createElement("div",{className:"markdown-editor-container ".concat(Ft," ").concat(An?"on-preview":""," ").concat(ie?"mini":""," ").concat(On?"full-screen":""),style:Ta},x.a.createElement(re,{insertTemp:St,watch:An,fullScreen:On,showNullButton:pt,onActionCallback:Qr,hidetoolBar:lt}),x.a.createElement("div",{className:"markdown-editor-body"},x.a.createElement("div",{className:"codemirror-container"},x.a.createElement("textarea",{ref:cn,placeholder:un})),An?x.a.createElement("div",{ref:yr,className:"preview-container"},qe==="stex"&&x.a.createElement(Te,{value:Bn}),qe!=="stex"&&x.a.createElement(ae.a,{value:Bn})):null))),Rt?x.a.createElement("a",{ref:Kn,className:"editor-resize"}):null,x.a.createElement(S.a,null,he[Me]?x.a.createElement(we.a,{centered:!0,title:he[Me],visible:!0,onCancel:Jn,footer:null},Mr):null))}},PGNT:function(mt,Ke,m){mt.exports={wrap:"wrap___orWmH",modal:"modal___142IN",titleWrap:"titleWrap___2UWGN",required:"required___lXOtq",title:"title___2wqMf",colorGray:"colorGray___3FkLm",choiceWrap:"choiceWrap___3pbic",answer:"answer___30LSv",activeAnswer:"activeAnswer___3ayAN",deleteIcon:"deleteIcon___2HHly",addIcon:"addIcon___29vcx",editorWrap:"editorWrap___ANVP6",htmlWrap:"htmlWrap___38sLf",radio:"radio___15wok",color333:"color333___sNPjh",color999:"color999___1ofkl",fold:"fold___6rnoE",head:"head___2muph"}},PsQE:function(mt,Ke,m){mt.exports={flex_box_center:"flex_box_center___2PkN_",flex_space_between:"flex_space_between___36cDA",flex_box_vertical_center:"flex_box_vertical_center___2c88u",flex_box_center_end:"flex_box_center_end___14cXO",flex_box_column:"flex_box_column___3nalt",wrap:"wrap___3xZrs",left:"left___19hOK",title:"title___3Ti2k",total:"total___3MRC5",list:"list___3pdfL",name:"name___2IcTs",b:"b___2W0Sn",r:"r___2Tpj8",l:"l___1rMKQ",tag:"tag___jj2X5",right:"right___16831",examName:"examName___2TmgX",t:"t___1CJZd",num:"num___1qX6C",topWarp:"topWarp___3WuSr",head:"head___3z9Hq",so:"so___m2B6Z",btn:"btn___20VL7",content:"content___2tTuo",titleWrap:"titleWrap___1cYdQ",single:"single___1BKtz",analysis:"analysis___1qm4Y",text:"text___1JQUf",btnsElse:"btnsElse___2IzAs",btnsWrap:"btnsWrap___3ib37",btns:"btns___2DbBT",modalColumn:"modalColumn___1zs36",modalRow:"modalRow___14b2N",sup:"sup___1CIjI",popover:"popover___Mmcvb"}},"RZ/O":function(mt,Ke,m){mt.exports=m.p+"static/bi.9c9b0364.svg"},SJMd:function(mt,Ke){/**
|
|
* @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 m,F,we,V=!1,ge,me;window.PR_SHOULD_USE_CONTINUATION=!0;var le,L;(function(){var P=window,x=["break,continue,do,else,for,if,return,while"],ne=[x,"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"],H=[ne,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],q=[H,"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=[H,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],j=[H,"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"],I="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",N=[H,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],M="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",ee=[x,"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"],G=[x,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],ae=[x,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Te=[q,j,ce,N,M,ee,G,ae],Y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,J="str",d="kwd",Q="com",U="typ",re="lit",S="pun",p="pln",T="tag",R="dec",_="src",D="atn",te="atv",B="nocode",fe="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function y(Ee){for(var Se=0,Ae=!1,Ue=!1,Le=0,ye=Ee.length;Le<ye;++Le){var ve=Ee[Le];if(ve.ignoreCase)Ue=!0;else if(/[a-z]/i.test(ve.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ae=!0,Ue=!1;break}}var st={b:8,t:9,n:10,v:11,f:12,r:13};function Qe(nt){var de=nt.charCodeAt(0);if(de!==92)return de;var dt=nt.charAt(1);return de=st[dt],de||("0"<=dt&&dt<="7"?parseInt(nt.substring(1),8):dt==="u"||dt==="x"?parseInt(nt.substring(2),16):nt.charCodeAt(1))}function Ge(nt){if(nt<32)return(nt<16?"\\x0":"\\x")+nt.toString(16);var de=String.fromCharCode(nt);return de==="\\"||de==="-"||de==="]"||de==="^"?"\\"+de:de}function Ve(nt){var de=nt.substring(1,nt.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")),dt=[],$e=de[0]==="^",he=["["];$e&&he.push("^");for(var _e=$e?1:0,g=de.length;_e<g;++_e){var w=de[_e];if(/\\[bdsw]/i.test(w))he.push(w);else{var E=Qe(w),f;_e+2<g&&de[_e+1]==="-"?(f=Qe(de[_e+2]),_e+=2):f=E,dt.push([E,f]),f<65||E>122||(f<65||E>90||dt.push([Math.max(65,E)|32,Math.min(f,90)|32]),f<97||E>122||dt.push([Math.max(97,E)&~32,Math.min(f,122)&~32]))}}dt.sort(function(W,Z){return W[0]-Z[0]||Z[1]-W[1]});for(var h=[],v=[],_e=0;_e<dt.length;++_e){var b=dt[_e];b[0]<=v[1]+1?v[1]=Math.max(v[1],b[1]):h.push(v=b)}for(var _e=0;_e<h.length;++_e){var b=h[_e];he.push(Ge(b[0])),b[1]>b[0]&&(b[1]+1>b[0]&&he.push("-"),he.push(Ge(b[1])))}return he.push("]"),he.join("")}function ht(nt){for(var de=nt.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")),dt=de.length,$e=[],he=0,_e=0;he<dt;++he){var g=de[he];if(g==="(")++_e;else if(g.charAt(0)==="\\"){var w=+g.substring(1);w&&(w<=_e?$e[w]=-1:de[he]=Ge(w))}}for(var he=1;he<$e.length;++he)$e[he]===-1&&($e[he]=++Se);for(var he=0,_e=0;he<dt;++he){var g=de[he];if(g==="(")++_e,$e[_e]||(de[he]="(?:");else if(g.charAt(0)==="\\"){var w=+g.substring(1);w&&w<=_e&&(de[he]="\\"+$e[w])}}for(var he=0;he<dt;++he)de[he]==="^"&&de[he+1]!=="^"&&(de[he]="");if(nt.ignoreCase&&Ae)for(var he=0;he<dt;++he){var g=de[he],E=g.charAt(0);g.length>=2&&E==="["?de[he]=Ve(g):E!=="\\"&&(de[he]=g.replace(/[a-zA-Z]/g,function(v){var b=v.charCodeAt(0);return"["+String.fromCharCode(b&~32,b|32)+"]"}))}return de.join("")}for(var ct=[],Le=0,ye=Ee.length;Le<ye;++Le){var ve=Ee[Le];if(ve.global||ve.multiline)throw new Error(""+ve);ct.push("(?:"+ht(ve)+")")}return new RegExp(ct.join("|"),Ue?"gi":"g")}function c(Ee,Se){var Ae=/(?:^|\s)nocode(?:\s|$)/,Ue=[],Le=0,ye=[],ve=0;function st(Qe){var Ge=Qe.nodeType;if(Ge==1){if(Ae.test(Qe.className))return;for(var Ve=Qe.firstChild;Ve;Ve=Ve.nextSibling)st(Ve);var ht=Qe.nodeName.toLowerCase();(ht==="br"||ht==="li")&&(Ue[ve]=`
|
|
`,ye[ve<<1]=Le++,ye[ve++<<1|1]=Qe)}else if(Ge==3||Ge==4){var ct=Qe.nodeValue;ct.length&&(Se?ct=ct.replace(/\r\n?/g,`
|
|
`):ct=ct.replace(/[ \t\r\n]+/g," "),Ue[ve]=ct,ye[ve<<1]=Le,Le+=ct.length,ye[ve++<<1|1]=Qe)}}return st(Ee),{sourceCode:Ue.join("").replace(/\n$/,""),spans:ye}}function A(Ee,Se,Ae,Ue,Le){if(!Ae)return;var ye={sourceNode:Ee,pre:1,langExtension:null,numberLines:null,sourceCode:Ae,spans:null,basePos:Se,decorations:null};Ue(ye),Le.push.apply(Le,ye.decorations)}var se=/\S/;function oe(Ee){for(var Se=void 0,Ae=Ee.firstChild;Ae;Ae=Ae.nextSibling){var Ue=Ae.nodeType;Se=Ue===1?Se?Ee:Ae:Ue===3&&se.test(Ae.nodeValue)?Ee:Se}return Se===Ee?void 0:Se}function Oe(Ee,Se){var Ae={},Ue;(function(){for(var ve=Ee.concat(Se),st=[],Qe={},Ge=0,Ve=ve.length;Ge<Ve;++Ge){var ht=ve[Ge],ct=ht[3];if(ct)for(var nt=ct.length;--nt>=0;)Ae[ct.charAt(nt)]=ht;var de=ht[1],dt=""+de;Qe.hasOwnProperty(dt)||(st.push(de),Qe[dt]=null)}st.push(/[\0-\uffff]/),Ue=y(st)})();var Le=Se.length,ye=function(ve){for(var st=ve.sourceCode,Qe=ve.basePos,Ge=ve.sourceNode,Ve=[Qe,p],ht=0,ct=st.match(Ue)||[],nt={},de=0,dt=ct.length;de<dt;++de){var $e=ct[de],he=nt[$e],_e=void 0,g;if(typeof he=="string")g=!1;else{var w=Ae[$e.charAt(0)];if(w)_e=$e.match(w[1]),he=w[0];else{for(var E=0;E<Le;++E)if(w=Se[E],_e=$e.match(w[1]),_e){he=w[0];break}_e||(he=p)}g=he.length>=5&&he.substring(0,5)==="lang-",g&&!(_e&&typeof _e[1]=="string")&&(g=!1,he=_),g||(nt[$e]=he)}var f=ht;if(ht+=$e.length,!g)Ve.push(Qe+f,he);else{var h=_e[1],v=$e.indexOf(h),b=v+h.length;_e[2]&&(b=$e.length-_e[2].length,v=b-h.length);var W=he.substring(5);A(Ge,Qe+f,$e.substring(0,v),ye,Ve),A(Ge,Qe+f+v,h,O(W,h),Ve),A(Ge,Qe+f+b,$e.substring(b),ye,Ve)}}ve.decorations=Ve};return ye}function je(Ee){var Se=[],Ae=[];Ee.tripleQuotedStrings?Se.push([J,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ee.multiLineStrings?Se.push([J,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Se.push([J,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ee.verbatimStrings&&Ae.push([J,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ue=Ee.hashComments;Ue&&(Ee.cStyleComments?(Ue>1?Se.push([Q,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Se.push([Q,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ae.push([J,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Se.push([Q,/^#[^\r\n]*/,null,"#"])),Ee.cStyleComments&&(Ae.push([Q,/^\/\/[^\r\n]*/,null]),Ae.push([Q,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Le=Ee.regexLiterals;if(Le){var ye=Le>1?"":`
|
|
\r`,ve=ye?".":"[\\S\\s]",st="/(?=[^/*"+ye+"])(?:[^/\\x5B\\x5C"+ye+"]|\\x5C"+ve+"|\\x5B(?:[^\\x5C\\x5D"+ye+"]|\\x5C"+ve+")*(?:\\x5D|$))+/";Ae.push(["lang-regex",RegExp("^"+fe+"("+st+")")])}var Qe=Ee.types;Qe&&Ae.push([U,Qe]);var Ge=(""+Ee.keywords).replace(/^ | $/g,"");Ge.length&&Ae.push([d,new RegExp("^(?:"+Ge.replace(/[\s,]+/g,"|")+")\\b"),null]),Se.push([p,/^\s+/,null,` \r
|
|
\xA0`]);var Ve="^.[^\\s\\w.$@'\"`/\\\\]*";return Ee.regexLiterals&&(Ve+="(?!s*/)"),Ae.push([re,/^@[a-z_$][a-z_$@0-9]*/i,null],[U,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[p,/^[a-z_$][a-z_$@0-9]*/i,null],[re,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[p,/^\\[\s\S]?/,null],[S,new RegExp(Ve),null]),Oe(Se,Ae)}var ue=je({keywords:Te,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function De(Ee,Se,Ae){for(var Ue=/(?:^|\s)nocode(?:\s|$)/,Le=/\r\n?|\n/,ye=Ee.ownerDocument,ve=ye.createElement("li");Ee.firstChild;)ve.appendChild(Ee.firstChild);var st=[ve];function Qe(de){var dt=de.nodeType;if(dt==1&&!Ue.test(de.className))if(de.nodeName==="br")Ge(de),de.parentNode&&de.parentNode.removeChild(de);else for(var $e=de.firstChild;$e;$e=$e.nextSibling)Qe($e);else if((dt==3||dt==4)&&Ae){var he=de.nodeValue,_e=he.match(Le);if(_e){var g=he.substring(0,_e.index);de.nodeValue=g;var w=he.substring(_e.index+_e[0].length);if(w){var E=de.parentNode;E.insertBefore(ye.createTextNode(w),de.nextSibling)}Ge(de),g||de.parentNode.removeChild(de)}}}function Ge(de){for(;!de.nextSibling;)if(de=de.parentNode,!de)return;function dt(_e,g){var w=g?_e.cloneNode(!1):_e,E=_e.parentNode;if(E){var f=dt(E,1),h=_e.nextSibling;f.appendChild(w);for(var v=h;v;v=h)h=v.nextSibling,f.appendChild(v)}return w}for(var $e=dt(de.nextSibling,0),he;(he=$e.parentNode)&&he.nodeType===1;)$e=he;st.push($e)}for(var Ve=0;Ve<st.length;++Ve)Qe(st[Ve]);Se===(Se|0)&&st[0].setAttribute("value",Se);var ht=ye.createElement("ol");ht.className="linenums";for(var ct=Math.max(0,Se-1|0)||0,Ve=0,nt=st.length;Ve<nt;++Ve)ve=st[Ve],ve.className="L"+(Ve+ct)%10,ve.firstChild||ve.appendChild(ye.createTextNode("\xA0")),ht.appendChild(ve);Ee.appendChild(ht)}function be(Ee){var Se=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Se=Se&&+Se[1]<=8;var Ae=/\n/g,Ue=Ee.sourceCode,Le=Ue.length,ye=0,ve=Ee.spans,st=ve.length,Qe=0,Ge=Ee.decorations,Ve=Ge.length,ht=0;Ge[Ve]=Le;var ct,nt;for(nt=ct=0;nt<Ve;)Ge[nt]!==Ge[nt+2]?(Ge[ct++]=Ge[nt++],Ge[ct++]=Ge[nt++]):nt+=2;for(Ve=ct,nt=ct=0;nt<Ve;){for(var de=Ge[nt],dt=Ge[nt+1],$e=nt+2;$e+2<=Ve&&Ge[$e+1]===dt;)$e+=2;Ge[ct++]=de,Ge[ct++]=dt,nt=$e}Ve=Ge.length=ct;var he=Ee.sourceNode,_e="";he&&(_e=he.style.display,he.style.display="none");try{for(var g=null;Qe<st;){var w=ve[Qe],E=ve[Qe+2]||Le,f=Ge[ht+2]||Le,$e=Math.min(E,f),h=ve[Qe+1],v;if(h.nodeType!==1&&(v=Ue.substring(ye,$e))){Se&&(v=v.replace(Ae,"\r")),h.nodeValue=v;var b=h.ownerDocument,W=b.createElement("span");W.className=Ge[ht+1];var Z=h.parentNode;Z.replaceChild(W,h),W.appendChild(h),ye<E&&(ve[Qe+1]=h=b.createTextNode(Ue.substring($e,E)),Z.insertBefore(h,W.nextSibling))}ye=$e,ye>=E&&(Qe+=2),ye>=f&&(ht+=2)}}finally{he&&(he.style.display=_e)}}var xe={};function K(Ee,Se){for(var Ae=Se.length;--Ae>=0;){var Ue=Se[Ae];xe.hasOwnProperty(Ue)?P.console&&console.warn("cannot override language handler %s",Ue):xe[Ue]=Ee}}function O(Ee,Se){return Ee&&xe.hasOwnProperty(Ee)||(Ee=/^\s*</.test(Se)?"default-markup":"default-code"),xe[Ee]}K(ue,["default-code"]),K(Oe([],[[p,/^[^<?]+/],[R,/^<!\w[^>]*(?:>|$)/],[Q,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[S,/^(?:<[%?]|[%?]>)/],["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"]),K(Oe([[p,/^[\s]+/,null,` \r
|
|
`],[te,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[T,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[D,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[S,/^[=<>\/]+/],["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"]),K(Oe([],[[te,/^[\s\S]+/]]),["uq.val"]),K(je({keywords:q,hashComments:!0,cStyleComments:!0,types:Y}),["c","cc","cpp","cxx","cyc","m"]),K(je({keywords:"null,true,false"}),["json"]),K(je({keywords:j,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Y}),["cs"]),K(je({keywords:ce,cStyleComments:!0}),["java"]),K(je({keywords:ae,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),K(je({keywords:ee,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),K(je({keywords:M,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),K(je({keywords:G,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),K(je({keywords:N,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),K(je({keywords:I,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),K(Oe([],[[J,/^[\s\S]+/]]),["regex"]);function Re(Ee){var Se=Ee.langExtension;try{var Ae=c(Ee.sourceNode,Ee.pre),Ue=Ae.sourceCode;Ee.sourceCode=Ue,Ee.spans=Ae.spans,Ee.basePos=0,O(Se,Ue)(Ee),be(Ee)}catch(Le){P.console&&console.log(Le&&Le.stack||Le)}}function Xe(Ee,Se,Ae){var Ue=Ae||!1,Le=Se||null,ye=document.createElement("div");ye.innerHTML="<pre>"+Ee+"</pre>",ye=ye.firstChild,Ue&&De(ye,Ue,!0);var ve={langExtension:Le,numberLines:Ue,sourceNode:ye,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Re(ve),ye.innerHTML}function ut(Ee,Se){var Ae=Se||document.body,Ue=Ae.ownerDocument||document;function Le(w){return Ae.getElementsByTagName(w)}for(var ye=[Le("pre"),Le("code"),Le("xmp")],ve=[],st=0;st<ye.length;++st)for(var Qe=0,Ge=ye[st].length;Qe<Ge;++Qe)ve.push(ye[st][Qe]);ye=null;var Ve=Date;Ve.now||(Ve={now:function(){return+new Date}});var ht=0,ct=/\blang(?:uage)?-([\w.]+)(?!\S)/,nt=/\bprettyprint\b/,de=/\bprettyprinted\b/,dt=/pre|xmp/i,$e=/^code$/i,he=/^(?:pre|code|xmp)$/i,_e={};function g(){for(var w=P.PR_SHOULD_USE_CONTINUATION?Ve.now()+250:Infinity;ht<ve.length&&Ve.now()<w;ht++){for(var E=ve[ht],f=_e,h=E;h=h.previousSibling;){var v=h.nodeType,b=(v===7||v===8)&&h.nodeValue;if(b?!/^\??prettify\b/.test(b):v!==3||/\S/.test(h.nodeValue))break;if(b){f={},b.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Rt,ot,Mt){f[ot]=Mt});break}}var W=E.className;if((f!==_e||nt.test(W))&&!de.test(W)){for(var Z=!1,ie=E.parentNode;ie;ie=ie.parentNode){var Je=ie.tagName;if(he.test(Je)&&ie.className&&nt.test(ie.className)){Z=!0;break}}if(!Z){E.className+=" prettyprinted";var ft=f.lang;if(!ft){ft=W.match(ct);var Be;!ft&&(Be=oe(E))&&$e.test(Be.tagName)&&(ft=Be.className.match(ct)),ft&&(ft=ft[1])}var St;if(dt.test(E.tagName))St=1;else{var kt=E.currentStyle,qe=Ue.defaultView,Lt=kt?kt.whiteSpace:qe&&qe.getComputedStyle?qe.getComputedStyle(E,null).getPropertyValue("white-space"):0;St=Lt&&Lt.substring(0,3)==="pre"}var yt=f.linenums;(yt=yt==="true"||+yt)||(yt=W.match(/\blinenums\b(?::(\d+))?/),yt=yt?yt[1]&&yt[1].length?+yt[1]:!0:!1),yt&&De(E,yt,St);var Ut={langExtension:ft,sourceNode:E,numberLines:yt,pre:St,sourceCode:null,basePos:null,spans:null,decorations:null};Re(Ut)}}}ht<ve.length?P.setTimeout(g,250):typeof Ee=="function"&&Ee()}g()}var Fe=P.PR={createSimpleLexer:Oe,registerLangHandler:K,sourceDecorator:je,PR_ATTRIB_NAME:D,PR_ATTRIB_VALUE:te,PR_COMMENT:Q,PR_DECLARATION:R,PR_KEYWORD:d,PR_LITERAL:re,PR_NOCODE:B,PR_PLAIN:p,PR_PUNCTUATION:S,PR_SOURCE:_,PR_STRING:J,PR_TAG:T,PR_TYPE:U,prettyPrintOne:V?P.prettyPrintOne=Xe:le=Xe,prettyPrint:L=V?P.prettyPrint=ut:L=ut},Ie=P.define;typeof Ie=="function"&&Ie.amd&&Ie("google-code-prettify",[],function(){return Fe})})()},"VrN/":function(mt,Ke,m){(function(F,we){mt.exports=we()})(this,function(){"use strict";var F=navigator.userAgent,we=navigator.platform,V=/gecko\/\d/i.test(F),ge=/MSIE \d/.test(F),me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F),le=/Edge\/(\d+)/.exec(F),L=ge||me||le,P=L&&(ge?document.documentMode||6:+(le||me)[1]),x=!le&&/WebKit\//.test(F),ne=x&&/Qt\/\d+\.\d+/.test(F),H=!le&&/Chrome\//.test(F),q=/Opera\//.test(F),ce=/Apple Computer/.test(navigator.vendor),j=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(F),I=/PhantomJS/.test(F),N=!le&&/AppleWebKit/.test(F)&&/Mobile\/\w+/.test(F),M=/Android/.test(F),ee=N||M||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(F),G=N||/Mac/.test(we),ae=/\bCrOS\b/.test(F),Te=/win/i.test(we),Y=q&&F.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(q=!1,x=!0);var J=G&&(ne||q&&(Y==null||Y<12.11)),d=V||L&&P>=9;function Q(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var U=function(e,t){var r=e.className,n=Q(t).exec(r);if(n){var a=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(a?n[1]+a:"")}};function re(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function S(e,t){return re(e).appendChild(t)}function p(e,t,r,n){var a=document.createElement(e);if(r&&(a.className=r),n&&(a.style.cssText=n),typeof t=="string")a.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)a.appendChild(t[i]);return a}function T(e,t,r,n){var a=p(e,t,r,n);return a.setAttribute("role","presentation"),a}var R;document.createRange?R=function(e,t,r,n){var a=document.createRange();return a.setEnd(n||e,r),a.setStart(e,t),a}:R=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(a){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function _(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 D(){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 te(e,t){var r=e.className;Q(t).test(r)||(e.className+=(r?" ":"")+t)}function B(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!Q(r[n]).test(t)&&(t+=" "+r[n]);return t}var fe=function(e){e.select()};N?fe=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:L&&(fe=function(e){try{e.select()}catch(t){}});function y(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function A(e,t,r,n,a){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var i=n||0,o=a||0;;){var s=e.indexOf(" ",i);if(s<0||s>=t)return o+(t-i);o+=s-i,o+=r-o%r,i=s+1}}var se=function(){this.id=null,this.f=null,this.time=0,this.handler=y(this.onTimeout,this)};se.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},se.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 oe(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Oe=50,je={toString:function(){return"CodeMirror.Pass"}},ue={scroll:!1},De={origin:"*mouse"},be={origin:"+move"};function xe(e,t,r){for(var n=0,a=0;;){var i=e.indexOf(" ",n);i==-1&&(i=e.length);var o=i-n;if(i==e.length||a+o>=t)return n+Math.min(o,t-a);if(a+=i-n,a+=r-a%r,n=i+1,a>=t)return n}}var K=[""];function O(e){for(;K.length<=e;)K.push(Re(K)+" ");return K[e]}function Re(e){return e[e.length-1]}function Xe(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function ut(e,t,r){for(var n=0,a=r(t);n<e.length&&r(e[n])<=a;)n++;e.splice(n,0,t)}function Fe(){}function Ie(e,t){var r;return Object.create?r=Object.create(e):(Fe.prototype=e,r=new Fe),t&&c(t,r),r}var Ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Se(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ee.test(e))}function Ae(e,t){return t?t.source.indexOf("\\w")>-1&&Se(e)?!0:t.test(e):Se(e)}function Ue(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 ye(e){return e.charCodeAt(0)>=768&&Le.test(e)}function ve(e,t,r){for(;(r<0?t>0:t<e.length)&&ye(e.charAt(t));)t+=r;return t}function st(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var a=(t+r)/2,i=n<0?Math.ceil(a):Math.floor(a);if(i==t)return e(i)?t:r;e(i)?r=i:t=i+n}}function Qe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var a=!1,i=0;i<e.length;++i){var o=e[i];(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",i),a=!0)}a||n(t,r,"ltr")}var Ge=null;function Ve(e,t,r){var n;Ge=null;for(var a=0;a<e.length;++a){var i=e[a];if(i.from<t&&i.to>t)return a;i.to==t&&(i.from!=i.to&&r=="before"?n=a:Ge=a),i.from==t&&(i.from!=i.to&&r!="before"?n=a:Ge=a)}return n!=null?n:Ge}var ht=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(u,C,k){this.level=u,this.from=C,this.to=k}return function(u,C){var k=C=="ltr"?"L":"R";if(u.length==0||C=="ltr"&&!n.test(u))return!1;for(var X=u.length,z=[],pe=0;pe<X;++pe)z.push(r(u.charCodeAt(pe)));for(var ke=0,Ne=k;ke<X;++ke){var ze=z[ke];ze=="m"?z[ke]=Ne:Ne=ze}for(var Ze=0,He=k;Ze<X;++Ze){var it=z[Ze];it=="1"&&He=="r"?z[Ze]="n":i.test(it)&&(He=it,it=="r"&&(z[Ze]="R"))}for(var wt=1,_t=z[0];wt<X-1;++wt){var Nt=z[wt];Nt=="+"&&_t=="1"&&z[wt+1]=="1"?z[wt]="1":Nt==","&&_t==z[wt+1]&&(_t=="1"||_t=="n")&&(z[wt]=_t),_t=Nt}for(var Gt=0;Gt<X;++Gt){var vn=z[Gt];if(vn==",")z[Gt]="N";else if(vn=="%"){var tn=void 0;for(tn=Gt+1;tn<X&&z[tn]=="%";++tn);for(var Fn=Gt&&z[Gt-1]=="!"||tn<X&&z[tn]=="1"?"1":"N",Nn=Gt;Nn<tn;++Nn)z[Nn]=Fn;Gt=tn-1}}for(var dn=0,Un=k;dn<X;++dn){var yn=z[dn];Un=="L"&&yn=="1"?z[dn]="L":i.test(yn)&&(Un=yn)}for(var pn=0;pn<X;++pn)if(a.test(z[pn])){var fn=void 0;for(fn=pn+1;fn<X&&a.test(z[fn]);++fn);for(var rn=(pn?z[pn-1]:k)=="L",jn=(fn<X?z[fn]:k)=="L",Yr=rn==jn?rn?"L":"R":k,vr=pn;vr<fn;++vr)z[vr]=Yr;pn=fn-1}for(var kn=[],Qn,bn=0;bn<X;)if(o.test(z[bn])){var Ui=bn;for(++bn;bn<X&&o.test(z[bn]);++bn);kn.push(new l(0,Ui,bn))}else{var ar=bn,Pr=kn.length,Ar=C=="rtl"?1:0;for(++bn;bn<X&&z[bn]!="L";++bn);for(var Pn=ar;Pn<bn;)if(s.test(z[Pn])){ar<Pn&&(kn.splice(Pr,0,new l(1,ar,Pn)),Pr+=Ar);var Zr=Pn;for(++Pn;Pn<bn&&s.test(z[Pn]);++Pn);kn.splice(Pr,0,new l(2,Zr,Pn)),Pr+=Ar,ar=Pn}else++Pn;ar<bn&&kn.splice(Pr,0,new l(1,ar,bn))}return C=="ltr"&&(kn[0].level==1&&(Qn=u.match(/^\s+/))&&(kn[0].from=Qn[0].length,kn.unshift(new l(0,0,Qn[0].length))),Re(kn).level==1&&(Qn=u.match(/\s+$/))&&(Re(kn).to-=Qn[0].length,kn.push(new l(0,X-Qn[0].length,X)))),C=="rtl"?kn.reverse():kn}}();function ct(e,t){var r=e.order;return r==null&&(r=e.order=ht(e.text,t)),r}var nt=[],de=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]||nt).concat(r)}};function dt(e,t){return e._handlers&&e._handlers[t]||nt}function $e(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,a=n&&n[t];if(a){var i=oe(a,r);i>-1&&(n[t]=a.slice(0,i).concat(a.slice(i+1)))}}}function he(e,t){var r=dt(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),a=0;a<r.length;++a)r[a].apply(null,n)}function _e(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),he(e,r||t.type,e,t),v(t)||t.codemirrorIgnore}function g(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)oe(r,t[n])==-1&&r.push(t[n])}function w(e,t){return dt(e,t).length>0}function E(e){e.prototype.on=function(t,r){de(this,t,r)},e.prototype.off=function(t,r){$e(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function h(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function v(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function b(e){f(e),h(e)}function W(e){return e.target||e.srcElement}function Z(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),G&&e.ctrlKey&&t==1&&(t=3),t}var ie=function(){if(L&&P<9)return!1;var e=p("div");return"draggable"in e||"dragDrop"in e}(),Je;function ft(e){if(Je==null){var t=p("span","\u200B");S(e,p("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Je=t.offsetWidth<=1&&t.offsetHeight>2&&!(L&&P<8))}var r=Je?p("span","\u200B"):p("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Be;function St(e){if(Be!=null)return Be;var t=S(e,document.createTextNode("A\u062EA")),r=R(t,0,1).getBoundingClientRect(),n=R(t,1,2).getBoundingClientRect();return re(e),!r||r.left==r.right?!1:Be=n.right-r.right<3}var kt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var a=e.indexOf(`
|
|
`,t);a==-1&&(a=e.length);var i=e.slice(t,e.charAt(a-1)=="\r"?a-1:a),o=i.indexOf("\r");o!=-1?(r.push(i.slice(0,o)),t+=o+1):(r.push(i),t=a+1)}return r}:function(e){return e.split(/\r\n?|\n/)},qe=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},Lt=function(){var e=p("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yt=null;function Ut(e){if(yt!=null)return yt;var t=S(e,p("span","x")),r=t.getBoundingClientRect(),n=R(t,0,1).getBoundingClientRect();return yt=Math.abs(r.left-n.left)>1}var Rt={},ot={};function Mt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Rt[e]=t}function Tt(e,t){ot[e]=t}function pt(e){if(typeof e=="string"&&ot.hasOwnProperty(e))e=ot[e];else if(e&&typeof e.name=="string"&&ot.hasOwnProperty(e.name)){var t=ot[e.name];typeof t=="string"&&(t={name:t}),e=Ie(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return pt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return pt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function rt(e,t){t=pt(t);var r=Rt[t.name];if(!r)return rt(e,"text/plain");var n=r(e,t);if(lt.hasOwnProperty(t.name)){var a=lt[t.name];for(var i in a){if(!a.hasOwnProperty(i))continue;n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=a[i]}}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 lt={};function Et(e,t){var r=lt.hasOwnProperty(e)?lt[e]:lt[e]={};c(t,r)}function jt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var a=t[n];a instanceof Array&&(a=a.concat([])),r[n]=a}return r}function Dt(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 Xt(e,t,r){return e.startState?e.startState(t,r):!0}var It=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};It.prototype.eol=function(){return this.pos>=this.string.length},It.prototype.sol=function(){return this.pos==this.lineStart},It.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},It.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},It.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},It.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},It.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},It.prototype.skipToEnd=function(){this.pos=this.string.length},It.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},It.prototype.backUp=function(e){this.pos-=e},It.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=A(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?A(this.string,this.lineStart,this.tabSize):0)},It.prototype.indentation=function(){return A(this.string,null,this.tabSize)-(this.lineStart?A(this.string,this.lineStart,this.tabSize):0)},It.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},a=this.string.substr(this.pos,e.length);if(n(a)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}},It.prototype.current=function(){return this.string.slice(this.start,this.pos)},It.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},It.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},It.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function tt(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 a=r.children[n],i=a.chunkSize();if(t<i){r=a;break}t-=i}return r.lines[t]}function Ft(e,t,r){var n=[],a=t.line;return e.iter(t.line,r.line+1,function(i){var o=i.text;a==r.line&&(o=o.slice(0,r.ch)),a==t.line&&(o=o.slice(t.ch)),n.push(o),++a}),n}function vt(e,t,r){var n=[];return e.iter(t,r,function(a){n.push(a.text)}),n}function Bt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function xt(e){if(e.parent==null)return null;for(var t=e.parent,r=oe(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var a=0;!(n.children[a]==t);++a)r+=n.children[a].chunkSize();return r+t.first}function un(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var a=e.children[n],i=a.height;if(t<i){e=a;continue e}t-=i,r+=a.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o],l=s.height;if(t<l)break;t-=l}return r+o}function Hn(e,t){return t>=e.first&&t<e.first+e.size}function Xn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ce(e,t,r){if(r===void 0&&(r=null),!(this instanceof Ce))return new Ce(e,t,r);this.line=e,this.ch=t,this.sticky=r}function We(e,t){return e.line-t.line||e.ch-t.ch}function Pe(e,t){return e.sticky==t.sticky&&We(e,t)==0}function Yt(e){return Ce(e.line,e.ch)}function an(e,t){return We(e,t)<0?t:e}function nn(e,t){return We(e,t)<0?e:t}function Bn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ct(e,t){if(t.line<e.first)return Ce(e.first,0);var r=e.first+e.size-1;return t.line>r?Ce(r,tt(e,r).text.length):ir(t,tt(e,t.line).text.length)}function ir(e,t){var r=e.ch;return r==null||r>t?Ce(e.line,t):r<0?Ce(e.line,0):e}function or(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ct(e,t[n]);return r}var An=function(e,t){this.state=e,this.lookAhead=t},Ln=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Ln.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ln.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}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(e,t,r){return t instanceof An?new Ln(e,jt(e.mode,t.state),r,t.lookAhead):new Ln(e,jt(e.mode,t),r)},Ln.prototype.save=function(e){var t=e!==!1?jt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new An(t,this.maxLookAhead):t};function Lr(e,t,r,n){var a=[e.state.modeGen],i={};et(e,t.text,e.doc.mode,r,function(u,C){return a.push(u,C)},i,n);for(var o=r.state,s=function(u){r.baseTokens=a;var C=e.state.overlays[u],k=1,X=0;r.state=!0,et(e,t.text,C.mode,r,function(z,pe){for(var ke=k;X<z;){var Ne=a[k];Ne>z&&a.splice(k,1,z,a[k+1],Ne),k+=2,X=Math.min(z,Ne)}if(!pe)return;if(C.opaque)a.splice(ke,k-ke,z,"overlay "+pe),k=ke+2;else for(;ke<k;ke+=2){var ze=a[ke+1];a[ke+1]=(ze?ze+" ":"")+"overlay "+pe}},i),r.state=o,r.baseTokens=null,r.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:a,classes:i.bgClass||i.textClass?i:null}}function br(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=On(e,xt(t)),a=t.text.length>e.options.maxHighlightLength&&jt(e.doc.mode,n.state),i=Lr(e,t,n);a&&(n.state=a),t.stateAfter=n.save(!a),t.styles=i.styles,i.classes?t.styleClasses=i.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 On(e,t,r){var n=e.doc,a=e.display;if(!n.mode.startState)return new Ln(n,!0,t);var i=Ot(e,t,r),o=i>n.first&&tt(n,i-1).stateAfter,s=o?Ln.fromSaved(n,o,i):new Ln(n,Xt(n.mode),i);return n.iter(i,t,function(l){er(e,l.text,s);var u=s.line;l.stateAfter=u==t-1||u%5==0||u>=a.viewFrom&&u<a.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function er(e,t,r,n){var a=e.doc.mode,i=new It(t,e.options.tabSize,r);for(i.start=i.pos=n||0,t==""&&Ye(a,r.state);!i.eol();)$(a,i,r.state),i.start=i.pos}function Ye(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Dt(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function $(e,t,r,n){for(var a=0;a<10;a++){n&&(n[0]=Dt(e,r).mode);var i=e.token(t,r);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}var Me=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function gt(e,t,r,n){var a=e.doc,i=a.mode,o;t=Ct(a,t);var s=tt(a,t.line),l=On(e,t.line,r),u=new It(s.text,e.options.tabSize,l),C;for(n&&(C=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=$(i,u,l.state),n&&C.push(new Me(u,o,jt(a.mode,l.state)));return n?C:new Me(u,o,l.state)}function at(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 et(e,t,r,n,a,i,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var l=0,u=null,C=new It(t,e.options.tabSize,n),k,X=e.options.addModeClass&&[null];for(t==""&&at(Ye(r,n.state),i);!C.eol();){if(C.pos>e.options.maxHighlightLength?(s=!1,o&&er(e,t,n,C.pos),C.pos=t.length,k=null):k=at($(r,C,n.state,X),i),X){var z=X[0].name;z&&(k="m-"+(k?z+" "+k:z))}if(!s||u!=k){for(;l<C.start;)l=Math.min(C.start,l+5e3),a(l,u);u=k}C.start=C.pos}for(;l<C.pos;){var pe=Math.min(C.pos,l+5e3);a(pe,u),l=pe}}function Ot(e,t,r){for(var n,a,i=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=i.first)return i.first;var l=tt(i,s-1),u=l.stateAfter;if(u&&(!r||s+(u instanceof An?u.lookAhead:0)<=i.modeFrontier))return s;var C=A(l.text,null,e.options.tabSize);(a==null||n>C)&&(a=s-1,n=C)}return a}function Vt(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 a=tt(e,n).stateAfter;if(a&&(!(a instanceof An)||n+a.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Zt=!1,$t=!1;function on(){Zt=!0}function Rn(){$t=!0}function hn(e,t,r){this.marker=e,this.from=t,this.to=r}function En(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function _r(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function xn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function cn(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var i=e[a],o=i.marker,s=i.from==null||(o.inclusiveLeft?i.from<=t:i.from<t);if(s||i.from==t&&o.type=="bookmark"&&(!r||!i.marker.insertLeft)){var l=i.to==null||(o.inclusiveRight?i.to>=t:i.to>t);(n||(n=[])).push(new hn(o,i.from,l?null:i.to))}}return n}function tr(e,t,r){var n;if(e)for(var a=0;a<e.length;++a){var i=e[a],o=i.marker,s=i.to==null||(o.inclusiveRight?i.to>=t:i.to>t);if(s||i.from==t&&o.type=="bookmark"&&(!r||i.marker.insertLeft)){var l=i.from==null||(o.inclusiveLeft?i.from<=t:i.from<t);(n||(n=[])).push(new hn(o,l?null:i.from-t,i.to==null?null:i.to-t))}}return n}function Kn(e,t){if(t.full)return null;var r=Hn(e,t.from.line)&&tt(e,t.from.line).markedSpans,n=Hn(e,t.to.line)&&tt(e,t.to.line).markedSpans;if(!r&&!n)return null;var a=t.from.ch,i=t.to.ch,o=We(t.from,t.to)==0,s=cn(r,a,o),l=tr(n,i,o),u=t.text.length==1,C=Re(t.text).length+(u?a:0);if(s)for(var k=0;k<s.length;++k){var X=s[k];if(X.to==null){var z=En(l,X.marker);z?u&&(X.to=z.to==null?null:z.to+C):X.to=a}}if(l)for(var pe=0;pe<l.length;++pe){var ke=l[pe];if(ke.to!=null&&(ke.to+=C),ke.from==null){var Ne=En(s,ke.marker);Ne||(ke.from=C,u&&(s||(s=[])).push(ke))}else ke.from+=C,u&&(s||(s=[])).push(ke)}s&&(s=yr(s)),l&&l!=s&&(l=yr(l));var ze=[s];if(!u){var Ze=t.text.length-2,He;if(Ze>0&&s)for(var it=0;it<s.length;++it)s[it].to==null&&(He||(He=[])).push(new hn(s[it].marker,null,null));for(var wt=0;wt<Ze;++wt)ze.push(He);ze.push(l)}return ze}function yr(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 Oa(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(z){if(z.markedSpans)for(var pe=0;pe<z.markedSpans.length;++pe){var ke=z.markedSpans[pe].marker;ke.readOnly&&(!n||oe(n,ke)==-1)&&(n||(n=[])).push(ke)}}),!n)return null;for(var a=[{from:t,to:r}],i=0;i<n.length;++i)for(var o=n[i],s=o.find(0),l=0;l<a.length;++l){var u=a[l];if(We(u.to,s.from)<0||We(u.from,s.to)>0)continue;var C=[l,1],k=We(u.from,s.from),X=We(u.to,s.to);(k<0||!o.inclusiveLeft&&!k)&&C.push({from:u.from,to:s.from}),(X>0||!o.inclusiveRight&&!X)&&C.push({from:s.to,to:u.to}),a.splice.apply(a,C),l+=C.length-3}return a}function Qr(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function Er(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function Mr(e){return e.inclusiveLeft?-1:0}function Jn(e){return e.inclusiveRight?1:0}function ea(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),a=t.find(),i=We(n.from,a.from)||Mr(e)-Mr(t);if(i)return-i;var o=We(n.to,a.to)||Jn(e)-Jn(t);return o||t.id-e.id}function Ra(e,t){var r=$t&&e.markedSpans,n;if(r)for(var a=void 0,i=0;i<r.length;++i)a=r[i],a.marker.collapsed&&(t?a.from:a.to)==null&&(!n||ea(n,a.marker)<0)&&(n=a.marker);return n}function Ta(e){return Ra(e,!0)}function ta(e){return Ra(e,!1)}function Ii(e,t){var r=$t&&e.markedSpans,n;if(r)for(var a=0;a<r.length;++a){var i=r[a];i.marker.collapsed&&(i.from==null||i.from<t)&&(i.to==null||i.to>t)&&(!n||ea(n,i.marker)<0)&&(n=i.marker)}return n}function Qa(e,t,r,n,a){var i=tt(e,t),o=$t&&i.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(!l.marker.collapsed)continue;var u=l.marker.find(0),C=We(u.from,r)||Mr(l.marker)-Mr(a),k=We(u.to,n)||Jn(l.marker)-Jn(a);if(C>=0&&k<=0||C<=0&&k>=0)continue;if(C<=0&&(l.marker.inclusiveRight&&a.inclusiveLeft?We(u.to,r)>=0:We(u.to,r)>0)||C>=0&&(l.marker.inclusiveRight&&a.inclusiveLeft?We(u.from,n)<=0:We(u.from,n)<0))return!0}}function bt(e){for(var t;t=Ta(e);)e=t.find(-1,!0).line;return e}function Pt(e){for(var t;t=ta(e);)e=t.find(1,!0).line;return e}function At(e){for(var t,r;t=ta(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Ht(e,t){var r=tt(e,t),n=bt(r);return r==n?t:xt(n)}function Kt(e,t){if(t>e.lastLine())return t;var r=tt(e,t),n;if(!qt(e,r))return t;for(;n=ta(r);)r=n.find(1,!0).line;return xt(r)+1}function qt(e,t){var r=$t&&t.markedSpans;if(r)for(var n=void 0,a=0;a<r.length;++a){if(n=r[a],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&sn(e,t,n))return!0}}function sn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return sn(e,n.line,En(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var a=void 0,i=0;i<t.markedSpans.length;++i)if(a=t.markedSpans[i],a.marker.collapsed&&!a.marker.widgetNode&&a.from==r.to&&(a.to==null||a.to!=r.from)&&(a.marker.inclusiveLeft||r.marker.inclusiveRight)&&sn(e,t,a))return!0}function Qt(e){e=bt(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var a=r.lines[n];if(a==e)break;t+=a.height}for(var i=r.parent;i;r=i,i=r.parent)for(var o=0;o<i.children.length;++o){var s=i.children[o];if(s==r)break;t+=s.height}return t}function wn(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ta(n);){var a=r.find(0,!0);n=a.from.line,t+=a.from.ch-a.to.ch}for(n=e;r=ta(n);){var i=r.find(0,!0);t-=n.text.length-i.from.ch,n=i.to.line,t+=n.text.length-i.to.ch}return t}function Gn(e){var t=e.display,r=e.doc;t.maxLine=tt(r,r.first),t.maxLineLength=wn(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var a=wn(n);a>t.maxLineLength&&(t.maxLineLength=a,t.maxLine=n)})}var Jt=function(e,t,r){this.text=e,Er(this,t),this.height=r?r(this):1};Jt.prototype.lineNo=function(){return xt(this)},E(Jt);function sr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Qr(e),Er(e,r);var a=n?n(e):1;a!=e.height&&Bt(e,a)}function Cn(e){e.parent=null,Qr(e)}var lr={},ur={};function Dr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ur:lr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fi(e,t){var r=T("span",null,null,x?"padding-right: .1px":null),n={pre:T("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var a=0;a<=(t.rest?t.rest.length:0);a++){var i=a?t.rest[a-1]:t.line,o=void 0;n.pos=0,n.addToken=Ss,St(e.display.measure)&&(o=ct(i,e.doc.direction))&&(n.addToken=Os(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&xt(i);Rs(i,n,br(e,i,s)),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=B(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=B(i.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ft(e.display.measure))),a==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(x){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=B(n.pre.className,n.textClass||"")),n}function Cs(e){var t=p("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,a,i,o){if(!t)return;var s=e.splitSpaces?ks(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1,C;if(!l.test(t))e.col+=t.length,C=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,C),L&&P<9&&(u=!0),e.pos+=t.length;else{C=document.createDocumentFragment();for(var k=0;;){l.lastIndex=k;var X=l.exec(t),z=X?X.index-k:t.length-k;if(z){var pe=document.createTextNode(s.slice(k,k+z));L&&P<9?C.appendChild(p("span",[pe])):C.appendChild(pe),e.map.push(e.pos,e.pos+z,pe),e.col+=z,e.pos+=z}if(!X)break;k+=z+1;var ke=void 0;if(X[0]==" "){var Ne=e.cm.options.tabSize,ze=Ne-e.col%Ne;ke=C.appendChild(p("span",O(ze),"cm-tab")),ke.setAttribute("role","presentation"),ke.setAttribute("cm-text"," "),e.col+=ze}else X[0]=="\r"||X[0]==`
|
|
`?(ke=C.appendChild(p("span",X[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ke.setAttribute("cm-text",X[0]),e.col+=1):(ke=e.cm.options.specialCharPlaceholder(X[0]),ke.setAttribute("cm-text",X[0]),L&&P<9?C.appendChild(p("span",[ke])):C.appendChild(ke),e.col+=1);e.map.push(e.pos,e.pos+1,ke),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||a||u||i||o){var Ze=r||"";n&&(Ze+=n),a&&(Ze+=a);var He=p("span",[C],Ze,i);if(o)for(var it in o)o.hasOwnProperty(it)&&it!="style"&&it!="class"&&He.setAttribute(it,o[it]);return e.content.appendChild(He)}e.content.appendChild(C)}function ks(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",a=0;a<e.length;a++){var i=e.charAt(a);i==" "&&r&&(a==e.length-1||e.charCodeAt(a+1)==32)&&(i="\xA0"),n+=i,r=i==" "}return n}function Os(e,t){return function(r,n,a,i,o,s,l){a=a?a+" cm-force-border":"cm-force-border";for(var u=r.pos,C=u+n.length;;){for(var k=void 0,X=0;X<t.length&&!(k=t[X],k.to>u&&k.from<=u);X++);if(k.to>=C)return e(r,n,a,i,o,s,l);e(r,n.slice(0,k.to-u),a,i,null,s,l),i=null,n=n.slice(k.to-u),u=k.to}}}function Bi(e,t,r,n){var a=!n&&r.widgetNode;a&&e.map.push(e.pos,e.pos+t,a),!n&&e.cm.display.input.needsContentAttribute&&(a||(a=e.content.appendChild(document.createElement("span"))),a.setAttribute("cm-marker",r.id)),a&&(e.cm.display.input.setUneditable(a),e.content.appendChild(a)),e.pos+=t,e.trailingSpace=!1}function Rs(e,t,r){var n=e.markedSpans,a=e.text,i=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,a.slice(i,i=r[o]),Dr(r[o+1],t.cm.options));return}for(var s=a.length,l=0,u=1,C="",k,X,z=0,pe,ke,Ne,ze,Ze;;){if(z==l){pe=ke=Ne=X="",Ze=null,ze=null,z=Infinity;for(var He=[],it=void 0,wt=0;wt<n.length;++wt){var _t=n[wt],Nt=_t.marker;if(Nt.type=="bookmark"&&_t.from==l&&Nt.widgetNode)He.push(Nt);else if(_t.from<=l&&(_t.to==null||_t.to>l||Nt.collapsed&&_t.to==l&&_t.from==l)){if(_t.to!=null&&_t.to!=l&&z>_t.to&&(z=_t.to,ke=""),Nt.className&&(pe+=" "+Nt.className),Nt.css&&(X=(X?X+";":"")+Nt.css),Nt.startStyle&&_t.from==l&&(Ne+=" "+Nt.startStyle),Nt.endStyle&&_t.to==z&&(it||(it=[])).push(Nt.endStyle,_t.to),Nt.title&&((Ze||(Ze={})).title=Nt.title),Nt.attributes)for(var Gt in Nt.attributes)(Ze||(Ze={}))[Gt]=Nt.attributes[Gt];Nt.collapsed&&(!ze||ea(ze.marker,Nt)<0)&&(ze=_t)}else _t.from>l&&z>_t.from&&(z=_t.from)}if(it)for(var vn=0;vn<it.length;vn+=2)it[vn+1]==z&&(ke+=" "+it[vn]);if(!ze||ze.from==l)for(var tn=0;tn<He.length;++tn)Bi(t,0,He[tn]);if(ze&&(ze.from||0)==l){if(Bi(t,(ze.to==null?s+1:ze.to)-l,ze.marker,ze.from==null),ze.to==null)return;ze.to==l&&(ze=!1)}}if(l>=s)break;for(var Fn=Math.min(s,z);;){if(C){var Nn=l+C.length;if(!ze){var dn=Nn>Fn?C.slice(0,Fn-l):C;t.addToken(t,dn,k?k+pe:pe,Ne,l+dn.length==z?ke:"",X,Ze)}if(Nn>=Fn){C=C.slice(Fn-l),l=Fn;break}l=Nn,Ne=""}C=a.slice(i,i=r[u++]),k=Dr(r[u++],t.cm.options)}}}function Wi(e,t,r){this.line=t,this.rest=At(t),this.size=this.rest?xt(Re(this.rest))-r+1:1,this.node=this.text=null,this.hidden=qt(e,t)}function Pa(e,t,r){for(var n=[],a,i=t;i<r;i=a){var o=new Wi(e.doc,tt(e.doc,i),i);a=i+o.size,n.push(o)}return n}var Nr=null;function Ts(e){Nr?Nr.ops.push(e):e.ownsGroup=Nr={ops:[e],delayedCallbacks:[]}}function Ps(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 a=e.ops[n];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(r<t.length)}function As(e,t){var r=e.ownsGroup;if(!r)return;try{Ps(r)}finally{Nr=null,t(r)}}var na=null;function _n(e,t){var r=dt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),a;Nr?a=Nr.delayedCallbacks:na?a=na:(a=na=[],setTimeout(Ls,0));for(var i=function(s){a.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)i(o)}function Ls(){var e=na;na=null;for(var t=0;t<e.length;++t)e[t]()}function zi(e,t,r,n){for(var a=0;a<t.changes.length;a++){var i=t.changes[a];i=="text"?Ds(e,t):i=="gutter"?Ki(e,t,r,n):i=="class"?ei(e,t):i=="widget"&&Ns(e,t,n)}t.changes=null}function ra(e){return e.node==e.text&&(e.node=p("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),L&&P<8&&(e.node.style.zIndex=2)),e.node}function Ms(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=ra(t);t.background=n.insertBefore(p("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Hi(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Fi(e,t)}function Ds(e,t){var r=t.text.className,n=Hi(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,ei(e,t)):r&&(t.text.className=r)}function ei(e,t){Ms(e,t),t.line.wrapClass?ra(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 Ki(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 a=ra(t);t.gutterBackground=p("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),a.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=ra(t),s=t.gutter=p("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&&(!i||!i["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(p("div",Xn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<e.display.gutterSpecs.length;++l){var u=e.display.gutterSpecs[l].className,C=i.hasOwnProperty(u)&&i[u];C&&s.appendChild(p("div",[C],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=Q("CodeMirror-linewidget"),a=t.node.firstChild,i=void 0;a;a=i)i=a.nextSibling,n.test(a.className)&&t.node.removeChild(a);Xi(e,t,r)}function Us(e,t,r,n){var a=Hi(e,t);return t.text=t.node=a.pre,a.bgClass&&(t.bgClass=a.bgClass),a.textClass&&(t.textClass=a.textClass),ei(e,t),Ki(e,t,r,n),Xi(e,t,n),t.node}function Xi(e,t,r){if(Gi(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Gi(e,t.rest[n],t,r,!1)}function Gi(e,t,r,n,a){if(!t.widgets)return;for(var i=ra(r),o=0,s=t.widgets;o<s.length;++o){var l=s[o],u=p("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),js(l,u,r,n),e.display.input.setUneditable(u),a&&l.above?i.insertBefore(u,r.gutter||r.text):i.appendChild(u),_n(l,"redraw")}}function js(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var a=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(a-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=a+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function aa(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!_(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;"),S(t.display.measure,p("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function nr(e,t){for(var r=W(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 Aa(e){return e.lineSpace.offsetTop}function ti(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Vi(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=S(e.measure,p("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 Yn(e){return Oe-e.display.nativeBarWidth}function xr(e){return e.display.scroller.clientWidth-Yn(e)-e.display.barWidth}function ni(e){return e.display.scroller.clientHeight-Yn(e)-e.display.barHeight}function Is(e,t,r){var n=e.options.lineWrapping,a=n&&xr(e);if(!t.measure.heights||n&&t.measure.width!=a){var i=t.measure.heights=[];if(n){t.measure.width=a;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var l=o[s],u=o[s+1];Math.abs(l.bottom-u.bottom)>2&&i.push((l.bottom+u.top)/2-r.top)}}i.push(r.bottom-r.top)}}function $i(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 a=0;a<e.rest.length;a++)if(xt(e.rest[a])>r)return{map:e.measure.maps[a],cache:e.measure.caches[a],before:!0}}function Fs(e,t){t=bt(t);var r=xt(t),n=e.display.externalMeasured=new Wi(e.doc,t,r);n.lineN=r;var a=n.built=Fi(e,n);return n.text=a.pre,S(e.display.lineMeasure,a.pre),n}function qi(e,t,r,n){return Zn(e,Ur(e,t),r,n)}function ri(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Sr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Ur(e,t){var r=xt(t),n=ri(e,r);n&&!n.text?n=null:n&&n.changes&&(zi(e,n,r,ui(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var a=$i(n,t,r);return{line:t,view:n,rect:null,map:a.map,cache:a.cache,before:a.before,hasHeights:!1}}function Zn(e,t,r,n,a){t.before&&(r=-1);var i=r+(n||""),o;return t.cache.hasOwnProperty(i)?o=t.cache[i]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Is(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[i]=o)),{left:o.left,right:o.right,top:a?o.rtop:o.top,bottom:a?o.rbottom:o.bottom}}var Ji={left:0,right:0,top:0,bottom:0};function Yi(e,t,r){for(var n,a,i,o,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(a=0,i=1,o="left"):t<l?(a=t-s,i=a+1):(u==e.length-3||t==l&&e[u+3]>t)&&(i=l-s,a=i-1,t>=l&&(o="right")),a!=null){if(n=e[u+2],s==l&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&a==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],o="left";if(r=="right"&&a==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],o="right";break}return{node:n,start:a,end:i,collapse:o,coverStart:s,coverEnd:l}}function Bs(e,t){var r=Ji;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var a=e.length-1;a>=0&&!((r=e[a]).left!=r.right);a--);return r}function Ws(e,t,r,n){var a=Yi(t.map,r,n),i=a.node,o=a.start,s=a.end,l=a.collapse,u;if(i.nodeType==3){for(var C=0;C<4;C++){for(;o&&ye(t.line.text.charAt(a.coverStart+o));)--o;for(;a.coverStart+s<a.coverEnd&&ye(t.line.text.charAt(a.coverStart+s));)++s;if(L&&P<9&&o==0&&s==a.coverEnd-a.coverStart?u=i.parentNode.getBoundingClientRect():u=Bs(R(i,o,s).getClientRects(),n),u.left||u.right||o==0)break;s=o,o=o-1,l="right"}L&&P<11&&(u=zs(e.display.measure,u))}else{o>0&&(l=n="right");var k;e.options.lineWrapping&&(k=i.getClientRects()).length>1?u=k[n=="right"?k.length-1:0]:u=i.getBoundingClientRect()}if(L&&P<9&&!o&&(!u||!u.left&&!u.right)){var X=i.parentNode.getClientRects()[0];X?u={left:X.left,right:X.left+Ir(e.display),top:X.top,bottom:X.bottom}:u=Ji}for(var z=u.top-t.rect.top,pe=u.bottom-t.rect.top,ke=(z+pe)/2,Ne=t.view.measure.heights,ze=0;ze<Ne.length-1&&!(ke<Ne[ze]);ze++);var Ze=ze?Ne[ze-1]:0,He=Ne[ze],it={left:(l=="right"?u.right:u.left)-t.rect.left,right:(l=="left"?u.left:u.right)-t.rect.left,top:Ze,bottom:He};return!u.left&&!u.right&&(it.bogus=!0),e.options.singleCursorHeightPerLine||(it.rtop=z,it.rbottom=pe),it}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ut(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 Zi(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 Qi(e){e.display.externalMeasure=null,re(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Zi(e.display.view[t])}function ia(e){Qi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function eo(){return H&&M?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return H&&M?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ai(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=aa(e.widgets[r]));return t}function La(e,t,r,n,a){if(!a){var i=ai(t);r.top+=i,r.bottom+=i}if(n=="line")return r;n||(n="local");var o=Qt(t);if(n=="local"?o+=Aa(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:to());var l=s.left+(n=="window"?0:eo());r.left+=l,r.right+=l}return r.top+=o,r.bottom+=o,r}function no(e,t,r){if(r=="div")return t;var n=t.left,a=t.top;if(r=="page")n-=eo(),a-=to();else if(r=="local"||!r){var i=e.display.sizer.getBoundingClientRect();n+=i.left,a+=i.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:a-o.top}}function ii(e,t,r,n,a){return n||(n=tt(e.doc,t.line)),La(e,n,qi(e,n,t.ch,a),r)}function Vn(e,t,r,n,a,i){n=n||tt(e.doc,t.line),a||(a=Ur(e,n));function o(pe,ke){var Ne=Zn(e,a,pe,ke?"right":"left",i);return ke?Ne.left=Ne.right:Ne.right=Ne.left,La(e,n,Ne,r)}var s=ct(n,e.doc.direction),l=t.ch,u=t.sticky;if(l>=n.text.length?(l=n.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return o(u=="before"?l-1:l,u=="before");function C(pe,ke,Ne){var ze=s[ke],Ze=ze.level==1;return o(Ne?pe-1:pe,Ze!=Ne)}var k=Ve(s,l,u),X=Ge,z=C(l,k,u=="before");return X!=null&&(z.other=C(l,X,u!="before")),z}function ro(e,t){var r=0;t=Ct(e.doc,t),e.options.lineWrapping||(r=Ir(e.display)*t.ch);var n=tt(e.doc,t.line),a=Qt(n)+Aa(e.display);return{left:r,right:r,top:a,bottom:a+n.height}}function oi(e,t,r,n,a){var i=Ce(e,t,r);return i.xRel=a,n&&(i.outside=n),i}function si(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return oi(n.first,0,null,-1,-1);var a=un(n,r),i=n.first+n.size-1;if(a>i)return oi(n.first+n.size-1,tt(n,i).text.length,null,1,1);t<0&&(t=0);for(var o=tt(n,a);;){var s=Hs(e,o,a,t,r),l=Ii(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==a)return u;o=tt(n,a=u.line)}}function ao(e,t,r,n){n-=ai(t);var a=t.text.length,i=st(function(o){return Zn(e,r,o-1).bottom<=n},a,0);return a=st(function(o){return Zn(e,r,o).top>n},i,a),{begin:i,end:a}}function io(e,t,r,n){r||(r=Ur(e,t));var a=La(e,t,Zn(e,r,n),"line").top;return ao(e,t,r,a)}function li(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Hs(e,t,r,n,a){a-=Qt(t);var i=Ur(e,t),o=ai(t),s=0,l=t.text.length,u=!0,C=ct(t,e.doc.direction);if(C){var k=(e.options.lineWrapping?Xs:Ks)(e,t,r,i,C,n,a);u=k.level!=1,s=u?k.from:k.to-1,l=u?k.to:k.from-1}var X=null,z=null,pe=st(function(wt){var _t=Zn(e,i,wt);return _t.top+=o,_t.bottom+=o,li(_t,n,a,!1)?(_t.top<=a&&_t.left<=n&&(X=wt,z=_t),!0):!1},s,l),ke,Ne,ze=!1;if(z){var Ze=n-z.left<z.right-n,He=Ze==u;pe=X+(He?0:1),Ne=He?"after":"before",ke=Ze?z.left:z.right}else{!u&&(pe==l||pe==s)&&pe++,Ne=pe==0?"after":pe==t.text.length?"before":Zn(e,i,pe-(u?1:0)).bottom+o<=a==u?"after":"before";var it=Vn(e,Ce(r,pe,Ne),"line",t,i);ke=it.left,ze=a<it.top?-1:a>=it.bottom?1:0}return pe=ve(t.text,pe,1),oi(r,pe,Ne,ze,n-ke)}function Ks(e,t,r,n,a,i,o){var s=st(function(k){var X=a[k],z=X.level!=1;return li(Vn(e,Ce(r,z?X.to:X.from,z?"before":"after"),"line",t,n),i,o,!0)},0,a.length-1),l=a[s];if(s>0){var u=l.level!=1,C=Vn(e,Ce(r,u?l.from:l.to,u?"after":"before"),"line",t,n);li(C,i,o,!0)&&C.top>o&&(l=a[s-1])}return l}function Xs(e,t,r,n,a,i,o){var s=ao(e,t,n,o),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var C=null,k=null,X=0;X<a.length;X++){var z=a[X];if(z.from>=u||z.to<=l)continue;var pe=z.level!=1,ke=Zn(e,n,pe?Math.min(u,z.to)-1:Math.max(l,z.from)).right,Ne=ke<i?i-ke+1e9:ke-i;(!C||k>Ne)&&(C=z,k=Ne)}return C||(C=a[a.length-1]),C.from<l&&(C={from:l,to:C.to,level:C.level}),C.to>u&&(C={from:C.from,to:u,level:C.level}),C}var wr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(wr==null){wr=p("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)wr.appendChild(document.createTextNode("x")),wr.appendChild(p("br"));wr.appendChild(document.createTextNode("x"))}S(e.measure,wr);var r=wr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),re(e.measure),r||1}function Ir(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=p("span","xxxxxxxxxx"),r=p("pre",[t],"CodeMirror-line-like");S(e.measure,r);var n=t.getBoundingClientRect(),a=(n.right-n.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function ui(e){for(var t=e.display,r={},n={},a=t.gutters.clientLeft,i=t.gutters.firstChild,o=0;i;i=i.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=i.offsetLeft+i.clientLeft+a,n[s]=i.clientWidth}return{fixedPos:ci(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ci(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function oo(e){var t=jr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Ir(e.display)-3);return function(a){if(qt(e.doc,a))return 0;var i=0;if(a.widgets)for(var o=0;o<a.widgets.length;o++)a.widgets[o].height&&(i+=a.widgets[o].height);return r?i+(Math.ceil(a.text.length/n)||1)*t:i+t}}function di(e){var t=e.doc,r=oo(e);t.iter(function(n){var a=r(n);a!=n.height&&Bt(n,a)})}function Cr(e,t,r,n){var a=e.display;if(!r&&W(t).getAttribute("cm-not-content")=="true")return null;var i,o,s=a.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,o=t.clientY-s.top}catch(k){return null}var l=si(e,i,o),u;if(n&&l.xRel>0&&(u=tt(e.doc,l.line).text).length==l.ch){var C=A(u,u.length,e.options.tabSize)-u.length;l=Ce(l.line,Math.max(0,Math.round((i-Vi(e.display).left)/Ir(e.display))-C))}return l}function Sr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Mn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var a=e.display;if(n&&r<a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>t)&&(a.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=a.viewTo)$t&&Ht(e.doc,t)<a.viewTo&&dr(e);else if(r<=a.viewFrom)$t&&Kt(e.doc,r+n)>a.viewFrom?dr(e):(a.viewFrom+=n,a.viewTo+=n);else if(t<=a.viewFrom&&r>=a.viewTo)dr(e);else if(t<=a.viewFrom){var i=Ma(e,r,r+n,1);i?(a.view=a.view.slice(i.index),a.viewFrom=i.lineN,a.viewTo+=n):dr(e)}else if(r>=a.viewTo){var o=Ma(e,t,t,-1);o?(a.view=a.view.slice(0,o.index),a.viewTo=o.lineN):dr(e)}else{var s=Ma(e,t,t,-1),l=Ma(e,r,r+n,1);s&&l?(a.view=a.view.slice(0,s.index).concat(Pa(e,s.lineN,l.lineN)).concat(a.view.slice(l.index)),a.viewTo+=n):dr(e)}var u=a.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(a.externalMeasured=null))}function cr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var i=n.view[Sr(e,t)];if(i.node==null)return;var o=i.changes||(i.changes=[]);oe(o,r)==-1&&o.push(r)}function dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ma(e,t,r,n){var a=Sr(e,t),i,o=e.display.view;if(!$t||r==e.doc.first+e.doc.size)return{index:a,lineN:r};for(var s=e.display.viewFrom,l=0;l<a;l++)s+=o[l].size;if(s!=t){if(n>0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,r+=i}for(;Ht(e.doc,r)!=r;){if(a==(n<0?0:o.length-1))return null;r+=n*o[a-(n<0?1:0)].size,a+=n}return{index:a,lineN:r}}function Gs(e,t,r){var n=e.display,a=n.view;a.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Pa(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Pa(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Sr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Pa(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Sr(e,r)))),n.viewTo=r}function so(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var a=t[n];!a.hidden&&(!a.node||a.changes)&&++r}return r}function oa(e){e.display.input.showSelection(e.display.input.prepareSelection())}function lo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},a=n.cursors=document.createDocumentFragment(),i=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var l=s.empty();(l||e.options.showCursorWhenSelecting)&&uo(e,s.head,a),l||Vs(e,s,i)}return n}function uo(e,t,r){var n=Vn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),a=r.appendChild(p("div","\xA0","CodeMirror-cursor"));if(a.style.left=n.left+"px",a.style.top=n.top+"px",a.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var i=r.appendChild(p("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=n.other.left+"px",i.style.top=n.other.top+"px",i.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Da(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,r){var n=e.display,a=e.doc,i=document.createDocumentFragment(),o=Vi(e.display),s=o.left,l=Math.max(n.sizerWidth,xr(e)-n.sizer.offsetLeft)-o.right,u=a.direction=="ltr";function C(He,it,wt,_t){it<0&&(it=0),it=Math.round(it),_t=Math.round(_t),i.appendChild(p("div",null,"CodeMirror-selected","position: absolute; left: "+He+`px;
|
|
top: `+it+"px; width: "+(wt==null?l-He:wt)+`px;
|
|
height: `+(_t-it)+"px"))}function k(He,it,wt){var _t=tt(a,He),Nt=_t.text.length,Gt,vn;function tn(dn,Un){return ii(e,Ce(He,dn),"div",_t,Un)}function Fn(dn,Un,yn){var pn=io(e,_t,null,dn),fn=Un=="ltr"==(yn=="after")?"left":"right",rn=yn=="after"?pn.begin:pn.end-(/\s/.test(_t.text.charAt(pn.end-1))?2:1);return tn(rn,fn)[fn]}var Nn=ct(_t,a.direction);return Qe(Nn,it||0,wt==null?Nt:wt,function(dn,Un,yn,pn){var fn=yn=="ltr",rn=tn(dn,fn?"left":"right"),jn=tn(Un-1,fn?"right":"left"),Yr=it==null&&dn==0,vr=wt==null&&Un==Nt,kn=pn==0,Qn=!Nn||pn==Nn.length-1;if(jn.top-rn.top<=3){var bn=(u?Yr:vr)&&kn,Ui=(u?vr:Yr)&&Qn,ar=bn?s:(fn?rn:jn).left,Pr=Ui?l:(fn?jn:rn).right;C(ar,rn.top,Pr-ar,rn.bottom)}else{var Ar,Pn,Zr,ji;fn?(Ar=u&&Yr&&kn?s:rn.left,Pn=u?l:Fn(dn,yn,"before"),Zr=u?s:Fn(Un,yn,"after"),ji=u&&vr&&Qn?l:jn.right):(Ar=u?Fn(dn,yn,"before"):s,Pn=!u&&Yr&&kn?l:rn.right,Zr=!u&&vr&&Qn?s:jn.left,ji=u?Fn(Un,yn,"after"):l),C(Ar,rn.top,Pn-Ar,rn.bottom),rn.bottom<jn.top&&C(s,rn.bottom,null,jn.top),C(Zr,jn.top,ji-Zr,jn.bottom)}(!Gt||Da(rn,Gt)<0)&&(Gt=rn),Da(jn,Gt)<0&&(Gt=jn),(!vn||Da(rn,vn)<0)&&(vn=rn),Da(jn,vn)<0&&(vn=jn)}),{start:Gt,end:vn}}var X=t.from(),z=t.to();if(X.line==z.line)k(X.line,X.ch,z.ch);else{var pe=tt(a,X.line),ke=tt(a,z.line),Ne=bt(pe)==bt(ke),ze=k(X.line,X.ch,Ne?pe.text.length+1:null).end,Ze=k(z.line,Ne?0:null,z.ch).start;Ne&&(ze.top<Ze.top-2?(C(ze.right,ze.top,null,ze.bottom),C(s,Ze.top,Ze.left,Ze.bottom)):C(ze.right,ze.top,Ze.left-ze.right,ze.bottom)),ze.bottom<Ze.top&&C(s,ze.bottom,null,Ze.top)}r.appendChild(i)}function fi(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()||Fr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function co(e){e.state.focused||(e.display.input.focus(),hi(e))}function fo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Fr(e))},100)}function hi(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,te(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),x&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),fi(e)}function Fr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,U(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Na(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var a=t.view[n],i=e.options.lineWrapping,o=void 0,s=0;if(a.hidden)continue;if(L&&P<8){var l=a.node.offsetTop+a.node.offsetHeight;o=l-r,r=l}else{var u=a.node.getBoundingClientRect();o=u.bottom-u.top,!i&&a.text.firstChild&&(s=a.text.firstChild.getBoundingClientRect().right-u.left-1)}var C=a.line.height-o;if((C>.005||C<-.005)&&(Bt(a.line,o),ho(a.line),a.rest))for(var k=0;k<a.rest.length;k++)ho(a.rest[k]);if(s>e.display.sizerWidth){var X=Math.ceil(s/Ir(e.display));X>e.display.maxLineLength&&(e.display.maxLineLength=X,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}function ho(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Ua(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Aa(e));var a=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,i=un(t,n),o=un(t,a);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<i?(i=s,o=un(t,Qt(tt(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(i=un(t,Qt(tt(t,l))-e.wrapper.clientHeight),o=l)}return{from:i,to:Math.max(o,i+1)}}function $s(e,t){if(_e(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),a=null;if(t.top+n.top<0?a=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(a=!1),a!=null&&!I){var i=p("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Aa(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Yn(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(a),e.display.lineSpace.removeChild(i)}}function qs(e,t,r,n){n==null&&(n=0);var a;!e.options.lineWrapping&&t==r&&(t=t.ch?Ce(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Ce(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var o=!1,s=Vn(e,t),l=!r||r==t?s:Vn(e,r);a={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var u=pi(e,a),C=e.doc.scrollTop,k=e.doc.scrollLeft;if(u.scrollTop!=null&&(la(e,u.scrollTop),Math.abs(e.doc.scrollTop-C)>1&&(o=!0)),u.scrollLeft!=null&&(kr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-k)>1&&(o=!0)),!o)break}return a}function Js(e,t){var r=pi(e,t);r.scrollTop!=null&&la(e,r.scrollTop),r.scrollLeft!=null&&kr(e,r.scrollLeft)}function pi(e,t){var r=e.display,n=jr(e.display);t.top<0&&(t.top=0);var a=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,i=ni(e),o={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+ti(r),l=t.top<n,u=t.bottom>s-n;if(t.top<a)o.scrollTop=l?0:t.top;else if(t.bottom>a+i){var C=Math.min(t.top,(u?s:t.bottom)-i);C!=a&&(o.scrollTop=C)}var k=e.options.fixedGutter?0:r.gutters.offsetWidth,X=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-k,z=xr(e)-r.gutters.offsetWidth,pe=t.right-t.left>z;return pe&&(t.right=t.left+z),t.left<10?o.scrollLeft=0:t.left<X?o.scrollLeft=Math.max(0,t.left+k-(pe?0:10)):t.right>z+X-3&&(o.scrollLeft=t.right+(pe?0:10)-z),o}function mi(e,t){if(t==null)return;ja(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Br(e){ja(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sa(e,t,r){(t!=null||r!=null)&&ja(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Ys(e,t){ja(e),e.curOp.scrollToPos=t}function ja(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=ro(e,t.from),n=ro(e,t.to);po(e,r,n,t.margin)}}function po(e,t,r,n){var a=pi(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});sa(e,a.scrollLeft,a.scrollTop)}function la(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;V||vi(e,{top:t}),mo(e,t,!0),V&&vi(e),da(e,100)}function mo(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function kr(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,yo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ua(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ti(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+Yn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Or=function(e,t,r){this.cm=r;var n=this.vert=p("div",[p("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),a=this.horiz=p("div",[p("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=a.tabIndex=-1,e(n),e(a),de(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),de(a,"scroll",function(){a.clientWidth&&t(a.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,L&&P<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Or.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var a=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+a)+"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 i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Or.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Or.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Or.prototype.zeroWidthHack=function(){var e=G&&!j?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new se,this.disableVert=new se},Or.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var a=e.getBoundingClientRect(),i=r=="vert"?document.elementFromPoint(a.right-1,(a.top+a.bottom)/2):document.elementFromPoint((a.right+a.left)/2,a.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Or.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ca=function(){};ca.prototype.update=function(){return{bottom:0,right:0}},ca.prototype.setScrollLeft=function(){},ca.prototype.setScrollTop=function(){},ca.prototype.clear=function(){};function Wr(e,t){t||(t=ua(e));var r=e.display.barWidth,n=e.display.barHeight;go(e,t);for(var a=0;a<4&&r!=e.display.barWidth||n!=e.display.barHeight;a++)r!=e.display.barWidth&&e.options.lineWrapping&&Na(e),go(e,ua(e)),r=e.display.barWidth,n=e.display.barHeight}function go(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var vo={native:Or,null:ca};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&U(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(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"?kr(e,t):la(e,t)},e),e.display.scrollbars.addClass&&te(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function Rr(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},Ts(e.curOp)}function Tr(e){var t=e.curOp;t&&As(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 a=0;a<t.length;a++)nl(t[a]);for(var i=0;i<t.length;i++)rl(t[i]);for(var o=0;o<t.length;o++)al(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&Gn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ia(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&gi(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Na(t),e.barMeasure=ua(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qi(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+Yn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-xr(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&&kr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Wr(t,e.barMeasure),e.updatedDisplay&&_i(t,e.barMeasure),e.selectionChanged&&fi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&co(e.cm)}function al(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&_o(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&mo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&kr(t,e.scrollLeft,!0,!0),e.scrollToPos){var a=qs(t,Ct(n,e.scrollToPos.from),Ct(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,a)}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||he(i[s],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&he(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&he(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function In(e,t){if(e.curOp)return t();Rr(e);try{return t()}finally{Tr(e)}}function mn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Rr(e);try{return t.apply(e,arguments)}finally{Tr(e)}}}function Tn(e){return function(){if(this.curOp)return e.apply(this,arguments);Rr(this);try{return e.apply(this,arguments)}finally{Tr(this)}}}function gn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Rr(t);try{return e.apply(this,arguments)}finally{Tr(t)}}}function da(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,y(il,e))}function il(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=On(e,t.highlightFrontier),a=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(n.line>=e.display.viewFrom){var o=i.styles,s=i.text.length>e.options.maxHighlightLength?jt(t.mode,n.state):null,l=Lr(e,i,n,!0);s&&(n.state=s),i.styles=l.styles;var u=i.styleClasses,C=l.classes;C?i.styleClasses=C:u&&(i.styleClasses=null);for(var k=!o||o.length!=i.styles.length||u!=C&&(!u||!C||u.bgClass!=C.bgClass||u.textClass!=C.textClass),X=0;!k&&X<o.length;++X)k=o[X]!=i.styles[X];k&&a.push(n.line),i.stateAfter=n.save(),n.nextLine()}else i.text.length<=e.options.maxHighlightLength&&er(e,i.text,n),i.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return da(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),a.length&&In(e,function(){for(var i=0;i<a.length;i++)cr(e,a[i],"text")})}var Ia=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Ua(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=xr(e),this.force=r,this.dims=ui(e),this.events=[]};Ia.prototype.signal=function(e,t){w(e,t)&&this.events.push(arguments)},Ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)he.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Yn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Yn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=D();if(!t||!_(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&_(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==D())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&_(document.body,e.anchorNode)&&_(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 gi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return dr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&so(e)==0)return!1;Eo(e)&&(dr(e),t.dims=ui(e));var a=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(a,t.visible.to+e.options.viewportMargin);r.viewFrom<i&&i-r.viewFrom<20&&(i=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(a,r.viewTo)),$t&&(i=Ht(e.doc,i),o=Kt(e.doc,o));var s=i!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gs(e,i,o),r.viewOffset=Qt(tt(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=so(e);if(!s&&l==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=sl(e);return l>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(u),re(r.cursorDiv),re(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,da(e,400)),r.updateLineNumbers=null,!0}function _o(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==xr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ti(e.display)-ni(e),r.top)}),t.visible=Ua(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ua(e.display,e.doc,r));if(!gi(e,t))break;Na(e);var a=ua(e);oa(e),Wr(e,a),_i(e,a),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 vi(e,t){var r=new Ia(e,t);if(gi(e,r)){Na(e),_o(e,r);var n=ua(e);oa(e),Wr(e,n),_i(e,n),r.finish()}}function ul(e,t,r){var n=e.display,a=e.options.lineNumbers,i=n.lineDiv,o=i.firstChild;function s(pe){var ke=pe.nextSibling;return x&&G&&e.display.currentWheelTarget==pe?pe.style.display="none":pe.parentNode.removeChild(pe),ke}for(var l=n.view,u=n.viewFrom,C=0;C<l.length;C++){var k=l[C];if(!k.hidden)if(!k.node||k.node.parentNode!=i){var X=Us(e,k,u,r);i.insertBefore(X,o)}else{for(;o!=k.node;)o=s(o);var z=a&&t!=null&&t<=u&&k.lineNumber;k.changes&&(oe(k.changes,"gutter")>-1&&(z=!1),zi(e,k,u,r)),z&&(re(k.lineNumber),k.lineNumber.appendChild(document.createTextNode(Xn(e.options,u)))),o=k.node.nextSibling}u+=k.size}for(;o;)o=s(o)}function bi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function _i(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+Yn(e)+"px"}function yo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=ci(t)-t.scroller.scrollLeft+e.doc.scrollLeft,a=t.gutters.offsetWidth,i=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=i),r[o].gutterBackground&&(r[o].gutterBackground.style.left=i));var s=r[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=n+a+"px")}function Eo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Xn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var a=n.measure.appendChild(p("div",[p("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=a.firstChild.offsetWidth,o=a.offsetWidth-i;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(i,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",bi(e.display),!0}return!1}function yi(e,t){for(var r=[],n=!1,a=0;a<e.length;a++){var i=e[a],o=null;if(typeof i!="string"&&(o=i.style,i=i.className),i=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:i,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function xo(e){var t=e.gutters,r=e.gutterSpecs;re(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var a=r[n],i=a.className,o=a.style,s=t.appendChild(p("div",null,"CodeMirror-gutter "+i));o&&(s.style.cssText=o),i=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",bi(e)}function fa(e){xo(e.display),Mn(e),yo(e)}function cl(e,t,r,n){var a=this;this.input=r,a.scrollbarFiller=p("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=p("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=T("div",null,"CodeMirror-code"),a.selectionDiv=p("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=p("div",null,"CodeMirror-cursors"),a.measure=p("div",null,"CodeMirror-measure"),a.lineMeasure=p("div",null,"CodeMirror-measure"),a.lineSpace=T("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var i=T("div",[a.lineSpace],"CodeMirror-lines");a.mover=p("div",[i],null,"position: relative"),a.sizer=p("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=p("div",null,null,"position: absolute; height: "+Oe+"px; width: 1px;"),a.gutters=p("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=p("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=p("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),L&&P<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!x&&!(V&&ee)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=yi(n.gutters,n.lineNumbers),xo(a),r.init(a)}var Fa=0,Wn=null;L?Wn=-.53:V?Wn=15:H?Wn=-.7:ce&&(Wn=-1/3);function wo(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=wo(e);return t.x*=Wn,t.y*=Wn,t}function Co(e,t){var r=wo(t),n=r.x,a=r.y,i=e.display,o=i.scroller,s=o.scrollWidth>o.clientWidth,l=o.scrollHeight>o.clientHeight;if(!(n&&s||a&&l))return;if(a&&G&&x){e:for(var u=t.target,C=i.view;u!=o;u=u.parentNode)for(var k=0;k<C.length;k++)if(C[k].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!V&&!q&&Wn!=null){a&&l&&la(e,Math.max(0,o.scrollTop+a*Wn)),kr(e,Math.max(0,o.scrollLeft+n*Wn)),(!a||a&&l)&&f(t),i.wheelStartX=null;return}if(a&&Wn!=null){var X=a*Wn,z=e.doc.scrollTop,pe=z+i.wrapper.clientHeight;X<0?z=Math.max(0,z+X-50):pe=Math.min(e.doc.height,pe+X+50),vi(e,{top:z,bottom:pe})}Fa<20&&(i.wheelStartX==null?(i.wheelStartX=o.scrollLeft,i.wheelStartY=o.scrollTop,i.wheelDX=n,i.wheelDY=a,setTimeout(function(){if(i.wheelStartX==null)return;var ke=o.scrollLeft-i.wheelStartX,Ne=o.scrollTop-i.wheelStartY,ze=Ne&&i.wheelDY&&Ne/i.wheelDY||ke&&i.wheelDX&&ke/i.wheelDX;if(i.wheelStartX=i.wheelStartY=null,!ze)return;Wn=(Wn*Fa+ze)/(Fa+1),++Fa},200)):(i.wheelDX+=n,i.wheelDY+=a))}var zn=function(e,t){this.ranges=e,this.primIndex=t};zn.prototype.primary=function(){return this.ranges[this.primIndex]},zn.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(!Pe(r.anchor,n.anchor)||!Pe(r.head,n.head))return!1}return!0},zn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Wt(Yt(this.ranges[t].anchor),Yt(this.ranges[t].head));return new zn(e,this.primIndex)},zn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},zn.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(We(t,n.from())>=0&&We(e,n.to())<=0)return r}return-1};var Wt=function(e,t){this.anchor=e,this.head=t};Wt.prototype.from=function(){return nn(this.anchor,this.head)},Wt.prototype.to=function(){return an(this.anchor,this.head)},Wt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $n(e,t,r){var n=e&&e.options.selectionsMayTouch,a=t[r];t.sort(function(X,z){return We(X.from(),z.from())}),r=oe(t,a);for(var i=1;i<t.length;i++){var o=t[i],s=t[i-1],l=We(s.to(),o.from());if(n&&!o.empty()?l>0:l>=0){var u=nn(s.from(),o.from()),C=an(s.to(),o.to()),k=s.empty()?o.from()==o.head:s.from()==s.head;i<=r&&--r,t.splice(--i,2,new Wt(k?C:u,k?u:C))}}return new zn(t,r)}function fr(e,t){return new zn([new Wt(e,t||e)],0)}function hr(e){return e.text?Ce(e.from.line+e.text.length-1,Re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function So(e,t){if(We(e,t.from)<0)return e;if(We(e,t.to)<=0)return hr(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+=hr(t).ch-t.to.ch),Ce(r,n)}function Ei(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var a=e.sel.ranges[n];r.push(new Wt(So(a.anchor,t),So(a.head,t)))}return $n(e.cm,r,e.sel.primIndex)}function ko(e,t,r){return e.line==t.line?Ce(r.line,e.ch-t.ch+r.ch):Ce(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],a=Ce(e.first,0),i=a,o=0;o<t.length;o++){var s=t[o],l=ko(s.from,a,i),u=ko(hr(s),a,i);if(a=s.to,i=u,r=="around"){var C=e.sel.ranges[o],k=We(C.head,C.anchor)<0;n[o]=new Wt(k?u:l,k?l:u)}else n[o]=new Wt(l,l)}return new zn(n,e.sel.primIndex)}function xi(e){e.doc.mode=rt(e.options,e.doc.modeOption),ha(e)}function ha(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,da(e,100),e.state.modeGen++,e.curOp&&Mn(e)}function Oo(e,t){return t.from.ch==0&&t.to.ch==0&&Re(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function wi(e,t,r,n){function a(Ze){return r?r[Ze]:null}function i(Ze,He,it){sr(Ze,He,it,n),_n(Ze,"change",Ze,t)}function o(Ze,He){for(var it=[],wt=Ze;wt<He;++wt)it.push(new Jt(u[wt],a(wt),n));return it}var s=t.from,l=t.to,u=t.text,C=tt(e,s.line),k=tt(e,l.line),X=Re(u),z=a(u.length-1),pe=l.line-s.line;if(t.full)e.insert(0,o(0,u.length)),e.remove(u.length,e.size-u.length);else if(Oo(e,t)){var ke=o(0,u.length-1);i(k,k.text,z),pe&&e.remove(s.line,pe),ke.length&&e.insert(s.line,ke)}else if(C==k)if(u.length==1)i(C,C.text.slice(0,s.ch)+X+C.text.slice(l.ch),z);else{var Ne=o(1,u.length-1);Ne.push(new Jt(X+C.text.slice(l.ch),z,n)),i(C,C.text.slice(0,s.ch)+u[0],a(0)),e.insert(s.line+1,Ne)}else if(u.length==1)i(C,C.text.slice(0,s.ch)+u[0]+k.text.slice(l.ch),a(0)),e.remove(s.line+1,pe);else{i(C,C.text.slice(0,s.ch)+u[0],a(0)),i(k,X+k.text.slice(l.ch),z);var ze=o(1,u.length-1);pe>1&&e.remove(s.line+1,pe-1),e.insert(s.line+1,ze)}_n(e,"change",e,t)}function pr(e,t,r){function n(a,i,o){if(a.linked)for(var s=0;s<a.linked.length;++s){var l=a.linked[s];if(l.doc==i)continue;var u=o&&l.sharedHist;if(r&&!u)continue;t(l.doc,u),n(l.doc,a,u)}}n(e,null,!0)}function Ro(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,di(e),xi(e),To(e),e.options.lineWrapping||Gn(e),e.options.mode=t.modeOption,Mn(e)}function To(e){(e.doc.direction=="rtl"?te:U)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){In(e,function(){To(e),Mn(e)})}function Ba(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 Ci(e,t){var r={from:Yt(t.from),to:hr(t),text:Ft(e,t.from,t.to)};return Lo(e,r,t.from.line,t.to.line+1),pr(e,function(n){return Lo(n,r,t.from.line,t.to.line+1)},!0),r}function Po(e){for(;e.length;){var t=Re(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Po(e.done),Re(e.done);if(e.done.length&&!Re(e.done).ranges)return Re(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Re(e.done)}function Ao(e,t,r,n){var a=e.history;a.undone.length=0;var i=+new Date,o,s;if((a.lastOp==n||a.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&a.lastModTime>i-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(a,a.lastOp==n)))s=Re(o.changes),We(t.from,t.to)==0&&We(t.from,s.to)==0?s.to=hr(t):o.changes.push(Ci(e,t));else{var l=Re(a.done);for((!l||!l.ranges)&&Wa(e.sel,a.done),o={changes:[Ci(e,t)],generation:a.generation},a.done.push(o);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(r),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=i,a.lastOp=a.lastSelOp=n,a.lastOrigin=a.lastSelOrigin=t.origin,s||he(e,"historyAdded")}function ml(e,t,r,n){var a=t.charAt(0);return a=="*"||a=="+"&&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 a=e.history,i=n&&n.origin;r==a.lastSelOp||i&&a.lastSelOrigin==i&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==i||ml(e,i,Re(a.done),t))?a.done[a.done.length-1]=t:Wa(t,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=i,a.lastSelOp=r,n&&n.clearRedo!==!1&&Po(a.undone)}function Wa(e,t){var r=Re(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Lo(e,t,r,n){var a=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((a||(a=t["spans_"+e.id]={}))[i]=o.markedSpans),++i})}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=[],a=0;a<t.text.length;++a)n.push(vl(r[a]));return n}function Mo(e,t){var r=bl(e,t),n=Kn(e,t);if(!r)return n;if(!n)return r;for(var a=0;a<r.length;++a){var i=r[a],o=n[a];if(i&&o){e:for(var s=0;s<o.length;++s){for(var l=o[s],u=0;u<i.length;++u)if(i[u].marker==l.marker)continue e;i.push(l)}}else o&&(r[a]=o)}return r}function zr(e,t,r){for(var n=[],a=0;a<e.length;++a){var i=e[a];if(i.ranges){n.push(r?zn.prototype.deepCopy.call(i):i);continue}var o=i.changes,s=[];n.push({changes:s});for(var l=0;l<o.length;++l){var u=o[l],C=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var k in u)(C=k.match(/^spans_(\d+)$/))&&(oe(t,Number(C[1]))>-1&&(Re(s)[k]=u[k],delete u[k]))}}return n}function Si(e,t,r,n){if(n){var a=e.anchor;if(r){var i=We(t,a)<0;i!=We(r,a)<0?(a=t,t=r):i!=We(t,r)<0&&(t=r)}return new Wt(a,t)}else return new Wt(r||t,t)}function za(e,t,r,n,a){a==null&&(a=e.cm&&(e.cm.display.shift||e.extend)),Sn(e,new zn([Si(e.sel.primary(),t,r,a)],0),n)}function Do(e,t,r){for(var n=[],a=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)n[i]=Si(e.sel.ranges[i],t[i],null,a);var o=$n(e.cm,n,e.sel.primIndex);Sn(e,o,r)}function ki(e,t,r,n){var a=e.sel.ranges.slice(0);a[t]=r,Sn(e,$n(e.cm,a,e.sel.primIndex),n)}function No(e,t,r,n){Sn(e,fr(t,r),n)}function _l(e,t,r){var n={ranges:t.ranges,update:function(a){this.ranges=[];for(var i=0;i<a.length;i++)this.ranges[i]=new Wt(Ct(e,a[i].anchor),Ct(e,a[i].head))},origin:r&&r.origin};return he(e,"beforeSelectionChange",e,n),e.cm&&he(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?$n(e.cm,n.ranges,n.ranges.length-1):t}function Uo(e,t,r){var n=e.history.done,a=Re(n);a&&a.ranges?(n[n.length-1]=t,Ha(e,t,r)):Sn(e,t,r)}function Sn(e,t,r){Ha(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Ha(e,t,r){(w(e,"beforeSelectionChange")||e.cm&&w(e.cm,"beforeSelectionChange"))&&(t=_l(e,t,r));var n=r&&r.bias||(We(t.primary().head,e.sel.primary().head)<0?-1:1);jo(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Br(e.cm)}function jo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,g(e.cm)),_n(e,"cursorActivity",e)}function Io(e){jo(e,Fo(e,e.sel,null,!1))}function Fo(e,t,r,n){for(var a,i=0;i<t.ranges.length;i++){var o=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=Ka(e,o.anchor,s&&s.anchor,r,n),u=Ka(e,o.head,s&&s.head,r,n);(a||l!=o.anchor||u!=o.head)&&(a||(a=t.ranges.slice(0,i)),a[i]=new Wt(l,u))}return a?$n(e.cm,a,t.primIndex):t}function Hr(e,t,r,n,a){var i=tt(e,t.line);if(i.markedSpans)for(var o=0;o<i.markedSpans.length;++o){var s=i.markedSpans[o],l=s.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,C="selectRight"in l?!l.selectRight:l.inclusiveRight;if((s.from==null||(u?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(C?s.to>=t.ch:s.to>t.ch))){if(a&&(he(l,"beforeCursorEnter"),l.explicitlyCleared))if(i.markedSpans){--o;continue}else break;if(!l.atomic)continue;if(r){var k=l.find(n<0?1:-1),X=void 0;if((n<0?C:u)&&(k=Bo(e,k,-n,k&&k.line==t.line?i:null)),k&&k.line==t.line&&(X=We(k,r))&&(n<0?X<0:X>0))return Hr(e,k,t,n,a)}var z=l.find(n<0?-1:1);return(n<0?u:C)&&(z=Bo(e,z,n,z.line==t.line?i:null)),z?Hr(e,z,t,n,a):null}}return t}function Ka(e,t,r,n,a){var i=n||1,o=Hr(e,t,r,i,a)||!a&&Hr(e,t,r,i,!0)||Hr(e,t,r,-i,a)||!a&&Hr(e,t,r,-i,!0);return o||(e.cantEdit=!0,Ce(e.first,0))}function Bo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?Ct(e,Ce(t.line-1)):null:r>0&&t.ch==(n||tt(e,t.line)).text.length?t.line<e.first+e.size-1?Ce(t.line+1,0):null:new Ce(t.line,t.ch+r)}function Wo(e){e.setSelection(Ce(e.firstLine(),0),Ce(e.lastLine()),ue)}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(a,i,o,s){a&&(n.from=Ct(e,a)),i&&(n.to=Ct(e,i)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),he(e,"beforeChange",e,n),e.cm&&he(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Kr(e,t,r){if(e.cm){if(!e.cm.curOp)return mn(e.cm,Kr)(e,t,r);if(e.cm.state.suppressEdits)return}if((w(e,"beforeChange")||e.cm&&w(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))return;var n=Zt&&!r&&Oa(e,t.from,t.to);if(n)for(var a=n.length-1;a>=0;--a)Ho(e,{from:n[a].from,to:n[a].to,text:a?[""]:t.text,origin:t.origin});else Ho(e,t)}function Ho(e,t){if(t.text.length==1&&t.text[0]==""&&We(t.from,t.to)==0)return;var r=Ei(e,t);Ao(e,t,r,e.cm?e.cm.curOp.id:NaN),pa(e,t,r,Kn(e,t));var n=[];pr(e,function(a,i){!i&&oe(n,a.history)==-1&&(Vo(a.history,t),n.push(a.history)),pa(a,t,null,Kn(a,t))})}function Xa(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var a=e.history,i,o=e.sel,s=t=="undo"?a.done:a.undone,l=t=="undo"?a.undone:a.done,u=0;u<s.length&&!(i=s[u],r?i.ranges&&!i.equals(e.sel):!i.ranges);u++);if(u==s.length)return;for(a.lastOrigin=a.lastSelOrigin=null;;)if(i=s.pop(),i.ranges){if(Wa(i,l),r&&!i.equals(e.sel)){Sn(e,i,{clearRedo:!1});return}o=i}else if(n){s.push(i);return}else break;var C=[];Wa(o,l),l.push({changes:C,generation:a.generation}),a.generation=i.generation||++a.maxGeneration;for(var k=w(e,"beforeChange")||e.cm&&w(e.cm,"beforeChange"),X=function(ke){var Ne=i.changes[ke];if(Ne.origin=t,k&&!zo(e,Ne,!1))return s.length=0,{};C.push(Ci(e,Ne));var ze=ke?Ei(e,Ne):Re(s);pa(e,Ne,ze,Mo(e,Ne)),!ke&&e.cm&&e.cm.scrollIntoView({from:Ne.from,to:hr(Ne)});var Ze=[];pr(e,function(He,it){!it&&oe(Ze,He.history)==-1&&(Vo(He.history,Ne),Ze.push(He.history)),pa(He,Ne,null,Mo(He,Ne))})},z=i.changes.length-1;z>=0;--z){var pe=X(z);if(pe)return pe.v}}function Ko(e,t){if(t==0)return;if(e.first+=t,e.sel=new zn(Xe(e.sel.ranges,function(a){return new Wt(Ce(a.anchor.line+t,a.anchor.ch),Ce(a.head.line+t,a.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++)cr(e.cm,n,"gutter")}}function pa(e,t,r,n){if(e.cm&&!e.cm.curOp)return mn(e.cm,pa)(e,t,r,n);if(t.to.line<e.first){Ko(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var a=t.text.length-1-(e.first-t.from.line);Ko(e,a),t={from:Ce(e.first,0),to:Ce(t.to.line+a,t.to.ch),text:[Re(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:Ce(i,tt(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ft(e,t.from,t.to),r||(r=Ei(e,t)),e.cm?yl(e.cm,t,n):wi(e,t,n),Ha(e,r,ue),e.cantEdit&&Ka(e,Ce(e.firstLine(),0))&&(e.cantEdit=!1)}function yl(e,t,r){var n=e.doc,a=e.display,i=t.from,o=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=xt(bt(tt(n,i.line))),n.iter(l,o.line+1,function(z){if(z==a.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&g(e),wi(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(l,i.line+t.text.length,function(z){var pe=wn(z);pe>a.maxLineLength&&(a.maxLine=z,a.maxLineLength=pe,a.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Vt(n,i.line),da(e,400);var u=t.text.length-(o.line-i.line)-1;t.full?Mn(e):i.line==o.line&&t.text.length==1&&!Oo(e.doc,t)?cr(e,i.line,"text"):Mn(e,i.line,o.line+1,u);var C=w(e,"changes"),k=w(e,"change");if(k||C){var X={from:i,to:o,text:t.text,removed:t.removed,origin:t.origin};k&&_n(e,"change",e,X),C&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(X)}e.display.selForContextMenu=null}function Xr(e,t,r,n,a){var i;n||(n=r),We(n,r)<0&&(i=[n,r],r=i[0],n=i[1]),typeof t=="string"&&(t=e.splitLines(t)),Kr(e,{from:r,to:n,text:t,origin:a})}function Xo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Go(e,t,r,n){for(var a=0;a<e.length;++a){var i=e[a],o=!0;if(i.ranges){i.copied||(i=e[a]=i.deepCopy(),i.copied=!0);for(var s=0;s<i.ranges.length;s++)Xo(i.ranges[s].anchor,t,r,n),Xo(i.ranges[s].head,t,r,n);continue}for(var l=0;l<i.changes.length;++l){var u=i.changes[l];if(r<u.from.line)u.from=Ce(u.from.line+n,u.from.ch),u.to=Ce(u.to.line+n,u.to.ch);else if(t<=u.to.line){o=!1;break}}o||(e.splice(0,a+1),a=0)}}function Vo(e,t){var r=t.from.line,n=t.to.line,a=t.text.length-(n-r)-1;Go(e.done,r,n,a),Go(e.undone,r,n,a)}function ma(e,t,r,n){var a=t,i=t;return typeof t=="number"?i=tt(e,Bn(e,t)):a=xt(t),a==null?null:(n(i,a)&&e.cm&&cr(e.cm,a,r),i)}function ga(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}ga.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var a=this.lines[r];this.height-=a.height,Cn(a),_n(a,"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 va(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var a=e[n];t+=a.chunkSize(),r+=a.height,a.parent=this}this.size=t,this.height=r,this.parent=null}va.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],a=n.chunkSize();if(e<a){var i=Math.min(t,a-e),o=n.height;if(n.removeInner(e,i),this.height-=o-n.height,a==i&&(this.children.splice(r--,1),n.parent=null),(t-=i)==0)break;e=0}else e-=a}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ga))){var s=[];this.collapse(s),this.children=[new ga(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 a=this.children[n],i=a.chunkSize();if(e<=i){if(a.insertInner(e,t,r),a.lines&&a.lines.length>50){for(var o=a.lines.length%25+25,s=o;s<a.lines.length;){var l=new ga(a.lines.slice(s,s+=25));a.height-=l.height,this.children.splice(++n,0,l),l.parent=this}a.lines=a.lines.slice(0,o),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new va(t);if(e.parent){e.size-=r.size,e.height-=r.height;var a=oe(e.parent.children,e);e.parent.children.splice(a+1,0,r)}else{var n=new va(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 a=this.children[n],i=a.chunkSize();if(e<i){var o=Math.min(t,i-e);if(a.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=i}}};var ba=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ba.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=xt(r);if(n==null||!t)return;for(var a=0;a<t.length;++a)t[a]==this&&t.splice(a--,1);t.length||(r.widgets=null);var i=aa(this);Bt(r,Math.max(0,r.height-i)),e&&(In(e,function(){$o(e,r,-i),cr(e,n,"widget")}),_n(e,"lineWidgetCleared",e,this,n))},ba.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var a=aa(this)-t;if(!a)return;qt(this.doc,n)||Bt(n,n.height+a),r&&In(r,function(){r.curOp.forceUpdate=!0,$o(r,n,a),_n(r,"lineWidgetChanged",r,e,xt(n))})},E(ba);function $o(e,t,r){Qt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&mi(e,r)}function El(e,t,r,n){var a=new ba(e,r,n),i=e.cm;return i&&a.noHScroll&&(i.display.alignWidgets=!0),ma(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(a.insertAt==null?s.push(a):s.splice(Math.min(s.length-1,Math.max(0,a.insertAt)),0,a),a.line=o,i&&!qt(e,o)){var l=Qt(o)<e.scrollTop;Bt(o,o.height+aa(a)),l&&mi(i,a.height),i.curOp.forceUpdate=!0}return!0}),i&&_n(i,"lineWidgetAdded",i,a,typeof t=="number"?t:xt(t)),a}var qo=0,mr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++qo};mr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Rr(e),w(this,"clear")){var r=this.find();r&&_n(this,"clear",r.from,r.to)}for(var n=null,a=null,i=0;i<this.lines.length;++i){var o=this.lines[i],s=En(o.markedSpans,this);e&&!this.collapsed?cr(e,xt(o),"text"):e&&(s.to!=null&&(a=xt(o)),s.from!=null&&(n=xt(o))),o.markedSpans=_r(o.markedSpans,s),s.from==null&&this.collapsed&&!qt(this.doc,o)&&e&&Bt(o,jr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=bt(this.lines[l]),C=wn(u);C>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=C,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Mn(e,n,a+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Io(e.doc)),e&&_n(e,"markerCleared",e,this,n,a),t&&Tr(e),this.parent&&this.parent.clear()},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,a=0;a<this.lines.length;++a){var i=this.lines[a],o=En(i.markedSpans,this);if(o.from!=null&&(r=Ce(t?i:xt(i),o.from),e==-1))return r;if(o.to!=null&&(n=Ce(t?i:xt(i),o.to),e==1))return n}return r&&{from:r,to:n}},mr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;In(n,function(){var a=t.line,i=xt(t.line),o=ri(n,i);if(o&&(Zi(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!qt(r.doc,a)&&r.height!=null){var s=r.height;r.height=null;var l=aa(r)-s;l&&Bt(a,a.height+l)}_n(n,"markerChanged",n,e)})},mr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||oe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},mr.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},E(mr);function Gr(e,t,r,n,a){if(n&&n.shared)return xl(e,t,r,n,a);if(e.cm&&!e.cm.curOp)return mn(e.cm,Gr)(e,t,r,n,a);var i=new mr(e,a),o=We(t,r);if(n&&c(n,i,!1),o>0||o==0&&i.clearWhenEmpty!==!1)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=T("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Qa(e,t.line,t,r,i)||t.line!=r.line&&Qa(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Rn()}i.addToHistory&&Ao(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,l=e.cm,u;if(e.iter(s,r.line+1,function(k){l&&i.collapsed&&!l.options.lineWrapping&&bt(k)==l.display.maxLine&&(u=!0),i.collapsed&&s!=t.line&&Bt(k,0),xn(k,new hn(i,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),i.collapsed&&e.iter(t.line,r.line+1,function(k){qt(e,k)&&Bt(k,0)}),i.clearOnEnter&&de(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(on(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++qo,i.atomic=!0),l){if(u&&(l.curOp.updateMaxLine=!0),i.collapsed)Mn(l,t.line,r.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var C=t.line;C<=r.line;C++)cr(l,C,"text");i.atomic&&Io(l.doc),_n(l,"markerAdded",l,i)}return i}var _a=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};_a.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();_n(this,"clear")},_a.prototype.find=function(e,t){return this.primary.find(e,t)},E(_a);function xl(e,t,r,n,a){n=c(n),n.shared=!1;var i=[Gr(e,t,r,n,a)],o=i[0],s=n.widgetNode;return pr(e,function(l){s&&(n.widgetNode=s.cloneNode(!0)),i.push(Gr(l,Ct(l,t),Ct(l,r),n,a));for(var u=0;u<l.linked.length;++u)if(l.linked[u].isParent)return;o=Re(i)}),new _a(i,o)}function Jo(e){return e.findMarks(Ce(e.first,0),e.clipPos(Ce(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=n.find(),i=e.clipPos(a.from),o=e.clipPos(a.to);if(We(i,o)){var s=Gr(e,i,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Cl(e){for(var t=function(n){var a=e[n],i=[a.primary.doc];pr(a.primary.doc,function(l){return i.push(l)});for(var o=0;o<a.markers.length;o++){var s=a.markers[o];oe(i,s.doc)==-1&&(s.parent=null,a.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,Dn=function(e,t,r,n,a){if(!(this instanceof Dn))return new Dn(e,t,r,n,a);r==null&&(r=0),va.call(this,[new ga([new Jt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var i=Ce(r,0);this.sel=fr(i),this.history=new Ba(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=a=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),wi(this,{from:i,to:i,text:e}),Sn(this,fr(i),ue)};Dn.prototype=Ie(va.prototype,{constructor:Dn,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=vt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:gn(function(e){var t=Ce(this.first,0),r=this.first+this.size-1;Kr(this,{from:t,to:Ce(r,tt(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&sa(this.cm,0,0),Sn(this,fr(t),ue)}),replaceRange:function(e,t,r,n){t=Ct(this,t),r=r?Ct(this,r):t,Xr(this,e,t,r,n)},getRange:function(e,t,r){var n=Ft(this,Ct(this,e),Ct(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(Hn(this,e))return tt(this,e)},getLineNumber:function(e){return xt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=tt(this,e)),bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ct(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:gn(function(e,t,r){No(this,Ct(this,typeof e=="number"?Ce(e,t||0):e),null,r)}),setSelection:gn(function(e,t,r){No(this,Ct(this,e),Ct(this,t||e),r)}),extendSelection:gn(function(e,t,r){za(this,Ct(this,e),t&&Ct(this,t),r)}),extendSelections:gn(function(e,t){Do(this,or(this,e),t)}),extendSelectionsBy:gn(function(e,t){var r=Xe(this.sel.ranges,e);Do(this,or(this,r),t)}),setSelections:gn(function(e,t,r){if(!e.length)return;for(var n=[],a=0;a<e.length;a++)n[a]=new Wt(Ct(this,e[a].anchor),Ct(this,e[a].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Sn(this,$n(this.cm,n,t),r)}),addSelection:gn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Wt(Ct(this,e),Ct(this,t||e))),Sn(this,$n(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var a=Ft(this,t[n].from(),t[n].to());r=r?r.concat(a):a}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 a=Ft(this,r[n].from(),r[n].to());e!==!1&&(a=a.join(e||this.lineSeparator())),t[n]=a}return t},replaceSelection:function(e,t,r){for(var n=[],a=0;a<this.sel.ranges.length;a++)n[a]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:gn(function(e,t,r){for(var n=[],a=this.sel,i=0;i<a.ranges.length;i++){var o=a.ranges[i];n[i]={from:o.from(),to:o.to(),text:this.splitLines(e[i]),origin:r}}for(var s=t&&t!="end"&&fl(this,n,t),l=n.length-1;l>=0;l--)Kr(this,n[l]);s?Uo(this,s):this.cm&&Br(this.cm)}),undo:gn(function(){Xa(this,"undo")}),redo:gn(function(){Xa(this,"redo")}),undoSelection:gn(function(){Xa(this,"undo",!0)}),redoSelection:gn(function(){Xa(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 a=0;a<e.undone.length;a++)e.undone[a].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ba(this.history.maxGeneration),pr(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:zr(this.history.done),undone:zr(this.history.undone)}},setHistory:function(e){var t=this.history=new Ba(this.history.maxGeneration);t.done=zr(e.done.slice(0),null,!0),t.undone=zr(e.undone.slice(0),null,!0)},setGutterMarker:gn(function(e,t,r){return ma(this,e,"gutter",function(n){var a=n.gutterMarkers||(n.gutterMarkers={});return a[t]=r,!r&&Ue(a)&&(n.gutterMarkers=null),!0})}),clearGutter:gn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&ma(t,r,"gutter",function(){return r.gutterMarkers[e]=null,Ue(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Hn(this,e))return null;if(t=e,e=tt(this,e),!e)return null}else if(t=xt(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:gn(function(e,t,r){return ma(this,e,t=="gutter"?"gutter":"class",function(n){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[a])n[a]=r;else{if(Q(r).test(n[a]))return!1;n[a]+=" "+r}return!0})}),removeLineClass:gn(function(e,t,r){return ma(this,e,t=="gutter"?"gutter":"class",function(n){var a=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",i=n[a];if(i)if(r==null)n[a]=null;else{var o=i.match(Q(r));if(!o)return!1;var s=o.index+o[0].length;n[a]=i.slice(0,o.index)+(!o.index||s==i.length?"":" ")+i.slice(s)||null}else return!1;return!0})}),addLineWidget:gn(function(e,t,r){return El(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Gr(this,Ct(this,e),Ct(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=Ct(this,e),Gr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Ct(this,e);var t=[],r=tt(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var a=r[n];(a.from==null||a.from<=e.ch)&&(a.to==null||a.to>=e.ch)&&t.push(a.marker.parent||a.marker)}return t},findMarks:function(e,t,r){e=Ct(this,e),t=Ct(this,t);var n=[],a=e.line;return this.iter(e.line,t.line+1,function(i){var o=i.markedSpans;if(o)for(var s=0;s<o.length;s++){var l=o[s];!(l.to!=null&&a==e.line&&e.ch>=l.to||l.from==null&&a!=e.line||l.from!=null&&a==t.line&&l.from>=t.ch)&&(!r||r(l.marker))&&n.push(l.marker.parent||l.marker)}++a}),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(a){var i=a.text.length+n;if(i>e)return t=e,!0;e-=i,++r}),Ct(this,Ce(r,t))},indexFromPos:function(e){e=Ct(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 Dn(vt(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 Dn(vt(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}],wl(n,Jo(this)),n},unlinkDoc:function(e){if(e instanceof en&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Jo(this));break}if(e.history==this.history){var n=[e.id];pr(e,function(a){return n.push(a.id)},!0),e.history=new Ba(null),e.history.done=zr(this.history.done,n),e.history.undone=zr(this.history.undone,n)}},iterLinkedDocs:function(e){pr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):kt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:gn(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)})}),Dn.prototype.eachLine=Dn.prototype.iter;var Yo=0;function kl(e){var t=this;if(Zo(t),_e(t,e)||nr(t.display,e))return;f(e),L&&(Yo=+new Date);var r=Cr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var a=n.length,i=Array(a),o=0,s=function(){++o==a&&mn(t,function(){r=Ct(t.doc,r);var z={from:r,to:r,text:t.doc.splitLines(i.filter(function(pe){return pe!=null}).join(t.doc.lineSeparator())),origin:"paste"};Kr(t.doc,z),Uo(t.doc,fr(Ct(t.doc,r),Ct(t.doc,hr(z))))})()},l=function(z,pe){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,z.type)==-1){s();return}var ke=new FileReader;ke.onerror=function(){return s()},ke.onload=function(){var Ne=ke.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ne)){s();return}i[pe]=Ne,s()},ke.readAsText(z)},u=0;u<n.length;u++)l(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var C=e.dataTransfer.getData("Text");if(C){var k;if(t.state.draggingText&&!t.state.draggingText.copy&&(k=t.listSelections()),Ha(t.doc,fr(r,r)),k)for(var X=0;X<k.length;++X)Xr(t.doc,"",k[X].anchor,k[X].head,"drag");t.replaceSelection(C,"around","paste"),t.display.input.focus()}}catch(z){}}}function Ol(e,t){if(L&&(!e.state.draggingText||+new Date-Yo<100)){b(t);return}if(_e(e,t)||nr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ce){var r=p("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",q&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),q&&r.parentNode.removeChild(r)}}function Rl(e,t){var r=Cr(e,t);if(!r)return;var n=document.createDocumentFragment();uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=p("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),S(e.display.dragCursor,n)}function Zo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Qo(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var a=t[n].CodeMirror;a&&r.push(a)}r.length&&r[0].operation(function(){for(var i=0;i<r.length;i++)e(r[i])})}var es=!1;function Tl(){if(es)return;Pl(),es=!0}function Pl(){var e;de(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Qo(Al)},100))}),de(window,"blur",function(){return Qo(Fr)})}function Al(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var gr={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"},ya=0;ya<10;ya++)gr[ya+48]=gr[ya+96]=String(ya);for(var Ga=65;Ga<=90;Ga++)gr[Ga]=String.fromCharCode(Ga);for(var Ea=1;Ea<=12;Ea++)gr[Ea+111]=gr[Ea+63235]="F"+Ea;var rr={};rr.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"},rr.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"},rr.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"},rr.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"]},rr.default=G?rr.macDefault:rr.pcDefault;function Ll(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,a,i,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))i=!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))a=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),a&&(e="Shift-"+e),e}function Ml(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 a=Xe(r.split(" "),Ll),i=0;i<a.length;i++){var o=void 0,s=void 0;i==a.length-1?(s=a.join(" "),o=n):(s=a.slice(0,i+1).join(" "),o="...");var l=t[s];if(!l)t[s]=o;else if(l!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Vr(e,t,r,n){t=Va(t);var a=t.call?t.call(e,n):t[e];if(a===!1)return"nothing";if(a==="...")return"multi";if(a!=null&&r(a))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Vr(e,t.fallthrough,r,n);for(var i=0;i<t.fallthrough.length;i++){var o=Vr(e,t.fallthrough[i],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:gr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ns(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(J?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(J?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(q&&e.keyCode==34&&e.char)return!1;var r=gr[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Va(e){return typeof e=="string"?rr[e]:e}function $r(e,t){for(var r=e.doc.sel.ranges,n=[],a=0;a<r.length;a++){for(var i=t(r[a]);n.length&&We(i.from,Re(n).to)<=0;){var o=n.pop();if(We(o.from,i.from)<0){i.from=o.from;break}}n.push(i)}In(e,function(){for(var s=n.length-1;s>=0;s--)Xr(e.doc,"",n[s].from,n[s].to,"+delete");Br(e)})}function Oi(e,t,r){var n=ve(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ri(e,t,r){var n=Oi(e,t.ch,r);return n==null?null:new Ce(t.line,n,r<0?"after":"before")}function Ti(e,t,r,n,a){if(e){t.doc.direction=="rtl"&&(a=-a);var i=ct(r,t.doc.direction);if(i){var o=a<0?Re(i):i[0],s=a<0==(o.level==1),l=s?"after":"before",u;if(o.level>0||t.doc.direction=="rtl"){var C=Ur(t,r);u=a<0?r.text.length-1:0;var k=Zn(t,C,u).top;u=st(function(X){return Zn(t,C,X).top==k},a<0==(o.level==1)?o.from:o.to-1,u),l=="before"&&(u=Oi(r,u,1))}else u=a<0?o.to:o.from;return new Ce(n,u,l)}}return new Ce(n,a<0?r.text.length:0,a<0?"before":"after")}function Dl(e,t,r,n){var a=ct(t,e.doc.direction);if(!a)return Ri(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 i=Ve(a,r.ch,r.sticky),o=a[i];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return Ri(t,r,n);var s=function(ze,Ze){return Oi(t,ze instanceof Ce?ze.ch:ze,Ze)},l,u=function(ze){return e.options.lineWrapping?(l=l||Ur(e,t),io(e,t,l,ze)):{begin:0,end:t.text.length}},C=u(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var k=o.level==1==n<0,X=s(r,k?1:-1);if(X!=null&&(k?X<=o.to&&X<=C.end:X>=o.from&&X>=C.begin)){var z=k?"before":"after";return new Ce(r.line,X,z)}}var pe=function(ze,Ze,He){for(var it=function(Gt,vn){return vn?new Ce(r.line,s(Gt,1),"before"):new Ce(r.line,Gt,"after")};ze>=0&&ze<a.length;ze+=Ze){var wt=a[ze],_t=Ze>0==(wt.level!=1),Nt=_t?He.begin:s(He.end,-1);if(wt.from<=Nt&&Nt<wt.to)return it(Nt,_t);if(Nt=_t?wt.from:s(wt.to,-1),He.begin<=Nt&&Nt<He.end)return it(Nt,_t)}},ke=pe(i+n,n,C);if(ke)return ke;var Ne=n>0?C.end:s(C.begin,-1);return Ne!=null&&!(n>0&&Ne==t.text.length)&&(ke=pe(n>0?0:a.length-1,n,u(Ne)),ke)?ke:null}var xa={selectAll:Wo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ue)},killLine:function(e){return $r(e,function(t){if(t.empty()){var r=tt(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Ce(t.head.line+1,0)}:{from:t.head,to:Ce(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $r(e,function(t){return{from:Ce(t.from().line,0),to:Ct(e.doc,Ce(t.to().line+1,0))}})},delLineLeft:function(e){return $r(e,function(t){return{from:Ce(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $r(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 $r(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(Ce(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ce(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 is(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")},be)},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")},be)},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/)?is(e,t.head):n},be)},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,a=0;a<r.length;a++){var i=r[a].from(),o=A(e.getLine(i.line),i.ch,n);t.push(O(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return In(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var a=t[n].head,i=tt(e.doc,a.line).text;if(i){if(a.ch==i.length&&(a=new Ce(a.line,a.ch-1)),a.ch>0)a=new Ce(a.line,a.ch+1),e.replaceRange(i.charAt(a.ch-1)+i.charAt(a.ch-2),Ce(a.line,a.ch-2),a,"+transpose");else if(a.line>e.doc.first){var o=tt(e.doc,a.line-1).text;o&&(a=new Ce(a.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Ce(a.line-1,o.length-1),a,"+transpose"))}}r.push(new Wt(a,a))}e.setSelections(r)})},newlineAndIndent:function(e){return In(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);Br(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function as(e,t){var r=tt(e.doc,t),n=bt(r);return n!=r&&(t=xt(n)),Ti(!0,e,n,t,1)}function Nl(e,t){var r=tt(e.doc,t),n=Pt(r);return n!=r&&(t=xt(n)),Ti(!0,e,r,t,-1)}function is(e,t){var r=as(e,t.line),n=tt(e.doc,r.line),a=ct(n,e.doc.direction);if(!a||a[0].level==0){var i=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=i&&t.ch;return Ce(r.line,o?0:i,r.sticky)}return r}function $a(e,t,r){if(typeof t=="string"&&(t=xa[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),a=t(e)!=je}finally{e.display.shift=n,e.state.suppressEdits=!1}return a}function Ul(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var a=Vr(t,e.state.keyMaps[n],r,e);if(a)return a}return e.options.extraKeys&&Vr(t,e.options.extraKeys,r,e)||Vr(t,e.options.keyMap,r,e)}var jl=new se;function wa(e,t,r,n){var a=e.state.keySeq;if(a){if(ts(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==a&&(e.state.keySeq=null,e.display.input.reset())}),os(e,a+" "+t,r,n))return!0}return os(e,t,r,n)}function os(e,t,r,n){var a=Ul(e,t,n);return a=="multi"&&(e.state.keySeq=t),a=="handled"&&_n(e,"keyHandled",e,t,r),(a=="handled"||a=="multi")&&(f(r),fi(e)),!!a}function ss(e,t){var r=rs(t,!0);return r?t.shiftKey&&!e.state.keySeq?wa(e,"Shift-"+r,t,function(n){return $a(e,n,!0)})||wa(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $a(e,n)}):wa(e,r,t,function(n){return $a(e,n)}):!1}function Il(e,t,r){return wa(e,"'"+r+"'",t,function(n){return $a(e,n,!0)})}var Pi=null;function ls(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=D(),_e(t,e))return;L&&P<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);q&&(Pi=n?r:null,!n&&r==88&&!Lt&&(G?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),V&&!G&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;te(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(U(t,"CodeMirror-crosshair"),$e(document,"keyup",r),$e(document,"mouseover",r))}de(document,"keyup",r),de(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),_e(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(nr(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||G&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(q&&r==Pi){Pi=null,f(e);return}if(q&&(!e.which||e.which<10)&&ss(t,e))return;var a=String.fromCharCode(n==null?r:n);if(a=="\b")return;if(Il(t,e,a))return;t.display.input.onKeyPress(e)}var Bl=400,Ai=function(e,t,r){this.time=e,this.pos=t,this.button=r};Ai.prototype.compare=function(e,t,r){return this.time+Bl>e&&We(t,this.pos)==0&&r==this.button};var Ca,Sa;function Wl(e,t){var r=+new Date;return Sa&&Sa.compare(r,e,t)?(Ca=Sa=null,"triple"):Ca&&Ca.compare(r,e,t)?(Sa=new Ai(r,e,t),Ca=null,"double"):(Ca=new Ai(r,e,t),Sa=null,"single")}function ds(e){var t=this,r=t.display;if(_e(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,nr(r,e)){x||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Li(t,e))return;var n=Cr(t,e),a=Z(e),i=n?Wl(n,a):"single";if(window.focus(),a==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,a,n,i,e))return;a==1?n?Kl(t,n,i,e):W(e)==r.scroller&&f(e):a==2?(n&&za(t.doc,n),setTimeout(function(){return r.input.focus()},20)):a==3&&(d?t.display.input.onContextMenu(e):fo(t))}function zl(e,t,r,n,a){var i="Click";return n=="double"?i="Double"+i:n=="triple"&&(i="Triple"+i),i=(t==1?"Left":t==2?"Middle":"Right")+i,wa(e,ns(i,a),a,function(o){if(typeof o=="string"&&(o=xa[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=je}finally{e.state.suppressEdits=!1}return s})}function Hl(e,t,r){var n=e.getOption("configureMouse"),a=n?n(e,t,r):{};if(a.unit==null){var i=ae?r.shiftKey&&r.metaKey:r.altKey;a.unit=i?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(a.extend==null||e.doc.extend)&&(a.extend=e.doc.extend||r.shiftKey),a.addNew==null&&(a.addNew=G?r.metaKey:r.ctrlKey),a.moveOnDrag==null&&(a.moveOnDrag=!(G?r.altKey:r.ctrlKey)),a}function Kl(e,t,r,n){L?setTimeout(y(co,e),0):e.curOp.focus=D();var a=Hl(e,r,n),i=e.doc.sel,o;e.options.dragDrop&&ie&&!e.isReadOnly()&&r=="single"&&(o=i.contains(t))>-1&&(We((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(We(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,a):Gl(e,n,t,a)}function Xl(e,t,r,n){var a=e.display,i=!1,o=mn(e,function(u){x&&(a.scroller.draggable=!1),e.state.draggingText=!1,$e(a.wrapper.ownerDocument,"mouseup",o),$e(a.wrapper.ownerDocument,"mousemove",s),$e(a.scroller,"dragstart",l),$e(a.scroller,"drop",o),i||(f(u),n.addNew||za(e.doc,r,null,null,n.extend),x&&!ce||L&&P==9?setTimeout(function(){a.wrapper.ownerDocument.body.focus({preventScroll:!0}),a.input.focus()},20):a.input.focus())}),s=function(u){i=i||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},l=function(){return i=!0};x&&(a.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,a.scroller.dragDrop&&a.scroller.dragDrop(),de(a.wrapper.ownerDocument,"mouseup",o),de(a.wrapper.ownerDocument,"mousemove",s),de(a.scroller,"dragstart",l),de(a.scroller,"drop",o),fo(e),setTimeout(function(){return a.input.focus()},20)}function fs(e,t,r){if(r=="char")return new Wt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Wt(Ce(t.line,0),Ct(e.doc,Ce(t.line+1,0)));var n=r(e,t);return new Wt(n.from,n.to)}function Gl(e,t,r,n){var a=e.display,i=e.doc;f(t);var o,s,l=i.sel,u=l.ranges;if(n.addNew&&!n.extend?(s=i.sel.contains(r),s>-1?o=u[s]:o=new Wt(r,r)):(o=i.sel.primary(),s=i.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new Wt(r,r)),r=Cr(e,t,!0,!0),s=-1;else{var C=fs(e,r,n.unit);n.extend?o=Si(o,C.anchor,C.head,n.extend):o=C}n.addNew?s==-1?(s=u.length,Sn(i,$n(e,u.concat([o]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&n.unit=="char"&&!n.extend?(Sn(i,$n(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):ki(i,s,o,De):(s=0,Sn(i,new zn([o],0),De),l=i.sel);var k=r;function X(He){if(We(k,He)==0)return;if(k=He,n.unit=="rectangle"){for(var it=[],wt=e.options.tabSize,_t=A(tt(i,r.line).text,r.ch,wt),Nt=A(tt(i,He.line).text,He.ch,wt),Gt=Math.min(_t,Nt),vn=Math.max(_t,Nt),tn=Math.min(r.line,He.line),Fn=Math.min(e.lastLine(),Math.max(r.line,He.line));tn<=Fn;tn++){var Nn=tt(i,tn).text,dn=xe(Nn,Gt,wt);Gt==vn?it.push(new Wt(Ce(tn,dn),Ce(tn,dn))):Nn.length>dn&&it.push(new Wt(Ce(tn,dn),Ce(tn,xe(Nn,vn,wt))))}it.length||it.push(new Wt(r,r)),Sn(i,$n(e,l.ranges.slice(0,s).concat(it),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(He)}else{var Un=o,yn=fs(e,He,n.unit),pn=Un.anchor,fn;We(yn.anchor,pn)>0?(fn=yn.head,pn=nn(Un.from(),yn.anchor)):(fn=yn.anchor,pn=an(Un.to(),yn.head));var rn=l.ranges.slice(0);rn[s]=Vl(e,new Wt(Ct(i,pn),fn)),Sn(i,$n(e,rn,s),De)}}var z=a.wrapper.getBoundingClientRect(),pe=0;function ke(He){var it=++pe,wt=Cr(e,He,!0,n.unit=="rectangle");if(!wt)return;if(We(wt,k)!=0){e.curOp.focus=D(),X(wt);var _t=Ua(a,i);(wt.line>=_t.to||wt.line<_t.from)&&setTimeout(mn(e,function(){pe==it&&ke(He)}),150)}else{var Nt=He.clientY<z.top?-20:He.clientY>z.bottom?20:0;Nt&&setTimeout(mn(e,function(){if(pe!=it)return;a.scroller.scrollTop+=Nt,ke(He)}),50)}}function Ne(He){e.state.selectingText=!1,pe=Infinity,He&&(f(He),a.input.focus()),$e(a.wrapper.ownerDocument,"mousemove",ze),$e(a.wrapper.ownerDocument,"mouseup",Ze),i.history.lastSelOrigin=null}var ze=mn(e,function(He){He.buttons===0||!Z(He)?Ne(He):ke(He)}),Ze=mn(e,Ne);e.state.selectingText=Ze,de(a.wrapper.ownerDocument,"mousemove",ze),de(a.wrapper.ownerDocument,"mouseup",Ze)}function Vl(e,t){var r=t.anchor,n=t.head,a=tt(e.doc,r.line);if(We(r,n)==0&&r.sticky==n.sticky)return t;var i=ct(a);if(!i)return t;var o=Ve(i,r.ch,r.sticky),s=i[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var l=o+(s.from==r.ch==(s.level!=1)?0:1);if(l==0||l==i.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var C=Ve(i,n.ch,n.sticky),k=C-o||(n.ch-r.ch)*(s.level==1?-1:1);C==l-1||C==l?u=k<0:u=k>0}var X=i[l+(u?-1:0)],z=u==(X.level==1),pe=z?X.from:X.to,ke=z?"after":"before";return r.ch==pe&&r.sticky==ke?t:new Wt(new Ce(r.line,pe,ke),n)}function hs(e,t,r,n){var a,i;if(t.touches)a=t.touches[0].clientX,i=t.touches[0].clientY;else try{a=t.clientX,i=t.clientY}catch(X){return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(i>s.bottom||!w(e,r))return v(t);i-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var u=o.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=a){var C=un(e.doc,i),k=e.display.gutterSpecs[l];return he(e,r,e,C,k.className,t),v(t)}}}function Li(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(nr(e.display,t)||$l(e,t))return;if(_e(e,t,"contextmenu"))return;d||e.display.input.onContextMenu(t)}function $l(e,t){return w(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ms(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ia(e)}var qr={toString:function(){return"CodeMirror.Init"}},gs={},qa={};function ql(e){var t=e.optionHandlers;function r(n,a,i,o){e.defaults[n]=a,i&&(t[n]=o?function(s,l,u){u!=qr&&i(s,l,u)}:i)}e.defineOption=r,e.Init=qr,r("value","",function(n,a){return n.setValue(a)},!0),r("mode",null,function(n,a){n.doc.modeOption=a,xi(n)},!0),r("indentUnit",2,xi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ha(n),ia(n),Mn(n)},!0),r("lineSeparator",null,function(n,a){if(n.doc.lineSep=a,!a)return;var i=[],o=n.doc.first;n.doc.iter(function(l){for(var u=0;;){var C=l.text.indexOf(a,u);if(C==-1)break;u=C+a.length,i.push(Ce(o,C))}o++});for(var s=i.length-1;s>=0;s--)Xr(n.doc,a,i[s],Ce(i[s].line,i[s].ch+a.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,a,i){n.state.specialChars=new RegExp(a.source+(a.test(" ")?"":"| "),"g"),i!=qr&&n.refresh()}),r("specialCharPlaceholder",Cs,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,a){return n.getInputField().spellcheck=a},!0),r("autocorrect",!1,function(n,a){return n.getInputField().autocorrect=a},!0),r("autocapitalize",!1,function(n,a){return n.getInputField().autocapitalize=a},!0),r("rtlMoveVisually",!Te),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),fa(n)},!0),r("keyMap","default",function(n,a,i){var o=Va(a),s=i!=qr&&Va(i);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Yl,!0),r("gutters",[],function(n,a){n.display.gutterSpecs=yi(a,n.options.lineNumbers),fa(n)},!0),r("fixedGutter",!0,function(n,a){n.display.gutters.style.left=a?ci(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Wr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),Wr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,a){n.display.gutterSpecs=yi(n.options.gutters,a),fa(n)},!0),r("firstLineNumber",1,fa,!0),r("lineNumberFormatter",function(n){return n},fa,!0),r("showCursorWhenSelecting",!1,oa,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,a){a=="nocursor"&&(Fr(n),n.display.input.blur()),n.display.input.readOnlyChanged(a)}),r("screenReaderLabel",null,function(n,a){a=a===""?null:a,n.display.input.screenReaderLabelChanged(a)}),r("disableInput",!1,function(n,a){a||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,oa,!0),r("singleCursorHeightPerLine",!0,oa,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ha,!0),r("addModeClass",!1,ha,!0),r("pollInterval",100),r("undoDepth",200,function(n,a){return n.doc.history.undoDepth=a}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,ha,!0),r("moveInputWithCursor",!0,function(n,a){a||n.display.input.resetPosition()}),r("tabindex",null,function(n,a){return n.display.input.getField().tabIndex=a||""}),r("autofocus",null),r("direction","ltr",function(n,a){return n.doc.setDirection(a)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=qr;if(!t!=!n){var a=e.display.dragFunctions,i=t?de:$e;i(e.display.scroller,"dragstart",a.start),i(e.display.scroller,"dragenter",a.enter),i(e.display.scroller,"dragover",a.over),i(e.display.scroller,"dragleave",a.leave),i(e.display.scroller,"drop",a.drop)}}function Yl(e){e.options.lineWrapping?(te(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(U(e.display.wrapper,"CodeMirror-wrap"),Gn(e)),di(e),Mn(e),ia(e),setTimeout(function(){return Wr(e)},100)}function en(e,t){var r=this;if(!(this instanceof en))return new en(e,t);this.options=t=t?c(t):{},c(gs,t,!1);var n=t.value;typeof n=="string"?n=new Dn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var a=new en.inputStyles[t.inputStyle](this),i=this.display=new cl(e,n,a,t);i.wrapper.CodeMirror=this,ms(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new se,keySeq:null,specialChars:null},t.autofocus&&!ee&&i.input.focus(),L&&P<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Tl(),Rr(this),this.curOp.forceUpdate=!0,Ro(this,n),t.autofocus&&!ee||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&hi(r)},20):Fr(this);for(var o in qa)qa.hasOwnProperty(o)&&qa[o](this,t[o],qr);Eo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Mi.length;++s)Mi[s](this);Tr(this),x&&t.lineWrapping&&getComputedStyle(i.lineDiv).textRendering=="optimizelegibility"&&(i.lineDiv.style.textRendering="auto")}en.defaults=gs,en.optionHandlers=qa;function Zl(e){var t=e.display;de(t.scroller,"mousedown",mn(e,ds)),L&&P<11?de(t.scroller,"dblclick",mn(e,function(l){if(_e(e,l))return;var u=Cr(e,l);if(!u||Li(e,l)||nr(e.display,l))return;f(l);var C=e.findWordAt(u);za(e.doc,C.anchor,C.head)})):de(t.scroller,"dblclick",function(l){return _e(e,l)||f(l)}),de(t.scroller,"contextmenu",function(l){return ps(e,l)}),de(t.input.getField(),"contextmenu",function(l){t.scroller.contains(l.target)||ps(e,l)});var r,n={end:0};function a(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function i(l){if(l.touches.length!=1)return!1;var u=l.touches[0];return u.radiusX<=1&&u.radiusY<=1}function o(l,u){if(u.left==null)return!0;var C=u.left-l.left,k=u.top-l.top;return C*C+k*k>20*20}de(t.scroller,"touchstart",function(l){if(!_e(e,l)&&!i(l)&&!Li(e,l)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},l.touches.length==1&&(t.activeTouch.left=l.touches[0].pageX,t.activeTouch.top=l.touches[0].pageY)}}),de(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),de(t.scroller,"touchend",function(l){var u=t.activeTouch;if(u&&!nr(t,l)&&u.left!=null&&!u.moved&&new Date-u.start<300){var C=e.coordsChar(t.activeTouch,"page"),k;!u.prev||o(u,u.prev)?k=new Wt(C,C):!u.prev.prev||o(u,u.prev.prev)?k=e.findWordAt(C):k=new Wt(Ce(C.line,0),Ct(e.doc,Ce(C.line+1,0))),e.setSelection(k.anchor,k.head),e.focus(),f(l)}a()}),de(t.scroller,"touchcancel",a),de(t.scroller,"scroll",function(){t.scroller.clientHeight&&(la(e,t.scroller.scrollTop),kr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))}),de(t.scroller,"mousewheel",function(l){return Co(e,l)}),de(t.scroller,"DOMMouseScroll",function(l){return Co(e,l)}),de(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(l){_e(e,l)||b(l)},over:function(l){_e(e,l)||(Rl(e,l),b(l))},start:function(l){return Ol(e,l)},drop:mn(e,kl),leave:function(l){_e(e,l)||Zo(e)}};var s=t.input.getField();de(s,"keyup",function(l){return us.call(e,l)}),de(s,"keydown",mn(e,ls)),de(s,"keypress",mn(e,cs)),de(s,"focus",function(l){return hi(e,l)}),de(s,"blur",function(l){return Fr(e,l)})}var Mi=[];en.defineInitHook=function(e){return Mi.push(e)};function ka(e,t,r,n){var a=e.doc,i;r==null&&(r="add"),r=="smart"&&(a.mode.indent?i=On(e,t).state:r="prev");var o=e.options.tabSize,s=tt(a,t),l=A(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var u=s.text.match(/^\s*/)[0],C;if(!n&&!/\S/.test(s.text))C=0,r="not";else if(r=="smart"&&(C=a.mode.indent(i,s.text.slice(u.length),s.text),C==je||C>150)){if(!n)return;r="prev"}r=="prev"?t>a.first?C=A(tt(a,t-1).text,null,o):C=0:r=="add"?C=l+e.options.indentUnit:r=="subtract"?C=l-e.options.indentUnit:typeof r=="number"&&(C=l+r),C=Math.max(0,C);var k="",X=0;if(e.options.indentWithTabs)for(var z=Math.floor(C/o);z;--z)X+=o,k+=" ";if(X<C&&(k+=O(C-X)),k!=u)return Xr(a,k,Ce(t,0),Ce(t,u.length),"+input"),s.stateAfter=null,!0;for(var pe=0;pe<a.sel.ranges.length;pe++){var ke=a.sel.ranges[pe];if(ke.head.line==t&&ke.head.ch<u.length){var Ne=Ce(t,u.length);ki(a,pe,new Wt(Ne,Ne));break}}}var qn=null;function Ja(e){qn=e}function Di(e,t,r,n,a){var i=e.doc;e.display.shift=!1,n||(n=i.sel);var o=+new Date-200,s=a=="paste"||e.state.pasteIncoming>o,l=kt(t),u=null;if(s&&n.ranges.length>1)if(qn&&qn.text.join(`
|
|
`)==t){if(n.ranges.length%qn.text.length==0){u=[];for(var C=0;C<qn.text.length;C++)u.push(i.splitLines(qn.text[C]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Xe(l,function(ze){return[ze]}));for(var k=e.curOp.updateInput,X=n.ranges.length-1;X>=0;X--){var z=n.ranges[X],pe=z.from(),ke=z.to();z.empty()&&(r&&r>0?pe=Ce(pe.line,pe.ch-r):e.state.overwrite&&!s?ke=Ce(ke.line,Math.min(tt(i,ke.line).text.length,ke.ch+Re(l).length)):s&&qn&&qn.lineWise&&qn.text.join(`
|
|
`)==l.join(`
|
|
`)&&(pe=ke=Ce(pe.line,0)));var Ne={from:pe,to:ke,text:u?u[X%u.length]:l,origin:a||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Kr(e.doc,Ne),_n(e,"inputRead",e,Ne)}t&&!s&&bs(e,t),Br(e),e.curOp.updateInput<2&&(e.curOp.updateInput=k),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function vs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&In(t,function(){return Di(t,r,0,null,"paste")}),!0}function bs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var a=r.ranges[n];if(a.head.ch>100||n&&r.ranges[n-1].head.line==a.head.line)continue;var i=e.getModeAt(a.head),o=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){o=ka(e,a.head.line,"smart");break}}else i.electricInput&&(i.electricInput.test(tt(e.doc,a.head.line).text.slice(0,a.head.ch))&&(o=ka(e,a.head.line,"smart")));o&&_n(e,"electricInput",e,a.head.line)}}function _s(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var a=e.doc.sel.ranges[n].head.line,i={anchor:Ce(a,0),head:Ce(a+1,0)};r.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:r}}function ys(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Es(){var e=p("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=p("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return x?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),ys(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,a){var i=this.options,o=i[n];if(i[n]==a&&n!="mode")return;i[n]=a,t.hasOwnProperty(n)&&mn(this,t[n])(this,a,o),he(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,a){this.state.keyMaps[a?"push":"unshift"](Va(n))},removeKeyMap:function(n){for(var a=this.state.keyMaps,i=0;i<a.length;++i)if(a[i]==n||a[i].name==n)return a.splice(i,1),!0},addOverlay:Tn(function(n,a){var i=n.token?n:e.getMode(this.options,n);if(i.startState)throw new Error("Overlays may not be stateful.");ut(this.state.overlays,{mode:i,modeSpec:n,opaque:a&&a.opaque,priority:a&&a.priority||0},function(o){return o.priority}),this.state.modeGen++,Mn(this)}),removeOverlay:Tn(function(n){for(var a=this.state.overlays,i=0;i<a.length;++i){var o=a[i].modeSpec;if(o==n||typeof n=="string"&&o.name==n){a.splice(i,1),this.state.modeGen++,Mn(this);return}}}),indentLine:Tn(function(n,a,i){typeof a!="string"&&typeof a!="number"&&(a==null?a=this.options.smartIndent?"smart":"prev":a=a?"add":"subtract"),Hn(this.doc,n)&&ka(this,n,a,i)}),indentSelection:Tn(function(n){for(var a=this.doc.sel.ranges,i=-1,o=0;o<a.length;o++){var s=a[o];if(s.empty())s.head.line>i&&(ka(this,s.head.line,n,!0),i=s.head.line,o==this.doc.sel.primIndex&&Br(this));else{var l=s.from(),u=s.to(),C=Math.max(i,l.line);i=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var k=C;k<i;++k)ka(this,k,n);var X=this.doc.sel.ranges;l.ch==0&&a.length==X.length&&X[o].from().ch>0&&ki(this.doc,o,new Wt(l,X[o].to()),ue)}}}),getTokenAt:function(n,a){return gt(this,n,a)},getLineTokens:function(n,a){return gt(this,Ce(n),a,!0)},getTokenTypeAt:function(n){n=Ct(this.doc,n);var a=br(this,tt(this.doc,n.line)),i=0,o=(a.length-1)/2,s=n.ch,l;if(s==0)l=a[2];else for(;;){var u=i+o>>1;if((u?a[u*2-1]:0)>=s)o=u;else if(a[u*2+1]<s)i=u+1;else{l=a[u*2+2];break}}var C=l?l.indexOf("overlay "):-1;return C<0?l:C==0?null:l.slice(0,C-1)},getModeAt:function(n){var a=this.doc.mode;return a.innerMode?e.innerMode(a,this.getTokenAt(n).state).mode:a},getHelper:function(n,a){return this.getHelpers(n,a)[0]},getHelpers:function(n,a){var i=[];if(!r.hasOwnProperty(a))return i;var o=r[a],s=this.getModeAt(n);if(typeof s[a]=="string")o[s[a]]&&i.push(o[s[a]]);else if(s[a])for(var l=0;l<s[a].length;l++){var u=o[s[a][l]];u&&i.push(u)}else s.helperType&&o[s.helperType]?i.push(o[s.helperType]):o[s.name]&&i.push(o[s.name]);for(var C=0;C<o._global.length;C++){var k=o._global[C];k.pred(s,this)&&oe(i,k.val)==-1&&i.push(k.val)}return i},getStateAfter:function(n,a){var i=this.doc;return n=Bn(i,n==null?i.first+i.size-1:n),On(this,n+1,a).state},cursorCoords:function(n,a){var i,o=this.doc.sel.primary();return n==null?i=o.head:typeof n=="object"?i=Ct(this.doc,n):i=n?o.from():o.to(),Vn(this,i,a||"page")},charCoords:function(n,a){return ii(this,Ct(this.doc,n),a||"page")},coordsChar:function(n,a){return n=no(this,n,a||"page"),si(this,n.left,n.top)},lineAtHeight:function(n,a){return n=no(this,{top:n,left:0},a||"page").top,un(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,a,i){var o=!1,s;if(typeof n=="number"){var l=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>l&&(n=l,o=!0),s=tt(this.doc,n)}else s=n;return La(this,s,{top:0,left:0},a||"page",i||o).top+(o?this.doc.height-Qt(s):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,a,i,o,s){var l=this.display;n=Vn(this,Ct(this.doc,n));var u=n.bottom,C=n.left;if(a.style.position="absolute",a.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(a),l.sizer.appendChild(a),o=="over")u=n.top;else if(o=="above"||o=="near"){var k=Math.max(l.wrapper.clientHeight,this.doc.height),X=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);(o=="above"||n.bottom+a.offsetHeight>k)&&n.top>a.offsetHeight?u=n.top-a.offsetHeight:n.bottom+a.offsetHeight<=k&&(u=n.bottom),C+a.offsetWidth>X&&(C=X-a.offsetWidth)}a.style.top=u+"px",a.style.left=a.style.right="",s=="right"?(C=l.sizer.clientWidth-a.offsetWidth,a.style.right="0px"):(s=="left"?C=0:s=="middle"&&(C=(l.sizer.clientWidth-a.offsetWidth)/2),a.style.left=C+"px"),i&&Js(this,{left:C,top:u,right:C+a.offsetWidth,bottom:u+a.offsetHeight})},triggerOnKeyDown:Tn(ls),triggerOnKeyPress:Tn(cs),triggerOnKeyUp:us,triggerOnMouseDown:Tn(ds),execCommand:function(n){if(xa.hasOwnProperty(n))return xa[n].call(null,this)},triggerElectric:Tn(function(n){bs(this,n)}),findPosH:function(n,a,i,o){var s=1;a<0&&(s=-1,a=-a);for(var l=Ct(this.doc,n),u=0;u<a&&!(l=Ni(this.doc,l,s,i,o),l.hitSide);++u);return l},moveH:Tn(function(n,a){var i=this;this.extendSelectionsBy(function(o){return i.display.shift||i.doc.extend||o.empty()?Ni(i.doc,o.head,n,a,i.options.rtlMoveVisually):n<0?o.from():o.to()},be)}),deleteH:Tn(function(n,a){var i=this.doc.sel,o=this.doc;i.somethingSelected()?o.replaceSelection("",null,"+delete"):$r(this,function(s){var l=Ni(o,s.head,n,a,!1);return n<0?{from:l,to:s.head}:{from:s.head,to:l}})}),findPosV:function(n,a,i,o){var s=1,l=o;a<0&&(s=-1,a=-a);for(var u=Ct(this.doc,n),C=0;C<a;++C){var k=Vn(this,u,"div");if(l==null?l=k.left:k.left=l,u=xs(this,k,s,i),u.hitSide)break}return u},moveV:Tn(function(n,a){var i=this,o=this.doc,s=[],l=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(C){if(l)return n<0?C.from():C.to();var k=Vn(i,C.head,"div");C.goalColumn!=null&&(k.left=C.goalColumn),s.push(k.left);var X=xs(i,k,n,a);return a=="page"&&C==o.sel.primary()&&mi(i,ii(i,X,"div").top-k.top),X},be),s.length)for(var u=0;u<o.sel.ranges.length;u++)o.sel.ranges[u].goalColumn=s[u]}),findWordAt:function(n){var a=this.doc,i=tt(a,n.line).text,o=n.ch,s=n.ch;if(i){var l=this.getHelper(n,"wordChars");(n.sticky=="before"||s==i.length)&&o?--o:++s;for(var u=i.charAt(o),C=Ae(u,l)?function(k){return Ae(k,l)}:/\s/.test(u)?function(k){return/\s/.test(k)}:function(k){return!/\s/.test(k)&&!Ae(k)};o>0&&C(i.charAt(o-1));)--o;for(;s<i.length&&C(i.charAt(s));)++s}return new Wt(Ce(n.line,o),Ce(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?te(this.display.cursorDiv,"CodeMirror-overwrite"):U(this.display.cursorDiv,"CodeMirror-overwrite"),he(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Tn(function(n,a){sa(this,n,a)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Yn(this)-this.display.barHeight,width:n.scrollWidth-Yn(this)-this.display.barWidth,clientHeight:ni(this),clientWidth:xr(this)}},scrollIntoView:Tn(function(n,a){n==null?(n={from:this.doc.sel.primary().head,to:null},a==null&&(a=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Ce(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=a||0,n.from.line!=null?Ys(this,n):po(this,n.from,n.to,n.margin)}),setSize:Tn(function(n,a){var i=this,o=function(l){return typeof l=="number"||/^\d+$/.test(String(l))?l+"px":l};n!=null&&(this.display.wrapper.style.width=o(n)),a!=null&&(this.display.wrapper.style.height=o(a)),this.options.lineWrapping&&Qi(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(l){if(l.widgets){for(var u=0;u<l.widgets.length;u++)if(l.widgets[u].noHScroll){cr(i,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,he(this,"refresh",this)}),operation:function(n){return In(this,n)},startOperation:function(){return Rr(this)},endOperation:function(){return Tr(this)},refresh:Tn(function(){var n=this.display.cachedTextHeight;Mn(this),this.curOp.forceUpdate=!0,ia(this),sa(this,this.doc.scrollLeft,this.doc.scrollTop),bi(this.display),(n==null||Math.abs(n-jr(this.display))>.5||this.options.lineWrapping)&&di(this),he(this,"refresh",this)}),swapDoc:Tn(function(n){var a=this.doc;return a.cm=null,this.state.selectingText&&this.state.selectingText(),Ro(this,n),ia(this),this.display.input.reset(),sa(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,_n(this,"swapDoc",this,a),a}),phrase:function(n){var a=this.options.phrases;return a&&Object.prototype.hasOwnProperty.call(a,n)?a[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}},E(e),e.registerHelper=function(n,a,i){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][a]=i},e.registerGlobalHelper=function(n,a,i,o){e.registerHelper(n,a,o),r[n]._global.push({pred:i,val:o})}}function Ni(e,t,r,n,a){var i=t,o=r,s=tt(e,t.line),l=a&&e.direction=="rtl"?-r:r;function u(){var Ze=t.line+l;return Ze<e.first||Ze>=e.first+e.size?!1:(t=new Ce(Ze,t.ch,t.sticky),s=tt(e,Ze))}function C(Ze){var He;if(n=="codepoint"){var it=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(it)?He=null:He=new Ce(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(it>=55296&&it<56320?2:1))),-r)}else a?He=Dl(e.cm,s,t,r):He=Ri(s,t,r);if(He==null)if(!Ze&&u())t=Ti(a,e.cm,s,t.line,l);else return!1;else t=He;return!0}if(n=="char"||n=="codepoint")C();else if(n=="column")C(!0);else if(n=="word"||n=="group")for(var k=null,X=n=="group",z=e.cm&&e.cm.getHelper(t,"wordChars"),pe=!0;!(r<0&&!C(!pe));pe=!1){var ke=s.text.charAt(t.ch)||`
|
|
`,Ne=Ae(ke,z)?"w":X&&ke==`
|
|
`?"n":!X||/\s/.test(ke)?null:"p";if(X&&!pe&&!Ne&&(Ne="s"),k&&k!=Ne){r<0&&(r=1,C(),t.sticky="after");break}if(Ne&&(k=Ne),r>0&&!C(!pe))break}var ze=Ka(e,t,i,o,!0);return Pe(i,ze)&&(ze.hitSide=!0),ze}function xs(e,t,r,n){var a=e.doc,i=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*jr(e.display),3);o=(r>0?t.bottom:t.top)+r*l}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var u;!(u=si(e,i,o),!u.outside);){if(r<0?o<=0:o>=a.height){u.hitSide=!0;break}o+=r*5}return u}var zt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};zt.prototype.init=function(e){var t=this,r=this,n=r.cm,a=r.div=e.lineDiv;ys(a,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function i(s){for(var l=s.target;l;l=l.parentNode){if(l==a)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(l.className))break}return!1}de(a,"paste",function(s){if(!i(s)||_e(n,s)||vs(s,n))return;P<=11&&setTimeout(mn(n,function(){return t.updateFromDOM()}),20)}),de(a,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),de(a,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),de(a,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),de(a,"touchstart",function(){return r.forceCompositionEnd()}),de(a,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!i(s)||_e(n,s))return;if(n.somethingSelected())Ja({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var l=_s(n);Ja({lineWise:!0,text:l.text}),s.type=="cut"&&n.operation(function(){n.setSelections(l.ranges,0,ue),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var u=qn.text.join(`
|
|
`);if(s.clipboardData.setData("Text",u),s.clipboardData.getData("Text")==u){s.preventDefault();return}}var C=Es(),k=C.firstChild;n.display.lineSpace.insertBefore(C,n.display.lineSpace.firstChild),k.value=qn.text.join(`
|
|
`);var X=document.activeElement;fe(k),setTimeout(function(){n.display.lineSpace.removeChild(C),X.focus(),X==a&&r.showPrimarySelection()},50)}de(a,"copy",o),de(a,"cut",o)},zt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},zt.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},zt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},zt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},zt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var i=Ya(t,e.anchorNode,e.anchorOffset),o=Ya(t,e.focusNode,e.focusOffset);if(i&&!i.bad&&o&&!o.bad&&We(nn(i,o),n)==0&&We(an(i,o),a)==0)return;var s=t.display.view,l=n.line>=t.display.viewFrom&&ws(t,n)||{node:s[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&ws(t,a);if(!u){var C=s[s.length-1].measure,k=C.maps?C.maps[C.maps.length-1]:C.map;u={node:k[k.length-1],offset:k[k.length-2]-k[k.length-3]}}if(!l||!u){e.removeAllRanges();return}var X=e.rangeCount&&e.getRangeAt(0),z;try{z=R(l.node,l.offset,u.offset,u.node)}catch(pe){}z&&(!V&&t.state.focused?(e.collapse(l.node,l.offset),z.collapsed||(e.removeAllRanges(),e.addRange(z))):(e.removeAllRanges(),e.addRange(z)),X&&e.anchorNode==null?e.addRange(X):V&&this.startGracePeriod()),this.rememberSelection()},zt.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)},zt.prototype.showMultipleSelections=function(e){S(this.cm.display.cursorDiv,e.cursors),S(this.cm.display.selectionDiv,e.selection)},zt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},zt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return _(this.div,t)},zt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},zt.prototype.blur=function(){this.div.blur()},zt.prototype.getField=function(){return this.div},zt.prototype.supportsTouch=function(){return!0},zt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():In(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)},zt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},zt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(M&&H&&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=Ya(t,e.anchorNode,e.anchorOffset),n=Ya(t,e.focusNode,e.focusOffset);r&&n&&In(t,function(){Sn(t.doc,fr(r,n),ue),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},zt.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(),a=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Ce(n.line-1,tt(e.doc,n.line-1).length)),a.ch==tt(e.doc,a.line).text.length&&a.line<e.lastLine()&&(a=Ce(a.line+1,0)),n.line<t.viewFrom||a.line>t.viewTo-1)return!1;var i,o,s;n.line==t.viewFrom||(i=Sr(e,n.line))==0?(o=xt(t.view[0].line),s=t.view[0].node):(o=xt(t.view[i].line),s=t.view[i-1].node.nextSibling);var l=Sr(e,a.line),u,C;if(l==t.view.length-1?(u=t.viewTo-1,C=t.lineDiv.lastChild):(u=xt(t.view[l+1].line)-1,C=t.view[l+1].node.previousSibling),!s)return!1;for(var k=e.doc.splitLines(tu(e,s,C,o,u)),X=Ft(e.doc,Ce(o,0),Ce(u,tt(e.doc,u).text.length));k.length>1&&X.length>1;)if(Re(k)==Re(X))k.pop(),X.pop(),u--;else if(k[0]==X[0])k.shift(),X.shift(),o++;else break;for(var z=0,pe=0,ke=k[0],Ne=X[0],ze=Math.min(ke.length,Ne.length);z<ze&&ke.charCodeAt(z)==Ne.charCodeAt(z);)++z;for(var Ze=Re(k),He=Re(X),it=Math.min(Ze.length-(k.length==1?z:0),He.length-(X.length==1?z:0));pe<it&&Ze.charCodeAt(Ze.length-pe-1)==He.charCodeAt(He.length-pe-1);)++pe;if(k.length==1&&X.length==1&&o==n.line)for(;z&&z>n.ch&&Ze.charCodeAt(Ze.length-pe-1)==He.charCodeAt(He.length-pe-1);)z--,pe++;k[k.length-1]=Ze.slice(0,Ze.length-pe).replace(/^\u200b+/,""),k[0]=k[0].slice(z).replace(/\u200b+$/,"");var wt=Ce(o,z),_t=Ce(u,X.length?Re(X).length-pe:0);if(k.length>1||k[0]||We(wt,_t))return Xr(e.doc,k,wt,_t,"+input"),!0},zt.prototype.ensurePolled=function(){this.forceCompositionEnd()},zt.prototype.reset=function(){this.forceCompositionEnd()},zt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},zt.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)},zt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&In(this.cm,function(){return Mn(e.cm)})},zt.prototype.setUneditable=function(e){e.contentEditable="false"},zt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||mn(this.cm,Di)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},zt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},zt.prototype.onContextMenu=function(){},zt.prototype.resetPosition=function(){},zt.prototype.needsContentAttribute=!0;function ws(e,t){var r=ri(e,t.line);if(!r||r.hidden)return null;var n=tt(e.doc,t.line),a=$i(r,n,t.line),i=ct(n,e.doc.direction),o="left";if(i){var s=Ve(i,t.ch);o=s%2?"right":"left"}var l=Yi(a.map,t.ch,o);return l.offset=l.collapse=="right"?l.end:l.start,l}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,a){var i="",o=!1,s=e.doc.lineSeparator(),l=!1;function u(z){return function(pe){return pe.id==z}}function C(){o&&(i+=s,l&&(i+=s),o=l=!1)}function k(z){z&&(C(),i+=z)}function X(z){if(z.nodeType==1){var pe=z.getAttribute("cm-text");if(pe){k(pe);return}var ke=z.getAttribute("cm-marker"),Ne;if(ke){var ze=e.findMarks(Ce(n,0),Ce(a+1,0),u(+ke));ze.length&&(Ne=ze[0].find(0))&&k(Ft(e.doc,Ne.from,Ne.to).join(s));return}if(z.getAttribute("contenteditable")=="false")return;var Ze=/^(pre|div|p|li|table|br)$/i.test(z.nodeName);if(!/^br$/i.test(z.nodeName)&&z.textContent.length==0)return;Ze&&C();for(var He=0;He<z.childNodes.length;He++)X(z.childNodes[He]);/^(pre|p)$/i.test(z.nodeName)&&(l=!0),Ze&&(o=!0)}else z.nodeType==3&&k(z.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(X(t),t==r);)t=t.nextSibling,l=!1;return i}function Ya(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Jr(e.clipPos(Ce(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 a=0;a<e.display.view.length;a++){var i=e.display.view[a];if(i.node==n)return nu(i,t,r)}}function nu(e,t,r){var n=e.text.firstChild,a=!1;if(!t||!_(n,t))return Jr(Ce(xt(e.line),0),!0);if(t==n&&(a=!0,t=n.childNodes[r],r=0,!t)){var i=e.rest?Re(e.rest):e.line;return Jr(Ce(xt(i),i.text.length),a)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var l=e.measure,u=l.maps;function C(Ne,ze,Ze){for(var He=-1;He<(u?u.length:0);He++)for(var it=He<0?l.map:u[He],wt=0;wt<it.length;wt+=3){var _t=it[wt+2];if(_t==Ne||_t==ze){var Nt=xt(He<0?e.line:e.rest[He]),Gt=it[wt]+Ze;return(Ze<0||_t!=Ne)&&(Gt=it[wt+(Ze?1:0)]),Ce(Nt,Gt)}}}var k=C(o,s,r);if(k)return Jr(k,a);for(var X=s.nextSibling,z=o?o.nodeValue.length-r:0;X;X=X.nextSibling){if(k=C(X,X.firstChild,0),k)return Jr(Ce(k.line,k.ch-z),a);z+=X.textContent.length}for(var pe=s.previousSibling,ke=r;pe;pe=pe.previousSibling){if(k=C(pe,pe.firstChild,-1),k)return Jr(Ce(k.line,k.ch+ke),a);ke+=pe.textContent.length}}var ln=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new se,this.hasSelection=!1,this.composing=null};ln.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var a=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),N&&(a.style.width="0px"),de(a,"input",function(){L&&P>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),de(a,"paste",function(o){if(_e(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function i(o){if(_e(n,o))return;if(n.somethingSelected())Ja({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=_s(n);Ja({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,ue):(r.prevInput="",a.value=s.text.join(`
|
|
`),fe(a))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}de(a,"cut",i),de(a,"copy",i),de(e.scroller,"paste",function(o){if(nr(e,o)||_e(n,o))return;if(!a.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,a.dispatchEvent(s)}),de(e.lineSpace,"selectstart",function(o){nr(e,o)||f(o)}),de(a,"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"})}}),de(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ln.prototype.createField=function(e){this.wrapper=Es(),this.textarea=this.wrapper.firstChild},ln.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ln.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=lo(e);if(e.options.moveInputWithCursor){var a=Vn(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,a.top+o.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,a.left+o.left-i.left))}return n},ln.prototype.showSelection=function(e){var t=this.cm,r=t.display;S(r.cursorDiv,e.cursors),S(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ln.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&&fe(this.textarea),L&&P>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",L&&P>=9&&(this.hasSelection=null))},ln.prototype.getField=function(){return this.textarea},ln.prototype.supportsTouch=function(){return!1},ln.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},ln.prototype.blur=function(){this.textarea.blur()},ln.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ln.prototype.receivedFocus=function(){this.slowPoll()},ln.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()})},ln.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)},ln.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||qe(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var a=r.value;if(a==n&&!t.somethingSelected())return!1;if(L&&P>=9&&this.hasSelection===a||G&&/[\uf700-\uf7ff]/.test(a))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=a.charCodeAt(0);if(i==8203&&!n&&(n="\u200B"),i==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,a.length);o<s&&n.charCodeAt(o)==a.charCodeAt(o);)++o;return In(t,function(){Di(t,a.slice(o),n.length-o,null,e.composing?"*compose":null),a.length>1e3||a.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=a,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ln.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ln.prototype.onKeyPress=function(){L&&P>=9&&(this.hasSelection=null),this.fastPoll()},ln.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,a=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=Cr(r,e),o=n.scroller.scrollTop;if(!i||q)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(i)==-1&&mn(r,Sn)(r.doc,fr(i),ue);var l=a.style.cssText,u=t.wrapper.style.cssText,C=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",a.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-C.top-5)+"px; left: "+(e.clientX-C.left-5)+`px;
|
|
z-index: 1000; background: `+(L?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var k;x&&(k=window.scrollY),n.input.focus(),x&&window.scrollTo(null,k),n.input.reset(),r.somethingSelected()||(a.value=t.prevInput=" "),t.contextMenuPending=z,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function X(){if(a.selectionStart!=null){var ke=r.somethingSelected(),Ne="\u200B"+(ke?a.value:"");a.value="\u21DA",a.value=Ne,t.prevInput=ke?"":"\u200B",a.selectionStart=1,a.selectionEnd=Ne.length,n.selForContextMenu=r.doc.sel}}function z(){if(t.contextMenuPending!=z)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=u,a.style.cssText=l,L&&P<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),a.selectionStart!=null){(!L||L&&P<9)&&X();var ke=0,Ne=function(){n.selForContextMenu==r.doc.sel&&a.selectionStart==0&&a.selectionEnd>0&&t.prevInput=="\u200B"?mn(r,Wo)(r):ke++<10?n.detectingSelectAll=setTimeout(Ne,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ne,200)}}if(L&&P>=9&&X(),d){b(e);var pe=function(){$e(window,"mouseup",pe),setTimeout(z,20)};de(window,"mouseup",pe)}else setTimeout(z,50)},ln.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ln.prototype.setUneditable=function(){},ln.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=D();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var a;if(e.form&&(de(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;a=i.submit;try{var o=i.submit=function(){n(),i.submit=a,i.submit(),i.submit=o}}catch(l){}}t.finishInit=function(l){l.save=n,l.getTextArea=function(){return e},l.toTextArea=function(){l.toTextArea=isNaN,n(),e.parentNode.removeChild(l.getWrapperElement()),e.style.display="",e.form&&($e(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=a))}},e.style.display="none";var s=en(function(l){return e.parentNode.insertBefore(l,e.nextSibling)},t);return s}function au(e){e.off=$e,e.on=de,e.wheelEventPixels=dl,e.Doc=Dn,e.splitLines=kt,e.countColumn=A,e.findColumn=xe,e.isWordChar=Se,e.Pass=je,e.signal=he,e.Line=Jt,e.changeEnd=hr,e.scrollbarModel=vo,e.Pos=Ce,e.cmpPos=We,e.modes=Rt,e.mimeModes=ot,e.resolveMode=pt,e.getMode=rt,e.modeExtensions=lt,e.extendMode=Et,e.copyState=jt,e.startState=Xt,e.innerMode=Dt,e.commands=xa,e.keyMap=rr,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Vr,e.normalizeKeyMap=Ml,e.StringStream=It,e.SharedTextMarker=_a,e.TextMarker=mr,e.LineWidget=ba,e.e_preventDefault=f,e.e_stopPropagation=h,e.e_stop=b,e.addClass=te,e.contains=_,e.rmClass=U,e.keyNames=gr}ql(en),Ql(en);var iu="iter insert remove copy getEditor constructor".split(" ");for(var Za in Dn.prototype)Dn.prototype.hasOwnProperty(Za)&&oe(iu,Za)<0&&(en.prototype[Za]=function(e){return function(){return e.apply(this.doc,arguments)}}(Dn.prototype[Za]));return E(Dn),en.inputStyles={textarea:ln,contenteditable:zt},en.defineMode=function(e){!en.defaults.mode&&e!="null"&&(en.defaults.mode=e),Mt.apply(this,arguments)},en.defineMIME=Tt,en.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),en.defineMIME("text/plain","null"),en.defineExtension=function(e,t){en.prototype[e]=t},en.defineDocExtension=function(e,t){Dn.prototype[e]=t},en.fromTextArea=ru,au(en),en.version="5.58.2",en})},Y1PL:function(mt,Ke,m){"use strict";m.r(Ke),m.d(Ke,"ResizableTextArea",function(){return oe});var F=m("wx14"),we=m("1OyB"),V=m("vuIU"),ge=m("Ji7U"),me=m("LK+K"),le=m("cDcd"),L=m("VTBJ"),P=m("rePB"),x=m("Zm9Q"),ne=m("Kwbf"),H=m("c+Xe"),q=m("m+aA"),ce=m("bdgK"),j=new Map;function I(ue){ue.forEach(function(De){var be,xe=De.target;(be=j.get(xe))===null||be===void 0||be.forEach(function(K){return K(xe)})})}var N=new ce.default(I),M=null,ee=null;function G(ue,De){j.has(ue)||(j.set(ue,new Set),N.observe(ue)),j.get(ue).add(De)}function ae(ue,De){j.has(ue)&&(j.get(ue).delete(De),j.get(ue).size||(N.unobserve(ue),j.delete(ue)))}var Te=function(ue){Object(ge.a)(be,ue);var De=Object(me.a)(be);function be(){return Object(we.a)(this,be),De.apply(this,arguments)}return Object(V.a)(be,[{key:"render",value:function(){return this.props.children}}]),be}(le.Component),Y=le.createContext(null);function J(ue){var De=ue.children,be=ue.onBatchResize,xe=le.useRef(0),K=le.useRef([]),O=le.useContext(Y),Re=le.useCallback(function(Xe,ut,Fe){xe.current+=1;var Ie=xe.current;K.current.push({size:Xe,element:ut,data:Fe}),Promise.resolve().then(function(){Ie===xe.current&&(be==null||be(K.current),K.current=[])}),O==null||O(Xe,ut,Fe)},[be,O]);return le.createElement(Y.Provider,{value:Re},De)}function d(ue){var De=ue.children,be=ue.disabled,xe=le.useRef(null),K=le.useRef(null),O=le.useContext(Y),Re=le.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Xe=le.isValidElement(De)&&Object(H.c)(De),ut=Xe?De.ref:null,Fe=le.useMemo(function(){return Object(H.a)(ut,xe)},[ut,xe]),Ie=le.useRef(ue);Ie.current=ue;var Ee=le.useCallback(function(Se){var Ae=Ie.current,Ue=Ae.onResize,Le=Ae.data,ye=Se.getBoundingClientRect(),ve=ye.width,st=ye.height,Qe=Se.offsetWidth,Ge=Se.offsetHeight,Ve=Math.floor(ve),ht=Math.floor(st);if(Re.current.width!==Ve||Re.current.height!==ht||Re.current.offsetWidth!==Qe||Re.current.offsetHeight!==Ge){var ct={width:Ve,height:ht,offsetWidth:Qe,offsetHeight:Ge};Re.current=ct;var nt=Qe===Math.round(ve)?ve:Qe,de=Ge===Math.round(st)?st:Ge,dt=Object(L.a)(Object(L.a)({},ct),{},{offsetWidth:nt,offsetHeight:de});O==null||O(dt,Se,Le),Ue&&Promise.resolve().then(function(){Ue(dt,Se)})}},[]);return le.useEffect(function(){var Se=Object(q.a)(xe.current)||Object(q.a)(K.current);return Se&&!be&&G(Se,Ee),function(){return ae(Se,Ee)}},[xe.current,be]),le.createElement(Te,{ref:K},Xe?le.cloneElement(De,{ref:Fe}):De)}var Q="rc-observer-key";function U(ue){var De=ue.children,be=Object(x.a)(De);return be.map(function(xe,K){var O=(xe==null?void 0:xe.key)||"".concat(Q,"-").concat(K);return le.createElement(d,Object(F.a)({},ue,{key:O}),xe)})}U.Collection=J;var re=U,S=m("bT9E"),p=m("TSYQ"),T=m.n(p),R=`
|
|
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
|
|
`,_=["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"],D={},te;function B(ue){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=ue.getAttribute("id")||ue.getAttribute("data-reactid")||ue.getAttribute("name");if(De&&D[be])return D[be];var xe=window.getComputedStyle(ue),K=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),O=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),Re=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),Xe=_.map(function(Fe){return"".concat(Fe,":").concat(xe.getPropertyValue(Fe))}).join(";"),ut={sizingStyle:Xe,paddingSize:O,borderSize:Re,boxSizing:K};return De&&be&&(D[be]=ut),ut}function fe(ue){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;te||(te=document.createElement("textarea"),te.setAttribute("tab-index","-1"),te.setAttribute("aria-hidden","true"),document.body.appendChild(te)),ue.getAttribute("wrap")?te.setAttribute("wrap",ue.getAttribute("wrap")):te.removeAttribute("wrap");var K=B(ue,De),O=K.paddingSize,Re=K.borderSize,Xe=K.boxSizing,ut=K.sizingStyle;te.setAttribute("style","".concat(ut,";").concat(R)),te.value=ue.value||ue.placeholder||"";var Fe=Number.MIN_SAFE_INTEGER,Ie=Number.MAX_SAFE_INTEGER,Ee=te.scrollHeight,Se;if(Xe==="border-box"?Ee+=Re:Xe==="content-box"&&(Ee-=O),be!==null||xe!==null){te.value=" ";var Ae=te.scrollHeight-O;be!==null&&(Fe=Ae*be,Xe==="border-box"&&(Fe=Fe+O+Re),Ee=Math.max(Fe,Ee)),xe!==null&&(Ie=Ae*xe,Xe==="border-box"&&(Ie=Ie+O+Re),Se=Ee>Ie?"":"hidden",Ee=Math.min(Ie,Ee))}return{height:Ee,minHeight:Fe,maxHeight:Ie,overflowY:Se,resize:"none"}}var y=m("Gytx"),c=m.n(y),A;(function(ue){ue[ue.NONE=0]="NONE",ue[ue.RESIZING=1]="RESIZING",ue[ue.RESIZED=2]="RESIZED"})(A||(A={}));var se=function(ue){Object(ge.a)(be,ue);var De=Object(me.a)(be);function be(xe){var K;return Object(we.a)(this,be),K=De.call(this,xe),K.nextFrameActionId=void 0,K.resizeFrameId=void 0,K.textArea=void 0,K.saveTextArea=function(O){K.textArea=O},K.handleResize=function(O){var Re=K.state.resizeStatus,Xe=K.props,ut=Xe.autoSize,Fe=Xe.onResize;if(Re!==A.NONE)return;typeof Fe=="function"&&Fe(O),ut&&K.resizeOnNextFrame()},K.resizeOnNextFrame=function(){cancelAnimationFrame(K.nextFrameActionId),K.nextFrameActionId=requestAnimationFrame(K.resizeTextarea)},K.resizeTextarea=function(){var O=K.props.autoSize;if(!O||!K.textArea)return;var Re=O.minRows,Xe=O.maxRows,ut=fe(K.textArea,!1,Re,Xe);K.setState({textareaStyles:ut,resizeStatus:A.RESIZING},function(){cancelAnimationFrame(K.resizeFrameId),K.resizeFrameId=requestAnimationFrame(function(){K.setState({resizeStatus:A.RESIZED},function(){K.resizeFrameId=requestAnimationFrame(function(){K.setState({resizeStatus:A.NONE}),K.fixFirefoxAutoScroll()})})})})},K.renderTextArea=function(){var O=K.props,Re=O.prefixCls,Xe=Re===void 0?"rc-textarea":Re,ut=O.autoSize,Fe=O.onResize,Ie=O.className,Ee=O.disabled,Se=K.state,Ae=Se.textareaStyles,Ue=Se.resizeStatus,Le=Object(S.a)(K.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ye=T()(Xe,Ie,Object(P.a)({},"".concat(Xe,"-disabled"),Ee));"value"in Le&&(Le.value=Le.value||"");var ve=Object(L.a)(Object(L.a)(Object(L.a)({},K.props.style),Ae),Ue===A.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return le.createElement(re,{onResize:K.handleResize,disabled:!(ut||Fe)},le.createElement("textarea",Object(F.a)({},Le,{className:ye,style:ve,ref:K.saveTextArea})))},K.state={textareaStyles:{},resizeStatus:A.NONE},K}return Object(V.a)(be,[{key:"componentDidUpdate",value:function(K){(K.value!==this.props.value||!c()(K.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 K=this.textArea.selectionStart,O=this.textArea.selectionEnd;this.textArea.setSelectionRange(K,O)}}catch(Re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),be}(le.Component),oe=se,Oe=function(ue){Object(ge.a)(be,ue);var De=Object(me.a)(be);function be(xe){var K;Object(we.a)(this,be),K=De.call(this,xe),K.resizableTextArea=void 0,K.focus=function(){K.resizableTextArea.textArea.focus()},K.saveTextArea=function(Re){K.resizableTextArea=Re},K.handleChange=function(Re){var Xe=K.props.onChange;K.setValue(Re.target.value,function(){K.resizableTextArea.resizeTextarea()}),Xe&&Xe(Re)},K.handleKeyDown=function(Re){var Xe=K.props,ut=Xe.onPressEnter,Fe=Xe.onKeyDown;Re.keyCode===13&&ut&&ut(Re),Fe&&Fe(Re)};var O=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return K.state={value:O},K}return Object(V.a)(be,[{key:"setValue",value:function(K,O){"value"in this.props||this.setState({value:K},O)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return le.createElement(oe,Object(F.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(K){return"value"in K?{value:K.value}:null}}]),be}(le.Component),je=Ke.default=Oe},ZW9T:function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return Te});var F=m("k1fw"),we=m("miYZ"),V=m("tsqr"),ge=m("rAM+"),me=m("tJVT"),le=m("PpiC"),L=m("cDcd"),P=m.n(L),x=m("bdgK");function ne(Y,J,d,Q,U){var re=J.getWordUntilPosition(d),S={startLineNumber:d.lineNumber,endLineNumber:d.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},p=Q.map(function(T){return{label:T,kind:Y.languages.CompletionItemKind.Keyword,insertText:T,insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:S}});return U.map(function(T){p.push(Object(F.a)(Object(F.a)({},T),{},{range:S}))}),p}var H=function(Y){var J={label:"ifelse",kind:Y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet},d=["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"];Y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(S,p){var T=ne(Y,S,p,d,[J]);return{suggestions:T}}});var Q=["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"];Y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(S,p){var T=[{label:"print",kind:Y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],R=ne(Y,S,p,Q,T);return{suggestions:R}}});var U=["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"];Y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(S,p){var T=[J,{label:"main",kind:Y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:Y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],R=ne(Y,S,p,U,T);return{suggestions:R}}})},q="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",ce=m("LvDl");function j(Y){return/^\d+$/.test(Y)?"".concat(Y,"px"):Y}function I(){}var N=!1,M={"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 ee(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=Y;if(Array.isArray(Y)){for(var d=0;d<Y.length;d++){var Q=M[Y[d]];if(Q)return Q}return J[0]}return M[J]||J}var G=null,ae=Ke.b=function(Y){var J=Y.width,d=J===void 0?"100%":J,Q=Y.height,U=Q===void 0?"100%":Q,re=Y.value,S=Y.language,p=S===void 0?"javascript":S,T=Y.style,R=T===void 0?{}:T,_=Y.options,D=_===void 0?{}:_,te=Y.overrideServices,B=te===void 0?{}:te,fe=Y.theme,y=fe===void 0?"vs-dark":fe,c=Y.onEditBlur,A=Y.onSave,se=Y.autoHeight,oe=se===void 0?!1:se,Oe=Y.forbidCopy,je=Oe===void 0?!1:Oe,ue=Y.onChange,De=ue===void 0?I:ue,be=Y.editorDidMount,xe=be===void 0?I:be,K=Y.onFocus,O=K===void 0?I:K,Re=Y.filename,Xe=Re===void 0?"educoder.txt":Re,ut=Object(le.a)(Y,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Fe=Object(L.useRef)(),Ie=Object(L.useRef)({}),Ee=Object(L.useRef)(),Se=Object(L.useRef)(!1),Ae=Object(L.useRef)(),Ue=Object(L.useState)(!1),Le=Object(me.a)(Ue,2),ye=Le[0],ve=Le[1];function st(){var v;return Fe.current&&(v=new x.default(function(b){var W=Object(ge.a)(b),Z;try{for(W.s();!(Z=W.n()).done;){var ie=Z.value;(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&Ie.current.instance.layout()}}catch(Je){W.e(Je)}finally{W.f()}}),v.observe(Fe.current)),v}function Qe(){V.b.warn(decodeURIComponent(q))}var Ge=function(){var b=Ie.current.instance;if(re!=null&&b&&ye){var W=b.getModel();W&&re!==W.getValue()&&(N=!0,W.setValue(re),b.layout(),N=!1)}};Object(L.useEffect)(function(){Ee.current&&clearTimeout(Ee.current),Ee.current=setTimeout(function(){Ge()},500)},[re,ye,Ie.current]);function Ve(){var v=Ie.current.instance;if(v){var b=v.getSelection(),W=Ie.current.pastePos||{},Z=new G.Range(W.startLineNumber||b.endLineNumber,W.startColumn||b.endColumn,W.endLineNumber||b.endLineNumber,W.endColumn||b.endColumn);setTimeout(function(){v.executeEdits("",[{range:Z,text:""}])},300)}}function ht(v){(window.navigator.platform.match("Mac")?v.metaKey:v.ctrlKey)&&v.keyCode==83&&(v.preventDefault(),A())}var ct=function(){if(oe&&Ie.current.instance){var b=Ie.current.instance.getContentHeight();f(b<U?U:b)}else f(U)};function nt(v){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),v.dispatchEvent(b)}function de(v,b){var W=window.URL||window.webkitURL||window,Z=new Blob([b]),ie=document.createElementNS("http://www.w3.org/1999/xhtml","a");ie.href=W.createObjectURL(Z),ie.download=v,nt(ie)}Object(L.useEffect)(function(){ct()},[ct]),Object(L.useEffect)(function(){Fe.current&&!ye&&m.e(27).then(m.t.bind(null,"M/lh",7)).then(function(v){try{G=v,Ie.current.instance=G.editor.create(Fe.current,{value:re,language:ee(p),theme:y,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},B);var b=Ie.current.instance;if(xe(b,G),setTimeout(function(){ct(),Ie.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){de(Xe||"educoder.txt",b.getValue())}})},500),Ie.current.subscription=b.onDidChangeModelContent(function(Z){Se.current?clearTimeout(Ae.current):(ct(),De(b.getValue(),Z)),Ae.current=setTimeout(function(){Se.current=!1},500)}),window.Monaco||H(G),je&&(b.addCommand(G.KeyMod.CtrlCmd|G.KeyMod.Shift|G.KeyCode.KEY_V,function(){return Qe(),null}),b.addCommand(G.KeyMod.CtrlCmd|G.KeyCode.KEY_C,function(){return Qe(),null})),window.Monaco=G,c&&b.onDidBlurEditorWidget(function(){c(b.getValue())}),O&&b.onDidFocusEditorText(function(){O(b.getValue())}),je){b.addCommand(G.KeyMod.CtrlCmd|G.KeyCode.KEY_V,function(){return Qe(),null}),b.onDidPaste(function(Z){Ie.current.pastePos=Z});try{window.addEventListener("paste",Ve)}catch(Z){}}var W=st();return ve(!0),function(){var Z=Ie.current.instance;Z.dispose();var ie=Z.getModel();ie&&ie.dispose(),Ie.current.subscription&&Ie.current.subscription.dispose(),je&&window.removeEventListener("paste",Ve),W.unobserve(Fe.current)}}catch(Z){}})},[]),Object(L.useEffect)(function(){var v=Ie.current.instance;if(v&&ye)return document.addEventListener("keydown",ht,!1),function(){document.removeEventListener("keydown",ht)}},[A,ye]),Object(L.useEffect)(function(){var v=Ie.current.instance;if(v&&ye){var b=ee(p);G.editor.setModelLanguage(v.getModel(),b),console.log("language:",p,v.getModel(),b)}},[p,ye]),Object(L.useEffect)(function(){var v=Ie.current.instance;v&&ye&&G.editor.setTheme(y)},[y,ye]),Object(L.useEffect)(function(){var v=Ie.current.instance;v&&ye&&(v.updateOptions(Object(F.a)({},D)),setTimeout(function(){v.getModel().updateOptions(Object(F.a)({},D))},200))},[JSON.stringify(D),ye]),Object(L.useEffect)(function(){var v=Ie.current.instance;v&&ye&&v.layout()},[d,U,ye]);var dt=Object(L.useState)(j(d)),$e=Object(me.a)(dt,2),he=$e[0],_e=$e[1],g=Object(L.useState)(j(U)),w=Object(me.a)(g,2),E=w[0],f=w[1],h=Object(F.a)(Object(F.a)({},R),{},{width:he,height:E});return P.a.createElement("div",{className:"my-monaco-editor",ref:Fe,style:h})};function Te(Y){var J=Y.width,d=J===void 0?"100%":J,Q=Y.height,U=Q===void 0?"100%":Q,re=Y.original,S=Y.modified,p=Y.language,T=Y.options,R=T===void 0?{}:T,_=Object(L.useRef)(),D=Object(L.useState)(null),te=Object(me.a)(D,2),B=te[0],fe=te[1];function y(oe){var Oe;return _.current&&(Oe=new x.default(function(je){var ue=Object(ge.a)(je),De;try{for(ue.s();!(De=ue.n()).done;){var be=De.value;(be.target.offsetHeight>0||be.target.offsetWidth>0)&&oe.layout()}}catch(xe){ue.e(xe)}finally{ue.f()}}),Oe.observe(_.current)),Oe}Object(L.useEffect)(function(){_.current&&m.e(27).then(m.t.bind(null,"M/lh",7)).then(function(oe){G=oe;var Oe=G.editor.createDiffEditor(_.current,Object(F.a)(Object(F.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},R),{},{wordWrap:!0}));fe(Oe);var je=y(Oe);return function(){Oe.dispose();var ue=Oe.getModel();ue&&ue.dispose(),je.unobserve(_.current)}})},[]),Object(L.useEffect)(function(){B&&B.setModel({original:G.editor.createModel(re,p),modified:G.editor.createModel(S,p)})},[re,S,p,B]);var c=j(d),A=j(U),se={width:c,height:A};return P.a.createElement("div",{className:"my-diff-editor",ref:_,style:se})}},ZpRC:function(mt,Ke,m){"use strict";function F(H){return typeof H=="object"&&H!=null&&H.nodeType===1}function we(H,q){return(!q||H!=="hidden")&&H!=="visible"&&H!=="clip"}function V(H,q){if(H.clientHeight<H.scrollHeight||H.clientWidth<H.scrollWidth){var ce=getComputedStyle(H,null);return we(ce.overflowY,q)||we(ce.overflowX,q)||function(j){var I=function(N){if(!N.ownerDocument||!N.ownerDocument.defaultView)return null;try{return N.ownerDocument.defaultView.frameElement}catch(M){return null}}(j);return!!I&&(I.clientHeight<j.scrollHeight||I.clientWidth<j.scrollWidth)}(H)}return!1}function ge(H,q,ce,j,I,N,M,ee){return N<H&&M>q||N>H&&M<q?0:N<=H&&ee<=ce||M>=q&&ee>=ce?N-H-j:M>q&&ee<ce||N<H&&ee>ce?M-q+I:0}var me=function(H,q){var ce=window,j=q.scrollMode,I=q.block,N=q.inline,M=q.boundary,ee=q.skipOverflowHiddenElements,G=typeof M=="function"?M:function(Ae){return Ae!==M};if(!F(H))throw new TypeError("Invalid target");for(var ae=document.scrollingElement||document.documentElement,Te=[],Y=H;F(Y)&&G(Y);){if((Y=Y.parentElement)===ae){Te.push(Y);break}Y!=null&&Y===document.body&&V(Y)&&!V(document.documentElement)||Y!=null&&V(Y,ee)&&Te.push(Y)}for(var J=ce.visualViewport?ce.visualViewport.width:innerWidth,d=ce.visualViewport?ce.visualViewport.height:innerHeight,Q=window.scrollX||pageXOffset,U=window.scrollY||pageYOffset,re=H.getBoundingClientRect(),S=re.height,p=re.width,T=re.top,R=re.right,_=re.bottom,D=re.left,te=I==="start"||I==="nearest"?T:I==="end"?_:T+S/2,B=N==="center"?D+p/2:N==="end"?R:D,fe=[],y=0;y<Te.length;y++){var c=Te[y],A=c.getBoundingClientRect(),se=A.height,oe=A.width,Oe=A.top,je=A.right,ue=A.bottom,De=A.left;if(j==="if-needed"&&T>=0&&D>=0&&_<=d&&R<=J&&T>=Oe&&_<=ue&&D>=De&&R<=je)return fe;var be=getComputedStyle(c),xe=parseInt(be.borderLeftWidth,10),K=parseInt(be.borderTopWidth,10),O=parseInt(be.borderRightWidth,10),Re=parseInt(be.borderBottomWidth,10),Xe=0,ut=0,Fe="offsetWidth"in c?c.offsetWidth-c.clientWidth-xe-O:0,Ie="offsetHeight"in c?c.offsetHeight-c.clientHeight-K-Re:0;if(ae===c)Xe=I==="start"?te:I==="end"?te-d:I==="nearest"?ge(U,U+d,d,K,Re,U+te,U+te+S,S):te-d/2,ut=N==="start"?B:N==="center"?B-J/2:N==="end"?B-J:ge(Q,Q+J,J,xe,O,Q+B,Q+B+p,p),Xe=Math.max(0,Xe+U),ut=Math.max(0,ut+Q);else{Xe=I==="start"?te-Oe-K:I==="end"?te-ue+Re+Ie:I==="nearest"?ge(Oe,ue,se,K,Re+Ie,te,te+S,S):te-(Oe+se/2)+Ie/2,ut=N==="start"?B-De-xe:N==="center"?B-(De+oe/2)+Fe/2:N==="end"?B-je+O+Fe:ge(De,je,oe,xe,O+Fe,B,B+p,p);var Ee=c.scrollLeft,Se=c.scrollTop;te+=Se-(Xe=Math.max(0,Math.min(Se+Xe,c.scrollHeight-se+Ie))),B+=Ee-(ut=Math.max(0,Math.min(Ee+ut,c.scrollWidth-oe+Fe)))}fe.push({el:c,top:Xe,left:ut})}return fe};function le(H){return H===Object(H)&&Object.keys(H).length!==0}function L(H,q){q===void 0&&(q="auto");var ce="scrollBehavior"in document.body.style;H.forEach(function(j){var I=j.el,N=j.top,M=j.left;I.scroll&&ce?I.scroll({top:N,left:M,behavior:q}):(I.scrollTop=N,I.scrollLeft=M)})}function P(H){return H===!1?{block:"end",inline:"nearest"}:le(H)?H:{block:"start",inline:"nearest"}}function x(H,q){var ce=!H.ownerDocument.documentElement.contains(H);if(le(q)&&typeof q.behavior=="function")return q.behavior(ce?[]:me(H,q));if(ce)return;var j=P(q);return L(me(H,j),j.behavior)}var ne=Ke.a=x},bT9E:function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return we});var F=m("VTBJ");function we(V,ge){var me=Object(F.a)({},V);return Array.isArray(ge)&&ge.forEach(function(le){delete me[le]}),me}},c5Ni:function(mt,Ke,m){},dejd:function(mt,Ke,m){},dmUQ:function(mt,Ke,m){"use strict";var F=m("Ff2n"),we=m("rePB"),V=m("1OyB"),ge=m("vuIU"),me=m("Ji7U"),le=m("md7G"),L=m("foSv"),P=m("cDcd"),x=m.n(P),ne=m("TSYQ"),H=m.n(ne),q=m("4IlW");function ce(S,p){var T=Object.keys(S);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(S);p&&(R=R.filter(function(_){return Object.getOwnPropertyDescriptor(S,_).enumerable})),T.push.apply(T,R)}return T}function j(S){for(var p=1;p<arguments.length;p++){var T=arguments[p]!=null?arguments[p]:{};p%2?ce(Object(T),!0).forEach(function(R){Object(we.a)(S,R,T[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(T)):ce(Object(T)).forEach(function(R){Object.defineProperty(S,R,Object.getOwnPropertyDescriptor(T,R))})}return S}function I(S){var p=N();return function(){var R=Object(L.a)(S),_;if(p){var D=Object(L.a)(this).constructor;_=Reflect.construct(R,arguments,D)}else _=R.apply(this,arguments);return Object(le.a)(this,_)}}function N(){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(S){return!1}}function M(){}function ee(S){S.preventDefault()}var G=function(p){return p.replace(/[^\w.-]+/g,"")},ae=200,Te=600,Y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,J=function(p){return p!=null},d=function(p,T){return T===p||typeof T=="number"&&typeof p=="number"&&isNaN(T)&&isNaN(p)},Q=function(S){Object(me.a)(T,S);var p=I(T);function T(R){var _;Object(V.a)(this,T),_=p.call(this,R),_.onKeyDown=function(B){var fe=_.props,y=fe.onKeyDown,c=fe.onPressEnter;if(B.keyCode===q.a.UP){var A=_.getRatio(B);_.up(B,A,null),_.stop()}else if(B.keyCode===q.a.DOWN){var se=_.getRatio(B);_.down(B,se,null),_.stop()}else B.keyCode===q.a.ENTER&&c&&c(B);if(_.recordCursorPosition(),_.lastKeyCode=B.keyCode,y){for(var oe=arguments.length,Oe=new Array(oe>1?oe-1:0),je=1;je<oe;je++)Oe[je-1]=arguments[je];y.apply(void 0,[B].concat(Oe))}},_.onKeyUp=function(B){var fe=_.props.onKeyUp;if(_.stop(),_.recordCursorPosition(),fe){for(var y=arguments.length,c=new Array(y>1?y-1:0),A=1;A<y;A++)c[A-1]=arguments[A];fe.apply(void 0,[B].concat(c))}},_.onChange=function(B){var fe=_.props.onChange;_.state.focused&&(_.inputting=!0),_.rawInput=_.props.parser(_.getValueFromEvent(B)),_.setState({inputValue:_.rawInput}),fe(_.toNumber(_.rawInput))},_.onMouseUp=function(){var B=_.props.onMouseUp;_.recordCursorPosition(),B&&B.apply(void 0,arguments)},_.onFocus=function(){var B;_.setState({focused:!0}),(B=_.props).onFocus.apply(B,arguments)},_.onBlur=function(){var B=_.props.onBlur;_.inputting=!1,_.setState({focused:!1});var fe=_.getCurrentValidValue(_.state.inputValue),y=_.setValue(fe,M);if(B){var c=_.input.value,A=_.getInputDisplayValue({focus:!1,value:y});_.input.value=A&&Number(A),B.apply(void 0,arguments),_.input.value=c}},_.getRatio=function(B){var fe=1;return B.metaKey||B.ctrlKey?fe=.1:B.shiftKey&&(fe=10),fe},_.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},_.getPrecision=function(B){if(J(_.props.precision))return _.props.precision;var fe=String(B);if(fe.indexOf("e-")>=0)return parseInt(fe.slice(fe.indexOf("e-")+2),10);var y=0;return fe.indexOf(".")>=0&&(y=fe.length-fe.indexOf(".")-1),y},_.getInputDisplayValue=function(B){var fe=B||_.state,y=fe.focused,c=fe.inputValue,A=fe.value,se;y?se=c:se=_.toPrecisionAsStep(A),se==null&&(se="");var oe=_.formatWrapper(se);return J(_.props.decimalSeparator)&&(oe=oe.toString().replace(".",_.props.decimalSeparator)),oe},_.recordCursorPosition=function(){try{_.cursorStart=_.input.selectionStart,_.cursorEnd=_.input.selectionEnd,_.currentValue=_.input.value,_.cursorBefore=_.input.value.substring(0,_.cursorStart),_.cursorAfter=_.input.value.substring(_.cursorEnd)}catch(B){}},_.restoreByAfter=function(B){if(B===void 0)return!1;var fe=_.input.value,y=fe.lastIndexOf(B);if(y===-1)return!1;var c=_.cursorBefore.length;return _.lastKeyCode===q.a.DELETE&&_.cursorBefore.charAt(c-1)===B[0]?(_.fixCaret(c,c),!0):y+B.length===fe.length?(_.fixCaret(y,y),!0):!1},_.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(fe,y){var c=B.substring(y);return _.restoreByAfter(c)})},_.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},_.stop=function(){_.autoStepTimer&&clearTimeout(_.autoStepTimer)},_.down=function(B,fe,y){_.pressingUpOrDown=!0,_.step("down",B,fe,y)},_.up=function(B,fe,y){_.pressingUpOrDown=!0,_.step("up",B,fe,y)},_.saveInput=function(B){_.input=B};var D=R.value;D===void 0&&(D=R.defaultValue),_.state={focused:R.autoFocus};var te=_.getValidValue(_.toNumber(D));return _.state=j(j({},_.state),{},{inputValue:_.toPrecisionAsStep(te),value:te}),_}return Object(ge.a)(T,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(_){var D=this.props,te=D.value,B=D.onChange,fe=D.max,y=D.min,c=this.state.focused;if(_){if(!d(_.value,te)||!d(_.max,fe)||!d(_.min,y)){var A=c?te:this.getValidValue(te),se;this.pressingUpOrDown?se=A:this.inputting?se=this.rawInput:se=this.toPrecisionAsStep(A),this.setState({value:A,inputValue:se})}var oe="value"in this.props?te:this.state.value;"max"in this.props&&_.max!==fe&&typeof oe=="number"&&oe>fe&&B&&B(fe),"min"in this.props&&_.min!==y&&typeof oe=="number"&&oe<y&&B&&B(y)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Oe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===q.a.BACKSPACE?Oe=this.cursorStart-1:this.lastKeyCode===q.a.DELETE&&(Oe=this.cursorStart):Oe=this.input.value.length,this.fixCaret(Oe,Oe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case q.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case q.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(je){}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(_){var D=_;return D===""?D="":this.isNotCompleteNumber(parseFloat(D))?D=this.state.value:D=this.getValidValue(D),this.toNumber(D)}},{key:"getValueFromEvent",value:function(_){var D=_.target.value.trim().replace(/。/g,".");return J(this.props.decimalSeparator)&&(D=D.replace(this.props.decimalSeparator,".")),D}},{key:"getValidValue",value:function(_){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(_);return isNaN(B)?_:(B<D&&(B=D),B>te&&(B=te),B)}},{key:"setValue",value:function(_,D){var te=this.props.precision,B=this.isNotCompleteNumber(parseFloat(_))?null:parseFloat(_),fe=this.state.value,y=fe===void 0?null:fe,c=this.state.inputValue,A=c===void 0?null:c,se=typeof B=="number"?B.toFixed(te):"".concat(B),oe=B!==y||se!=="".concat(A);return"value"in this.props?(A=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:A},D)):this.setState({value:B,inputValue:this.toPrecisionAsStep(_)},D),oe&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(_){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=this.props,B=te.precision,fe=te.step;if(J(B))return B;var y=this.getPrecision(D),c=this.getPrecision(fe),A=this.getPrecision(_);return _?Math.max(A,y+c):y+c}},{key:"getPrecisionFactor",value:function(_){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=this.getMaxPrecision(_,D);return Math.pow(10,te)}},{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(_){return this.props.formatter?this.props.formatter(_):_}},{key:"toPrecisionAsStep",value:function(_){if(this.isNotCompleteNumber(_)||_==="")return _;var D=Math.abs(this.getMaxPrecision(_));return isNaN(D)?_.toString():Number(_).toFixed(D)}},{key:"toNumber",value:function(_){var D=this.props.precision,te=this.state.focused,B=_&&_.length>16&&te;return this.isNotCompleteNumber(_)||B?_:J(D)?Math.round(_*Math.pow(10,D))/Math.pow(10,D):Number(_)}},{key:"upStep",value:function(_,D){var te=this.props.step,B=this.getPrecisionFactor(_,D),fe=Math.abs(this.getMaxPrecision(_,D)),y=((B*_+B*te*D)/B).toFixed(fe);return this.toNumber(y)}},{key:"downStep",value:function(_,D){var te=this.props.step,B=this.getPrecisionFactor(_,D),fe=Math.abs(this.getMaxPrecision(_,D)),y=((B*_-B*te*D)/B).toFixed(fe);return this.toNumber(y)}},{key:"step",value:function(_,D){var te=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,fe=arguments.length>3?arguments[3]:void 0;this.stop(),D&&(D.persist(),D.preventDefault());var y=this.props;if(y.disabled)return;var c=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(c))return;var A=this["".concat(_,"Step")](c,B),se=A>y.max||A<y.min;if(A>y.max?A=y.max:A<y.min&&(A=y.min),this.setValue(A,null),this.setState({focused:!0},function(){te.pressingUpOrDown=!1}),se)return;this.autoStepTimer=setTimeout(function(){te[_](D,B,!0)},fe?ae:Te)}},{key:"fixCaret",value:function(_,D){if(_===void 0||D===void 0||!this.input||!this.input.value)return;try{var te=this.input.selectionStart,B=this.input.selectionEnd;(_!==te||D!==B)&&this.input.setSelectionRange(_,D)}catch(fe){}}},{key:"render",value:function(){var _,D=this.props,te=D.prefixCls,B=D.disabled,fe=D.readOnly,y=D.useTouch,c=D.autoComplete,A=D.upHandler,se=D.downHandler,oe=D.className,Oe=D.max,je=D.min,ue=D.style,De=D.title,be=D.onMouseEnter,xe=D.onMouseLeave,K=D.onMouseOver,O=D.onMouseOut,Re=D.required,Xe=D.onClick,ut=D.tabIndex,Fe=D.type,Ie=D.placeholder,Ee=D.id,Se=D.inputMode,Ae=D.pattern,Ue=D.step,Le=D.maxLength,ye=D.autoFocus,ve=D.name,st=D.onPaste,Qe=D.onInput,Ge=Object(F.a)(D,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Ve=this.state,ht=Ve.value,ct=Ve.focused,nt=H()(te,(_={},Object(we.a)(_,oe,!!oe),Object(we.a)(_,"".concat(te,"-disabled"),B),Object(we.a)(_,"".concat(te,"-focused"),ct),_)),de={};Object.keys(Ge).forEach(function(b){(b.substr(0,5)==="data-"||b.substr(0,5)==="aria-"||b==="role")&&(de[b]=Ge[b])});var dt=!fe&&!B,$e=this.getInputDisplayValue(null),he=(ht||ht===0)&&(isNaN(ht)||Number(ht)>=Oe),_e=(ht||ht===0)&&(isNaN(ht)||Number(ht)<=je),g=he||B||fe,w=_e||B||fe,E=H()("".concat(te,"-handler"),"".concat(te,"-handler-up"),Object(we.a)({},"".concat(te,"-handler-up-disabled"),g)),f=H()("".concat(te,"-handler"),"".concat(te,"-handler-down"),Object(we.a)({},"".concat(te,"-handler-down-disabled"),w)),h=y?{onTouchStart:g?M:this.up,onTouchEnd:this.stop}:{onMouseDown:g?M:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},v=y?{onTouchStart:w?M:this.down,onTouchEnd:this.stop}:{onMouseDown:w?M:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return x.a.createElement("div",{className:nt,style:ue,title:De,onMouseEnter:be,onMouseLeave:xe,onMouseOver:K,onMouseOut:O,onFocus:function(){return null},onBlur:function(){return null}},x.a.createElement("div",{className:"".concat(te,"-handler-wrap")},x.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Increase Value","aria-disabled":g,className:E}),A||x.a.createElement("span",{unselectable:"on",className:"".concat(te,"-handler-up-inner"),onClick:ee})),x.a.createElement("span",Object.assign({unselectable:"on"},v,{role:"button","aria-label":"Decrease Value","aria-disabled":w,className:f}),se||x.a.createElement("span",{unselectable:"on",className:"".concat(te,"-handler-down-inner"),onClick:ee}))),x.a.createElement("div",{className:"".concat(te,"-input-wrap")},x.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":je,"aria-valuemax":Oe,"aria-valuenow":ht,required:Re,type:Fe,placeholder:Ie,onPaste:st,onClick:Xe,onMouseUp:this.onMouseUp,className:"".concat(te,"-input"),tabIndex:ut,autoComplete:c,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:dt?this.onKeyDown:M,onKeyUp:dt?this.onKeyUp:M,autoFocus:ye,maxLength:Le,readOnly:fe,disabled:B,max:Oe,min:je,step:Ue,name:ve,title:De,id:Ee,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum($e),pattern:Ae,inputMode:Se,onInput:Qe},de))))}}]),T}(x.a.Component);Q.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Y,min:-Y,step:1,style:{},onChange:M,onKeyDown:M,onPressEnter:M,onFocus:M,onBlur:M,parser:G,required:!1,autoComplete:"off"};var U=Q,re=Ke.a=U},kSUc:function(mt,Ke,m){},kqOp:function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return ne});var F=m("0Owb"),we=m("fWQN"),V=m("mtLc"),ge=m("yKVA"),me=m("879j"),le=m("cDcd"),L=m.n(le),P=m("Ot1p"),x="\u2581",ne=function(H){Object(ge.a)(ce,H);var q=Object(me.a)(ce);function ce(){var j;Object(we.a)(this,ce);for(var I=arguments.length,N=new Array(I),M=0;M<I;M++)N[M]=arguments[M];return j=q.call.apply(q,[this].concat(N)),j.getChCountBeforeCursor=function(ee,G){for(var ae=G.line,Te=0,Y=0;Y<ae;Y++)Te+=ee.getLine(Y).split(x).length-1;var J=ee.getLine(ae).substring(0,G.ch);return Te+=J.split(x).length-1,Te},j.onCMBeforeChange=function(ee,G){var ae=ee.getRange(G.from,G.to),Te=0;if(G.text.forEach(function(Q){Te+=Q.split(x).length-1}),ae&&ae.indexOf(x)!=-1){var Y=ae.split(x).length-1,J=j.getChCountBeforeCursor(ee,G.from);console.log("\u5220\u9664".concat(Y,"\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(J,"\u4E2A\uFF0C\u65B0\u589E").concat(Te,"\u4E2A")),j.props.deleteEmptyDisabled?G.cancel():j.props.onPlaceholderChange&&j.props.onPlaceholderChange(J,Y,Te)}else if(Te){var d=j.getChCountBeforeCursor(ee,G.from);console.log("\u65B0\u589E".concat(Te,"\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(d,"\u4E2A")),j.props.onPlaceholderChange&&j.props.onPlaceholderChange(d,0,Te)}},j}return Object(V.a)(ce,[{key:"render",value:function(){return L.a.createElement(P.a,Object(F.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),ce}(le.Component)},lZu9:function(mt,Ke,m){(function(F){F(m("VrN/"),m("1eCo"),m("8EBN"))})(function(F){"use strict";F.defineMode("markdown",function(we,V){var ge=F.getMode(we,"text/html"),me=ge.name=="null";function le(y){if(F.findModeByName){var c=F.findModeByName(y);c&&(y=c.mime||c.mimes[0])}var A=F.getMode(we,y);return A.name=="null"?null:A}V.highlightFormatting===void 0&&(V.highlightFormatting=!1),V.maxBlockquoteDepth===void 0&&(V.maxBlockquoteDepth=0),V.taskLists===void 0&&(V.taskLists=!1),V.strikethrough===void 0&&(V.strikethrough=!1),V.emoji===void 0&&(V.emoji=!1),V.fencedCodeBlockHighlighting===void 0&&(V.fencedCodeBlockHighlighting=!0),V.fencedCodeBlockDefaultMode===void 0&&(V.fencedCodeBlockDefaultMode="text/plain"),V.xml===void 0&&(V.xml=!0),V.tokenTypeOverrides===void 0&&(V.tokenTypeOverrides={});var L={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 P in L)L.hasOwnProperty(P)&&V.tokenTypeOverrides[P]&&(L[P]=V.tokenTypeOverrides[P]);var x=/^([*\-_])(?:\s*\1){2,}\s*$/,ne=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,H=/^\[(x| )\](?=\s)/i,q=V.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ce=/^ {0,3}(?:\={1,}|-{2,})\s*$/,j=/^[^#!\[\]*_\\<>` "'(~:]+/,I=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,N=/^\s*\[[^\]]+?\]:.*$/,M=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ee=" ";function G(y,c,A){return c.f=c.inline=A,A(y,c)}function ae(y,c,A){return c.f=c.block=A,A(y,c)}function Te(y){return!y||!/\S/.test(y.string)}function Y(y){if(y.linkTitle=!1,y.linkHref=!1,y.linkText=!1,y.em=!1,y.strong=!1,y.strikethrough=!1,y.quote=0,y.indentedCode=!1,y.f==d){var c=me;if(!c){var A=F.innerMode(ge,y.htmlState);c=A.mode.name=="xml"&&A.state.tagStart===null&&!A.state.context&&A.state.tokenize.isInText}c&&(y.f=S,y.block=J,y.htmlState=null)}return y.trailingSpace=0,y.trailingSpaceNewLine=!1,y.prevLine=y.thisLine,y.thisLine={stream:null},null}function J(y,c){var A=y.column()===c.indentation,se=Te(c.prevLine.stream),oe=c.indentedCode,Oe=c.prevLine.hr,je=c.list!==!1,ue=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var De=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,je)){for(c.list=null;De<c.listStack[c.listStack.length-1];)c.listStack.pop(),c.listStack.length?c.indentation=c.listStack[c.listStack.length-1]:c.list=!1;c.list!==!1&&(c.indentationDiff=De-c.listStack[c.listStack.length-1])}var be=!se&&!Oe&&!c.prevLine.header&&(!je||!oe)&&!c.prevLine.fencedCodeEnd,xe=(c.list===!1||Oe||se)&&c.indentation<=ue&&y.match(x),K=null;if(c.indentationDiff>=4&&(oe||c.prevLine.fencedCodeEnd||c.prevLine.header||se))return y.skipToEnd(),c.indentedCode=!0,L.code;if(y.eatSpace())return null;if(A&&c.indentation<=ue&&(K=y.match(q))&&K[1].length<=6)return c.quote=0,c.header=K[1].length,c.thisLine.header=!0,V.highlightFormatting&&(c.formatting="header"),c.f=c.inline,U(c);if(c.indentation<=ue&&y.eat(">"))return c.quote=A?1:c.quote+1,V.highlightFormatting&&(c.formatting="quote"),y.eatSpace(),U(c);if(!xe&&!c.setext&&A&&c.indentation<=ue&&(K=y.match(ne))){var O=K[1]?"ol":"ul";return c.indentation=De+y.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,V.taskLists&&y.match(H,!1)&&(c.taskList=!0),c.f=c.inline,V.highlightFormatting&&(c.formatting=["list","list-"+O]),U(c)}else{if(A&&c.indentation<=ue&&(K=y.match(I,!0)))return c.quote=0,c.fencedEndRE=new RegExp(K[1]+"+ *$"),c.localMode=V.fencedCodeBlockHighlighting&&le(K[2]||V.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=F.startState(c.localMode)),c.f=c.block=Q,V.highlightFormatting&&(c.formatting="code-block"),c.code=-1,U(c);if(c.setext||(!be||!je)&&!c.quote&&c.list===!1&&!c.code&&!xe&&!N.test(y.string)&&(K=y.lookAhead(1))&&(K=K.match(ce)))return c.setext?(c.header=c.setext,c.setext=0,y.skipToEnd(),V.highlightFormatting&&(c.formatting="header")):(c.header=K[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,U(c);if(xe)return y.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,L.hr;if(y.peek()==="[")return G(y,c,D)}return G(y,c,c.inline)}function d(y,c){var A=ge.token(y,c.htmlState);if(!me){var se=F.innerMode(ge,c.htmlState);(se.mode.name=="xml"&&se.state.tagStart===null&&!se.state.context&&se.state.tokenize.isInText||c.md_inside&&y.current().indexOf(">")>-1)&&(c.f=S,c.block=J,c.htmlState=null)}return A}function Q(y,c){var A=c.listStack[c.listStack.length-1]||0,se=c.indentation<A,oe=A+3;if(c.fencedEndRE&&c.indentation<=oe&&(se||y.match(c.fencedEndRE))){V.highlightFormatting&&(c.formatting="code-block");var Oe;return se||(Oe=U(c)),c.localMode=c.localState=null,c.block=J,c.f=S,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,se?ae(y,c,c.block):Oe}else return c.localMode?c.localMode.token(y,c.localState):(y.skipToEnd(),L.code)}function U(y){var c=[];if(y.formatting){c.push(L.formatting),typeof y.formatting=="string"&&(y.formatting=[y.formatting]);for(var A=0;A<y.formatting.length;A++)c.push(L.formatting+"-"+y.formatting[A]),y.formatting[A]==="header"&&c.push(L.formatting+"-"+y.formatting[A]+"-"+y.header),y.formatting[A]==="quote"&&(!V.maxBlockquoteDepth||V.maxBlockquoteDepth>=y.quote?c.push(L.formatting+"-"+y.formatting[A]+"-"+y.quote):c.push("error"))}if(y.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(y.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(y.linkHref?c.push(L.linkHref,"url"):(y.strong&&c.push(L.strong),y.em&&c.push(L.em),y.strikethrough&&c.push(L.strikethrough),y.emoji&&c.push(L.emoji),y.linkText&&c.push(L.linkText),y.code&&c.push(L.code),y.image&&c.push(L.image),y.imageAltText&&c.push(L.imageAltText,"link"),y.imageMarker&&c.push(L.imageMarker)),y.header&&c.push(L.header,L.header+"-"+y.header),y.quote&&(c.push(L.quote),!V.maxBlockquoteDepth||V.maxBlockquoteDepth>=y.quote?c.push(L.quote+"-"+y.quote):c.push(L.quote+"-"+V.maxBlockquoteDepth)),y.list!==!1){var se=(y.listStack.length-1)%3;se?se===1?c.push(L.list2):c.push(L.list3):c.push(L.list1)}return y.trailingSpaceNewLine?c.push("trailing-space-new-line"):y.trailingSpace&&c.push("trailing-space-"+(y.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function re(y,c){return y.match(j,!0)?U(c):void 0}function S(y,c){var A=c.text(y,c);if(typeof A!="undefined")return A;if(c.list)return c.list=null,U(c);if(c.taskList){var se=y.match(H,!0)[1]===" ";return se?c.taskOpen=!0:c.taskClosed=!0,V.highlightFormatting&&(c.formatting="task"),c.taskList=!1,U(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&y.match(/^#+$/,!0))return V.highlightFormatting&&(c.formatting="header"),U(c);var oe=y.next();if(c.linkTitle){c.linkTitle=!1;var Oe=oe;oe==="("&&(Oe=")"),Oe=(Oe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var je="^\\s*(?:[^"+Oe+"\\\\]+|\\\\\\\\|\\\\.)"+Oe;if(y.match(new RegExp(je),!0))return L.linkHref}if(oe==="`"){var ue=c.formatting;V.highlightFormatting&&(c.formatting="code"),y.eatWhile("`");var De=y.current().length;if(c.code==0&&(!c.quote||De==1))return c.code=De,U(c);if(De==c.code){var be=U(c);return c.code=0,be}else return c.formatting=ue,U(c)}else if(c.code)return U(c);if(oe==="\\"&&(y.next(),V.highlightFormatting)){var xe=U(c),K=L.formatting+"-escape";return xe?xe+" "+K:K}if(oe==="!"&&y.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,V.highlightFormatting&&(c.formatting="image"),U(c);if(oe==="["&&c.imageMarker&&y.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,V.highlightFormatting&&(c.formatting="image"),U(c);if(oe==="]"&&c.imageAltText){V.highlightFormatting&&(c.formatting="image");var xe=U(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=T,xe}if(oe==="["&&!c.image)return c.linkText&&y.match(/^.*?\]/)||(c.linkText=!0,V.highlightFormatting&&(c.formatting="link")),U(c);if(oe==="]"&&c.linkText){V.highlightFormatting&&(c.formatting="link");var xe=U(c);return c.linkText=!1,c.inline=c.f=y.match(/\(.*?\)| ?\[.*?\]/,!1)?T:S,xe}if(oe==="<"&&y.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=p,V.highlightFormatting&&(c.formatting="link");var xe=U(c);return xe?xe+=" ":xe="",xe+L.linkInline}if(oe==="<"&&y.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=p,V.highlightFormatting&&(c.formatting="link");var xe=U(c);return xe?xe+=" ":xe="",xe+L.linkEmail}if(V.xml&&oe==="<"&&y.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var O=y.string.indexOf(">",y.pos);if(O!=-1){var Re=y.string.substring(y.start,O);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Re)&&(c.md_inside=!0)}return y.backUp(1),c.htmlState=F.startState(ge),ae(y,c,d)}if(V.xml&&oe==="<"&&y.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var Xe=1,ut=y.pos==1?" ":y.string.charAt(y.pos-2);Xe<3&&y.eat(oe);)Xe++;var Fe=y.peek()||" ",Ie=!/\s/.test(Fe)&&(!M.test(Fe)||/\s/.test(ut)||M.test(ut)),Ee=!/\s/.test(ut)&&(!M.test(ut)||/\s/.test(Fe)||M.test(Fe)),Se=null,Ae=null;if(Xe%2&&(!c.em&&Ie&&(oe==="*"||!Ee||M.test(ut))?Se=!0:c.em==oe&&Ee&&(oe==="*"||!Ie||M.test(Fe))&&(Se=!1)),Xe>1&&(!c.strong&&Ie&&(oe==="*"||!Ee||M.test(ut))?Ae=!0:c.strong==oe&&Ee&&(oe==="*"||!Ie||M.test(Fe))&&(Ae=!1)),Ae!=null||Se!=null){V.highlightFormatting&&(c.formatting=Se==null?"strong":Ae==null?"em":"strong em"),Se===!0&&(c.em=oe),Ae===!0&&(c.strong=oe);var be=U(c);return Se===!1&&(c.em=!1),Ae===!1&&(c.strong=!1),be}}else if(oe===" "&&(y.eat("*")||y.eat("_"))){if(y.peek()===" ")return U(c);y.backUp(1)}if(V.strikethrough){if(oe==="~"&&y.eatWhile(oe)){if(c.strikethrough){V.highlightFormatting&&(c.formatting="strikethrough");var be=U(c);return c.strikethrough=!1,be}else if(y.match(/^[^\s]/,!1))return c.strikethrough=!0,V.highlightFormatting&&(c.formatting="strikethrough"),U(c)}else if(oe===" "&&y.match(/^~~/,!0)){if(y.peek()===" ")return U(c);y.backUp(2)}}if(V.emoji&&oe===":"&&y.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,V.highlightFormatting&&(c.formatting="emoji");var Ue=U(c);return c.emoji=!1,Ue}return oe===" "&&(y.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),U(c)}function p(y,c){var A=y.next();if(A===">"){c.f=c.inline=S,V.highlightFormatting&&(c.formatting="link");var se=U(c);return se?se+=" ":se="",se+L.linkInline}return y.match(/^[^>]+/,!0),L.linkInline}function T(y,c){if(y.eatSpace())return null;var A=y.next();return A==="("||A==="["?(c.f=c.inline=_(A==="("?")":"]"),V.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,U(c)):"error"}var R={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _(y){return function(c,A){var se=c.next();if(se===y){A.f=A.inline=S,V.highlightFormatting&&(A.formatting="link-string");var oe=U(A);return A.linkHref=!1,oe}return c.match(R[y]),A.linkHref=!0,U(A)}}function D(y,c){return y.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=te,y.next(),V.highlightFormatting&&(c.formatting="link"),c.linkText=!0,U(c)):G(y,c,S)}function te(y,c){if(y.match(/^\]:/,!0)){c.f=c.inline=B,V.highlightFormatting&&(c.formatting="link");var A=U(c);return c.linkText=!1,A}return y.match(/^([^\]\\]|\\.)+/,!0),L.linkText}function B(y,c){return y.eatSpace()?null:(y.match(/^[^\s]+/,!0),y.peek()===void 0?c.linkTitle=!0:y.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),c.f=c.inline=S,L.linkHref+" url")}var fe={startState:function(){return{f:J,prevLine:{stream:null},thisLine:{stream:null},block:J,htmlState:null,indentation:0,inline:S,text:re,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(y){return{f:y.f,prevLine:y.prevLine,thisLine:y.thisLine,block:y.block,htmlState:y.htmlState&&F.copyState(ge,y.htmlState),indentation:y.indentation,localMode:y.localMode,localState:y.localMode?F.copyState(y.localMode,y.localState):null,inline:y.inline,text:y.text,formatting:!1,linkText:y.linkText,linkTitle:y.linkTitle,linkHref:y.linkHref,code:y.code,em:y.em,strong:y.strong,strikethrough:y.strikethrough,emoji:y.emoji,header:y.header,setext:y.setext,hr:y.hr,taskList:y.taskList,list:y.list,listStack:y.listStack.slice(0),quote:y.quote,indentedCode:y.indentedCode,trailingSpace:y.trailingSpace,trailingSpaceNewLine:y.trailingSpaceNewLine,md_inside:y.md_inside,fencedEndRE:y.fencedEndRE}},token:function(y,c){if(c.formatting=!1,y!=c.thisLine.stream){if(c.header=0,c.hr=!1,y.match(/^\s*$/,!0))return Y(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:y},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=d)){var A=y.match(/^\s*/,!0)[0].replace(/\t/g,ee).length;if(c.indentation=A,c.indentationDiff=null,A>0)return null}}return c.f(y,c)},innerMode:function(y){return y.block==d?{state:y.htmlState,mode:ge}:y.localState?{state:y.localState,mode:y.localMode}:{state:y,mode:fe}},indent:function(y,c,A){return y.block==d&&ge.indent?ge.indent(y.htmlState,c,A):y.localState&&y.localMode.indent?y.localMode.indent(y.localState,c,A):F.Pass},blankLine:Y,getType:U,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return fe},"xml"),F.defineMIME("text/markdown","markdown"),F.defineMIME("text/x-markdown","markdown")})},osHv:function(mt,Ke,m){(function(F){F(m("VrN/"))})(function(F){"use strict";var we=F.Pos;function V(M,ee){return M.line-ee.line||M.ch-ee.ch}var ge="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",me=ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",le=new RegExp("<(/?)(["+ge+"]["+me+"]*)","g");function L(M,ee,G,ae){this.line=ee,this.ch=G,this.cm=M,this.text=M.getLine(ee),this.min=ae?Math.max(ae.from,M.firstLine()):M.firstLine(),this.max=ae?Math.min(ae.to-1,M.lastLine()):M.lastLine()}function P(M,ee){var G=M.cm.getTokenTypeAt(we(M.line,ee));return G&&/\btag\b/.test(G)}function x(M){return M.line>=M.max?void 0:(M.ch=0,M.text=M.cm.getLine(++M.line),!0)}function ne(M){return M.line<=M.min?void 0:(M.text=M.cm.getLine(--M.line),M.ch=M.text.length,!0)}function H(M){for(;;){var ee=M.text.indexOf(">",M.ch);if(ee==-1){if(x(M))continue;return}if(!P(M,ee+1)){M.ch=ee+1;continue}var G=M.text.lastIndexOf("/",ee),ae=G>-1&&!/\S/.test(M.text.slice(G+1,ee));return M.ch=ee+1,ae?"selfClose":"regular"}}function q(M){for(;;){var ee=M.ch?M.text.lastIndexOf("<",M.ch-1):-1;if(ee==-1){if(ne(M))continue;return}if(!P(M,ee+1)){M.ch=ee;continue}le.lastIndex=ee,M.ch=ee;var G=le.exec(M.text);if(G&&G.index==ee)return G}}function ce(M){for(;;){le.lastIndex=M.ch;var ee=le.exec(M.text);if(!ee){if(x(M))continue;return}if(!P(M,ee.index+1)){M.ch=ee.index+1;continue}return M.ch=ee.index+ee[0].length,ee}}function j(M){for(;;){var ee=M.ch?M.text.lastIndexOf(">",M.ch-1):-1;if(ee==-1){if(ne(M))continue;return}if(!P(M,ee+1)){M.ch=ee;continue}var G=M.text.lastIndexOf("/",ee),ae=G>-1&&!/\S/.test(M.text.slice(G+1,ee));return M.ch=ee+1,ae?"selfClose":"regular"}}function I(M,ee){for(var G=[];;){var ae=ce(M),Te,Y=M.line,J=M.ch-(ae?ae[0].length:0);if(!ae||!(Te=H(M)))return;if(Te=="selfClose")continue;if(ae[1]){for(var d=G.length-1;d>=0;--d)if(G[d]==ae[2]){G.length=d;break}if(d<0&&(!ee||ee==ae[2]))return{tag:ae[2],from:we(Y,J),to:we(M.line,M.ch)}}else G.push(ae[2])}}function N(M,ee){for(var G=[];;){var ae=j(M);if(!ae)return;if(ae=="selfClose"){q(M);continue}var Te=M.line,Y=M.ch,J=q(M);if(!J)return;if(J[1])G.push(J[2]);else{for(var d=G.length-1;d>=0;--d)if(G[d]==J[2]){G.length=d;break}if(d<0&&(!ee||ee==J[2]))return{tag:J[2],from:we(M.line,M.ch),to:we(Te,Y)}}}}F.registerHelper("fold","xml",function(M,ee){for(var G=new L(M,ee.line,0);;){var ae=ce(G);if(!ae||G.line!=ee.line)return;var Te=H(G);if(!Te)return;if(!ae[1]&&Te!="selfClose"){var Y=we(G.line,G.ch),J=I(G,ae[2]);return J&&V(J.from,Y)>0?{from:Y,to:J.from}:null}}}),F.findMatchingTag=function(M,ee,G){var ae=new L(M,ee.line,ee.ch,G);if(ae.text.indexOf(">")==-1&&ae.text.indexOf("<")==-1)return;var Te=H(ae),Y=Te&&we(ae.line,ae.ch),J=Te&&q(ae);if(!Te||!J||V(ae,ee)>0)return;var d={from:we(ae.line,ae.ch),to:Y,tag:J[2]};return Te=="selfClose"?{open:d,close:null,at:"open"}:J[1]?{open:N(ae,J[2]),close:d,at:"close"}:(ae=new L(M,Y.line,Y.ch,G),{open:d,close:I(ae,J[2]),at:"open"})},F.findEnclosingTag=function(M,ee,G,ae){for(var Te=new L(M,ee.line,ee.ch,G);;){var Y=N(Te,ae);if(!Y)break;var J=new L(M,ee.line,ee.ch,G),d=I(J,Y.tag);if(d)return{open:Y,close:d}}},F.scanForClosingTag=function(M,ee,G,ae){var Te=new L(M,ee.line,ee.ch,ae?{from:0,to:ae}:null);return I(Te,G)}})},p5ED:function(mt,Ke,m){"use strict";var F=m("+L6B"),we=m("2/Rp"),V=m("5Dmo"),ge=m("3S7+"),me=m("k1fw"),le=m("tJVT"),L=m("cDcd"),P=m.n(L),x=m("vHTk"),ne=m.n(x),H=m("yEEn"),q=m("ZW9T"),ce=m("1vsH");Ke.a=function(j){var I=j.name,N=j.data,M=j.theme,ee=j.type,G=j.filename,ae=j.monacoEditor,Te=j.className,Y=j.style,J=j.close,d=j.onClose,Q=j.hasMask,U=Object(L.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),re=Object(le.a)(U,2),S=re[0],p=re[1],T=Object(L.useState)(""),R=Object(le.a)(T,2),_=R[0],D=R[1],te=Object(L.useRef)();G&&(ae.filename=G),Object(L.useEffect)(function(){var y,c,A=(y=document.cookie)===null||y===void 0||((c=y.replace(/\s/g,""))===null||c===void 0)?void 0:c.split(";");A==null||A.map(function(se){var oe=se.split("=");oe[0]==="_educoder_session"&&D(oe[1])})},[]);var B=function(){if(N.startsWith("http")||N.startsWith("/")){fe();return}Object(ce.x)(G||"educoder",N,G)},fe=function(){Object(ce.v)(G||I,N)};return console.log("data:",N,"fileanme:",G," name:",I),P.a.createElement("div",{style:Object(me.a)({},Y||{}),className:"".concat(Q&&ne.a.bgBlack," ").concat(ee?ne.a.wrp:"hide")},J&&P.a.createElement("div",{className:ne.a.close,ref:te},P.a.createElement(ge.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return te.current}},P.a.createElement("span",{onClick:fe},P.a.createElement("i",{className:"icon-quxiaozhiding"}))),P.a.createElement(ge.a,{title:"\u5173\u95ED",getPopupContainer:function(){return te.current}},P.a.createElement("span",{className:"",onClick:d},P.a.createElement("i",{className:"icon-guanbi1"})))),P.a.createElement("div",{className:"".concat(ne.a[Te]," ").concat(Te," ").concat(ne.a.monaco," ").concat(ee==="txt"?"show":"hide")},ee==="txt"&&P.a.createElement(q.b,ae)),ee==="audio"&&P.a.createElement("audio",{src:"".concat(N!=null&&N.startsWith("/")||(N==null?void 0:N.indexOf("https://"))>-1?N:"data:audio/mp3;base64,").concat(N),autoPlay:!0}),ee==="video"&&P.a.createElement(P.a.Fragment,null,N!=null&&N.startsWith("/")?P.a.createElement("video",{controls:!0,src:"".concat(N),autoPlay:!0}):P.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})),ee==="pdf"&&P.a.createElement("embed",{className:ne.a.embed,src:N}),ee==="image"&&P.a.createElement(P.a.Fragment,null,P.a.createElement("img",{src:"".concat(N!=null&&N.startsWith("/")||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(N)})),ee==="other"&&P.a.createElement("div",null,P.a.createElement(we.a,{type:"primary",size:"large",onClick:B},P.a.createElement(H.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(ee==="download"||ee==="office")&&P.a.createElement(we.a,{type:"primary",size:"large",onClick:B},P.a.createElement(H.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(mt,Ke,m){},"rAM+":function(mt,Ke,m){"use strict";m.d(Ke,"a",function(){return we});var F=m("Qw5x");function we(V,ge){var me;if(typeof Symbol=="undefined"||V[Symbol.iterator]==null){if(Array.isArray(V)||(me=Object(F.a)(V))||ge&&V&&typeof V.length=="number"){me&&(V=me);var le=0,L=function(){};return{s:L,n:function(){return le>=V.length?{done:!0}:{done:!1,value:V[le++]}},e:function(q){throw q},f:L}}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 P=!0,x=!1,ne;return{s:function(){me=V[Symbol.iterator]()},n:function(){var q=me.next();return P=q.done,q},e:function(q){x=!0,ne=q},f:function(){try{!P&&me.return!=null&&me.return()}finally{if(x)throw ne}}}}},rUJ1:function(mt,Ke){const m=/[&<>"']/,F=/[&<>"']/g,we=/[<>"']|&(?!#?\w+;)/,V=/[<>"']|&(?!#?\w+;)/g,ge={"&":"&","<":"<",">":">",'"':""","'":"'"},me=Q=>ge[Q];function le(Q,U){if(U){if(m.test(Q))return Q.replace(F,me)}else if(we.test(Q))return Q.replace(V,me);return Q}const L=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(Q){return Q.replace(L,(U,re)=>(re=re.toLowerCase(),re==="colon"?":":re.charAt(0)==="#"?re.charAt(1)==="x"?String.fromCharCode(parseInt(re.substring(2),16)):String.fromCharCode(+re.substring(1)):""))}const x=/(^|[^\[])\^/g;function ne(Q,U){Q=Q.source||Q,U=U||"";const re={replace:(S,p)=>(p=p.source||p,p=p.replace(x,"$1"),Q=Q.replace(S,p),re),getRegex:()=>new RegExp(Q,U)};return re}const H=/[^\w:]/g,q=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ce(Q,U,re){if(Q){let S;try{S=decodeURIComponent(P(re)).replace(H,"").toLowerCase()}catch(p){return null}if(S.indexOf("javascript:")===0||S.indexOf("vbscript:")===0||S.indexOf("data:")===0)return null}U&&!q.test(re)&&(re=ee(U,re));try{re=encodeURI(re).replace(/%25/g,"%")}catch(S){return null}return re}const j={},I=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,M=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ee(Q,U){j[" "+Q]||(I.test(Q)?j[" "+Q]=Q+"/":j[" "+Q]=Y(Q,"/",!0)),Q=j[" "+Q];const re=Q.indexOf(":")===-1;return U.substring(0,2)==="//"?re?U:Q.replace(N,"$1")+U:U.charAt(0)==="/"?re?U:Q.replace(M,"$1")+U:Q+U}const G={exec:function(){}};function ae(Q){let U=1,re,S;for(;U<arguments.length;U++){re=arguments[U];for(S in re)Object.prototype.hasOwnProperty.call(re,S)&&(Q[S]=re[S])}return Q}function Te(Q,U){const re=Q.replace(/\|/g,(T,R,_)=>{let D=!1,te=R;for(;--te>=0&&_[te]==="\\";)D=!D;return D?"|":" |"}),S=re.split(/ \|/);let p=0;if(S.length>U)S.splice(U);else for(;S.length<U;)S.push("");for(;p<S.length;p++)S[p]=S[p].trim().replace(/\\\|/g,"|");return S}function Y(Q,U,re){const S=Q.length;if(S===0)return"";let p=0;for(;p<S;){const T=Q.charAt(S-p-1);if(T===U&&!re)p++;else if(T!==U&&re)p++;else break}return Q.substr(0,S-p)}function J(Q,U){if(Q.indexOf(U[1])===-1)return-1;const re=Q.length;let S=0,p=0;for(;p<re;p++)if(Q[p]==="\\")p++;else if(Q[p]===U[0])S++;else if(Q[p]===U[1]&&(S--,S<0))return p;return-1}function d(Q){Q&&Q.sanitize&&!Q.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")}mt.exports={escape:le,unescape:P,edit:ne,cleanUrl:ce,resolveUrl:ee,noopTest:G,merge:ae,splitCells:Te,rtrim:Y,findClosingBracket:J,checkSanitizeDeprecation:d}},sDPU:function(mt,Ke,m){"use strict";m.r(Ke);var F=m("cWXX"),we=m("/ezw"),V=m("k1fw"),ge=m("9og8"),me=m("tJVT"),le=m("WmNS"),L=m.n(le),P=m("cDcd"),x=m.n(P),ne=m("Ty5D"),H=m("9kvl"),q=m("FIWC"),ce=m.n(q),j=m("sbIO"),I=m("ErOA"),N=m("LvDl"),M=m.n(N),ee=function(ae){var Te,Y,J,d,Q=ae.paperlibrary,U=ae.user,re=ae.globalSetting,S=ae.dispatch,p=ae.location,T=(p==null||((Te=p.query)===null||Te===void 0)?void 0:Te.select)||0,R=Object(P.useState)(!1),_=Object(me.a)(R,2),D=_[0],te=_[1],B=Object(P.useState)(!0),fe=Object(me.a)(B,2),y=fe[0],c=fe[1],A=Object(P.useState)(Number(T)),se=Object(me.a)(A,2),oe=se[0],Oe=se[1],je=Object(P.useState)({}),ue=Object(me.a)(je,2),De=ue[0],be=ue[1],xe=Object(ne.i)(),K=U.userInfo;Object(P.useEffect)(function(){return S({type:"globalSetting/footerToggle",payload:!1}),function(){S({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(P.useEffect)(function(){return S({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),S({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),function(){S({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),S({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}},[]),Object(P.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]),Object(P.useEffect)(function(){O(oe)},[]);var O=function(){var Ee=Object(ge.a)(L.a.mark(function Se(){var Ae,Ue,Le=arguments;return L.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return Ae=Le.length>0&&Le[0]!==void 0?Le[0]:0,console.log(xe),ve.next=4,Object(I.a)("/api/exercises/".concat(xe.categoryId,"/preview_random_exercise.json"),{method:"get",params:{num:Ae}});case 4:Ue=ve.sent,c(!1),be(Re(Ue));case 7:case"end":return ve.stop()}},Se)}));return function(){return Ee.apply(this,arguments)}}(),Re=function(Se){var Ae={1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D",7:"\u4E03"};if(!Se)return;var Ue=Se||{},Le=Ue.exam,ye=Ue.single_questions,ve=Ue.multiple_questions,st=Ue.judgement_questions,Qe=Ue.program_questions,Ge=Ue.completion_questions,Ve=Ue.subjective_questions,ht=Ue.practical_questions,ct=Ue.combination_questions,nt=[Object(V.a)({type:"SINGLE",name:"\u5355\u9009\u9898"},ye),Object(V.a)({type:"MULTIPLE",name:"\u591A\u9009\u9898"},ve),Object(V.a)({type:"COMPLETION",name:"\u586B\u7A7A\u9898"},Ge),Object(V.a)({type:"JUDGMENT",name:"\u5224\u65AD\u9898"},st),Object(V.a)({type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},Ve),Object(V.a)({type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},Qe),Object(V.a)({type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},ht),Object(V.a)({type:"COMBINATION",name:"\u7EC4\u5408\u9898"},ct)],de=[],dt=0,$e=0,he=nt.filter(function(_e){return _e.questions_count>0}).map(function(_e,g){var w;return(w=_e.questions)===null||w===void 0||w.forEach(function(E){de.push(E.id),dt=dt+E.score,$e=$e+1}),Object(V.a)(Object(V.a)({},_e),{number:Ae[g+1]})});return{all_questions_count:$e,all_score:dt,questionList:he,ids:de,exam:Le}},Xe=function(){H.d.push("/classrooms/".concat(xe.coursesId,"/exercise"))},ut=function(){alert("\u4FDD\u5B58")},Fe=function(){var Ee=Object(ge.a)(L.a.mark(function Se(Ae,Ue){var Le,ye,ve;return L.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Object(I.a)("/api/exercises/".concat(xe.categoryId,"/toggle_random_question.json"),{method:"post",body:{question_id:Ae==null?void 0:Ae.single_question_id}});case 2:Le=Qe.sent,Le!=null&&Le.question&&(ve=Object(N.cloneDeep)(De),ve.questionList=ve==null||((ye=ve.questionList)===null||ye===void 0)?void 0:ye.map(function(Ge){if(Ge.type===Ue.type){var Ve=Object(N.cloneDeep)(Ge==null?void 0:Ge.questions);return Ve.splice(Ue.index,1,Le==null?void 0:Le.question),Object(V.a)(Object(V.a)({},Ge),{},{questions:Ve})}return Ge}),be(ve));case 4:case"end":return Qe.stop()}},Se)}));return function(Ae,Ue){return Ee.apply(this,arguments)}}(),Ie=function(){var Ee=Object(ge.a)(L.a.mark(function Se(Ae){return L.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:document.body.scrollIntoView(),O(Ae),Oe(Ae);case 3:case"end":return Le.stop()}},Se)}));return function(Ae){return Ee.apply(this,arguments)}}();return console.log(Object(ne.h)(),"location333"),x.a.createElement("section",{className:ce.a.wrap},x.a.createElement(we.a,{loading:y,active:!0,paragraph:{rows:5}},((Y=Object(ne.h)())===null||Y===void 0||((J=Y.pathname)===null||J===void 0)?void 0:J.includes("preview"))&&x.a.createElement("div",{className:ce.a.crumbs},x.a.createElement("b",null),x.a.createElement("span",{className:"current",onClick:function(){return H.d.push("/classrooms/".concat(xe.coursesId,"/exercise"))}},"".concat(K==null||((d=K.course)===null||d===void 0)?void 0:d.course_name,">")),x.a.createElement("span",{className:"current",onClick:function(){return H.d.push("/classrooms/".concat(xe.coursesId,"/exercise"))}},"\u8BD5\u5377\u5217\u8868>"),x.a.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),x.a.createElement(j.a,{loading:D,submit:ut,goBack:Xe,data:De,selectValue:oe,editPreview:!0,onExchange:Fe,onSkipExamination:Ie})))};Ke.default=Object(H.a)(function(G){var ae=G.paperlibrary,Te=G.user,Y=G.globalSetting;return{paperlibrary:ae,user:Te,globalSetting:Y}})(ee)},sbIO:function(mt,Ke,m){"use strict";var F=m("DjyN"),we=m("NUBc"),V=m("5Dmo"),ge=m("3S7+"),me=m("/zsF"),le=m("PArb"),L=m("Q9mQ"),P=m("diRs"),x=m("+L6B"),ne=m("2/Rp"),H=m("5NDa"),q=m("5rEg"),ce=m("miYZ"),j=m("tsqr"),I=m("9og8"),N=m("giR+"),M=m("fyUT"),ee=m("2qtc"),G=m("kLXV"),ae=m("tJVT"),Te=m("WmNS"),Y=m.n(Te),J=m("cDcd"),d=m.n(J),Q=m("PsQE"),U=m.n(Q),re=m("0eGx"),S=m.n(re),p=m("9Bee"),T=m("Ty5D"),R=m("9kvl"),_=m("ErOA"),D=m("+yhJ"),te=m.n(D),B=m("RZ/O"),fe=m.n(B),y=m("LvDl"),c=m("6K3P"),A=m.n(c),se=m("sRBo"),oe=m("kaz8"),Oe=m("oBTY"),je=m("PpiC"),ue=m("Ot1p"),De=m("kqOp"),be=m("7qnI"),xe=m("1vsH"),K=m("PGNT"),O=m.n(K),Re=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Xe=function(g,w){var E=g.globalSetting,f=g.loading,h=g.dispatch,v=g.isEdit,b=g.editData,W=Object(je.a)(g,["globalSetting","loading","dispatch","isEdit","editData"]),Z=Object(J.useState)(""),ie=Object(ae.a)(Z,2),Je=ie[0],ft=ie[1],Be=Object(J.useState)(""),St=Object(ae.a)(Be,2),kt=St[0],qe=St[1],Lt=Object(J.useState)([]),yt=Object(ae.a)(Lt,2),Ut=yt[0],Rt=yt[1],ot=Object(J.useState)(""),Mt=Object(ae.a)(ot,2),Tt=Mt[0],pt=Mt[1],rt=Object(J.useState)(),lt=Object(ae.a)(rt,2),Et=lt[0],jt=lt[1],Dt=Object(J.useState)(!1),Xt=Object(ae.a)(Dt,2),It=Xt[0],tt=Xt[1];Object(J.useEffect)(function(){if(!b||!v)return;ft(b==null?void 0:b.name),qe(b==null?void 0:b.analysis),jt(b==null?void 0:b.is_ordered),tt(!0)},[b]),Object(J.useEffect)(function(){if(!It)return;var Ce=b==null?void 0:b.standard_answer.map(function(We){return We.answer_text});Rt(Ce),tt(!1)},[It]),Object(J.useImperativeHandle)(w,function(){return{onSave:Ft,Clear:vt}});var Ft=function(){var We=[],Pe=!1;return Je?(Ut.forEach(function(Yt,an){We.push({position:an+1,answer_text:[]}),Yt.forEach(function(nn,Bn){We[an].answer_text.push(nn),(!nn||!Object(xe.bb)(nn,1e4))&&(pt("".concat(an,"-").concat(Bn)),j.b.info(nn?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Pe=!0)})}),Pe?!1:(We==null?void 0:We.length)>20?(j.b.warn("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Je,analysis:kt,standard_answers:We,is_ordered:Et}):(j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},vt=function(){ft(""),qe(""),Rt([]),jt(!1)},Bt=function(We,Pe,Yt){var an=Ut.slice();if(Pe&&an.splice(We,Pe),Yt)for(var nn=0;nn<Yt;nn++)an.splice(We+nn,0,[""]);Rt(an)},xt=function(We,Pe,Yt){pt("");var an=Ut.slice();an[We][Pe]=Yt,Rt(an)},un=function(We){var Pe=Ut.slice();Pe[We]=[].concat(Object(Oe.a)(Pe[We]),[""]),Rt(Pe)},Hn=function(We,Pe){var Yt=Ut.slice();if(!Yt[We][Pe]){Yt[We]=Yt[We].filter(function(an,nn){return nn!==Pe}),Rt(Yt);return}G.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:O.a.modal,onOk:function(){Yt[We]=Yt[We].filter(function(nn,Bn){return Bn!==Pe}),Rt(Yt)}})},Xn=function(We){G.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:O.a.modal,onOk:function(){var Yt=Ut.slice();Yt=Ut.filter(function(an,nn){return We!==nn}),Rt(Yt)}})};return d.a.createElement("section",{className:O.a.wrap},d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement("div",null,d.a.createElement(De.a,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Je,onChange:function(We){return ft(We)},showNullButton:!0,onPlaceholderChange:Bt})),d.a.createElement("div",{className:"mt20"},Ut.map(function(Ce,We){return d.a.createElement(be.a,{key:We,answers:Ce,index:We,flex:1,is_md:!0,activeOptionErrorIndex:Tt,onAnswerChange:xt,addChildAnswer:un,deleteChildAnswer:Hn,deleteChildAnswermain:Xn})})),d.a.createElement("div",{className:"mt20"},Ut.length>1&&d.a.createElement("span",null,d.a.createElement(oe.a,{checked:Et,onChange:function(We){return jt(We.target.checked)},className:"".concat(O.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),d.a.createElement("span",{className:"".concat(O.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(ue.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:kt,onChange:function(We){return qe(We)}}))},ut=Object(R.a)(function(_e){var g=_e.loading,w=_e.globalSetting;return{globalSetting:w,loading:g.effects}},null,null,{forwardRef:!0})(Object(J.forwardRef)(Xe)),Fe=m("7Kak"),Ie=m("9yH6"),Ee=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Se=function(g,w){var E=g.globalSetting,f=g.loading,h=g.editData,v=g.dispatch,b=g.onRef,W=b===void 0?function(){}:b,Z=g.isEdit,ie=Object(je.a)(g,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),Je=Object(J.useState)(),ft=Object(ae.a)(Je,2),Be=ft[0],St=ft[1],kt=Object(J.useState)(""),qe=Object(ae.a)(kt,2),Lt=qe[0],yt=qe[1],Ut=Object(J.useState)(""),Rt=Object(ae.a)(Ut,2),ot=Rt[0],Mt=Rt[1];Object(J.useEffect)(function(){if(!h||!Z)return;yt(h==null?void 0:h.name),Mt(h==null?void 0:h.analysis);var rt=h==null?void 0:h.choices.find(function(lt){return lt.is_answer});St(rt.choice_text==="\u6B63\u786E"?"0":"1")},[h]),Object(J.useImperativeHandle)(w,function(){return{onSave:Tt,Clear:pt}});var Tt=function(){if(!Lt)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Be)return j.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;var lt=[{choice_text:"\u6B63\u786E",is_answer:Be==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Be==="1"?1:0}];return{name:Lt,choices:lt,analysis:ot}},pt=function(){yt(""),Mt(""),St("")};return d.a.createElement("section",{className:O.a.wrap},d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(ue.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Lt,onChange:function(lt){return yt(lt)}}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:O.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),d.a.createElement(Ie.a.Group,{buttonStyle:"solid",value:Be,onChange:function(lt){return St(lt.target.value)}},d.a.createElement(Ie.a.Button,{value:"0",className:"".concat(O.a.radio," mr40")},"\u6B63\u786E"),d.a.createElement(Ie.a.Button,{value:"1",className:O.a.radio},"\u9519\u8BEF")),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(ue.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:ot,onChange:function(lt){return Mt(lt)}}))},Ae=Object(R.a)(function(_e){var g=_e.loading,w=_e.globalSetting;return{globalSetting:w,loading:g.effects}},null,null,{forwardRef:!0})(Object(J.forwardRef)(Se)),Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Le=function(g,w){var E=g.editData,f=g.globalSetting,h=g.loading,v=g.dispatch,b=g.onRef,W=b===void 0?function(){}:b,Z=g.isEdit,ie=Object(je.a)(g,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Je=Object(J.useState)([]),ft=Object(ae.a)(Je,2),Be=ft[0],St=ft[1],kt=Object(J.useState)(),qe=Object(ae.a)(kt,2),Lt=qe[0],yt=qe[1],Ut=Object(J.useState)([]),Rt=Object(ae.a)(Ut,2),ot=Rt[0],Mt=Rt[1],Tt=Object(J.useState)(""),pt=Object(ae.a)(Tt,2),rt=pt[0],lt=pt[1],Et=Object(J.useState)(""),jt=Object(ae.a)(Et,2),Dt=jt[0],Xt=jt[1];Object(J.useEffect)(function(){St(["","","",""])},[]),Object(J.useEffect)(function(){if(!E||!Z)return;lt(E==null?void 0:E.name),Xt(E==null?void 0:E.analysis),St(E==null?void 0:E.choices.map(function(vt){return vt.choice_text}));var Ft=[];E==null||E.choices.map(function(vt,Bt){vt.is_answer&&Ft.push(Bt)}),Mt(Ft)},[E]),Object(J.useImperativeHandle)(w,function(){return{onSave:It,Clear:tt}});var It=function(){if(!rt)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var vt=Be.findIndex(function(xt){return!xt});if(vt>-1)return j.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Ue[vt]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(!ot.length)return j.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(ot.length<2)return j.b.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;var Bt=Be.map(function(xt,un){return{choice_text:xt,is_answer:ot.includes(un)?1:0}});return{name:rt,choices:Bt,analysis:Dt}},tt=function(){St(["","","",""]),lt(""),Xt(""),Mt("")};return d.a.createElement("section",{className:O.a.wrap},d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(ue.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:rt,onChange:function(vt){return lt(vt)}}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:O.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Be.map(function(Ft,vt){return d.a.createElement("div",{className:O.a.choiceWrap,key:vt},d.a.createElement(ge.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(O.a.answer," ").concat(ot.includes(vt)?O.a.activeAnswer:""),onClick:function(){ot.includes(vt)?Mt(ot.filter(function(xt){return xt!==vt})):Mt([].concat(Object(Oe.a)(ot),[vt]))}},Ue[vt])),d.a.createElement("div",{className:O.a.editorWrap},Lt===vt?d.a.createElement(ue.a,{id:"single-question-option-".concat(vt),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ft,onChange:function(xt){Be[vt]=xt,St(Be)}}):d.a.createElement("div",{className:O.a.htmlWrap,onClick:function(){return yt(vt)}},d.a.createElement(p.a,{value:Ft}))),vt>1&&d.a.createElement(ge.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(O.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){St(Be.filter(function(xt,un){return un!==vt})),ot.includes(vt)?Mt(ot.filter(function(xt){return xt!==vt})):Mt([].concat(Object(Oe.a)(ot),[vt]))}})),vt<7&&vt===Be.length-1&&d.a.createElement(ge.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(O.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return St([].concat(Object(Oe.a)(Be),[""]))}})))}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(ue.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Dt,onChange:function(vt){return Xt(vt)}}))},ye=Object(R.a)(function(_e){var g=_e.loading,w=_e.globalSetting;return{globalSetting:w,loading:g.effects}},null,null,{forwardRef:!0})(Object(J.forwardRef)(Le)),ve=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],st=function(g,w){var E=g.editData,f=g.globalSetting,h=g.loading,v=g.dispatch,b=g.onRef,W=b===void 0?function(){}:b,Z=g.isEdit,ie=Object(je.a)(g,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Je=Object(J.useState)([]),ft=Object(ae.a)(Je,2),Be=ft[0],St=ft[1],kt=Object(J.useState)(),qe=Object(ae.a)(kt,2),Lt=qe[0],yt=qe[1],Ut=Object(J.useState)(),Rt=Object(ae.a)(Ut,2),ot=Rt[0],Mt=Rt[1],Tt=Object(J.useState)(""),pt=Object(ae.a)(Tt,2),rt=pt[0],lt=pt[1],Et=Object(J.useState)(""),jt=Object(ae.a)(Et,2),Dt=jt[0],Xt=jt[1];Object(J.useEffect)(function(){St(["","","",""])},[]),Object(J.useEffect)(function(){if(!E||!Z)return;lt(E==null?void 0:E.name),Xt(E==null?void 0:E.analysis),St(E==null?void 0:E.choices.map(function(Ft){return Ft.choice_text})),Mt(E==null?void 0:E.choices.findIndex(function(Ft){return Ft.is_answer}))},[E]),Object(J.useImperativeHandle)(w,function(){return{onSave:It,Clear:tt}});var It=function(){if(!rt)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var vt=Be.findIndex(function(xt){return!xt});if(vt>-1)return j.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(ve[vt]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(console.log("activeAnswer: ",ot),!(typeof ot=="number"))return j.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;var Bt=Be.map(function(xt,un){return{choice_text:xt,is_answer:ot===un?1:0}});return{name:rt,choices:Bt,analysis:Dt}},tt=function(){St(["","","",""]),lt(""),Xt(""),Mt("")};return d.a.createElement("section",{className:O.a.wrap},d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(ue.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:rt,onChange:function(vt){return lt(vt)}}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:O.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Be.map(function(Ft,vt){return d.a.createElement("div",{className:O.a.choiceWrap,key:vt},d.a.createElement(ge.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(O.a.answer," ").concat(ot===vt?O.a.activeAnswer:""),onClick:function(){return Mt(vt)}},ve[vt])),d.a.createElement("div",{className:O.a.editorWrap},Lt===vt?d.a.createElement(ue.a,{id:"single-question-option-".concat(vt),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ft,onChange:function(xt){Be[vt]=xt,St(Be)}}):d.a.createElement("div",{className:O.a.htmlWrap,onClick:function(){return yt(vt)}},d.a.createElement(p.a,{value:Ft}))),vt>1&&d.a.createElement(ge.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(O.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){St(Be.filter(function(xt,un){return un!==vt})),vt===ot&&Mt(null)}})),vt<7&&vt===Be.length-1&&d.a.createElement(ge.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(O.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return St([].concat(Object(Oe.a)(Be),[""]))}})))}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(ue.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Dt,onChange:function(vt){return Xt(vt)}}))},Qe=Object(R.a)(function(_e){var g=_e.loading,w=_e.globalSetting;return{globalSetting:w,loading:g.effects}},null,null,{forwardRef:!0})(Object(J.forwardRef)(st)),Ge=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ve=function(g,w){var E=g.editData,f=g.globalSetting,h=g.loading,v=g.dispatch,b=g.onRef,W=b===void 0?function(){}:b,Z=g.isEdit,ie=Object(je.a)(g,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),Je=Object(J.useState)(""),ft=Object(ae.a)(Je,2),Be=ft[0],St=ft[1],kt=Object(J.useState)(""),qe=Object(ae.a)(kt,2),Lt=qe[0],yt=qe[1],Ut=Object(J.useState)(""),Rt=Object(ae.a)(Ut,2),ot=Rt[0],Mt=Rt[1];Object(J.useEffect)(function(){var rt;if(!E||!Z)return;St(E==null?void 0:E.name),yt(E==null?void 0:E.analysis),Mt(E==null||((rt=E.answer_texts)===null||rt===void 0)?void 0:rt[0])},[E]),Object(J.useImperativeHandle)(w,function(){return{onSave:Tt,Clear:pt}});var Tt=function(){return Be?ot?{name:Be,answer_texts:[ot],analysis:Lt}:(j.b.info("\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848"),!1):(j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},pt=function(){St(""),yt(""),Mt("")};return d.a.createElement("section",{className:O.a.wrap},d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(ue.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Be,onChange:function(lt){return St(lt)}}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),d.a.createElement(ue.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:ot,onChange:function(lt){return Mt(lt)}}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(ue.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Lt,onChange:function(lt){return yt(lt)}}))},ht=Object(R.a)(function(_e){var g=_e.loading,w=_e.globalSetting;return{globalSetting:w,loading:g.effects}},null,null,{forwardRef:!0})(Object(J.forwardRef)(Ve)),ct=m("k1fw"),nt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],de=function(g,w){var E=g.globalSetting,f=g.loading,h=g.dispatch,v=g.editData,b=g.onRef,W=b===void 0?function(){}:b,Z=g.isEdit,ie=Object(je.a)(g,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),Je=Object(J.useState)(""),ft=Object(ae.a)(Je,2),Be=ft[0],St=ft[1],kt=Object(J.useState)([]),qe=Object(ae.a)(kt,2),Lt=qe[0],yt=qe[1];console.log(Lt),Object(J.useEffect)(function(){var Tt;if(!v||!Z)return;St(v==null?void 0:v.name);var pt=v==null||((Tt=v.sub_item_banks)===null||Tt===void 0)?void 0:Tt.map(function(rt){var lt,Et,jt;return Object(ct.a)(Object(ct.a)({},rt),{},{id:rt.id,open:!1,qusList:rt==null||((lt=rt.choices)===null||lt===void 0)?void 0:lt.map(function(Dt){return Dt.choice_text}),activeQusEditor:null,qusAnswer:(Et=[rt==null||((jt=rt.choices)===null||jt===void 0)?void 0:jt.findIndex(function(Dt){return Dt.is_answer})])===null||Et===void 0?void 0:Et.filter(function(Dt){return Dt!==-1})})});yt(pt)},[v]),Object(J.useImperativeHandle)(w,function(){return{onSave:Ut,Clear:Rt}});var Ut=function(){if(!Be)return j.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(Lt.length===0)return j.b.info("\u8BF7\u60A8\u6DFB\u52A0\u5C0F\u9898"),!1;for(var pt=0;pt<Lt.length;pt++){var rt,lt=Lt[pt];if(!(lt!=null&<.name))return j.b.info("\u8BF7\u60A8\u8F93\u5165\u7B2C".concat(pt+1,"\u5C0F\u9898\u9898\u5E72")),!1;var Et=lt==null||((rt=lt.qusList)===null||rt===void 0)?void 0:rt.findIndex(function(Dt){return!Dt});if(Et>-1)return j.b.info("\u8BF7\u5148\u8F93\u5165\u7B2C".concat(pt+1,"\u5C0F\u9898").concat(nt[Et],"\u9009\u9879\u7684\u5185\u5BB9")),!1;if(!(lt!=null&<.qusAnswer.length))return j.b.info("\u8BF7\u8BBE\u7F6E\u7B2C".concat(pt+1,"\u5C0F\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E")),!1}var jt=Lt.map(function(Dt){return{id:Dt.id>1?Dt.id:null,name:Dt.name,item_type:Dt.item_type,analysis:Dt.analysis,choices:Dt.qusList.map(function(Xt,It){return{choice_text:Xt,is_answer:Dt.qusAnswer[0]===It?1:0}})}});return{name:Be,sub_item_banks:jt}},Rt=function(){St(""),yt([])},ot=function(){var pt={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};yt(Lt.concat(pt))},Mt=function(pt,rt,lt){var Et=Object(y.cloneDeep)(Lt);if(pt==="open"&&(Et[rt].open=!Et[rt].open),pt==="delete"&&Et.splice(rt,1),pt==="value"&&(Et[rt].name=lt),pt==="answer"&&(Et[rt].qusAnswer=[lt]),pt==="edit"&&(Et[rt].activeQusEditor=lt),pt==="details"&&(Et[rt].qusList[Et[rt].activeQusEditor]=lt),pt==="addQus"&&(Et[rt].qusList=Et[rt].qusList.concat("")),pt==="deleteQus"){var jt;Et[rt].qusList=Et[rt].qusList.filter(function(Dt,Xt){return Xt!==lt}),Et[rt].qusAnswer=(jt=Et[rt].qusAnswer)===null||jt===void 0?void 0:jt.filter(function(Dt){return Dt!==lt})}pt==="analysis"&&(Et[rt].analysis=lt),yt(Et)};return d.a.createElement("section",{className:O.a.wrap},d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(ue.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Be,onChange:function(pt){return St(pt)}}),Lt==null?void 0:Lt.map(function(Tt,pt){var rt;return d.a.createElement("div",{className:O.a.fold,key:Tt.id},d.a.createElement("div",{onClick:function(){return Mt("open",pt)},className:O.a.head},d.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:Tt.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),d.a.createElement("span",null,"\u7B2C",pt+1,"\u5C0F\u9898\uFF08\u5355\u9009\u9898\uFF09"),d.a.createElement("b",{style:{visibility:"hidden"},onClick:function(Et){Et.stopPropagation(),Mt("delete",pt)},className:"iconfont icon-shanchu8"})),d.a.createElement("div",{className:"mb10",style:{display:Tt.open?"block":"none"}},d.a.createElement(ue.a,{watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Tt==null?void 0:Tt.name,onChange:function(Et){return Mt("value",pt,Et)}}),d.a.createElement("p",{className:O.a.titleWrap},d.a.createElement("span",{className:O.a.required},"*"),d.a.createElement("span",{className:O.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:O.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Tt==null||((rt=Tt.qusList)===null||rt===void 0)?void 0:rt.map(function(lt,Et){var jt,Dt;return d.a.createElement("div",{className:O.a.choiceWrap,key:Et},d.a.createElement(ge.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(O.a.answer," ").concat(Tt!=null&&(jt=Tt.qusAnswer)!==null&&jt!==void 0&&jt.includes(Et)?O.a.activeAnswer:""),onClick:function(){return Mt("answer",pt,Et)}},nt[Et])),d.a.createElement("div",{className:O.a.editorWrap},(Tt==null?void 0:Tt.activeQusEditor)===Et?d.a.createElement(ue.a,{id:"single-question-option-".concat(Et),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:lt,onChange:function(It){return Mt("details",pt,It)}}):d.a.createElement("div",{className:O.a.htmlWrap,onClick:function(){return Mt("edit",pt,Et)}},d.a.createElement(p.a,{value:lt}))),Et>1&&d.a.createElement(ge.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(O.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Mt("deleteQus",pt,Et)}})),Et<7&&Et===(Tt==null||((Dt=Tt.qusList)===null||Dt===void 0)?void 0:Dt.length)-1&&d.a.createElement(ge.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(O.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Mt("addQus",pt)}})))}),d.a.createElement("p",{className:"mb10 mt10"},d.a.createElement("span",{className:O.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(ue.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Tt.analysis,onChange:function(Et){return Mt("analysis",pt,Et)}})))}))},dt=Object(R.a)(function(_e){var g=_e.loading,w=_e.globalSetting;return{globalSetting:w,loading:g.effects}},null,null,{forwardRef:!0})(Object(J.forwardRef)(de)),$e=function(g){var w,E,f,h,v,b,W,Z,ie=g.data,Je=g.submit,ft=g.goBack,Be=g.loading,St=g.onTypeScore,kt=g.editPreview,qe=kt===void 0?!1:kt,Lt=g.onSkipExamination,yt=g.selectValue,Ut=g.onExchange,Rt=Object(J.useRef)(),ot=Object(J.useRef)(Object(y.debounce)(function(){return Bt()},100,{leading:!0,trailing:!0})),Mt=Object(J.useState)(null),Tt=Object(ae.a)(Mt,2),pt=Tt[0],rt=Tt[1],lt=Object(J.useState)(!1),Et=Object(ae.a)(lt,2),jt=Et[0],Dt=Et[1],Xt=Object(T.i)();Object(J.useEffect)(function(){return window.addEventListener("scroll",ot==null?void 0:ot.current),function(){window.removeEventListener("scroll",ot==null?void 0:ot.current)}},[]),Object(J.useEffect)(function(){Dt(!0)},[]),Object(J.useEffect)(function(){var Ye,$,Me,gt,at=(Ye=document.getElementById("examName"))===null||Ye===void 0||(($=Ye.getElementsByClassName("ant-pagination-options-quick-jumper"))===null||$===void 0||((Me=$[0])===null||Me===void 0||((gt=Me.childNodes)===null||gt===void 0)))?void 0:gt[2];at&&(at.nodeValue="\u4EFD")},[ie]);var It=function($){var Me=parseInt($);return isNaN(Me)?"":Me};function tt(){var Ye=0,$=0,Me=0;return document.body&&($=document.body.scrollTop),document.documentElement&&(Me=document.documentElement.scrollTop),Ye=$-Me>0?$:Me,Ye}function Ft(){var Ye=0,$=0,Me=0;return document.body&&($=document.body.scrollHeight),document.documentElement&&(Me=document.documentElement.scrollHeight),Ye=$-Me>0?$:Me,Ye}function vt(){var Ye=0;return document.compatMode=="CSS1Compat"?Ye=document.documentElement.clientHeight:Ye=document.body.clientHeight,Ye}var Bt=function(){var $=document.getElementById("preview_btns"),Me=document.getElementById("preview_btns_else");tt()+vt()>=Ft()-68?($.style.visibility="hidden",Me.style.visibility="visible"):($.style.visibility="visible",Me.style.visibility="hidden")},xt=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],un=function($){var Me,gt=[];return d.a.createElement(d.a.Fragment,null,d.a.createElement("aside",{className:U.a.single},$==null||((Me=$.choices)===null||Me===void 0)?void 0:Me.map(function(at,et){return at.is_answer&>.push(Pe[et]),d.a.createElement("ul",{key:et},d.a.createElement("li",null,Pe[et],"\u3001"),d.a.createElement("li",null,d.a.createElement(p.a,{value:at.choice_text})))})),d.a.createElement("div",{className:U.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",gt.join(""),d.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",xt[$.difficulty])),d.a.createElement("aside",null,d.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),d.a.createElement(p.a,{value:$.analysis?$.analysis:"\u6682\u65E0\u89E3\u6790"})),d.a.createElement("ul",null,d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat($==null?void 0:$.discipline_name,"/").concat($==null?void 0:$.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),$==null?void 0:$.tag_discipline_name))))},Hn=function($){var Me,gt=$==null||((Me=$.standard_answer)===null||Me===void 0)?void 0:Me.map(function(at){var et;return"\u7B54\u6848\uFF08\u586B\u7A7A".concat(at.position,"\uFF09\uFF1A").concat(at==null||((et=at.answer_text)===null||et===void 0)?void 0:et.join("\u3001"))});return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{className:U.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",gt),d.a.createElement("aside",null,d.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),d.a.createElement(p.a,{value:$.analysis?$.analysis:"\u6682\u65E0\u89E3\u6790"})),d.a.createElement("ul",null,d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat($==null?void 0:$.discipline_name,"/").concat($==null?void 0:$.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),$==null?void 0:$.tag_discipline_name))))},Xn=function($){var Me;return d.a.createElement("div",{className:U.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",$==null||((Me=$.answer_texts)===null||Me===void 0)?void 0:Me[0]),d.a.createElement("aside",null,d.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),d.a.createElement(p.a,{value:$.analysis?$.analysis:"\u6682\u65E0\u89E3\u6790"})),d.a.createElement("ul",null,d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat($==null?void 0:$.discipline_name,"/").concat($==null?void 0:$.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),$==null?void 0:$.tag_discipline_name)))},Ce=function($){var Me;return d.a.createElement("div",{className:U.a.analysis},d.a.createElement("aside",null,d.a.createElement("span",{className:U.a.text},"\u9884\u671F\u8F93\u51FA:"),d.a.createElement(p.a,{value:$==null||((Me=$.program_attr)===null||Me===void 0)?void 0:Me.description})),d.a.createElement("ul",null,d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat($==null?void 0:$.discipline_name,"/").concat($==null?void 0:$.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),$==null?void 0:$.tag_discipline_name)))},We=function($,Me){var gt;return d.a.createElement("div",null,$==null||((gt=$.sub_item_banks)===null||gt===void 0)?void 0:gt.map(function(at,et){var Ot,Vt=[];return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},Me+1+"."+(et+1),"\uFF08\u5355\u9009\u9898\uFF09",at.name),d.a.createElement("aside",{className:U.a.single},at==null||((Ot=at.choices)===null||Ot===void 0)?void 0:Ot.map(function(Zt,$t){return Zt.is_answer&&Vt.push(Pe[$t]),d.a.createElement("ul",{key:$t},d.a.createElement("li",null,Pe[$t],"\u3001"),d.a.createElement("li",null,d.a.createElement(p.a,{value:Zt.choice_text})))})),d.a.createElement("div",{className:U.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Vt.join(""),d.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",xt[at.difficulty])),d.a.createElement("aside",null,d.a.createElement("span",{className:U.a.text},"\u89E3\u6790:"),d.a.createElement(p.a,{value:at.analysis?at.analysis:"\u6682\u65E0\u89E3\u6790"})),d.a.createElement("ul",null,d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),"".concat($==null?void 0:$.discipline_name,"/").concat($==null?void 0:$.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),$==null?void 0:$.tag_discipline_name))))}))},Pe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Yt=function($){console.log("---",$);var Me=[];$.questions.map(function(at){return at==null?void 0:at.sub_item_banks.map(function(et){Me.push(et)})});var gt=0;$.type==="COMBINATION"?gt=$.questions_score/Me.length:gt=$.questions_score/$.questions_count,G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:d.a.createElement("div",{className:U.a.modalColumn},d.a.createElement("div",{className:U.a.modalRow,style:{justifyContent:"flex-start"}},d.a.createElement("sup",{className:U.a.sup},"*"),d.a.createElement("span",null,$==null?void 0:$.name,($==null?void 0:$.type)==="COMBINATION"&&"\u4E2D\u7684\u6BCF\u5C0F\u9898","\uFF1A"),d.a.createElement(M.a,{min:1,parser:It,defaultValue:gt,onChange:function(et){gt=et}}),d.a.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var at=Object(I.a)(Y.a.mark(function Ot(){var Vt,Zt;return Y.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:if(gt){on.next=3;break}return j.b.warn("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),on.abrupt("return",Promise.reject());case 3:$.type==="COMBINATION"?(Vt={type:$==null?void 0:$.type,score:gt,scoreTotal:gt*(Me==null?void 0:Me.length)},St(Vt)):(Zt={type:$==null?void 0:$.type,score:gt,scoreTotal:gt*$.questions_count},St(Zt));case 4:case"end":return on.stop()}},Ot)}));function et(){return at.apply(this,arguments)}return et}()})},an=function(){var $="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:d.a.createElement("div",{className:U.a.modalColumn},d.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},d.a.createElement("img",{style:{marginRight:5},src:A.a}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),d.a.createElement("div",{className:U.a.modalRow,style:{marginTop:20}},d.a.createElement("sup",{className:U.a.sup},"*"),d.a.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),d.a.createElement(q.a,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:$,onChange:function(gt){$=gt.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Me=Object(I.a)(Y.a.mark(function at(){var et,Ot,Vt,Zt,$t;return Y.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:if($){Rn.next=3;break}return j.b.warn("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Rn.abrupt("return",Promise.reject());case 3:return Ot=[],Vt=[],Zt=[],ie==null||((et=ie.questionList)===null||et===void 0)||et.forEach(function(hn){var En;(En=hn.questions)===null||En===void 0||En.forEach(function(_r){Ot.push(_r.id),Vt.push(hn.questions_score/hn.questions_count),hn.type==="COMBINATION"&&Zt.push({id:_r.id,sub_item_bank_ids:_r.sub_item_banks.map(function(xn){return xn.id})})})}),console.log("-----",Zt),$t={item_bank_ids:Ot,item_bank_scores:Vt,name:$,combination_item_banks:Zt},Rn.next=11,Je($t);case 11:case"end":return Rn.stop()}},at)}));function gt(){return Me.apply(this,arguments)}return gt}()})},nn=function($,Me,gt,at){var et,Ot=(et=at.questions)===null||et===void 0?void 0:et.map(function(Zt){return Zt.id}),Vt=G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Zt=Object(I.a)(Y.a.mark(function on(){return Y.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return Vt.update({cancelButtonProps:{disabled:!0}}),hn.next=3,Ut({single_question_id:$,seleted_item_bank_ids:Ot},{type:Me,index:gt});case 3:Vt.update({cancelButtonProps:{disabled:!1}}),j.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898");case 5:case"end":return hn.stop()}},on)}));function $t(){return Zt.apply(this,arguments)}return $t}()})},Bn=function($){var Me,gt=(Me=$.questions)===null||Me===void 0?void 0:Me.map(function(Ot){return Ot.id}),at=$.name,et=G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362".concat(at,"\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ot=Object(I.a)(Y.a.mark(function Zt(){return Y.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return et.update({cancelButtonProps:{disabled:!0}}),on.next=3,Ut({seleted_item_bank_ids:gt},{type:$.type});case 3:et.update({cancelButtonProps:{disabled:!1}}),j.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210".concat(at,"\u8BD5\u9898"));case 5:case"end":return on.stop()}},Zt)}));function Vt(){return Ot.apply(this,arguments)}return Vt}()})},Ct=function(){var $=G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Me=Object(I.a)(Y.a.mark(function at(){return Y.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:return $.update({cancelButtonProps:{disabled:!0}}),Ot.next=3,Ut();case 3:$.update({cancelButtonProps:{disabled:!1}}),j.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898");case 5:case"end":return Ot.stop()}},at)}));function gt(){return Me.apply(this,arguments)}return gt}()})},ir=function($){console.log($,"key"),Lt($-1)},or=function(){return d.a.createElement(d.a.Fragment,null,d.a.createElement(P.a,{color:"#55575D",overlayClassName:U.a.popover,visible:jt,getPopupContainer:function(Me){return Me==null?void 0:Me.parentNode},content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},d.a.createElement(ne.a,{onMouseEnter:function(){return Dt(!0)},onMouseLeave:function(){return Dt(!1)},onClick:function(){an()}},"\u4FDD\u5B58")),d.a.createElement(ne.a,{onClick:function(){document.body.scrollIntoView(),ft()}},"\u8FD4\u56DE"),d.a.createElement(ne.a,{loading:Be,onClick:function(){return Je()},type:"primary"},"\u63D0\u4EA4"))},An=function(){var $;return d.a.createElement(d.a.Fragment,null,d.a.createElement(ne.a,{onClick:ft},"\u8FD4\u56DE"),yt>0&&d.a.createElement(ne.a,{onClick:function(){return ir(yt)},type:"primary"},"\u4E0A\u4E00\u4EFD"),yt<(ie==null||(($=ie.exam)===null||$===void 0)?void 0:$.total_num)-1&&d.a.createElement(ne.a,{onClick:function(){return ir(yt+2)}},"\u4E0B\u4E00\u4EFD"))},Ln=function($,Me){if(console.log($,222),Me==="SINGLE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Qe,{ref:Rt,editData:$,isEdit:!0}),d.a.createElement(le.a,null));if(Me==="MULTIPLE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(ye,{ref:Rt,editData:$,isEdit:!0}),d.a.createElement(le.a,null));if(Me==="JUDGMENT")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Ae,{ref:Rt,editData:$,isEdit:!0}),d.a.createElement(le.a,null));if(Me==="COMPLETION")return d.a.createElement(d.a.Fragment,null,d.a.createElement(ut,{ref:Rt,editData:$,isEdit:!0}),d.a.createElement(le.a,null));if(Me==="SUBJECTIVE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(ht,{ref:Rt,editData:$,isEdit:!0}),d.a.createElement(le.a,null));if(Me==="COMBINATION")return d.a.createElement(d.a.Fragment,null,d.a.createElement(dt,{ref:Rt,editData:$,isEdit:!0}),d.a.createElement(le.a,null));if(Me==="PROGRAM"){var gt;R.d.push("/problems/".concat($==null||((gt=$.program_attr)===null||gt===void 0)?void 0:gt.identifier,"/edit?type=exercises&express_id=").concat(Xt.categoryId,"&question_id=").concat($==null?void 0:$.id,"&score=").concat($==null?void 0:$.score,"&callback_url=").concat(location.pathname,"&select=").concat(yt,"&exercise=true"))}},Lr=function(){var Ye=Object(I.a)(Y.a.mark(function $(Me,gt){var at,et,Ot,Vt,Zt,$t,on,Rn,hn,En;return Y.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,(at=Rt.current)===null||at===void 0?void 0:at.onSave();case 2:if(et=xn.sent,et){xn.next=5;break}return xn.abrupt("return");case 5:return Ot={question_score:gt.score,analysis:et.analysis},console.log(et,"editorData"),(Me==="SINGLE"||Me==="MULTIPLE"||Me==="JUDGMENT")&&(Zt=[],$t=[],Ot.question_type=Me==="JUDGMENT"?2:1,Ot.question_title=et==null?void 0:et.name,et==null||((Vt=et.choices)===null||Vt===void 0)||Vt.forEach(function(cn,tr){Zt.push(cn.choice_text),cn!=null&&cn.is_answer&&$t.push(tr+1)}),Ot.question_choices=Zt,Ot.standard_answers=$t),Me==="COMPLETION"&&(Ot.is_ordered=et.is_ordered,Ot.question_title=et==null?void 0:et.name,Ot.question_type=3,Rn=[],et==null||((on=et.standard_answers)===null||on===void 0)||on.forEach(function(cn,tr){Rn.push({choice_id:cn.position,answer_text:cn.answer_text})}),Ot.standard_answers=Rn),Me==="SUBJECTIVE"&&(Ot.question_title=et==null?void 0:et.name,Ot.question_type=3,Ot.standard_answers=et==null?void 0:et.answer_texts),Me==="COMBINATION"&&(Ot.question_title=et==null?void 0:et.name,Ot.question_type=7,Ot.sub_questions=et==null||((hn=et.sub_item_banks)===null||hn===void 0)?void 0:hn.map(function(cn,tr){return{id:cn.id,question_title:cn.name,question_type:1,question_choices:cn.choices.map(function(Kn){return Kn.choice_text}),standard_answers:[cn.choices.findIndex(function(Kn){return Kn.is_answer})+1],analysis:cn.analysis}}),delete Ot.analysis),xn.next=13,Object(_.a)("/api/exercise_questions/".concat(gt.id,".json"),{method:"put",body:Ot});case 13:En=xn.sent,(En==null?void 0:En.status)===0&&(j.b.success("\u7F16\u8F91\u6210\u529F"),ir(yt+1)),rt(null);case 16:case"end":return xn.stop()}},$)}));return function(Me,gt){return Ye.apply(this,arguments)}}(),br=function(){for(var $=[],Me=0;Me<(ie==null||((gt=ie.exam)===null||gt===void 0)?void 0:gt.total_num);Me++){var gt;$.push({})}return $};console.log(br(),"data");var On=ie==null||((w=ie.questionList)===null||w===void 0)?void 0:w.reduce(function(Ye,$){return Ye+$.questions_score},0),er=qe&&(ie==null||((E=ie.exam)===null||E===void 0)?void 0:E.exercise_status)!==1;return d.a.createElement("section",{className:U.a.wrap},d.a.createElement("div",{id:"id_left_preview",className:U.a.left,onMouseEnter:function($){var Me=document.getElementById("id_left_preview");Me.style.overflowY="auto"},onMouseLeave:function($){var Me=document.getElementById("id_left_preview");Me.style.overflowY="hidden"}},d.a.createElement("div",{className:U.a.title},d.a.createElement("div",null,d.a.createElement("b",null),d.a.createElement("span",null,"\u7B54\u9898\u5361"))),d.a.createElement("div",{className:U.a.total},d.a.createElement("div",null,d.a.createElement("img",{src:te.a}),d.a.createElement("span",null,"\u9898\u6570(\u9053)"),d.a.createElement("aside",null,ie==null?void 0:ie.all_questions_count)),d.a.createElement("div",{className:"mr30 ml30"},d.a.createElement("img",{src:fe.a}),d.a.createElement("span",null,"\u603B\u5206(\u5206)"),d.a.createElement("aside",null,On)),d.a.createElement("div",null,d.a.createElement("img",{src:S.a}),d.a.createElement("span",null,"\u65F6\u957F(\u5206)"),d.a.createElement("aside",null,ie==null||((f=ie.exam)===null||f===void 0)?void 0:f.time))),ie==null||((h=ie.questionList)===null||h===void 0)?void 0:h.map(function(Ye,$){var Me;return d.a.createElement("div",{className:U.a.list,key:$},d.a.createElement("div",{className:U.a.name},d.a.createElement("b",null),d.a.createElement("span",null,Ye.name)),d.a.createElement("aside",null,d.a.createElement("div",null,"\u5171",d.a.createElement("span",{className:U.a.b},Ye.questions_count),"\u9898 ",d.a.createElement("span",{className:U.a.l},"|"),"\u5171",d.a.createElement("span",{className:U.a.r},Ye.questions_score),"\u5206"),d.a.createElement("div",{className:U.a.answerSheet},Ye==null||((Me=Ye.questions)===null||Me===void 0)?void 0:Me.map(function(gt,at){return d.a.createElement("div",{onClick:function(){var Ot="Anchor_".concat(gt.id),Vt=document.getElementById(Ot);Vt&&setTimeout(function(){return Vt.scrollIntoView({block:"center",behavior:"smooth"})})},key:gt.id,className:U.a.tag},at+1)}))))})),d.a.createElement("div",{className:U.a.right},d.a.createElement("div",{className:U.a.examName,id:"examName"},d.a.createElement("div",{className:U.a.name},d.a.createElement(ge.a,{title:ie==null||((v=ie.exam)===null||v===void 0)?void 0:v.name,getPopupContainer:function($){return $.parentNode}},d.a.createElement("span",{className:U.a.t},ie==null||((b=ie.exam)===null||b===void 0)?void 0:b.name))),qe?d.a.createElement(we.a,{showTotal:function($){return d.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"\u5171\u8BA1",d.a.createElement("span",{className:"c-light-primary"},$),"\u4EFD\u8BD5\u5377")},total:ie==null||((W=ie.exam)===null||W===void 0)?void 0:W.total_num,pageSize:1,current:yt+1,showSizeChanger:!1,onChange:ir,showQuickJumper:!0,hideOnSinglePage:!1}):d.a.createElement(ne.a,{onClick:Ct,type:"primary"},"\u968F\u673A\u66F4\u6362")),d.a.createElement("div",{className:U.a.topWarp},ie==null||((Z=ie.questionList)===null||Z===void 0)?void 0:Z.map(function(Ye,$){var Me,gt;return d.a.createElement(d.a.Fragment,{key:$},d.a.createElement("div",{className:U.a.head,style:$===0?{border:0,marginTop:-16}:{}},d.a.createElement("div",{className:U.a.name},d.a.createElement("b",null),d.a.createElement("span",null,Ye.name)),d.a.createElement("div",{className:U.a.so},"\u5171",d.a.createElement("span",{className:U.a.b},Ye.questions_count," "),"\u9898 ",Ye.type==="COMBINATION"&&"\uFF08\u5305\u542B".concat(Ye==null||((Me=Ye.questions)===null||Me===void 0)?void 0:Me.map(function(at){var et;return at==null||((et=at.sub_item_banks)===null||et===void 0)?void 0:et.length}).reduce(function(at,et){return at+et}),"\u5C0F\u9898\uFF09"),d.a.createElement("span",{className:U.a.l},"|"),"\u5171",d.a.createElement("span",{className:U.a.r},Ye.questions_score),"\u5206"),!qe&&d.a.createElement("div",{className:U.a.btn},d.a.createElement(ne.a,{onClick:function(){Yt(Ye)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),d.a.createElement(ne.a,{onClick:function(){return Bn(Ye)},type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),Ye==null||((gt=Ye.questions)===null||gt===void 0)?void 0:gt.map(function(at,et){return pt===at.id?d.a.createElement("div",{id:"Anchor_".concat(at.id),className:U.a.content,style:{padding:0,marginTop:10},key:at.id},d.a.createElement("div",{style:{float:"right",marginTop:-6}},d.a.createElement(ne.a,{onClick:function(){return rt(null)},className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),d.a.createElement(ne.a,{onClick:function(){return Lr(Ye==null?void 0:Ye.type,at)},type:"primary"},"\u4FDD\u5B58")),Ln(at,Ye.type)):d.a.createElement("div",{id:"Anchor_".concat(at.id),className:U.a.content,key:at.id},d.a.createElement("div",{className:U.a.titleWrap},d.a.createElement(p.a,{style:{paddingRight:10},className:U.a.titleHtml,value:et+1+"\u3001"+"".concat((at==null?void 0:at.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+at.name}),qe&&d.a.createElement(ne.a,{disabled:er,onClick:function(){if(pt){j.b.warn("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}rt(at.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),d.a.createElement(ne.a,{disabled:er,onClick:function(){return nn(at.id,Ye.type,et,Ye)},type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Ye.type==="SINGLE"||Ye.type==="JUDGMENT"||Ye.type==="MULTIPLE")&&un(at),Ye.type==="COMPLETION"&&Hn(at),Ye.type==="SUBJECTIVE"&&Xn(at),Ye.type==="PROGRAM"&&Ce(at),Ye.type==="COMBINATION"&&We(at,et),d.a.createElement("div",null))}))})),d.a.createElement("div",{className:U.a.btnsElse,id:"preview_btns_else"},qe?An():or()),d.a.createElement("div",{className:U.a.btnsWrap,id:"preview_btns"},d.a.createElement("div",{className:U.a.btns},qe?An():or()))))},he=Ke.a=$e},vHTk:function(mt,Ke,m){mt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);
|