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

117 lines
501 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[165,7,9],{"+NIl":function(Ge,je,l){(function(G){G(l("VrN/"))})(function(G){"use strict";G.defineMode("stex",function(we,re){"use strict";function Se(z,M){z.cmdState.push(M)}function xe(z){return z.cmdState.length>0?z.cmdState[z.cmdState.length-1]:null}function fe(z){var M=z.cmdState.pop();M&&M.closeBracket()}function $(z){for(var M=z.cmdState,N=M.length-1;N>=0;N--){var D=M[N];if(D.name=="DEFAULT")continue;return D}return{styleIdentifier:function(){return null}}}function S(z,M,N){return function(){this.name=z,this.bracketNo=0,this.style=M,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 y={};y.importmodule=S("importmodule","tag",["string","builtin"]),y.documentclass=S("documentclass","tag",["","atom"]),y.usepackage=S("usepackage","tag",["atom"]),y.begin=S("begin","tag",["atom"]),y.end=S("end","tag",["atom"]),y.label=S("label","tag",["atom"]),y.ref=S("ref","tag",["atom"]),y.eqref=S("eqref","tag",["atom"]),y.cite=S("cite","tag",["atom"]),y.bibitem=S("bibitem","tag",["atom"]),y.Bibitem=S("Bibitem","tag",["atom"]),y.RBibitem=S("RBibitem","tag",["atom"]),y.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function W(z,M){z.f=M}function Y(z,M){var N;if(z.match(/^\\[a-zA-Z@]+/)){var D=z.current().slice(1);return N=y.hasOwnProperty(D)?y[D]:y.DEFAULT,N=new N,Se(M,N),W(M,oe),N.style}if(z.match(/^\\[$&%#{}_]/))return"tag";if(z.match(/^\\[,;!\/\\]/))return"tag";if(z.match("\\["))return W(M,function(h,te){return q(h,te,"\\]")}),"keyword";if(z.match("\\("))return W(M,function(h,te){return q(h,te,"\\)")}),"keyword";if(z.match("$$"))return W(M,function(h,te){return q(h,te,"$$")}),"keyword";if(z.match("$"))return W(M,function(h,te){return q(h,te,"$")}),"keyword";var K=z.next();if(K=="%")return z.skipToEnd(),"comment";if(K=="}"||K=="]"){if(N=xe(M),N)N.closeBracket(K),W(M,oe);else return"error";return"bracket"}else return K=="{"||K=="["?(N=y.DEFAULT,N=new N,Se(M,N),"bracket"):/\d/.test(K)?(z.eatWhile(/[\w.%]/),"atom"):(z.eatWhile(/[\w\-_]/),N=$(M),N.name=="begin"&&(N.argument=z.current()),N.styleIdentifier())}function q(z,M,N){if(z.eatSpace())return null;if(N&&z.match(N))return W(M,Y),"keyword";if(z.match(/^\\[a-zA-Z@]+/))return"tag";if(z.match(/^[a-zA-Z]+/))return"variable-2";if(z.match(/^\\[$&%#{}_]/))return"tag";if(z.match(/^\\[,;!\/]/))return"tag";if(z.match(/^[\^_&]/))return"tag";if(z.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(z.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var D=z.next();return D=="{"||D=="}"||D=="["||D=="]"||D=="("||D==")"?"bracket":D=="%"?(z.skipToEnd(),"comment"):"error"}function oe(z,M){var N=z.peek(),D;return N=="{"||N=="["?(D=xe(M),D.openBracket(N),z.eat(N),W(M,Y),"bracket"):/[ \t\r]/.test(N)?(z.eat(N),null):(W(M,Y),fe(M),Y(z,M))}return{startState:function(){var z=re.inMathMode?function(M,N){return q(M,N)}:Y;return{cmdState:[],f:z}},copyState:function(z){return{cmdState:z.cmdState.slice(),f:z.f}},token:function(z,M){return M.f(z,M)},blankLine:function(z){z.f=Y,z.cmdState.length=0},lineComment:"%"}}),G.defineMIME("text/x-stex","stex"),G.defineMIME("text/x-latex","stex")})},"+RXH":function(Ge,je,l){Ge.exports=l.p+"static/shu.a39bf729.svg"},"+yhJ":function(Ge,je,l){Ge.exports=l.p+"static/xixi.d492fb65.svg"},"0eGx":function(Ge,je,l){Ge.exports=l.p+"static/zhong.c1924b73.svg"},"19Vz":function(Ge,je,l){(function(G){G(l("VrN/"))})(function(G){G.defineOption("placeholder","",function(S,y,W){var Y=W&&W!=G.Init;if(y&&!Y)S.on("blur",xe),S.on("change",fe),S.on("swapDoc",fe),G.on(S.getInputField(),"compositionupdate",S.state.placeholderCompose=function(){Se(S)}),fe(S);else if(!y&&Y){S.off("blur",xe),S.off("change",fe),S.off("swapDoc",fe),G.off(S.getInputField(),"compositionupdate",S.state.placeholderCompose),we(S);var q=S.getWrapperElement();q.className=q.className.replace(" CodeMirror-empty","")}y&&!S.hasFocus()&&xe(S)});function we(S){S.state.placeholder&&(S.state.placeholder.parentNode.removeChild(S.state.placeholder),S.state.placeholder=null)}function re(S){we(S);var y=S.state.placeholder=document.createElement("pre");y.style.cssText="height: 0; overflow: visible",y.style.direction=S.getOption("direction"),y.className="CodeMirror-placeholder CodeMirror-line-like";var W=S.getOption("placeholder");typeof W=="string"&&(W=document.createTextNode(W)),y.appendChild(W),S.display.lineSpace.insertBefore(y,S.display.lineSpace.firstChild)}function Se(S){setTimeout(function(){var y=!1,W=S.getInputField();W.nodeName=="TEXTAREA"?y=!W.value:S.lineCount()==1&&(y=!/[^\u200b]/.test(W.querySelector(".CodeMirror-line").textContent)),y?re(S):we(S)},20)}function xe(S){$(S)&&re(S)}function fe(S){var y=S.getWrapperElement(),W=$(S);y.className=y.className.replace(" CodeMirror-empty","")+(W?" CodeMirror-empty":""),W?re(S):we(S)}function $(S){return S.lineCount()===1&&S.getLine(0)===""}})},"1eCo":function(Ge,je,l){(function(G){G(l("VrN/"))})(function(G){"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},re={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};G.defineMode("xml",function(Se,xe){var fe=Se.indentUnit,$={},S=xe.htmlMode?we:re;for(var y in S)$[y]=S[y];for(var y in xe)$[y]=xe[y];var W,Y;function q(m,L){function P(ue){return L.tokenize=ue,ue(m,L)}var _=m.next();if(_=="<")return m.eat("!")?m.eat("[")?m.match("CDATA[")?P(M("atom","]]>")):null:m.match("--")?P(M("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),P(N(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),L.tokenize=M("meta","?>"),"meta"):(W=m.eat("/")?"closeTag":"openTag",L.tokenize=oe,"tag bracket");if(_=="&"){var F;return m.eat("#")?m.eat("x")?F=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):F=m.eatWhile(/[\d]/)&&m.eat(";"):F=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),F?"atom":"error"}else return m.eatWhile(/[^&<]/),null}q.isInText=!0;function oe(m,L){var P=m.next();if(P==">"||P=="/"&&m.eat(">"))return L.tokenize=q,W=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return W="equals",null;if(P=="<"){L.tokenize=q,L.state=te,L.tagName=L.tagStart=null;var _=L.tokenize(m,L);return _?_+" tag error":"tag error"}else return/[\'\"]/.test(P)?(L.tokenize=z(P),L.stringStartCol=m.column(),L.tokenize(m,L)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function z(m){var L=function(P,_){for(;!P.eol();)if(P.next()==m){_.tokenize=oe;break}return"string"};return L.isInAttribute=!0,L}function M(m,L){return function(P,_){for(;!P.eol();){if(P.match(L)){_.tokenize=q;break}P.next()}return m}}function N(m){return function(L,P){for(var _;(_=L.next())!=null;){if(_=="<")return P.tokenize=N(m+1),P.tokenize(L,P);if(_==">")if(m==1){P.tokenize=q;break}else return P.tokenize=N(m-1),P.tokenize(L,P)}return"meta"}}function D(m,L,P){this.prev=m.context,this.tagName=L,this.indent=m.indented,this.startOfLine=P,($.doNotIndent.hasOwnProperty(L)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function K(m){m.context&&(m.context=m.context.prev)}function h(m,L){for(var P;;){if(!m.context)return;if(P=m.context.tagName,!$.contextGrabbers.hasOwnProperty(P)||!$.contextGrabbers[P].hasOwnProperty(L))return;K(m)}}function te(m,L,P){return m=="openTag"?(P.tagStart=L.column(),he):m=="closeTag"?Z:te}function he(m,L,P){return m=="word"?(P.tagName=L.current(),Y="tag",V):$.allowMissingTagName&&m=="endTag"?(Y="tag bracket",V(m,L,P)):(Y="error",he)}function Z(m,L,P){if(m=="word"){var _=L.current();return P.context&&P.context.tagName!=_&&$.implicitlyClosed.hasOwnProperty(P.context.tagName)&&K(P),P.context&&P.context.tagName==_||$.matchClosing===!1?(Y="tag",I):(Y="tag error",d)}else return $.allowMissingTagName&&m=="endTag"?(Y="tag bracket",I(m,L,P)):(Y="error",d)}function I(m,L,P){return m!="endTag"?(Y="error",I):(K(P),te)}function d(m,L,P){return Y="error",I(m,L,P)}function V(m,L,P){if(m=="word")return Y="attribute",b;if(m=="endTag"||m=="selfcloseTag"){var _=P.tagName,F=P.tagStart;return P.tagName=P.tagStart=null,m=="selfcloseTag"||$.autoSelfClosers.hasOwnProperty(_)?h(P,_):(h(P,_),P.context=new D(P,_,F==P.indented)),te}return Y="error",V}function b(m,L,P){return m=="equals"?j:($.allowMissing||(Y="error"),V(m,L,P))}function j(m,L,P){return m=="string"?v:m=="word"&&$.allowUnquoted?(Y="string",V):(Y="error",V(m,L,P))}function v(m,L,P){return m=="string"?v:V(m,L,P)}return{startState:function(m){var L={tokenize:q,state:te,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(L.baseIndent=m),L},token:function(m,L){if(!L.tagName&&m.sol()&&(L.indented=m.indentation()),m.eatSpace())return null;W=null;var P=L.tokenize(m,L);return(P||W)&&P!="comment"&&(Y=null,L.state=L.state(W||P,m,L),Y&&(P=Y=="error"?P+" error":Y)),P},indent:function(m,L,P){var _=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+fe;if(_&&_.noIndent)return G.Pass;if(m.tokenize!=oe&&m.tokenize!=q)return P?P.match(/^(\s*)/)[0].length:0;if(m.tagName)return $.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+fe*($.multilineTagIndentFactor||1);if($.alignCDATA&&/<!\[CDATA\[/.test(L))return 0;var F=L&&/^<(\/)?([\w_:\.-]*)/.exec(L);if(F&&F[1])for(;_;)if(_.tagName==F[2]){_=_.prev;break}else if($.implicitlyClosed.hasOwnProperty(_.tagName))_=_.prev;else break;else if(F)for(;_;){var ue=$.contextGrabbers[_.tagName];if(ue&&ue.hasOwnProperty(F[2]))_=_.prev;else break}for(;_&&_.prev&&!_.startOfLine;)_=_.prev;return _?_.indent+fe:m.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:$.htmlMode?"html":"xml",helperType:$.htmlMode?"html":"xml",skipAttribute:function(m){m.state==j&&(m.state=V)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var L=[],P=m.context;P;P=P.prev)P.tagName&&L.push(P.tagName);return L.reverse()}}}),G.defineMIME("text/xml","xml"),G.defineMIME("application/xml","xml"),G.mimeModes.hasOwnProperty("text/html")||G.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"2sxD":function(Ge,je,l){Ge.exports={list:"list___3_VOx",head:"head___37dUf",name:"name___1VbnU",right:"right___gDdSx",body:"body___1wO_8",top:"top___cjRoo",bottom:"bottom___O44ku",l:"l___3de2t",ListGroup:"ListGroup___22jzr",a:"a___3Rx6Z",b:"b___S9Ybp",c:"c___3CVXw",c1:"c1___3b8Zq",radio:"radio___LnwQZ",d:"d___2-cs-"}},"51dB":function(Ge,je,l){Ge.exports=l.p+"static/sc.c1696770.svg"},"5MlY":function(Ge,je,l){Ge.exports=l.p+"static/sm.8ccb50bf.svg"},"6+eU":function(Ge,je,l){"use strict";l.d(je,"a",function(){return I});var G=l("wx14"),we=l("rePB"),re=l("VTBJ"),Se=l("1OyB"),xe=l("vuIU"),fe=l("Ji7U"),$=l("LK+K"),S=l("cDcd"),y=l.n(S),W=l("TSYQ"),Y=l.n(W),q=function(V){var b,j="".concat(V.rootPrefixCls,"-item"),v=Y()(j,"".concat(j,"-").concat(V.page),(b={},Object(we.a)(b,"".concat(j,"-active"),V.active),Object(we.a)(b,V.className,!!V.className),Object(we.a)(b,"".concat(j,"-disabled"),!V.page),b)),m=function(){V.onClick(V.page)},L=function(_){V.onKeyPress(_,V.onClick,V.page)};return y.a.createElement("li",{title:V.showTitle?V.page:null,className:v,onClick:m,onKeyPress:L,tabIndex:"0"},V.itemRender(V.page,"page",y.a.createElement("a",{rel:"nofollow"},V.page)))},oe=q,z={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},M=function(d){Object(fe.a)(b,d);var V=Object($.a)(b);function b(){var j;Object(Se.a)(this,b);for(var v=arguments.length,m=new Array(v),L=0;L<v;L++)m[L]=arguments[L];return j=V.call.apply(V,[this].concat(m)),j.state={goInputText:""},j.buildOptionText=function(P){return"".concat(P," ").concat(j.props.locale.items_per_page)},j.changeSize=function(P){j.props.changeSize(Number(P))},j.handleChange=function(P){j.setState({goInputText:P.target.value})},j.handleBlur=function(P){var _=j.props,F=_.goButton,ue=_.quickGo,Q=_.rootPrefixCls,ye=j.state.goInputText;if(F||ye==="")return;if(P.relatedTarget&&(P.relatedTarget.className.indexOf("".concat(Q,"-prev"))>=0||P.relatedTarget.className.indexOf("".concat(Q,"-next"))>=0))return;j.setState({goInputText:""}),ue(j.getValidValue())},j.go=function(P){var _=j.state.goInputText;if(_==="")return;(P.keyCode===z.ENTER||P.type==="click")&&(j.setState({goInputText:""}),j.props.quickGo(j.getValidValue()))},j}return Object(xe.a)(b,[{key:"getValidValue",value:function(){var v=this.state,m=v.goInputText,L=v.current;return!m||isNaN(m)?L:Number(m)}},{key:"getPageSizeOptions",value:function(){var v=this.props,m=v.pageSize,L=v.pageSizeOptions;return L.some(function(P){return P.toString()===m.toString()})?L:L.concat([m.toString()]).sort(function(P,_){var F=isNaN(Number(P))?0:Number(P),ue=isNaN(Number(_))?0:Number(_);return F-ue})}},{key:"render",value:function(){var v=this,m=this.props,L=m.pageSize,P=m.locale,_=m.rootPrefixCls,F=m.changeSize,ue=m.quickGo,Q=m.goButton,ye=m.selectComponentClass,R=m.buildOptionText,c=m.selectPrefixCls,X=m.disabled,ge=this.state.goInputText,pe="".concat(_,"-options"),Oe=ye,me=null,de=null,H=null;if(!F&&!ue)return null;var A=this.getPageSizeOptions();if(F&&Oe){var ee=A.map(function(O,x){return y.a.createElement(Oe.Option,{key:x,value:O.toString()},(R||v.buildOptionText)(O))});me=y.a.createElement(Oe,{disabled:X,prefixCls:c,showSearch:!1,className:"".concat(pe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(L||A[0]).toString(),onChange:this.changeSize,getPopupContainer:function(x){return x.parentNode}},ee)}return ue&&(Q&&(H=typeof Q=="boolean"?y.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(pe,"-quick-jumper-button")},P.jump_to_confirm):y.a.createElement("span",{onClick:this.go,onKeyUp:this.go},Q)),de=y.a.createElement("div",{className:"".concat(pe,"-quick-jumper")},P.jump_to,y.a.createElement("input",{disabled:X,type:"text",value:ge,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),P.page,H)),y.a.createElement("li",{className:"".concat(pe)},me,de)}}]),b}(y.a.Component);M.defaultProps={pageSizeOptions:["10","20","50","100"]};var N=M,D=l("N2Kk");function K(){}function h(d){return typeof d=="number"&&isFinite(d)&&Math.floor(d)===d}function te(d,V,b){return b}function he(d,V,b){var j=typeof d=="undefined"?V.pageSize:d;return Math.floor((b.total-1)/j)+1}var Z=function(d){Object(fe.a)(b,d);var V=Object($.a)(b);function b(j){var v;Object(Se.a)(this,b),v=V.call(this,j),v.getJumpPrevPage=function(){return Math.max(1,v.state.current-(v.props.showLessItems?3:5))},v.getJumpNextPage=function(){return Math.min(he(void 0,v.state,v.props),v.state.current+(v.props.showLessItems?3:5))},v.getItemIcon=function(F,ue){var Q=v.props.prefixCls,ye=F||y.a.createElement("button",{type:"button","aria-label":ue,className:"".concat(Q,"-item-link")});return typeof F=="function"&&(ye=y.a.createElement(F,Object(re.a)({},v.props))),ye},v.savePaginationNode=function(F){v.paginationNode=F},v.isValid=function(F){return h(F)&&F!==v.state.current},v.shouldDisplayQuickJumper=function(){var F=v.props,ue=F.showQuickJumper,Q=F.pageSize,ye=F.total;return ye<=Q?!1:ue},v.handleKeyDown=function(F){(F.keyCode===z.ARROW_UP||F.keyCode===z.ARROW_DOWN)&&F.preventDefault()},v.handleKeyUp=function(F){var ue=v.getValidValue(F),Q=v.state.currentInputValue;ue!==Q&&v.setState({currentInputValue:ue}),F.keyCode===z.ENTER?v.handleChange(ue):F.keyCode===z.ARROW_UP?v.handleChange(ue-1):F.keyCode===z.ARROW_DOWN&&v.handleChange(ue+1)},v.changePageSize=function(F){var ue=v.state.current,Q=he(F,v.state,v.props);ue=ue>Q?Q:ue,Q===0&&(ue=v.state.current),typeof F=="number"&&("pageSize"in v.props||v.setState({pageSize:F}),"current"in v.props||v.setState({current:ue,currentInputValue:ue})),v.props.onShowSizeChange(ue,F),"onChange"in v.props&&v.props.onChange&&v.props.onChange(ue,F)},v.handleChange=function(F){var ue=v.props.disabled,Q=F;if(v.isValid(Q)&&!ue){var ye=he(void 0,v.state,v.props);Q>ye?Q=ye:Q<1&&(Q=1),"current"in v.props||v.setState({current:Q,currentInputValue:Q});var R=v.state.pageSize;return v.props.onChange(Q,R),Q}return v.state.current},v.prev=function(){v.hasPrev()&&v.handleChange(v.state.current-1)},v.next=function(){v.hasNext()&&v.handleChange(v.state.current+1)},v.jumpPrev=function(){v.handleChange(v.getJumpPrevPage())},v.jumpNext=function(){v.handleChange(v.getJumpNextPage())},v.hasPrev=function(){return v.state.current>1},v.hasNext=function(){return v.state.current<he(void 0,v.state,v.props)},v.runIfEnter=function(F,ue){if(F.key==="Enter"||F.charCode===13){for(var Q=arguments.length,ye=new Array(Q>2?Q-2:0),R=2;R<Q;R++)ye[R-2]=arguments[R];ue.apply(void 0,ye)}},v.runIfEnterPrev=function(F){v.runIfEnter(F,v.prev)},v.runIfEnterNext=function(F){v.runIfEnter(F,v.next)},v.runIfEnterJumpPrev=function(F){v.runIfEnter(F,v.jumpPrev)},v.runIfEnterJumpNext=function(F){v.runIfEnter(F,v.jumpNext)},v.handleGoTO=function(F){(F.keyCode===z.ENTER||F.type==="click")&&v.handleChange(v.state.currentInputValue)};var m=j.onChange!==K,L="current"in j;L&&!m&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var P=j.defaultCurrent;"current"in j&&(P=j.current);var _=j.defaultPageSize;return"pageSize"in j&&(_=j.pageSize),P=Math.min(P,he(_,void 0,j)),v.state={current:P,currentInputValue:P,pageSize:_},v}return Object(xe.a)(b,[{key:"componentDidUpdate",value:function(v,m){var L=this.props.prefixCls;if(m.current!==this.state.current&&this.paginationNode){var P=this.paginationNode.querySelector(".".concat(L,"-item-").concat(m.current));P&&document.activeElement===P&&P.blur()}}},{key:"getValidValue",value:function(v){var m=v.target.value,L=he(void 0,this.state,this.props),P=this.state.currentInputValue,_;return m===""?_=m:isNaN(Number(m))?_=P:m>=L?_=L:_=Number(m),_}},{key:"getShowSizeChanger",value:function(){var v=this.props,m=v.showSizeChanger,L=v.total,P=v.totalBoundaryShowSizeChanger;return typeof m!="undefined"?m:L>P}},{key:"renderPrev",value:function(v){var m=this.props,L=m.prevIcon,P=m.itemRender,_=P(v,"prev",this.getItemIcon(L,"prev page")),F=!this.hasPrev();return Object(S.isValidElement)(_)?Object(S.cloneElement)(_,{disabled:F}):_}},{key:"renderNext",value:function(v){var m=this.props,L=m.nextIcon,P=m.itemRender,_=P(v,"next",this.getItemIcon(L,"next page")),F=!this.hasNext();return Object(S.isValidElement)(_)?Object(S.cloneElement)(_,{disabled:F}):_}},{key:"render",value:function(){var v=this,m=this.props,L=m.prefixCls,P=m.className,_=m.style,F=m.disabled,ue=m.hideOnSinglePage,Q=m.total,ye=m.locale,R=m.showQuickJumper,c=m.showLessItems,X=m.showTitle,ge=m.showTotal,pe=m.simple,Oe=m.itemRender,me=m.showPrevNextJumpers,de=m.jumpPrevIcon,H=m.jumpNextIcon,A=m.selectComponentClass,ee=m.selectPrefixCls,O=m.pageSizeOptions,x=this.state,ie=x.current,Pe=x.pageSize,Fe=x.currentInputValue;if(ue===!0&&Q<=Pe)return null;var be=he(void 0,this.state,this.props),Ae=[],ve=null,Ee=null,Ne=null,Be=null,Je=null,Me=R&&R.goButton,Ce=c?1:2,lt=ie-1>0?ie-1:0,at=ie+1<be?ie+1:be,pt=Object.keys(this.props).reduce(function(p,g){return(g.substr(0,5)==="data-"||g.substr(0,5)==="aria-"||g==="role")&&(p[g]=v.props[g]),p},{});if(pe)return Me&&(typeof Me=="boolean"?Je=y.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ye.jump_to_confirm):Je=y.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Me),Je=y.a.createElement("li",{title:X?"".concat(ye.jump_to).concat(ie,"/").concat(be):null,className:"".concat(L,"-simple-pager")},Je)),y.a.createElement("ul",Object(G.a)({className:Y()(L,"".concat(L,"-simple"),Object(we.a)({},"".concat(L,"-disabled"),F),P),style:_,ref:this.savePaginationNode},pt),y.a.createElement("li",{title:X?ye.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:Y()("".concat(L,"-prev"),Object(we.a)({},"".concat(L,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(lt)),y.a.createElement("li",{title:X?"".concat(ie,"/").concat(be):null,className:"".concat(L,"-simple-pager")},y.a.createElement("input",{type:"text",value:Fe,disabled:F,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),y.a.createElement("span",{className:"".concat(L,"-slash")},"/"),be),y.a.createElement("li",{title:X?ye.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:Y()("".concat(L,"-next"),Object(we.a)({},"".concat(L,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(at)),Je);if(be<=3+Ce*2){var et={locale:ye,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:Oe};be||Ae.push(y.a.createElement(oe,Object(G.a)({},et,{key:"noPager",page:be,className:"".concat(L,"-disabled")})));for(var _t=1;_t<=be;_t+=1){var vt=ie===_t;Ae.push(y.a.createElement(oe,Object(G.a)({},et,{key:_t,page:_t,active:vt})))}}else{var ht=c?ye.prev_3:ye.prev_5,Re=c?ye.next_3:ye.next_5;me&&(ve=y.a.createElement("li",{title:X?ht:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:Y()("".concat(L,"-jump-prev"),Object(we.a)({},"".concat(L,"-jump-prev-custom-icon"),!!de))},Oe(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(de,"prev page"))),Ee=y.a.createElement("li",{title:X?Re:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:Y()("".concat(L,"-jump-next"),Object(we.a)({},"".concat(L,"-jump-next-custom-icon"),!!H))},Oe(this.getJumpNextPage(),"jump-next",this.getItemIcon(H,"next page")))),Be=y.a.createElement(oe,{locale:ye,last:!0,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:be,page:be,active:!1,showTitle:X,itemRender:Oe}),Ne=y.a.createElement(oe,{locale:ye,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:Oe});var wt=Math.max(1,ie-Ce),mt=Math.min(ie+Ce,be);ie-1<=Ce&&(mt=1+Ce*2),be-ie<=Ce&&(wt=be-Ce*2);for(var ke=wt;ke<=mt;ke+=1){var Ue=ie===ke;Ae.push(y.a.createElement(oe,{locale:ye,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ke,page:ke,active:Ue,showTitle:X,itemRender:Oe}))}ie-1>=Ce*2&&ie!==1+2&&(Ae[0]=Object(S.cloneElement)(Ae[0],{className:"".concat(L,"-item-after-jump-prev")}),Ae.unshift(ve)),be-ie>=Ce*2&&ie!==be-2&&(Ae[Ae.length-1]=Object(S.cloneElement)(Ae[Ae.length-1],{className:"".concat(L,"-item-before-jump-next")}),Ae.push(Ee)),wt!==1&&Ae.unshift(Ne),mt!==be&&Ae.push(Be)}var E=null;ge&&(E=y.a.createElement("li",{className:"".concat(L,"-total-text")},ge(Q,[Q===0?0:(ie-1)*Pe+1,ie*Pe>Q?Q:ie*Pe])));var T=!this.hasPrev()||!be,k=!this.hasNext()||!be;return y.a.createElement("ul",Object(G.a)({className:Y()(L,P,Object(we.a)({},"".concat(L,"-disabled"),F)),style:_,unselectable:"unselectable",ref:this.savePaginationNode},pt),E,y.a.createElement("li",{title:X?ye.prev_page:null,onClick:this.prev,tabIndex:T?null:0,onKeyPress:this.runIfEnterPrev,className:Y()("".concat(L,"-prev"),Object(we.a)({},"".concat(L,"-disabled"),T)),"aria-disabled":T},this.renderPrev(lt)),Ae,y.a.createElement("li",{title:X?ye.next_page:null,onClick:this.next,tabIndex:k?null:0,onKeyPress:this.runIfEnterNext,className:Y()("".concat(L,"-next"),Object(we.a)({},"".concat(L,"-disabled"),k)),"aria-disabled":k},this.renderNext(at)),y.a.createElement(N,{disabled:F,locale:ye,rootPrefixCls:L,selectComponentClass:A,selectPrefixCls:ee,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ie,pageSize:Pe,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Me}))}}],[{key:"getDerivedStateFromProps",value:function(v,m){var L={};if("current"in v&&(L.current=v.current,v.current!==m.current&&(L.currentInputValue=L.current)),"pageSize"in v&&v.pageSize!==m.pageSize){var P=m.current,_=he(v.pageSize,m,v);P=P>_?_:P,"current"in v||(L.current=P,L.currentInputValue=P),L.pageSize=v.pageSize}return L}}]),b}(y.a.Component);Z.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:K,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:K,locale:D.a,style:{},itemRender:te,totalBoundaryShowSizeChanger:50};var I=Z},"6K3P":function(Ge,je,l){Ge.exports=l.p+"static/jinshi.9b74f304.svg"},"7ahc":function(Ge,je,l){"use strict";l.d(je,"a",function(){return he});var G=l("k1fw"),we=l("0Owb"),re=l("+L6B"),Se=l("2/Rp"),xe=l("y8nQ"),fe=l("Vl3Y"),$=l("tJVT"),S=l("OaEy"),y=l("2fM7"),W=l("cDcd"),Y=l.n(W),q=l("VrN/"),oe=l.n(q),z=l("p77/"),M=l.n(z),N=l("c5Ni"),D=l.n(N),K=y.a.Option,h={labelCol:{span:4},wrapperCol:{span:20}},te={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};je.b=function(Z){var I=Z.callback,d=Z.onCancel,V=Object(W.useState)("python"),b=Object($.a)(V,2),j=b[0],v=b[1];function m(P){v(te[P][1])}function L(P){I(P)}return Y.a.createElement(fe.a,Object(we.a)({},h,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:L}),Y.a.createElement(fe.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Y.a.createElement(y.a,{onChange:m},Object.keys(te).map(function(P){return Y.a.createElement(K,{key:P,value:P},te[P][0])}))),Y.a.createElement(fe.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Y.a.createElement(he,{mode:j})),Y.a.createElement("div",{className:"flex-container flex-end"},Y.a.createElement(Se.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Y.a.createElement(Se.a,{type:"ghost",onClick:d},"\u53D6\u6D88")))};function he(Z){var I=Z.value,d=Z.onChange,V=Z.mode,b=Z.options,j=b===void 0?{}:b,v=Object(W.useRef)(),m=Object(W.useState)(),L=Object($.a)(m,2),P=L[0],_=L[1];return Object(W.useEffect)(function(){if(P){function F(ue){var Q=ue.getValue();d&&d(Q)}return P.on("change",F),function(){P.off("change",F)}}},[P,d]),Object(W.useEffect)(function(){P&&P.setOption("mode",V)},[P,V]),Object(W.useEffect)(function(){P&&((I!==P.getValue()||I==="")&&setTimeout(function(){P.setValue(I||" ")},300))},[P,I]),Object(W.useEffect)(function(){if(v.current&&!P){var F=oe.a.fromTextArea(v.current,Object(G.a)({mode:V,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},j));_(F)}},[v.current,P]),Y.a.createElement("div",{className:"my-codemirror-container"},Y.a.createElement("textarea",{ref:v}))}},"7ixt":function(Ge,je,l){"use strict";l.d(je,"a",function(){return re});var G={adjustX:1,adjustY:1},we=[0,0],re={left:{points:["cr","cl"],overflow:G,offset:[-4,0],targetOffset:we},right:{points:["cl","cr"],overflow:G,offset:[4,0],targetOffset:we},top:{points:["bc","tc"],overflow:G,offset:[0,-4],targetOffset:we},bottom:{points:["tc","bc"],overflow:G,offset:[0,4],targetOffset:we},topLeft:{points:["bl","tl"],overflow:G,offset:[0,-4],targetOffset:we},leftTop:{points:["tr","tl"],overflow:G,offset:[-4,0],targetOffset:we},topRight:{points:["br","tr"],overflow:G,offset:[0,-4],targetOffset:we},rightTop:{points:["tl","tr"],overflow:G,offset:[4,0],targetOffset:we},bottomRight:{points:["tr","br"],overflow:G,offset:[0,4],targetOffset:we},rightBottom:{points:["bl","br"],overflow:G,offset:[4,0],targetOffset:we},bottomLeft:{points:["tl","bl"],overflow:G,offset:[0,4],targetOffset:we},leftBottom:{points:["br","bl"],overflow:G,offset:[-4,0],targetOffset:we}},Se=re},"7qnI":function(Ge,je,l){"use strict";var G=l("5Dmo"),we=l("3S7+"),re=l("fWQN"),Se=l("mtLc"),xe=l("yKVA"),fe=l("879j"),$=l("5NDa"),S=l("5rEg"),y=l("cDcd"),W=l.n(y),Y=l("O2Wb"),q=l.n(Y),oe=S.a.TextArea,z=function(M){Object(xe.a)(D,M);var N=Object(fe.a)(D);function D(){return Object(re.a)(this,D),N.apply(this,arguments)}return Object(Se.a)(D,[{key:"render",value:function(){var h=this,te=this.props,he=te.index,Z=te.onAnswerChange,I=te.addChildAnswer,d=te.exerciseIsPublish,V=te.answers,b=te.activeOptionErrorIndex,j=te.flex,v=j===void 0?"0 0 1000px":j;return W.a.createElement("div",{className:q.a.flex},W.a.createElement("div",{className:"".concat(q.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",he+1,"):"),W.a.createElement("div",{className:"".concat(q.a.flex," ").concat(q.a.flex1),style:{flexDirection:"column"}},V.map(function(m,L){var P="".concat(he,"-").concat(L);return W.a.createElement("div",{className:"".concat(q.a.flex," ").concat(q.a.flex1),key:L},W.a.createElement("div",{className:q.a.flex1,style:{flex:v}},W.a.createElement("div",null,W.a.createElement(oe,{className:P===b?q.a.error:"",spellCheck:!1,rows:4,value:m||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(L==0?"":"(\u53EF\u9009)"),onChange:function(F){return Z(he,L,F.target.value)},style:{minHeight:95}}))),!d&&W.a.createElement(W.a.Fragment,null,L!=0&&W.a.createElement(we.a,{title:"\u5220\u9664"},W.a.createElement("i",{className:"".concat(q.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return h.props.deleteChildAnswer(he,L)},style:{float:"right"}})),L===0&&W.a.createElement(we.a,{title:"\u5220\u9664"},W.a.createElement("i",{className:"".concat(q.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return h.props.deleteChildAnswermain(he,L)},style:{float:"right"}})),W.a.createElement(we.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},W.a.createElement("i",{className:"".concat(q.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return I(he)},style:{float:"right",visibility:L==V.length-1?"":"hidden"}}))))})))}}]),D}(y.Component);je.a=z},"815F":function(Ge,je,l){"use strict";l.d(je,"e",function(){return $}),l.d(je,"c",function(){return y}),l.d(je,"d",function(){return W}),l.d(je,"a",function(){return q}),l.d(je,"f",function(){return oe}),l.d(je,"b",function(){return z});var G=l("KQm4"),we=l("VTBJ"),re=l("Ff2n"),Se=l("Zm9Q"),xe=l("Kwbf"),fe=l("OZM5");function $(M,N){return M!=null?M:N}function S(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=new Map;function D(K){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(K||[]).forEach(function(te){var he=te.key,Z=te.children;Object(xe.a)(he!=null,"Tree node must have a certain key: [".concat(h).concat(he,"]"));var I=String(he);Object(xe.a)(!N.has(I)||he===null||he===void 0,"Same 'key' exist in the Tree: ".concat(I)),N.set(I,!0),D(Z,"".concat(h).concat(I," > "))})}D(M)}function y(M){function N(D){var K=Object(Se.a)(D);return K.map(function(h){if(!Object(fe.i)(h))return Object(xe.a)(!h,"Tree/TreeNode can only accept TreeNode as children."),null;var te=h.key,he=h.props,Z=he.children,I=Object(re.a)(he,["children"]),d=Object(we.a)({key:te},I),V=N(Z);return V.length&&(d.children=V),d}).filter(function(h){return h})}return N(M)}function W(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],D=new Set(N===!0?[]:N),K=[];function h(te){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return te.map(function(Z,I){var d=Object(fe.h)(he?he.pos:"0",I),V=$(Z.key,d),b=Object(we.a)(Object(we.a)({},Z),{},{parent:he,pos:d,children:null,data:Z,isStart:[].concat(Object(G.a)(he?he.isStart:[]),[I===0]),isEnd:[].concat(Object(G.a)(he?he.isEnd:[]),[I===te.length-1])});return K.push(b),N===!0||D.has(V)?b.children=h(Z.children||[],b):b.children=[],b})}return h(M),K}function Y(M,N,D){var K;D?typeof D=="string"?K=function(he){return he[D]}:typeof D=="function"&&(K=function(he){return D(he)}):K=function(he,Z){return $(he.key,Z)};function h(te,he,Z){var I=te?te.children:M,d=te?Object(fe.h)(Z.pos,he):"0";if(te){var V=K(te,d),b={node:te,index:he,pos:d,key:V,parentPos:Z.node?Z.pos:null,level:Z.level+1};N(b)}I&&I.forEach(function(j,v){h(j,v,{node:te,pos:d,level:Z?Z.level+1:-1})})}h(null)}function q(M){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=N.initWrapper,K=N.processEntity,h=N.onProcessFinished,te=arguments.length>2?arguments[2]:void 0,he={},Z={},I={posEntities:he,keyEntities:Z};return D&&(I=D(I)||I),Y(M,function(d){var V=d.node,b=d.index,j=d.pos,v=d.key,m=d.parentPos,L=d.level,P={node:V,index:b,key:v,pos:j,level:L},_=$(v,j);he[j]=P,Z[_]=P,P.parent=he[m],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),K&&K(P,I)},te),h&&h(I),I}function oe(M,N){var D=N.expandedKeys,K=N.selectedKeys,h=N.loadedKeys,te=N.loadingKeys,he=N.checkedKeys,Z=N.halfCheckedKeys,I=N.dragOverNodeKey,d=N.dropPosition,V=N.keyEntities,b=V[M],j={eventKey:M,expanded:D.indexOf(M)!==-1,selected:K.indexOf(M)!==-1,loaded:h.indexOf(M)!==-1,loading:te.indexOf(M)!==-1,checked:he.indexOf(M)!==-1,halfChecked:Z.indexOf(M)!==-1,pos:String(b?b.pos:""),dragOver:I===M&&d===0,dragOverGapTop:I===M&&d===-1,dragOverGapBottom:I===M&&d===1};return j}function z(M){var N=M.data,D=M.expanded,K=M.selected,h=M.checked,te=M.loaded,he=M.loading,Z=M.halfChecked,I=M.dragOver,d=M.dragOverGapTop,V=M.dragOverGapBottom,b=M.pos,j=M.active,v=Object(we.a)(Object(we.a)({},N),{},{expanded:D,selected:K,checked:h,loaded:te,loading:he,halfChecked:Z,dragOver:I,dragOverGapTop:d,dragOverGapBottom:V,pos:b,active:j});return"props"in v||Object.defineProperty(v,"props",{get:function(){return Object(xe.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),M}}),v}},"8EBN":function(Ge,je,l){(function(G){G(l("VrN/"))})(function(G){"use strict";G.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var we=0;we<G.modeInfo.length;we++){var re=G.modeInfo[we];re.mimes&&(re.mime=re.mimes[0])}G.findModeByMIME=function(Se){Se=Se.toLowerCase();for(var xe=0;xe<G.modeInfo.length;xe++){var fe=G.modeInfo[xe];if(fe.mime==Se)return fe;if(fe.mimes){for(var $=0;$<fe.mimes.length;$++)if(fe.mimes[$]==Se)return fe}}if(/\+xml$/.test(Se))return G.findModeByMIME("application/xml");if(/\+json$/.test(Se))return G.findModeByMIME("application/json")},G.findModeByExtension=function(Se){Se=Se.toLowerCase();for(var xe=0;xe<G.modeInfo.length;xe++){var fe=G.modeInfo[xe];if(fe.ext){for(var $=0;$<fe.ext.length;$++)if(fe.ext[$]==Se)return fe}}},G.findModeByFileName=function(Se){for(var xe=0;xe<G.modeInfo.length;xe++){var fe=G.modeInfo[xe];if(fe.file&&fe.file.test(Se))return fe}var $=Se.lastIndexOf("."),S=$>-1&&Se.substring($+1,Se.length);if(S)return G.findModeByExtension(S)},G.findModeByName=function(Se){Se=Se.toLowerCase();for(var xe=0;xe<G.modeInfo.length;xe++){var fe=G.modeInfo[xe];if(fe.name.toLowerCase()==Se)return fe;if(fe.alias){for(var $=0;$<fe.alias.length;$++)if(fe.alias[$].toLowerCase()==Se)return fe}}}})},"9Bee":function(Ge,je,l){"use strict";var G=l("k1fw"),we=l("tJVT"),re=l("cDcd"),Se=l.n(re),xe=l("vg9a"),fe=l("DlQD"),$=l.n(fe),S=l("rUJ1");function y(X,ge){var pe=X.match(/^(\s+)(?:```)/);if(pe===null)return ge;var Oe=pe[1];return ge.split(`
`).map(function(me){var de=me.match(/^\s+/);if(de===null)return me;var H=Object(we.a)(de,1),A=H[0];return A.length>=Oe.length?me.slice(Oe.length):me}).join(`
`)}var W=[],Y=["<ul>"],q=new $.a.Renderer,oe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function z(){W.length=0,Y=["<ul>"]}var M={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function N(X,ge,pe,Oe){if(ge>=X.length||X[ge].level<=pe)return ge;var me=X[ge];Oe.push("<li><a href='#"+me.anchor+"'>"+me.text+"</a>"),ge++;var de=[];return ge=N(X,ge,me.level,de),de.length>0&&(Oe.push("<ul>"),de.forEach(function(H){Oe.push(H)}),Oe.push("</ul>")),Oe.push("</li>"),ge=N(X,ge,pe,Oe),ge}function D(){return N(W,0,0,Y),Y.push("</ul>"),Y.join("")}var K={heading:function(ge){var pe=oe.exec(ge);if(pe)return{type:"heading",raw:pe[0],depth:pe[1].length,text:pe[2]}},fences:function(ge){var pe=this.rules.block.fences.exec(ge);if(pe){var Oe=pe[0],me=y(Oe,pe[3]||""),de=pe[2]?pe[2].trim():pe[2];if(["latex","katex","math"].indexOf(de)>=0){var H=he(),A=me;me=H,Z[H]={type:"block",expression:A}}return{type:"code",raw:Oe,lang:de,text:me}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,te=0,he=function(){return"__special_katext_id_".concat(te++,"__")},Z={};function I(){return Z}function d(){te=0,Z={}}function V(X){return X=X.replace(h,function(ge,pe){var Oe=he();return Z[Oe]={type:"inline",expression:pe},Oe}),X}var b=q.listitem;q.listitem=function(X){return b(V(X))};var j=q.paragraph;q.paragraph=function(X){return j(V(X))};var v=q.tablecell;q.tablecell=function(X,ge){return v(V(X),ge)},q.code=function(X,ge,pe){var Oe=(ge||"").match(/\S*/)[0];return Oe?["latex","katex","math"].indexOf(Oe)>=0?"<p class='editormd-tex'>".concat(X,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ge,'">').concat(pe?X:Object(S.escape)(X,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(pe?X:Object(S.escape)(X,!0))+"</code></pre>"},q.heading=function(X,ge,pe){var Oe=this.options.headerPrefix+pe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return W.push({anchor:Oe,level:ge,text:X}),"<h"+ge+' id="'+Oe+'">'+X+"</h"+ge+">"},$.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),$.a.use({tokenizer:K,renderer:q});var m=$.a,L=l("SJMd"),P=l("ulZh"),_=l.n(P),F=l("m3rI"),ue=l("Oy/b"),Q=l("p5ED"),ye=/<pre[^>]*>/g;function R(X){var ge=document.createElement("div");return ge.innerHTML=X,ge.childNodes.length===0?"":ge.childNodes[0].nodeValue}var c=je.a=function(X){var ge=X.value,pe=ge===void 0?"":ge,Oe=X.className,me=X.showTextOnly,de=X.showLines,H=X.style,A=H===void 0?{}:H,ee=X.stylesPrev,O=ee===void 0?{}:ee,x=String(pe),ie=Object(re.useState)(""),Pe=Object(we.a)(ie,2),Fe=Pe[0],be=Pe[1],Ae=Object(re.useMemo)(function(){try{var Be=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Je=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Me=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;x=x.replace(Be,"("+F.a.API_SERVER+"/api/attachments/").replace(Je,'"'+F.a.API_SERVER+"/api/attachments/").replace(Me,'"'+F.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,`
`),x=x.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(pt){}var Ce=m(x),lt=I();if(x.match(/\[TOC\]/)&&(Ce=Ce.replace("<p>[TOC]</p>",D()),z()),Ce=Ce.replace(/(__special_katext_id_\d+__)/g,function(pt,et){var _t=lt[et],vt=_t.type,ht=_t.expression;return Object(ue.renderToString)(R(ht)||"",{displayMode:vt==="block",throwOnError:!1,output:"html"})}),Ce=Ce.replace(/▁/g,"\u2581\u2581\u2581"),d(),me){var at=document.createElement("div");return at.innerHTML=Ce,at.innerText}return setTimeout(function(){return Ne()},500),Ce},[x]),ve=Object(re.useRef)();M.WebkitLineClamp=de,de&&(A=Object(G.a)(Object(G.a)({},A),M));function Ee(Be){var Je=Be.target;if(Je.tagName.toUpperCase()==="A"){var Me=Je.getAttribute("href");if(Me.indexOf("office")>-1)Be.preventDefault(),be(Me);else if(Me.startsWith("#")){Be.preventDefault();var Ce=document.getElementById(Me.replace("#",""));Ce&&Ce.scrollIntoView(!0)}}}var Ne=function(){var Je,Me=(Je=ve.current)===null||Je===void 0?void 0:Je.querySelectorAll("video");Me==null||Me.forEach(function(Ce){if(Ce.oncontextmenu=function(){return!1},Ce.src.indexOf(".m3u8")>-1&&!Ce.canPlayType("application/vnd.apple.mpegurl")){if(_.a.isSupported()){var lt=new _.a;lt.loadSource(Ce.src),lt.attachMedia(Ce)}}})};return Object(re.useEffect)(function(){if(ve.current&&Ae&&(Ae.match(ye)&&window.PR.prettyPrint()),ve.current)return ve.current.addEventListener("click",Ee),function(){ve.current.removeEventListener("click",Ee),d(),z()}},[Ae,ve.current,Ee]),Se.a.createElement(Se.a.Fragment,null,Se.a.createElement("div",{ref:ve,style:Object(G.a)({},A),className:"".concat(Oe||""," markdown-body "),dangerouslySetInnerHTML:{__html:Ae}}),Se.a.createElement(Q.a,{close:!0,data:Fe,type:Fe!=null&&Fe.length?"office":"",style:Object(G.a)({},O),onClose:function(){return be("")}}))}},"9VGf":function(Ge,je,l){"use strict";l.d(je,"a",function(){return re});var G=l("cDcd"),we=l.n(G);function re(Se,xe){var fe=Object(G.useRef)();Object(G.useEffect)(function(){fe.current=Se}),Object(G.useEffect)(function(){function $(){fe.current()}if(xe!==null){var S=setInterval($,xe);return function(){return clearInterval(S)}}},[xe])}},"A+k2":function(Ge,je,l){Ge.exports={tabs:"tabs___2hYAP",active:"active___2Xkwd"}},Bd2K:function(Ge,je,l){(function(G){G(l("VrN/"),l("osHv"))})(function(G){G.defineOption("autoCloseTags",!1,function(y,W,Y){if(Y!=G.Init&&Y&&y.removeKeyMap("autoCloseTags"),!W)return;var q={name:"autoCloseTags"};(typeof W!="object"||W.whenClosing!==!1)&&(q["'/'"]=function(oe){return fe(oe)}),(typeof W!="object"||W.whenOpening!==!1)&&(q["'>'"]=function(oe){return Se(oe)}),y.addKeyMap(q)});var we=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],re=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Se(y){if(y.getOption("disableInput"))return G.Pass;for(var W=y.listSelections(),Y=[],q=y.getOption("autoCloseTags"),oe=0;oe<W.length;oe++){if(!W[oe].empty())return G.Pass;var z=W[oe].head,M=y.getTokenAt(z),N=G.innerMode(y.getMode(),M.state),D=N.state,K=N.mode.xmlCurrentTag&&N.mode.xmlCurrentTag(D),h=K&&K.name;if(!h)return G.Pass;var te=N.mode.configuration=="html",he=typeof q=="object"&&q.dontCloseTags||te&&we,Z=typeof q=="object"&&q.indentTags||te&&re;M.end>z.ch&&(h=h.slice(0,h.length-M.end+z.ch));var I=h.toLowerCase();if(!h||M.type=="string"&&(M.end!=z.ch||!/[\"\']/.test(M.string.charAt(M.string.length-1))||M.string.length==1)||M.type=="tag"&&K.close||M.string.indexOf("/")==z.ch-M.start-1||he&&$(he,I)>-1||S(y,N.mode.xmlCurrentContext&&N.mode.xmlCurrentContext(D)||[],h,z,!0))return G.Pass;var d=typeof q=="object"&&q.emptyTags;if(d&&$(d,h)>-1){Y[oe]={text:"/>",newPos:G.Pos(z.line,z.ch+2)};continue}var V=Z&&$(Z,I)>-1;Y[oe]={indent:V,text:">"+(V?`
`:"")+"</"+h+">",newPos:V?G.Pos(z.line+1,0):G.Pos(z.line,z.ch+1)}}for(var b=typeof q=="object"&&q.dontIndentOnAutoClose,oe=W.length-1;oe>=0;oe--){var j=Y[oe];y.replaceRange(j.text,W[oe].head,W[oe].anchor,"+insert");var v=y.listSelections().slice(0);v[oe]={head:j.newPos,anchor:j.newPos},y.setSelections(v),!b&&j.indent&&(y.indentLine(j.newPos.line,null,!0),y.indentLine(j.newPos.line+1,null,!0))}}function xe(y,W){for(var Y=y.listSelections(),q=[],oe=W?"/":"</",z=y.getOption("autoCloseTags"),M=typeof z=="object"&&z.dontIndentOnSlash,N=0;N<Y.length;N++){if(!Y[N].empty())return G.Pass;var D=Y[N].head,K=y.getTokenAt(D),h=G.innerMode(y.getMode(),K.state),te=h.state;if(W&&(K.type=="string"||K.string.charAt(0)!="<"||K.start!=D.ch-1))return G.Pass;var he,Z=h.mode.name!="xml"&&y.getMode().name=="htmlmixed";if(Z&&h.mode.name=="javascript")he=oe+"script";else if(Z&&h.mode.name=="css")he=oe+"style";else{var I=h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(te);if(!I||I.length&&S(y,I,I[I.length-1],D))return G.Pass;he=oe+I[I.length-1]}y.getLine(D.line).charAt(K.end)!=">"&&(he+=">"),q[N]=he}if(y.replaceSelections(q),Y=y.listSelections(),!M)for(var N=0;N<Y.length;N++)(N==Y.length-1||Y[N].head.line<Y[N+1].head.line)&&y.indentLine(Y[N].head.line)}function fe(y){return y.getOption("disableInput")?G.Pass:xe(y,!0)}G.commands.closeTag=function(y){return xe(y)};function $(y,W){if(y.indexOf)return y.indexOf(W);for(var Y=0,q=y.length;Y<q;++Y)if(y[Y]==W)return Y;return-1}function S(y,W,Y,q,oe){if(!G.scanForClosingTag)return!1;var z=Math.min(y.lastLine()+1,q.line+500),M=G.scanForClosingTag(y,q,null,z);if(!M||M.tag!=Y)return!1;for(var N=oe?1:0,D=W.length-1;D>=0&&W[D]==Y;D--)++N;q=M.to;for(var D=1;D<N;D++){var K=G.scanForClosingTag(y,q,null,z);if(!K||K.tag!=Y)return!1;q=K.to}return!0}})},BjJ7:function(Ge,je,l){"use strict";l.d(je,"d",function(){return we}),l.d(je,"c",function(){return re}),l.d(je,"e",function(){return Se}),l.d(je,"b",function(){return xe}),l.d(je,"a",function(){return $});var G=l("m3rI");function we(S){var y=!0;if(S.length>0){for(var W=0;W<S.length;W++)if(S[W].compile_success==0||!S[W].compile_success){y=!1;break}}else y=!1;return y}function re(S){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",W=[],Y=0;Y<S.length;Y++){var q=S[Y],oe=y?"".concat(y,"/").concat(q.name):"".concat(q.name);W.push({title:q.name,isLeaf:!(q.type==="tree"),key:oe})}return W}function Se(S,y,W){for(var Y=0;Y<S.length;Y++){var q=S[Y];if(q.key===y){q.children=W;break}q.children&&Se(q.children,y,W)}return S}function xe(S,y,W){var Y;return function(){var q=this,oe=arguments,z=function(){Y=null,W||S.apply(q,oe)},M=W&&!Y;clearTimeout(Y),Y=setTimeout(z,y),M&&S.apply(q,oe)}}var fe=!0,$=G.a.API_SERVER},"C+DQ":function(Ge,je,l){},DlQD:function(Ge,je,l){(function(G,we){Ge.exports=we()})(this,function(){"use strict";function G(E,T){for(var k=0;k<T.length;k++){var p=T[k];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(E,p.key,p)}}function we(E,T,k){return T&&G(E.prototype,T),k&&G(E,k),E}function re(E,T){if(!E)return;if(typeof E=="string")return Se(E,T);var k=Object.prototype.toString.call(E).slice(8,-1);if(k==="Object"&&E.constructor&&(k=E.constructor.name),k==="Map"||k==="Set")return Array.from(E);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return Se(E,T)}function Se(E,T){(T==null||T>E.length)&&(T=E.length);for(var k=0,p=new Array(T);k<T;k++)p[k]=E[k];return p}function xe(E,T){var k;if(typeof Symbol=="undefined"||E[Symbol.iterator]==null){if(Array.isArray(E)||(k=re(E))||T&&E&&typeof E.length=="number"){k&&(E=k);var p=0;return function(){return p>=E.length?{done:!0}:{done:!1,value:E[p++]}}}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 k=E[Symbol.iterator](),k.next.bind(k)}function fe(E,T){return T={exports:{}},E(T,T.exports),T.exports}var $=fe(function(E){function T(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function k(p){E.exports.defaults=p}E.exports={defaults:T(),getDefaults:T,changeDefaults:k}}),S=$.defaults,y=$.getDefaults,W=$.changeDefaults,Y=/[&<>"']/,q=/[&<>"']/g,oe=/[<>"']|&(?!#?\w+;)/,z=/[<>"']|&(?!#?\w+;)/g,M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},N=function(T){return M[T]};function D(E,T){if(T){if(Y.test(E))return E.replace(q,N)}else if(oe.test(E))return E.replace(z,N);return E}var K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function h(E){return E.replace(K,function(T,k){return k=k.toLowerCase(),k==="colon"?":":k.charAt(0)==="#"?k.charAt(1)==="x"?String.fromCharCode(parseInt(k.substring(2),16)):String.fromCharCode(+k.substring(1)):""})}var te=/(^|[^\[])\^/g;function he(E,T){E=E.source||E,T=T||"";var k={replace:function(g,w){return w=w.source||w,w=w.replace(te,"$1"),E=E.replace(g,w),k},getRegex:function(){return new RegExp(E,T)}};return k}var Z=/[^\w:]/g,I=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(E,T,k){if(E){var p;try{p=decodeURIComponent(h(k)).replace(Z,"").toLowerCase()}catch(g){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}T&&!I.test(k)&&(k=m(T,k));try{k=encodeURI(k).replace(/%25/g,"%")}catch(g){return null}return k}var V={},b=/^[^:]+:\/*[^/]*$/,j=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(E,T){V[" "+E]||(b.test(E)?V[" "+E]=E+"/":V[" "+E]=F(E,"/",!0)),E=V[" "+E];var k=E.indexOf(":")===-1;return T.substring(0,2)==="//"?k?T:E.replace(j,"$1")+T:T.charAt(0)==="/"?k?T:E.replace(v,"$1")+T:E+T}var L={exec:function(){}};function P(E){for(var T=1,k,p;T<arguments.length;T++){k=arguments[T];for(p in k)Object.prototype.hasOwnProperty.call(k,p)&&(E[p]=k[p])}return E}function _(E,T){var k=E.replace(/\|/g,function(w,C,J){for(var ae=!1,se=C;--se>=0&&J[se]==="\\";)ae=!ae;return ae?"|":" |"}),p=k.split(/ \|/),g=0;if(p.length>T)p.splice(T);else for(;p.length<T;)p.push("");for(;g<p.length;g++)p[g]=p[g].trim().replace(/\\\|/g,"|");return p}function F(E,T,k){var p=E.length;if(p===0)return"";for(var g=0;g<p;){var w=E.charAt(p-g-1);if(w===T&&!k)g++;else if(w!==T&&k)g++;else break}return E.substr(0,p-g)}function ue(E,T){if(E.indexOf(T[1])===-1)return-1;for(var k=E.length,p=0,g=0;g<k;g++)if(E[g]==="\\")g++;else if(E[g]===T[0])p++;else if(E[g]===T[1]&&(p--,p<0))return g;return-1}function Q(E){E&&E.sanitize&&!E.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 ye={escape:D,unescape:h,edit:he,cleanUrl:d,resolveUrl:m,noopTest:L,merge:P,splitCells:_,rtrim:F,findClosingBracket:ue,checkSanitizeDeprecation:Q},R=$.defaults,c=ye.rtrim,X=ye.splitCells,ge=ye.escape,pe=ye.findClosingBracket;function Oe(E,T,k){var p=T.href,g=T.title?ge(T.title):null,w=E[1].replace(/\\([\[\]])/g,"$1");return E[0].charAt(0)!=="!"?{type:"link",raw:k,href:p,title:g,text:w}:{type:"image",raw:k,href:p,title:g,text:ge(w)}}function me(E,T){var k=E.match(/^(\s+)(?:```)/);if(k===null)return T;var p=k[1];return T.split(`
`).map(function(g){var w=g.match(/^\s+/);if(w===null)return g;var C=w[0];return C.length>=p.length?g.slice(p.length):g}).join(`
`)}var de=function(){function E(k){this.options=k||R}var T=E.prototype;return T.space=function(p){var g=this.rules.block.newline.exec(p);if(g)return g[0].length>1?{type:"space",raw:g[0]}:{raw:`
`}},T.code=function(p,g){var w=this.rules.block.code.exec(p);if(w){var C=g[g.length-1];if(C&&C.type==="paragraph")return{raw:w[0],text:w[0].trimRight()};var J=w[0].replace(/^ {4}/gm,"");return{type:"code",raw:w[0],codeBlockStyle:"indented",text:this.options.pedantic?J:c(J,`
`)}}},T.fences=function(p){var g=this.rules.block.fences.exec(p);if(g){var w=g[0],C=me(w,g[3]||"");return{type:"code",raw:w,lang:g[2]?g[2].trim():g[2],text:C}}},T.heading=function(p){var g=this.rules.block.heading.exec(p);if(g)return{type:"heading",raw:g[0],depth:g[1].length,text:g[2]}},T.nptable=function(p){var g=this.rules.block.nptable.exec(p);if(g){var w={type:"table",header:X(g[1].replace(/^ *| *\| *$/g,"")),align:g[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:g[3]?g[3].replace(/\n$/,"").split(`
`):[],raw:g[0]};if(w.header.length===w.align.length){var C=w.align.length,J;for(J=0;J<C;J++)/^ *-+: *$/.test(w.align[J])?w.align[J]="right":/^ *:-+: *$/.test(w.align[J])?w.align[J]="center":/^ *:-+ *$/.test(w.align[J])?w.align[J]="left":w.align[J]=null;for(C=w.cells.length,J=0;J<C;J++)w.cells[J]=X(w.cells[J],w.header.length);return w}}},T.hr=function(p){var g=this.rules.block.hr.exec(p);if(g)return{type:"hr",raw:g[0]}},T.blockquote=function(p){var g=this.rules.block.blockquote.exec(p);if(g){var w=g[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:g[0],text:w}}},T.list=function(p){var g=this.rules.block.list.exec(p);if(g){for(var w=g[0],C=g[2],J=C.length>1,ae=C[C.length-1]===")",se={type:"list",raw:w,ordered:J,start:J?+C.slice(0,-1):"",loose:!1,items:[]},rt=g[0].match(this.rules.block.item),ze=!1,Te,Ot,kt,it,Kt,He,zt,Ut=rt.length,gt=0;gt<Ut;gt++)Te=rt[gt],w=Te,Ot=Te.length,Te=Te.replace(/^ *([*+-]|\d+[.)]) */,""),~Te.indexOf(`
`)&&(Ot-=Te.length,Te=this.options.pedantic?Te.replace(/^ {1,4}/gm,""):Te.replace(new RegExp("^ {1,"+Ot+"}","gm"),"")),gt!==Ut-1&&(kt=this.rules.block.bullet.exec(rt[gt+1])[0],(J?kt.length===1||!ae&&kt[kt.length-1]===")":kt.length>1||this.options.smartLists&&kt!==C)&&(it=rt.slice(gt+1).join(`
`),se.raw=se.raw.substring(0,se.raw.length-it.length),gt=Ut-1)),Kt=ze||/\n\n(?!\s*$)/.test(Te),gt!==Ut-1&&(ze=Te.charAt(Te.length-1)===`
`,Kt||(Kt=ze)),Kt&&(se.loose=!0),He=/^\[[ xX]\] /.test(Te),zt=void 0,He&&(zt=Te[1]!==" ",Te=Te.replace(/^\[[ xX]\] +/,"")),se.items.push({type:"list_item",raw:w,task:He,checked:zt,loose:Kt,text:Te});return se}},T.html=function(p){var g=this.rules.block.html.exec(p);if(g)return{type:this.options.sanitize?"paragraph":"html",raw:g[0],pre:!this.options.sanitizer&&(g[1]==="pre"||g[1]==="script"||g[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(g[0]):ge(g[0]):g[0]}},T.def=function(p){var g=this.rules.block.def.exec(p);if(g){g[3]&&(g[3]=g[3].substring(1,g[3].length-1));var w=g[1].toLowerCase().replace(/\s+/g," ");return{tag:w,raw:g[0],href:g[2],title:g[3]}}},T.table=function(p){var g=this.rules.block.table.exec(p);if(g){var w={type:"table",header:X(g[1].replace(/^ *| *\| *$/g,"")),align:g[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:g[3]?g[3].replace(/\n$/,"").split(`
`):[]};if(w.header.length===w.align.length){w.raw=g[0];var C=w.align.length,J;for(J=0;J<C;J++)/^ *-+: *$/.test(w.align[J])?w.align[J]="right":/^ *:-+: *$/.test(w.align[J])?w.align[J]="center":/^ *:-+ *$/.test(w.align[J])?w.align[J]="left":w.align[J]=null;for(C=w.cells.length,J=0;J<C;J++)w.cells[J]=X(w.cells[J].replace(/^ *\| *| *\| *$/g,""),w.header.length);return w}}},T.lheading=function(p){var g=this.rules.block.lheading.exec(p);if(g)return{type:"heading",raw:g[0],depth:g[2].charAt(0)==="="?1:2,text:g[1]}},T.paragraph=function(p){var g=this.rules.block.paragraph.exec(p);if(g)return{type:"paragraph",raw:g[0],text:g[1].charAt(g[1].length-1)===`
`?g[1].slice(0,-1):g[1]}},T.text=function(p,g){var w=this.rules.block.text.exec(p);if(w){var C=g[g.length-1];return C&&C.type==="text"?{raw:w[0],text:w[0]}:{type:"text",raw:w[0],text:w[0]}}},T.escape=function(p){var g=this.rules.inline.escape.exec(p);if(g)return{type:"escape",raw:g[0],text:ge(g[1])}},T.tag=function(p,g,w){var C=this.rules.inline.tag.exec(p);if(C)return!g&&/^<a /i.test(C[0])?g=!0:g&&/^<\/a>/i.test(C[0])&&(g=!1),!w&&/^<(pre|code|kbd|script)(\s|>)/i.test(C[0])?w=!0:w&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(C[0])&&(w=!1),{type:this.options.sanitize?"text":"html",raw:C[0],inLink:g,inRawBlock:w,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(C[0]):ge(C[0]):C[0]}},T.link=function(p){var g=this.rules.inline.link.exec(p);if(g){var w=pe(g[2],"()");if(w>-1){var C=g[0].indexOf("!")===0?5:4,J=C+g[1].length+w;g[2]=g[2].substring(0,w),g[0]=g[0].substring(0,J).trim(),g[3]=""}var ae=g[2],se="";if(this.options.pedantic){var rt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ae);rt?(ae=rt[1],se=rt[3]):se=""}else se=g[3]?g[3].slice(1,-1):"";ae=ae.trim().replace(/^<([\s\S]*)>$/,"$1");var ze=Oe(g,{href:ae&&ae.replace(this.rules.inline._escapes,"$1"),title:se&&se.replace(this.rules.inline._escapes,"$1")},g[0]);return ze}},T.reflink=function(p,g){var w;if((w=this.rules.inline.reflink.exec(p))||(w=this.rules.inline.nolink.exec(p))){var C=(w[2]||w[1]).replace(/\s+/g," ");if(C=g[C.toLowerCase()],!C||!C.href){var J=w[0].charAt(0);return{type:"text",raw:J,text:J}}var ae=Oe(w,C,w[0]);return ae}},T.strong=function(p,g,w){w===void 0&&(w="");var C=this.rules.inline.strong.start.exec(p);if(C&&(!C[1]||C[1]&&(w===""||this.rules.inline.punctuation.exec(w)))){g=g.slice(-1*p.length);var J=C[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;J.lastIndex=0;for(var ae;(C=J.exec(g))!=null;)if(ae=this.rules.inline.strong.middle.exec(g.slice(0,C.index+3)),ae)return{type:"strong",raw:p.slice(0,ae[0].length),text:p.slice(2,ae[0].length-2)}}},T.em=function(p,g,w){w===void 0&&(w="");var C=this.rules.inline.em.start.exec(p);if(C&&(!C[1]||C[1]&&(w===""||this.rules.inline.punctuation.exec(w)))){g=g.slice(-1*p.length);var J=C[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;J.lastIndex=0;for(var ae;(C=J.exec(g))!=null;)if(ae=this.rules.inline.em.middle.exec(g.slice(0,C.index+2)),ae)return{type:"em",raw:p.slice(0,ae[0].length),text:p.slice(1,ae[0].length-1)}}},T.codespan=function(p){var g=this.rules.inline.code.exec(p);if(g){var w=g[2].replace(/\n/g," "),C=/[^ ]/.test(w),J=w.startsWith(" ")&&w.endsWith(" ");return C&&J&&(w=w.substring(1,w.length-1)),w=ge(w,!0),{type:"codespan",raw:g[0],text:w}}},T.br=function(p){var g=this.rules.inline.br.exec(p);if(g)return{type:"br",raw:g[0]}},T.del=function(p){var g=this.rules.inline.del.exec(p);if(g)return{type:"del",raw:g[0],text:g[1]}},T.autolink=function(p,g){var w=this.rules.inline.autolink.exec(p);if(w){var C,J;return w[2]==="@"?(C=ge(this.options.mangle?g(w[1]):w[1]),J="mailto:"+C):(C=ge(w[1]),J=C),{type:"link",raw:w[0],text:C,href:J,tokens:[{type:"text",raw:C,text:C}]}}},T.url=function(p,g){var w;if(w=this.rules.inline.url.exec(p)){var C,J;if(w[2]==="@")C=ge(this.options.mangle?g(w[0]):w[0]),J="mailto:"+C;else{var ae;do ae=w[0],w[0]=this.rules.inline._backpedal.exec(w[0])[0];while(ae!==w[0]);C=ge(w[0]),w[1]==="www."?J="http://"+C:J=C}return{type:"link",raw:w[0],text:C,href:J,tokens:[{type:"text",raw:C,text:C}]}}},T.inlineText=function(p,g,w){var C=this.rules.inline.text.exec(p);if(C){var J;return g?J=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(C[0]):ge(C[0]):C[0]:J=ge(this.options.smartypants?w(C[0]):C[0]),{type:"text",raw:C[0],text:J}}},E}(),H=ye.noopTest,A=ye.edit,ee=ye.merge,O={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:H,table:H,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};O._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,O._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,O.def=A(O.def).replace("label",O._label).replace("title",O._title).getRegex(),O.bullet=/(?:[*+-]|\d{1,9}[.)])/,O.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,O.item=A(O.item,"gm").replace(/bull/g,O.bullet).getRegex(),O.list=A(O.list).replace(/bull/g,O.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+O.def.source+")").getRegex(),O._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",O._comment=/<!--(?!-?>)[\s\S]*?-->/,O.html=A(O.html,"i").replace("comment",O._comment).replace("tag",O._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O.paragraph=A(O._paragraph).replace("hr",O.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",O._tag).getRegex(),O.blockquote=A(O.blockquote).replace("paragraph",O.paragraph).getRegex(),O.normal=ee({},O),O.gfm=ee({},O.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*|$)"}),O.gfm.nptable=A(O.gfm.nptable).replace("hr",O.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",O._tag).getRegex(),O.gfm.table=A(O.gfm.table).replace("hr",O.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",O._tag).getRegex(),O.pedantic=ee({},O.normal,{html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",O._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:H,paragraph:A(O.normal._paragraph).replace("hr",O.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",O.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var x={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:H,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:H,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};x._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",x.punctuation=A(x.punctuation).replace(/punctuation/g,x._punctuation).getRegex(),x._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",x._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",x.em.start=A(x.em.start).replace(/punctuation/g,x._punctuation).getRegex(),x.em.middle=A(x.em.middle).replace(/punctuation/g,x._punctuation).replace(/overlapSkip/g,x._overlapSkip).getRegex(),x.em.endAst=A(x.em.endAst,"g").replace(/punctuation/g,x._punctuation).getRegex(),x.em.endUnd=A(x.em.endUnd,"g").replace(/punctuation/g,x._punctuation).getRegex(),x.strong.start=A(x.strong.start).replace(/punctuation/g,x._punctuation).getRegex(),x.strong.middle=A(x.strong.middle).replace(/punctuation/g,x._punctuation).replace(/blockSkip/g,x._blockSkip).getRegex(),x.strong.endAst=A(x.strong.endAst,"g").replace(/punctuation/g,x._punctuation).getRegex(),x.strong.endUnd=A(x.strong.endUnd,"g").replace(/punctuation/g,x._punctuation).getRegex(),x.blockSkip=A(x._blockSkip,"g").getRegex(),x.overlapSkip=A(x._overlapSkip,"g").getRegex(),x._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,x._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,x._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])?)+(?![-_])/,x.autolink=A(x.autolink).replace("scheme",x._scheme).replace("email",x._email).getRegex(),x._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,x.tag=A(x.tag).replace("comment",O._comment).replace("attribute",x._attribute).getRegex(),x._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,x._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,x._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,x.link=A(x.link).replace("label",x._label).replace("href",x._href).replace("title",x._title).getRegex(),x.reflink=A(x.reflink).replace("label",x._label).getRegex(),x.reflinkSearch=A(x.reflinkSearch,"g").replace("reflink",x.reflink).replace("nolink",x.nolink).getRegex(),x.normal=ee({},x),x.pedantic=ee({},x.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:A(/^!?\[(label)\]\((.*?)\)/).replace("label",x._label).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",x._label).getRegex()}),x.gfm=ee({},x.normal,{escape:A(x.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),x.gfm.url=A(x.gfm.url,"i").replace("email",x.gfm._extended_email).getRegex(),x.breaks=ee({},x.gfm,{br:A(x.br).replace("{2,}","*").getRegex(),text:A(x.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ie={block:O,inline:x},Pe=$.defaults,Fe=ie.block,be=ie.inline;function Ae(E){return E.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 ve(E){var T="",k,p,g=E.length;for(k=0;k<g;k++)p=E.charCodeAt(k),Math.random()>.5&&(p="x"+p.toString(16)),T+="&#"+p+";";return T}var Ee=function(){function E(k){this.tokens=[],this.tokens.links=Object.create(null),this.options=k||Pe,this.options.tokenizer=this.options.tokenizer||new de,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var p={block:Fe.normal,inline:be.normal};this.options.pedantic?(p.block=Fe.pedantic,p.inline=be.pedantic):this.options.gfm&&(p.block=Fe.gfm,this.options.breaks?p.inline=be.breaks:p.inline=be.gfm),this.tokenizer.rules=p}E.lex=function(p,g){var w=new E(g);return w.lex(p)};var T=E.prototype;return T.lex=function(p){return p=p.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(p,this.tokens,!0),this.inline(this.tokens),this.tokens},T.blockTokens=function(p,g,w){g===void 0&&(g=[]),w===void 0&&(w=!0),p=p.replace(/^ +$/gm,"");for(var C,J,ae,se;p;){if(C=this.tokenizer.space(p)){p=p.substring(C.raw.length),C.type&&g.push(C);continue}if(C=this.tokenizer.code(p,g)){p=p.substring(C.raw.length),C.type?g.push(C):(se=g[g.length-1],se.raw+=`
`+C.raw,se.text+=`
`+C.text);continue}if(C=this.tokenizer.fences(p)){p=p.substring(C.raw.length),g.push(C);continue}if(C=this.tokenizer.heading(p)){p=p.substring(C.raw.length),g.push(C);continue}if(C=this.tokenizer.nptable(p)){p=p.substring(C.raw.length),g.push(C);continue}if(C=this.tokenizer.hr(p)){p=p.substring(C.raw.length),g.push(C);continue}if(C=this.tokenizer.blockquote(p)){p=p.substring(C.raw.length),C.tokens=this.blockTokens(C.text,[],w),g.push(C);continue}if(C=this.tokenizer.list(p)){for(p=p.substring(C.raw.length),ae=C.items.length,J=0;J<ae;J++)C.items[J].tokens=this.blockTokens(C.items[J].text,[],!1);g.push(C);continue}if(C=this.tokenizer.html(p)){p=p.substring(C.raw.length),g.push(C);continue}if(w&&(C=this.tokenizer.def(p))){p=p.substring(C.raw.length),this.tokens.links[C.tag]||(this.tokens.links[C.tag]={href:C.href,title:C.title});continue}if(C=this.tokenizer.table(p)){p=p.substring(C.raw.length),g.push(C);continue}if(C=this.tokenizer.lheading(p)){p=p.substring(C.raw.length),g.push(C);continue}if(w&&(C=this.tokenizer.paragraph(p))){p=p.substring(C.raw.length),g.push(C);continue}if(C=this.tokenizer.text(p,g)){p=p.substring(C.raw.length),C.type?g.push(C):(se=g[g.length-1],se.raw+=`
`+C.raw,se.text+=`
`+C.text);continue}if(p){var rt="Infinite loop on byte: "+p.charCodeAt(0);if(this.options.silent){console.error(rt);break}else throw new Error(rt)}}return g},T.inline=function(p){var g,w,C,J,ae,se,rt=p.length;for(g=0;g<rt;g++){se=p[g];switch(se.type){case"paragraph":case"text":case"heading":{se.tokens=[],this.inlineTokens(se.text,se.tokens);break}case"table":{for(se.tokens={header:[],cells:[]},J=se.header.length,w=0;w<J;w++)se.tokens.header[w]=[],this.inlineTokens(se.header[w],se.tokens.header[w]);for(J=se.cells.length,w=0;w<J;w++)for(ae=se.cells[w],se.tokens.cells[w]=[],C=0;C<ae.length;C++)se.tokens.cells[w][C]=[],this.inlineTokens(ae[C],se.tokens.cells[w][C]);break}case"blockquote":{this.inline(se.tokens);break}case"list":{for(J=se.items.length,w=0;w<J;w++)this.inline(se.items[w].tokens);break}}}return p},T.inlineTokens=function(p,g,w,C,J){g===void 0&&(g=[]),w===void 0&&(w=!1),C===void 0&&(C=!1),J===void 0&&(J="");var ae,se=p,rt;if(this.tokens.links){var ze=Object.keys(this.tokens.links);if(ze.length>0)for(;(rt=this.tokenizer.rules.inline.reflinkSearch.exec(se))!=null;)ze.includes(rt[0].slice(rt[0].lastIndexOf("[")+1,-1))&&(se=se.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(rt=this.tokenizer.rules.inline.blockSkip.exec(se))!=null;)se=se.slice(0,rt.index)+"["+"a".repeat(rt[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;p;){if(ae=this.tokenizer.escape(p)){p=p.substring(ae.raw.length),g.push(ae);continue}if(ae=this.tokenizer.tag(p,w,C)){p=p.substring(ae.raw.length),w=ae.inLink,C=ae.inRawBlock,g.push(ae);continue}if(ae=this.tokenizer.link(p)){p=p.substring(ae.raw.length),ae.type==="link"&&(ae.tokens=this.inlineTokens(ae.text,[],!0,C)),g.push(ae);continue}if(ae=this.tokenizer.reflink(p,this.tokens.links)){p=p.substring(ae.raw.length),ae.type==="link"&&(ae.tokens=this.inlineTokens(ae.text,[],!0,C)),g.push(ae);continue}if(ae=this.tokenizer.strong(p,se,J)){p=p.substring(ae.raw.length),ae.tokens=this.inlineTokens(ae.text,[],w,C),g.push(ae);continue}if(ae=this.tokenizer.em(p,se,J)){p=p.substring(ae.raw.length),ae.tokens=this.inlineTokens(ae.text,[],w,C),g.push(ae);continue}if(ae=this.tokenizer.codespan(p)){p=p.substring(ae.raw.length),g.push(ae);continue}if(ae=this.tokenizer.br(p)){p=p.substring(ae.raw.length),g.push(ae);continue}if(ae=this.tokenizer.del(p)){p=p.substring(ae.raw.length),ae.tokens=this.inlineTokens(ae.text,[],w,C),g.push(ae);continue}if(ae=this.tokenizer.autolink(p,ve)){p=p.substring(ae.raw.length),g.push(ae);continue}if(!w&&(ae=this.tokenizer.url(p,ve))){p=p.substring(ae.raw.length),g.push(ae);continue}if(ae=this.tokenizer.inlineText(p,C,Ae)){p=p.substring(ae.raw.length),J=ae.raw.slice(-1),g.push(ae);continue}if(p){var Te="Infinite loop on byte: "+p.charCodeAt(0);if(this.options.silent){console.error(Te);break}else throw new Error(Te)}}return g},we(E,null,[{key:"rules",get:function(){return{block:Fe,inline:be}}}]),E}(),Ne=$.defaults,Be=ye.cleanUrl,Je=ye.escape,Me=function(){function E(k){this.options=k||Ne}var T=E.prototype;return T.code=function(p,g,w){var C=(g||"").match(/\S*/)[0];if(this.options.highlight){var J=this.options.highlight(p,C);J!=null&&J!==p&&(w=!0,p=J)}return C?'<pre><code class="'+this.options.langPrefix+Je(C,!0)+'">'+(w?p:Je(p,!0))+`</code></pre>
`:"<pre><code>"+(w?p:Je(p,!0))+`</code></pre>
`},T.blockquote=function(p){return`<blockquote>
`+p+`</blockquote>
`},T.html=function(p){return p},T.heading=function(p,g,w,C){return this.options.headerIds?"<h"+g+' id="'+this.options.headerPrefix+C.slug(w)+'">'+p+"</h"+g+`>
`:"<h"+g+">"+p+"</h"+g+`>
`},T.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},T.list=function(p,g,w){var C=g?"ol":"ul",J=g&&w!==1?' start="'+w+'"':"";return"<"+C+J+`>
`+p+"</"+C+`>
`},T.listitem=function(p){return"<li>"+p+`</li>
`},T.checkbox=function(p){return"<input "+(p?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},T.paragraph=function(p){return"<p>"+p+`</p>
`},T.table=function(p,g){return g&&(g="<tbody>"+g+"</tbody>"),`<table>
<thead>
`+p+`</thead>
`+g+`</table>
`},T.tablerow=function(p){return`<tr>
`+p+`</tr>
`},T.tablecell=function(p,g){var w=g.header?"th":"td",C=g.align?"<"+w+' align="'+g.align+'">':"<"+w+">";return C+p+"</"+w+`>
`},T.strong=function(p){return"<strong>"+p+"</strong>"},T.em=function(p){return"<em>"+p+"</em>"},T.codespan=function(p){return"<code>"+p+"</code>"},T.br=function(){return this.options.xhtml?"<br/>":"<br>"},T.del=function(p){return"<del>"+p+"</del>"},T.link=function(p,g,w){if(p=Be(this.options.sanitize,this.options.baseUrl,p),p===null)return w;var C='<a href="'+Je(p)+'"';return g&&(C+=' title="'+g+'"'),C+=">"+w+"</a>",C},T.image=function(p,g,w){if(p=Be(this.options.sanitize,this.options.baseUrl,p),p===null)return w;var C='<img src="'+p+'" alt="'+w+'"';return g&&(C+=' title="'+g+'"'),C+=this.options.xhtml?"/>":">",C},T.text=function(p){return p},E}(),Ce=function(){function E(){}var T=E.prototype;return T.strong=function(p){return p},T.em=function(p){return p},T.codespan=function(p){return p},T.del=function(p){return p},T.html=function(p){return p},T.text=function(p){return p},T.link=function(p,g,w){return""+w},T.image=function(p,g,w){return""+w},T.br=function(){return""},E}(),lt=function(){function E(){this.seen={}}var T=E.prototype;return T.slug=function(p){var g=p.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(g)){var w=g;do this.seen[w]++,g=w+"-"+this.seen[w];while(this.seen.hasOwnProperty(g))}return this.seen[g]=0,g},E}(),at=$.defaults,pt=ye.unescape,et=function(){function E(k){this.options=k||at,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ce,this.slugger=new lt}E.parse=function(p,g){var w=new E(g);return w.parse(p)};var T=E.prototype;return T.parse=function(p,g){g===void 0&&(g=!0);var w="",C,J,ae,se,rt,ze,Te,Ot,kt,it,Kt,He,zt,Ut,gt,Ft,Pt,ot,Qe=p.length;for(C=0;C<Qe;C++){it=p[C];switch(it.type){case"space":continue;case"hr":{w+=this.renderer.hr();continue}case"heading":{w+=this.renderer.heading(this.parseInline(it.tokens),it.depth,pt(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{w+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(Ot="",Te="",se=it.header.length,J=0;J<se;J++)Te+=this.renderer.tablecell(this.parseInline(it.tokens.header[J]),{header:!0,align:it.align[J]});for(Ot+=this.renderer.tablerow(Te),kt="",se=it.cells.length,J=0;J<se;J++){for(ze=it.tokens.cells[J],Te="",rt=ze.length,ae=0;ae<rt;ae++)Te+=this.renderer.tablecell(this.parseInline(ze[ae]),{header:!1,align:it.align[ae]});kt+=this.renderer.tablerow(Te)}w+=this.renderer.table(Ot,kt);continue}case"blockquote":{kt=this.parse(it.tokens),w+=this.renderer.blockquote(kt);continue}case"list":{for(Kt=it.ordered,He=it.start,zt=it.loose,se=it.items.length,kt="",J=0;J<se;J++)gt=it.items[J],Ft=gt.checked,Pt=gt.task,Ut="",gt.task&&(ot=this.renderer.checkbox(Ft),zt?gt.tokens.length>0&&gt.tokens[0].type==="text"?(gt.tokens[0].text=ot+" "+gt.tokens[0].text,gt.tokens[0].tokens&&gt.tokens[0].tokens.length>0&&gt.tokens[0].tokens[0].type==="text"&&(gt.tokens[0].tokens[0].text=ot+" "+gt.tokens[0].tokens[0].text)):gt.tokens.unshift({type:"text",text:ot}):Ut+=ot),Ut+=this.parse(gt.tokens,zt),kt+=this.renderer.listitem(Ut,Pt,Ft);w+=this.renderer.list(kt,Kt,He);continue}case"html":{w+=this.renderer.html(it.text);continue}case"paragraph":{w+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(kt=it.tokens?this.parseInline(it.tokens):it.text;C+1<Qe&&p[C+1].type==="text";)it=p[++C],kt+=`
`+(it.tokens?this.parseInline(it.tokens):it.text);w+=g?this.renderer.paragraph(kt):kt;continue}default:{var Xe='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(Xe);return}else throw new Error(Xe)}}}return w},T.parseInline=function(p,g){g=g||this.renderer;var w="",C,J,ae=p.length;for(C=0;C<ae;C++){J=p[C];switch(J.type){case"escape":{w+=g.text(J.text);break}case"html":{w+=g.html(J.text);break}case"link":{w+=g.link(J.href,J.title,this.parseInline(J.tokens,g));break}case"image":{w+=g.image(J.href,J.title,J.text);break}case"strong":{w+=g.strong(this.parseInline(J.tokens,g));break}case"em":{w+=g.em(this.parseInline(J.tokens,g));break}case"codespan":{w+=g.codespan(J.text);break}case"br":{w+=g.br();break}case"del":{w+=g.del(this.parseInline(J.tokens,g));break}case"text":{w+=g.text(J.text);break}default:{var se='Token with "'+J.type+'" type was not found.';if(this.options.silent){console.error(se);return}else throw new Error(se)}}}return w},E}(),_t=ye.merge,vt=ye.checkSanitizeDeprecation,ht=ye.escape,Re=$.getDefaults,wt=$.changeDefaults,mt=$.defaults;function ke(E,T,k){if(typeof E=="undefined"||E===null)throw new Error("marked(): input parameter is undefined or null");if(typeof E!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(E)+", string expected");if(typeof T=="function"&&(k=T,T=null),T=_t({},ke.defaults,T||{}),vt(T),k){var p=T.highlight,g;try{g=Ee.lex(E,T)}catch(ae){return k(ae)}var w=function(se){var rt;if(!se)try{rt=et.parse(g,T)}catch(ze){se=ze}return T.highlight=p,se?k(se):k(null,rt)};if(!p||p.length<3)return w();if(delete T.highlight,!g.length)return w();var C=0;ke.walkTokens(g,function(ae){ae.type==="code"&&(C++,setTimeout(function(){p(ae.text,ae.lang,function(se,rt){if(se)return w(se);rt!=null&&rt!==ae.text&&(ae.text=rt,ae.escaped=!0),C--,C===0&&w()})},0))}),C===0&&w();return}try{var J=Ee.lex(E,T);return T.walkTokens&&ke.walkTokens(J,T.walkTokens),et.parse(J,T)}catch(ae){if(ae.message+=`
Please report this to https://github.com/markedjs/marked.`,T.silent)return"<p>An error occurred:</p><pre>"+ht(ae.message+"",!0)+"</pre>";throw ae}}ke.options=ke.setOptions=function(E){return _t(ke.defaults,E),wt(ke.defaults),ke},ke.getDefaults=Re,ke.defaults=mt,ke.use=function(E){var T=_t({},E);if(E.renderer&&function(){var p=ke.defaults.renderer||new Me,g=function(J){var ae=p[J];p[J]=function(){for(var se=arguments.length,rt=new Array(se),ze=0;ze<se;ze++)rt[ze]=arguments[ze];var Te=E.renderer[J].apply(p,rt);return Te===!1&&(Te=ae.apply(p,rt)),Te}};for(var w in E.renderer)g(w);T.renderer=p}(),E.tokenizer&&function(){var p=ke.defaults.tokenizer||new de,g=function(J){var ae=p[J];p[J]=function(){for(var se=arguments.length,rt=new Array(se),ze=0;ze<se;ze++)rt[ze]=arguments[ze];var Te=E.tokenizer[J].apply(p,rt);return Te===!1&&(Te=ae.apply(p,rt)),Te}};for(var w in E.tokenizer)g(w);T.tokenizer=p}(),E.walkTokens){var k=ke.defaults.walkTokens;T.walkTokens=function(p){E.walkTokens(p),k&&k(p)}}ke.setOptions(T)},ke.walkTokens=function(E,T){for(var k=xe(E),p;!(p=k()).done;){var g=p.value;T(g);switch(g.type){case"table":{for(var w=xe(g.tokens.header),C;!(C=w()).done;){var J=C.value;ke.walkTokens(J,T)}for(var ae=xe(g.tokens.cells),se;!(se=ae()).done;)for(var rt=se.value,ze=xe(rt),Te;!(Te=ze()).done;){var Ot=Te.value;ke.walkTokens(Ot,T)}break}case"list":{ke.walkTokens(g.items,T);break}default:g.tokens&&ke.walkTokens(g.tokens,T)}}},ke.Parser=et,ke.parser=et.parse,ke.Renderer=Me,ke.TextRenderer=Ce,ke.Lexer=Ee,ke.lexer=Ee.lex,ke.Tokenizer=de,ke.Slugger=lt,ke.parse=ke;var Ue=ke;return Ue})},"Dvv+":function(Ge,je,l){"use strict";l.r(je);var G=l("cWXX"),we=l("/ezw"),re=l("+L6B"),Se=l("2/Rp"),xe=l("7Kak"),fe=l("9yH6"),$=l("giR+"),S=l("fyUT"),y=l("9og8"),W=l("k1fw"),Y=l("y8nQ"),q=l("Vl3Y"),oe=l("tJVT"),z=l("5NDa"),M=l("5rEg"),N=l("WmNS"),D=l.n(N),K=l("cDcd"),h=l.n(K),te=l("Ty5D"),he=l("9kvl"),Z=l("m3fD"),I=l.n(Z),d=l("A+k2"),V=l.n(d),b=function(J){var ae=J.value,se=ae===void 0?[]:ae,rt=J.onChange,ze=J.className,Te=ze===void 0?"":ze;return h.a.createElement("div",{className:"".concat(V.a.tabs," ").concat(Te," ")},h.a.createElement("div",{onClick:function(){return rt(0)},className:se===0?V.a.active:""},h.a.createElement("div",null,"1"),h.a.createElement("div",null,"\u5F55\u5165\u4FE1\u606F")," "),h.a.createElement("div",{onClick:function(){return rt(1)},className:se===1?V.a.active:""},h.a.createElement("div",null,"2"),h.a.createElement("div",null,"\u914D\u7F6E\u7EC4\u5377")))},j=b,v=l("2qtc"),m=l("kLXV"),L=l("sRBo"),P=l("kaz8"),_=l("5Dmo"),F=l("3S7+"),ue=l("miYZ"),Q=l("tsqr"),ye=l("oBTY"),R=l("IlMy"),c=l.n(R),X=l("WCUW"),ge=l("QSKd"),pe=l.n(ge),Oe=l("Hfvn"),me=l.n(Oe),de=l("HPRh"),H=l.n(de),A=l("+RXH"),ee=l.n(A),O=l("+yhJ"),x=l.n(O),ie=l("RZ/O"),Pe=l.n(ie),Fe=l("exQ7"),be=l.n(Fe),Ae=l("HG2Q"),ve=l.n(Ae),Ee=l("k4n4"),Ne=l("eS0+"),Be=l("PpiC"),Je=l("K5AI"),Me=l.n(Je),Ce=l("LvDl"),lt=P.a.Group,at=function(J){var ae=J.value,se=ae===void 0?[]:ae,rt=J.onChange,ze=J.options,Te=J.search,Ot=Object(Be.a)(J,["value","onChange","options","search"]),kt=h.a.useState(!1),it=Object(oe.a)(kt,2),Kt=it[0],He=it[1];Object(K.useEffect)(function(){var Pt,ot=ze==null||((Pt=ze.tag_disciplines)===null||Pt===void 0)?void 0:Pt.map(function(Xe){return Xe.id}),Qe=se==null?void 0:se.filter(function(Xe){return ot.includes(Xe)});He(Qe.length===(ot==null?void 0:ot.length))},[se]);var zt=function(ot){var Qe,Xe,ft=ze==null||((Qe=ze.tag_disciplines)===null||Qe===void 0)?void 0:Qe.map(function(Bt){return Bt.id}),Tt=se==null?void 0:se.filter(function(Bt){return ft.includes(Bt)}),Dt=Object(Ce.uniq)([].concat(Object(ye.a)(se),Object(ye.a)(ot)));if(Tt.length>ot.length){var Zt=Object(Ce.xor)(Tt,ot);console.log(Zt,"newLevel"),Dt=Dt.filter(function(Bt){return!Zt.includes(Bt)})}rt(Dt),He(ot.length===(ze==null||((Xe=ze.tag_disciplines)===null||Xe===void 0)?void 0:Xe.length))},Ut=function(ot){var Qe,Xe=ze==null||((Qe=ze.tag_disciplines)===null||Qe===void 0)?void 0:Qe.map(function(ft){return ft.id});rt(ot.target.checked?Object(Ce.uniq)([].concat(Object(ye.a)(se),Object(ye.a)(Xe))):se==null?void 0:se.filter(function(ft){return!Xe.includes(ft)})),He(ot.target.checked)};console.log(ze,"options");var gt=function(){var ot,Qe,Xe=(ze==null?void 0:ze.tag_disciplines)||[];if(Te){var ft;Xe=(ft=Xe)===null||ft===void 0?void 0:ft.filter(function(Tt){var Dt;return Tt==null||((Dt=Tt.name)===null||Dt===void 0)?void 0:Dt.includes(Te)})}return Xe=(ot=Xe)===null||ot===void 0?void 0:ot.map(function(Tt){return Object(W.a)(Object(W.a)({},Tt),{},{label:"".concat(Tt.name,"(".concat(Tt==null?void 0:Tt.item_count,")")),value:Tt.id})}),Xe=(Qe=Xe)===null||Qe===void 0?void 0:Qe.filter(function(Tt){return Tt.item_count!==0}),Xe},Ft=function(){var ot=!1;if(!Te)ot=!0;else{var Qe;(Qe=ze.tag_disciplines)===null||Qe===void 0||Qe.forEach(function(Xe){if(!ot){var ft;ot=((ft=Xe.name)===null||ft===void 0?void 0:ft.includes(Te))&&Xe.item_count!==0}})}return ot};return(ze==null?void 0:ze.item_count)===0||!Ft()?h.a.createElement(h.a.Fragment,null):h.a.createElement("div",{className:Me.a.cInput},h.a.createElement("div",{className:Me.a.cl},h.a.createElement(P.a,{checked:Kt,onChange:Ut},h.a.createElement("span",{className:Me.a.box},h.a.createElement("span",{className:"font14 c-light-primary"},h.a.createElement("span",{title:ze==null?void 0:ze.name,className:Me.a.box1}," ",ze==null?void 0:ze.name),h.a.createElement("span",null," ","(".concat(ze==null?void 0:ze.item_count,")"))),h.a.createElement("i",{className:"iconfont icon-lujing font12 ml5"})))),h.a.createElement("div",{className:Me.a.cr},h.a.createElement(lt,{options:gt(),value:se,onChange:zt})))},pt=at,et=l("ErOA"),_t=l("ozfa"),vt=l("MJZm"),ht=l("0Owb"),Re=l("tmPe"),wt=l.n(Re),mt=function(J){var ae=J.value,se=J.onChange,rt=J.defaultValue,ze=J.treeData,Te=ze===void 0?[]:ze,Ot=Object(Be.a)(J,["value","onChange","defaultValue","treeData"]);return h.a.createElement("div",{className:wt.a.customTree},h.a.createElement(vt.a,Object(ht.a)({multiple:!0,showIcon:!0,selectedKeys:ae,defaultExpandedKeys:rt,treeData:Te,onSelect:se},Ot)))},ke=mt,Ue=l("sbIO"),E=M.a.Search,T=function(J){var ae,se=J.formValue,rt=J.setFatherTabs,ze=J.tabs,Te=J.editData,Ot=J.dispatch,kt=Object(te.i)().id,it=Object(K.useState)(["mine"]),Kt=Object(oe.a)(it,2),He=Kt[0],zt=Kt[1],Ut=Object(K.useState)(!0),gt=Object(oe.a)(Ut,2),Ft=gt[0],Pt=gt[1],ot=Object(K.useState)(!1),Qe=Object(oe.a)(ot,2),Xe=Qe[0],ft=Qe[1],Tt=Object(K.useState)(!1),Dt=Object(oe.a)(Tt,2),Zt=Dt[0],Bt=Dt[1],ut=Object(K.useState)(""),Yt=Object(oe.a)(ut,2),yt=Yt[0],qt=Yt[1],Lt=Object(K.useState)(!1),en=Object(oe.a)(Lt,2),Mn=en[0],Vt=en[1],Ie=Object(K.useState)(!1),Ye=Object(oe.a)(Ie,2),We=Ye[0],on=Ye[1],mn=Object(K.useState)({}),En=Object(oe.a)(mn,2),kn=En[0],jt=En[1],Ka=Object(K.useState)([]),Da=Object(oe.a)(Ka,2),vn=Da[0],In=Da[1],Za=Object(K.useState)([]),za=Object(oe.a)(Za,2),wn=za[0],Aa=za[1],bt=Object(K.useState)([]),ce=Object(oe.a)(bt,2),Ve=ce[0],At=ce[1],Ct=Object(K.useState)([]),Et=Object(oe.a)(Ct,2),Rt=Et[0],an=Et[1],yn=Object(K.useState)(null),dn=Object(oe.a)(yn,2),Sn=dn[0],Xn=dn[1],xn=Object(K.useRef)([]),Jn=Object(K.useState)(!1),Ha=Object(oe.a)(Jn,2),Yn=Ha[0],On=Ha[1],Ma=Object(K.useState)([]),ga=Object(oe.a)(Ma,2),Tn=ga[0],La=ga[1],fr=Object(K.useState)([0]),Xa=Object(oe.a)(fr,2),qa=Xa[0],ka=Xa[1],hr=Object(K.useState)([]),pr=Object(oe.a)(hr,2),er=pr[0],mr=pr[1],Na=Object(K.useRef)([]),Xr=Object(K.useState)(!1),Mt=Object(oe.a)(Xr,2),$t=Mt[0],Xt=Mt[1],un=Object(K.useState)([]),sn=Object(oe.a)(un,2),Gt=sn[0],gn=sn[1],Cn=Object(K.useState)([]),$n=Object(oe.a)(Cn,2),sa=$n[0],bn=$n[1],ba=Object(K.useRef)([]),Qn=Object(K.useState)([]),ja=Object(oe.a)(Qn,2),$a=ja[0],tr=ja[1],bi=Object(K.useState)(!1),_i=Object(oe.a)(bi,2),Gi=_i[0],Vi=_i[1],$r=Object(K.useRef)([]),Ei=Object(K.useState)(0),yi=Object(oe.a)(Ei,2),xi=yi[0],Ga=yi[1],Ua=er==null?void 0:er.filter(function(tt){return Tn==null?void 0:Tn.includes(tt.id)}),Ji=sa==null?void 0:sa.filter(function(tt){return Gt==null?void 0:Gt.includes(tt.id)});Object(K.useEffect)(function(){vr()},[]),Object(K.useEffect)(function(){return ze===1&&(Ot({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Ot({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1})),function(){Ot({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Ot({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}},[ze]),Object(K.useEffect)(function(){kt?Te&&Gn():(kr(He),nr(),Pt(!1))},[Te]),Object(K.useEffect)(function(){yt&&Yi()},[yt]);var Yi=function(){var $e=null;wn==null||wn.forEach(function(De){var _e;(_e=De.sub_disciplines)===null||_e===void 0||_e.forEach(function(nt){var qe;(qe=nt.tag_disciplines)===null||qe===void 0||qe.forEach(function(st){var It,Jt=((It=st.name)===null||It===void 0?void 0:It.includes(yt))&&st.item_count!==0;Jt&&!$e&&($e=De.id)})})}),$e&&Xn($e)},Qi=function($e){function De(_e){var nt=_e.children,qe=Array.isArray(nt)&&nt.length>0,st=_e==null?void 0:_e.group_id;return $r.current.push({name:_e==null?void 0:_e.name,id:st,count:_e==null?void 0:_e.count}),{title:h.a.createElement("div",{title:_e==null?void 0:_e.name,className:c.a.name},_e==null?void 0:_e.name,"\uFF08".concat(_e==null?void 0:_e.count,"\uFF09")),value:st,name:_e==null?void 0:_e.name,key:st,count:_e==null?void 0:_e.count,id:st,icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:qe?nt==null?void 0:nt.map(function(It){return De(It)}):[]}}return $e==null?void 0:$e.map(function(_e){return De(_e)})},vr=function(){var tt=Object(y.a)(D.a.mark(function $e(){var De,_e;return D.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Object(X.x)({});case 2:De=qe.sent,$r.current=[{id:0,name:"\u6839\u76EE\u5F55",count:De==null?void 0:De.root_count}],De!=null&&De.data&&(_e=[{title:h.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:c.a.name},"\u6839\u76EE\u5F55","\uFF08".concat((De==null?void 0:De.root_count)||0,"\uFF09")),value:0,id:0,key:0,count:De==null?void 0:De.root_count,name:"\u6839\u76EE\u5F55",icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Qi(De.data||[])}],mr($r.current),tr(_e));case 5:case"end":return qe.stop()}},$e)}));return function(){return tt.apply(this,arguments)}}(),Gn=function(){var tt=Object(y.a)(D.a.mark(function $e(){var De,_e,nt,qe,st,It,Jt,cn,rn,fn,nn,Fn,Rn,Pn,Zn,Wn,jn,qn;return D.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return fn=Te==null||((De=Te.tag_disciplines)===null||De===void 0)?void 0:De.map(function(tn){return tn.tag_discipline_id}),nn=Te==null||((_e=Te.groups)===null||_e===void 0)?void 0:_e.map(function(tn){return tn.id}),Fn={source:Te==null||((nt=Te.examination_bank)===null||nt===void 0)?void 0:nt.source,group_ids:nn,tag_discipline_ids:fn,teach_group_ids:Te==null?void 0:Te.teach_group_ids},Ht.next=5,Object(et.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:Fn});case 5:if(Rn=Ht.sent,!((Rn==null?void 0:Rn.status)===-1)){Ht.next=8;break}return Ht.abrupt("return");case 8:Pn=Rn==null?void 0:Rn.filter(function(tn){var Ln;return!!(tn!=null&&(Ln=tn.item_banks)!==null&&Ln!==void 0&&Ln.length)}),Pn=Pn.map(function(tn){return Object(W.a)(Object(W.a)({},tn),{},{scoreTotal:0,score:0,questionTotal:0})}),Pn=(qe=Pn)===null||qe===void 0?void 0:qe.map(function(tn,Ln){var ea,Kn,ha;return Object(W.a)(Object(W.a)({},tn),{},{score:(Te==null||((ea=Te.score_settings)===null||ea===void 0||((Kn=ea.find(function(pa){return pa.item_type===(tn==null?void 0:tn.item_type)}))===null||Kn===void 0))?void 0:Kn.score)||0,item_banks:tn==null||((ha=tn.item_banks)===null||ha===void 0)?void 0:ha.map(function(pa){var pn;return Object(W.a)(Object(W.a)({},pa),{},{tag_disciplines:pa==null||((pn=pa.tag_disciplines)===null||pn===void 0)?void 0:pn.map(function(Dn){var ta;return Object(W.a)(Object(W.a)({},Dn),{},{difficulties:Dn==null||((ta=Dn.difficulties)===null||ta===void 0)?void 0:ta.map(function(ua){var na=Te==null?void 0:Te.contents.find(function(_a){return _a.item_type===tn.item_type&&_a.sub_discipline_id===pa.sub_discipline_id&&_a.tag_discipline_id===Dn.tag_discipline_id&&_a.difficulty===ua.difficulty});return na?Object(W.a)(Object(W.a)({},ua),{},{num:na==null?void 0:na.quanlity}):Object(W.a)({},ua)})})})})})})}),Zn=gr(Pn),Wn=Zn.panel,jn=Zn.score_num_item,Pn=(st=Pn)===null||st===void 0?void 0:st.map(function(tn,Ln){var ea,Kn=(Wn==null||((ea=Wn[Ln])===null||ea===void 0)?void 0:ea.reduce(function(ha,pa){return ha+pa},0))||0;return Object(W.a)(Object(W.a)({},tn),{},{scoreTotal:Kn*(jn[Ln]||0),questionTotal:Kn})}),qn=[],Te==null||((It=Te.sort_by_item_type)===null||It===void 0)||It.forEach(function(tn){var Ln=Pn.find(function(ea){var Kn,ha=(Kn=br.find(function(pa){return pa.type===(ea==null?void 0:ea.item_type)}))===null||Kn===void 0?void 0:Kn.name;return ha===tn});qn.push(Ln)}),qn=Object(Ce.compact)(qn),kr(Te==null||((Jt=Te.examination_bank)===null||Jt===void 0)?void 0:Jt.source),nr(),zt(Te==null||((cn=Te.examination_bank)===null||cn===void 0)?void 0:cn.source),an(fn),xn.current=fn,La(nn),gn((Te==null?void 0:Te.teach_group_ids)||[]),Ga(Te==null||((rn=Te.groups)===null||rn===void 0)?void 0:rn.map(function(tn){return tn.count}).reduce(function(tn,Ln){return tn+Ln},0)),Na.current=nn,ka(nn!=null&&nn.length?nn:[0]),In(Object(Ce.cloneDeep)(qn)),Pt(!1);case 29:case"end":return Ht.stop()}},$e)}));return function(){return tt.apply(this,arguments)}}(),Zi=function(){var tt=Object(y.a)(D.a.mark(function $e(){var De;return D.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:De={source:He,group_ids:Tn,tag_discipline_ids:Rt,teach_group_ids:Gt},Ja(De),xn.current=Rt,Vt(!1);case 4:case"end":return nt.stop()}},$e)}));return function(){return tt.apply(this,arguments)}}(),kr=function(){var tt=Object(y.a)(D.a.mark(function $e(De){var _e,nt,qe,st,It,Jt;return D.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return rn.next=2,Object(et.a)("/api/disciplines.json",{method:"get",params:{source:"question",question_source:De}});case 2:qe=rn.sent,st=[],qe==null||((_e=qe.disciplines)===null||_e===void 0)||_e.forEach(function(fn){var nn;fn==null||((nn=fn.sub_disciplines)===null||nn===void 0)||nn.forEach(function(Fn){st=st.concat((Fn==null?void 0:Fn.tag_disciplines)||[])})}),It=null,Jt=qe==null||((nt=qe.disciplines)===null||nt===void 0)?void 0:nt.map(function(fn){var nn,Fn=fn==null||((nn=fn.sub_disciplines)===null||nn===void 0)?void 0:nn.reduce(function(Rn,Pn){return Rn+Pn.item_count},0);return!It&&Fn!==0&&(It=fn.id),Object(W.a)(Object(W.a)({},fn),{},{item_count:Fn})}),console.log(Jt,48767874),Aa(Jt),At(st),Xn(It);case 11:case"end":return rn.stop()}},$e)}));return function(De){return tt.apply(this,arguments)}}(),nr=function(){var tt=Object(y.a)(D.a.mark(function $e(){var De;return D.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.next=2,Object(et.a)("/api/teach_groups.json",{method:"get",params:{is_random_exam:!0}});case 2:De=nt.sent,bn((De==null?void 0:De.groups)||[]);case 4:case"end":return nt.stop()}},$e)}));return function(){return tt.apply(this,arguments)}}(),Ja=function(){var tt=Object(y.a)(D.a.mark(function $e(De){var _e,nt;return D.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return Pt(!0),st.next=3,Object(et.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:De});case 3:_e=st.sent,nt=_e==null?void 0:_e.filter(function(It){var Jt;return!!(It!=null&&(Jt=It.item_banks)!==null&&Jt!==void 0&&Jt.length)}),nt=nt.map(function(It){return Object(W.a)(Object(W.a)({},It),{},{scoreTotal:0,score:0,questionTotal:0})}),In(nt),Pt(!1);case 8:case"end":return st.stop()}},$e)}));return function(De){return tt.apply(this,arguments)}}(),Ci=function(){an(xn.current),Vt(!1),qt("")},qi=function($e){an($e)},Gr=function(){for(var $e=Ve==null?void 0:Ve.filter(function(cn){return Rt==null?void 0:Rt.includes(cn.id)}),De=Object(ye.a)($e),_e=0,nt=[],qe=0;qe<De.length;qe++){for(var st="",It=0;It<nt.length;It++)if(nt[It][0].parent_name==De[qe].parent_name){_e=1,st=It;break}if(_e==1)nt[st].push(De[qe]),_e=0;else if(_e==0){var Jt=new Array;Jt.push(De[qe]),nt.push(Jt)}}return nt},wi=function($e,De){var _e,nt,qe=Object(Ce.cloneDeep)(vn);qe[De]=$e;var st=gr([qe[De]]),It=st==null||((_e=st.panel)===null||_e===void 0||((nt=_e[0])===null||nt===void 0))?void 0:nt.reduce(function(cn,rn){return cn+rn},0);qe[De].questionTotal=It,In(qe);var Jt=document.getElementsByClassName("customError");Jt==null||Jt.forEach(function(cn){var rn;cn==null||((rn=cn.classList)===null||rn===void 0)||rn.remove("customError")})},gr=function($e){var De={contents:[],panel:[],score_num_item:[],score_total:[],error_tips:[]};return $e==null||$e.forEach(function(_e,nt){var qe,st,It;De.panel.push([]),De.score_num_item.push(_e==null?void 0:_e.score),De.score_total.push(_e==null?void 0:_e.scoreTotal),(qe=De.error_tips)===null||qe===void 0||qe.push({name:(st=br.find(function(Jt){return Jt.type===(_e==null?void 0:_e.item_type)}))===null||st===void 0?void 0:st.name,score:(_e==null?void 0:_e.score)||0,scoreTotal:_e==null?void 0:_e.scoreTotal,item_type:_e==null?void 0:_e.item_type}),_e==null||((It=_e.item_banks)===null||It===void 0)||It.forEach(function(Jt){var cn;Jt==null||((cn=Jt.tag_disciplines)===null||cn===void 0)||cn.forEach(function(rn){var fn;rn==null||((fn=rn.difficulties)===null||fn===void 0)||fn.forEach(function(nn){nn.num&&(De.panel[nt].push(nn.num),De.contents.push({difficulty:nn.difficulty,item_type:_e.item_type,items_count:nn.num,sub_discipline_id:Jt.sub_discipline_id,tag_discipline_id:rn.tag_discipline_id}))})})})}),De},Si=function(){var tt=Object(y.a)(D.a.mark(function $e(De){var _e,nt,qe,st,It,Jt,cn,rn,fn,nn,Fn,Rn,Pn,Zn,Wn,jn,qn;return D.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!(!Tn.length&&!Rt.length&&!Gt.length)){Ht.next=3;break}return Q.b.warn("\u5FC5\u987B\u9009\u62E9\u8003\u5BDF\u8303\u56F4\u6216\u8BD5\u9898\u6587\u4EF6\u5939\u6216\u6559\u7814\u56E2\u961F\u7684\u5176\u4E2D\u4E00\u9879"),Ht.abrupt("return");case 3:_e=[],nt=[],qe=gr(vn),st=0;case 7:if(!(st<qe.error_tips.length)){Ht.next=23;break}if(cn=qe==null||((It=qe.panel)===null||It===void 0||((Jt=It[st])===null||Jt===void 0))?void 0:Jt.reduce(function(tn,Ln){return tn+Ln},0),!(qe.error_tips[st].score===0&&cn!==0)){Ht.next=14;break}return fn=document.getElementById("".concat((rn=qe.error_tips[st])===null||rn===void 0?void 0:rn.item_type,"_score")),fn.classList.add("customError"),fn.scrollIntoView({block:"start",behavior:"smooth"}),Ht.abrupt("return");case 14:if(!(qe.error_tips[st].score!==0&&cn===0)){Ht.next=19;break}return Fn=document.getElementById("".concat((nn=qe.error_tips[st])===null||nn===void 0?void 0:nn.item_type,"_sum")),Fn.classList.add("customError"),Fn.scrollIntoView({block:"start",behavior:"smooth"}),Ht.abrupt("return");case 19:qe.error_tips[st].score!==0&&cn!==0&&(_e==null||_e.push({item_type:(Rn=qe.error_tips[st])===null||Rn===void 0?void 0:Rn.item_type,score:((Pn=qe.error_tips[st])===null||Pn===void 0?void 0:Pn.score)||0}),nt.push(qe.error_tips[st].name));case 20:st++,Ht.next=7;break;case 23:if(!(_e.length===0)){Ht.next=26;break}return Q.b.warn("\u4E0D\u5141\u8BB8\u6BCF\u4E2A\u9898\u578B\u7684\u603B\u5206\u548C\u62BD\u9898\u6570\u91CF\u90FD\u4E3A0"),Ht.abrupt("return");case 26:if(ft(!0),Zn=Object(W.a)({contents:qe.contents,group_ids:Tn,teach_group_ids:Gt,score_settings:_e,source:He,sub_discipline_id:0,sort_by_item_type:nt,tag_discipline_ids:Rt},se),!De){Ht.next=36;break}return Wn=Object(W.a)(Object(W.a)({},Zn),De),Ht.next=32,Object(et.a)("/api/examination_banks/save_question_list.json",{method:"post",body:Wn});case 32:return jn=Ht.sent,jn.status===0&&Q.b.success("\u4FDD\u5B58\u6210\u529F"),ft(!1),Ht.abrupt("return");case 36:if(qn={},!Te){Ht.next=43;break}return Ht.next=40,Object(et.a)("/api/examination_banks/".concat(Te==null?void 0:Te.id,"/update_random_exam.json"),{method:"post",body:Zn});case 40:qn=Ht.sent,Ht.next=46;break;case 43:return Ht.next=45,Object(et.a)("/api/examination_banks/create_random_exam.json",{method:"post",body:Zn});case 45:qn=Ht.sent;case 46:qn.status===0&&(Q.b.success("\u64CD\u4F5C\u6210\u529F"),he.d.push("/paperlibrary?defaultActiveKey=0")),ft(!1);case 48:case"end":return Ht.stop()}},$e)}));return function(De){return tt.apply(this,arguments)}}(),Vr=function(){var tt=Object(y.a)(D.a.mark(function $e(De,_e){var nt,qe,st,It,Jt,cn,rn,fn,nn,Fn,Rn,Pn,Zn,Wn,jn,qn,fa,Ht,tn,Ln,ea,Kn,ha;return D.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:if(!(!Tn.length&&!Rt.length&&!Gt.length)){pn.next=3;break}return Q.b.warn("\u5FC5\u987B\u9009\u62E9\u8003\u5BDF\u8303\u56F4\u6216\u8BD5\u9898\u6587\u4EF6\u5939\u6216\u6559\u7814\u56E2\u961F\u7684\u5176\u4E2D\u4E00\u9879"),pn.abrupt("return");case 3:nt=[],qe=[],st=gr(vn),It=0;case 7:if(!(It<st.error_tips.length)){pn.next=23;break}if(rn=st==null||((Jt=st.panel)===null||Jt===void 0||((cn=Jt[It])===null||cn===void 0))?void 0:cn.reduce(function(Dn,ta){return Dn+ta},0),!(st.error_tips[It].score===0&&rn!==0)){pn.next=14;break}return nn=document.getElementById("".concat((fn=st.error_tips[It])===null||fn===void 0?void 0:fn.item_type,"_score")),nn.classList.add("customError"),nn.scrollIntoView({block:"start",behavior:"smooth"}),pn.abrupt("return");case 14:if(!(st.error_tips[It].score!==0&&rn===0)){pn.next=19;break}return Rn=document.getElementById("".concat((Fn=st.error_tips[It])===null||Fn===void 0?void 0:Fn.item_type,"_sum")),Rn.classList.add("customError"),Rn.scrollIntoView({block:"start",behavior:"smooth"}),pn.abrupt("return");case 19:st.error_tips[It].score!==0&&rn!==0&&(nt==null||nt.push({item_type:(Pn=st.error_tips[It])===null||Pn===void 0?void 0:Pn.item_type,score:((Zn=st.error_tips[It])===null||Zn===void 0?void 0:Zn.score)||0}),qe.push(st.error_tips[It].name));case 20:It++,pn.next=7;break;case 23:if(!(nt.length===0)){pn.next=26;break}return Q.b.warn("\u4E0D\u5141\u8BB8\u6BCF\u4E2A\u9898\u578B\u7684\u603B\u5206\u548C\u62BD\u9898\u6570\u91CF\u90FD\u4E3A0"),pn.abrupt("return");case 26:if(Bt(!0),Wn=Object(W.a)({contents:st.contents,group_ids:Tn,teach_group_ids:Gt,score_settings:nt,sort_by_item_type:qe,tag_discipline_ids:Rt,source:He,sub_discipline_id:0},se),!(De!==void 0&&!(De!=null&&De.single_question_id))){pn.next=36;break}return Wn.seleted_item_bank_ids=De==null?void 0:De.seleted_item_bank_ids,pn.next=32,Object(et.a)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:Wn});case 32:return jn=pn.sent,jn!=null&&jn.questions&&(fa=Object(Ce.cloneDeep)(kn),fa.questionList=fa==null||((qn=fa.questionList)===null||qn===void 0)?void 0:qn.map(function(Dn){if(Dn.type===_e.type){var ta;return Object(W.a)(Object(W.a)({},Dn),{},{questions:(jn==null||((ta=jn.questions)===null||ta===void 0)?void 0:ta.questions)||[]})}return Dn}),jt(fa)),Bt(!1),pn.abrupt("return");case 36:if(!(De!=null&&De!==void 0&&De.single_question_id)){pn.next=45;break}return Wn.seleted_item_bank_ids=De==null?void 0:De.seleted_item_bank_ids,Wn.single_question_id=De==null?void 0:De.single_question_id,pn.next=41,Object(et.a)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:Wn});case 41:return Ht=pn.sent,Ht&&(Ln=Object(Ce.cloneDeep)(kn),Ln.questionList=Ln==null||((tn=Ln.questionList)===null||tn===void 0)?void 0:tn.map(function(Dn){if(Dn.type===_e.type){var ta,ua,na=Object(Ce.cloneDeep)(Dn==null?void 0:Dn.questions);return na.splice(_e.index,1,Ht==null||((ta=Ht.questions)===null||ta===void 0||((ua=ta.questions)===null||ua===void 0))?void 0:ua[0]),console.log(Dn==null?void 0:Dn.questions,na,_e.index,"new_questions"),Object(W.a)(Object(W.a)({},Dn),{},{questions:na})}return Dn}),jt(Ln)),Bt(!1),pn.abrupt("return");case 45:return pn.next=47,Object(et.a)("/api/examination_banks/preview_random_questions.json",{method:"post",body:Wn});case 47:ea=pn.sent,ea.exam&&(Kn=Oi(ea),ha=[],qe==null||qe.forEach(function(Dn){var ta,ua=Kn==null||((ta=Kn.questionList)===null||ta===void 0)?void 0:ta.find(function(na){var _a,Jr=(_a=br.find(function(Yr){return Yr.type===(na==null?void 0:na.type)}))===null||_a===void 0?void 0:_a.name;return Jr===Dn});ha.push(ua)}),ha=Object(Ce.compact)(ha),Kn.questionList=ha,jt(Object(W.a)({},Kn)),console.log(JSON.stringify(Kn)),on(!0),document.body.scrollIntoView()),Bt(!1);case 50:case"end":return pn.stop()}},$e)}));return function(De,_e){return tt.apply(this,arguments)}}(),br=[{type:"SINGLE",name:"\u5355\u9009\u9898"},{type:"MULTIPLE",name:"\u591A\u9009\u9898"},{type:"COMPLETION",name:"\u586B\u7A7A\u9898"},{type:"JUDGMENT",name:"\u5224\u65AD\u9898"},{type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},{type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},{type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},{type:"COMBINATION",name:"\u7EC4\u5408\u9898"}],eo=function(){var $e=gr(vn),De=$e.panel,_e=$e.score_total;return _e=_e.reduce(function(nt,qe){return nt+qe},0),De=Object(Ce.flatten)(De).reduce(function(nt,qe){return nt+qe},0),h.a.createElement("div",{className:c.a.total},h.a.createElement("div",null,h.a.createElement("img",{src:x.a}),h.a.createElement("span",null,"\u9898\u6570(\u9053)"),h.a.createElement("aside",null,De)),h.a.createElement("aside",null),h.a.createElement("div",null,h.a.createElement("img",{src:Pe.a}),h.a.createElement("span",null,"\u603B\u5206(\u5206)"),h.a.createElement("aside",null,_e)))},ar=function($e,De,_e){return $e[De]=$e.splice(_e,1,$e[De])[0],$e},Ia=function($e){var De=[],_e=Object(Ce.cloneDeep)(vn);_e.length>1&&$e!==0&&(De=ar(_e,$e,$e-1)),In(De)},Tr=function($e){var De=[],_e=Object(Ce.cloneDeep)(vn);_e.length>1&&$e!==_e.length-1&&(De=ar(_e,$e,$e+1)),In(De)},_r=function(){var tt=Object(y.a)(D.a.mark(function $e(De){var _e,nt,qe,st;return D.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(qe=Object(ye.a)(He),He.includes(De)?qe=qe.filter(function(cn){return cn!==De}):qe.push(De),!(qe.length===0)){Jt.next=5;break}return Q.b.warn("\u8BD5\u9898\u6765\u6E90\u4E3A\u5FC5\u9009\u9879"),Jt.abrupt("return");case 5:(_e=qe)!==null&&_e!==void 0&&_e.includes("mine")||(La([]),Na.current=[]),(nt=qe)!==null&&nt!==void 0&&nt.includes("teach_groups")||(gn([]),ba.current=[]),zt(qe),kr(qe),an([]),xn.current=[],st={source:qe,group_ids:Na.current,tag_discipline_ids:[],teach_group_ids:ba.current},Ja(st);case 13:case"end":return Jt.stop()}},$e)}));return function(De){return tt.apply(this,arguments)}}(),Oi=function($e){var De={1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D",7:"\u4E03"};if(!$e)return;var _e=$e||{},nt=_e.exam,qe=_e.single_questions,st=_e.multiple_questions,It=_e.judgement_questions,Jt=_e.program_questions,cn=_e.completion_questions,rn=_e.subjective_questions,fn=_e.practical_questions,nn=_e.combination_questions,Fn=[Object(W.a)({type:"SINGLE",name:"\u5355\u9009\u9898"},qe),Object(W.a)({type:"MULTIPLE",name:"\u591A\u9009\u9898"},st),Object(W.a)({type:"COMPLETION",name:"\u586B\u7A7A\u9898"},cn),Object(W.a)({type:"JUDGMENT",name:"\u5224\u65AD\u9898"},It),Object(W.a)({type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},rn),Object(W.a)({type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},Jt),Object(W.a)({type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},fn),Object(W.a)({type:"COMBINATION",name:"\u7EC4\u5408\u9898"},nn)],Rn=[],Pn=0,Zn=0,Wn=Fn.filter(function(jn){return jn.questions_count>0}).map(function(jn,qn){var fa;return(fa=jn.questions)===null||fa===void 0||fa.forEach(function(Ht){Rn.push(Ht.id),Pn=Pn+Ht.score,Zn=Zn+1}),Object(W.a)(Object(W.a)({},jn),{number:De[qn+1]})});return{all_questions_count:Zn,all_score:Pn,questionList:Wn,ids:Rn,exam:nt}},Ta=function($e){var De,_e,nt=Object(Ce.cloneDeep)(kn),qe=Object(Ce.cloneDeep)(vn);nt.questionList=nt==null||((De=nt.questionList)===null||De===void 0)?void 0:De.map(function(st){return st.type===$e.type?Object(W.a)(Object(W.a)({},st),{},{questions_score:$e.scoreTotal}):st}),qe=(_e=qe)===null||_e===void 0?void 0:_e.map(function(st){return st.item_type===$e.type?Object(W.a)(Object(W.a)({},st),{},{score:$e.score,scoreTotal:$e.scoreTotal}):st}),In(qe),jt(nt),console.log($e,kn,vn)},Fa=wn==null||((ae=wn.find(function(tt){return tt.id===Sn}))===null||ae===void 0)?void 0:ae.sub_disciplines,Er=Gr();return We?h.a.createElement(Ue.a,{loading:Xe,submit:Si,goBack:function(){return on(!1)},data:kn,onTypeScore:Ta,onExchange:Vr}):h.a.createElement("section",{className:c.a.wrap,style:{display:ze?"flex":"none"}},h.a.createElement("div",{id:"id_left",className:c.a.left,onMouseEnter:function($e){var De=document.getElementById("id_left");De.style.overflowY="auto"},onMouseLeave:function($e){var De=document.getElementById("id_left");De.style.overflowY="hidden"}},h.a.createElement(we.a,{loading:Ft,active:!0,paragraph:{rows:5}},vn.map(function(tt,$e){var De;return h.a.createElement("div",{className:c.a.list,key:$e},h.a.createElement("div",{className:c.a.name},h.a.createElement("b",null),h.a.createElement("span",null,(De=br.find(function(_e){return _e.type===(tt==null?void 0:tt.item_type)}))===null||De===void 0?void 0:De.name)),h.a.createElement("aside",null,h.a.createElement("div",null,"\u5171",h.a.createElement("span",{className:c.a.b},tt.questionTotal),"\u9898",h.a.createElement("span",{className:c.a.l},"|"),"\u5171",h.a.createElement("span",{className:c.a.r},tt.scoreTotal),"\u5206"),h.a.createElement("div",null,$e>0?h.a.createElement(F.a,{getPopupContainer:function(nt){return document.getElementById("id_left")},title:"\u4E0A\u79FB"},h.a.createElement("span",{onClick:function(){return Ia($e)},className:"mb20",style:{transform:"rotate(270deg)"}}," ",h.a.createElement("i",{className:"icon-jiantou1"}))):h.a.createElement("span",{className:"mb20",style:{transform:"rotate(270deg)",cursor:"not-allowed"}}," ",h.a.createElement("i",{className:"icon-jiantou1"})),$e<vn.length-1?h.a.createElement(F.a,{getPopupContainer:function(nt){return document.getElementById("id_left")},title:"\u4E0B\u79FB"},h.a.createElement("span",{onClick:function(){return Tr($e)},style:{transform:"rotate(90deg)"}}," ",h.a.createElement("i",{className:"icon-jiantou1"}))):h.a.createElement("span",{style:{transform:"rotate(90deg)",cursor:"not-allowed"}}," ",h.a.createElement("i",{className:"icon-jiantou1"})))))})),eo()),h.a.createElement("div",{className:c.a.right},h.a.createElement(j,{className:c.a.tabs,value:1,onChange:function(){return rt(0)}}),h.a.createElement("section",{className:c.a.topWarp},h.a.createElement("div",{className:c.a.title},h.a.createElement("b",null),h.a.createElement("span",null,"\u62BD\u9898\u7EC4\u5377"),h.a.createElement("div",null,"STEP2")," "),h.a.createElement("div",{className:c.a.source},h.a.createElement("b",null,"*"),h.a.createElement("span",null,"\u8BD5\u9898\u6765\u6E90"),h.a.createElement("aside",null,h.a.createElement("div",{onClick:function(){return _r("mine")}}," ",h.a.createElement(P.a,{checked:He==null?void 0:He.includes("mine")}),h.a.createElement("span",{style:{color:He!=null&&He.includes("mine")?"#007DFE":"#666666"}},"\u4EC5\u6211\u521B\u5EFA\u7684")),h.a.createElement("div",{className:"mb20",onClick:function(){return _r("teach_groups")}}," ",h.a.createElement(P.a,{checked:He==null?void 0:He.includes("teach_groups")}),h.a.createElement("span",{style:{color:He!=null&&He.includes("teach_groups")?"#007DFE":"#666666"}},"\u6559\u7814\u5171\u4EAB")),h.a.createElement("div",{onClick:function(){return _r("public")}},h.a.createElement(P.a,{checked:He==null?void 0:He.includes("public")}),h.a.createElement("span",{style:{color:He!=null&&He.includes("public")?"#007DFE":"#666666"}},"\u516C\u5171\u9898\u5E93"))),h.a.createElement("aside",null,(He==null?void 0:He.includes("mine"))&&h.a.createElement("div",{style:{marginBottom:14},className:c.a.folder,onClick:function(){Vi(!0),On(!0),Na.current=Tn,Ga((Ua==null?void 0:Ua.map(function($e){return $e.count}).reduce(function($e,De){return $e+De},0))||0)}},h.a.createElement("img",{src:me.a}),h.a.createElement("span",null,"\u9009\u62E9\u8BD5\u9898\u6587\u4EF6\u5939"),h.a.createElement(F.a,{title:"\u9009\u4E2D\u9879\u4EC5\u5305\u62EC\u8BE5\u6587\u4EF6\u5939\u4E0B\u7684\u8BD5\u9898\uFF0C\u4E0D\u5305\u62EC\u5B50\u6587\u4EF6\u5939\uFF0C\u4E14\u7CFB\u7EDF\u53D6\u60A8\u9009\u4E2D\u7684\u6587\u4EF6\u5939\u548C\u8003\u67E5\u8303\u56F4\u4E2D\u7684\u8BD5\u9898\u7684\u5E76\u96C6\u4F5C\u4E3A\u968F\u673A\u5BF9\u8C61\u3002"},h.a.createElement("img",{src:pe.a}))),(He==null?void 0:He.includes("teach_groups"))&&h.a.createElement("div",{className:c.a.folder,onClick:function(){Xt(!0),ba.current=Gt}},h.a.createElement("img",{src:be.a}),h.a.createElement("span",null,"\u9009\u62E9\u6559\u7814\u56E2\u961F")))),(He==null?void 0:He.includes("mine"))&&h.a.createElement("div",{className:c.a.choice},h.a.createElement("div",{className:c.a.name},h.a.createElement("b",null),h.a.createElement("span",null,"\u5DF2\u9009\u6587\u4EF6\u5939")),h.a.createElement(Ee.a,{type:2,value:Ua,onChange:function($e){var De=Tn.filter(function(nt){return nt!==$e}),_e={source:He,group_ids:De,tag_discipline_ids:Rt,teach_group_ids:Gt};Ja(_e),La(De),Na.current=De}})),(He==null?void 0:He.includes("teach_groups"))&&h.a.createElement("div",{className:c.a.choice},h.a.createElement("div",{className:c.a.name},h.a.createElement("b",null),h.a.createElement("span",null,"\u5DF2\u9009\u6559\u7814\u56E2\u961F")),h.a.createElement(Ee.a,{icon:ve.a,type:2,value:Ji,onChange:function($e){var De=Gt.filter(function(nt){return nt!==$e}),_e={source:He,group_ids:Tn,tag_discipline_ids:Rt,teach_group_ids:De};Ja(_e),gn(De),ba.current=De}})),h.a.createElement("div",{className:c.a.range},h.a.createElement("div",{className:c.a.name},h.a.createElement("b",null),h.a.createElement("span",null,"\u8003\u5BDF\u8303\u56F4")),h.a.createElement("div",{onClick:function(){if(Sn===null){Q.b.warn("\u8003\u5BDF\u8303\u56F4\u6CA1\u6709\u77E5\u8BC6\u70B9\u53EF\u4EE5\u9009\u62E9");return}xn.current=Rt,Vt(!0)},className:c.a.btn},h.a.createElement("img",{src:H.a})," \u9009\u62E9\u8303\u56F4"),h.a.createElement("div",{className:c.a.name},h.a.createElement("b",{className:c.a.num}),h.a.createElement("span",null,"\u5DF2\u9009\u77E5\u8BC6\u70B9")),h.a.createElement("div",{className:c.a.knWarp},Er==null?void 0:Er.map(function(tt,$e){return h.a.createElement(h.a.Fragment,{key:$e},h.a.createElement("div",{className:c.a.kn},h.a.createElement("span",null,$e+1)," ",h.a.createElement("span",null,tt==null?void 0:tt[0].parent_name)),h.a.createElement(Ee.a,{type:1,value:tt==null?void 0:tt.filter(function(De){return!!De.item_count}),onChange:function(_e){var nt=Rt.filter(function(st){return st!==_e}),qe={source:He,group_ids:Tn,tag_discipline_ids:nt,teach_group_ids:Gt};Ja(qe),an(nt),xn.current=nt}}))})))),console.log("-----",vn),h.a.createElement(we.a,{loading:Ft,active:!0,paragraph:{rows:5}},vn.map(function(tt,$e){return h.a.createElement(Ne.a,{key:$e,value:tt,onChange:function(_e){return wi(_e,$e)}})}),h.a.createElement("div",{className:c.a.btns},h.a.createElement(Se.a,{onClick:function(){rt(0),document.body.scrollIntoView()}},"\u4E0A\u4E00\u6B65"),h.a.createElement(Se.a,{loading:Xe,onClick:function(){return Si()}},"\u63D0\u4EA4"),h.a.createElement(Se.a,{loading:Zt,onClick:function(){return Vr()},type:"primary"},"\u9884\u89C8")))),h.a.createElement(m.a,{centered:!0,closable:!1,destroyOnClose:!0,className:c.a.modal,visible:Mn,title:null,width:"1200px",onOk:Zi,onCancel:Ci},h.a.createElement("div",{className:c.a.modalBody},h.a.createElement("div",{className:c.a.left},h.a.createElement("div",{className:c.a.title},h.a.createElement("img",{src:ee.a}),h.a.createElement("span",null,"\u8BD5\u9898\u8303\u56F4")),h.a.createElement("div",{className:c.a.l},wn==null?void 0:wn.map(function(tt){var $e=null,De=!1;if(!yt)De=!0;else{var _e;(_e=tt.sub_disciplines)===null||_e===void 0||_e.forEach(function(nt){var qe;(qe=nt.tag_disciplines)===null||qe===void 0||qe.forEach(function(st){if(!De){var It;De=((It=st.name)===null||It===void 0?void 0:It.includes(yt))&&st.item_count!==0}})})}return h.a.createElement(h.a.Fragment,{key:tt.id},!!tt.item_count&&De&&h.a.createElement("div",{onClick:function(){return Xn(tt.id)},className:"".concat(c.a.name," ").concat(tt.id===Sn?c.a.active:"")},h.a.createElement("b",null),h.a.createElement("span",null,tt.name)))}))),h.a.createElement("div",{className:c.a.right},h.a.createElement("div",{className:c.a.inputWarp},h.a.createElement(E,{onChange:function($e){return qt($e.target.value)},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9",value:yt})),h.a.createElement("div",{className:c.a.l},Fa==null?void 0:Fa.map(function(tt,$e){var De,_e=Object(W.a)(Object(W.a)({},tt),{},{tag_disciplines:tt==null||((De=tt.tag_disciplines)===null||De===void 0)?void 0:De.filter(function(nt){return nt.item_count!==0})});return h.a.createElement(pt,{search:yt,onChange:qi,key:tt.id,value:Rt,options:_e})}))))),h.a.createElement(m.a,{centered:!0,title:"\u9009\u62E9\u6587\u4EF6\u5939",visible:Yn,width:718,destroyOnClose:!0,onCancel:function(){La(Na.current),On(!1),Ga(0)},footer:h.a.createElement("div",{style:{display:"flex",alignItems:"center"}},h.a.createElement("span",{style:{flex:"1",textAlign:"left"}},"\u5DF2\u9009",Tn.length||0,"\u4E2A\u6587\u4EF6\u5939\uFF0C\u5171\uFF08",xi||0,"\uFF09\u9053\u9898"),h.a.createElement(Se.a,{onClick:function(){La(Na.current),Ga(0),On(!1)}},"\u53D6\u6D88"),h.a.createElement(Se.a,{type:"primary",onClick:function(){var $e={source:He,group_ids:Tn,tag_discipline_ids:Rt,teach_group_ids:Gt};Ja($e),Na.current=Tn,On(!1)}},"\u786E\u8BA4"))},h.a.createElement("aside",{className:c.a.exportModal},Gi&&h.a.createElement(ke,{treeData:$a,defaultValue:qa,value:Tn,onChange:function($e,De){var _e;Ga((_e=De.selectedNodes)===null||_e===void 0?void 0:_e.map(function(nt){return nt.count}).reduce(function(nt,qe){return nt+qe},0)),La($e)}}))),h.a.createElement(m.a,{centered:!0,title:"\u9009\u62E9\u6559\u7814\u56E2\u961F",visible:$t,width:718,destroyOnClose:!0,onCancel:function(){gn(ba.current),Xt(!1)},onOk:function(){var $e={source:He,group_ids:Tn,tag_discipline_ids:Rt,teach_group_ids:Gt};Ja($e),ba.current=Gt,Xt(!1)}},h.a.createElement("aside",{className:c.a.teachModal},h.a.createElement("div",{className:c.a.head},h.a.createElement("div",{className:c.a.li}),h.a.createElement("div",{className:c.a.li},"\u56E2\u961F\u540D\u79F0"),h.a.createElement("div",{className:c.a.li},"\u5171\u4EAB\u9898\u76EE\u6570\u91CF")),h.a.createElement("div",{className:c.a.wraps},sa==null?void 0:sa.map(function(tt){return h.a.createElement("div",{key:tt.id,className:c.a.body},h.a.createElement("div",{className:c.a.li},h.a.createElement(P.a,{onChange:function(){var De=tt.id,_e=Object(ye.a)(Gt);Gt.includes(De)?_e=_e.filter(function(nt){return nt!==De}):_e.push(De),gn(_e)},checked:Gt==null?void 0:Gt.includes(tt.id)})),h.a.createElement("div",{title:tt.name,className:c.a.li},tt.name),h.a.createElement("div",{className:c.a.li},tt.item_bank_count))})))))},k=T,p=M.a.TextArea,g=function(J){var ae=J.paperlibrary,se=J.user,rt=J.globalSetting,ze=J.dispatch,Te=Object(K.useState)(0),Ot=Object(oe.a)(Te,2),kt=Ot[0],it=Ot[1],Kt=q.a.useForm(),He=Object(oe.a)(Kt,1),zt=He[0],Ut=Object(K.useState)({}),gt=Object(oe.a)(Ut,2),Ft=gt[0],Pt=gt[1],ot=Object(K.useState)(!0),Qe=Object(oe.a)(ot,2),Xe=Qe[0],ft=Qe[1],Tt=Object(K.useState)(null),Dt=Object(oe.a)(Tt,2),Zt=Dt[0],Bt=Dt[1],ut=Object(te.i)().id;console.log(ut,"editId"),Object(K.useEffect)(function(){return ze({type:"globalSetting/footerToggle",payload:!1}),function(){ze({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(K.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var Yt=function(Mn){Pt(Object(W.a)({},zt.getFieldsValue()))};Object(K.useEffect)(function(){if(ut){yt();return}ft(!1)},[ut]);var yt=function(){var en=Object(y.a)(D.a.mark(function Mn(){var Vt,Ie,Ye,We,on,mn;return D.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.next=2,Object(et.a)("/api/examination_banks/".concat(ut,"/edit_random_exam.json"),{method:"get",params:{}});case 2:Vt=kn.sent,Vt!=null&&Vt.examination_bank&&(mn={difficulty:Vt==null||((Ie=Vt.examination_bank)===null||Ie===void 0)?void 0:Ie.difficulty,exam_notes:Vt==null||((Ye=Vt.examination_bank)===null||Ye===void 0)?void 0:Ye.exam_notes,name:Vt==null||((We=Vt.examination_bank)===null||We===void 0)?void 0:We.name,time:Vt==null||((on=Vt.examination_bank)===null||on===void 0)?void 0:on.time},ft(!1),Pt(Object(W.a)({},mn)),zt.setFieldsValue(Object(W.a)({},mn)),Bt(Object(W.a)(Object(W.a)({},Vt),{},{id:ut})));case 4:case"end":return kn.stop()}},Mn)}));return function(){return en.apply(this,arguments)}}(),qt=function(){var en=Object(y.a)(D.a.mark(function Mn(Vt){return D.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!(Vt===0)){Ye.next=3;break}return it(Vt),Ye.abrupt("return");case 3:return Ye.next=5,zt.validateFields();case 5:it(Vt);case 6:case"end":return Ye.stop()}},Mn)}));return function(Vt){return en.apply(this,arguments)}}(),Lt=function(Mn){var Vt=parseInt(Mn);return Object(Ce.isNaN)(Vt)?"":Vt};return h.a.createElement("section",{className:I.a.wrap},h.a.createElement(we.a,{loading:Xe,active:!0,paragraph:{rows:5}},h.a.createElement("div",{className:I.a.crumbs},h.a.createElement("b",null),h.a.createElement("span",{className:"current",onClick:function(){return he.d.push("/")}},"\u9996\u9875>"),h.a.createElement("span",{className:"current",onClick:function(){return he.d.push("/paperlibrary")}},"\u8BD5\u5377\u5E93>"),h.a.createElement("span",{style:{color:"#bebebe"}},"\u968F\u673A\u7EC4\u5377")),kt===0&&h.a.createElement(j,{value:kt,onChange:qt}),kt===0&&h.a.createElement("section",{className:I.a.oneWrap},h.a.createElement("div",{className:I.a.title},h.a.createElement("b",null),h.a.createElement("span",null,"\u57FA\u672C\u4FE1\u606F"),h.a.createElement("div",null,"STEP1")," "),h.a.createElement(q.a,{className:I.a.formWrap,form:zt,layout:"horizontal",onValuesChange:Yt},h.a.createElement(q.a.Item,{label:"\u8BD5\u5377\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"},{pattern:/^(?!(\s+$))/,message:"\u8F93\u5165\u6846\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C"}]},h.a.createElement(M.a,{className:I.a.in,bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0\uFF0C\u6700\u591A60\u4E2A\u5B57",maxLength:60})),h.a.createElement("div",{style:{position:"relative"}},h.a.createElement(q.a.Item,{label:"\u7B54\u9898\u65F6\u957F:",name:"time",rules:[{required:!0,message:"\u7B54\u9898\u65F6\u957F\u4E0D\u80FD\u4E3A\u7A7A"}]},h.a.createElement(S.a,{min:1,parser:Lt,max:9999,placeholder:"\u8BF7\u8F93\u5165\u7B54\u9898\u65F6\u957F",style:{width:190}})),h.a.createElement("span",{style:{position:"absolute",top:26,left:310}},"\u5206\u949F")),h.a.createElement(q.a.Item,{label:"\u8BD5\u9898\u96BE\u5EA6",name:"difficulty",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},h.a.createElement(fe.a.Group,{style:{display:"flex",width:286,justifyContent:"space-between"},size:"large"},h.a.createElement(fe.a.Button,{className:I.a.rb,value:1},"\u7B80\u5355"),h.a.createElement(fe.a.Button,{className:I.a.rb,value:2},"\u9002\u4E2D"),h.a.createElement(fe.a.Button,{className:I.a.rb,value:3},"\u56F0\u96BE"))),h.a.createElement(q.a.Item,{label:"\u8003\u8BD5\u987B\u77E5",name:"exam_notes"},h.a.createElement(p,{placeholder:"\u8003\u751F\u5FC5\u987B\u4E25\u683C\u9075\u5B88\u8003\u573A\u7EAA\u5F8B\uFF0C\u4E0D\u51C6\u5192\u540D\u9876\u66FF\uFF0C\u4E0D\u51C6\u6709\u4EFB\u4F55\u4F5C\u5F0A\u884C\u4E3A\u3002\u5982\u53D1\u73B0\u8FDD\u7EAA\uFF0C\u5E76\u7ED9\u4E88\u4E25\u5389\u5904\u5206\u3002",rows:4,maxLength:300}))),h.a.createElement("div",{className:I.a.btns},h.a.createElement(Se.a,{className:"mr40",onClick:function(){return he.d.push("/paperlibrary")}},"\u8FD4\u56DE"),h.a.createElement(Se.a,{type:"primary",onClick:Object(y.a)(D.a.mark(function en(){return D.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,zt.validateFields();case 2:it(1);case 3:case"end":return Vt.stop()}},en)}))},"\u4E0B\u4E00\u6B65"))),h.a.createElement(k,{tabs:kt,dispatch:ze,editData:Zt,setFatherTabs:it,formValue:Ft})))},w=je.default=Object(he.a)(function(C){var J=C.paperlibrary,ae=C.user,se=C.globalSetting;return{paperlibrary:J,user:ae,globalSetting:se}})(g)},"E/GV":function(Ge,je,l){Ge.exports=l.p+"static/swenjianjia.1640bf70.svg"},ELLl:function(Ge,je,l){(function(G){G(l("VrN/"))})(function(G){var we={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},re=G.Pos;G.defineOption("autoCloseBrackets",!1,function(M,N,D){D&&D!=G.Init&&(M.removeKeyMap(xe),M.state.closeBrackets=null),N&&(fe(Se(N,"pairs")),M.state.closeBrackets=N,M.addKeyMap(xe))});function Se(M,N){return N=="pairs"&&typeof M=="string"?M:typeof M=="object"&&M[N]!=null?M[N]:we[N]}var xe={Backspace:y,Enter:W};function fe(M){for(var N=0;N<M.length;N++){var D=M.charAt(N),K="'"+D+"'";xe[K]||(xe[K]=$(D))}}fe(we.pairs+"`");function $(M){return function(N){return q(N,M)}}function S(M){var N=M.state.closeBrackets;if(!N||N.override)return N;var D=M.getModeAt(M.getCursor());return D.closeBrackets||N}function y(M){var N=S(M);if(!N||M.getOption("disableInput"))return G.Pass;for(var D=Se(N,"pairs"),K=M.listSelections(),h=0;h<K.length;h++){if(!K[h].empty())return G.Pass;var te=oe(M,K[h].head);if(!te||D.indexOf(te)%2!=0)return G.Pass}for(var h=K.length-1;h>=0;h--){var he=K[h].head;M.replaceRange("",re(he.line,he.ch-1),re(he.line,he.ch+1),"+delete")}}function W(M){var N=S(M),D=N&&Se(N,"explode");if(!D||M.getOption("disableInput"))return G.Pass;for(var K=M.listSelections(),h=0;h<K.length;h++){if(!K[h].empty())return G.Pass;var te=oe(M,K[h].head);if(!te||D.indexOf(te)%2!=0)return G.Pass}M.operation(function(){var he=M.lineSeparator()||`
`;M.replaceSelection(he+he,null),M.execCommand("goCharLeft"),K=M.listSelections();for(var Z=0;Z<K.length;Z++){var I=K[Z].head.line;M.indentLine(I,null,!0),M.indentLine(I+1,null,!0)}})}function Y(M){var N=G.cmpPos(M.anchor,M.head)>0;return{anchor:new re(M.anchor.line,M.anchor.ch+(N?-1:1)),head:new re(M.head.line,M.head.ch+(N?1:-1))}}function q(M,N){var D=S(M);if(!D||M.getOption("disableInput"))return G.Pass;var K=Se(D,"pairs"),h=K.indexOf(N);if(h==-1)return G.Pass;for(var te=Se(D,"closeBefore"),he=Se(D,"triples"),Z=K.charAt(h+1)==N,I=M.listSelections(),d=h%2==0,V,b=0;b<I.length;b++){var j=I[b],v=j.head,m,L=M.getRange(v,re(v.line,v.ch+1));if(d&&!j.empty())m="surround";else if((Z||!d)&&L==N)Z&&z(M,v)?m="both":he.indexOf(N)>=0&&M.getRange(v,re(v.line,v.ch+3))==N+N+N?m="skipThree":m="skip";else if(Z&&v.ch>1&&he.indexOf(N)>=0&&M.getRange(re(v.line,v.ch-2),v)==N+N){if(v.ch>2&&/\bstring/.test(M.getTokenTypeAt(re(v.line,v.ch-2))))return G.Pass;m="addFour"}else if(Z){var P=v.ch==0?" ":M.getRange(re(v.line,v.ch-1),v);if(!G.isWordChar(L)&&P!=N&&!G.isWordChar(P))m="both";else return G.Pass}else if(d&&(L.length===0||/\s/.test(L)||te.indexOf(L)>-1))m="both";else return G.Pass;if(!V)V=m;else if(V!=m)return G.Pass}var _=h%2?K.charAt(h-1):N,F=h%2?N:K.charAt(h+1);M.operation(function(){if(V=="skip")M.execCommand("goCharRight");else if(V=="skipThree")for(var ue=0;ue<3;ue++)M.execCommand("goCharRight");else if(V=="surround"){for(var Q=M.getSelections(),ue=0;ue<Q.length;ue++)Q[ue]=_+Q[ue]+F;M.replaceSelections(Q,"around"),Q=M.listSelections().slice();for(var ue=0;ue<Q.length;ue++)Q[ue]=Y(Q[ue]);M.setSelections(Q)}else V=="both"?(M.replaceSelection(_+F,null),M.triggerElectric(_+F),M.execCommand("goCharLeft")):V=="addFour"&&(M.replaceSelection(_+_+_+_,"before"),M.execCommand("goCharRight"))})}function oe(M,N){var D=M.getRange(re(N.line,N.ch-1),re(N.line,N.ch+1));return D.length==2?D:null}function z(M,N){var D=M.getTokenAt(re(N.line,N.ch+1));return/\bstring/.test(D.type)&&D.start==N.ch&&(N.ch==0||!/\bstring/.test(M.getTokenTypeAt(N)))}})},FTkQ:function(Ge,je){Ge.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABjUlEQVQ4T61VsUoDQRB9s+eVYifkUlqIWCW3sbBMqYUR0cbfUPETxPgZ2giigpZaCnKXpBK1sMydpIx25+7ISu5ILhsjclvuzLx5M292lmA57PtuF2gIYIMBSYBn3BiICAg1cF0GrqjVSvLhlL+IqtVNEDUZWLAlS+8IeAPzvtduXw77ZYAMiEjKI2LeY2AskQ2cAGaiEy8MDwnQxicL7Ep5bDL+xmqijahZDsODDHBQ5sVfmVn6xmDeMuWTESAGnqf1bBpz09MSsESx729r4DwfIIA6hPjUSt2AaP7Hztwj5nXHdd0vpR7yMQzsUOT7pwzsjgEKsVIKgiCu1Za1UvfGLhynXgqCp6hSkSxEYCn9jLq+/wJgcawk5l4KYECN3YBlCVLWo4GvhmGfgVlrj4ZAjX0KmBmZD8Owj4IAMQAsvGSrKKR1zet0QpsosZQrmvnRKsqksZlxnFWVJAkT3Y6MDbAmgDlFdGcdm8IH22Qp9OmltAtdDoPlWez6SpkWtmCHFTNCvQMN/scX8A1e4fnIOEHt8AAAAABJRU5ErkJggg=="},Gytx:function(Ge,je){Ge.exports=function(G,we,re,Se){var xe=re?re.call(Se,G,we):void 0;if(xe!==void 0)return!!xe;if(G===we)return!0;if(typeof G!="object"||!G||typeof we!="object"||!we)return!1;var fe=Object.keys(G),$=Object.keys(we);if(fe.length!==$.length)return!1;for(var S=Object.prototype.hasOwnProperty.bind(we),y=0;y<fe.length;y++){var W=fe[y];if(!S(W))return!1;var Y=G[W],q=we[W];if(xe=re?re.call(Se,Y,q,W):void 0,xe===!1||xe===void 0&&Y!==q)return!1}return!0}},HG2Q:function(Ge,je,l){Ge.exports=l.p+"static/sren.1cbce50b.svg"},HPRh:function(Ge,je,l){Ge.exports=l.p+"static/median.766cb706.svg"},Hfvn:function(Ge,je,l){Ge.exports=l.p+"static/wenjian.ea3b4170.svg"},HmJG:function(Ge,je,l){},IlMy:function(Ge,je,l){Ge.exports={flex_box_center:"flex_box_center___1Rd7-",flex_space_between:"flex_space_between___1qdJI",flex_box_vertical_center:"flex_box_vertical_center___3PScB",flex_box_center_end:"flex_box_center_end___gmzWk",flex_box_column:"flex_box_column___qhFY7",wrap:"wrap___2CDxR",left:"left___21M_k",list:"list___ahv58",name:"name___3cBep",b:"b___1CRFh",r:"r___2F_9I",l:"l___3XCXI",total:"total___2VTdV",topWarp:"topWarp___y9feY",right:"right___U2Z5M",tabs:"tabs___3eZK5",title:"title___3iKxF",source:"source___3rkh5",folder:"folder___AxGOK",choice:"choice___1AdWh",range:"range___23nFr",btn:"btn___1QiCj",knWarp:"knWarp___3eQQ5",kn:"kn___1OLj0",btns:"btns___26z5C",modalBody:"modalBody___1b2lK",active:"active___kELz6",inputWarp:"inputWarp___1leis",modal:"modal___1Ehn0",exportModal:"exportModal___1Vsj-",teachModal:"teachModal___CwfeZ",head:"head___2_Y6a",wraps:"wraps___3-f7m",body:"body___2Jb5Z"}},K5AI:function(Ge,je,l){Ge.exports={cInput:"cInput___2BJRi",cl:"cl___AbKoK",box:"box___3gRA9",box1:"box1___S3u_s",cr:"cr___16yEi"}},LdHM:function(Ge,je,l){"use strict";l.d(je,"b",function(){return te}),l.d(je,"a",function(){return Z});var G=l("1OyB"),we=l("vuIU"),re=l("Ji7U"),Se=l("LK+K"),xe=l("cDcd"),fe=l("rePB"),$=l("Ff2n"),S=l("ODXe"),y=l("4IlW"),W=l("bX4T"),Y=l("YrtM"),q=l("TSYQ"),oe=l.n(q),z=l("+nKL"),M=l("8OUc"),N=function(X,ge){var pe=X.prefixCls,Oe=X.id,me=X.flattenOptions,de=X.childrenAsData,H=X.values,A=X.searchValue,ee=X.multiple,O=X.defaultActiveFirstOption,x=X.height,ie=X.itemHeight,Pe=X.notFoundContent,Fe=X.open,be=X.menuItemSelectedIcon,Ae=X.virtual,ve=X.onSelect,Ee=X.onToggleOpen,Ne=X.onActiveValue,Be=X.onScroll,Je=X.onMouseEnter,Me="".concat(pe,"-item"),Ce=Object(Y.a)(function(){return me},[Fe,me],function(Ue,E){return E[0]&&Ue[1]!==E[1]}),lt=xe.useRef(null),at=function(E){E.preventDefault()},pt=function(E){lt.current&&lt.current.scrollTo({index:E})},et=function(E){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=Ce.length,p=0;p<k;p+=1){var g=(E+p*T+k)%k,w=Ce[g],C=w.group,J=w.data;if(!C&&!J.disabled)return g}return-1},_t=xe.useState(function(){return et(0)}),vt=Object(S.a)(_t,2),ht=vt[0],Re=vt[1],wt=function(E){Re(E);var T=Ce[E];if(!T){Ne(null,-1);return}Ne(T.data.value,E)};xe.useEffect(function(){wt(O!==!1?et(0):-1)},[Ce.length,A]),xe.useEffect(function(){var Ue=setTimeout(function(){if(!ee&&Fe&&H.size===1){var E=Array.from(H)[0],T=Ce.findIndex(function(k){var p=k.data;return p.value===E});wt(T),pt(T)}});return function(){return clearTimeout(Ue)}},[Fe]);var mt=function(E){E!==void 0&&ve(E,{selected:!H.has(E)}),ee||Ee(!1)};if(xe.useImperativeHandle(ge,function(){return{onKeyDown:function(E){var T=E.which;switch(T){case y.a.UP:case y.a.DOWN:{var k=0;if(T===y.a.UP?k=-1:T===y.a.DOWN&&(k=1),k!==0){var p=et(ht+k,k);pt(p),wt(p)}break}case y.a.ENTER:{var g=Ce[ht];g&&!g.data.disabled?mt(g.data.value):mt(void 0),Fe&&E.preventDefault();break}case y.a.ESC:Ee(!1)}},onKeyUp:function(){},scrollTo:function(E){pt(E)}}}),Ce.length===0)return xe.createElement("div",{role:"listbox",id:"".concat(Oe,"_list"),className:"".concat(Me,"-empty"),onMouseDown:at},Pe);function ke(Ue){var E=Ce[Ue];if(!E)return null;var T=E.data||{},k=T.value,p=T.label,g=T.children,w=Object(W.a)(T,!0),C=de?g:p;return E?xe.createElement("div",Object.assign({"aria-label":typeof C=="string"?C:null},w,{key:Ue,role:"option",id:"".concat(Oe,"_list_").concat(Ue),"aria-selected":H.has(k)}),k):null}return xe.createElement(xe.Fragment,null,xe.createElement("div",{role:"listbox",id:"".concat(Oe,"_list"),style:{height:0,width:0,overflow:"hidden"}},ke(ht-1),ke(ht),ke(ht+1)),xe.createElement(z.a,{itemKey:"key",ref:lt,data:Ce,height:x,itemHeight:ie,fullHeight:!1,onMouseDown:at,onScroll:Be,virtual:Ae,onMouseEnter:Je},function(Ue,E){var T,k=Ue.group,p=Ue.groupOption,g=Ue.data,w=g.label,C=g.key;if(k)return xe.createElement("div",{className:oe()(Me,"".concat(Me,"-group"))},w!==void 0?w:C);var J=g.disabled,ae=g.value,se=g.title,rt=g.children,ze=g.style,Te=g.className,Ot=Object($.a)(g,["disabled","value","title","children","style","className"]),kt=H.has(ae),it="".concat(Me,"-option"),Kt=oe()(Me,it,Te,(T={},Object(fe.a)(T,"".concat(it,"-grouped"),p),Object(fe.a)(T,"".concat(it,"-active"),ht===E&&!J),Object(fe.a)(T,"".concat(it,"-disabled"),J),Object(fe.a)(T,"".concat(it,"-selected"),kt),T)),He=de?rt:w,zt=!be||typeof be=="function"||kt;return xe.createElement("div",Object.assign({},Ot,{"aria-selected":kt,className:Kt,title:se,onMouseMove:function(){if(ht===E||J)return;wt(E)},onClick:function(){J||mt(ae)},style:ze}),xe.createElement("div",{className:"".concat(it,"-content")},He||ae),xe.isValidElement(be)||kt,zt&&xe.createElement(M.a,{className:"".concat(Me,"-option-state"),customizeIcon:be,customizeIconProps:{isSelected:kt}},kt?"\u2713":null))}))},D=xe.forwardRef(N);D.displayName="OptionList";var K=D,h=function(){return null};h.isSelectOption=!0;var te=h,he=function(){return null};he.isSelectOptGroup=!0;var Z=he,I=l("VTBJ"),d=l("Zm9Q");function V(c){var X=c.key,ge=c.props,pe=ge.children,Oe=ge.value,me=Object($.a)(ge,["children","value"]);return Object(I.a)({key:X,value:Oe!==void 0?Oe:X,children:pe},me)}function b(c){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(d.a)(c).map(function(ge,pe){if(!xe.isValidElement(ge)||!ge.type)return null;var Oe=ge.type.isSelectOptGroup,me=ge.key,de=ge.props,H=de.children,A=Object($.a)(de,["children"]);return X||!Oe?V(ge):Object(I.a)(Object(I.a)({key:"__RC_SELECT_GRP__".concat(me===null?pe:me,"__"),label:me},A),{},{options:b(H)})}).filter(function(ge){return ge})}var j=l("2Qr1"),v=l("qNPg"),m=l("U8pU"),L=l("Kwbf"),P=l("WKfj");function _(c){var X=c.mode,ge=c.options,pe=c.children,Oe=c.backfill,me=c.allowClear,de=c.placeholder,H=c.getInputElement,A=c.showSearch,ee=c.onSearch,O=c.defaultOpen,x=c.autoFocus,ie=c.labelInValue,Pe=c.value,Fe=c.inputValue,be=c.optionLabelProp,Ae=X==="multiple"||X==="tags",ve=A!==void 0?A:Ae||X==="combobox",Ee=ge||b(pe);if(Object(L.a)(X!=="tags"||Ee.every(function(Me){return!Me.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ne=Ee.some(function(Me){return Me.options?Me.options.some(function(Ce){return typeof("value"in Ce?Ce.value:Ce.key)=="number"}):typeof("value"in Me?Me.value:Me.key)=="number"});Object(L.a)(!Ne,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(L.a)(X!=="combobox"||!be,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(L.a)(X==="combobox"||!Oe,"`backfill` only works with `combobox` mode."),Object(L.a)(X==="combobox"||!H,"`getInputElement` only work with `combobox` mode."),Object(L.b)(X!=="combobox"||!H||!me||!de,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ee&&!ve&&X!=="combobox"&&X!=="tags"&&Object(L.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(L.b)(!O||x,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pe!=null){var Be=Object(P.d)(Pe);Object(L.a)(!ie||Be.every(function(Me){return Object(m.a)(Me)==="object"&&("key"in Me||"value"in Me)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(L.a)(!Ae||Array.isArray(Pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(pe){var Je=null;Object(d.a)(pe).some(function(Me){if(!xe.isValidElement(Me)||!Me.type)return!1;var Ce=Me.type;if(Ce.isSelectOption)return!1;if(Ce.isSelectOptGroup){var lt=Object(d.a)(Me.props.children).every(function(at){return!xe.isValidElement(at)||!Me.type||at.type.isSelectOption?!0:(Je=at.type,!1)});return!lt}return Je=Ce,!0}),Je&&Object(L.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Je.displayName||Je.name||Je,"`.")),Object(L.a)(Fe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var F=_,ue=Object(v.a)({prefixCls:"rc-select",components:{optionList:K},convertChildrenToData:b,flattenOptions:j.d,getLabeledValue:j.e,filterOptions:j.b,isValueDisabled:j.g,findValueOption:j.c,warningProps:F,fillOptionsWithMissingValue:j.a}),Q=function(c){Object(re.a)(ge,c);var X=Object(Se.a)(ge);function ge(){var pe;return Object(G.a)(this,ge),pe=X.apply(this,arguments),pe.selectRef=xe.createRef(),pe.focus=function(){pe.selectRef.current.focus()},pe.blur=function(){pe.selectRef.current.blur()},pe}return Object(we.a)(ge,[{key:"render",value:function(){return xe.createElement(ue,Object.assign({ref:this.selectRef},this.props))}}]),ge}(xe.Component);Q.Option=te,Q.OptGroup=Z;var ye=Q,R=je.c=ye},M8RZ:function(Ge,je,l){"use strict";l.d(je,"a",function(){return y});var G=l("fWQN"),we=l("mtLc"),re=l("yKVA"),Se=l("879j"),xe=l("cDcd"),fe=l.n(xe),$=l("faye"),S=l.n($),y=function(W){Object(re.a)(q,W);var Y=Object(Se.a)(q);function q(oe){var z;Object(G.a)(this,q),z=Y.call(this,oe);var M=window.document;return z.node=M.createElement("div"),M.body.appendChild(z.node),z}return Object(we.a)(q,[{key:"render",value:function(){var z=this.props.children;return Object($.createPortal)(z,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),q}(fe.a.Component)},NvD2:function(Ge,je,l){"use strict";l.d(je,"a",function(){return fe});var G=l("Kwbf");function we($,S){var y=new Set;return $.forEach(function(W){S.has(W)||y.add(W)}),y}function re($){var S=$||{},y=S.disabled,W=S.disableCheckbox,Y=S.checkable;return!!(y||W)||Y===!1}function Se($,S,y,W){for(var Y=new Set($),q=new Set,oe=0;oe<=y;oe+=1){var z=S.get(oe)||new Set;z.forEach(function(K){var h=K.key,te=K.node,he=K.children,Z=he===void 0?[]:he;Y.has(h)&&!W(te)&&Z.filter(function(I){return!W(I.node)}).forEach(function(I){Y.add(I.key)})})}for(var M=new Set,N=y;N>=0;N-=1){var D=S.get(N)||new Set;D.forEach(function(K){var h=K.parent,te=K.node;if(W(te)||!K.parent||M.has(K.parent.key))return;if(W(K.parent.node)){M.add(h.key);return}var he=!0,Z=!1;(h.children||[]).filter(function(I){return!W(I.node)}).forEach(function(I){var d=I.key,V=Y.has(d);he&&!V&&(he=!1),!Z&&(V||q.has(d))&&(Z=!0)}),he&&Y.add(h.key),Z&&q.add(h.key),M.add(h.key)})}return{checkedKeys:Array.from(Y),halfCheckedKeys:Array.from(we(q,Y))}}function xe($,S,y,W,Y){for(var q=new Set($),oe=new Set(S),z=0;z<=W;z+=1){var M=y.get(z)||new Set;M.forEach(function(h){var te=h.key,he=h.node,Z=h.children,I=Z===void 0?[]:Z;!q.has(te)&&!oe.has(te)&&!Y(he)&&I.filter(function(d){return!Y(d.node)}).forEach(function(d){q.delete(d.key)})})}oe=new Set;for(var N=new Set,D=W;D>=0;D-=1){var K=y.get(D)||new Set;K.forEach(function(h){var te=h.parent,he=h.node;if(Y(he)||!h.parent||N.has(h.parent.key))return;if(Y(h.parent.node)){N.add(te.key);return}var Z=!0,I=!1;(te.children||[]).filter(function(d){return!Y(d.node)}).forEach(function(d){var V=d.key,b=q.has(V);Z&&!b&&(Z=!1),!I&&(b||oe.has(V))&&(I=!0)}),Z||q.delete(te.key),I&&oe.add(te.key),N.add(te.key)})}return{checkedKeys:Array.from(q),halfCheckedKeys:Array.from(we(oe,q))}}function fe($,S,y,W){var Y=[],q;W?q=W:q=re;var oe=new Set($.filter(function(D){var K=!!y[D];return K||Y.push(D),K})),z=new Map,M=0;Object.keys(y).forEach(function(D){var K=y[D],h=K.level,te=z.get(h);te||(te=new Set,z.set(h,te)),te.add(K),M=Math.max(M,h)}),Object(G.a)(!Y.length,"Tree missing follow keys: ".concat(Y.slice(0,100).map(function(D){return"'".concat(D,"'")}).join(", ")));var N;return S===!0?N=Se(oe,z,M,q):N=xe(oe,S.halfCheckedKeys,z,M,q),N}},O2Wb:function(Ge,je,l){Ge.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES:function(Ge,je,l){"use strict";var G=l("U8pU"),we=l("VTBJ"),re=l("Ff2n"),Se=l("cDcd"),xe=l("uciX"),fe=l("7ixt"),$=function(oe){var z=oe.overlay,M=oe.prefixCls,N=oe.id,D=oe.overlayInnerStyle;return Se.createElement("div",{className:"".concat(M,"-inner"),id:N,role:"tooltip",style:D},typeof z=="function"?z():z)},S=$,y=function(oe,z){var M=oe.overlayClassName,N=oe.trigger,D=N===void 0?["hover"]:N,K=oe.mouseEnterDelay,h=K===void 0?0:K,te=oe.mouseLeaveDelay,he=te===void 0?.1:te,Z=oe.overlayStyle,I=oe.prefixCls,d=I===void 0?"rc-tooltip":I,V=oe.children,b=oe.onVisibleChange,j=oe.afterVisibleChange,v=oe.transitionName,m=oe.animation,L=oe.placement,P=L===void 0?"right":L,_=oe.align,F=_===void 0?{}:_,ue=oe.destroyTooltipOnHide,Q=ue===void 0?!1:ue,ye=oe.defaultVisible,R=oe.getTooltipContainer,c=oe.overlayInnerStyle,X=Object(re.a)(oe,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ge=Object(Se.useRef)(null);Object(Se.useImperativeHandle)(z,function(){return ge.current});var pe=Object(we.a)({},X);"visible"in oe&&(pe.popupVisible=oe.visible);var Oe=function(){var ee=oe.arrowContent,O=ee===void 0?null:ee,x=oe.overlay,ie=oe.id;return[Se.createElement("div",{className:"".concat(d,"-arrow"),key:"arrow"},O),Se.createElement(S,{key:"content",prefixCls:d,id:ie,overlay:x,overlayInnerStyle:c})]},me=!1,de=!1;if(typeof Q=="boolean")me=Q;else if(Q&&Object(G.a)(Q)==="object"){var H=Q.keepParent;me=H===!0,de=H===!1}return Se.createElement(xe.a,Object.assign({popupClassName:M,prefixCls:d,popup:Oe,action:D,builtinPlacements:fe.a,popupPlacement:P,ref:ge,popupAlign:F,getPopupContainer:R,onPopupVisibleChange:b,afterPopupVisibleChange:j,popupTransitionName:v,popupAnimation:m,defaultPopupVisible:ye,destroyPopupOnHide:me,autoDestroy:de,mouseLeaveDelay:he,popupStyle:Z,mouseEnterDelay:h},pe),V)},W=Object(Se.forwardRef)(y),Y=je.a=W},OZM5:function(Ge,je,l){"use strict";l.d(je,"b",function(){return W}),l.d(je,"a",function(){return Y}),l.d(je,"k",function(){return q}),l.d(je,"h",function(){return oe}),l.d(je,"i",function(){return z}),l.d(je,"g",function(){return M}),l.d(je,"c",function(){return N}),l.d(je,"d",function(){return D}),l.d(je,"j",function(){return te}),l.d(je,"e",function(){return he}),l.d(je,"f",function(){return Z});var G=l("KQm4"),we=l("U8pU"),re=l("Ff2n"),Se=l("cDcd"),xe=l.n(Se),fe=l("Kwbf"),$=l("WaYH"),S=.25,y=2;function W(I,d){var V=I.slice(),b=V.indexOf(d);return b>=0&&V.splice(b,1),V}function Y(I,d){var V=I.slice();return V.indexOf(d)===-1&&V.push(d),V}function q(I){return I.split("-")}function oe(I,d){return"".concat(I,"-").concat(d)}function z(I){return I&&I.type&&I.type.isTreeNode}function M(I,d){var V=[I],b=d[I];function j(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];v.forEach(function(m){var L=m.key,P=m.children;V.push(L),j(P)})}return j(b.children),V}function N(I,d){var V=I.clientY,b=d.selectHandle.getBoundingClientRect(),j=b.top,v=b.bottom,m=b.height,L=Math.max(m*S,y);return V<=j+L?-1:V>=v-L?1:0}function D(I,d){if(!I)return;var V=d.multiple;return V?I.slice():I.length?[I[0]]:I}var K=function(d){return d};function h(I,d){if(!I)return[];var V=d||{},b=V.processProps,j=b===void 0?K:b,v=Array.isArray(I)?I:[I];return v.map(function(m){var L=m.children,P=Object(re.a)(m,["children"]),_=h(L,d);return xe.a.createElement($.a,Object.assign({},j(P)),_)})}function te(I){if(!I)return null;var d;if(Array.isArray(I))d={checkedKeys:I,halfCheckedKeys:void 0};else if(Object(we.a)(I)==="object")d={checkedKeys:I.checked||void 0,halfCheckedKeys:I.halfChecked||void 0};else return Object(fe.a)(!1,"`checkedKeys` is not an array or an object"),null;return d}function he(I,d){var V=new Set;function b(j){if(V.has(j))return;var v=d[j];if(!v)return;V.add(j);var m=v.parent,L=v.node;if(L.disabled)return;m&&b(m.key)}return(I||[]).forEach(function(j){b(j)}),Object(G.a)(V)}function Z(I){var d={};return Object.keys(I).forEach(function(V){(V.startsWith("data-")||V.startsWith("aria-"))&&(d[V]=I[V])}),d}},Ot1p:function(Ge,je,l){"use strict";var G=l("2qtc"),we=l("kLXV"),re=l("rAM+"),Se=l("miYZ"),xe=l("tsqr"),fe=l("tJVT"),$=l("jrin"),S=l("cDcd"),y=l.n(S),W=l("VrN/"),Y=l.n(W),q=l("bdgK"),oe=l("p77/"),z=l("Bd2K"),M=l("ELLl"),N=l("19Vz"),D=l("lZu9"),K=l("+NIl"),h=l("kSUc"),te=l("9Bee"),he=function(E){var T=E.value,k=T===void 0?"":T,p=E.className,g=E.showTextOnly,w=E.showLines,C=E.style,J=C===void 0?{}:C,ae=Object(S.useMemo)(function(){return""},[k]);return y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{dangerouslySetInnerHTML:{__html:ae}}))},Z=l("0Owb"),I=l("dejd"),d=l("C+DQ"),V=[{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 b(E){var T=E.onActionCallback,k=E.title,p=E.icon,g=E.actionName,w=E.className,C=w===void 0?"":w,J=E.children;function ae(){T(g)}return y.a.createElement("a",{title:k,className:C,onClick:ae},y.a.createElement("i",{className:"md-iconfont ".concat(p)}),J)}var j=function(E){var T=E.watch,k=E.showNullButton,p=E.onActionCallback,g=E.fullScreen,w=E.insertTemp,C=E.hidetoolBar,J=[].concat(V,[{title:"".concat(T?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(T?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return y.a.createElement("ul",{className:"markdown-toolbar-container"},!C&&J.map(function(ae,se){return y.a.createElement("li",{key:se},ae.actionName?y.a.createElement(b,Object(Z.a)({},ae,{onActionCallback:p})):y.a.createElement("span",{className:"v-line"}))}),k?y.a.createElement("li",null,y.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:p},y.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,w&&y.a.createElement("li",null,y.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(w),onActionCallback:p},y.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),y.a.createElement("li",{className:"btn-full-screen"},y.a.createElement(b,{icon:"".concat(g?"icon-shrink":"icon-enlarge"),title:g?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:p})))},v=l("M8RZ"),m=l("+L6B"),L=l("2/Rp"),P=l("y8nQ"),_=l("Vl3Y"),F=l("5NDa"),ue=l("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},ye=function(E){var T=E.callback,k=E.onCancel;function p(g){T(g)}return y.a.createElement(_.a,Object(Z.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:p}),y.a.createElement(_.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},y.a.createElement(ue.a,null)),y.a.createElement(_.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},y.a.createElement(ue.a,null)),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(L.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))},R=l("7ahc"),c=l("HmJG"),X=l("BjJ7"),ge=_.a.useForm,pe={width:280,marginRight:10},Oe={labelCol:{span:5},wrapperCol:{span:19}},me=function(E){var T=E.callback,k=E.onCancel,p=ge(),g=Object(fe.a)(p,1),w=g[0];function C(se){T(se)}function J(se,rt){w.setFieldsValue({src:"/api/attachments/".concat(se.id),type:rt.type})}function ae(se){var rt=se.target.files[0];H(rt,J)}return y.a.createElement(_.a,Object(Z.a)({form:w},Oe,{className:"upload-image-panel",onFinish:C}),y.a.createElement(_.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},y.a.createElement("div",{className:"flex-container"},y.a.createElement(_.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},y.a.createElement(ue.a,{style:pe})),y.a.createElement(de,{onFileChange:ae}))),y.a.createElement(_.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},y.a.createElement(ue.a,{style:{width:264}})),y.a.createElement(_.a.Item,{style:{textAlign:"right"}},y.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(L.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function de(E){var T=E.onFileChange;return y.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",y.a.createElement("input",{type:"file",onChange:T}))}function H(E,T){if(!E)throw new String("\u6CA1\u6709\u6587\u4EF6");var k=new FormData;k.append("editormd-image-file",E),k.append("file_param_name","editormd-image-file"),k.append("byxhr","true");var p=new window.XMLHttpRequest;p.withCredentials=!0,p.addEventListener("load",function(g){T(JSON.parse(g.target.responseText),E)},!1),p.addEventListener("error",function(g){console.error(g)},!1),p.open("POST","".concat(X.a,"/api/attachments.json")),p.send(k)}var A=l("giR+"),ee=l("fyUT"),O=l("7Kak"),x=l("9yH6"),ie=x.a.Group,Pe={margin:"0 8px"},Fe=function(E){var T=E.callback,k=E.onCancel;function p(g){T(g)}return y.a.createElement(_.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:p},y.a.createElement("div",{className:"flex-container"},y.a.createElement("span",{style:Pe},"\u5355\u5143\u683C\u6570\uFF1A"),y.a.createElement("span",{style:Pe},"\u884C\u6570"),y.a.createElement(_.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},y.a.createElement(ee.a,null)),y.a.createElement("span",{style:Pe},"\u5217\u6570"),y.a.createElement(_.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},y.a.createElement(ee.a,null))),y.a.createElement("div",{className:"flex-container",style:{marginTop:12}},y.a.createElement("span",{style:Pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),y.a.createElement(_.a.Item,{name:"align"},y.a.createElement(ie,null,y.a.createElement(x.a,{value:"default"},y.a.createElement("i",{className:"fa fa-align-justify"})),y.a.createElement(x.a,{value:"left"},y.a.createElement("i",{className:"fa fa-align-left"})),y.a.createElement(x.a,{value:"center"},y.a.createElement("i",{className:"fa fa-align-center"})),y.a.createElement(x.a,{value:"right"},y.a.createElement("i",{className:"fa fa-align-right"}))))),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(L.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))},be=l("m3rI"),Ae="link",ve="upload-image",Ee="code-block",Ne="add-table",Be="------------",Je={default:Be,left:":".concat(Be),center:":".concat(Be,":"),right:"".concat(Be,":")},Me=l("9VGf"),Ce,lt;function at(){}var pt=0,et=1e4,_t="\u2581",vt=`
**\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 ht(E){return/^\d+$/.test(E)?"".concat(E,"px"):E}var Re=navigator.platform.toUpperCase().indexOf("MAC")>=0,wt=Re?"Cmd":"Ctrl",mt=(Ce={},Object($.a)(Ce,wt+"-B","bold"),Object($.a)(Ce,wt+"-I","italic"),Ce),ke=(lt={},Object($.a)(lt,Ae,"\u6DFB\u52A0\u94FE\u63A5"),Object($.a)(lt,Ee,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object($.a)(lt,ve,"\u6DFB\u52A0\u56FE\u7247"),Object($.a)(lt,Ne,"\u6DFB\u52A0\u8868\u683C"),lt),Ue=je.a=function(E){var T=E.defaultValue,k=T===void 0?"":T,p=E.onChange,g=E.width,w=g===void 0?"100%":g,C=E.height,J=C===void 0?400:C,ae=E.miniToolbar,se=ae===void 0?!1:ae,rt=E.isFocus,ze=rt===void 0?!1:rt,Te=E.watch,Ot=E.insertTemp,kt=E.mode,it=kt===void 0?"markdown":kt,Kt=E.id,He=Kt===void 0?"markdown-editor-id":Kt,zt=E.showResizeBar,Ut=zt===void 0?!1:zt,gt=E.noStorage,Ft=gt===void 0?!1:gt,Pt=E.showNullButton,ot=Pt===void 0?!1:Pt,Qe=E.hidetoolBar,Xe=Qe===void 0?!1:Qe,ft=E.fullScreen,Tt=ft===void 0?!1:ft,Dt=E.onBlur,Zt=E.onCMBeforeChange,Bt=E.onFullScreen,ut=E.className,Yt=ut===void 0?"":ut,yt=E.disablePaste,qt=yt===void 0?!1:yt,Lt=E.placeholder,en=Lt===void 0?"":Lt,Mn=E.values,Vt=Mn===void 0?"":Mn,Ie=Object(S.useState)(null),Ye=Object(fe.a)(Ie,2),We=Ye[0],on=Ye[1],mn=Object(S.useState)(k),En=Object(fe.a)(mn,2),kn=En[0],jt=En[1],Ka=Object(S.useState)(Te),Da=Object(fe.a)(Ka,2),vn=Da[0],In=Da[1],Za=Object(S.useState)(Tt),za=Object(fe.a)(Za,2),wn=za[0],Aa=za[1],bt=Object(S.useState)(""),ce=Object(fe.a)(bt,2),Ve=ce[0],At=ce[1],Ct=Object(S.useState)(0),Et=Object(fe.a)(Ct,2),Rt=Et[0],an=Et[1],yn=Object(S.useState)(J),dn=Object(fe.a)(yn,2),Sn=dn[0],Xn=dn[1],xn=Object(S.useState)(!1),Jn=Object(fe.a)(xn,2),Ha=Jn[0],Yn=Jn[1],On=Object(S.useRef)(),Ma=Object(S.useRef)(),ga=Object(S.useRef)(),Tn=Object(S.useRef)();Object(S.useEffect)(function(){jt(Vt),We==null||We.setValue(Vt)},[Vt]),Object(S.useEffect)(function(){Bt==null||Bt(wn)},[wn]),Object(S.useEffect)(function(){if(On.current){var Mt=Y.a.fromTextArea(On.current,{mode:it,lineNumbers:!se,lineWrapping:!0,value:k,autoCloseTags:!0,autoCloseBrackets:!0});ze&&Mt.focus();function $t(Xt,un){if(qt){un.preventDefault();return}var sn=un.clipboardData;if(sn){var Gt=sn.types.toString(),gn=sn.items,Cn=["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(Gt==="Files"||sn.types.indexOf("Files")>-1){if(un.preventDefault(),it=="stex")return;try{var $n,sa=gn[1];(($n=gn[0])===null||$n===void 0?void 0:$n.kind)==="file"&&(sa=gn[0]);var bn=sa.getAsFile(),ba=bn.name.split(".").pop();H(bn,function(Qn){if(Qn.id){var ja,$a,tr;(bn==null||((ja=bn.type)===null||ja===void 0)?void 0:ja.indexOf("image"))>-1?Mt.replaceSelection("![,](/api/attachments/".concat(Qn.id,"?type=").concat(Qn.content_type,")")):(bn==null||(($a=bn.type)===null||$a===void 0)?void 0:$a.indexOf("video"))>-1?Mt.replaceSelection('<video width="100%" controls src="'.concat(be.a.API_SERVER,"/api/attachments/").concat(Qn.id,'"></video>')):(bn==null||((tr=bn.type)===null||tr===void 0)?void 0:tr.indexOf("pdf"))>-1?Mt.replaceSelection('<a href="'.concat(be.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(bn.type,'&disposition=inline" target="_blank">').concat(bn.name,"</a>")):Cn.includes(ba)?Mt.replaceSelection('<a href="'.concat(be.a.API_SERVER,"/api/attachments/").concat(Qn.id,'?type=office&disposition=inline" target="_blank">').concat(bn.name,"</a>")):Mt.replaceSelection("[".concat(bn.name,"](").concat(be.a.API_SERVER,"/api/attachments/").concat(Qn.id,"?type=").concat(Qn.content_type,")"))}else(Qn==null?void 0:Qn.status)===401&&(document.location.href="/user/login")})}catch(Qn){xe.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Mt.on("paste",$t),on(Mt),function(){Mt.off("paste",$t)}}},[]);var La=Object(S.useCallback)(function(){if(Ma.current)try{}catch(Mt){console.log(Mt,"---- to set md editor body height")}},[Sn,Ma,wn]);Object(S.useEffect)(function(){function Mt(){var Xt=new q.default(function(un){var sn=Object(re.a)(un),Gt;try{for(sn.s();!(Gt=sn.n()).done;){var gn=Gt.value;(gn.target.offsetHeight>0||gn.target.offsetWidth>0)&&(La(),We.setSize("100%","100%"),We.refresh())}}catch(Cn){sn.e(Cn)}finally{sn.f()}});return Xt.observe(On.current.parentElement),Xt}if(We){var $t=Mt();return function(){$t.unobserve(On.current.parentElement)}}},[We,La]),Object(S.useEffect)(function(){if(We){for(var Mt=[],$t=function(){var gn=un[Xt];sn=Object(fe.a)(gn,2);var Cn=sn[0],$n=sn[1],sa=Object($.a)({},Cn,function(){fr($n)});Mt.push(sa),We.addKeyMap(sa)},Xt=0,un=Object.entries(mt);Xt<un.length;Xt++){var sn;$t()}return function(){var Gt=Object(re.a)(Mt),gn;try{for(Gt.s();!(gn=Gt.n()).done;){var Cn=gn.value;We.removeKeyMap(Cn)}}catch($n){Gt.e($n)}finally{Gt.f()}}}},[We]),Object(S.useEffect)(function(){Tt!==wn&&Aa(Tt)},[Tt]),Object(Me.a)(function(){if(!Ft&&Rt>0){var Mt=new Date().getTime(),$t=window.sessionStorage.getItem(He);Mt>=Rt+et&&(!$t||$t!==kn)&&(window.sessionStorage.setItem(He,kn),Yn(!0))}},et),Object(S.useEffect)(function(){In(Te)},[We,Te]),Object(S.useEffect)(function(){We&&(ze&&We.focus())},[We,ze]),Object(S.useEffect)(function(){if(vn&&We){var Mt=We.getScrollerElement();function $t(Xt){var un=Xt.target;if(Tn.current){var sn=un.scrollTop/un.scrollHeight;Tn.current.scrollTop=Tn.current.scrollHeight*sn}}return Mt.addEventListener("scroll",$t),function(){Mt.removeEventListener("scroll",$t)}}},[We,vn]),Object(S.useEffect)(function(){if(We&&Zt){function Mt($t,Xt){Zt($t,Xt)}return We.on("beforeChange",Mt),function(){We.off("beforeChange",Mt)}}},[We,Zt]),Object(S.useEffect)(function(){if(We&&Dt){function Mt(){Dt(We.getValue())}return We.on("blur",Mt),function(){We.off("blur",Mt)}}},[We,Dt]),Object(S.useEffect)(function(){if(We){function Mt($t){var Xt=$t.getValue();jt(Xt),an(new Date().getTime()),$t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),p&&p(Xt)}return We.on("change",Mt),function(){We.off("change",Mt)}}},[We,p]),Object(S.useEffect)(function(){We&&(k==null?(We.setValue(""),jt("")):k!==We.getValue()&&(We.setValue(k),jt(k),We.setCursor(We.lineCount(),0)))},[We,k]);var fr=Object(S.useCallback)(function(Mt){var $t=We.getCursor(),Xt=We.getSelection(),un=Xt.split(`
`);switch(Mt){case"bold":return We.replaceSelection("**"+Xt+"**"),Xt===""&&We.setCursor($t.line,$t.ch+2),We.focus();case"italic":return We.replaceSelection("*"+Xt+"*"),Xt===""&&We.setCursor($t.line,$t.ch+1),We.focus();case"code":return We.replaceSelection("`"+Xt+"`"),Xt===""&&We.setCursor($t.line,$t.ch+1),We.focus();case"inline-latex":return We.replaceSelection("`$$"+Xt+"$$`"),Xt===""&&We.setCursor($t.line,$t.ch+3),We.focus();case"latex":return We.replaceSelection("```latex\n"+Xt+"\n```"),We.setCursor($t.line+1,Xt.length+1),We.focus();case"line-break":return We.replaceSelection(`<br/>
`),We.focus();case"list-ul":return Xt===""?We.replaceSelection("- "+Xt):We.replaceSelection(un.map(function(sn){return sn===""?"":"- ".concat(sn)}).join(`
`)),We.focus();case"list-ol":return Xt===""?We.replaceSelection("1. "+Xt):We.replaceSelection(un.map(function(sn,Gt){return sn===""?"":"".concat(Gt+1,". ").concat(sn)}).join(`
`)),We.focus();case"add-null-ch":return Xt===""&&We.setCursor($t.line,$t.ch+1),We.replaceSelection(_t),We.focus();case"inster-template-1":return Xt===""&&We.setCursor($t.line,$t.ch),We.replaceSelection(vt),We.focus();case"eraser":return We.setValue(""),We.focus();case"trigger-watch":return In(!vn),We.focus();case"trigger-full-screen":return Aa(!wn),We.focus();case Ae:At(Ae);return;case Ee:At(Ee);return;case ve:At(ve);return;case Ne:At(Ne);return;default:throw new Error}},[We,vn,wn]),Xa=Object(S.useCallback)(function(Mt){At("");switch(Ve){case Ae:var $t=Mt.title,Xt=Mt.link;return We.replaceSelection("[".concat($t,"](").concat(Xt,")")),We.focus();case Ee:var un=Mt.language,sn=Mt.content;return We.replaceSelection(["```"+un,sn,"```"].join(`
`)),We.focus();case ve:var Gt=Mt.src,gn=Mt.alt;return We.replaceSelection("![ ".concat(gn," ]( ").concat(Gt,' "').concat(gn,'" )')),We.focus();case Ne:for(var Cn=Mt.row,$n=Mt.col,sa=Mt.align,bn=`
`,ba=0;ba<Cn;ba++){for(var Qn=[],ja=[],$a=0;$a<$n;$a++)ba===1&&ja.push(Je[sa]),Qn.push(" ");ba===1&&(bn+="| ".concat(ja.join(" | "),` |
`)),bn+="| ".concat(Qn.join($n===1?"":" | "),` |
`)}return We.replaceSelection(bn+`
`),We.focus();default:throw new Error}},[We,Ve]),qa=Object(S.useMemo)(function(){switch(Ve){case Ae:return y.a.createElement(ye,{callback:Xa,onCancel:ka});case Ee:return y.a.createElement(R.b,{callback:Xa,onCancel:ka});case ve:return y.a.createElement(me,{callback:Xa,onCancel:ka});case Ne:return y.a.createElement(Fe,{callback:Xa,onCancel:ka});default:return null}},[Ve]);function ka(){At("")}Object(S.useEffect)(function(){if(ga.current){var Mt=ga.current,$t=!1,Xt=0;function un(gn){$t=!0,Xt=gn.pageY}function sn(){$t=!1}function Gt(gn){if($t){var Cn=gn.pageY-Xt;Cn<0&&(Cn=0),Cn>300&&(Cn=300);var $n=J+Cn+"px";Xn($n)}}return Mt.addEventListener("mousedown",un),document.addEventListener("mousemove",Gt),document.addEventListener("mouseup",sn),function(){Mt.removeEventListener("mousedown",un),document.removeEventListener("mousemove",Gt),document.removeEventListener("mouseup",sn)}}},[We,ga]),Object(S.useEffect)(function(){Xn(J)},[J]);var hr=ht(w),pr=ht(Sn),er={width:hr,height:pr},mr=Object(S.useMemo)(function(){if(Rt){var Mt=new Date(Rt),$t=Mt.getHours(),Xt=Mt.getMinutes(),un=Mt.getSeconds();return $t=$t<10?"0"+$t:$t,Xt=Xt<10?"0"+Xt:Xt,un=un<10?"0"+un:un,"".concat($t,":").concat(Xt,":").concat(un)}return 0},[Rt]);function Na(){window.sessionStorage.removeItem(He),Yn(!1),an(0)}function Xr(){Yn(!1),an(0),We.setValue(window.sessionStorage.getItem(He))}return y.a.createElement(S.Fragment,null,y.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ma},y.a.createElement("div",{className:"markdown-editor-container ".concat(Yt," ").concat(vn?"on-preview":""," ").concat(se?"mini":""," ").concat(wn?"full-screen":""),style:er},y.a.createElement(j,{insertTemp:Ot,watch:vn,fullScreen:wn,showNullButton:ot,onActionCallback:fr,hidetoolBar:Xe}),y.a.createElement("div",{className:"markdown-editor-body"},y.a.createElement("div",{className:"codemirror-container"},y.a.createElement("textarea",{ref:On,placeholder:en})),vn?y.a.createElement("div",{ref:Tn,className:"preview-container"},it==="stex"&&y.a.createElement(he,{value:kn}),it!=="stex"&&y.a.createElement(te.a,{value:kn})):null))),Ut?y.a.createElement("a",{ref:ga,className:"editor-resize"}):null,y.a.createElement(v.a,null,ke[Ve]?y.a.createElement(we.a,{centered:!0,title:ke[Ve],visible:!0,onCancel:ka,footer:null},qa):null))}},PGNT:function(Ge,je,l){Ge.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(Ge,je,l){Ge.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"}},QSKd:function(Ge,je,l){Ge.exports=l.p+"static/wenhao.50b63ac4.svg"},"RZ/O":function(Ge,je,l){Ge.exports=l.p+"static/bi.9c9b0364.svg"},SJMd:function(Ge,je){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var l,G,we,re=!1,Se,xe;window.PR_SHOULD_USE_CONTINUATION=!0;var fe,$;(function(){var S=window,y=["break,continue,do,else,for,if,return,while"],W=[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],Y=[W,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],q=[Y,"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"],oe=[Y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],z=[Y,"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"],M="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=[Y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],D="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",K=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],h=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],te=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],he=[q,z,oe,N,D,K,h,te],Z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,I="str",d="kwd",V="com",b="typ",j="lit",v="pun",m="pln",L="tag",P="dec",_="src",F="atn",ue="atv",Q="nocode",ye="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function R(ve){for(var Ee=0,Ne=!1,Be=!1,Je=0,Me=ve.length;Je<Me;++Je){var Ce=ve[Je];if(Ce.ignoreCase)Be=!0;else if(/[a-z]/i.test(Ce.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,Be=!1;break}}var lt={b:8,t:9,n:10,v:11,f:12,r:13};function at(ht){var Re=ht.charCodeAt(0);if(Re!==92)return Re;var wt=ht.charAt(1);return Re=lt[wt],Re||("0"<=wt&&wt<="7"?parseInt(ht.substring(1),8):wt==="u"||wt==="x"?parseInt(ht.substring(2),16):ht.charCodeAt(1))}function pt(ht){if(ht<32)return(ht<16?"\\x0":"\\x")+ht.toString(16);var Re=String.fromCharCode(ht);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function et(ht){var Re=ht.substring(1,ht.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")),wt=[],mt=Re[0]==="^",ke=["["];mt&&ke.push("^");for(var Ue=mt?1:0,E=Re.length;Ue<E;++Ue){var T=Re[Ue];if(/\\[bdsw]/i.test(T))ke.push(T);else{var k=at(T),p;Ue+2<E&&Re[Ue+1]==="-"?(p=at(Re[Ue+2]),Ue+=2):p=k,wt.push([k,p]),p<65||k>122||(p<65||k>90||wt.push([Math.max(65,k)|32,Math.min(p,90)|32]),p<97||k>122||wt.push([Math.max(97,k)&~32,Math.min(p,122)&~32]))}}wt.sort(function(J,ae){return J[0]-ae[0]||ae[1]-J[1]});for(var g=[],w=[],Ue=0;Ue<wt.length;++Ue){var C=wt[Ue];C[0]<=w[1]+1?w[1]=Math.max(w[1],C[1]):g.push(w=C)}for(var Ue=0;Ue<g.length;++Ue){var C=g[Ue];ke.push(pt(C[0])),C[1]>C[0]&&(C[1]+1>C[0]&&ke.push("-"),ke.push(pt(C[1])))}return ke.push("]"),ke.join("")}function _t(ht){for(var Re=ht.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")),wt=Re.length,mt=[],ke=0,Ue=0;ke<wt;++ke){var E=Re[ke];if(E==="(")++Ue;else if(E.charAt(0)==="\\"){var T=+E.substring(1);T&&(T<=Ue?mt[T]=-1:Re[ke]=pt(T))}}for(var ke=1;ke<mt.length;++ke)mt[ke]===-1&&(mt[ke]=++Ee);for(var ke=0,Ue=0;ke<wt;++ke){var E=Re[ke];if(E==="(")++Ue,mt[Ue]||(Re[ke]="(?:");else if(E.charAt(0)==="\\"){var T=+E.substring(1);T&&T<=Ue&&(Re[ke]="\\"+mt[T])}}for(var ke=0;ke<wt;++ke)Re[ke]==="^"&&Re[ke+1]!=="^"&&(Re[ke]="");if(ht.ignoreCase&&Ne)for(var ke=0;ke<wt;++ke){var E=Re[ke],k=E.charAt(0);E.length>=2&&k==="["?Re[ke]=et(E):k!=="\\"&&(Re[ke]=E.replace(/[a-zA-Z]/g,function(w){var C=w.charCodeAt(0);return"["+String.fromCharCode(C&~32,C|32)+"]"}))}return Re.join("")}for(var vt=[],Je=0,Me=ve.length;Je<Me;++Je){var Ce=ve[Je];if(Ce.global||Ce.multiline)throw new Error(""+Ce);vt.push("(?:"+_t(Ce)+")")}return new RegExp(vt.join("|"),Be?"gi":"g")}function c(ve,Ee){var Ne=/(?:^|\s)nocode(?:\s|$)/,Be=[],Je=0,Me=[],Ce=0;function lt(at){var pt=at.nodeType;if(pt==1){if(Ne.test(at.className))return;for(var et=at.firstChild;et;et=et.nextSibling)lt(et);var _t=at.nodeName.toLowerCase();(_t==="br"||_t==="li")&&(Be[Ce]=`
`,Me[Ce<<1]=Je++,Me[Ce++<<1|1]=at)}else if(pt==3||pt==4){var vt=at.nodeValue;vt.length&&(Ee?vt=vt.replace(/\r\n?/g,`
`):vt=vt.replace(/[ \t\r\n]+/g," "),Be[Ce]=vt,Me[Ce<<1]=Je,Je+=vt.length,Me[Ce++<<1|1]=at)}}return lt(ve),{sourceCode:Be.join("").replace(/\n$/,""),spans:Me}}function X(ve,Ee,Ne,Be,Je){if(!Ne)return;var Me={sourceNode:ve,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:Ee,decorations:null};Be(Me),Je.push.apply(Je,Me.decorations)}var ge=/\S/;function pe(ve){for(var Ee=void 0,Ne=ve.firstChild;Ne;Ne=Ne.nextSibling){var Be=Ne.nodeType;Ee=Be===1?Ee?ve:Ne:Be===3&&ge.test(Ne.nodeValue)?ve:Ee}return Ee===ve?void 0:Ee}function Oe(ve,Ee){var Ne={},Be;(function(){for(var Ce=ve.concat(Ee),lt=[],at={},pt=0,et=Ce.length;pt<et;++pt){var _t=Ce[pt],vt=_t[3];if(vt)for(var ht=vt.length;--ht>=0;)Ne[vt.charAt(ht)]=_t;var Re=_t[1],wt=""+Re;at.hasOwnProperty(wt)||(lt.push(Re),at[wt]=null)}lt.push(/[\0-\uffff]/),Be=R(lt)})();var Je=Ee.length,Me=function(Ce){for(var lt=Ce.sourceCode,at=Ce.basePos,pt=Ce.sourceNode,et=[at,m],_t=0,vt=lt.match(Be)||[],ht={},Re=0,wt=vt.length;Re<wt;++Re){var mt=vt[Re],ke=ht[mt],Ue=void 0,E;if(typeof ke=="string")E=!1;else{var T=Ne[mt.charAt(0)];if(T)Ue=mt.match(T[1]),ke=T[0];else{for(var k=0;k<Je;++k)if(T=Ee[k],Ue=mt.match(T[1]),Ue){ke=T[0];break}Ue||(ke=m)}E=ke.length>=5&&ke.substring(0,5)==="lang-",E&&!(Ue&&typeof Ue[1]=="string")&&(E=!1,ke=_),E||(ht[mt]=ke)}var p=_t;if(_t+=mt.length,!E)et.push(at+p,ke);else{var g=Ue[1],w=mt.indexOf(g),C=w+g.length;Ue[2]&&(C=mt.length-Ue[2].length,w=C-g.length);var J=ke.substring(5);X(pt,at+p,mt.substring(0,w),Me,et),X(pt,at+p+w,g,x(J,g),et),X(pt,at+p+C,mt.substring(C),Me,et)}}Ce.decorations=et};return Me}function me(ve){var Ee=[],Ne=[];ve.tripleQuotedStrings?Ee.push([I,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ve.multiLineStrings?Ee.push([I,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ee.push([I,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ve.verbatimStrings&&Ne.push([I,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Be=ve.hashComments;Be&&(ve.cStyleComments?(Be>1?Ee.push([V,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ee.push([V,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([I,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ee.push([V,/^#[^\r\n]*/,null,"#"])),ve.cStyleComments&&(Ne.push([V,/^\/\/[^\r\n]*/,null]),Ne.push([V,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Je=ve.regexLiterals;if(Je){var Me=Je>1?"":`
\r`,Ce=Me?".":"[\\S\\s]",lt="/(?=[^/*"+Me+"])(?:[^/\\x5B\\x5C"+Me+"]|\\x5C"+Ce+"|\\x5B(?:[^\\x5C\\x5D"+Me+"]|\\x5C"+Ce+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+ye+"("+lt+")")])}var at=ve.types;at&&Ne.push([b,at]);var pt=(""+ve.keywords).replace(/^ | $/g,"");pt.length&&Ne.push([d,new RegExp("^(?:"+pt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ee.push([m,/^\s+/,null,` \r
\xA0`]);var et="^.[^\\s\\w.$@'\"`/\\\\]*";return ve.regexLiterals&&(et+="(?!s*/)"),Ne.push([j,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[m,/^[a-z_$][a-z_$@0-9]*/i,null],[j,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[m,/^\\[\s\S]?/,null],[v,new RegExp(et),null]),Oe(Ee,Ne)}var de=me({keywords:he,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function H(ve,Ee,Ne){for(var Be=/(?:^|\s)nocode(?:\s|$)/,Je=/\r\n?|\n/,Me=ve.ownerDocument,Ce=Me.createElement("li");ve.firstChild;)Ce.appendChild(ve.firstChild);var lt=[Ce];function at(Re){var wt=Re.nodeType;if(wt==1&&!Be.test(Re.className))if(Re.nodeName==="br")pt(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var mt=Re.firstChild;mt;mt=mt.nextSibling)at(mt);else if((wt==3||wt==4)&&Ne){var ke=Re.nodeValue,Ue=ke.match(Je);if(Ue){var E=ke.substring(0,Ue.index);Re.nodeValue=E;var T=ke.substring(Ue.index+Ue[0].length);if(T){var k=Re.parentNode;k.insertBefore(Me.createTextNode(T),Re.nextSibling)}pt(Re),E||Re.parentNode.removeChild(Re)}}}function pt(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function wt(Ue,E){var T=E?Ue.cloneNode(!1):Ue,k=Ue.parentNode;if(k){var p=wt(k,1),g=Ue.nextSibling;p.appendChild(T);for(var w=g;w;w=g)g=w.nextSibling,p.appendChild(w)}return T}for(var mt=wt(Re.nextSibling,0),ke;(ke=mt.parentNode)&&ke.nodeType===1;)mt=ke;lt.push(mt)}for(var et=0;et<lt.length;++et)at(lt[et]);Ee===(Ee|0)&&lt[0].setAttribute("value",Ee);var _t=Me.createElement("ol");_t.className="linenums";for(var vt=Math.max(0,Ee-1|0)||0,et=0,ht=lt.length;et<ht;++et)Ce=lt[et],Ce.className="L"+(et+vt)%10,Ce.firstChild||Ce.appendChild(Me.createTextNode("\xA0")),_t.appendChild(Ce);ve.appendChild(_t)}function A(ve){var Ee=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ee=Ee&&+Ee[1]<=8;var Ne=/\n/g,Be=ve.sourceCode,Je=Be.length,Me=0,Ce=ve.spans,lt=Ce.length,at=0,pt=ve.decorations,et=pt.length,_t=0;pt[et]=Je;var vt,ht;for(ht=vt=0;ht<et;)pt[ht]!==pt[ht+2]?(pt[vt++]=pt[ht++],pt[vt++]=pt[ht++]):ht+=2;for(et=vt,ht=vt=0;ht<et;){for(var Re=pt[ht],wt=pt[ht+1],mt=ht+2;mt+2<=et&&pt[mt+1]===wt;)mt+=2;pt[vt++]=Re,pt[vt++]=wt,ht=mt}et=pt.length=vt;var ke=ve.sourceNode,Ue="";ke&&(Ue=ke.style.display,ke.style.display="none");try{for(var E=null;at<lt;){var T=Ce[at],k=Ce[at+2]||Je,p=pt[_t+2]||Je,mt=Math.min(k,p),g=Ce[at+1],w;if(g.nodeType!==1&&(w=Be.substring(Me,mt))){Ee&&(w=w.replace(Ne,"\r")),g.nodeValue=w;var C=g.ownerDocument,J=C.createElement("span");J.className=pt[_t+1];var ae=g.parentNode;ae.replaceChild(J,g),J.appendChild(g),Me<k&&(Ce[at+1]=g=C.createTextNode(Be.substring(mt,k)),ae.insertBefore(g,J.nextSibling))}Me=mt,Me>=k&&(at+=2),Me>=p&&(_t+=2)}}finally{ke&&(ke.style.display=Ue)}}var ee={};function O(ve,Ee){for(var Ne=Ee.length;--Ne>=0;){var Be=Ee[Ne];ee.hasOwnProperty(Be)?S.console&&console.warn("cannot override language handler %s",Be):ee[Be]=ve}}function x(ve,Ee){return ve&&ee.hasOwnProperty(ve)||(ve=/^\s*</.test(Ee)?"default-markup":"default-code"),ee[ve]}O(de,["default-code"]),O(Oe([],[[m,/^[^<?]+/],[P,/^<!\w[^>]*(?:>|$)/],[V,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[v,/^(?:<[%?]|[%?]>)/],["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"]),O(Oe([[m,/^[\s]+/,null,` \r
`],[ue,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[L,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[F,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[v,/^[=<>\/]+/],["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"]),O(Oe([],[[ue,/^[\s\S]+/]]),["uq.val"]),O(me({keywords:q,hashComments:!0,cStyleComments:!0,types:Z}),["c","cc","cpp","cxx","cyc","m"]),O(me({keywords:"null,true,false"}),["json"]),O(me({keywords:z,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Z}),["cs"]),O(me({keywords:oe,cStyleComments:!0}),["java"]),O(me({keywords:te,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),O(me({keywords:K,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),O(me({keywords:D,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),O(me({keywords:h,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),O(me({keywords:N,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),O(me({keywords:M,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),O(Oe([],[[I,/^[\s\S]+/]]),["regex"]);function ie(ve){var Ee=ve.langExtension;try{var Ne=c(ve.sourceNode,ve.pre),Be=Ne.sourceCode;ve.sourceCode=Be,ve.spans=Ne.spans,ve.basePos=0,x(Ee,Be)(ve),A(ve)}catch(Je){S.console&&console.log(Je&&Je.stack||Je)}}function Pe(ve,Ee,Ne){var Be=Ne||!1,Je=Ee||null,Me=document.createElement("div");Me.innerHTML="<pre>"+ve+"</pre>",Me=Me.firstChild,Be&&H(Me,Be,!0);var Ce={langExtension:Je,numberLines:Be,sourceNode:Me,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ie(Ce),Me.innerHTML}function Fe(ve,Ee){var Ne=Ee||document.body,Be=Ne.ownerDocument||document;function Je(T){return Ne.getElementsByTagName(T)}for(var Me=[Je("pre"),Je("code"),Je("xmp")],Ce=[],lt=0;lt<Me.length;++lt)for(var at=0,pt=Me[lt].length;at<pt;++at)Ce.push(Me[lt][at]);Me=null;var et=Date;et.now||(et={now:function(){return+new Date}});var _t=0,vt=/\blang(?:uage)?-([\w.]+)(?!\S)/,ht=/\bprettyprint\b/,Re=/\bprettyprinted\b/,wt=/pre|xmp/i,mt=/^code$/i,ke=/^(?:pre|code|xmp)$/i,Ue={};function E(){for(var T=S.PR_SHOULD_USE_CONTINUATION?et.now()+250:Infinity;_t<Ce.length&&et.now()<T;_t++){for(var k=Ce[_t],p=Ue,g=k;g=g.previousSibling;){var w=g.nodeType,C=(w===7||w===8)&&g.nodeValue;if(C?!/^\??prettify\b/.test(C):w!==3||/\S/.test(g.nodeValue))break;if(C){p={},C.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ut,gt,Ft){p[gt]=Ft});break}}var J=k.className;if((p!==Ue||ht.test(J))&&!Re.test(J)){for(var ae=!1,se=k.parentNode;se;se=se.parentNode){var rt=se.tagName;if(ke.test(rt)&&se.className&&ht.test(se.className)){ae=!0;break}}if(!ae){k.className+=" prettyprinted";var ze=p.lang;if(!ze){ze=J.match(vt);var Te;!ze&&(Te=pe(k))&&mt.test(Te.tagName)&&(ze=Te.className.match(vt)),ze&&(ze=ze[1])}var Ot;if(wt.test(k.tagName))Ot=1;else{var kt=k.currentStyle,it=Be.defaultView,Kt=kt?kt.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(k,null).getPropertyValue("white-space"):0;Ot=Kt&&Kt.substring(0,3)==="pre"}var He=p.linenums;(He=He==="true"||+He)||(He=J.match(/\blinenums\b(?::(\d+))?/),He=He?He[1]&&He[1].length?+He[1]:!0:!1),He&&H(k,He,Ot);var zt={langExtension:ze,sourceNode:k,numberLines:He,pre:Ot,sourceCode:null,basePos:null,spans:null,decorations:null};ie(zt)}}}_t<Ce.length?S.setTimeout(E,250):typeof ve=="function"&&ve()}E()}var be=S.PR={createSimpleLexer:Oe,registerLangHandler:O,sourceDecorator:me,PR_ATTRIB_NAME:F,PR_ATTRIB_VALUE:ue,PR_COMMENT:V,PR_DECLARATION:P,PR_KEYWORD:d,PR_LITERAL:j,PR_NOCODE:Q,PR_PLAIN:m,PR_PUNCTUATION:v,PR_SOURCE:_,PR_STRING:I,PR_TAG:L,PR_TYPE:b,prettyPrintOne:re?S.prettyPrintOne=Pe:fe=Pe,prettyPrint:$=re?S.prettyPrint=Fe:$=Fe},Ae=S.define;typeof Ae=="function"&&Ae.amd&&Ae("google-code-prettify",[],function(){return be})})()},"VrN/":function(Ge,je,l){(function(G,we){Ge.exports=we()})(this,function(){"use strict";var G=navigator.userAgent,we=navigator.platform,re=/gecko\/\d/i.test(G),Se=/MSIE \d/.test(G),xe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(G),fe=/Edge\/(\d+)/.exec(G),$=Se||xe||fe,S=$&&(Se?document.documentMode||6:+(fe||xe)[1]),y=!fe&&/WebKit\//.test(G),W=y&&/Qt\/\d+\.\d+/.test(G),Y=!fe&&/Chrome\//.test(G),q=/Opera\//.test(G),oe=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(G),M=/PhantomJS/.test(G),N=!fe&&/AppleWebKit/.test(G)&&/Mobile\/\w+/.test(G),D=/Android/.test(G),K=N||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(G),h=N||/Mac/.test(we),te=/\bCrOS\b/.test(G),he=/win/i.test(we),Z=q&&G.match(/Version\/(\d*\.\d*)/);Z&&(Z=Number(Z[1])),Z&&Z>=15&&(q=!1,y=!0);var I=h&&(W||q&&(Z==null||Z<12.11)),d=re||$&&S>=9;function V(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,t){var a=e.className,n=V(t).exec(a);if(n){var r=a.slice(n.index+n[0].length);e.className=a.slice(0,n.index)+(r?n[1]+r:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function v(e,t){return j(e).appendChild(t)}function m(e,t,a,n){var r=document.createElement(e);if(a&&(r.className=a),n&&(r.style.cssText=n),typeof t=="string")r.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)r.appendChild(t[i]);return r}function L(e,t,a,n){var r=m(e,t,a,n);return r.setAttribute("role","presentation"),r}var P;document.createRange?P=function(e,t,a,n){var r=document.createRange();return r.setEnd(n||e,a),r.setStart(e,t),r}:P=function(e,t,a){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(r){return n}return n.collapse(!0),n.moveEnd("character",a),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 F(){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 ue(e,t){var a=e.className;V(t).test(a)||(e.className+=(a?" ":"")+t)}function Q(e,t){for(var a=e.split(" "),n=0;n<a.length;n++)a[n]&&!V(a[n]).test(t)&&(t+=" "+a[n]);return t}var ye=function(e){e.select()};N?ye=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:$&&(ye=function(e){try{e.select()}catch(t){}});function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,a){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(a!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function X(e,t,a,n,r){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var i=n||0,o=r||0;;){var s=e.indexOf(" ",i);if(s<0||s>=t)return o+(t-i);o+=s-i,o+=a-o%a,i=s+1}}var ge=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};ge.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ge.prototype.set=function(e,t){this.f=t;var a=+new Date+e;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=a)};function pe(e,t){for(var a=0;a<e.length;++a)if(e[a]==t)return a;return-1}var Oe=50,me={toString:function(){return"CodeMirror.Pass"}},de={scroll:!1},H={origin:"*mouse"},A={origin:"+move"};function ee(e,t,a){for(var n=0,r=0;;){var i=e.indexOf(" ",n);i==-1&&(i=e.length);var o=i-n;if(i==e.length||r+o>=t)return n+Math.min(o,t-r);if(r+=i-n,r+=a-r%a,n=i+1,r>=t)return n}}var O=[""];function x(e){for(;O.length<=e;)O.push(ie(O)+" ");return O[e]}function ie(e){return e[e.length-1]}function Pe(e,t){for(var a=[],n=0;n<e.length;n++)a[n]=t(e[n],n);return a}function Fe(e,t,a){for(var n=0,r=a(t);n<e.length&&a(e[n])<=r;)n++;e.splice(n,0,t)}function be(){}function Ae(e,t){var a;return Object.create?a=Object.create(e):(be.prototype=e,a=new be),t&&c(t,a),a}var ve=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ee(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ve.test(e))}function Ne(e,t){return t?t.source.indexOf("\\w")>-1&&Ee(e)?!0:t.test(e):Ee(e)}function Be(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Je=/[\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 Me(e){return e.charCodeAt(0)>=768&&Je.test(e)}function Ce(e,t,a){for(;(a<0?t>0:t<e.length)&&Me(e.charAt(t));)t+=a;return t}function lt(e,t,a){for(var n=t>a?-1:1;;){if(t==a)return t;var r=(t+a)/2,i=n<0?Math.ceil(r):Math.floor(r);if(i==t)return e(i)?t:a;e(i)?a=i:t=i+n}}function at(e,t,a,n){if(!e)return n(t,a,"ltr",0);for(var r=!1,i=0;i<e.length;++i){var o=e[i];(o.from<a&&o.to>t||t==a&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,a),o.level==1?"rtl":"ltr",i),r=!0)}r||n(t,a,"ltr")}var pt=null;function et(e,t,a){var n;pt=null;for(var r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;i.to==t&&(i.from!=i.to&&a=="before"?n=r:pt=r),i.from==t&&(i.from!=i.to&&a!="before"?n=r:pt=r)}return n!=null?n:pt}var _t=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function u(f,U,B){this.level=f,this.from=U,this.to=B}return function(f,U){var B=U=="ltr"?"L":"R";if(f.length==0||U=="ltr"&&!n.test(f))return!1;for(var le=f.length,ne=[],Le=0;Le<le;++Le)ne.push(a(f.charCodeAt(Le)));for(var Ke=0,Ze=B;Ke<le;++Ke){var ct=ne[Ke];ct=="m"?ne[Ke]=Ze:Ze=ct}for(var xt=0,dt=B;xt<le;++xt){var St=ne[xt];St=="1"&&dt=="r"?ne[xt]="n":i.test(St)&&(dt=St,St=="r"&&(ne[xt]="R"))}for(var Wt=1,Nt=ne[0];Wt<le-1;++Wt){var Qt=ne[Wt];Qt=="+"&&Nt=="1"&&ne[Wt+1]=="1"?ne[Wt]="1":Qt==","&&Nt==ne[Wt+1]&&(Nt=="1"||Nt=="n")&&(ne[Wt]=Nt),Nt=Qt}for(var _n=0;_n<le;++_n){var ia=ne[_n];if(ia==",")ne[_n]="N";else if(ia=="%"){var Nn=void 0;for(Nn=_n+1;Nn<le&&ne[Nn]=="%";++Nn);for(var Oa=_n&&ne[_n-1]=="!"||Nn<le&&ne[Nn]=="1"?"1":"N",xa=_n;xa<Nn;++xa)ne[xa]=Oa;_n=Nn-1}}for(var zn=0,Ca=B;zn<le;++zn){var la=ne[zn];Ca=="L"&&la=="1"?ne[zn]="L":i.test(la)&&(Ca=la)}for(var Vn=0;Vn<le;++Vn)if(r.test(ne[Vn])){var Hn=void 0;for(Hn=Vn+1;Hn<le&&r.test(ne[Hn]);++Hn);for(var Un=(Vn?ne[Vn-1]:B)=="L",wa=(Hn<le?ne[Hn]:B)=="L",zr=Un==wa?Un?"L":"R":B,dr=Vn;dr<Hn;++dr)ne[dr]=zr;Vn=Hn-1}for(var da=[],Va,oa=0;oa<le;)if(o.test(ne[oa])){var Ro=oa;for(++oa;oa<le&&o.test(ne[oa]);++oa);da.push(new u(0,Ro,oa))}else{var Qa=oa,Rr=da.length,Pr=U=="rtl"?1:0;for(++oa;oa<le&&ne[oa]!="L";++oa);for(var va=Qa;va<oa;)if(s.test(ne[va])){Qa<va&&(da.splice(Rr,0,new u(1,Qa,va)),Rr+=Pr);var Hr=va;for(++va;va<oa&&s.test(ne[va]);++va);da.splice(Rr,0,new u(2,Hr,va)),Rr+=Pr,Qa=va}else++va;Qa<oa&&da.splice(Rr,0,new u(1,Qa,oa))}return U=="ltr"&&(da[0].level==1&&(Va=f.match(/^\s+/))&&(da[0].from=Va[0].length,da.unshift(new u(0,0,Va[0].length))),ie(da).level==1&&(Va=f.match(/\s+$/))&&(ie(da).to-=Va[0].length,da.push(new u(0,le-Va[0].length,le)))),U=="rtl"?da.reverse():da}}();function vt(e,t){var a=e.order;return a==null&&(a=e.order=_t(e.text,t)),a}var ht=[],Re=function(e,t,a){if(e.addEventListener)e.addEventListener(t,a,!1);else if(e.attachEvent)e.attachEvent("on"+t,a);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||ht).concat(a)}};function wt(e,t){return e._handlers&&e._handlers[t]||ht}function mt(e,t,a){if(e.removeEventListener)e.removeEventListener(t,a,!1);else if(e.detachEvent)e.detachEvent("on"+t,a);else{var n=e._handlers,r=n&&n[t];if(r){var i=pe(r,a);i>-1&&(n[t]=r.slice(0,i).concat(r.slice(i+1)))}}}function ke(e,t){var a=wt(e,t);if(!a.length)return;for(var n=Array.prototype.slice.call(arguments,2),r=0;r<a.length;++r)a[r].apply(null,n)}function Ue(e,t,a){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ke(e,a||t.type,e,t),w(t)||t.codemirrorIgnore}function E(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var a=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)pe(a,t[n])==-1&&a.push(t[n])}function T(e,t){return wt(e,t).length>0}function k(e){e.prototype.on=function(t,a){Re(this,t,a)},e.prototype.off=function(t,a){mt(this,t,a)}}function p(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function g(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function w(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function C(e){p(e),g(e)}function J(e){return e.target||e.srcElement}function ae(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),h&&e.ctrlKey&&t==1&&(t=3),t}var se=function(){if($&&S<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),rt;function ze(e){if(rt==null){var t=m("span","\u200B");v(e,m("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(rt=t.offsetWidth<=1&&t.offsetHeight>2&&!($&&S<8))}var a=rt?m("span","\u200B"):m("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Te;function Ot(e){if(Te!=null)return Te;var t=v(e,document.createTextNode("A\u062EA")),a=P(t,0,1).getBoundingClientRect(),n=P(t,1,2).getBoundingClientRect();return j(e),!a||a.left==a.right?!1:Te=n.right-a.right<3}var kt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,a=[],n=e.length;t<=n;){var r=e.indexOf(`
`,t);r==-1&&(r=e.length);var i=e.slice(t,e.charAt(r-1)=="\r"?r-1:r),o=i.indexOf("\r");o!=-1?(a.push(i.slice(0,o)),t+=o+1):(a.push(i),t=r+1)}return a}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(a){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Kt=function(){var e=m("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),He=null;function zt(e){if(He!=null)return He;var t=v(e,m("span","x")),a=t.getBoundingClientRect(),n=P(t,0,1).getBoundingClientRect();return He=Math.abs(a.left-n.left)>1}var Ut={},gt={};function Ft(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ut[e]=t}function Pt(e,t){gt[e]=t}function ot(e){if(typeof e=="string"&&gt.hasOwnProperty(e))e=gt[e];else if(e&&typeof e.name=="string"&&gt.hasOwnProperty(e.name)){var t=gt[e.name];typeof t=="string"&&(t={name:t}),e=Ae(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ot("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ot("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Qe(e,t){t=ot(t);var a=Ut[t.name];if(!a)return Qe(e,"text/plain");var n=a(e,t);if(Xe.hasOwnProperty(t.name)){var r=Xe[t.name];for(var i in r){if(!r.hasOwnProperty(i))continue;n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=r[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 Xe={};function ft(e,t){var a=Xe.hasOwnProperty(e)?Xe[e]:Xe[e]={};c(t,a)}function Tt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var a={};for(var n in t){var r=t[n];r instanceof Array&&(r=r.concat([])),a[n]=r}return a}function Dt(e,t){for(var a;e.innerMode&&!(a=e.innerMode(t),!a||a.mode==e);)t=a.state,e=a.mode;return a||{mode:e,state:t}}function Zt(e,t,a){return e.startState?e.startState(t,a):!0}var Bt=function(e,t,a){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};Bt.prototype.eol=function(){return this.pos>=this.string.length},Bt.prototype.sol=function(){return this.pos==this.lineStart},Bt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Bt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Bt.prototype.eat=function(e){var t=this.string.charAt(this.pos),a;if(typeof e=="string"?a=t==e:a=t&&(e.test?e.test(t):e(t)),a)return++this.pos,t},Bt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Bt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Bt.prototype.skipToEnd=function(){this.pos=this.string.length},Bt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Bt.prototype.backUp=function(e){this.pos-=e},Bt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},Bt.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},Bt.prototype.match=function(e,t,a){if(typeof e=="string"){var n=function(o){return a?o.toLowerCase():o},r=this.string.substr(this.pos,e.length);if(n(r)==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)}},Bt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Bt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Bt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Bt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ut(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 a=e;!a.lines;)for(var n=0;;++n){var r=a.children[n],i=r.chunkSize();if(t<i){a=r;break}t-=i}return a.lines[t]}function Yt(e,t,a){var n=[],r=t.line;return e.iter(t.line,a.line+1,function(i){var o=i.text;r==a.line&&(o=o.slice(0,a.ch)),r==t.line&&(o=o.slice(t.ch)),n.push(o),++r}),n}function yt(e,t,a){var n=[];return e.iter(t,a,function(r){n.push(r.text)}),n}function qt(e,t){var a=t-e.height;if(a)for(var n=e;n;n=n.parent)n.height+=a}function Lt(e){if(e.parent==null)return null;for(var t=e.parent,a=pe(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var r=0;!(n.children[r]==t);++r)a+=n.children[r].chunkSize();return a+t.first}function en(e,t){var a=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],i=r.height;if(t<i){e=r;continue e}t-=i,a+=r.chunkSize()}return a}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o],u=s.height;if(t<u)break;t-=u}return a+o}function Mn(e,t){return t>=e.first&&t<e.first+e.size}function Vt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ie(e,t,a){if(a===void 0&&(a=null),!(this instanceof Ie))return new Ie(e,t,a);this.line=e,this.ch=t,this.sticky=a}function Ye(e,t){return e.line-t.line||e.ch-t.ch}function We(e,t){return e.sticky==t.sticky&&Ye(e,t)==0}function on(e){return Ie(e.line,e.ch)}function mn(e,t){return Ye(e,t)<0?t:e}function En(e,t){return Ye(e,t)<0?e:t}function kn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function jt(e,t){if(t.line<e.first)return Ie(e.first,0);var a=e.first+e.size-1;return t.line>a?Ie(a,ut(e,a).text.length):Ka(t,ut(e,t.line).text.length)}function Ka(e,t){var a=e.ch;return a==null||a>t?Ie(e.line,t):a<0?Ie(e.line,0):e}function Da(e,t){for(var a=[],n=0;n<t.length;n++)a[n]=jt(e,t[n]);return a}var vn=function(e,t){this.state=e,this.lookAhead=t},In=function(e,t,a,n){this.state=t,this.doc=e,this.line=a,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};In.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},In.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}},In.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},In.fromSaved=function(e,t,a){return t instanceof vn?new In(e,Tt(e.mode,t.state),a,t.lookAhead):new In(e,Tt(e.mode,t),a)},In.prototype.save=function(e){var t=e!==!1?Tt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vn(t,this.maxLookAhead):t};function Za(e,t,a,n){var r=[e.state.modeGen],i={};Et(e,t.text,e.doc.mode,a,function(f,U){return r.push(f,U)},i,n);for(var o=a.state,s=function(f){a.baseTokens=r;var U=e.state.overlays[f],B=1,le=0;a.state=!0,Et(e,t.text,U.mode,a,function(ne,Le){for(var Ke=B;le<ne;){var Ze=r[B];Ze>ne&&r.splice(B,1,ne,r[B+1],Ze),B+=2,le=Math.min(ne,Ze)}if(!Le)return;if(U.opaque)r.splice(Ke,B-Ke,ne,"overlay "+Le),B=Ke+2;else for(;Ke<B;Ke+=2){var ct=r[Ke+1];r[Ke+1]=(ct?ct+" ":"")+"overlay "+Le}},i),a.state=o,a.baseTokens=null,a.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)s(u);return{styles:r,classes:i.bgClass||i.textClass?i:null}}function za(e,t,a){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=wn(e,Lt(t)),r=t.text.length>e.options.maxHighlightLength&&Tt(e.doc.mode,n.state),i=Za(e,t,n);r&&(n.state=r),t.stateAfter=n.save(!r),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wn(e,t,a){var n=e.doc,r=e.display;if(!n.mode.startState)return new In(n,!0,t);var i=Rt(e,t,a),o=i>n.first&&ut(n,i-1).stateAfter,s=o?In.fromSaved(n,o,i):new In(n,Zt(n.mode),i);return n.iter(i,t,function(u){Aa(e,u.text,s);var f=s.line;u.stateAfter=f==t-1||f%5==0||f>=r.viewFrom&&f<r.viewTo?s.save():null,s.nextLine()}),a&&(n.modeFrontier=s.line),s}function Aa(e,t,a,n){var r=e.doc.mode,i=new Bt(t,e.options.tabSize,a);for(i.start=i.pos=n||0,t==""&&bt(r,a.state);!i.eol();)ce(r,i,a.state),i.start=i.pos}function bt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var a=Dt(e,t);if(a.mode.blankLine)return a.mode.blankLine(a.state)}function ce(e,t,a,n){for(var r=0;r<10;r++){n&&(n[0]=Dt(e,a).mode);var i=e.token(t,a);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ve=function(e,t,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=a};function At(e,t,a,n){var r=e.doc,i=r.mode,o;t=jt(r,t);var s=ut(r,t.line),u=wn(e,t.line,a),f=new Bt(s.text,e.options.tabSize,u),U;for(n&&(U=[]);(n||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=ce(i,f,u.state),n&&U.push(new Ve(f,o,Tt(r.mode,u.state)));return n?U:new Ve(f,o,u.state)}function Ct(e,t){if(e)for(;;){var a=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!a)break;e=e.slice(0,a.index)+e.slice(a.index+a[0].length);var n=a[1]?"bgClass":"textClass";t[n]==null?t[n]=a[2]:new RegExp("(?:^|\\s)"+a[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+a[2])}return e}function Et(e,t,a,n,r,i,o){var s=a.flattenSpans;s==null&&(s=e.options.flattenSpans);var u=0,f=null,U=new Bt(t,e.options.tabSize,n),B,le=e.options.addModeClass&&[null];for(t==""&&Ct(bt(a,n.state),i);!U.eol();){if(U.pos>e.options.maxHighlightLength?(s=!1,o&&Aa(e,t,n,U.pos),U.pos=t.length,B=null):B=Ct(ce(a,U,n.state,le),i),le){var ne=le[0].name;ne&&(B="m-"+(B?ne+" "+B:ne))}if(!s||f!=B){for(;u<U.start;)u=Math.min(U.start,u+5e3),r(u,f);f=B}U.start=U.pos}for(;u<U.pos;){var Le=Math.min(U.pos,u+5e3);r(Le,f),u=Le}}function Rt(e,t,a){for(var n,r,i=e.doc,o=a?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=i.first)return i.first;var u=ut(i,s-1),f=u.stateAfter;if(f&&(!a||s+(f instanceof vn?f.lookAhead:0)<=i.modeFrontier))return s;var U=X(u.text,null,e.options.tabSize);(r==null||n>U)&&(r=s-1,n=U)}return r}function an(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var a=e.first,n=t-1;n>a;n--){var r=ut(e,n).stateAfter;if(r&&(!(r instanceof vn)||n+r.lookAhead<t)){a=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,a)}var yn=!1,dn=!1;function Sn(){yn=!0}function Xn(){dn=!0}function xn(e,t,a){this.marker=e,this.from=t,this.to=a}function Jn(e,t){if(e)for(var a=0;a<e.length;++a){var n=e[a];if(n.marker==t)return n}}function Ha(e,t){for(var a,n=0;n<e.length;++n)e[n]!=t&&(a||(a=[])).push(e[n]);return a}function Yn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function On(e,t,a){var n;if(e)for(var r=0;r<e.length;++r){var i=e[r],o=i.marker,s=i.from==null||(o.inclusiveLeft?i.from<=t:i.from<t);if(s||i.from==t&&o.type=="bookmark"&&(!a||!i.marker.insertLeft)){var u=i.to==null||(o.inclusiveRight?i.to>=t:i.to>t);(n||(n=[])).push(new xn(o,i.from,u?null:i.to))}}return n}function Ma(e,t,a){var n;if(e)for(var r=0;r<e.length;++r){var i=e[r],o=i.marker,s=i.to==null||(o.inclusiveRight?i.to>=t:i.to>t);if(s||i.from==t&&o.type=="bookmark"&&(!a||i.marker.insertLeft)){var u=i.from==null||(o.inclusiveLeft?i.from<=t:i.from<t);(n||(n=[])).push(new xn(o,u?null:i.from-t,i.to==null?null:i.to-t))}}return n}function ga(e,t){if(t.full)return null;var a=Mn(e,t.from.line)&&ut(e,t.from.line).markedSpans,n=Mn(e,t.to.line)&&ut(e,t.to.line).markedSpans;if(!a&&!n)return null;var r=t.from.ch,i=t.to.ch,o=Ye(t.from,t.to)==0,s=On(a,r,o),u=Ma(n,i,o),f=t.text.length==1,U=ie(t.text).length+(f?r:0);if(s)for(var B=0;B<s.length;++B){var le=s[B];if(le.to==null){var ne=Jn(u,le.marker);ne?f&&(le.to=ne.to==null?null:ne.to+U):le.to=r}}if(u)for(var Le=0;Le<u.length;++Le){var Ke=u[Le];if(Ke.to!=null&&(Ke.to+=U),Ke.from==null){var Ze=Jn(s,Ke.marker);Ze||(Ke.from=U,f&&(s||(s=[])).push(Ke))}else Ke.from+=U,f&&(s||(s=[])).push(Ke)}s&&(s=Tn(s)),u&&u!=s&&(u=Tn(u));var ct=[s];if(!f){var xt=t.text.length-2,dt;if(xt>0&&s)for(var St=0;St<s.length;++St)s[St].to==null&&(dt||(dt=[])).push(new xn(s[St].marker,null,null));for(var Wt=0;Wt<xt;++Wt)ct.push(dt);ct.push(u)}return ct}function Tn(e){for(var t=0;t<e.length;++t){var a=e[t];a.from!=null&&a.from==a.to&&a.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function La(e,t,a){var n=null;if(e.iter(t.line,a.line+1,function(ne){if(ne.markedSpans)for(var Le=0;Le<ne.markedSpans.length;++Le){var Ke=ne.markedSpans[Le].marker;Ke.readOnly&&(!n||pe(n,Ke)==-1)&&(n||(n=[])).push(Ke)}}),!n)return null;for(var r=[{from:t,to:a}],i=0;i<n.length;++i)for(var o=n[i],s=o.find(0),u=0;u<r.length;++u){var f=r[u];if(Ye(f.to,s.from)<0||Ye(f.from,s.to)>0)continue;var U=[u,1],B=Ye(f.from,s.from),le=Ye(f.to,s.to);(B<0||!o.inclusiveLeft&&!B)&&U.push({from:f.from,to:s.from}),(le>0||!o.inclusiveRight&&!le)&&U.push({from:s.to,to:f.to}),r.splice.apply(r,U),u+=U.length-3}return r}function fr(e){var t=e.markedSpans;if(!t)return;for(var a=0;a<t.length;++a)t[a].marker.detachLine(e);e.markedSpans=null}function Xa(e,t){if(!t)return;for(var a=0;a<t.length;++a)t[a].marker.attachLine(e);e.markedSpans=t}function qa(e){return e.inclusiveLeft?-1:0}function ka(e){return e.inclusiveRight?1:0}function hr(e,t){var a=e.lines.length-t.lines.length;if(a!=0)return a;var n=e.find(),r=t.find(),i=Ye(n.from,r.from)||qa(e)-qa(t);if(i)return-i;var o=Ye(n.to,r.to)||ka(e)-ka(t);return o||t.id-e.id}function pr(e,t){var a=dn&&e.markedSpans,n;if(a)for(var r=void 0,i=0;i<a.length;++i)r=a[i],r.marker.collapsed&&(t?r.from:r.to)==null&&(!n||hr(n,r.marker)<0)&&(n=r.marker);return n}function er(e){return pr(e,!0)}function mr(e){return pr(e,!1)}function Na(e,t){var a=dn&&e.markedSpans,n;if(a)for(var r=0;r<a.length;++r){var i=a[r];i.marker.collapsed&&(i.from==null||i.from<t)&&(i.to==null||i.to>t)&&(!n||hr(n,i.marker)<0)&&(n=i.marker)}return n}function Xr(e,t,a,n,r){var i=ut(e,t),o=dn&&i.markedSpans;if(o)for(var s=0;s<o.length;++s){var u=o[s];if(!u.marker.collapsed)continue;var f=u.marker.find(0),U=Ye(f.from,a)||qa(u.marker)-qa(r),B=Ye(f.to,n)||ka(u.marker)-ka(r);if(U>=0&&B<=0||U<=0&&B>=0)continue;if(U<=0&&(u.marker.inclusiveRight&&r.inclusiveLeft?Ye(f.to,a)>=0:Ye(f.to,a)>0)||U>=0&&(u.marker.inclusiveRight&&r.inclusiveLeft?Ye(f.from,n)<=0:Ye(f.from,n)<0))return!0}}function Mt(e){for(var t;t=er(e);)e=t.find(-1,!0).line;return e}function $t(e){for(var t;t=mr(e);)e=t.find(1,!0).line;return e}function Xt(e){for(var t,a;t=mr(e);)e=t.find(1,!0).line,(a||(a=[])).push(e);return a}function un(e,t){var a=ut(e,t),n=Mt(a);return a==n?t:Lt(n)}function sn(e,t){if(t>e.lastLine())return t;var a=ut(e,t),n;if(!Gt(e,a))return t;for(;n=mr(a);)a=n.find(1,!0).line;return Lt(a)+1}function Gt(e,t){var a=dn&&t.markedSpans;if(a)for(var n=void 0,r=0;r<a.length;++r){if(n=a[r],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&gn(e,t,n))return!0}}function gn(e,t,a){if(a.to==null){var n=a.marker.find(1,!0);return gn(e,n.line,Jn(n.line.markedSpans,a.marker))}if(a.marker.inclusiveRight&&a.to==t.text.length)return!0;for(var r=void 0,i=0;i<t.markedSpans.length;++i)if(r=t.markedSpans[i],r.marker.collapsed&&!r.marker.widgetNode&&r.from==a.to&&(r.to==null||r.to!=a.from)&&(r.marker.inclusiveLeft||a.marker.inclusiveRight)&&gn(e,t,r))return!0}function Cn(e){e=Mt(e);for(var t=0,a=e.parent,n=0;n<a.lines.length;++n){var r=a.lines[n];if(r==e)break;t+=r.height}for(var i=a.parent;i;a=i,i=a.parent)for(var o=0;o<i.children.length;++o){var s=i.children[o];if(s==a)break;t+=s.height}return t}function $n(e){if(e.height==0)return 0;for(var t=e.text.length,a,n=e;a=er(n);){var r=a.find(0,!0);n=r.from.line,t+=r.from.ch-r.to.ch}for(n=e;a=mr(n);){var i=a.find(0,!0);t-=n.text.length-i.from.ch,n=i.to.line,t+=n.text.length-i.to.ch}return t}function sa(e){var t=e.display,a=e.doc;t.maxLine=ut(a,a.first),t.maxLineLength=$n(t.maxLine),t.maxLineChanged=!0,a.iter(function(n){var r=$n(n);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var bn=function(e,t,a){this.text=e,Xa(this,t),this.height=a?a(this):1};bn.prototype.lineNo=function(){return Lt(this)},k(bn);function ba(e,t,a,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),fr(e),Xa(e,a);var r=n?n(e):1;r!=e.height&&qt(e,r)}function Qn(e){e.parent=null,fr(e)}var ja={},$a={};function tr(e,t){if(!e||/^\s*$/.test(e))return null;var a=t.addModeClass?$a:ja;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function bi(e,t){var a=L("span",null,null,y?"padding-right: .1px":null),n={pre:L("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var i=r?t.rest[r-1]:t.line,o=void 0;n.pos=0,n.addToken=Gi,Ot(e.display.measure)&&(o=vt(i,e.doc.direction))&&(n.addToken=$r(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&Lt(i);yi(i,n,za(e,i,s)),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=Q(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=Q(i.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(ze(e.display.measure))),r==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(y){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ke(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Q(n.pre.className,n.textClass||"")),n}function _i(e){var t=m("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Gi(e,t,a,n,r,i,o){if(!t)return;var s=e.splitSpaces?Vi(t,e.trailingSpace):t,u=e.cm.state.specialChars,f=!1,U;if(!u.test(t))e.col+=t.length,U=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,U),$&&S<9&&(f=!0),e.pos+=t.length;else{U=document.createDocumentFragment();for(var B=0;;){u.lastIndex=B;var le=u.exec(t),ne=le?le.index-B:t.length-B;if(ne){var Le=document.createTextNode(s.slice(B,B+ne));$&&S<9?U.appendChild(m("span",[Le])):U.appendChild(Le),e.map.push(e.pos,e.pos+ne,Le),e.col+=ne,e.pos+=ne}if(!le)break;B+=ne+1;var Ke=void 0;if(le[0]==" "){var Ze=e.cm.options.tabSize,ct=Ze-e.col%Ze;Ke=U.appendChild(m("span",x(ct),"cm-tab")),Ke.setAttribute("role","presentation"),Ke.setAttribute("cm-text"," "),e.col+=ct}else le[0]=="\r"||le[0]==`
`?(Ke=U.appendChild(m("span",le[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ke.setAttribute("cm-text",le[0]),e.col+=1):(Ke=e.cm.options.specialCharPlaceholder(le[0]),Ke.setAttribute("cm-text",le[0]),$&&S<9?U.appendChild(m("span",[Ke])):U.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,a||n||r||f||i||o){var xt=a||"";n&&(xt+=n),r&&(xt+=r);var dt=m("span",[U],xt,i);if(o)for(var St in o)o.hasOwnProperty(St)&&St!="style"&&St!="class"&&dt.setAttribute(St,o[St]);return e.content.appendChild(dt)}e.content.appendChild(U)}function Vi(e,t){if(e.length>1&&!/ /.test(e))return e;for(var a=t,n="",r=0;r<e.length;r++){var i=e.charAt(r);i==" "&&a&&(r==e.length-1||e.charCodeAt(r+1)==32)&&(i="\xA0"),n+=i,a=i==" "}return n}function $r(e,t){return function(a,n,r,i,o,s,u){r=r?r+" cm-force-border":"cm-force-border";for(var f=a.pos,U=f+n.length;;){for(var B=void 0,le=0;le<t.length&&!(B=t[le],B.to>f&&B.from<=f);le++);if(B.to>=U)return e(a,n,r,i,o,s,u);e(a,n.slice(0,B.to-f),r,i,null,s,u),i=null,n=n.slice(B.to-f),f=B.to}}}function Ei(e,t,a,n){var r=!n&&a.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!n&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",a.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function yi(e,t,a){var n=e.markedSpans,r=e.text,i=0;if(!n){for(var o=1;o<a.length;o+=2)t.addToken(t,r.slice(i,i=a[o]),tr(a[o+1],t.cm.options));return}for(var s=r.length,u=0,f=1,U="",B,le,ne=0,Le,Ke,Ze,ct,xt;;){if(ne==u){Le=Ke=Ze=le="",xt=null,ct=null,ne=Infinity;for(var dt=[],St=void 0,Wt=0;Wt<n.length;++Wt){var Nt=n[Wt],Qt=Nt.marker;if(Qt.type=="bookmark"&&Nt.from==u&&Qt.widgetNode)dt.push(Qt);else if(Nt.from<=u&&(Nt.to==null||Nt.to>u||Qt.collapsed&&Nt.to==u&&Nt.from==u)){if(Nt.to!=null&&Nt.to!=u&&ne>Nt.to&&(ne=Nt.to,Ke=""),Qt.className&&(Le+=" "+Qt.className),Qt.css&&(le=(le?le+";":"")+Qt.css),Qt.startStyle&&Nt.from==u&&(Ze+=" "+Qt.startStyle),Qt.endStyle&&Nt.to==ne&&(St||(St=[])).push(Qt.endStyle,Nt.to),Qt.title&&((xt||(xt={})).title=Qt.title),Qt.attributes)for(var _n in Qt.attributes)(xt||(xt={}))[_n]=Qt.attributes[_n];Qt.collapsed&&(!ct||hr(ct.marker,Qt)<0)&&(ct=Nt)}else Nt.from>u&&ne>Nt.from&&(ne=Nt.from)}if(St)for(var ia=0;ia<St.length;ia+=2)St[ia+1]==ne&&(Ke+=" "+St[ia]);if(!ct||ct.from==u)for(var Nn=0;Nn<dt.length;++Nn)Ei(t,0,dt[Nn]);if(ct&&(ct.from||0)==u){if(Ei(t,(ct.to==null?s+1:ct.to)-u,ct.marker,ct.from==null),ct.to==null)return;ct.to==u&&(ct=!1)}}if(u>=s)break;for(var Oa=Math.min(s,ne);;){if(U){var xa=u+U.length;if(!ct){var zn=xa>Oa?U.slice(0,Oa-u):U;t.addToken(t,zn,B?B+Le:Le,Ze,u+zn.length==ne?Ke:"",le,xt)}if(xa>=Oa){U=U.slice(Oa-u),u=Oa;break}u=xa,Ze=""}U=r.slice(i,i=a[f++]),B=tr(a[f++],t.cm.options)}}}function xi(e,t,a){this.line=t,this.rest=Xt(t),this.size=this.rest?Lt(ie(this.rest))-a+1:1,this.node=this.text=null,this.hidden=Gt(e,t)}function Ga(e,t,a){for(var n=[],r,i=t;i<a;i=r){var o=new xi(e.doc,ut(e.doc,i),i);r=i+o.size,n.push(o)}return n}var Ua=null;function Ji(e){Ua?Ua.ops.push(e):e.ownsGroup=Ua={ops:[e],delayedCallbacks:[]}}function Yi(e){var t=e.delayedCallbacks,a=0;do{for(;a<t.length;a++)t[a].call(null);for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(a<t.length)}function Qi(e,t){var a=e.ownsGroup;if(!a)return;try{Yi(a)}finally{Ua=null,t(a)}}var vr=null;function Gn(e,t){var a=wt(e,t);if(!a.length)return;var n=Array.prototype.slice.call(arguments,2),r;Ua?r=Ua.delayedCallbacks:vr?r=vr:(r=vr=[],setTimeout(Zi,0));for(var i=function(s){r.push(function(){return a[s].apply(null,n)})},o=0;o<a.length;++o)i(o)}function Zi(){var e=vr;vr=null;for(var t=0;t<e.length;++t)e[t]()}function kr(e,t,a,n){for(var r=0;r<t.changes.length;r++){var i=t.changes[r];i=="text"?qi(e,t):i=="gutter"?wi(e,t,a,n):i=="class"?Gr(e,t):i=="widget"&&gr(e,t,n)}t.changes=null}function nr(e){return e.node==e.text&&(e.node=m("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),$&&S<8&&(e.node.style.zIndex=2)),e.node}function Ja(e,t){var a=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),t.background)a?t.background.className=a:(t.background.parentNode.removeChild(t.background),t.background=null);else if(a){var n=nr(t);t.background=n.insertBefore(m("div",null,a),n.firstChild),e.display.input.setUneditable(t.background)}}function Ci(e,t){var a=e.display.externalMeasured;return a&&a.line==t.line?(e.display.externalMeasured=null,t.measure=a.measure,a.built):bi(e,t)}function qi(e,t){var a=t.text.className,n=Ci(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,Gr(e,t)):a&&(t.text.className=a)}function Gr(e,t){Ja(e,t),t.line.wrapClass?nr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var a=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=a||""}function wi(e,t,a,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 r=nr(t);t.gutterBackground=m("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),r.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=nr(t),s=t.gutter=m("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(m("div",Vt(e.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var u=0;u<e.display.gutterSpecs.length;++u){var f=e.display.gutterSpecs[u].className,U=i.hasOwnProperty(f)&&i[f];U&&s.appendChild(m("div",[U],"CodeMirror-gutter-elt","left: "+n.gutterLeft[f]+"px; width: "+n.gutterWidth[f]+"px"))}}}function gr(e,t,a){t.alignable&&(t.alignable=null);for(var n=V("CodeMirror-linewidget"),r=t.node.firstChild,i=void 0;r;r=i)i=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);Vr(e,t,a)}function Si(e,t,a,n){var r=Ci(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),Gr(e,t),wi(e,t,a,n),Vr(e,t,n),t.node}function Vr(e,t,a){if(br(e,t.line,t,a,!0),t.rest)for(var n=0;n<t.rest.length;n++)br(e,t.rest[n],t,a,!1)}function br(e,t,a,n,r){if(!t.widgets)return;for(var i=nr(a),o=0,s=t.widgets;o<s.length;++o){var u=s[o],f=m("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),eo(u,f,a,n),e.display.input.setUneditable(f),r&&u.above?i.insertBefore(f,a.gutter||a.text):i.appendChild(f),Gn(u,"redraw")}}function eo(e,t,a,n){if(e.noHScroll){(a.alignable||(a.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(r-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function ar(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!_(document.body,e.node)){var a="position: relative;";e.coverGutter&&(a+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(a+="width: "+t.display.wrapper.clientWidth+"px;"),v(t.display.measure,m("div",[e.node],null,a))}return e.height=e.node.parentNode.offsetHeight}function Ia(e,t){for(var a=J(t);a!=e.wrapper;a=a.parentNode)if(!a||a.nodeType==1&&a.getAttribute("cm-ignore-events")=="true"||a.parentNode==e.sizer&&a!=e.mover)return!0}function Tr(e){return e.lineSpace.offsetTop}function _r(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Oi(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=v(e.measure,m("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Ta(e){return Oe-e.display.nativeBarWidth}function Fa(e){return e.display.scroller.clientWidth-Ta(e)-e.display.barWidth}function Er(e){return e.display.scroller.clientHeight-Ta(e)-e.display.barHeight}function tt(e,t,a){var n=e.options.lineWrapping,r=n&&Fa(e);if(!t.measure.heights||n&&t.measure.width!=r){var i=t.measure.heights=[];if(n){t.measure.width=r;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var u=o[s],f=o[s+1];Math.abs(u.bottom-f.bottom)>2&&i.push((u.bottom+f.top)/2-a.top)}}i.push(a.bottom-a.top)}}function $e(e,t,a){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 r=0;r<e.rest.length;r++)if(Lt(e.rest[r])>a)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function De(e,t){t=Mt(t);var a=Lt(t),n=e.display.externalMeasured=new xi(e.doc,t,a);n.lineN=a;var r=n.built=bi(e,n);return n.text=r.pre,v(e.display.lineMeasure,r.pre),n}function _e(e,t,a,n){return st(e,qe(e,t),a,n)}function nt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[xr(e,t)];var a=e.display.externalMeasured;if(a&&t>=a.lineN&&t<a.lineN+a.size)return a}function qe(e,t){var a=Lt(t),n=nt(e,a);n&&!n.text?n=null:n&&n.changes&&(kr(e,n,a,Jr(e)),e.curOp.forceUpdate=!0),n||(n=De(e,t));var r=$e(n,t,a);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function st(e,t,a,n,r){t.before&&(a=-1);var i=a+(n||""),o;return t.cache.hasOwnProperty(i)?o=t.cache[i]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(tt(e,t.view,t.rect),t.hasHeights=!0),o=rn(e,t,a,n),o.bogus||(t.cache[i]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var It={left:0,right:0,top:0,bottom:0};function Jt(e,t,a){for(var n,r,i,o,s,u,f=0;f<e.length;f+=3)if(s=e[f],u=e[f+1],t<s?(r=0,i=1,o="left"):t<u?(r=t-s,i=r+1):(f==e.length-3||t==u&&e[f+3]>t)&&(i=u-s,r=i-1,t>=u&&(o="right")),r!=null){if(n=e[f+2],s==u&&a==(n.insertLeft?"left":"right")&&(o=a),a=="left"&&r==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)n=e[(f-=3)+2],o="left";if(a=="right"&&r==u-s)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)n=e[(f+=3)+2],o="right";break}return{node:n,start:r,end:i,collapse:o,coverStart:s,coverEnd:u}}function cn(e,t){var a=It;if(t=="left")for(var n=0;n<e.length&&!((a=e[n]).left!=a.right);n++);else for(var r=e.length-1;r>=0&&!((a=e[r]).left!=a.right);r--);return a}function rn(e,t,a,n){var r=Jt(t.map,a,n),i=r.node,o=r.start,s=r.end,u=r.collapse,f;if(i.nodeType==3){for(var U=0;U<4;U++){for(;o&&Me(t.line.text.charAt(r.coverStart+o));)--o;for(;r.coverStart+s<r.coverEnd&&Me(t.line.text.charAt(r.coverStart+s));)++s;if($&&S<9&&o==0&&s==r.coverEnd-r.coverStart?f=i.parentNode.getBoundingClientRect():f=cn(P(i,o,s).getClientRects(),n),f.left||f.right||o==0)break;s=o,o=o-1,u="right"}$&&S<11&&(f=fn(e.display.measure,f))}else{o>0&&(u=n="right");var B;e.options.lineWrapping&&(B=i.getClientRects()).length>1?f=B[n=="right"?B.length-1:0]:f=i.getBoundingClientRect()}if($&&S<9&&!o&&(!f||!f.left&&!f.right)){var le=i.parentNode.getClientRects()[0];le?f={left:le.left,right:le.left+_a(e.display),top:le.top,bottom:le.bottom}:f=It}for(var ne=f.top-t.rect.top,Le=f.bottom-t.rect.top,Ke=(ne+Le)/2,Ze=t.view.measure.heights,ct=0;ct<Ze.length-1&&!(Ke<Ze[ct]);ct++);var xt=ct?Ze[ct-1]:0,dt=Ze[ct],St={left:(u=="right"?f.right:f.left)-t.rect.left,right:(u=="left"?f.left:f.right)-t.rect.left,top:xt,bottom:dt};return!f.left&&!f.right&&(St.bogus=!0),e.options.singleCursorHeightPerLine||(St.rtop=ne,St.rbottom=Le),St}function fn(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zt(e))return t;var a=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*a,right:t.right*a,top:t.top*n,bottom:t.bottom*n}}function nn(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 Fn(e){e.display.externalMeasure=null,j(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)nn(e.display.view[t])}function Rn(e){Fn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pn(){return Y&&D?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Zn(){return Y&&D?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wn(e){var t=0;if(e.widgets)for(var a=0;a<e.widgets.length;++a)e.widgets[a].above&&(t+=ar(e.widgets[a]));return t}function jn(e,t,a,n,r){if(!r){var i=Wn(t);a.top+=i,a.bottom+=i}if(n=="line")return a;n||(n="local");var o=Cn(t);if(n=="local"?o+=Tr(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:Zn());var u=s.left+(n=="window"?0:Pn());a.left+=u,a.right+=u}return a.top+=o,a.bottom+=o,a}function qn(e,t,a){if(a=="div")return t;var n=t.left,r=t.top;if(a=="page")n-=Pn(),r-=Zn();else if(a=="local"||!a){var i=e.display.sizer.getBoundingClientRect();n+=i.left,r+=i.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:r-o.top}}function fa(e,t,a,n,r){return n||(n=ut(e.doc,t.line)),jn(e,n,_e(e,n,t.ch,r),a)}function Ht(e,t,a,n,r,i){n=n||ut(e.doc,t.line),r||(r=qe(e,n));function o(Le,Ke){var Ze=st(e,r,Le,Ke?"right":"left",i);return Ke?Ze.left=Ze.right:Ze.right=Ze.left,jn(e,n,Ze,a)}var s=vt(n,e.doc.direction),u=t.ch,f=t.sticky;if(u>=n.text.length?(u=n.text.length,f="before"):u<=0&&(u=0,f="after"),!s)return o(f=="before"?u-1:u,f=="before");function U(Le,Ke,Ze){var ct=s[Ke],xt=ct.level==1;return o(Ze?Le-1:Le,xt!=Ze)}var B=et(s,u,f),le=pt,ne=U(u,B,f=="before");return le!=null&&(ne.other=U(u,le,f!="before")),ne}function tn(e,t){var a=0;t=jt(e.doc,t),e.options.lineWrapping||(a=_a(e.display)*t.ch);var n=ut(e.doc,t.line),r=Cn(n)+Tr(e.display);return{left:a,right:a,top:r,bottom:r+n.height}}function Ln(e,t,a,n,r){var i=Ie(e,t,a);return i.xRel=r,n&&(i.outside=n),i}function ea(e,t,a){var n=e.doc;if(a+=e.display.viewOffset,a<0)return Ln(n.first,0,null,-1,-1);var r=en(n,a),i=n.first+n.size-1;if(r>i)return Ln(n.first+n.size-1,ut(n,i).text.length,null,1,1);t<0&&(t=0);for(var o=ut(n,r);;){var s=pn(e,o,r,t,a),u=Na(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var f=u.find(1);if(f.line==r)return f;o=ut(n,r=f.line)}}function Kn(e,t,a,n){n-=Wn(t);var r=t.text.length,i=lt(function(o){return st(e,a,o-1).bottom<=n},r,0);return r=lt(function(o){return st(e,a,o).top>n},i,r),{begin:i,end:r}}function ha(e,t,a,n){a||(a=qe(e,t));var r=jn(e,t,st(e,a,n),"line").top;return Kn(e,t,a,r)}function pa(e,t,a,n){return e.bottom<=a?!1:e.top>a?!0:(n?e.left:e.right)>t}function pn(e,t,a,n,r){r-=Cn(t);var i=qe(e,t),o=Wn(t),s=0,u=t.text.length,f=!0,U=vt(t,e.doc.direction);if(U){var B=(e.options.lineWrapping?ta:Dn)(e,t,a,i,U,n,r);f=B.level!=1,s=f?B.from:B.to-1,u=f?B.to:B.from-1}var le=null,ne=null,Le=lt(function(Wt){var Nt=st(e,i,Wt);return Nt.top+=o,Nt.bottom+=o,pa(Nt,n,r,!1)?(Nt.top<=r&&Nt.left<=n&&(le=Wt,ne=Nt),!0):!1},s,u),Ke,Ze,ct=!1;if(ne){var xt=n-ne.left<ne.right-n,dt=xt==f;Le=le+(dt?0:1),Ze=dt?"after":"before",Ke=xt?ne.left:ne.right}else{!f&&(Le==u||Le==s)&&Le++,Ze=Le==0?"after":Le==t.text.length?"before":st(e,i,Le-(f?1:0)).bottom+o<=r==f?"after":"before";var St=Ht(e,Ie(a,Le,Ze),"line",t,i);Ke=St.left,ct=r<St.top?-1:r>=St.bottom?1:0}return Le=Ce(t.text,Le,1),Ln(a,Le,Ze,ct,n-Ke)}function Dn(e,t,a,n,r,i,o){var s=lt(function(B){var le=r[B],ne=le.level!=1;return pa(Ht(e,Ie(a,ne?le.to:le.from,ne?"before":"after"),"line",t,n),i,o,!0)},0,r.length-1),u=r[s];if(s>0){var f=u.level!=1,U=Ht(e,Ie(a,f?u.from:u.to,f?"after":"before"),"line",t,n);pa(U,i,o,!0)&&U.top>o&&(u=r[s-1])}return u}function ta(e,t,a,n,r,i,o){var s=Kn(e,t,n,o),u=s.begin,f=s.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var U=null,B=null,le=0;le<r.length;le++){var ne=r[le];if(ne.from>=f||ne.to<=u)continue;var Le=ne.level!=1,Ke=st(e,n,Le?Math.min(f,ne.to)-1:Math.max(u,ne.from)).right,Ze=Ke<i?i-Ke+1e9:Ke-i;(!U||B>Ze)&&(U=ne,B=Ze)}return U||(U=r[r.length-1]),U.from<u&&(U={from:u,to:U.to,level:U.level}),U.to>f&&(U={from:U.from,to:f,level:U.level}),U}var ua;function na(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ua==null){ua=m("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ua.appendChild(document.createTextNode("x")),ua.appendChild(m("br"));ua.appendChild(document.createTextNode("x"))}v(e.measure,ua);var a=ua.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),j(e.measure),a||1}function _a(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=m("span","xxxxxxxxxx"),a=m("pre",[t],"CodeMirror-line-like");v(e.measure,a);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function Jr(e){for(var t=e.display,a={},n={},r=t.gutters.clientLeft,i=t.gutters.firstChild,o=0;i;i=i.nextSibling,++o){var s=e.display.gutterSpecs[o].className;a[s]=i.offsetLeft+i.clientLeft+r,n[s]=i.clientWidth}return{fixedPos:Yr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:a,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Yr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ko(e){var t=na(e.display),a=e.options.lineWrapping,n=a&&Math.max(5,e.display.scroller.clientWidth/_a(e.display)-3);return function(r){if(Gt(e.doc,r))return 0;var i=0;if(r.widgets)for(var o=0;o<r.widgets.length;o++)r.widgets[o].height&&(i+=r.widgets[o].height);return a?i+(Math.ceil(r.text.length/n)||1)*t:i+t}}function to(e){var t=e.doc,a=ko(e);t.iter(function(n){var r=a(n);r!=n.height&&qt(n,r)})}function yr(e,t,a,n){var r=e.display;if(!a&&J(t).getAttribute("cm-not-content")=="true")return null;var i,o,s=r.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,o=t.clientY-s.top}catch(B){return null}var u=ea(e,i,o),f;if(n&&u.xRel>0&&(f=ut(e.doc,u.line).text).length==u.ch){var U=X(f,f.length,e.options.tabSize)-f.length;u=Ie(u.line,Math.max(0,Math.round((i-Oi(e.display).left)/_a(e.display))-U))}return u}function xr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var a=e.display.view,n=0;n<a.length;n++)if(t-=a[n].size,t<0)return n}function Ea(e,t,a,n){t==null&&(t=e.doc.first),a==null&&(a=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&a<r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)dn&&un(e.doc,t)<r.viewTo&&ir(e);else if(a<=r.viewFrom)dn&&sn(e.doc,a+n)>r.viewFrom?ir(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&a>=r.viewTo)ir(e);else if(t<=r.viewFrom){var i=Ri(e,a,a+n,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=n):ir(e)}else if(a>=r.viewTo){var o=Ri(e,t,t,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):ir(e)}else{var s=Ri(e,t,t,-1),u=Ri(e,a,a+n,1);s&&u?(r.view=r.view.slice(0,s.index).concat(Ga(e,s.lineN,u.lineN)).concat(r.view.slice(u.index)),r.viewTo+=n):ir(e)}var f=r.externalMeasured;f&&(a<f.lineN?f.lineN+=n:t<f.lineN+f.size&&(r.externalMeasured=null))}function rr(e,t,a){e.curOp.viewChanged=!0;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var i=n.view[xr(e,t)];if(i.node==null)return;var o=i.changes||(i.changes=[]);pe(o,a)==-1&&o.push(a)}function ir(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ri(e,t,a,n){var r=xr(e,t),i,o=e.display.view;if(!dn||a==e.doc.first+e.doc.size)return{index:r,lineN:a};for(var s=e.display.viewFrom,u=0;u<r;u++)s+=o[u].size;if(s!=t){if(n>0){if(r==o.length-1)return null;i=s+o[r].size-t,r++}else i=s-t;t+=i,a+=i}for(;un(e.doc,a)!=a;){if(r==(n<0?0:o.length-1))return null;a+=n*o[r-(n<0?1:0)].size,r+=n}return{index:r,lineN:a}}function $s(e,t,a){var n=e.display,r=n.view;r.length==0||t>=n.viewTo||a<=n.viewFrom?(n.view=Ga(e,t,a),n.viewFrom=t):(n.viewFrom>t?n.view=Ga(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(xr(e,t))),n.viewFrom=t,n.viewTo<a?n.view=n.view.concat(Ga(e,n.viewTo,a)):n.viewTo>a&&(n.view=n.view.slice(0,xr(e,a)))),n.viewTo=a}function To(e){for(var t=e.display.view,a=0,n=0;n<t.length;n++){var r=t[n];!r.hidden&&(!r.node||r.changes)&&++a}return a}function Qr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Do(e,t){t===void 0&&(t=!0);for(var a=e.doc,n={},r=n.cursors=document.createDocumentFragment(),i=n.selection=document.createDocumentFragment(),o=0;o<a.sel.ranges.length;o++){if(!t&&o==a.sel.primIndex)continue;var s=a.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var u=s.empty();(u||e.options.showCursorWhenSelecting)&&Ao(e,s.head,r),u||Gs(e,s,i)}return n}function Ao(e,t,a){var n=Ht(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=a.appendChild(m("div","\xA0","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var i=a.appendChild(m("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 Pi(e,t){return e.top-t.top||e.left-t.left}function Gs(e,t,a){var n=e.display,r=e.doc,i=document.createDocumentFragment(),o=Oi(e.display),s=o.left,u=Math.max(n.sizerWidth,Fa(e)-n.sizer.offsetLeft)-o.right,f=r.direction=="ltr";function U(dt,St,Wt,Nt){St<0&&(St=0),St=Math.round(St),Nt=Math.round(Nt),i.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+dt+`px;
top: `+St+"px; width: "+(Wt==null?u-dt:Wt)+`px;
height: `+(Nt-St)+"px"))}function B(dt,St,Wt){var Nt=ut(r,dt),Qt=Nt.text.length,_n,ia;function Nn(zn,Ca){return fa(e,Ie(dt,zn),"div",Nt,Ca)}function Oa(zn,Ca,la){var Vn=ha(e,Nt,null,zn),Hn=Ca=="ltr"==(la=="after")?"left":"right",Un=la=="after"?Vn.begin:Vn.end-(/\s/.test(Nt.text.charAt(Vn.end-1))?2:1);return Nn(Un,Hn)[Hn]}var xa=vt(Nt,r.direction);return at(xa,St||0,Wt==null?Qt:Wt,function(zn,Ca,la,Vn){var Hn=la=="ltr",Un=Nn(zn,Hn?"left":"right"),wa=Nn(Ca-1,Hn?"right":"left"),zr=St==null&&zn==0,dr=Wt==null&&Ca==Qt,da=Vn==0,Va=!xa||Vn==xa.length-1;if(wa.top-Un.top<=3){var oa=(f?zr:dr)&&da,Ro=(f?dr:zr)&&Va,Qa=oa?s:(Hn?Un:wa).left,Rr=Ro?u:(Hn?wa:Un).right;U(Qa,Un.top,Rr-Qa,Un.bottom)}else{var Pr,va,Hr,Po;Hn?(Pr=f&&zr&&da?s:Un.left,va=f?u:Oa(zn,la,"before"),Hr=f?s:Oa(Ca,la,"after"),Po=f&&dr&&Va?u:wa.right):(Pr=f?Oa(zn,la,"before"):s,va=!f&&zr&&da?u:Un.right,Hr=!f&&dr&&Va?s:wa.left,Po=f?Oa(Ca,la,"after"):u),U(Pr,Un.top,va-Pr,Un.bottom),Un.bottom<wa.top&&U(s,Un.bottom,null,wa.top),U(Hr,wa.top,Po-Hr,wa.bottom)}(!_n||Pi(Un,_n)<0)&&(_n=Un),Pi(wa,_n)<0&&(_n=wa),(!ia||Pi(Un,ia)<0)&&(ia=Un),Pi(wa,ia)<0&&(ia=wa)}),{start:_n,end:ia}}var le=t.from(),ne=t.to();if(le.line==ne.line)B(le.line,le.ch,ne.ch);else{var Le=ut(r,le.line),Ke=ut(r,ne.line),Ze=Mt(Le)==Mt(Ke),ct=B(le.line,le.ch,Ze?Le.text.length+1:null).end,xt=B(ne.line,Ze?0:null,ne.ch).start;Ze&&(ct.top<xt.top-2?(U(ct.right,ct.top,null,ct.bottom),U(s,xt.top,xt.left,xt.bottom)):U(ct.right,ct.top,xt.left-ct.right,ct.bottom)),ct.bottom<xt.top&&U(s,ct.bottom,null,xt.top)}a.appendChild(i)}function no(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var a=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Dr(e),t.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Mo(e){e.state.focused||(e.display.input.focus(),ao(e))}function Lo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Dr(e))},100)}function ao(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ke(e,"focus",e,t),e.state.focused=!0,ue(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),y&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),no(e)}function Dr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(ke(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ki(e){for(var t=e.display,a=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var r=t.view[n],i=e.options.lineWrapping,o=void 0,s=0;if(r.hidden)continue;if($&&S<8){var u=r.node.offsetTop+r.node.offsetHeight;o=u-a,a=u}else{var f=r.node.getBoundingClientRect();o=f.bottom-f.top,!i&&r.text.firstChild&&(s=r.text.firstChild.getBoundingClientRect().right-f.left-1)}var U=r.line.height-o;if((U>.005||U<-.005)&&(qt(r.line,o),No(r.line),r.rest))for(var B=0;B<r.rest.length;B++)No(r.rest[B]);if(s>e.display.sizerWidth){var le=Math.ceil(s/_a(e.display));le>e.display.maxLineLength&&(e.display.maxLineLength=le,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function No(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var a=e.widgets[t],n=a.node.parentNode;n&&(a.height=n.offsetHeight)}}function Ti(e,t,a){var n=a&&a.top!=null?Math.max(0,a.top):e.scroller.scrollTop;n=Math.floor(n-Tr(e));var r=a&&a.bottom!=null?a.bottom:n+e.wrapper.clientHeight,i=en(t,n),o=en(t,r);if(a&&a.ensure){var s=a.ensure.from.line,u=a.ensure.to.line;s<i?(i=s,o=en(t,Cn(ut(t,s))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(i=en(t,Cn(ut(t,u))-e.wrapper.clientHeight),o=u)}return{from:i,to:Math.max(o,i+1)}}function Vs(e,t){if(Ue(e,"scrollCursorIntoView"))return;var a=e.display,n=a.sizer.getBoundingClientRect(),r=null;if(t.top+n.top<0?r=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),r!=null&&!M){var i=m("div","\u200B",null,`position: absolute;
top: `+(t.top-a.viewOffset-Tr(e.display))+`px;
height: `+(t.bottom-t.top+Ta(e)+a.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(r),e.display.lineSpace.removeChild(i)}}function Js(e,t,a,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==a&&(t=t.ch?Ie(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,a=t.sticky=="before"?Ie(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var o=!1,s=Ht(e,t),u=!a||a==t?s:Ht(e,a);r={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-n,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+n};var f=ro(e,r),U=e.doc.scrollTop,B=e.doc.scrollLeft;if(f.scrollTop!=null&&(qr(e,f.scrollTop),Math.abs(e.doc.scrollTop-U)>1&&(o=!0)),f.scrollLeft!=null&&(Cr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-B)>1&&(o=!0)),!o)break}return r}function Ys(e,t){var a=ro(e,t);a.scrollTop!=null&&qr(e,a.scrollTop),a.scrollLeft!=null&&Cr(e,a.scrollLeft)}function ro(e,t){var a=e.display,n=na(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,i=Er(e),o={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+_r(a),u=t.top<n,f=t.bottom>s-n;if(t.top<r)o.scrollTop=u?0:t.top;else if(t.bottom>r+i){var U=Math.min(t.top,(f?s:t.bottom)-i);U!=r&&(o.scrollTop=U)}var B=e.options.fixedGutter?0:a.gutters.offsetWidth,le=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft-B,ne=Fa(e)-a.gutters.offsetWidth,Le=t.right-t.left>ne;return Le&&(t.right=t.left+ne),t.left<10?o.scrollLeft=0:t.left<le?o.scrollLeft=Math.max(0,t.left+B-(Le?0:10)):t.right>ne+le-3&&(o.scrollLeft=t.right+(Le?0:10)-ne),o}function io(e,t){if(t==null)return;Di(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Ar(e){Di(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Zr(e,t,a){(t!=null||a!=null)&&Di(e),t!=null&&(e.curOp.scrollLeft=t),a!=null&&(e.curOp.scrollTop=a)}function Qs(e,t){Di(e),e.curOp.scrollToPos=t}function Di(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var a=tn(e,t.from),n=tn(e,t.to);jo(e,a,n,t.margin)}}function jo(e,t,a,n){var r=ro(e,{left:Math.min(t.left,a.left),top:Math.min(t.top,a.top)-n,right:Math.max(t.right,a.right),bottom:Math.max(t.bottom,a.bottom)+n});Zr(e,r.scrollLeft,r.scrollTop)}function qr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;re||so(e,{top:t}),Uo(e,t,!0),re&&so(e),ni(e,100)}function Uo(e,t,a){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!a)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Cr(e,t,a,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Ko(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ei(e){var t=e.display,a=t.gutters.offsetWidth,n=Math.round(e.doc.height+_r(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?a:0,docHeight:n,scrollHeight:n+Ta(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:a}}var wr=function(e,t,a){this.cm=a;var n=this.vert=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=m("div",[m("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),Re(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Re(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,$&&S<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=a?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(a?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:a?n:0,bottom:t?n:0}},wr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wr.prototype.zeroWidthHack=function(){var e=h&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ge,this.disableVert=new ge},wr.prototype.enableZeroWidthBar=function(e,t,a){e.style.pointerEvents="auto";function n(){var r=e.getBoundingClientRect(),i=a=="vert"?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},wr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ti=function(){};ti.prototype.update=function(){return{bottom:0,right:0}},ti.prototype.setScrollLeft=function(){},ti.prototype.setScrollTop=function(){},ti.prototype.clear=function(){};function Mr(e,t){t||(t=ei(e));var a=e.display.barWidth,n=e.display.barHeight;Io(e,t);for(var r=0;r<4&&a!=e.display.barWidth||n!=e.display.barHeight;r++)a!=e.display.barWidth&&e.options.lineWrapping&&ki(e),Io(e,ei(e)),a=e.display.barWidth,n=e.display.barHeight}function Io(e,t){var a=e.display,n=a.scrollbars.update(t);a.sizer.style.paddingRight=(a.barWidth=n.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=n.bottom)+"px",a.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=n.bottom+"px",a.scrollbarFiller.style.width=n.right+"px"):a.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=n.bottom+"px",a.gutterFiller.style.width=t.gutterWidth+"px"):a.gutterFiller.style.display=""}var Fo={native:wr,null:ti};function Bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Fo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Re(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,a){a=="horizontal"?Cr(e,t):qr(e,t)},e),e.display.scrollbars.addClass&&ue(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function Sr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},Ji(e.curOp)}function Or(e){var t=e.curOp;t&&Qi(t,function(a){for(var n=0;n<a.ops.length;n++)a.ops[n].cm.curOp=null;qs(a)})}function qs(e){for(var t=e.ops,a=0;a<t.length;a++)el(t[a]);for(var n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)nl(t[r]);for(var i=0;i<t.length;i++)al(t[i]);for(var o=0;o<t.length;o++)rl(t[o])}function el(e){var t=e.cm,a=t.display;ol(t),e.updateMaxLine&&sa(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<a.viewFrom||e.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&oo(e.cm,e.update)}function nl(e){var t=e.cm,a=t.display;e.updatedDisplay&&ki(t),e.barMeasure=ei(t),a.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_e(t,a.maxLine,a.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Ta(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-Fa(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function al(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Cr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var a=e.focus&&e.focus==F();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,a),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Mr(t,e.barMeasure),e.updatedDisplay&&uo(t,e.barMeasure),e.selectionChanged&&no(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),a&&Mo(e.cm)}function rl(e){var t=e.cm,a=t.display,n=t.doc;if(e.updatedDisplay&&Wo(t,e.update),a.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(a.wheelStartX=a.wheelStartY=null),e.scrollTop!=null&&Uo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Cr(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=Js(t,jt(n,e.scrollToPos.from),jt(n,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,r)}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||ke(i[s],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&ke(o[u],"unhide");a.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ke(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Sa(e,t){if(e.curOp)return t();Sr(e);try{return t()}finally{Or(e)}}function aa(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Sr(e);try{return t.apply(e,arguments)}finally{Or(e)}}}function ma(e){return function(){if(this.curOp)return e.apply(this,arguments);Sr(this);try{return e.apply(this,arguments)}finally{Or(this)}}}function ra(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Sr(t);try{return e.apply(this,arguments)}finally{Or(t)}}}function ni(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(il,e))}function il(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var a=+new Date+e.options.workTime,n=wn(e,t.highlightFrontier),r=[];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?Tt(t.mode,n.state):null,u=Za(e,i,n,!0);s&&(n.state=s),i.styles=u.styles;var f=i.styleClasses,U=u.classes;U?i.styleClasses=U:f&&(i.styleClasses=null);for(var B=!o||o.length!=i.styles.length||f!=U&&(!f||!U||f.bgClass!=U.bgClass||f.textClass!=U.textClass),le=0;!B&&le<o.length;++le)B=o[le]!=i.styles[le];B&&r.push(n.line),i.stateAfter=n.save(),n.nextLine()}else i.text.length<=e.options.maxHighlightLength&&Aa(e,i.text,n),i.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>a)return ni(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&Sa(e,function(){for(var i=0;i<r.length;i++)rr(e,r[i],"text")})}var Ai=function(e,t,a){var n=e.display;this.viewport=t,this.visible=Ti(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Fa(e),this.force=a,this.dims=Jr(e),this.events=[]};Ai.prototype.signal=function(e,t){T(e,t)&&this.events.push(arguments)},Ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ke.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=Ta(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ta(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=F();if(!t||!_(e.display.lineDiv,t))return null;var a={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&_(e.display.lineDiv,n.anchorNode)&&(a.anchorNode=n.anchorNode,a.anchorOffset=n.anchorOffset,a.focusNode=n.focusNode,a.focusOffset=n.focusOffset)}return a}function ll(e){if(!e||!e.activeElt||e.activeElt==F())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(),a=document.createRange();a.setEnd(e.anchorNode,e.anchorOffset),a.collapse(!1),t.removeAllRanges(),t.addRange(a),t.extend(e.focusNode,e.focusOffset)}}function oo(e,t){var a=e.display,n=e.doc;if(t.editorIsHidden)return ir(e),!1;if(!t.force&&t.visible.from>=a.viewFrom&&t.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&To(e)==0)return!1;zo(e)&&(ir(e),t.dims=Jr(e));var r=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(r,t.visible.to+e.options.viewportMargin);a.viewFrom<i&&i-a.viewFrom<20&&(i=Math.max(n.first,a.viewFrom)),a.viewTo>o&&a.viewTo-o<20&&(o=Math.min(r,a.viewTo)),dn&&(i=un(e.doc,i),o=sn(e.doc,o));var s=i!=a.viewFrom||o!=a.viewTo||a.lastWrapHeight!=t.wrapperHeight||a.lastWrapWidth!=t.wrapperWidth;$s(e,i,o),a.viewOffset=Cn(ut(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var u=To(e);if(!s&&u==0&&!t.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var f=sl(e);return u>4&&(a.lineDiv.style.display="none"),ul(e,a.updateLineNumbers,t.dims),u>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,ll(f),j(a.cursorDiv),j(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,s&&(a.lastWrapHeight=t.wrapperHeight,a.lastWrapWidth=t.wrapperWidth,ni(e,400)),a.updateLineNumbers=null,!0}function Wo(e,t){for(var a=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Fa(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+_r(e.display)-Er(e),a.top)}),t.visible=Ti(e.display,e.doc,a),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Ti(e.display,e.doc,a));if(!oo(e,t))break;ki(e);var r=ei(e);Qr(e),Mr(e,r),uo(e,r),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 so(e,t){var a=new Ai(e,t);if(oo(e,a)){ki(e),Wo(e,a);var n=ei(e);Qr(e),Mr(e,n),uo(e,n),a.finish()}}function ul(e,t,a){var n=e.display,r=e.options.lineNumbers,i=n.lineDiv,o=i.firstChild;function s(Le){var Ke=Le.nextSibling;return y&&h&&e.display.currentWheelTarget==Le?Le.style.display="none":Le.parentNode.removeChild(Le),Ke}for(var u=n.view,f=n.viewFrom,U=0;U<u.length;U++){var B=u[U];if(!B.hidden)if(!B.node||B.node.parentNode!=i){var le=Si(e,B,f,a);i.insertBefore(le,o)}else{for(;o!=B.node;)o=s(o);var ne=r&&t!=null&&t<=f&&B.lineNumber;B.changes&&(pe(B.changes,"gutter")>-1&&(ne=!1),kr(e,B,f,a)),ne&&(j(B.lineNumber),B.lineNumber.appendChild(document.createTextNode(Vt(e.options,f)))),o=B.node.nextSibling}f+=B.size}for(;o;)o=s(o)}function lo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function uo(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+Ta(e)+"px"}function Ko(e){var t=e.display,a=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Yr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,i=n+"px",o=0;o<a.length;o++)if(!a[o].hidden){e.options.fixedGutter&&(a[o].gutter&&(a[o].gutter.style.left=i),a[o].gutterBackground&&(a[o].gutterBackground.style.left=i));var s=a[o].alignable;if(s)for(var u=0;u<s.length;u++)s[u].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function zo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,a=Vt(e.options,t.first+t.size-1),n=e.display;if(a.length!=n.lineNumChars){var r=n.measure.appendChild(m("div",[m("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=r.firstChild.offsetWidth,o=r.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?a.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",lo(e.display),!0}return!1}function co(e,t){for(var a=[],n=!1,r=0;r<e.length;r++){var i=e[r],o=null;if(typeof i!="string"&&(o=i.style,i=i.className),i=="CodeMirror-linenumbers")if(t)n=!0;else continue;a.push({className:i,style:o})}return t&&!n&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function Ho(e){var t=e.gutters,a=e.gutterSpecs;j(t),e.lineGutter=null;for(var n=0;n<a.length;++n){var r=a[n],i=r.className,o=r.style,s=t.appendChild(m("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=a.length?"":"none",lo(e)}function ai(e){Ho(e.display),Ea(e),Ko(e)}function cl(e,t,a,n){var r=this;this.input=a,r.scrollbarFiller=m("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=m("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=L("div",null,"CodeMirror-code"),r.selectionDiv=m("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=m("div",null,"CodeMirror-cursors"),r.measure=m("div",null,"CodeMirror-measure"),r.lineMeasure=m("div",null,"CodeMirror-measure"),r.lineSpace=L("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var i=L("div",[r.lineSpace],"CodeMirror-lines");r.mover=m("div",[i],null,"position: relative"),r.sizer=m("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=m("div",null,null,"position: absolute; height: "+Oe+"px; width: 1px;"),r.gutters=m("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=m("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=m("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),$&&S<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!y&&!(re&&K)&&(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=co(n.gutters,n.lineNumbers),Ho(r),a.init(r)}var Mi=0,Ra=null;$?Ra=-.53:re?Ra=15:Y?Ra=-.7:oe&&(Ra=-1/3);function Xo(e){var t=e.wheelDeltaX,a=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),a==null&&e.detail&&e.axis==e.VERTICAL_AXIS?a=e.detail:a==null&&(a=e.wheelDelta),{x:t,y:a}}function dl(e){var t=Xo(e);return t.x*=Ra,t.y*=Ra,t}function $o(e,t){var a=Xo(t),n=a.x,r=a.y,i=e.display,o=i.scroller,s=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&s||r&&u))return;if(r&&h&&y){e:for(var f=t.target,U=i.view;f!=o;f=f.parentNode)for(var B=0;B<U.length;B++)if(U[B].node==f){e.display.currentWheelTarget=f;break e}}if(n&&!re&&!q&&Ra!=null){r&&u&&qr(e,Math.max(0,o.scrollTop+r*Ra)),Cr(e,Math.max(0,o.scrollLeft+n*Ra)),(!r||r&&u)&&p(t),i.wheelStartX=null;return}if(r&&Ra!=null){var le=r*Ra,ne=e.doc.scrollTop,Le=ne+i.wrapper.clientHeight;le<0?ne=Math.max(0,ne+le-50):Le=Math.min(e.doc.height,Le+le+50),so(e,{top:ne,bottom:Le})}Mi<20&&(i.wheelStartX==null?(i.wheelStartX=o.scrollLeft,i.wheelStartY=o.scrollTop,i.wheelDX=n,i.wheelDY=r,setTimeout(function(){if(i.wheelStartX==null)return;var Ke=o.scrollLeft-i.wheelStartX,Ze=o.scrollTop-i.wheelStartY,ct=Ze&&i.wheelDY&&Ze/i.wheelDY||Ke&&i.wheelDX&&Ke/i.wheelDX;if(i.wheelStartX=i.wheelStartY=null,!ct)return;Ra=(Ra*Mi+ct)/(Mi+1),++Mi},200)):(i.wheelDX+=n,i.wheelDY+=r))}var Pa=function(e,t){this.ranges=e,this.primIndex=t};Pa.prototype.primary=function(){return this.ranges[this.primIndex]},Pa.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 a=this.ranges[t],n=e.ranges[t];if(!We(a.anchor,n.anchor)||!We(a.head,n.head))return!1}return!0},Pa.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ln(on(this.ranges[t].anchor),on(this.ranges[t].head));return new Pa(e,this.primIndex)},Pa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Pa.prototype.contains=function(e,t){t||(t=e);for(var a=0;a<this.ranges.length;a++){var n=this.ranges[a];if(Ye(t,n.from())>=0&&Ye(e,n.to())<=0)return a}return-1};var ln=function(e,t){this.anchor=e,this.head=t};ln.prototype.from=function(){return En(this.anchor,this.head)},ln.prototype.to=function(){return mn(this.anchor,this.head)},ln.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ba(e,t,a){var n=e&&e.options.selectionsMayTouch,r=t[a];t.sort(function(le,ne){return Ye(le.from(),ne.from())}),a=pe(t,r);for(var i=1;i<t.length;i++){var o=t[i],s=t[i-1],u=Ye(s.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var f=En(s.from(),o.from()),U=mn(s.to(),o.to()),B=s.empty()?o.from()==o.head:s.from()==s.head;i<=a&&--a,t.splice(--i,2,new ln(B?U:f,B?f:U))}}return new Pa(t,a)}function or(e,t){return new Pa([new ln(e,t||e)],0)}function sr(e){return e.text?Ie(e.from.line+e.text.length-1,ie(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Go(e,t){if(Ye(e,t.from)<0)return e;if(Ye(e,t.to)<=0)return sr(t);var a=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=sr(t).ch-t.to.ch),Ie(a,n)}function fo(e,t){for(var a=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];a.push(new ln(Go(r.anchor,t),Go(r.head,t)))}return Ba(e.cm,a,e.sel.primIndex)}function Vo(e,t,a){return e.line==t.line?Ie(a.line,e.ch-t.ch+a.ch):Ie(a.line+(e.line-t.line),e.ch)}function fl(e,t,a){for(var n=[],r=Ie(e.first,0),i=r,o=0;o<t.length;o++){var s=t[o],u=Vo(s.from,r,i),f=Vo(sr(s),r,i);if(r=s.to,i=f,a=="around"){var U=e.sel.ranges[o],B=Ye(U.head,U.anchor)<0;n[o]=new ln(B?f:u,B?u:f)}else n[o]=new ln(u,u)}return new Pa(n,e.sel.primIndex)}function ho(e){e.doc.mode=Qe(e.options,e.doc.modeOption),ri(e)}function ri(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ni(e,100),e.state.modeGen++,e.curOp&&Ea(e)}function Jo(e,t){return t.from.ch==0&&t.to.ch==0&&ie(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function po(e,t,a,n){function r(xt){return a?a[xt]:null}function i(xt,dt,St){ba(xt,dt,St,n),Gn(xt,"change",xt,t)}function o(xt,dt){for(var St=[],Wt=xt;Wt<dt;++Wt)St.push(new bn(f[Wt],r(Wt),n));return St}var s=t.from,u=t.to,f=t.text,U=ut(e,s.line),B=ut(e,u.line),le=ie(f),ne=r(f.length-1),Le=u.line-s.line;if(t.full)e.insert(0,o(0,f.length)),e.remove(f.length,e.size-f.length);else if(Jo(e,t)){var Ke=o(0,f.length-1);i(B,B.text,ne),Le&&e.remove(s.line,Le),Ke.length&&e.insert(s.line,Ke)}else if(U==B)if(f.length==1)i(U,U.text.slice(0,s.ch)+le+U.text.slice(u.ch),ne);else{var Ze=o(1,f.length-1);Ze.push(new bn(le+U.text.slice(u.ch),ne,n)),i(U,U.text.slice(0,s.ch)+f[0],r(0)),e.insert(s.line+1,Ze)}else if(f.length==1)i(U,U.text.slice(0,s.ch)+f[0]+B.text.slice(u.ch),r(0)),e.remove(s.line+1,Le);else{i(U,U.text.slice(0,s.ch)+f[0],r(0)),i(B,le+B.text.slice(u.ch),ne);var ct=o(1,f.length-1);Le>1&&e.remove(s.line+1,Le-1),e.insert(s.line+1,ct)}Gn(e,"change",e,t)}function lr(e,t,a){function n(r,i,o){if(r.linked)for(var s=0;s<r.linked.length;++s){var u=r.linked[s];if(u.doc==i)continue;var f=o&&u.sharedHist;if(a&&!f)continue;t(u.doc,f),n(u.doc,r,f)}}n(e,null,!0)}function Yo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,to(e),ho(e),Qo(e),e.options.lineWrapping||sa(e),e.options.mode=t.modeOption,Ea(e)}function Qo(e){(e.doc.direction=="rtl"?ue:b)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){Sa(e,function(){Qo(e),Ea(e)})}function Li(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 mo(e,t){var a={from:on(t.from),to:sr(t),text:Yt(e,t.from,t.to)};return es(e,a,t.from.line,t.to.line+1),lr(e,function(n){return es(n,a,t.from.line,t.to.line+1)},!0),a}function Zo(e){for(;e.length;){var t=ie(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Zo(e.done),ie(e.done);if(e.done.length&&!ie(e.done).ranges)return ie(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ie(e.done)}function qo(e,t,a,n){var r=e.history;r.undone.length=0;var i=+new Date,o,s;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&r.lastModTime>i-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(r,r.lastOp==n)))s=ie(o.changes),Ye(t.from,t.to)==0&&Ye(t.from,s.to)==0?s.to=sr(t):o.changes.push(mo(e,t));else{var u=ie(r.done);for((!u||!u.ranges)&&Ni(e.sel,r.done),o={changes:[mo(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(a),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=i,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=t.origin,s||ke(e,"historyAdded")}function ml(e,t,a,n){var r=t.charAt(0);return r=="*"||r=="+"&&a.ranges.length==n.ranges.length&&a.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,a,n){var r=e.history,i=n&&n.origin;a==r.lastSelOp||i&&r.lastSelOrigin==i&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==i||ml(e,i,ie(r.done),t))?r.done[r.done.length-1]=t:Ni(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=i,r.lastSelOp=a,n&&n.clearRedo!==!1&&Zo(r.undone)}function Ni(e,t){var a=ie(t);a&&a.ranges&&a.equals(e)||t.push(e)}function es(e,t,a,n){var r=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((r||(r=t["spans_"+e.id]={}))[i]=o.markedSpans),++i})}function gl(e){if(!e)return null;for(var t,a=0;a<e.length;++a)e[a].marker.explicitlyCleared?t||(t=e.slice(0,a)):t&&t.push(e[a]);return t?t.length?t:null:e}function bl(e,t){var a=t["spans_"+e.id];if(!a)return null;for(var n=[],r=0;r<t.text.length;++r)n.push(gl(a[r]));return n}function ts(e,t){var a=bl(e,t),n=ga(e,t);if(!a)return n;if(!n)return a;for(var r=0;r<a.length;++r){var i=a[r],o=n[r];if(i&&o){e:for(var s=0;s<o.length;++s){for(var u=o[s],f=0;f<i.length;++f)if(i[f].marker==u.marker)continue e;i.push(u)}}else o&&(a[r]=o)}return a}function Lr(e,t,a){for(var n=[],r=0;r<e.length;++r){var i=e[r];if(i.ranges){n.push(a?Pa.prototype.deepCopy.call(i):i);continue}var o=i.changes,s=[];n.push({changes:s});for(var u=0;u<o.length;++u){var f=o[u],U=void 0;if(s.push({from:f.from,to:f.to,text:f.text}),t)for(var B in f)(U=B.match(/^spans_(\d+)$/))&&(pe(t,Number(U[1]))>-1&&(ie(s)[B]=f[B],delete f[B]))}}return n}function vo(e,t,a,n){if(n){var r=e.anchor;if(a){var i=Ye(t,r)<0;i!=Ye(a,r)<0?(r=t,t=a):i!=Ye(t,a)<0&&(t=a)}return new ln(r,t)}else return new ln(a||t,t)}function ji(e,t,a,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),ca(e,new Pa([vo(e.sel.primary(),t,a,r)],0),n)}function ns(e,t,a){for(var n=[],r=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)n[i]=vo(e.sel.ranges[i],t[i],null,r);var o=Ba(e.cm,n,e.sel.primIndex);ca(e,o,a)}function go(e,t,a,n){var r=e.sel.ranges.slice(0);r[t]=a,ca(e,Ba(e.cm,r,e.sel.primIndex),n)}function as(e,t,a,n){ca(e,or(t,a),n)}function _l(e,t,a){var n={ranges:t.ranges,update:function(r){this.ranges=[];for(var i=0;i<r.length;i++)this.ranges[i]=new ln(jt(e,r[i].anchor),jt(e,r[i].head))},origin:a&&a.origin};return ke(e,"beforeSelectionChange",e,n),e.cm&&ke(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Ba(e.cm,n.ranges,n.ranges.length-1):t}function rs(e,t,a){var n=e.history.done,r=ie(n);r&&r.ranges?(n[n.length-1]=t,Ui(e,t,a)):ca(e,t,a)}function ca(e,t,a){Ui(e,t,a),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,a)}function Ui(e,t,a){(T(e,"beforeSelectionChange")||e.cm&&T(e.cm,"beforeSelectionChange"))&&(t=_l(e,t,a));var n=a&&a.bias||(Ye(t.primary().head,e.sel.primary().head)<0?-1:1);is(e,ss(e,t,n,!0)),!(a&&a.scroll===!1)&&e.cm&&Ar(e.cm)}function is(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,E(e.cm)),Gn(e,"cursorActivity",e)}function os(e){is(e,ss(e,e.sel,null,!1))}function ss(e,t,a,n){for(var r,i=0;i<t.ranges.length;i++){var o=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],u=Ii(e,o.anchor,s&&s.anchor,a,n),f=Ii(e,o.head,s&&s.head,a,n);(r||u!=o.anchor||f!=o.head)&&(r||(r=t.ranges.slice(0,i)),r[i]=new ln(u,f))}return r?Ba(e.cm,r,t.primIndex):t}function Nr(e,t,a,n,r){var i=ut(e,t.line);if(i.markedSpans)for(var o=0;o<i.markedSpans.length;++o){var s=i.markedSpans[o],u=s.marker,f="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,U="selectRight"in u?!u.selectRight:u.inclusiveRight;if((s.from==null||(f?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(U?s.to>=t.ch:s.to>t.ch))){if(r&&(ke(u,"beforeCursorEnter"),u.explicitlyCleared))if(i.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(a){var B=u.find(n<0?1:-1),le=void 0;if((n<0?U:f)&&(B=ls(e,B,-n,B&&B.line==t.line?i:null)),B&&B.line==t.line&&(le=Ye(B,a))&&(n<0?le<0:le>0))return Nr(e,B,t,n,r)}var ne=u.find(n<0?-1:1);return(n<0?f:U)&&(ne=ls(e,ne,n,ne.line==t.line?i:null)),ne?Nr(e,ne,t,n,r):null}}return t}function Ii(e,t,a,n,r){var i=n||1,o=Nr(e,t,a,i,r)||!r&&Nr(e,t,a,i,!0)||Nr(e,t,a,-i,r)||!r&&Nr(e,t,a,-i,!0);return o||(e.cantEdit=!0,Ie(e.first,0))}function ls(e,t,a,n){return a<0&&t.ch==0?t.line>e.first?jt(e,Ie(t.line-1)):null:a>0&&t.ch==(n||ut(e,t.line)).text.length?t.line<e.first+e.size-1?Ie(t.line+1,0):null:new Ie(t.line,t.ch+a)}function us(e){e.setSelection(Ie(e.firstLine(),0),Ie(e.lastLine()),de)}function cs(e,t,a){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return a&&(n.update=function(r,i,o,s){r&&(n.from=jt(e,r)),i&&(n.to=jt(e,i)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),ke(e,"beforeChange",e,n),e.cm&&ke(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 jr(e,t,a){if(e.cm){if(!e.cm.curOp)return aa(e.cm,jr)(e,t,a);if(e.cm.state.suppressEdits)return}if((T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"))&&(t=cs(e,t,!0),!t))return;var n=yn&&!a&&La(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)ds(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else ds(e,t)}function ds(e,t){if(t.text.length==1&&t.text[0]==""&&Ye(t.from,t.to)==0)return;var a=fo(e,t);qo(e,t,a,e.cm?e.cm.curOp.id:NaN),ii(e,t,a,ga(e,t));var n=[];lr(e,function(r,i){!i&&pe(n,r.history)==-1&&(ms(r.history,t),n.push(r.history)),ii(r,t,null,ga(r,t))})}function Fi(e,t,a){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!a)return;for(var r=e.history,i,o=e.sel,s=t=="undo"?r.done:r.undone,u=t=="undo"?r.undone:r.done,f=0;f<s.length&&!(i=s[f],a?i.ranges&&!i.equals(e.sel):!i.ranges);f++);if(f==s.length)return;for(r.lastOrigin=r.lastSelOrigin=null;;)if(i=s.pop(),i.ranges){if(Ni(i,u),a&&!i.equals(e.sel)){ca(e,i,{clearRedo:!1});return}o=i}else if(n){s.push(i);return}else break;var U=[];Ni(o,u),u.push({changes:U,generation:r.generation}),r.generation=i.generation||++r.maxGeneration;for(var B=T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"),le=function(Ke){var Ze=i.changes[Ke];if(Ze.origin=t,B&&!cs(e,Ze,!1))return s.length=0,{};U.push(mo(e,Ze));var ct=Ke?fo(e,Ze):ie(s);ii(e,Ze,ct,ts(e,Ze)),!Ke&&e.cm&&e.cm.scrollIntoView({from:Ze.from,to:sr(Ze)});var xt=[];lr(e,function(dt,St){!St&&pe(xt,dt.history)==-1&&(ms(dt.history,Ze),xt.push(dt.history)),ii(dt,Ze,null,ts(dt,Ze))})},ne=i.changes.length-1;ne>=0;--ne){var Le=le(ne);if(Le)return Le.v}}function fs(e,t){if(t==0)return;if(e.first+=t,e.sel=new Pa(Pe(e.sel.ranges,function(r){return new ln(Ie(r.anchor.line+t,r.anchor.ch),Ie(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){Ea(e.cm,e.first,e.first-t,t);for(var a=e.cm.display,n=a.viewFrom;n<a.viewTo;n++)rr(e.cm,n,"gutter")}}function ii(e,t,a,n){if(e.cm&&!e.cm.curOp)return aa(e.cm,ii)(e,t,a,n);if(t.to.line<e.first){fs(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 r=t.text.length-1-(e.first-t.from.line);fs(e,r),t={from:Ie(e.first,0),to:Ie(t.to.line+r,t.to.ch),text:[ie(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:Ie(i,ut(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Yt(e,t.from,t.to),a||(a=fo(e,t)),e.cm?El(e.cm,t,n):po(e,t,n),Ui(e,a,de),e.cantEdit&&Ii(e,Ie(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,a){var n=e.doc,r=e.display,i=t.from,o=t.to,s=!1,u=i.line;e.options.lineWrapping||(u=Lt(Mt(ut(n,i.line))),n.iter(u,o.line+1,function(ne){if(ne==r.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&E(e),po(n,t,a,ko(e)),e.options.lineWrapping||(n.iter(u,i.line+t.text.length,function(ne){var Le=$n(ne);Le>r.maxLineLength&&(r.maxLine=ne,r.maxLineLength=Le,r.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),an(n,i.line),ni(e,400);var f=t.text.length-(o.line-i.line)-1;t.full?Ea(e):i.line==o.line&&t.text.length==1&&!Jo(e.doc,t)?rr(e,i.line,"text"):Ea(e,i.line,o.line+1,f);var U=T(e,"changes"),B=T(e,"change");if(B||U){var le={from:i,to:o,text:t.text,removed:t.removed,origin:t.origin};B&&Gn(e,"change",e,le),U&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(le)}e.display.selForContextMenu=null}function Ur(e,t,a,n,r){var i;n||(n=a),Ye(n,a)<0&&(i=[n,a],a=i[0],n=i[1]),typeof t=="string"&&(t=e.splitLines(t)),jr(e,{from:a,to:n,text:t,origin:r})}function hs(e,t,a,n){a<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ps(e,t,a,n){for(var r=0;r<e.length;++r){var i=e[r],o=!0;if(i.ranges){i.copied||(i=e[r]=i.deepCopy(),i.copied=!0);for(var s=0;s<i.ranges.length;s++)hs(i.ranges[s].anchor,t,a,n),hs(i.ranges[s].head,t,a,n);continue}for(var u=0;u<i.changes.length;++u){var f=i.changes[u];if(a<f.from.line)f.from=Ie(f.from.line+n,f.from.ch),f.to=Ie(f.to.line+n,f.to.ch);else if(t<=f.to.line){o=!1;break}}o||(e.splice(0,r+1),r=0)}}function ms(e,t){var a=t.from.line,n=t.to.line,r=t.text.length-(n-a)-1;ps(e.done,a,n,r),ps(e.undone,a,n,r)}function oi(e,t,a,n){var r=t,i=t;return typeof t=="number"?i=ut(e,kn(e,t)):r=Lt(t),r==null?null:(n(i,r)&&e.cm&&rr(e.cm,r,a),i)}function si(e){this.lines=e,this.parent=null;for(var t=0,a=0;a<e.length;++a)e[a].parent=this,t+=e[a].height;this.height=t}si.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var a=e,n=e+t;a<n;++a){var r=this.lines[a];this.height-=r.height,Qn(r),Gn(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,a){this.height+=a,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,a){for(var n=e+t;e<n;++e)if(a(this.lines[e]))return!0}};function li(e){this.children=e;for(var t=0,a=0,n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize(),a+=r.height,r.parent=this}this.size=t,this.height=a,this.parent=null}li.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var a=0;a<this.children.length;++a){var n=this.children[a],r=n.chunkSize();if(e<r){var i=Math.min(t,r-e),o=n.height;if(n.removeInner(e,i),this.height-=o-n.height,r==i&&(this.children.splice(a--,1),n.parent=null),(t-=i)==0)break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof si))){var s=[];this.collapse(s),this.children=[new si(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,a){this.size+=t.length,this.height+=a;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<=i){if(r.insertInner(e,t,a),r.lines&&r.lines.length>50){for(var o=r.lines.length%25+25,s=o;s<r.lines.length;){var u=new si(r.lines.slice(s,s+=25));r.height-=u.height,this.children.splice(++n,0,u),u.parent=this}r.lines=r.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),a=new li(t);if(e.parent){e.size-=a.size,e.height-=a.height;var r=pe(e.parent.children,e);e.parent.children.splice(r+1,0,a)}else{var n=new li(e.children);n.parent=e,e.children=[n,a],e=n}a.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,a){for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e);if(r.iterN(e,o,a))return!0;if((t-=o)==0)break;e=0}else e-=i}}};var ui=function(e,t,a){if(a)for(var n in a)a.hasOwnProperty(n)&&(this[n]=a[n]);this.doc=e,this.node=t};ui.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,a=this.line,n=Lt(a);if(n==null||!t)return;for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(a.widgets=null);var i=ar(this);qt(a,Math.max(0,a.height-i)),e&&(Sa(e,function(){vs(e,a,-i),rr(e,n,"widget")}),Gn(e,"lineWidgetCleared",e,this,n))},ui.prototype.changed=function(){var e=this,t=this.height,a=this.doc.cm,n=this.line;this.height=null;var r=ar(this)-t;if(!r)return;Gt(this.doc,n)||qt(n,n.height+r),a&&Sa(a,function(){a.curOp.forceUpdate=!0,vs(a,n,r),Gn(a,"lineWidgetChanged",a,e,Lt(n))})},k(ui);function vs(e,t,a){Cn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&io(e,a)}function yl(e,t,a,n){var r=new ui(e,a,n),i=e.cm;return i&&r.noHScroll&&(i.display.alignWidgets=!0),oi(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(r.insertAt==null?s.push(r):s.splice(Math.min(s.length-1,Math.max(0,r.insertAt)),0,r),r.line=o,i&&!Gt(e,o)){var u=Cn(o)<e.scrollTop;qt(o,o.height+ar(r)),u&&io(i,r.height),i.curOp.forceUpdate=!0}return!0}),i&&Gn(i,"lineWidgetAdded",i,r,typeof t=="number"?t:Lt(t)),r}var gs=0,ur=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++gs};ur.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Sr(e),T(this,"clear")){var a=this.find();a&&Gn(this,"clear",a.from,a.to)}for(var n=null,r=null,i=0;i<this.lines.length;++i){var o=this.lines[i],s=Jn(o.markedSpans,this);e&&!this.collapsed?rr(e,Lt(o),"text"):e&&(s.to!=null&&(r=Lt(o)),s.from!=null&&(n=Lt(o))),o.markedSpans=Ha(o.markedSpans,s),s.from==null&&this.collapsed&&!Gt(this.doc,o)&&e&&qt(o,na(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var f=Mt(this.lines[u]),U=$n(f);U>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=U,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&Ea(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&os(e.doc)),e&&Gn(e,"markerCleared",e,this,n,r),t&&Or(e),this.parent&&this.parent.clear()},ur.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var a,n,r=0;r<this.lines.length;++r){var i=this.lines[r],o=Jn(i.markedSpans,this);if(o.from!=null&&(a=Ie(t?i:Lt(i),o.from),e==-1))return a;if(o.to!=null&&(n=Ie(t?i:Lt(i),o.to),e==1))return n}return a&&{from:a,to:n}},ur.prototype.changed=function(){var e=this,t=this.find(-1,!0),a=this,n=this.doc.cm;if(!t||!n)return;Sa(n,function(){var r=t.line,i=Lt(t.line),o=nt(n,i);if(o&&(nn(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Gt(a.doc,r)&&a.height!=null){var s=a.height;a.height=null;var u=ar(a)-s;u&&qt(r,r.height+u)}Gn(n,"markerChanged",n,e)})},ur.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||pe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ur.prototype.detachLine=function(e){if(this.lines.splice(pe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},k(ur);function Ir(e,t,a,n,r){if(n&&n.shared)return xl(e,t,a,n,r);if(e.cm&&!e.cm.curOp)return aa(e.cm,Ir)(e,t,a,n,r);var i=new ur(e,r),o=Ye(t,a);if(n&&c(n,i,!1),o>0||o==0&&i.clearWhenEmpty!==!1)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=L("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Xr(e,t.line,t,a,i)||t.line!=a.line&&Xr(e,a.line,t,a,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Xn()}i.addToHistory&&qo(e,{from:t,to:a,origin:"markText"},e.sel,NaN);var s=t.line,u=e.cm,f;if(e.iter(s,a.line+1,function(B){u&&i.collapsed&&!u.options.lineWrapping&&Mt(B)==u.display.maxLine&&(f=!0),i.collapsed&&s!=t.line&&qt(B,0),Yn(B,new xn(i,s==t.line?t.ch:null,s==a.line?a.ch:null)),++s}),i.collapsed&&e.iter(t.line,a.line+1,function(B){Gt(e,B)&&qt(B,0)}),i.clearOnEnter&&Re(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(Sn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++gs,i.atomic=!0),u){if(f&&(u.curOp.updateMaxLine=!0),i.collapsed)Ea(u,t.line,a.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var U=t.line;U<=a.line;U++)rr(u,U,"text");i.atomic&&os(u.doc),Gn(u,"markerAdded",u,i)}return i}var ci=function(e,t){this.markers=e,this.primary=t;for(var a=0;a<e.length;++a)e[a].parent=this};ci.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Gn(this,"clear")},ci.prototype.find=function(e,t){return this.primary.find(e,t)},k(ci);function xl(e,t,a,n,r){n=c(n),n.shared=!1;var i=[Ir(e,t,a,n,r)],o=i[0],s=n.widgetNode;return lr(e,function(u){s&&(n.widgetNode=s.cloneNode(!0)),i.push(Ir(u,jt(u,t),jt(u,a),n,r));for(var f=0;f<u.linked.length;++f)if(u.linked[f].isParent)return;o=ie(i)}),new ci(i,o)}function bs(e){return e.findMarks(Ie(e.first,0),e.clipPos(Ie(e.lastLine())),function(t){return t.parent})}function Cl(e,t){for(var a=0;a<t.length;a++){var n=t[a],r=n.find(),i=e.clipPos(r.from),o=e.clipPos(r.to);if(Ye(i,o)){var s=Ir(e,i,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function wl(e){for(var t=function(n){var r=e[n],i=[r.primary.doc];lr(r.primary.doc,function(u){return i.push(u)});for(var o=0;o<r.markers.length;o++){var s=r.markers[o];pe(i,s.doc)==-1&&(s.parent=null,r.markers.splice(o--,1))}},a=0;a<e.length;a++)t(a)}var Sl=0,ya=function(e,t,a,n,r){if(!(this instanceof ya))return new ya(e,t,a,n,r);a==null&&(a=0),li.call(this,[new si([new bn("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var i=Ie(a,0);this.sel=or(i),this.history=new Li(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=r=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),po(this,{from:i,to:i,text:e}),ca(this,or(i),de)};ya.prototype=Ae(li.prototype,{constructor:ya,iter:function(e,t,a){a?this.iterN(e-this.first,t-e,a):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var a=0,n=0;n<t.length;++n)a+=t[n].height;this.insertInner(e-this.first,t,a)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=yt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:ra(function(e){var t=Ie(this.first,0),a=this.first+this.size-1;jr(this,{from:t,to:Ie(a,ut(this,a).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zr(this.cm,0,0),ca(this,or(t),de)}),replaceRange:function(e,t,a,n){t=jt(this,t),a=a?jt(this,a):t,Ur(this,e,t,a,n)},getRange:function(e,t,a){var n=Yt(this,jt(this,e),jt(this,t));return a===!1?n:n.join(a||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Mn(this,e))return ut(this,e)},getLineNumber:function(e){return Lt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ut(this,e)),Mt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return jt(this,e)},getCursor:function(e){var t=this.sel.primary(),a;return e==null||e=="head"?a=t.head:e=="anchor"?a=t.anchor:e=="end"||e=="to"||e===!1?a=t.to():a=t.from(),a},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ra(function(e,t,a){as(this,jt(this,typeof e=="number"?Ie(e,t||0):e),null,a)}),setSelection:ra(function(e,t,a){as(this,jt(this,e),jt(this,t||e),a)}),extendSelection:ra(function(e,t,a){ji(this,jt(this,e),t&&jt(this,t),a)}),extendSelections:ra(function(e,t){ns(this,Da(this,e),t)}),extendSelectionsBy:ra(function(e,t){var a=Pe(this.sel.ranges,e);ns(this,Da(this,a),t)}),setSelections:ra(function(e,t,a){if(!e.length)return;for(var n=[],r=0;r<e.length;r++)n[r]=new ln(jt(this,e[r].anchor),jt(this,e[r].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ca(this,Ba(this.cm,n,t),a)}),addSelection:ra(function(e,t,a){var n=this.sel.ranges.slice(0);n.push(new ln(jt(this,e),jt(this,t||e))),ca(this,Ba(this.cm,n,n.length-1),a)}),getSelection:function(e){for(var t=this.sel.ranges,a,n=0;n<t.length;n++){var r=Yt(this,t[n].from(),t[n].to());a=a?a.concat(r):r}return e===!1?a:a.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],a=this.sel.ranges,n=0;n<a.length;n++){var r=Yt(this,a[n].from(),a[n].to());e!==!1&&(r=r.join(e||this.lineSeparator())),t[n]=r}return t},replaceSelection:function(e,t,a){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=e;this.replaceSelections(n,t,a||"+input")},replaceSelections:ra(function(e,t,a){for(var n=[],r=this.sel,i=0;i<r.ranges.length;i++){var o=r.ranges[i];n[i]={from:o.from(),to:o.to(),text:this.splitLines(e[i]),origin:a}}for(var s=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)jr(this,n[u]);s?rs(this,s):this.cm&&Ar(this.cm)}),undo:ra(function(){Fi(this,"undo")}),redo:ra(function(){Fi(this,"redo")}),undoSelection:ra(function(){Fi(this,"undo",!0)}),redoSelection:ra(function(){Fi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,a=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++a;return{undo:t,redo:a}},clearHistory:function(){var e=this;this.history=new Li(this.history.maxGeneration),lr(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:Lr(this.history.done),undone:Lr(this.history.undone)}},setHistory:function(e){var t=this.history=new Li(this.history.maxGeneration);t.done=Lr(e.done.slice(0),null,!0),t.undone=Lr(e.undone.slice(0),null,!0)},setGutterMarker:ra(function(e,t,a){return oi(this,e,"gutter",function(n){var r=n.gutterMarkers||(n.gutterMarkers={});return r[t]=a,!a&&Be(r)&&(n.gutterMarkers=null),!0})}),clearGutter:ra(function(e){var t=this;this.iter(function(a){a.gutterMarkers&&a.gutterMarkers[e]&&oi(t,a,"gutter",function(){return a.gutterMarkers[e]=null,Be(a.gutterMarkers)&&(a.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Mn(this,e))return null;if(t=e,e=ut(this,e),!e)return null}else if(t=Lt(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:ra(function(e,t,a){return oi(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[r])n[r]=a;else{if(V(a).test(n[r]))return!1;n[r]+=" "+a}return!0})}),removeLineClass:ra(function(e,t,a){return oi(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",i=n[r];if(i)if(a==null)n[r]=null;else{var o=i.match(V(a));if(!o)return!1;var s=o.index+o[0].length;n[r]=i.slice(0,o.index)+(!o.index||s==i.length?"":" ")+i.slice(s)||null}else return!1;return!0})}),addLineWidget:ra(function(e,t,a){return yl(this,e,t,a)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,a){return Ir(this,jt(this,e),jt(this,t),a,a&&a.type||"range")},setBookmark:function(e,t){var a={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=jt(this,e),Ir(this,e,e,a,"bookmark")},findMarksAt:function(e){e=jt(this,e);var t=[],a=ut(this,e.line).markedSpans;if(a)for(var n=0;n<a.length;++n){var r=a[n];(r.from==null||r.from<=e.ch)&&(r.to==null||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,a){e=jt(this,e),t=jt(this,t);var n=[],r=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 u=o[s];!(u.to!=null&&r==e.line&&e.ch>=u.to||u.from==null&&r!=e.line||u.from!=null&&r==t.line&&u.from>=t.ch)&&(!a||a(u.marker))&&n.push(u.marker.parent||u.marker)}++r}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var a=t.markedSpans;if(a)for(var n=0;n<a.length;++n)a[n].from!=null&&e.push(a[n].marker)}),e},posFromIndex:function(e){var t,a=this.first,n=this.lineSeparator().length;return this.iter(function(r){var i=r.text.length+n;if(i>e)return t=e,!0;e-=i,++a}),jt(this,Ie(a,t))},indexFromPos:function(e){e=jt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+a}),t},copy:function(e){var t=new ya(yt(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,a=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<a&&(a=e.to);var n=new ya(yt(this,t,a),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Cl(n,bs(this)),n},unlinkDoc:function(e){if(e instanceof An&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var a=this.linked[t];if(a.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),wl(bs(this));break}if(e.history==this.history){var n=[e.id];lr(e,function(r){return n.push(r.id)},!0),e.history=new Li(null),e.history.done=Lr(this.history.done,n),e.history.undone=Lr(this.history.undone,n)}},iterLinkedDocs:function(e){lr(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:ra(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)})}),ya.prototype.eachLine=ya.prototype.iter;var _s=0;function Ol(e){var t=this;if(Es(t),Ue(t,e)||Ia(t.display,e))return;p(e),$&&(_s=+new Date);var a=yr(t,e,!0),n=e.dataTransfer.files;if(!a||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,i=Array(r),o=0,s=function(){++o==r&&aa(t,function(){a=jt(t.doc,a);var ne={from:a,to:a,text:t.doc.splitLines(i.filter(function(Le){return Le!=null}).join(t.doc.lineSeparator())),origin:"paste"};jr(t.doc,ne),rs(t.doc,or(jt(t.doc,a),jt(t.doc,sr(ne))))})()},u=function(ne,Le){if(t.options.allowDropFileTypes&&pe(t.options.allowDropFileTypes,ne.type)==-1){s();return}var Ke=new FileReader;Ke.onerror=function(){return s()},Ke.onload=function(){var Ze=Ke.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ze)){s();return}i[Le]=Ze,s()},Ke.readAsText(ne)},f=0;f<n.length;f++)u(n[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(a)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var U=e.dataTransfer.getData("Text");if(U){var B;if(t.state.draggingText&&!t.state.draggingText.copy&&(B=t.listSelections()),Ui(t.doc,or(a,a)),B)for(var le=0;le<B.length;++le)Ur(t.doc,"",B[le].anchor,B[le].head,"drag");t.replaceSelection(U,"around","paste"),t.display.input.focus()}}catch(ne){}}}function Rl(e,t){if($&&(!e.state.draggingText||+new Date-_s<100)){C(t);return}if(Ue(e,t)||Ia(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!oe){var a=m("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",q&&(a.width=a.height=1,e.display.wrapper.appendChild(a),a._top=a.offsetTop),t.dataTransfer.setDragImage(a,0,0),q&&a.parentNode.removeChild(a)}}function Pl(e,t){var a=yr(e,t);if(!a)return;var n=document.createDocumentFragment();Ao(e,a,n),e.display.dragCursor||(e.display.dragCursor=m("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),v(e.display.dragCursor,n)}function Es(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ys(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),a=[],n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&a.push(r)}a.length&&a[0].operation(function(){for(var i=0;i<a.length;i++)e(a[i])})}var xs=!1;function kl(){if(xs)return;Tl(),xs=!0}function Tl(){var e;Re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ys(Dl)},100))}),Re(window,"blur",function(){return ys(Dr)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var cr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},di=0;di<10;di++)cr[di+48]=cr[di+96]=String(di);for(var Bi=65;Bi<=90;Bi++)cr[Bi]=String.fromCharCode(Bi);for(var fi=1;fi<=12;fi++)cr[fi+111]=cr[fi+63235]="F"+fi;var Ya={};Ya.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"},Ya.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"},Ya.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"},Ya.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"]},Ya.default=h?Ya.macDefault:Ya.pcDefault;function Al(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var a,n,r,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))a=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else throw new Error("Unrecognized modifier name: "+s)}return a&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ml(e){var t={};for(var a in e)if(e.hasOwnProperty(a)){var n=e[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if(n=="..."){delete e[a];continue}for(var r=Pe(a.split(" "),Al),i=0;i<r.length;i++){var o=void 0,s=void 0;i==r.length-1?(s=r.join(" "),o=n):(s=r.slice(0,i+1).join(" "),o="...");var u=t[s];if(!u)t[s]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+s)}delete e[a]}for(var f in t)e[f]=t[f];return e}function Fr(e,t,a,n){t=Wi(t);var r=t.call?t.call(e,n):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&a(r))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Fr(e,t.fallthrough,a,n);for(var i=0;i<t.fallthrough.length;i++){var o=Fr(e,t.fallthrough[i],a,n);if(o)return o}}}function Cs(e){var t=typeof e=="string"?e:cr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ws(e,t,a){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(I?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(I?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!a&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Ss(e,t){if(q&&e.keyCode==34&&e.char)return!1;var a=cr[e.keyCode];return a==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(a=e.code),ws(a,e,t))}function Wi(e){return typeof e=="string"?Ya[e]:e}function Br(e,t){for(var a=e.doc.sel.ranges,n=[],r=0;r<a.length;r++){for(var i=t(a[r]);n.length&&Ye(i.from,ie(n).to)<=0;){var o=n.pop();if(Ye(o.from,i.from)<0){i.from=o.from;break}}n.push(i)}Sa(e,function(){for(var s=n.length-1;s>=0;s--)Ur(e.doc,"",n[s].from,n[s].to,"+delete");Ar(e)})}function bo(e,t,a){var n=Ce(e.text,t+a,a);return n<0||n>e.text.length?null:n}function _o(e,t,a){var n=bo(e,t.ch,a);return n==null?null:new Ie(t.line,n,a<0?"after":"before")}function Eo(e,t,a,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var i=vt(a,t.doc.direction);if(i){var o=r<0?ie(i):i[0],s=r<0==(o.level==1),u=s?"after":"before",f;if(o.level>0||t.doc.direction=="rtl"){var U=qe(t,a);f=r<0?a.text.length-1:0;var B=st(t,U,f).top;f=lt(function(le){return st(t,U,le).top==B},r<0==(o.level==1)?o.from:o.to-1,f),u=="before"&&(f=bo(a,f,1))}else f=r<0?o.to:o.from;return new Ie(n,f,u)}}return new Ie(n,r<0?a.text.length:0,r<0?"before":"after")}function Ll(e,t,a,n){var r=vt(t,e.doc.direction);if(!r)return _o(t,a,n);a.ch>=t.text.length?(a.ch=t.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var i=et(r,a.ch,a.sticky),o=r[i];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>a.ch:o.from<a.ch))return _o(t,a,n);var s=function(ct,xt){return bo(t,ct instanceof Ie?ct.ch:ct,xt)},u,f=function(ct){return e.options.lineWrapping?(u=u||qe(e,t),ha(e,t,u,ct)):{begin:0,end:t.text.length}},U=f(a.sticky=="before"?s(a,-1):a.ch);if(e.doc.direction=="rtl"||o.level==1){var B=o.level==1==n<0,le=s(a,B?1:-1);if(le!=null&&(B?le<=o.to&&le<=U.end:le>=o.from&&le>=U.begin)){var ne=B?"before":"after";return new Ie(a.line,le,ne)}}var Le=function(ct,xt,dt){for(var St=function(_n,ia){return ia?new Ie(a.line,s(_n,1),"before"):new Ie(a.line,_n,"after")};ct>=0&&ct<r.length;ct+=xt){var Wt=r[ct],Nt=xt>0==(Wt.level!=1),Qt=Nt?dt.begin:s(dt.end,-1);if(Wt.from<=Qt&&Qt<Wt.to)return St(Qt,Nt);if(Qt=Nt?Wt.from:s(Wt.to,-1),dt.begin<=Qt&&Qt<dt.end)return St(Qt,Nt)}},Ke=Le(i+n,n,U);if(Ke)return Ke;var Ze=n>0?U.end:s(U.begin,-1);return Ze!=null&&!(n>0&&Ze==t.text.length)&&(Ke=Le(n>0?0:r.length-1,n,f(Ze)),Ke)?Ke:null}var hi={selectAll:us,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),de)},killLine:function(e){return Br(e,function(t){if(t.empty()){var a=ut(e.doc,t.head.line).text.length;return t.head.ch==a&&t.head.line<e.lastLine()?{from:t.head,to:Ie(t.head.line+1,0)}:{from:t.head,to:Ie(t.head.line,a)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Br(e,function(t){return{from:Ie(t.from().line,0),to:jt(e.doc,Ie(t.to().line+1,0))}})},delLineLeft:function(e){return Br(e,function(t){return{from:Ie(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Br(e,function(t){var a=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:a},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Br(e,function(t){var a=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:a},"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(Ie(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ie(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Os(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Rs(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 a=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:a},"div")},A)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var a=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:a},"div")},A)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var a=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:a},"div");return n.ch<e.getLine(n.line).search(/\S/)?Rs(e,t.head):n},A)},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=[],a=e.listSelections(),n=e.options.tabSize,r=0;r<a.length;r++){var i=a[r].from(),o=X(e.getLine(i.line),i.ch,n);t.push(x(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Sa(e,function(){for(var t=e.listSelections(),a=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var r=t[n].head,i=ut(e.doc,r.line).text;if(i){if(r.ch==i.length&&(r=new Ie(r.line,r.ch-1)),r.ch>0)r=new Ie(r.line,r.ch+1),e.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),Ie(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var o=ut(e.doc,r.line-1).text;o&&(r=new Ie(r.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Ie(r.line-1,o.length-1),r,"+transpose"))}}a.push(new ln(r,r))}e.setSelections(a)})},newlineAndIndent:function(e){return Sa(e,function(){for(var t=e.listSelections(),a=t.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),t[a].anchor,t[a].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Ar(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Os(e,t){var a=ut(e.doc,t),n=Mt(a);return n!=a&&(t=Lt(n)),Eo(!0,e,n,t,1)}function Nl(e,t){var a=ut(e.doc,t),n=$t(a);return n!=a&&(t=Lt(n)),Eo(!0,e,a,t,-1)}function Rs(e,t){var a=Os(e,t.line),n=ut(e.doc,a.line),r=vt(n,e.doc.direction);if(!r||r[0].level==0){var i=Math.max(a.ch,n.text.search(/\S/)),o=t.line==a.line&&t.ch<=i&&t.ch;return Ie(a.line,o?0:i,a.sticky)}return a}function Ki(e,t,a){if(typeof t=="string"&&(t=hi[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a&&(e.display.shift=!1),r=t(e)!=me}finally{e.display.shift=n,e.state.suppressEdits=!1}return r}function jl(e,t,a){for(var n=0;n<e.state.keyMaps.length;n++){var r=Fr(t,e.state.keyMaps[n],a,e);if(r)return r}return e.options.extraKeys&&Fr(t,e.options.extraKeys,a,e)||Fr(t,e.options.keyMap,a,e)}var Ul=new ge;function pi(e,t,a,n){var r=e.state.keySeq;if(r){if(Cs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),Ps(e,r+" "+t,a,n))return!0}return Ps(e,t,a,n)}function Ps(e,t,a,n){var r=jl(e,t,n);return r=="multi"&&(e.state.keySeq=t),r=="handled"&&Gn(e,"keyHandled",e,t,a),(r=="handled"||r=="multi")&&(p(a),no(e)),!!r}function ks(e,t){var a=Ss(t,!0);return a?t.shiftKey&&!e.state.keySeq?pi(e,"Shift-"+a,t,function(n){return Ki(e,n,!0)})||pi(e,a,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Ki(e,n)}):pi(e,a,t,function(n){return Ki(e,n)}):!1}function Il(e,t,a){return pi(e,"'"+a+"'",t,function(n){return Ki(e,n,!0)})}var yo=null;function Ts(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=F(),Ue(t,e))return;$&&S<11&&e.keyCode==27&&(e.returnValue=!1);var a=e.keyCode;t.display.shift=a==16||e.shiftKey;var n=ks(t,e);q&&(yo=n?a:null,!n&&a==88&&!Kt&&(h?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),re&&!h&&!n&&a==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),a==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;ue(t,"CodeMirror-crosshair");function a(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),mt(document,"keyup",a),mt(document,"mouseover",a))}Re(document,"keyup",a),Re(document,"mouseover",a)}function Ds(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ue(this,e)}function As(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ia(t.display,e)||Ue(t,e)||e.ctrlKey&&!e.altKey||h&&e.metaKey)return;var a=e.keyCode,n=e.charCode;if(q&&a==yo){yo=null,p(e);return}if(q&&(!e.which||e.which<10)&&ks(t,e))return;var r=String.fromCharCode(n==null?a:n);if(r=="\b")return;if(Il(t,e,r))return;t.display.input.onKeyPress(e)}var Bl=400,xo=function(e,t,a){this.time=e,this.pos=t,this.button=a};xo.prototype.compare=function(e,t,a){return this.time+Bl>e&&Ye(t,this.pos)==0&&a==this.button};var mi,vi;function Wl(e,t){var a=+new Date;return vi&&vi.compare(a,e,t)?(mi=vi=null,"triple"):mi&&mi.compare(a,e,t)?(vi=new xo(a,e,t),mi=null,"double"):(mi=new xo(a,e,t),vi=null,"single")}function Ms(e){var t=this,a=t.display;if(Ue(t,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Ia(a,e)){y||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Co(t,e))return;var n=yr(t,e),r=ae(e),i=n?Wl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&Kl(t,r,n,i,e))return;r==1?n?Hl(t,n,i,e):J(e)==a.scroller&&p(e):r==2?(n&&ji(t.doc,n),setTimeout(function(){return a.input.focus()},20)):r==3&&(d?t.display.input.onContextMenu(e):Lo(t))}function Kl(e,t,a,n,r){var i="Click";return n=="double"?i="Double"+i:n=="triple"&&(i="Triple"+i),i=(t==1?"Left":t==2?"Middle":"Right")+i,pi(e,ws(i,r),r,function(o){if(typeof o=="string"&&(o=hi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,a)!=me}finally{e.state.suppressEdits=!1}return s})}function zl(e,t,a){var n=e.getOption("configureMouse"),r=n?n(e,t,a):{};if(r.unit==null){var i=te?a.shiftKey&&a.metaKey:a.altKey;r.unit=i?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(r.extend==null||e.doc.extend)&&(r.extend=e.doc.extend||a.shiftKey),r.addNew==null&&(r.addNew=h?a.metaKey:a.ctrlKey),r.moveOnDrag==null&&(r.moveOnDrag=!(h?a.altKey:a.ctrlKey)),r}function Hl(e,t,a,n){$?setTimeout(R(Mo,e),0):e.curOp.focus=F();var r=zl(e,a,n),i=e.doc.sel,o;e.options.dragDrop&&se&&!e.isReadOnly()&&a=="single"&&(o=i.contains(t))>-1&&(Ye((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(Ye(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,r):$l(e,n,t,r)}function Xl(e,t,a,n){var r=e.display,i=!1,o=aa(e,function(f){y&&(r.scroller.draggable=!1),e.state.draggingText=!1,mt(r.wrapper.ownerDocument,"mouseup",o),mt(r.wrapper.ownerDocument,"mousemove",s),mt(r.scroller,"dragstart",u),mt(r.scroller,"drop",o),i||(p(f),n.addNew||ji(e.doc,a,null,null,n.extend),y&&!oe||$&&S==9?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),s=function(f){i=i||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},u=function(){return i=!0};y&&(r.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Re(r.wrapper.ownerDocument,"mouseup",o),Re(r.wrapper.ownerDocument,"mousemove",s),Re(r.scroller,"dragstart",u),Re(r.scroller,"drop",o),Lo(e),setTimeout(function(){return r.input.focus()},20)}function Ls(e,t,a){if(a=="char")return new ln(t,t);if(a=="word")return e.findWordAt(t);if(a=="line")return new ln(Ie(t.line,0),jt(e.doc,Ie(t.line+1,0)));var n=a(e,t);return new ln(n.from,n.to)}function $l(e,t,a,n){var r=e.display,i=e.doc;p(t);var o,s,u=i.sel,f=u.ranges;if(n.addNew&&!n.extend?(s=i.sel.contains(a),s>-1?o=f[s]:o=new ln(a,a)):(o=i.sel.primary(),s=i.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new ln(a,a)),a=yr(e,t,!0,!0),s=-1;else{var U=Ls(e,a,n.unit);n.extend?o=vo(o,U.anchor,U.head,n.extend):o=U}n.addNew?s==-1?(s=f.length,ca(i,Ba(e,f.concat([o]),s),{scroll:!1,origin:"*mouse"})):f.length>1&&f[s].empty()&&n.unit=="char"&&!n.extend?(ca(i,Ba(e,f.slice(0,s).concat(f.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=i.sel):go(i,s,o,H):(s=0,ca(i,new Pa([o],0),H),u=i.sel);var B=a;function le(dt){if(Ye(B,dt)==0)return;if(B=dt,n.unit=="rectangle"){for(var St=[],Wt=e.options.tabSize,Nt=X(ut(i,a.line).text,a.ch,Wt),Qt=X(ut(i,dt.line).text,dt.ch,Wt),_n=Math.min(Nt,Qt),ia=Math.max(Nt,Qt),Nn=Math.min(a.line,dt.line),Oa=Math.min(e.lastLine(),Math.max(a.line,dt.line));Nn<=Oa;Nn++){var xa=ut(i,Nn).text,zn=ee(xa,_n,Wt);_n==ia?St.push(new ln(Ie(Nn,zn),Ie(Nn,zn))):xa.length>zn&&St.push(new ln(Ie(Nn,zn),Ie(Nn,ee(xa,ia,Wt))))}St.length||St.push(new ln(a,a)),ca(i,Ba(e,u.ranges.slice(0,s).concat(St),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(dt)}else{var Ca=o,la=Ls(e,dt,n.unit),Vn=Ca.anchor,Hn;Ye(la.anchor,Vn)>0?(Hn=la.head,Vn=En(Ca.from(),la.anchor)):(Hn=la.anchor,Vn=mn(Ca.to(),la.head));var Un=u.ranges.slice(0);Un[s]=Gl(e,new ln(jt(i,Vn),Hn)),ca(i,Ba(e,Un,s),H)}}var ne=r.wrapper.getBoundingClientRect(),Le=0;function Ke(dt){var St=++Le,Wt=yr(e,dt,!0,n.unit=="rectangle");if(!Wt)return;if(Ye(Wt,B)!=0){e.curOp.focus=F(),le(Wt);var Nt=Ti(r,i);(Wt.line>=Nt.to||Wt.line<Nt.from)&&setTimeout(aa(e,function(){Le==St&&Ke(dt)}),150)}else{var Qt=dt.clientY<ne.top?-20:dt.clientY>ne.bottom?20:0;Qt&&setTimeout(aa(e,function(){if(Le!=St)return;r.scroller.scrollTop+=Qt,Ke(dt)}),50)}}function Ze(dt){e.state.selectingText=!1,Le=Infinity,dt&&(p(dt),r.input.focus()),mt(r.wrapper.ownerDocument,"mousemove",ct),mt(r.wrapper.ownerDocument,"mouseup",xt),i.history.lastSelOrigin=null}var ct=aa(e,function(dt){dt.buttons===0||!ae(dt)?Ze(dt):Ke(dt)}),xt=aa(e,Ze);e.state.selectingText=xt,Re(r.wrapper.ownerDocument,"mousemove",ct),Re(r.wrapper.ownerDocument,"mouseup",xt)}function Gl(e,t){var a=t.anchor,n=t.head,r=ut(e.doc,a.line);if(Ye(a,n)==0&&a.sticky==n.sticky)return t;var i=vt(r);if(!i)return t;var o=et(i,a.ch,a.sticky),s=i[o];if(s.from!=a.ch&&s.to!=a.ch)return t;var u=o+(s.from==a.ch==(s.level!=1)?0:1);if(u==0||u==i.length)return t;var f;if(n.line!=a.line)f=(n.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var U=et(i,n.ch,n.sticky),B=U-o||(n.ch-a.ch)*(s.level==1?-1:1);U==u-1||U==u?f=B<0:f=B>0}var le=i[u+(f?-1:0)],ne=f==(le.level==1),Le=ne?le.from:le.to,Ke=ne?"after":"before";return a.ch==Le&&a.sticky==Ke?t:new ln(new Ie(a.line,Le,Ke),n)}function Ns(e,t,a,n){var r,i;if(t.touches)r=t.touches[0].clientX,i=t.touches[0].clientY;else try{r=t.clientX,i=t.clientY}catch(le){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&p(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(i>s.bottom||!T(e,a))return w(t);i-=s.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var f=o.gutters.childNodes[u];if(f&&f.getBoundingClientRect().right>=r){var U=en(e.doc,i),B=e.display.gutterSpecs[u];return ke(e,a,e,U,B.className,t),w(t)}}}function Co(e,t){return Ns(e,t,"gutterClick",!0)}function js(e,t){if(Ia(e.display,t)||Vl(e,t))return;if(Ue(e,t,"contextmenu"))return;d||e.display.input.onContextMenu(t)}function Vl(e,t){return T(e,"gutterContextMenu")?Ns(e,t,"gutterContextMenu",!1):!1}function Us(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rn(e)}var Wr={toString:function(){return"CodeMirror.Init"}},Is={},zi={};function Jl(e){var t=e.optionHandlers;function a(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(s,u,f){f!=Wr&&i(s,u,f)}:i)}e.defineOption=a,e.Init=Wr,a("value","",function(n,r){return n.setValue(r)},!0),a("mode",null,function(n,r){n.doc.modeOption=r,ho(n)},!0),a("indentUnit",2,ho,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(n){ri(n),Rn(n),Ea(n)},!0),a("lineSeparator",null,function(n,r){if(n.doc.lineSep=r,!r)return;var i=[],o=n.doc.first;n.doc.iter(function(u){for(var f=0;;){var U=u.text.indexOf(r,f);if(U==-1)break;f=U+r.length,i.push(Ie(o,U))}o++});for(var s=i.length-1;s>=0;s--)Ur(n.doc,r,i[s],Ie(i[s].line,i[s].ch+r.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,r,i){n.state.specialChars=new RegExp(r.source+(r.test(" ")?"":"| "),"g"),i!=Wr&&n.refresh()}),a("specialCharPlaceholder",_i,function(n){return n.refresh()},!0),a("electricChars",!0),a("inputStyle",K?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(n,r){return n.getInputField().spellcheck=r},!0),a("autocorrect",!1,function(n,r){return n.getInputField().autocorrect=r},!0),a("autocapitalize",!1,function(n,r){return n.getInputField().autocapitalize=r},!0),a("rtlMoveVisually",!he),a("wholeLineUpdateBefore",!0),a("theme","default",function(n){Us(n),ai(n)},!0),a("keyMap","default",function(n,r,i){var o=Wi(r),s=i!=Wr&&Wi(i);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Ql,!0),a("gutters",[],function(n,r){n.display.gutterSpecs=co(r,n.options.lineNumbers),ai(n)},!0),a("fixedGutter",!0,function(n,r){n.display.gutters.style.left=r?Yr(n.display)+"px":"0",n.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(n){return Mr(n)},!0),a("scrollbarStyle","native",function(n){Bo(n),Mr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),a("lineNumbers",!1,function(n,r){n.display.gutterSpecs=co(n.options.gutters,r),ai(n)},!0),a("firstLineNumber",1,ai,!0),a("lineNumberFormatter",function(n){return n},ai,!0),a("showCursorWhenSelecting",!1,Qr,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(n,r){r=="nocursor"&&(Dr(n),n.display.input.blur()),n.display.input.readOnlyChanged(r)}),a("screenReaderLabel",null,function(n,r){r=r===""?null:r,n.display.input.screenReaderLabelChanged(r)}),a("disableInput",!1,function(n,r){r||n.display.input.reset()},!0),a("dragDrop",!0,Yl),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Qr,!0),a("singleCursorHeightPerLine",!0,Qr,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,ri,!0),a("addModeClass",!1,ri,!0),a("pollInterval",100),a("undoDepth",200,function(n,r){return n.doc.history.undoDepth=r}),a("historyEventDelay",1250),a("viewportMargin",10,function(n){return n.refresh()},!0),a("maxHighlightLength",1e4,ri,!0),a("moveInputWithCursor",!0,function(n,r){r||n.display.input.resetPosition()}),a("tabindex",null,function(n,r){return n.display.input.getField().tabIndex=r||""}),a("autofocus",null),a("direction","ltr",function(n,r){return n.doc.setDirection(r)},!0),a("phrases",null)}function Yl(e,t,a){var n=a&&a!=Wr;if(!t!=!n){var r=e.display.dragFunctions,i=t?Re:mt;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Ql(e){e.options.lineWrapping?(ue(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),sa(e)),to(e),Ea(e),Rn(e),setTimeout(function(){return Mr(e)},100)}function An(e,t){var a=this;if(!(this instanceof An))return new An(e,t);this.options=t=t?c(t):{},c(Is,t,!1);var n=t.value;typeof n=="string"?n=new ya(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new An.inputStyles[t.inputStyle](this),i=this.display=new cl(e,n,r,t);i.wrapper.CodeMirror=this,Us(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 ge,keySeq:null,specialChars:null},t.autofocus&&!K&&i.input.focus(),$&&S<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Zl(this),kl(),Sr(this),this.curOp.forceUpdate=!0,Yo(this,n),t.autofocus&&!K||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ao(a)},20):Dr(this);for(var o in zi)zi.hasOwnProperty(o)&&zi[o](this,t[o],Wr);zo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<wo.length;++s)wo[s](this);Or(this),y&&t.lineWrapping&&getComputedStyle(i.lineDiv).textRendering=="optimizelegibility"&&(i.lineDiv.style.textRendering="auto")}An.defaults=Is,An.optionHandlers=zi;function Zl(e){var t=e.display;Re(t.scroller,"mousedown",aa(e,Ms)),$&&S<11?Re(t.scroller,"dblclick",aa(e,function(u){if(Ue(e,u))return;var f=yr(e,u);if(!f||Co(e,u)||Ia(e.display,u))return;p(u);var U=e.findWordAt(f);ji(e.doc,U.anchor,U.head)})):Re(t.scroller,"dblclick",function(u){return Ue(e,u)||p(u)}),Re(t.scroller,"contextmenu",function(u){return js(e,u)}),Re(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||js(e,u)});var a,n={end:0};function r(){t.activeTouch&&(a=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function i(u){if(u.touches.length!=1)return!1;var f=u.touches[0];return f.radiusX<=1&&f.radiusY<=1}function o(u,f){if(f.left==null)return!0;var U=f.left-u.left,B=f.top-u.top;return U*U+B*B>20*20}Re(t.scroller,"touchstart",function(u){if(!Ue(e,u)&&!i(u)&&!Co(e,u)){t.input.ensurePolled(),clearTimeout(a);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),Re(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Re(t.scroller,"touchend",function(u){var f=t.activeTouch;if(f&&!Ia(t,u)&&f.left!=null&&!f.moved&&new Date-f.start<300){var U=e.coordsChar(t.activeTouch,"page"),B;!f.prev||o(f,f.prev)?B=new ln(U,U):!f.prev.prev||o(f,f.prev.prev)?B=e.findWordAt(U):B=new ln(Ie(U.line,0),jt(e.doc,Ie(U.line+1,0))),e.setSelection(B.anchor,B.head),e.focus(),p(u)}r()}),Re(t.scroller,"touchcancel",r),Re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(qr(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),ke(e,"scroll",e))}),Re(t.scroller,"mousewheel",function(u){return $o(e,u)}),Re(t.scroller,"DOMMouseScroll",function(u){return $o(e,u)}),Re(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Ue(e,u)||C(u)},over:function(u){Ue(e,u)||(Pl(e,u),C(u))},start:function(u){return Rl(e,u)},drop:aa(e,Ol),leave:function(u){Ue(e,u)||Es(e)}};var s=t.input.getField();Re(s,"keyup",function(u){return Ds.call(e,u)}),Re(s,"keydown",aa(e,Ts)),Re(s,"keypress",aa(e,As)),Re(s,"focus",function(u){return ao(e,u)}),Re(s,"blur",function(u){return Dr(e,u)})}var wo=[];An.defineInitHook=function(e){return wo.push(e)};function gi(e,t,a,n){var r=e.doc,i;a==null&&(a="add"),a=="smart"&&(r.mode.indent?i=wn(e,t).state:a="prev");var o=e.options.tabSize,s=ut(r,t),u=X(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var f=s.text.match(/^\s*/)[0],U;if(!n&&!/\S/.test(s.text))U=0,a="not";else if(a=="smart"&&(U=r.mode.indent(i,s.text.slice(f.length),s.text),U==me||U>150)){if(!n)return;a="prev"}a=="prev"?t>r.first?U=X(ut(r,t-1).text,null,o):U=0:a=="add"?U=u+e.options.indentUnit:a=="subtract"?U=u-e.options.indentUnit:typeof a=="number"&&(U=u+a),U=Math.max(0,U);var B="",le=0;if(e.options.indentWithTabs)for(var ne=Math.floor(U/o);ne;--ne)le+=o,B+=" ";if(le<U&&(B+=x(U-le)),B!=f)return Ur(r,B,Ie(t,0),Ie(t,f.length),"+input"),s.stateAfter=null,!0;for(var Le=0;Le<r.sel.ranges.length;Le++){var Ke=r.sel.ranges[Le];if(Ke.head.line==t&&Ke.head.ch<f.length){var Ze=Ie(t,f.length);go(r,Le,new ln(Ze,Ze));break}}}var Wa=null;function Hi(e){Wa=e}function So(e,t,a,n,r){var i=e.doc;e.display.shift=!1,n||(n=i.sel);var o=+new Date-200,s=r=="paste"||e.state.pasteIncoming>o,u=kt(t),f=null;if(s&&n.ranges.length>1)if(Wa&&Wa.text.join(`
`)==t){if(n.ranges.length%Wa.text.length==0){f=[];for(var U=0;U<Wa.text.length;U++)f.push(i.splitLines(Wa.text[U]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(f=Pe(u,function(ct){return[ct]}));for(var B=e.curOp.updateInput,le=n.ranges.length-1;le>=0;le--){var ne=n.ranges[le],Le=ne.from(),Ke=ne.to();ne.empty()&&(a&&a>0?Le=Ie(Le.line,Le.ch-a):e.state.overwrite&&!s?Ke=Ie(Ke.line,Math.min(ut(i,Ke.line).text.length,Ke.ch+ie(u).length)):s&&Wa&&Wa.lineWise&&Wa.text.join(`
`)==u.join(`
`)&&(Le=Ke=Ie(Le.line,0)));var Ze={from:Le,to:Ke,text:f?f[le%f.length]:u,origin:r||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};jr(e.doc,Ze),Gn(e,"inputRead",e,Ze)}t&&!s&&Bs(e,t),Ar(e),e.curOp.updateInput<2&&(e.curOp.updateInput=B),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Fs(e,t){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Sa(t,function(){return So(t,a,0,null,"paste")}),!0}function Bs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,n=a.ranges.length-1;n>=0;n--){var r=a.ranges[n];if(r.head.ch>100||n&&a.ranges[n-1].head.line==r.head.line)continue;var i=e.getModeAt(r.head),o=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){o=gi(e,r.head.line,"smart");break}}else i.electricInput&&(i.electricInput.test(ut(e.doc,r.head.line).text.slice(0,r.head.ch))&&(o=gi(e,r.head.line,"smart")));o&&Gn(e,"electricInput",e,r.head.line)}}function Ws(e){for(var t=[],a=[],n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line,i={anchor:Ie(r,0),head:Ie(r+1,0)};a.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:a}}function Ks(e,t,a,n){e.setAttribute("autocorrect",a?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function zs(){var e=m("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=m("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?e.style.width="1000px":e.setAttribute("wrap","off"),N&&(e.style.border="1px solid black"),Ks(e),t}function ql(e){var t=e.optionHandlers,a=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,r){var i=this.options,o=i[n];if(i[n]==r&&n!="mode")return;i[n]=r,t.hasOwnProperty(n)&&aa(this,t[n])(this,r,o),ke(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,r){this.state.keyMaps[r?"push":"unshift"](Wi(n))},removeKeyMap:function(n){for(var r=this.state.keyMaps,i=0;i<r.length;++i)if(r[i]==n||r[i].name==n)return r.splice(i,1),!0},addOverlay:ma(function(n,r){var i=n.token?n:e.getMode(this.options,n);if(i.startState)throw new Error("Overlays may not be stateful.");Fe(this.state.overlays,{mode:i,modeSpec:n,opaque:r&&r.opaque,priority:r&&r.priority||0},function(o){return o.priority}),this.state.modeGen++,Ea(this)}),removeOverlay:ma(function(n){for(var r=this.state.overlays,i=0;i<r.length;++i){var o=r[i].modeSpec;if(o==n||typeof n=="string"&&o.name==n){r.splice(i,1),this.state.modeGen++,Ea(this);return}}}),indentLine:ma(function(n,r,i){typeof r!="string"&&typeof r!="number"&&(r==null?r=this.options.smartIndent?"smart":"prev":r=r?"add":"subtract"),Mn(this.doc,n)&&gi(this,n,r,i)}),indentSelection:ma(function(n){for(var r=this.doc.sel.ranges,i=-1,o=0;o<r.length;o++){var s=r[o];if(s.empty())s.head.line>i&&(gi(this,s.head.line,n,!0),i=s.head.line,o==this.doc.sel.primIndex&&Ar(this));else{var u=s.from(),f=s.to(),U=Math.max(i,u.line);i=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var B=U;B<i;++B)gi(this,B,n);var le=this.doc.sel.ranges;u.ch==0&&r.length==le.length&&le[o].from().ch>0&&go(this.doc,o,new ln(u,le[o].to()),de)}}}),getTokenAt:function(n,r){return At(this,n,r)},getLineTokens:function(n,r){return At(this,Ie(n),r,!0)},getTokenTypeAt:function(n){n=jt(this.doc,n);var r=za(this,ut(this.doc,n.line)),i=0,o=(r.length-1)/2,s=n.ch,u;if(s==0)u=r[2];else for(;;){var f=i+o>>1;if((f?r[f*2-1]:0)>=s)o=f;else if(r[f*2+1]<s)i=f+1;else{u=r[f*2+2];break}}var U=u?u.indexOf("overlay "):-1;return U<0?u:U==0?null:u.slice(0,U-1)},getModeAt:function(n){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(n).state).mode:r},getHelper:function(n,r){return this.getHelpers(n,r)[0]},getHelpers:function(n,r){var i=[];if(!a.hasOwnProperty(r))return i;var o=a[r],s=this.getModeAt(n);if(typeof s[r]=="string")o[s[r]]&&i.push(o[s[r]]);else if(s[r])for(var u=0;u<s[r].length;u++){var f=o[s[r][u]];f&&i.push(f)}else s.helperType&&o[s.helperType]?i.push(o[s.helperType]):o[s.name]&&i.push(o[s.name]);for(var U=0;U<o._global.length;U++){var B=o._global[U];B.pred(s,this)&&pe(i,B.val)==-1&&i.push(B.val)}return i},getStateAfter:function(n,r){var i=this.doc;return n=kn(i,n==null?i.first+i.size-1:n),wn(this,n+1,r).state},cursorCoords:function(n,r){var i,o=this.doc.sel.primary();return n==null?i=o.head:typeof n=="object"?i=jt(this.doc,n):i=n?o.from():o.to(),Ht(this,i,r||"page")},charCoords:function(n,r){return fa(this,jt(this.doc,n),r||"page")},coordsChar:function(n,r){return n=qn(this,n,r||"page"),ea(this,n.left,n.top)},lineAtHeight:function(n,r){return n=qn(this,{top:n,left:0},r||"page").top,en(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,r,i){var o=!1,s;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),s=ut(this.doc,n)}else s=n;return jn(this,s,{top:0,left:0},r||"page",i||o).top+(o?this.doc.height-Cn(s):0)},defaultTextHeight:function(){return na(this.display)},defaultCharWidth:function(){return _a(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,r,i,o,s){var u=this.display;n=Ht(this,jt(this.doc,n));var f=n.bottom,U=n.left;if(r.style.position="absolute",r.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(r),u.sizer.appendChild(r),o=="over")f=n.top;else if(o=="above"||o=="near"){var B=Math.max(u.wrapper.clientHeight,this.doc.height),le=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+r.offsetHeight>B)&&n.top>r.offsetHeight?f=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=B&&(f=n.bottom),U+r.offsetWidth>le&&(U=le-r.offsetWidth)}r.style.top=f+"px",r.style.left=r.style.right="",s=="right"?(U=u.sizer.clientWidth-r.offsetWidth,r.style.right="0px"):(s=="left"?U=0:s=="middle"&&(U=(u.sizer.clientWidth-r.offsetWidth)/2),r.style.left=U+"px"),i&&Ys(this,{left:U,top:f,right:U+r.offsetWidth,bottom:f+r.offsetHeight})},triggerOnKeyDown:ma(Ts),triggerOnKeyPress:ma(As),triggerOnKeyUp:Ds,triggerOnMouseDown:ma(Ms),execCommand:function(n){if(hi.hasOwnProperty(n))return hi[n].call(null,this)},triggerElectric:ma(function(n){Bs(this,n)}),findPosH:function(n,r,i,o){var s=1;r<0&&(s=-1,r=-r);for(var u=jt(this.doc,n),f=0;f<r&&!(u=Oo(this.doc,u,s,i,o),u.hitSide);++f);return u},moveH:ma(function(n,r){var i=this;this.extendSelectionsBy(function(o){return i.display.shift||i.doc.extend||o.empty()?Oo(i.doc,o.head,n,r,i.options.rtlMoveVisually):n<0?o.from():o.to()},A)}),deleteH:ma(function(n,r){var i=this.doc.sel,o=this.doc;i.somethingSelected()?o.replaceSelection("",null,"+delete"):Br(this,function(s){var u=Oo(o,s.head,n,r,!1);return n<0?{from:u,to:s.head}:{from:s.head,to:u}})}),findPosV:function(n,r,i,o){var s=1,u=o;r<0&&(s=-1,r=-r);for(var f=jt(this.doc,n),U=0;U<r;++U){var B=Ht(this,f,"div");if(u==null?u=B.left:B.left=u,f=Hs(this,B,s,i),f.hitSide)break}return f},moveV:ma(function(n,r){var i=this,o=this.doc,s=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(U){if(u)return n<0?U.from():U.to();var B=Ht(i,U.head,"div");U.goalColumn!=null&&(B.left=U.goalColumn),s.push(B.left);var le=Hs(i,B,n,r);return r=="page"&&U==o.sel.primary()&&io(i,fa(i,le,"div").top-B.top),le},A),s.length)for(var f=0;f<o.sel.ranges.length;f++)o.sel.ranges[f].goalColumn=s[f]}),findWordAt:function(n){var r=this.doc,i=ut(r,n.line).text,o=n.ch,s=n.ch;if(i){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||s==i.length)&&o?--o:++s;for(var f=i.charAt(o),U=Ne(f,u)?function(B){return Ne(B,u)}:/\s/.test(f)?function(B){return/\s/.test(B)}:function(B){return!/\s/.test(B)&&!Ne(B)};o>0&&U(i.charAt(o-1));)--o;for(;s<i.length&&U(i.charAt(s));)++s}return new ln(Ie(n.line,o),Ie(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?ue(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),ke(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==F()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ma(function(n,r){Zr(this,n,r)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Ta(this)-this.display.barHeight,width:n.scrollWidth-Ta(this)-this.display.barWidth,clientHeight:Er(this),clientWidth:Fa(this)}},scrollIntoView:ma(function(n,r){n==null?(n={from:this.doc.sel.primary().head,to:null},r==null&&(r=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Ie(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=r||0,n.from.line!=null?Qs(this,n):jo(this,n.from,n.to,n.margin)}),setSize:ma(function(n,r){var i=this,o=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};n!=null&&(this.display.wrapper.style.width=o(n)),r!=null&&(this.display.wrapper.style.height=o(r)),this.options.lineWrapping&&Fn(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(u){if(u.widgets){for(var f=0;f<u.widgets.length;f++)if(u.widgets[f].noHScroll){rr(i,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,ke(this,"refresh",this)}),operation:function(n){return Sa(this,n)},startOperation:function(){return Sr(this)},endOperation:function(){return Or(this)},refresh:ma(function(){var n=this.display.cachedTextHeight;Ea(this),this.curOp.forceUpdate=!0,Rn(this),Zr(this,this.doc.scrollLeft,this.doc.scrollTop),lo(this.display),(n==null||Math.abs(n-na(this.display))>.5||this.options.lineWrapping)&&to(this),ke(this,"refresh",this)}),swapDoc:ma(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),Yo(this,n),Rn(this),this.display.input.reset(),Zr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Gn(this,"swapDoc",this,r),r}),phrase:function(n){var r=this.options.phrases;return r&&Object.prototype.hasOwnProperty.call(r,n)?r[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}},k(e),e.registerHelper=function(n,r,i){a.hasOwnProperty(n)||(a[n]=e[n]={_global:[]}),a[n][r]=i},e.registerGlobalHelper=function(n,r,i,o){e.registerHelper(n,r,o),a[n]._global.push({pred:i,val:o})}}function Oo(e,t,a,n,r){var i=t,o=a,s=ut(e,t.line),u=r&&e.direction=="rtl"?-a:a;function f(){var xt=t.line+u;return xt<e.first||xt>=e.first+e.size?!1:(t=new Ie(xt,t.ch,t.sticky),s=ut(e,xt))}function U(xt){var dt;if(n=="codepoint"){var St=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(St)?dt=null:dt=new Ie(t.line,Math.max(0,Math.min(s.text.length,t.ch+a*(St>=55296&&St<56320?2:1))),-a)}else r?dt=Ll(e.cm,s,t,a):dt=_o(s,t,a);if(dt==null)if(!xt&&f())t=Eo(r,e.cm,s,t.line,u);else return!1;else t=dt;return!0}if(n=="char"||n=="codepoint")U();else if(n=="column")U(!0);else if(n=="word"||n=="group")for(var B=null,le=n=="group",ne=e.cm&&e.cm.getHelper(t,"wordChars"),Le=!0;!(a<0&&!U(!Le));Le=!1){var Ke=s.text.charAt(t.ch)||`
`,Ze=Ne(Ke,ne)?"w":le&&Ke==`
`?"n":!le||/\s/.test(Ke)?null:"p";if(le&&!Le&&!Ze&&(Ze="s"),B&&B!=Ze){a<0&&(a=1,U(),t.sticky="after");break}if(Ze&&(B=Ze),a>0&&!U(!Le))break}var ct=Ii(e,t,i,o,!0);return We(i,ct)&&(ct.hitSide=!0),ct}function Hs(e,t,a,n){var r=e.doc,i=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*na(e.display),3);o=(a>0?t.bottom:t.top)+a*u}else n=="line"&&(o=a>0?t.bottom+3:t.top-3);for(var f;!(f=ea(e,i,o),!f.outside);){if(a<0?o<=0:o>=r.height){f.hitSide=!0;break}o+=a*5}return f}var hn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ge,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hn.prototype.init=function(e){var t=this,a=this,n=a.cm,r=a.div=e.lineDiv;Ks(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function i(s){for(var u=s.target;u;u=u.parentNode){if(u==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}Re(r,"paste",function(s){if(!i(s)||Ue(n,s)||Fs(s,n))return;S<=11&&setTimeout(aa(n,function(){return t.updateFromDOM()}),20)}),Re(r,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),Re(r,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),Re(r,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Re(r,"touchstart",function(){return a.forceCompositionEnd()}),Re(r,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!i(s)||Ue(n,s))return;if(n.somethingSelected())Hi({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=Ws(n);Hi({lineWise:!0,text:u.text}),s.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,de),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var f=Wa.text.join(`
`);if(s.clipboardData.setData("Text",f),s.clipboardData.getData("Text")==f){s.preventDefault();return}}var U=zs(),B=U.firstChild;n.display.lineSpace.insertBefore(U,n.display.lineSpace.firstChild),B.value=Wa.text.join(`
`);var le=document.activeElement;ye(B),setTimeout(function(){n.display.lineSpace.removeChild(U),le.focus(),le==r&&a.showPrimarySelection()},50)}Re(r,"copy",o),Re(r,"cut",o)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Do(this.cm,!1);return e.focus=document.activeElement==this.div,e},hn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,a=t.doc.sel.primary(),n=a.from(),r=a.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||r.line<t.display.viewFrom){e.removeAllRanges();return}var i=Xi(t,e.anchorNode,e.anchorOffset),o=Xi(t,e.focusNode,e.focusOffset);if(i&&!i.bad&&o&&!o.bad&&Ye(En(i,o),n)==0&&Ye(mn(i,o),r)==0)return;var s=t.display.view,u=n.line>=t.display.viewFrom&&Xs(t,n)||{node:s[0].measure.map[2],offset:0},f=r.line<t.display.viewTo&&Xs(t,r);if(!f){var U=s[s.length-1].measure,B=U.maps?U.maps[U.maps.length-1]:U.map;f={node:B[B.length-1],offset:B[B.length-2]-B[B.length-3]}}if(!u||!f){e.removeAllRanges();return}var le=e.rangeCount&&e.getRangeAt(0),ne;try{ne=P(u.node,u.offset,f.offset,f.node)}catch(Le){}ne&&(!re&&t.state.focused?(e.collapse(u.node,u.offset),ne.collapsed||(e.removeAllRanges(),e.addRange(ne))):(e.removeAllRanges(),e.addRange(ne)),le&&e.anchorNode==null?e.addRange(le):re&&this.startGracePeriod()),this.rememberSelection()},hn.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)},hn.prototype.showMultipleSelections=function(e){v(this.cm.display.cursorDiv,e.cursors),v(this.cm.display.selectionDiv,e.selection)},hn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return _(this.div,t)},hn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Sa(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)},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(D&&Y&&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 a=Xi(t,e.anchorNode,e.anchorOffset),n=Xi(t,e.focusNode,e.focusOffset);a&&n&&Sa(t,function(){ca(t.doc,or(a,n),de),(a.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},hn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,a=e.doc.sel.primary(),n=a.from(),r=a.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Ie(n.line-1,ut(e.doc,n.line-1).length)),r.ch==ut(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=Ie(r.line+1,0)),n.line<t.viewFrom||r.line>t.viewTo-1)return!1;var i,o,s;n.line==t.viewFrom||(i=xr(e,n.line))==0?(o=Lt(t.view[0].line),s=t.view[0].node):(o=Lt(t.view[i].line),s=t.view[i-1].node.nextSibling);var u=xr(e,r.line),f,U;if(u==t.view.length-1?(f=t.viewTo-1,U=t.lineDiv.lastChild):(f=Lt(t.view[u+1].line)-1,U=t.view[u+1].node.previousSibling),!s)return!1;for(var B=e.doc.splitLines(tu(e,s,U,o,f)),le=Yt(e.doc,Ie(o,0),Ie(f,ut(e.doc,f).text.length));B.length>1&&le.length>1;)if(ie(B)==ie(le))B.pop(),le.pop(),f--;else if(B[0]==le[0])B.shift(),le.shift(),o++;else break;for(var ne=0,Le=0,Ke=B[0],Ze=le[0],ct=Math.min(Ke.length,Ze.length);ne<ct&&Ke.charCodeAt(ne)==Ze.charCodeAt(ne);)++ne;for(var xt=ie(B),dt=ie(le),St=Math.min(xt.length-(B.length==1?ne:0),dt.length-(le.length==1?ne:0));Le<St&&xt.charCodeAt(xt.length-Le-1)==dt.charCodeAt(dt.length-Le-1);)++Le;if(B.length==1&&le.length==1&&o==n.line)for(;ne&&ne>n.ch&&xt.charCodeAt(xt.length-Le-1)==dt.charCodeAt(dt.length-Le-1);)ne--,Le++;B[B.length-1]=xt.slice(0,xt.length-Le).replace(/^\u200b+/,""),B[0]=B[0].slice(ne).replace(/\u200b+$/,"");var Wt=Ie(o,ne),Nt=Ie(f,le.length?ie(le).length-Le:0);if(B.length>1||B[0]||Ye(Wt,Nt))return Ur(e.doc,B,Wt,Nt,"+input"),!0},hn.prototype.ensurePolled=function(){this.forceCompositionEnd()},hn.prototype.reset=function(){this.forceCompositionEnd()},hn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},hn.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)},hn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Sa(this.cm,function(){return Ea(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||aa(this.cm,So)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.prototype.needsContentAttribute=!0;function Xs(e,t){var a=nt(e,t.line);if(!a||a.hidden)return null;var n=ut(e.doc,t.line),r=$e(a,n,t.line),i=vt(n,e.doc.direction),o="left";if(i){var s=et(i,t.ch);o=s%2?"right":"left"}var u=Jt(r.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Kr(e,t){return t&&(e.bad=!0),e}function tu(e,t,a,n,r){var i="",o=!1,s=e.doc.lineSeparator(),u=!1;function f(ne){return function(Le){return Le.id==ne}}function U(){o&&(i+=s,u&&(i+=s),o=u=!1)}function B(ne){ne&&(U(),i+=ne)}function le(ne){if(ne.nodeType==1){var Le=ne.getAttribute("cm-text");if(Le){B(Le);return}var Ke=ne.getAttribute("cm-marker"),Ze;if(Ke){var ct=e.findMarks(Ie(n,0),Ie(r+1,0),f(+Ke));ct.length&&(Ze=ct[0].find(0))&&B(Yt(e.doc,Ze.from,Ze.to).join(s));return}if(ne.getAttribute("contenteditable")=="false")return;var xt=/^(pre|div|p|li|table|br)$/i.test(ne.nodeName);if(!/^br$/i.test(ne.nodeName)&&ne.textContent.length==0)return;xt&&U();for(var dt=0;dt<ne.childNodes.length;dt++)le(ne.childNodes[dt]);/^(pre|p)$/i.test(ne.nodeName)&&(u=!0),xt&&(o=!0)}else ne.nodeType==3&&B(ne.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(le(t),t==a);)t=t.nextSibling,u=!1;return i}function Xi(e,t,a){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[a],!n)return Kr(e.clipPos(Ie(e.display.viewTo-1)),!0);t=null,a=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 r=0;r<e.display.view.length;r++){var i=e.display.view[r];if(i.node==n)return nu(i,t,a)}}function nu(e,t,a){var n=e.text.firstChild,r=!1;if(!t||!_(n,t))return Kr(Ie(Lt(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[a],a=0,!t)){var i=e.rest?ie(e.rest):e.line;return Kr(Ie(Lt(i),i.text.length),r)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,a&&(a=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var u=e.measure,f=u.maps;function U(Ze,ct,xt){for(var dt=-1;dt<(f?f.length:0);dt++)for(var St=dt<0?u.map:f[dt],Wt=0;Wt<St.length;Wt+=3){var Nt=St[Wt+2];if(Nt==Ze||Nt==ct){var Qt=Lt(dt<0?e.line:e.rest[dt]),_n=St[Wt]+xt;return(xt<0||Nt!=Ze)&&(_n=St[Wt+(xt?1:0)]),Ie(Qt,_n)}}}var B=U(o,s,a);if(B)return Kr(B,r);for(var le=s.nextSibling,ne=o?o.nodeValue.length-a:0;le;le=le.nextSibling){if(B=U(le,le.firstChild,0),B)return Kr(Ie(B.line,B.ch-ne),r);ne+=le.textContent.length}for(var Le=s.previousSibling,Ke=a;Le;Le=Le.previousSibling){if(B=U(Le,Le.firstChild,-1),B)return Kr(Ie(B.line,B.ch+Ke),r);Ke+=Le.textContent.length}}var Bn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ge,this.hasSelection=!1,this.composing=null};Bn.prototype.init=function(e){var t=this,a=this,n=this.cm;this.createField(e);var r=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),N&&(r.style.width="0px"),Re(r,"input",function(){$&&S>=9&&t.hasSelection&&(t.hasSelection=null),a.poll()}),Re(r,"paste",function(o){if(Ue(n,o)||Fs(o,n))return;n.state.pasteIncoming=+new Date,a.fastPoll()});function i(o){if(Ue(n,o))return;if(n.somethingSelected())Hi({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=Ws(n);Hi({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,de):(a.prevInput="",r.value=s.text.join(`
`),ye(r))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}Re(r,"cut",i),Re(r,"copy",i),Re(e.scroller,"paste",function(o){if(Ia(e,o)||Ue(n,o))return;if(!r.dispatchEvent){n.state.pasteIncoming=+new Date,a.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,r.dispatchEvent(s)}),Re(e.lineSpace,"selectstart",function(o){Ia(e,o)||p(o)}),Re(r,"compositionstart",function(){var o=n.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(r,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},Bn.prototype.createField=function(e){this.wrapper=zs(),this.textarea=this.wrapper.firstChild},Bn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Bn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,a=e.doc,n=Do(e);if(e.options.moveInputWithCursor){var r=Ht(e,a.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+o.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+o.left-i.left))}return n},Bn.prototype.showSelection=function(e){var t=this.cm,a=t.display;v(a.cursorDiv,e.cursors),v(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Bn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var a=t.getSelection();this.textarea.value=a,t.state.focused&&ye(this.textarea),$&&S>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",$&&S>=9&&(this.hasSelection=null))},Bn.prototype.getField=function(){return this.textarea},Bn.prototype.supportsTouch=function(){return!1},Bn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!K||F()!=this.textarea))try{this.textarea.focus()}catch(e){}},Bn.prototype.blur=function(){this.textarea.blur()},Bn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Bn.prototype.receivedFocus=function(){this.slowPoll()},Bn.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()})},Bn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function a(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,a)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,a)},Bn.prototype.poll=function(){var e=this,t=this.cm,a=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(a)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=a.value;if(r==n&&!t.somethingSelected())return!1;if($&&S>=9&&this.hasSelection===r||h&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=r.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,r.length);o<s&&n.charCodeAt(o)==r.charCodeAt(o);)++o;return Sa(t,function(){So(t,r.slice(o),n.length-o,null,e.composing?"*compose":null),r.length>1e3||r.indexOf(`
`)>-1?a.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Bn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Bn.prototype.onKeyPress=function(){$&&S>=9&&(this.hasSelection=null),this.fastPoll()},Bn.prototype.onContextMenu=function(e){var t=this,a=t.cm,n=a.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=yr(a,e),o=n.scroller.scrollTop;if(!i||q)return;var s=a.options.resetSelectionOnContextMenu;s&&a.doc.sel.contains(i)==-1&&aa(a,ca)(a.doc,or(i),de);var u=r.style.cssText,f=t.wrapper.style.cssText,U=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",r.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-U.top-5)+"px; left: "+(e.clientX-U.left-5)+`px;
z-index: 1000; background: `+($?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var B;y&&(B=window.scrollY),n.input.focus(),y&&window.scrollTo(null,B),n.input.reset(),a.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=ne,n.selForContextMenu=a.doc.sel,clearTimeout(n.detectingSelectAll);function le(){if(r.selectionStart!=null){var Ke=a.somethingSelected(),Ze="\u200B"+(Ke?r.value:"");r.value="\u21DA",r.value=Ze,t.prevInput=Ke?"":"\u200B",r.selectionStart=1,r.selectionEnd=Ze.length,n.selForContextMenu=a.doc.sel}}function ne(){if(t.contextMenuPending!=ne)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,r.style.cssText=u,$&&S<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),r.selectionStart!=null){(!$||$&&S<9)&&le();var Ke=0,Ze=function(){n.selForContextMenu==a.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?aa(a,us)(a):Ke++<10?n.detectingSelectAll=setTimeout(Ze,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ze,200)}}if($&&S>=9&&le(),d){C(e);var Le=function(){mt(window,"mouseup",Le),setTimeout(ne,20)};Re(window,"mouseup",Le)}else setTimeout(ne,50)},Bn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Bn.prototype.setUneditable=function(){},Bn.prototype.needsContentAttribute=!1;function au(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 a=F();t.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function n(){e.value=s.getValue()}var r;if(e.form&&(Re(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;r=i.submit;try{var o=i.submit=function(){n(),i.submit=r,i.submit(),i.submit=o}}catch(u){}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(mt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var s=An(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function ru(e){e.off=mt,e.on=Re,e.wheelEventPixels=dl,e.Doc=ya,e.splitLines=kt,e.countColumn=X,e.findColumn=ee,e.isWordChar=Ee,e.Pass=me,e.signal=ke,e.Line=bn,e.changeEnd=sr,e.scrollbarModel=Fo,e.Pos=Ie,e.cmpPos=Ye,e.modes=Ut,e.mimeModes=gt,e.resolveMode=ot,e.getMode=Qe,e.modeExtensions=Xe,e.extendMode=ft,e.copyState=Tt,e.startState=Zt,e.innerMode=Dt,e.commands=hi,e.keyMap=Ya,e.keyName=Ss,e.isModifierKey=Cs,e.lookupKey=Fr,e.normalizeKeyMap=Ml,e.StringStream=Bt,e.SharedTextMarker=ci,e.TextMarker=ur,e.LineWidget=ui,e.e_preventDefault=p,e.e_stopPropagation=g,e.e_stop=C,e.addClass=ue,e.contains=_,e.rmClass=b,e.keyNames=cr}Jl(An),ql(An);var iu="iter insert remove copy getEditor constructor".split(" ");for(var $i in ya.prototype)ya.prototype.hasOwnProperty($i)&&pe(iu,$i)<0&&(An.prototype[$i]=function(e){return function(){return e.apply(this.doc,arguments)}}(ya.prototype[$i]));return k(ya),An.inputStyles={textarea:Bn,contenteditable:hn},An.defineMode=function(e){!An.defaults.mode&&e!="null"&&(An.defaults.mode=e),Ft.apply(this,arguments)},An.defineMIME=Pt,An.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),An.defineMIME("text/plain","null"),An.defineExtension=function(e,t){An.prototype[e]=t},An.defineDocExtension=function(e,t){ya.prototype[e]=t},An.fromTextArea=au,ru(An),An.version="5.58.2",An})},WaYH:function(Ge,je,l){"use strict";var G=l("rePB"),we=l("Ff2n"),re=l("VTBJ"),Se=l("1OyB"),xe=l("vuIU"),fe=l("JX7q"),$=l("Ji7U"),S=l("LK+K"),y=l("cDcd"),W=l("TSYQ"),Y=l.n(W),q=l("sboe"),oe=l("OZM5"),z=function(d){var V=d.prefixCls,b=d.level,j=d.isStart,v=d.isEnd;if(!b)return null;for(var m="".concat(V,"-indent-unit"),L=[],P=0;P<b;P+=1){var _;L.push(y.createElement("span",{key:P,className:Y()(m,(_={},Object(G.a)(_,"".concat(m,"-start"),j[P+1]),Object(G.a)(_,"".concat(m,"-end"),v[P+1]),Object(G.a)(_,"".concat(m,"-end-first-level"),!P&&v[0]),_))}))}return y.createElement("span",{"aria-hidden":"true",className:"".concat(V,"-indent")},L)},M=z,N=l("815F"),D="open",K="close",h="---",te=function(I){Object($.a)(V,I);var d=Object(S.a)(V);function V(){var b;return Object(Se.a)(this,V),b=d.apply(this,arguments),b.state={dragNodeHighlight:!1},b.onSelectorClick=function(j){var v=b.props.context.onNodeClick;v(j,Object(N.b)(b.props)),b.isSelectable()?b.onSelect(j):b.onCheck(j)},b.onSelectorDoubleClick=function(j){var v=b.props.context.onNodeDoubleClick;v(j,Object(N.b)(b.props))},b.onSelect=function(j){if(b.isDisabled())return;var v=b.props.context.onNodeSelect;j.preventDefault(),v(j,Object(N.b)(b.props))},b.onCheck=function(j){if(b.isDisabled())return;var v=b.props,m=v.disableCheckbox,L=v.checked,P=b.props.context.onNodeCheck;if(!b.isCheckable()||m)return;j.preventDefault();var _=!L;P(j,Object(N.b)(b.props),_)},b.onMouseEnter=function(j){var v=b.props.context.onNodeMouseEnter;v(j,Object(N.b)(b.props))},b.onMouseLeave=function(j){var v=b.props.context.onNodeMouseLeave;v(j,Object(N.b)(b.props))},b.onContextMenu=function(j){var v=b.props.context.onNodeContextMenu;v(j,Object(N.b)(b.props))},b.onDragStart=function(j){var v=b.props.context.onNodeDragStart;j.stopPropagation(),b.setState({dragNodeHighlight:!0}),v(j,Object(fe.a)(b));try{j.dataTransfer.setData("text/plain","")}catch(m){}},b.onDragEnter=function(j){var v=b.props.context.onNodeDragEnter;j.preventDefault(),j.stopPropagation(),v(j,Object(fe.a)(b))},b.onDragOver=function(j){var v=b.props.context.onNodeDragOver;j.preventDefault(),j.stopPropagation(),v(j,Object(fe.a)(b))},b.onDragLeave=function(j){var v=b.props.context.onNodeDragLeave;j.stopPropagation(),v(j,Object(fe.a)(b))},b.onDragEnd=function(j){var v=b.props.context.onNodeDragEnd;j.stopPropagation(),b.setState({dragNodeHighlight:!1}),v(j,Object(fe.a)(b))},b.onDrop=function(j){var v=b.props.context.onNodeDrop;j.preventDefault(),j.stopPropagation(),b.setState({dragNodeHighlight:!1}),v(j,Object(fe.a)(b))},b.onExpand=function(j){var v=b.props.context.onNodeExpand;v(j,Object(N.b)(b.props))},b.setSelectHandle=function(j){b.selectHandle=j},b.getNodeState=function(){var j=b.props.expanded;return b.isLeaf()?null:j?D:K},b.hasChildren=function(){var j=b.props.eventKey,v=b.props.context.keyEntities,m=v[j]||{},L=m.children;return!!(L||[]).length},b.isLeaf=function(){var j=b.props,v=j.isLeaf,m=j.loaded,L=b.props.context.loadData,P=b.hasChildren();return v===!1?!1:v||!L&&!P||L&&m&&!P},b.isDisabled=function(){var j=b.props.disabled,v=b.props.context.disabled;return!!(v||j)},b.isCheckable=function(){var j=b.props.checkable,v=b.props.context.checkable;return!v||j===!1?!1:v},b.syncLoadData=function(j){var v=j.expanded,m=j.loading,L=j.loaded,P=b.props.context,_=P.loadData,F=P.onNodeLoad;if(m)return;_&&v&&!b.isLeaf()&&(!b.hasChildren()&&!L&&F(Object(N.b)(b.props)))},b.renderSwitcher=function(){var j=b.props,v=j.expanded,m=j.switcherIcon,L=b.props.context,P=L.prefixCls,_=L.switcherIcon,F=m||_;if(b.isLeaf())return y.createElement("span",{className:Y()("".concat(P,"-switcher"),"".concat(P,"-switcher-noop"))},typeof F=="function"?F(Object(re.a)(Object(re.a)({},b.props),{},{isLeaf:!0})):F);var ue=Y()("".concat(P,"-switcher"),"".concat(P,"-switcher_").concat(v?D:K));return y.createElement("span",{onClick:b.onExpand,className:ue},typeof F=="function"?F(Object(re.a)(Object(re.a)({},b.props),{},{isLeaf:!1})):F)},b.renderCheckbox=function(){var j=b.props,v=j.checked,m=j.halfChecked,L=j.disableCheckbox,P=b.props.context.prefixCls,_=b.isDisabled(),F=b.isCheckable();if(!F)return null;var ue=typeof F!="boolean"?F:null;return y.createElement("span",{className:Y()("".concat(P,"-checkbox"),v&&"".concat(P,"-checkbox-checked"),!v&&m&&"".concat(P,"-checkbox-indeterminate"),(_||L)&&"".concat(P,"-checkbox-disabled")),onClick:b.onCheck},ue)},b.renderIcon=function(){var j=b.props.loading,v=b.props.context.prefixCls;return y.createElement("span",{className:Y()("".concat(v,"-iconEle"),"".concat(v,"-icon__").concat(b.getNodeState()||"docu"),j&&"".concat(v,"-icon_loading"))})},b.renderSelector=function(){var j=b.state.dragNodeHighlight,v=b.props,m=v.title,L=v.selected,P=v.icon,_=v.loading,F=v.data,ue=b.props.context,Q=ue.prefixCls,ye=ue.showIcon,R=ue.icon,c=ue.draggable,X=ue.loadData,ge=ue.titleRender,pe=b.isDisabled(),Oe="".concat(Q,"-node-content-wrapper"),me;if(ye){var de=P||R;me=de?y.createElement("span",{className:Y()("".concat(Q,"-iconEle"),"".concat(Q,"-icon__customize"))},typeof de=="function"?de(b.props):de):b.renderIcon()}else X&&_&&(me=b.renderIcon());var H;typeof m=="function"?H=m(F):ge?H=ge(F):H=m;var A=y.createElement("span",{className:"".concat(Q,"-title")},H);return y.createElement("span",{ref:b.setSelectHandle,title:typeof m=="string"?m:"",className:Y()("".concat(Oe),"".concat(Oe,"-").concat(b.getNodeState()||"normal"),!pe&&(L||j)&&"".concat(Q,"-node-selected"),!pe&&c&&"draggable"),draggable:!pe&&c||void 0,"aria-grabbed":!pe&&c||void 0,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onContextMenu:b.onContextMenu,onClick:b.onSelectorClick,onDoubleClick:b.onSelectorDoubleClick,onDragStart:c?b.onDragStart:void 0},me,A)},b}return Object(xe.a)(V,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var j=this.props.selectable,v=this.props.context.selectable;return typeof j=="boolean"?j:v}},{key:"render",value:function(){var j,v=this.props,m=v.eventKey,L=v.className,P=v.style,_=v.dragOver,F=v.dragOverGapTop,ue=v.dragOverGapBottom,Q=v.isLeaf,ye=v.isStart,R=v.isEnd,c=v.expanded,X=v.selected,ge=v.checked,pe=v.halfChecked,Oe=v.loading,me=v.domRef,de=v.active,H=v.onMouseMove,A=Object(we.a)(v,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ee=this.props.context,O=ee.prefixCls,x=ee.filterTreeNode,ie=ee.draggable,Pe=ee.keyEntities,Fe=this.isDisabled(),be=Object(oe.f)(A),Ae=Pe[m]||{},ve=Ae.level,Ee=R[R.length-1];return y.createElement("div",Object.assign({ref:me,className:Y()(L,"".concat(O,"-treenode"),(j={},Object(G.a)(j,"".concat(O,"-treenode-disabled"),Fe),Object(G.a)(j,"".concat(O,"-treenode-switcher-").concat(c?"open":"close"),!Q),Object(G.a)(j,"".concat(O,"-treenode-checkbox-checked"),ge),Object(G.a)(j,"".concat(O,"-treenode-checkbox-indeterminate"),pe),Object(G.a)(j,"".concat(O,"-treenode-selected"),X),Object(G.a)(j,"".concat(O,"-treenode-loading"),Oe),Object(G.a)(j,"".concat(O,"-treenode-active"),de),Object(G.a)(j,"".concat(O,"-treenode-leaf-last"),Ee),Object(G.a)(j,"drag-over",!Fe&&_),Object(G.a)(j,"drag-over-gap-top",!Fe&&F),Object(G.a)(j,"drag-over-gap-bottom",!Fe&&ue),Object(G.a)(j,"filter-node",x&&x(Object(N.b)(this.props))),j)),style:P,onDragEnter:ie?this.onDragEnter:void 0,onDragOver:ie?this.onDragOver:void 0,onDragLeave:ie?this.onDragLeave:void 0,onDrop:ie?this.onDrop:void 0,onDragEnd:ie?this.onDragEnd:void 0,onMouseMove:H},be),y.createElement(M,{prefixCls:O,level:ve,isStart:ye,isEnd:R}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),V}(y.Component),he=function(d){return y.createElement(q.a.Consumer,null,function(V){return y.createElement(te,Object.assign({},d,{context:V}))})};he.displayName="TreeNode",he.defaultProps={title:h},he.isTreeNode=1;var Z=je.a=he},Y1PL:function(Ge,je,l){"use strict";l.r(je),l.d(je,"ResizableTextArea",function(){return pe});var G=l("wx14"),we=l("1OyB"),re=l("vuIU"),Se=l("Ji7U"),xe=l("LK+K"),fe=l("cDcd"),$=l("VTBJ"),S=l("rePB"),y=l("Zm9Q"),W=l("Kwbf"),Y=l("c+Xe"),q=l("m+aA"),oe=l("bdgK"),z=new Map;function M(de){de.forEach(function(H){var A,ee=H.target;(A=z.get(ee))===null||A===void 0||A.forEach(function(O){return O(ee)})})}var N=new oe.default(M),D=null,K=null;function h(de,H){z.has(de)||(z.set(de,new Set),N.observe(de)),z.get(de).add(H)}function te(de,H){z.has(de)&&(z.get(de).delete(H),z.get(de).size||(N.unobserve(de),z.delete(de)))}var he=function(de){Object(Se.a)(A,de);var H=Object(xe.a)(A);function A(){return Object(we.a)(this,A),H.apply(this,arguments)}return Object(re.a)(A,[{key:"render",value:function(){return this.props.children}}]),A}(fe.Component),Z=fe.createContext(null);function I(de){var H=de.children,A=de.onBatchResize,ee=fe.useRef(0),O=fe.useRef([]),x=fe.useContext(Z),ie=fe.useCallback(function(Pe,Fe,be){ee.current+=1;var Ae=ee.current;O.current.push({size:Pe,element:Fe,data:be}),Promise.resolve().then(function(){Ae===ee.current&&(A==null||A(O.current),O.current=[])}),x==null||x(Pe,Fe,be)},[A,x]);return fe.createElement(Z.Provider,{value:ie},H)}function d(de){var H=de.children,A=de.disabled,ee=fe.useRef(null),O=fe.useRef(null),x=fe.useContext(Z),ie=fe.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Pe=fe.isValidElement(H)&&Object(Y.c)(H),Fe=Pe?H.ref:null,be=fe.useMemo(function(){return Object(Y.a)(Fe,ee)},[Fe,ee]),Ae=fe.useRef(de);Ae.current=de;var ve=fe.useCallback(function(Ee){var Ne=Ae.current,Be=Ne.onResize,Je=Ne.data,Me=Ee.getBoundingClientRect(),Ce=Me.width,lt=Me.height,at=Ee.offsetWidth,pt=Ee.offsetHeight,et=Math.floor(Ce),_t=Math.floor(lt);if(ie.current.width!==et||ie.current.height!==_t||ie.current.offsetWidth!==at||ie.current.offsetHeight!==pt){var vt={width:et,height:_t,offsetWidth:at,offsetHeight:pt};ie.current=vt;var ht=at===Math.round(Ce)?Ce:at,Re=pt===Math.round(lt)?lt:pt,wt=Object($.a)(Object($.a)({},vt),{},{offsetWidth:ht,offsetHeight:Re});x==null||x(wt,Ee,Je),Be&&Promise.resolve().then(function(){Be(wt,Ee)})}},[]);return fe.useEffect(function(){var Ee=Object(q.a)(ee.current)||Object(q.a)(O.current);return Ee&&!A&&h(Ee,ve),function(){return te(Ee,ve)}},[ee.current,A]),fe.createElement(he,{ref:O},Pe?fe.cloneElement(H,{ref:be}):H)}var V="rc-observer-key";function b(de){var H=de.children,A=Object(y.a)(H);return A.map(function(ee,O){var x=(ee==null?void 0:ee.key)||"".concat(V,"-").concat(O);return fe.createElement(d,Object(G.a)({},de,{key:x}),ee)})}b.Collection=I;var j=b,v=l("bT9E"),m=l("TSYQ"),L=l.n(m),P=`
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"],F={},ue;function Q(de){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=de.getAttribute("id")||de.getAttribute("data-reactid")||de.getAttribute("name");if(H&&F[A])return F[A];var ee=window.getComputedStyle(de),O=ee.getPropertyValue("box-sizing")||ee.getPropertyValue("-moz-box-sizing")||ee.getPropertyValue("-webkit-box-sizing"),x=parseFloat(ee.getPropertyValue("padding-bottom"))+parseFloat(ee.getPropertyValue("padding-top")),ie=parseFloat(ee.getPropertyValue("border-bottom-width"))+parseFloat(ee.getPropertyValue("border-top-width")),Pe=_.map(function(be){return"".concat(be,":").concat(ee.getPropertyValue(be))}).join(";"),Fe={sizingStyle:Pe,paddingSize:x,borderSize:ie,boxSizing:O};return H&&A&&(F[A]=Fe),Fe}function ye(de){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ue||(ue=document.createElement("textarea"),ue.setAttribute("tab-index","-1"),ue.setAttribute("aria-hidden","true"),document.body.appendChild(ue)),de.getAttribute("wrap")?ue.setAttribute("wrap",de.getAttribute("wrap")):ue.removeAttribute("wrap");var O=Q(de,H),x=O.paddingSize,ie=O.borderSize,Pe=O.boxSizing,Fe=O.sizingStyle;ue.setAttribute("style","".concat(Fe,";").concat(P)),ue.value=de.value||de.placeholder||"";var be=Number.MIN_SAFE_INTEGER,Ae=Number.MAX_SAFE_INTEGER,ve=ue.scrollHeight,Ee;if(Pe==="border-box"?ve+=ie:Pe==="content-box"&&(ve-=x),A!==null||ee!==null){ue.value=" ";var Ne=ue.scrollHeight-x;A!==null&&(be=Ne*A,Pe==="border-box"&&(be=be+x+ie),ve=Math.max(be,ve)),ee!==null&&(Ae=Ne*ee,Pe==="border-box"&&(Ae=Ae+x+ie),Ee=ve>Ae?"":"hidden",ve=Math.min(Ae,ve))}return{height:ve,minHeight:be,maxHeight:Ae,overflowY:Ee,resize:"none"}}var R=l("Gytx"),c=l.n(R),X;(function(de){de[de.NONE=0]="NONE",de[de.RESIZING=1]="RESIZING",de[de.RESIZED=2]="RESIZED"})(X||(X={}));var ge=function(de){Object(Se.a)(A,de);var H=Object(xe.a)(A);function A(ee){var O;return Object(we.a)(this,A),O=H.call(this,ee),O.nextFrameActionId=void 0,O.resizeFrameId=void 0,O.textArea=void 0,O.saveTextArea=function(x){O.textArea=x},O.handleResize=function(x){var ie=O.state.resizeStatus,Pe=O.props,Fe=Pe.autoSize,be=Pe.onResize;if(ie!==X.NONE)return;typeof be=="function"&&be(x),Fe&&O.resizeOnNextFrame()},O.resizeOnNextFrame=function(){cancelAnimationFrame(O.nextFrameActionId),O.nextFrameActionId=requestAnimationFrame(O.resizeTextarea)},O.resizeTextarea=function(){var x=O.props.autoSize;if(!x||!O.textArea)return;var ie=x.minRows,Pe=x.maxRows,Fe=ye(O.textArea,!1,ie,Pe);O.setState({textareaStyles:Fe,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(O.resizeFrameId),O.resizeFrameId=requestAnimationFrame(function(){O.setState({resizeStatus:X.RESIZED},function(){O.resizeFrameId=requestAnimationFrame(function(){O.setState({resizeStatus:X.NONE}),O.fixFirefoxAutoScroll()})})})})},O.renderTextArea=function(){var x=O.props,ie=x.prefixCls,Pe=ie===void 0?"rc-textarea":ie,Fe=x.autoSize,be=x.onResize,Ae=x.className,ve=x.disabled,Ee=O.state,Ne=Ee.textareaStyles,Be=Ee.resizeStatus,Je=Object(v.a)(O.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Me=L()(Pe,Ae,Object(S.a)({},"".concat(Pe,"-disabled"),ve));"value"in Je&&(Je.value=Je.value||"");var Ce=Object($.a)(Object($.a)(Object($.a)({},O.props.style),Ne),Be===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return fe.createElement(j,{onResize:O.handleResize,disabled:!(Fe||be)},fe.createElement("textarea",Object(G.a)({},Je,{className:Me,style:Ce,ref:O.saveTextArea})))},O.state={textareaStyles:{},resizeStatus:X.NONE},O}return Object(re.a)(A,[{key:"componentDidUpdate",value:function(O){(O.value!==this.props.value||!c()(O.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 O=this.textArea.selectionStart,x=this.textArea.selectionEnd;this.textArea.setSelectionRange(O,x)}}catch(ie){}}},{key:"render",value:function(){return this.renderTextArea()}}]),A}(fe.Component),pe=ge,Oe=function(de){Object(Se.a)(A,de);var H=Object(xe.a)(A);function A(ee){var O;Object(we.a)(this,A),O=H.call(this,ee),O.resizableTextArea=void 0,O.focus=function(){O.resizableTextArea.textArea.focus()},O.saveTextArea=function(ie){O.resizableTextArea=ie},O.handleChange=function(ie){var Pe=O.props.onChange;O.setValue(ie.target.value,function(){O.resizableTextArea.resizeTextarea()}),Pe&&Pe(ie)},O.handleKeyDown=function(ie){var Pe=O.props,Fe=Pe.onPressEnter,be=Pe.onKeyDown;ie.keyCode===13&&Fe&&Fe(ie),be&&be(ie)};var x=typeof ee.value=="undefined"||ee.value===null?ee.defaultValue:ee.value;return O.state={value:x},O}return Object(re.a)(A,[{key:"setValue",value:function(O,x){"value"in this.props||this.setState({value:O},x)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return fe.createElement(pe,Object(G.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(O){return"value"in O?{value:O.value}:null}}]),A}(fe.Component),me=je.default=Oe},YBdh:function(Ge,je,l){Ge.exports=l.p+"static/xiren.a6554bc1.svg"},ZW9T:function(Ge,je,l){"use strict";l.d(je,"a",function(){return he});var G=l("k1fw"),we=l("miYZ"),re=l("tsqr"),Se=l("rAM+"),xe=l("tJVT"),fe=l("PpiC"),$=l("cDcd"),S=l.n($),y=l("bdgK");function W(Z,I,d,V,b){var j=I.getWordUntilPosition(d),v={startLineNumber:d.lineNumber,endLineNumber:d.lineNumber,startColumn:j.startColumn,endColumn:j.endColumn},m=V.map(function(L){return{label:L,kind:Z.languages.CompletionItemKind.Keyword,insertText:L,insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:v}});return b.map(function(L){m.push(Object(G.a)(Object(G.a)({},L),{},{range:v}))}),m}var Y=function(Z){var I={label:"ifelse",kind:Z.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:Z.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"];Z.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(v,m){var L=W(Z,v,m,d,[I]);return{suggestions:L}}});var V=["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"];Z.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(v,m){var L=[{label:"print",kind:Z.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet}],P=W(Z,v,m,V,L);return{suggestions:P}}});var b=["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"];Z.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(v,m){var L=[I,{label:"main",kind:Z.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Z.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet}],P=W(Z,v,m,b,L);return{suggestions:P}}})},q="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",oe=l("LvDl");function z(Z){return/^\d+$/.test(Z)?"".concat(Z,"px"):Z}function M(){}var N=!1,D={"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 K(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],I=Z;if(Array.isArray(Z)){for(var d=0;d<Z.length;d++){var V=D[Z[d]];if(V)return V}return I[0]}return D[I]||I}var h=null,te=je.b=function(Z){var I=Z.width,d=I===void 0?"100%":I,V=Z.height,b=V===void 0?"100%":V,j=Z.value,v=Z.language,m=v===void 0?"javascript":v,L=Z.style,P=L===void 0?{}:L,_=Z.options,F=_===void 0?{}:_,ue=Z.overrideServices,Q=ue===void 0?{}:ue,ye=Z.theme,R=ye===void 0?"vs-dark":ye,c=Z.onEditBlur,X=Z.onSave,ge=Z.autoHeight,pe=ge===void 0?!1:ge,Oe=Z.forbidCopy,me=Oe===void 0?!1:Oe,de=Z.onChange,H=de===void 0?M:de,A=Z.editorDidMount,ee=A===void 0?M:A,O=Z.onFocus,x=O===void 0?M:O,ie=Z.filename,Pe=ie===void 0?"educoder.txt":ie,Fe=Object(fe.a)(Z,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),be=Object($.useRef)(),Ae=Object($.useRef)({}),ve=Object($.useRef)(),Ee=Object($.useRef)(!1),Ne=Object($.useRef)(),Be=Object($.useState)(!1),Je=Object(xe.a)(Be,2),Me=Je[0],Ce=Je[1];function lt(){var w;return be.current&&(w=new y.default(function(C){var J=Object(Se.a)(C),ae;try{for(J.s();!(ae=J.n()).done;){var se=ae.value;(se.target.offsetHeight>0||se.target.offsetWidth>0)&&Ae.current.instance.layout()}}catch(rt){J.e(rt)}finally{J.f()}}),w.observe(be.current)),w}function at(){re.b.warn(decodeURIComponent(q))}var pt=function(){var C=Ae.current.instance;if(j!=null&&C&&Me){var J=C.getModel();J&&j!==J.getValue()&&(N=!0,J.setValue(j),C.layout(),N=!1)}};Object($.useEffect)(function(){ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){pt()},500)},[j,Me,Ae.current]);function et(){var w=Ae.current.instance;if(w){var C=w.getSelection(),J=Ae.current.pastePos||{},ae=new h.Range(J.startLineNumber||C.endLineNumber,J.startColumn||C.endColumn,J.endLineNumber||C.endLineNumber,J.endColumn||C.endColumn);setTimeout(function(){w.executeEdits("",[{range:ae,text:""}])},300)}}function _t(w){(window.navigator.platform.match("Mac")?w.metaKey:w.ctrlKey)&&w.keyCode==83&&(w.preventDefault(),X())}var vt=function(){if(pe&&Ae.current.instance){var C=Ae.current.instance.getContentHeight();p(C<b?b:C)}else p(b)};function ht(w){var C=document.createEvent("MouseEvents");C.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(C)}function Re(w,C){var J=window.URL||window.webkitURL||window,ae=new Blob([C]),se=document.createElementNS("http://www.w3.org/1999/xhtml","a");se.href=J.createObjectURL(ae),se.download=w,ht(se)}Object($.useEffect)(function(){vt()},[vt]),Object($.useEffect)(function(){be.current&&!Me&&l.e(27).then(l.t.bind(null,"M/lh",7)).then(function(w){try{h=w,Ae.current.instance=h.editor.create(be.current,{value:j,language:K(m),theme:R,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},Q);var C=Ae.current.instance;if(ee(C,h),setTimeout(function(){vt(),Ae.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Re(Pe||"educoder.txt",C.getValue())}})},500),Ae.current.subscription=C.onDidChangeModelContent(function(ae){Ee.current?clearTimeout(Ne.current):(vt(),H(C.getValue(),ae)),Ne.current=setTimeout(function(){Ee.current=!1},500)}),window.Monaco||Y(h),me&&(C.addCommand(h.KeyMod.CtrlCmd|h.KeyMod.Shift|h.KeyCode.KEY_V,function(){return at(),null}),C.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KEY_C,function(){return at(),null})),window.Monaco=h,c&&C.onDidBlurEditorWidget(function(){c(C.getValue())}),x&&C.onDidFocusEditorText(function(){x(C.getValue())}),me){C.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KEY_V,function(){return at(),null}),C.onDidPaste(function(ae){Ae.current.pastePos=ae});try{window.addEventListener("paste",et)}catch(ae){}}var J=lt();return Ce(!0),function(){var ae=Ae.current.instance;ae.dispose();var se=ae.getModel();se&&se.dispose(),Ae.current.subscription&&Ae.current.subscription.dispose(),me&&window.removeEventListener("paste",et),J.unobserve(be.current)}}catch(ae){}})},[]),Object($.useEffect)(function(){var w=Ae.current.instance;if(w&&Me)return document.addEventListener("keydown",_t,!1),function(){document.removeEventListener("keydown",_t)}},[X,Me]),Object($.useEffect)(function(){var w=Ae.current.instance;if(w&&Me){var C=K(m);h.editor.setModelLanguage(w.getModel(),C),console.log("language:",m,w.getModel(),C)}},[m,Me]),Object($.useEffect)(function(){var w=Ae.current.instance;w&&Me&&h.editor.setTheme(R)},[R,Me]),Object($.useEffect)(function(){var w=Ae.current.instance;w&&Me&&(w.updateOptions(Object(G.a)({},F)),setTimeout(function(){w.getModel().updateOptions(Object(G.a)({},F))},200))},[JSON.stringify(F),Me]),Object($.useEffect)(function(){var w=Ae.current.instance;w&&Me&&w.layout()},[d,b,Me]);var wt=Object($.useState)(z(d)),mt=Object(xe.a)(wt,2),ke=mt[0],Ue=mt[1],E=Object($.useState)(z(b)),T=Object(xe.a)(E,2),k=T[0],p=T[1],g=Object(G.a)(Object(G.a)({},P),{},{width:ke,height:k});return S.a.createElement("div",{className:"my-monaco-editor",ref:be,style:g})};function he(Z){var I=Z.width,d=I===void 0?"100%":I,V=Z.height,b=V===void 0?"100%":V,j=Z.original,v=Z.modified,m=Z.language,L=Z.options,P=L===void 0?{}:L,_=Object($.useRef)(),F=Object($.useState)(null),ue=Object(xe.a)(F,2),Q=ue[0],ye=ue[1];function R(pe){var Oe;return _.current&&(Oe=new y.default(function(me){var de=Object(Se.a)(me),H;try{for(de.s();!(H=de.n()).done;){var A=H.value;(A.target.offsetHeight>0||A.target.offsetWidth>0)&&pe.layout()}}catch(ee){de.e(ee)}finally{de.f()}}),Oe.observe(_.current)),Oe}Object($.useEffect)(function(){_.current&&l.e(27).then(l.t.bind(null,"M/lh",7)).then(function(pe){h=pe;var Oe=h.editor.createDiffEditor(_.current,Object(G.a)(Object(G.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},P),{},{wordWrap:!0}));ye(Oe);var me=R(Oe);return function(){Oe.dispose();var de=Oe.getModel();de&&de.dispose(),me.unobserve(_.current)}})},[]),Object($.useEffect)(function(){Q&&Q.setModel({original:h.editor.createModel(j,m),modified:h.editor.createModel(v,m)})},[j,v,m,Q]);var c=z(d),X=z(b),ge={width:c,height:X};return S.a.createElement("div",{className:"my-diff-editor",ref:_,style:ge})}},ZpRC:function(Ge,je,l){"use strict";function G(Y){return typeof Y=="object"&&Y!=null&&Y.nodeType===1}function we(Y,q){return(!q||Y!=="hidden")&&Y!=="visible"&&Y!=="clip"}function re(Y,q){if(Y.clientHeight<Y.scrollHeight||Y.clientWidth<Y.scrollWidth){var oe=getComputedStyle(Y,null);return we(oe.overflowY,q)||we(oe.overflowX,q)||function(z){var M=function(N){if(!N.ownerDocument||!N.ownerDocument.defaultView)return null;try{return N.ownerDocument.defaultView.frameElement}catch(D){return null}}(z);return!!M&&(M.clientHeight<z.scrollHeight||M.clientWidth<z.scrollWidth)}(Y)}return!1}function Se(Y,q,oe,z,M,N,D,K){return N<Y&&D>q||N>Y&&D<q?0:N<=Y&&K<=oe||D>=q&&K>=oe?N-Y-z:D>q&&K<oe||N<Y&&K>oe?D-q+M:0}var xe=function(Y,q){var oe=window,z=q.scrollMode,M=q.block,N=q.inline,D=q.boundary,K=q.skipOverflowHiddenElements,h=typeof D=="function"?D:function(Ne){return Ne!==D};if(!G(Y))throw new TypeError("Invalid target");for(var te=document.scrollingElement||document.documentElement,he=[],Z=Y;G(Z)&&h(Z);){if((Z=Z.parentElement)===te){he.push(Z);break}Z!=null&&Z===document.body&&re(Z)&&!re(document.documentElement)||Z!=null&&re(Z,K)&&he.push(Z)}for(var I=oe.visualViewport?oe.visualViewport.width:innerWidth,d=oe.visualViewport?oe.visualViewport.height:innerHeight,V=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,j=Y.getBoundingClientRect(),v=j.height,m=j.width,L=j.top,P=j.right,_=j.bottom,F=j.left,ue=M==="start"||M==="nearest"?L:M==="end"?_:L+v/2,Q=N==="center"?F+m/2:N==="end"?P:F,ye=[],R=0;R<he.length;R++){var c=he[R],X=c.getBoundingClientRect(),ge=X.height,pe=X.width,Oe=X.top,me=X.right,de=X.bottom,H=X.left;if(z==="if-needed"&&L>=0&&F>=0&&_<=d&&P<=I&&L>=Oe&&_<=de&&F>=H&&P<=me)return ye;var A=getComputedStyle(c),ee=parseInt(A.borderLeftWidth,10),O=parseInt(A.borderTopWidth,10),x=parseInt(A.borderRightWidth,10),ie=parseInt(A.borderBottomWidth,10),Pe=0,Fe=0,be="offsetWidth"in c?c.offsetWidth-c.clientWidth-ee-x:0,Ae="offsetHeight"in c?c.offsetHeight-c.clientHeight-O-ie:0;if(te===c)Pe=M==="start"?ue:M==="end"?ue-d:M==="nearest"?Se(b,b+d,d,O,ie,b+ue,b+ue+v,v):ue-d/2,Fe=N==="start"?Q:N==="center"?Q-I/2:N==="end"?Q-I:Se(V,V+I,I,ee,x,V+Q,V+Q+m,m),Pe=Math.max(0,Pe+b),Fe=Math.max(0,Fe+V);else{Pe=M==="start"?ue-Oe-O:M==="end"?ue-de+ie+Ae:M==="nearest"?Se(Oe,de,ge,O,ie+Ae,ue,ue+v,v):ue-(Oe+ge/2)+Ae/2,Fe=N==="start"?Q-H-ee:N==="center"?Q-(H+pe/2)+be/2:N==="end"?Q-me+x+be:Se(H,me,pe,ee,x+be,Q,Q+m,m);var ve=c.scrollLeft,Ee=c.scrollTop;ue+=Ee-(Pe=Math.max(0,Math.min(Ee+Pe,c.scrollHeight-ge+Ae))),Q+=ve-(Fe=Math.max(0,Math.min(ve+Fe,c.scrollWidth-pe+be)))}ye.push({el:c,top:Pe,left:Fe})}return ye};function fe(Y){return Y===Object(Y)&&Object.keys(Y).length!==0}function $(Y,q){q===void 0&&(q="auto");var oe="scrollBehavior"in document.body.style;Y.forEach(function(z){var M=z.el,N=z.top,D=z.left;M.scroll&&oe?M.scroll({top:N,left:D,behavior:q}):(M.scrollTop=N,M.scrollLeft=D)})}function S(Y){return Y===!1?{block:"end",inline:"nearest"}:fe(Y)?Y:{block:"start",inline:"nearest"}}function y(Y,q){var oe=!Y.ownerDocument.documentElement.contains(Y);if(fe(q)&&typeof q.behavior=="function")return q.behavior(oe?[]:xe(Y,q));if(oe)return;var z=S(q);return $(xe(Y,z),z.behavior)}var W=je.a=y},bT9E:function(Ge,je,l){"use strict";l.d(je,"a",function(){return we});var G=l("VTBJ");function we(re,Se){var xe=Object(G.a)({},re);return Array.isArray(Se)&&Se.forEach(function(fe){delete xe[fe]}),xe}},c5Ni:function(Ge,je,l){},dejd:function(Ge,je,l){},dmUQ:function(Ge,je,l){"use strict";var G=l("Ff2n"),we=l("rePB"),re=l("1OyB"),Se=l("vuIU"),xe=l("Ji7U"),fe=l("md7G"),$=l("foSv"),S=l("cDcd"),y=l.n(S),W=l("TSYQ"),Y=l.n(W),q=l("4IlW");function oe(v,m){var L=Object.keys(v);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(v);m&&(P=P.filter(function(_){return Object.getOwnPropertyDescriptor(v,_).enumerable})),L.push.apply(L,P)}return L}function z(v){for(var m=1;m<arguments.length;m++){var L=arguments[m]!=null?arguments[m]:{};m%2?oe(Object(L),!0).forEach(function(P){Object(we.a)(v,P,L[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(L)):oe(Object(L)).forEach(function(P){Object.defineProperty(v,P,Object.getOwnPropertyDescriptor(L,P))})}return v}function M(v){var m=N();return function(){var P=Object($.a)(v),_;if(m){var F=Object($.a)(this).constructor;_=Reflect.construct(P,arguments,F)}else _=P.apply(this,arguments);return Object(fe.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(v){return!1}}function D(){}function K(v){v.preventDefault()}var h=function(m){return m.replace(/[^\w.-]+/g,"")},te=200,he=600,Z=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,I=function(m){return m!=null},d=function(m,L){return L===m||typeof L=="number"&&typeof m=="number"&&isNaN(L)&&isNaN(m)},V=function(v){Object(xe.a)(L,v);var m=M(L);function L(P){var _;Object(re.a)(this,L),_=m.call(this,P),_.onKeyDown=function(Q){var ye=_.props,R=ye.onKeyDown,c=ye.onPressEnter;if(Q.keyCode===q.a.UP){var X=_.getRatio(Q);_.up(Q,X,null),_.stop()}else if(Q.keyCode===q.a.DOWN){var ge=_.getRatio(Q);_.down(Q,ge,null),_.stop()}else Q.keyCode===q.a.ENTER&&c&&c(Q);if(_.recordCursorPosition(),_.lastKeyCode=Q.keyCode,R){for(var pe=arguments.length,Oe=new Array(pe>1?pe-1:0),me=1;me<pe;me++)Oe[me-1]=arguments[me];R.apply(void 0,[Q].concat(Oe))}},_.onKeyUp=function(Q){var ye=_.props.onKeyUp;if(_.stop(),_.recordCursorPosition(),ye){for(var R=arguments.length,c=new Array(R>1?R-1:0),X=1;X<R;X++)c[X-1]=arguments[X];ye.apply(void 0,[Q].concat(c))}},_.onChange=function(Q){var ye=_.props.onChange;_.state.focused&&(_.inputting=!0),_.rawInput=_.props.parser(_.getValueFromEvent(Q)),_.setState({inputValue:_.rawInput}),ye(_.toNumber(_.rawInput))},_.onMouseUp=function(){var Q=_.props.onMouseUp;_.recordCursorPosition(),Q&&Q.apply(void 0,arguments)},_.onFocus=function(){var Q;_.setState({focused:!0}),(Q=_.props).onFocus.apply(Q,arguments)},_.onBlur=function(){var Q=_.props.onBlur;_.inputting=!1,_.setState({focused:!1});var ye=_.getCurrentValidValue(_.state.inputValue),R=_.setValue(ye,D);if(Q){var c=_.input.value,X=_.getInputDisplayValue({focus:!1,value:R});_.input.value=X&&Number(X),Q.apply(void 0,arguments),_.input.value=c}},_.getRatio=function(Q){var ye=1;return Q.metaKey||Q.ctrlKey?ye=.1:Q.shiftKey&&(ye=10),ye},_.getFullNum=function(Q){return isNaN(Q)?Q:/e/i.test(String(Q))?Number(Q).toFixed(18).replace(/\.?0+$/,""):Q},_.getPrecision=function(Q){if(I(_.props.precision))return _.props.precision;var ye=String(Q);if(ye.indexOf("e-")>=0)return parseInt(ye.slice(ye.indexOf("e-")+2),10);var R=0;return ye.indexOf(".")>=0&&(R=ye.length-ye.indexOf(".")-1),R},_.getInputDisplayValue=function(Q){var ye=Q||_.state,R=ye.focused,c=ye.inputValue,X=ye.value,ge;R?ge=c:ge=_.toPrecisionAsStep(X),ge==null&&(ge="");var pe=_.formatWrapper(ge);return I(_.props.decimalSeparator)&&(pe=pe.toString().replace(".",_.props.decimalSeparator)),pe},_.recordCursorPosition=function(){try{_.cursorStart=_.input.selectionStart,_.cursorEnd=_.input.selectionEnd,_.currentValue=_.input.value,_.cursorBefore=_.input.value.substring(0,_.cursorStart),_.cursorAfter=_.input.value.substring(_.cursorEnd)}catch(Q){}},_.restoreByAfter=function(Q){if(Q===void 0)return!1;var ye=_.input.value,R=ye.lastIndexOf(Q);if(R===-1)return!1;var c=_.cursorBefore.length;return _.lastKeyCode===q.a.DELETE&&_.cursorBefore.charAt(c-1)===Q[0]?(_.fixCaret(c,c),!0):R+Q.length===ye.length?(_.fixCaret(R,R),!0):!1},_.partRestoreByAfter=function(Q){return Q===void 0?!1:Array.prototype.some.call(Q,function(ye,R){var c=Q.substring(R);return _.restoreByAfter(c)})},_.isNotCompleteNumber=function(Q){return isNaN(Q)||Q===""||Q===null||Q&&Q.toString().indexOf(".")===Q.toString().length-1},_.stop=function(){_.autoStepTimer&&clearTimeout(_.autoStepTimer)},_.down=function(Q,ye,R){_.pressingUpOrDown=!0,_.step("down",Q,ye,R)},_.up=function(Q,ye,R){_.pressingUpOrDown=!0,_.step("up",Q,ye,R)},_.saveInput=function(Q){_.input=Q};var F=P.value;F===void 0&&(F=P.defaultValue),_.state={focused:P.autoFocus};var ue=_.getValidValue(_.toNumber(F));return _.state=z(z({},_.state),{},{inputValue:_.toPrecisionAsStep(ue),value:ue}),_}return Object(Se.a)(L,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(_){var F=this.props,ue=F.value,Q=F.onChange,ye=F.max,R=F.min,c=this.state.focused;if(_){if(!d(_.value,ue)||!d(_.max,ye)||!d(_.min,R)){var X=c?ue:this.getValidValue(ue),ge;this.pressingUpOrDown?ge=X:this.inputting?ge=this.rawInput:ge=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:ge})}var pe="value"in this.props?ue:this.state.value;"max"in this.props&&_.max!==ye&&typeof pe=="number"&&pe>ye&&Q&&Q(ye),"min"in this.props&&_.min!==R&&typeof pe=="number"&&pe<R&&Q&&Q(R)}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(me){}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 F=_;return F===""?F="":this.isNotCompleteNumber(parseFloat(F))?F=this.state.value:F=this.getValidValue(F),this.toNumber(F)}},{key:"getValueFromEvent",value:function(_){var F=_.target.value.trim().replace(/。/g,".");return I(this.props.decimalSeparator)&&(F=F.replace(this.props.decimalSeparator,".")),F}},{key:"getValidValue",value:function(_){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,Q=parseFloat(_);return isNaN(Q)?_:(Q<F&&(Q=F),Q>ue&&(Q=ue),Q)}},{key:"setValue",value:function(_,F){var ue=this.props.precision,Q=this.isNotCompleteNumber(parseFloat(_))?null:parseFloat(_),ye=this.state.value,R=ye===void 0?null:ye,c=this.state.inputValue,X=c===void 0?null:c,ge=typeof Q=="number"?Q.toFixed(ue):"".concat(Q),pe=Q!==R||ge!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},F)):this.setState({value:Q,inputValue:this.toPrecisionAsStep(_)},F),pe&&this.props.onChange(Q),Q}},{key:"getMaxPrecision",value:function(_){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ue=this.props,Q=ue.precision,ye=ue.step;if(I(Q))return Q;var R=this.getPrecision(F),c=this.getPrecision(ye),X=this.getPrecision(_);return _?Math.max(X,R+c):R+c}},{key:"getPrecisionFactor",value:function(_){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ue=this.getMaxPrecision(_,F);return Math.pow(10,ue)}},{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 F=Math.abs(this.getMaxPrecision(_));return isNaN(F)?_.toString():Number(_).toFixed(F)}},{key:"toNumber",value:function(_){var F=this.props.precision,ue=this.state.focused,Q=_&&_.length>16&&ue;return this.isNotCompleteNumber(_)||Q?_:I(F)?Math.round(_*Math.pow(10,F))/Math.pow(10,F):Number(_)}},{key:"upStep",value:function(_,F){var ue=this.props.step,Q=this.getPrecisionFactor(_,F),ye=Math.abs(this.getMaxPrecision(_,F)),R=((Q*_+Q*ue*F)/Q).toFixed(ye);return this.toNumber(R)}},{key:"downStep",value:function(_,F){var ue=this.props.step,Q=this.getPrecisionFactor(_,F),ye=Math.abs(this.getMaxPrecision(_,F)),R=((Q*_-Q*ue*F)/Q).toFixed(ye);return this.toNumber(R)}},{key:"step",value:function(_,F){var ue=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ye=arguments.length>3?arguments[3]:void 0;this.stop(),F&&(F.persist(),F.preventDefault());var R=this.props;if(R.disabled)return;var c=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(c))return;var X=this["".concat(_,"Step")](c,Q),ge=X>R.max||X<R.min;if(X>R.max?X=R.max:X<R.min&&(X=R.min),this.setValue(X,null),this.setState({focused:!0},function(){ue.pressingUpOrDown=!1}),ge)return;this.autoStepTimer=setTimeout(function(){ue[_](F,Q,!0)},ye?te:he)}},{key:"fixCaret",value:function(_,F){if(_===void 0||F===void 0||!this.input||!this.input.value)return;try{var ue=this.input.selectionStart,Q=this.input.selectionEnd;(_!==ue||F!==Q)&&this.input.setSelectionRange(_,F)}catch(ye){}}},{key:"render",value:function(){var _,F=this.props,ue=F.prefixCls,Q=F.disabled,ye=F.readOnly,R=F.useTouch,c=F.autoComplete,X=F.upHandler,ge=F.downHandler,pe=F.className,Oe=F.max,me=F.min,de=F.style,H=F.title,A=F.onMouseEnter,ee=F.onMouseLeave,O=F.onMouseOver,x=F.onMouseOut,ie=F.required,Pe=F.onClick,Fe=F.tabIndex,be=F.type,Ae=F.placeholder,ve=F.id,Ee=F.inputMode,Ne=F.pattern,Be=F.step,Je=F.maxLength,Me=F.autoFocus,Ce=F.name,lt=F.onPaste,at=F.onInput,pt=Object(G.a)(F,["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"]),et=this.state,_t=et.value,vt=et.focused,ht=Y()(ue,(_={},Object(we.a)(_,pe,!!pe),Object(we.a)(_,"".concat(ue,"-disabled"),Q),Object(we.a)(_,"".concat(ue,"-focused"),vt),_)),Re={};Object.keys(pt).forEach(function(C){(C.substr(0,5)==="data-"||C.substr(0,5)==="aria-"||C==="role")&&(Re[C]=pt[C])});var wt=!ye&&!Q,mt=this.getInputDisplayValue(null),ke=(_t||_t===0)&&(isNaN(_t)||Number(_t)>=Oe),Ue=(_t||_t===0)&&(isNaN(_t)||Number(_t)<=me),E=ke||Q||ye,T=Ue||Q||ye,k=Y()("".concat(ue,"-handler"),"".concat(ue,"-handler-up"),Object(we.a)({},"".concat(ue,"-handler-up-disabled"),E)),p=Y()("".concat(ue,"-handler"),"".concat(ue,"-handler-down"),Object(we.a)({},"".concat(ue,"-handler-down-disabled"),T)),g=R?{onTouchStart:E?D:this.up,onTouchEnd:this.stop}:{onMouseDown:E?D:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},w=R?{onTouchStart:T?D:this.down,onTouchEnd:this.stop}:{onMouseDown:T?D:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return y.a.createElement("div",{className:ht,style:de,title:H,onMouseEnter:A,onMouseLeave:ee,onMouseOver:O,onMouseOut:x,onFocus:function(){return null},onBlur:function(){return null}},y.a.createElement("div",{className:"".concat(ue,"-handler-wrap")},y.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Increase Value","aria-disabled":E,className:k}),X||y.a.createElement("span",{unselectable:"on",className:"".concat(ue,"-handler-up-inner"),onClick:K})),y.a.createElement("span",Object.assign({unselectable:"on"},w,{role:"button","aria-label":"Decrease Value","aria-disabled":T,className:p}),ge||y.a.createElement("span",{unselectable:"on",className:"".concat(ue,"-handler-down-inner"),onClick:K}))),y.a.createElement("div",{className:"".concat(ue,"-input-wrap")},y.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":me,"aria-valuemax":Oe,"aria-valuenow":_t,required:ie,type:be,placeholder:Ae,onPaste:lt,onClick:Pe,onMouseUp:this.onMouseUp,className:"".concat(ue,"-input"),tabIndex:Fe,autoComplete:c,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:wt?this.onKeyDown:D,onKeyUp:wt?this.onKeyUp:D,autoFocus:Me,maxLength:Je,readOnly:ye,disabled:Q,max:Oe,min:me,step:Be,name:Ce,title:H,id:ve,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(mt),pattern:Ne,inputMode:Ee,onInput:at},Re))))}}]),L}(y.a.Component);V.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Z,min:-Z,step:1,style:{},onChange:D,onKeyDown:D,onPressEnter:D,onFocus:D,onBlur:D,parser:h,required:!1,autoComplete:"off"};var b=V,j=je.a=b},"e+RI":function(Ge,je,l){Ge.exports={btn:"btn___35XHi",s1:"s1___yzdGB",s2:"s2___3kxXm",btnDisabled:"btnDisabled___lI9pA",btn2:"btn2___2KLJQ"}},"eS0+":function(Ge,je,l){"use strict";var G=l("giR+"),we=l("fyUT"),re=l("tJVT"),Se=l("PpiC"),xe=l("OaEy"),fe=l("2fM7"),$=l("cDcd"),S=l.n($),y=l("2sxD"),W=l.n(y),Y=l("51dB"),q=l.n(Y),oe=l("5MlY"),z=l.n(oe),M=l("lnNo"),N=l.n(M),D=l("YBdh"),K=l.n(D),h=l("LvDl"),te=l.n(h),he=l("TSYQ"),Z=l.n(he),I=fe.a.Option,d=function(v){var m=parseInt(v);return Object(h.isNaN)(m)?0:m},V=function(v){var m,L,P=v.index,_=v.value,F=_===void 0?[]:_,ue=v.onChange,Q=v.type,ye=v.disabled,R=ye===void 0?!1:ye,c=v.expansion,X=c===void 0?!0:c,ge=Object(Se.a)(v,["index","value","onChange","type","disabled","expansion"]),pe=Object($.useState)(!0),Oe=Object(re.a)(pe,2),me=Oe[0],de=Oe[1],H=function(ee,O){var x=Object(h.cloneDeep)(F);x.difficulties[O].num=ee,console.log(x,444),ue(x)};return S.a.createElement("div",{className:W.a.ListGroup,style:{borderWidth:P?1:0}},S.a.createElement("div",{className:W.a.a},P+1),S.a.createElement("div",{"data-type":"width",className:W.a.b},F==null?void 0:F.name),S.a.createElement("div",{className:W.a.c},F==null||((m=F.difficulties)===null||m===void 0)?void 0:m.map(function(A,ee){return S.a.createElement("div",{key:ee,style:{display:me?"flex":ee?"none":"flex"},className:W.a.c1},S.a.createElement("span",{style:{color:"#777777",marginRight:5}},"\u96BE\u5EA6"),A.difficulty===1&&S.a.createElement("span",{className:W.a.radio},"\u7B80\u5355"),A.difficulty===2&&S.a.createElement("span",{className:W.a.radio},"\u9002\u4E2D"),A.difficulty===3&&S.a.createElement("span",{className:W.a.radio},"\u56F0\u96BE"),S.a.createElement("span",{style:{color:"#777777",marginRight:5,marginLeft:50}},"\u62BD\u9898\u6570\u91CF"),P===0&&ee===0?S.a.createElement("div",{id:"".concat(Q,"_sum")},S.a.createElement(we.a,{disabled:R,parser:d,onChange:function(x){return H(x,ee)},min:0,max:A==null?void 0:A.count,value:(A==null?void 0:A.num)||0,style:{width:66}}),S.a.createElement("span",{style:{display:"none"}},"\u8BF7\u8F93\u5165\u6570\u91CF")):S.a.createElement(we.a,{disabled:R,parser:d,onChange:function(x){return H(x,ee)},min:0,max:A==null?void 0:A.count,value:(A==null?void 0:A.num)||0,style:{width:66}}),S.a.createElement("span",{style:{marginLeft:5}},"/",A==null?void 0:A.count))})),S.a.createElement("div",{style:{display:(F==null||((L=F.difficulties)===null||L===void 0)?void 0:L.length)===1||!X?"none":"block"},onClick:function(){return de(!me)},className:W.a.d},me?"\u6536\u8D77":"\u5C55\u5F00",S.a.createElement("img",{style:{marginTop:-2,transform:me?"rotate(0deg)":"rotate(180deg)"},src:N.a,className:"ml5"})))},b=function(v){var m,L,P=v.value,_=P===void 0?[]:P,F=v.onChange,ue=v.listClassName,Q=v.disabled,ye=Q===void 0?!1:Q,R=v.expansion,c=R===void 0?!0:R,X=Object(Se.a)(v,["value","onChange","listClassName","disabled","expansion"]),ge=Object($.useState)(!0),pe=Object(re.a)(ge,2),Oe=pe[0],me=pe[1],de=function(x){var ie,Pe=x.score||0,Fe=[];x==null||((ie=x.item_banks)===null||ie===void 0)||ie.forEach(function(Ae){var ve;Ae==null||((ve=Ae.tag_disciplines)===null||ve===void 0)||ve.forEach(function(Ee){var Ne;Ee==null||((Ne=Ee.difficulties)===null||Ne===void 0)||Ne.forEach(function(Be){Be.num&&Fe.push(Be.num)})})});var be=Fe.reduce(function(Ae,ve){return Ae+ve},0);return be*Pe},H=[{type:"SINGLE",name:"\u5355\u9009\u9898"},{type:"MULTIPLE",name:"\u591A\u9009\u9898"},{type:"COMPLETION",name:"\u586B\u7A7A\u9898"},{type:"JUDGMENT",name:"\u5224\u65AD\u9898"},{type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},{type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},{type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},{type:"COMBINATION",name:"\u7EC4\u5408\u9898"}],A=function(x,ie,Pe){var Fe=Object(h.cloneDeep)(_);Fe.item_banks[ie].tag_disciplines[Pe]=x;var be=de(Fe);Fe.scoreTotal=be,console.log(Fe,"newValue"),F(Fe)},ee=function(x){var ie=Object(h.cloneDeep)(_);ie.score=x;var Pe=de(ie);ie.scoreTotal=Pe,F(ie)};return S.a.createElement("div",{className:Z()(W.a.list,ue)},S.a.createElement("div",{className:W.a.head},S.a.createElement("div",{className:W.a.name},S.a.createElement("b",null),S.a.createElement("span",null,(m=H.find(function(O){return O.type===(_==null?void 0:_.item_type)}))===null||m===void 0?void 0:m.name)),S.a.createElement("div",{className:W.a.right},c&&S.a.createElement("div",{onClick:function(){return me(!Oe)},className:"current c-light-primary mb10"},Oe?"\u6536\u8D77":"\u5C55\u5F00",S.a.createElement("img",{style:{marginTop:-2,transform:Oe?"rotate(0deg)":"rotate(180deg)"},src:N.a,className:"ml5"})),S.a.createElement("div",null,S.a.createElement("img",{src:q.a}),S.a.createElement("span",{className:"ml10 mr20"},"\u603B\u5206",_.scoreTotal,"\u5206"),S.a.createElement("img",{className:"mr10",src:z.a}),S.a.createElement("span",null,(_==null?void 0:_.item_type)==="COMBINATION"?"\u6BCF\u5C0F\u9898":"\u6BCF\u9898"),S.a.createElement("div",{id:"".concat(_==null?void 0:_.item_type,"_score")},S.a.createElement(we.a,{disabled:ye,parser:d,min:0,onChange:ee,value:_.score,style:{margin:"0 5px"}}),S.a.createElement("span",{style:{display:"none"}},"\u8BF7\u8F93\u5165\u6BCF\u9898\u5206\u6570")),S.a.createElement("span",null,"\u5206")))),S.a.createElement("div",{className:W.a.body,style:{display:Oe?"block":"none"}},_==null||((L=_.item_banks)===null||L===void 0)?void 0:L.map(function(O,x){var ie;return S.a.createElement(S.a.Fragment,{key:x},S.a.createElement("div",{className:W.a.top},S.a.createElement("img",{src:K.a}),S.a.createElement("span",null,"\u65B9\u5411/\u8BFE\u7A0B"),S.a.createElement("b",null),S.a.createElement("aside",null,O==null?void 0:O.disciplines,"/",O==null?void 0:O.sub_discipline)),S.a.createElement("div",{className:W.a.bottom},S.a.createElement("div",{className:W.a.l},"\u77E5\u8BC6\u70B9"),S.a.createElement("div",{className:W.a.r},O==null||((ie=O.tag_disciplines)===null||ie===void 0)?void 0:ie.map(function(Pe,Fe){return S.a.createElement(V,{expansion:c,disabled:ye,type:_==null?void 0:_.item_type,key:"".concat(x,"-").concat(Fe),value:Pe,index:Fe,onChange:function(Ae){return A(Ae,x,Fe)}})}))))})))};je.a=b},exQ7:function(Ge,je,l){Ge.exports=l.p+"static/te.6f9c0684.svg"},fAei:function(Ge,je,l){"use strict";l.d(je,"a",function(){return te.a});var G=l("rePB"),we=l("VTBJ"),re=l("KQm4"),Se=l("1OyB"),xe=l("vuIU"),fe=l("Ji7U"),$=l("LK+K"),S=l("cDcd"),y=l("4IlW"),W=l("Kwbf"),Y=l("TSYQ"),q=l.n(Y),oe=l("sboe"),z=l("OZM5"),M=l("815F"),N=l("ODXe"),D=l("Ff2n"),K=l("+nKL"),h=l("8XRh"),te=l("WaYH"),he=function(me,de){var H=me.className,A=me.style,ee=me.motion,O=me.motionNodes,x=me.motionType,ie=me.onMotionStart,Pe=me.onMotionEnd,Fe=me.active,be=me.treeNodeRequiredProps,Ae=Object(D.a)(me,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),ve=S.useState(!0),Ee=Object(N.a)(ve,2),Ne=Ee[0],Be=Ee[1],Je=S.useContext(oe.a),Me=Je.prefixCls,Ce=S.useRef(!1),lt=function(){Ce.current||Pe(),Ce.current=!0};return Object(S.useEffect)(function(){O&&x==="hide"&&Ne&&Be(!1)},[O]),Object(S.useEffect)(function(){return O&&ie(),function(){O&&lt()}},[]),O?S.createElement(h.default,Object.assign({ref:de,visible:Ne},ee,{motionAppear:x==="show",onAppearEnd:lt,onLeaveEnd:lt}),function(at,pt){var et=at.className,_t=at.style;return S.createElement("div",{ref:pt,className:q()("".concat(Me,"-treenode-motion"),et),style:_t},O.map(function(vt){var ht=vt.data,Re=ht.key,wt=Object(D.a)(ht,["key"]),mt=vt.isStart,ke=vt.isEnd;delete wt.children;var Ue=Object(M.f)(Re,be);return S.createElement(te.a,Object.assign({},wt,Ue,{active:Fe,data:vt.data,key:Re,isStart:mt,isEnd:ke}))}))}):S.createElement(te.a,Object.assign({domRef:de,className:H,style:A},Ae,{active:Fe}))};he.displayName="MotionTreeNode";var Z=S.forwardRef(he),I=Z;function d(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],de=Oe.length,H=me.length;if(Math.abs(de-H)!==1)return{add:!1,key:null};function A(ee,O){var x=new Map;ee.forEach(function(Pe){x.set(Pe,!0)});var ie=O.filter(function(Pe){return!x.has(Pe)});return ie.length===1?ie[0]:null}return de<H?{add:!0,key:A(Oe,me)}:{add:!1,key:A(me,Oe)}}function V(Oe,me,de){var H=Oe.findIndex(function(x){var ie=x.data;return ie.key===de}),A=Oe[H+1],ee=me.findIndex(function(x){var ie=x.data;return ie.key===de});if(A){var O=me.findIndex(function(x){var ie=x.data;return ie.key===A.data.key});return me.slice(ee+1,O)}return me.slice(ee+1)}var b={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},j=function(){},v="RC_TREE_MOTION_".concat(Math.random()),m={key:v},L={key:v,level:0,index:0,pos:"0",node:m},P={parent:null,children:[],pos:L.pos,data:m,isStart:[],isEnd:[]};function _(Oe,me,de,H){return me===!1||!de?Oe:Oe.slice(0,Math.ceil(de/H)+1)}function F(Oe){var me=Oe.data.key,de=Oe.pos;return Object(M.e)(me,de)}function ue(Oe){for(var me=String(Oe.data.key),de=Oe;de.parent;)de=de.parent,me="".concat(de.data.key," > ").concat(me);return me}var Q=function(me,de){var H=me.prefixCls,A=me.data,ee=me.selectable,O=me.checkable,x=me.expandedKeys,ie=me.selectedKeys,Pe=me.checkedKeys,Fe=me.loadedKeys,be=me.loadingKeys,Ae=me.halfCheckedKeys,ve=me.keyEntities,Ee=me.disabled,Ne=me.dragging,Be=me.dragOverNodeKey,Je=me.dropPosition,Me=me.motion,Ce=me.height,lt=me.itemHeight,at=me.virtual,pt=me.focusable,et=me.activeItem,_t=me.focused,vt=me.tabIndex,ht=me.onKeyDown,Re=me.onFocus,wt=me.onBlur,mt=me.onActiveChange,ke=me.onListChangeStart,Ue=me.onListChangeEnd,E=Object(D.a)(me,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),T=S.useRef(null);S.useImperativeHandle(de,function(){return{scrollTo:function(ft){T.current.scrollTo(ft)}}});var k=S.useState(x),p=Object(N.a)(k,2),g=p[0],w=p[1],C=S.useState(A),J=Object(N.a)(C,2),ae=J[0],se=J[1],rt=S.useState(A),ze=Object(N.a)(rt,2),Te=ze[0],Ot=ze[1],kt=S.useState([]),it=Object(N.a)(kt,2),Kt=it[0],He=it[1],zt=S.useState(null),Ut=Object(N.a)(zt,2),gt=Ut[0],Ft=Ut[1];function Pt(){se(A),Ot(A),He([]),Ft(null),Ue()}S.useEffect(function(){w(x);var Xe=d(g,x);if(Xe.key!==null)if(Xe.add){var ft=ae.findIndex(function(Yt){var yt=Yt.data.key;return yt===Xe.key}),Tt=_(V(ae,A,Xe.key),at,Ce,lt),Dt=ae.slice();Dt.splice(ft+1,0,P),Ot(Dt),He(Tt),Ft("show")}else{var Zt=A.findIndex(function(Yt){var yt=Yt.data.key;return yt===Xe.key}),Bt=_(V(A,ae,Xe.key),at,Ce,lt),ut=A.slice();ut.splice(Zt+1,0,P),Ot(ut),He(Bt),Ft("hide")}else ae!==A&&(se(A),Ot(A))},[x,A]),S.useEffect(function(){Ne||Pt()},[Ne]);var ot=Me?Te:A,Qe={expandedKeys:x,selectedKeys:ie,loadedKeys:Fe,loadingKeys:be,checkedKeys:Pe,halfCheckedKeys:Ae,dragOverNodeKey:Be,dropPosition:Je,keyEntities:ve};return S.createElement(S.Fragment,null,_t&&et&&S.createElement("span",{style:b,"aria-live":"assertive"},ue(et)),S.createElement("div",{role:"tree"},S.createElement("input",{style:b,disabled:pt===!1||Ee,tabIndex:pt!==!1?vt:null,onKeyDown:ht,onFocus:Re,onBlur:wt,value:"",onChange:j})),S.createElement(K.a,Object.assign({},E,{data:ot,itemKey:F,height:Ce,fullHeight:!1,virtual:at,itemHeight:lt,prefixCls:"".concat(H,"-list"),ref:T}),function(Xe){var ft=Xe.pos,Tt=Xe.data,Dt=Tt.key,Zt=Object(D.a)(Tt,["key"]),Bt=Xe.isStart,ut=Xe.isEnd,Yt=Object(M.e)(Dt,ft);delete Zt.children;var yt=Object(M.f)(Yt,Qe);return S.createElement(I,Object.assign({},Zt,yt,{active:et&&Dt===et.data.key,pos:ft,data:Xe.data,isStart:Bt,isEnd:ut,motion:Me,motionNodes:Dt===v?Kt:null,motionType:gt,onMotionStart:ke,onMotionEnd:Pt,treeNodeRequiredProps:Qe,onMouseMove:function(){mt(null)}}))}))},ye=S.forwardRef(Q);ye.displayName="NodeList";var R=ye,c=l("NvD2"),X=function(Oe){Object(fe.a)(de,Oe);var me=Object($.a)(de);function de(){var H;return Object(Se.a)(this,de),H=me.apply(this,arguments),H.destroyed=!1,H.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},H.listRef=S.createRef(),H.onNodeDragStart=function(A,ee){var O=H.state,x=O.expandedKeys,ie=O.keyEntities,Pe=H.props.onDragStart,Fe=ee.props.eventKey;H.dragNode=ee;var be=Object(z.b)(x,Fe);H.setState({dragging:!0,dragNodesKeys:Object(z.g)(Fe,ie)}),H.setExpandedKeys(be),Pe&&Pe({event:A,node:Object(M.b)(ee.props)})},H.onNodeDragEnter=function(A,ee){var O=H.state,x=O.expandedKeys,ie=O.keyEntities,Pe=O.dragNodesKeys,Fe=H.props.onDragEnter,be=ee.props,Ae=be.pos,ve=be.eventKey;if(!H.dragNode||Pe.indexOf(ve)!==-1)return;var Ee=Object(z.c)(A,ee);if(H.dragNode.props.eventKey===ve&&Ee===0){H.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){H.setState({dragOverNodeKey:ve,dropPosition:Ee}),H.delayedDragEnterLogic||(H.delayedDragEnterLogic={}),Object.keys(H.delayedDragEnterLogic).forEach(function(Ne){clearTimeout(H.delayedDragEnterLogic[Ne])}),H.delayedDragEnterLogic[Ae]=window.setTimeout(function(){if(!H.state.dragging)return;var Ne=Object(re.a)(x),Be=ie[ve];Be&&(Be.children||[]).length&&(Ne=Object(z.a)(x,ve)),"expandedKeys"in H.props||H.setExpandedKeys(Ne),Fe&&Fe({event:A,node:Object(M.b)(ee.props),expandedKeys:Ne})},400)},0)},H.onNodeDragOver=function(A,ee){var O=H.state.dragNodesKeys,x=H.props.onDragOver,ie=ee.props.eventKey;if(O.indexOf(ie)!==-1)return;if(H.dragNode&&ie===H.state.dragOverNodeKey){var Pe=Object(z.c)(A,ee);if(Pe===H.state.dropPosition)return;H.setState({dropPosition:Pe})}x&&x({event:A,node:Object(M.b)(ee.props)})},H.onNodeDragLeave=function(A,ee){var O=H.props.onDragLeave;H.setState({dragOverNodeKey:""}),O&&O({event:A,node:Object(M.b)(ee.props)})},H.onNodeDragEnd=function(A,ee){var O=H.props.onDragEnd;H.setState({dragOverNodeKey:""}),H.cleanDragState(),O&&O({event:A,node:Object(M.b)(ee.props)}),H.dragNode=null},H.onNodeDrop=function(A,ee){var O=H.state,x=O.dragNodesKeys,ie=x===void 0?[]:x,Pe=O.dropPosition,Fe=H.props.onDrop,be=ee.props,Ae=be.eventKey,ve=be.pos;if(H.setState({dragOverNodeKey:""}),H.cleanDragState(),ie.indexOf(Ae)!==-1){Object(W.a)(!1,"Can not drop to dragNode(include it's children node)");return}var Ee=Object(z.k)(ve),Ne={event:A,node:Object(M.b)(ee.props),dragNode:H.dragNode?Object(M.b)(H.dragNode.props):null,dragNodesKeys:ie.slice(),dropPosition:Pe+Number(Ee[Ee.length-1]),dropToGap:!1};Pe!==0&&(Ne.dropToGap=!0),Fe&&Fe(Ne),H.dragNode=null},H.cleanDragState=function(){var A=H.state.dragging;A&&H.setState({dragging:!1})},H.onNodeClick=function(A,ee){var O=H.props.onClick;O&&O(A,ee)},H.onNodeDoubleClick=function(A,ee){var O=H.props.onDoubleClick;O&&O(A,ee)},H.onNodeSelect=function(A,ee){var O=H.state.selectedKeys,x=H.state.keyEntities,ie=H.props,Pe=ie.onSelect,Fe=ie.multiple,be=ee.selected,Ae=ee.key,ve=!be;ve?Fe?O=Object(z.a)(O,Ae):O=[Ae]:O=Object(z.b)(O,Ae);var Ee=O.map(function(Ne){var Be=x[Ne];return Be?Be.node:null}).filter(function(Ne){return Ne});H.setUncontrolledState({selectedKeys:O}),Pe&&Pe(O,{event:"select",selected:ve,node:ee,selectedNodes:Ee,nativeEvent:A.nativeEvent})},H.onNodeCheck=function(A,ee,O){var x=H.state,ie=x.keyEntities,Pe=x.checkedKeys,Fe=x.halfCheckedKeys,be=H.props,Ae=be.checkStrictly,ve=be.onCheck,Ee=ee.key,Ne,Be={event:"check",node:ee,checked:O,nativeEvent:A.nativeEvent};if(Ae){var Je=O?Object(z.a)(Pe,Ee):Object(z.b)(Pe,Ee),Me=Object(z.b)(Fe,Ee);Ne={checked:Je,halfChecked:Me},Be.checkedNodes=Je.map(function(_t){return ie[_t]}).filter(function(_t){return _t}).map(function(_t){return _t.node}),H.setUncontrolledState({checkedKeys:Je})}else{var Ce=Object(c.a)([].concat(Object(re.a)(Pe),[Ee]),!0,ie),lt=Ce.checkedKeys,at=Ce.halfCheckedKeys;if(!O){var pt=new Set(lt);pt.delete(Ee);var et=Object(c.a)(Array.from(pt),{checked:!1,halfCheckedKeys:at},ie);lt=et.checkedKeys,at=et.halfCheckedKeys}Ne=lt,Be.checkedNodes=[],Be.checkedNodesPositions=[],Be.halfCheckedKeys=at,lt.forEach(function(_t){var vt=ie[_t];if(!vt)return;var ht=vt.node,Re=vt.pos;Be.checkedNodes.push(ht),Be.checkedNodesPositions.push({node:ht,pos:Re})}),H.setUncontrolledState({checkedKeys:lt},!1,{halfCheckedKeys:at})}ve&&ve(Ne,Be)},H.onNodeLoad=function(A){return new Promise(function(ee){H.setState(function(O){var x=O.loadedKeys,ie=x===void 0?[]:x,Pe=O.loadingKeys,Fe=Pe===void 0?[]:Pe,be=H.props,Ae=be.loadData,ve=be.onLoad,Ee=A.key;if(!Ae||ie.indexOf(Ee)!==-1||Fe.indexOf(Ee)!==-1)return{};var Ne=Ae(A);return Ne.then(function(){var Be=H.state,Je=Be.loadedKeys,Me=Be.loadingKeys,Ce=Object(z.a)(Je,Ee),lt=Object(z.b)(Me,Ee);ve&&ve(Ce,{event:"load",node:A}),H.setUncontrolledState({loadedKeys:Ce}),H.setState({loadingKeys:lt}),ee()}),{loadingKeys:Object(z.a)(Fe,Ee)}})})},H.onNodeMouseEnter=function(A,ee){var O=H.props.onMouseEnter;O&&O({event:A,node:ee})},H.onNodeMouseLeave=function(A,ee){var O=H.props.onMouseLeave;O&&O({event:A,node:ee})},H.onNodeContextMenu=function(A,ee){var O=H.props.onRightClick;O&&(A.preventDefault(),O({event:A,node:ee}))},H.onFocus=function(){var A=H.props.onFocus;H.setState({focused:!0}),A&&A.apply(void 0,arguments)},H.onBlur=function(){var A=H.props.onBlur;H.setState({focused:!1}),H.onActiveChange(null),A&&A.apply(void 0,arguments)},H.getTreeNodeRequiredProps=function(){var A=H.state,ee=A.expandedKeys,O=A.selectedKeys,x=A.loadedKeys,ie=A.loadingKeys,Pe=A.checkedKeys,Fe=A.halfCheckedKeys,be=A.dragOverNodeKey,Ae=A.dropPosition,ve=A.keyEntities;return{expandedKeys:ee||[],selectedKeys:O||[],loadedKeys:x||[],loadingKeys:ie||[],checkedKeys:Pe||[],halfCheckedKeys:Fe||[],dragOverNodeKey:be,dropPosition:Ae,keyEntities:ve}},H.setExpandedKeys=function(A){var ee=H.state.treeData,O=Object(M.d)(ee,A);H.setUncontrolledState({expandedKeys:A,flattenNodes:O},!0)},H.onNodeExpand=function(A,ee){var O=H.state.expandedKeys,x=H.state.listChanging,ie=H.props,Pe=ie.onExpand,Fe=ie.loadData,be=ee.key,Ae=ee.expanded;if(x)return;var ve=O.indexOf(be),Ee=!Ae;if(Object(W.a)(Ae&&ve!==-1||!Ae&&ve===-1,"Expand state not sync with index check"),Ee?O=Object(z.a)(O,be):O=Object(z.b)(O,be),H.setExpandedKeys(O),Pe&&Pe(O,{node:ee,expanded:Ee,nativeEvent:A.nativeEvent}),Ee&&Fe){var Ne=H.onNodeLoad(ee);Ne&&Ne.then(function(){var Be=Object(M.d)(H.state.treeData,O);H.setUncontrolledState({flattenNodes:Be})})}},H.onListChangeStart=function(){H.setUncontrolledState({listChanging:!0})},H.onListChangeEnd=function(){setTimeout(function(){H.setUncontrolledState({listChanging:!1})})},H.onActiveChange=function(A){var ee=H.state.activeKey,O=H.props.onActiveChange;if(ee===A)return;H.setState({activeKey:A}),A!==null&&H.scrollTo({key:A}),O&&O(A)},H.getActiveItem=function(){var A=H.state,ee=A.activeKey,O=A.flattenNodes;return ee===null?null:O.find(function(x){var ie=x.data.key;return ie===ee})||null},H.offsetActiveKey=function(A){var ee=H.state,O=ee.flattenNodes,x=ee.activeKey,ie=O.findIndex(function(be){var Ae=be.data.key;return Ae===x});ie===-1&&A<0&&(ie=O.length),ie=(ie+A+O.length)%O.length;var Pe=O[ie];if(Pe){var Fe=Pe.data.key;H.onActiveChange(Fe)}else H.onActiveChange(null)},H.onKeyDown=function(A){var ee=H.state,O=ee.activeKey,x=ee.expandedKeys,ie=ee.checkedKeys,Pe=H.props,Fe=Pe.onKeyDown,be=Pe.checkable,Ae=Pe.selectable;switch(A.which){case y.a.UP:{H.offsetActiveKey(-1),A.preventDefault();break}case y.a.DOWN:{H.offsetActiveKey(1),A.preventDefault();break}}var ve=H.getActiveItem();if(ve&&ve.data){var Ee=H.getTreeNodeRequiredProps(),Ne=ve.data.isLeaf===!1||!!(ve.data.children||[]).length,Be=Object(M.b)(Object(we.a)(Object(we.a)({},Object(M.f)(O,Ee)),{},{data:ve.data,active:!0}));switch(A.which){case y.a.LEFT:{Ne&&x.includes(O)?H.onNodeExpand({},Be):ve.parent&&H.onActiveChange(ve.parent.data.key),A.preventDefault();break}case y.a.RIGHT:{Ne&&!x.includes(O)?H.onNodeExpand({},Be):ve.children&&ve.children.length&&H.onActiveChange(ve.children[0].data.key),A.preventDefault();break}case y.a.ENTER:case y.a.SPACE:{be&&!Be.disabled&&Be.checkable!==!1&&!Be.disableCheckbox?H.onNodeCheck({},Be,!ie.includes(O)):!be&&Ae&&!Be.disabled&&Be.selectable!==!1&&H.onNodeSelect({},Be);break}}}Fe&&Fe(A)},H.setUncontrolledState=function(A){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(H.destroyed)return;var x=!1,ie=!0,Pe={};Object.keys(A).forEach(function(Fe){if(Fe in H.props){ie=!1;return}x=!0,Pe[Fe]=A[Fe]}),x&&(!ee||ie)&&H.setState(Object(we.a)(Object(we.a)({},Pe),O))},H.scrollTo=function(A){H.listRef.current.scrollTo(A)},H}return Object(xe.a)(de,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var A,ee=this.state,O=ee.focused,x=ee.flattenNodes,ie=ee.keyEntities,Pe=ee.dragging,Fe=ee.activeKey,be=this.props,Ae=be.prefixCls,ve=be.className,Ee=be.style,Ne=be.showLine,Be=be.focusable,Je=be.tabIndex,Me=Je===void 0?0:Je,Ce=be.selectable,lt=be.showIcon,at=be.icon,pt=be.switcherIcon,et=be.draggable,_t=be.checkable,vt=be.checkStrictly,ht=be.disabled,Re=be.motion,wt=be.loadData,mt=be.filterTreeNode,ke=be.height,Ue=be.itemHeight,E=be.virtual,T=be.titleRender,k=be.onContextMenu,p=Object(z.f)(this.props);return S.createElement(oe.a.Provider,{value:{prefixCls:Ae,selectable:Ce,showIcon:lt,icon:at,switcherIcon:pt,draggable:et,checkable:_t,checkStrictly:vt,disabled:ht,keyEntities:ie,loadData:wt,filterTreeNode:mt,titleRender:T,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},S.createElement("div",{className:q()(Ae,ve,(A={},Object(G.a)(A,"".concat(Ae,"-show-line"),Ne),Object(G.a)(A,"".concat(Ae,"-focused"),O),Object(G.a)(A,"".concat(Ae,"-active-focused"),Fe!==null),A))},S.createElement(R,Object.assign({ref:this.listRef,prefixCls:Ae,style:Ee,data:x,disabled:ht,selectable:Ce,checkable:!!_t,motion:Re,dragging:Pe,height:ke,itemHeight:Ue,virtual:E,focusable:Be,focused:O,tabIndex:Me,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:k},this.getTreeNodeRequiredProps(),p))))}}],[{key:"getDerivedStateFromProps",value:function(A,ee){var O=ee.prevProps,x={prevProps:A};function ie(at){return!O&&at in A||O&&O[at]!==A[at]}var Pe;if(ie("treeData")?Pe=A.treeData:ie("children")&&(Object(W.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Pe=Object(M.c)(A.children)),Pe){x.treeData=Pe;var Fe=Object(M.a)(Pe);x.keyEntities=Object(we.a)(Object(G.a)({},v,L),Fe.keyEntities)}var be=x.keyEntities||ee.keyEntities;if(ie("expandedKeys")||O&&ie("autoExpandParent"))x.expandedKeys=A.autoExpandParent||!O&&A.defaultExpandParent?Object(z.e)(A.expandedKeys,be):A.expandedKeys;else if(!O&&A.defaultExpandAll){var Ae=Object(we.a)({},be);delete Ae[v],x.expandedKeys=Object.keys(Ae).map(function(at){return Ae[at].key})}else!O&&A.defaultExpandedKeys&&(x.expandedKeys=A.autoExpandParent||A.defaultExpandParent?Object(z.e)(A.defaultExpandedKeys,be):A.defaultExpandedKeys);if(x.expandedKeys||delete x.expandedKeys,Pe||x.expandedKeys){var ve=Object(M.d)(Pe||ee.treeData,x.expandedKeys||ee.expandedKeys);x.flattenNodes=ve}if(A.selectable&&(ie("selectedKeys")?x.selectedKeys=Object(z.d)(A.selectedKeys,A):!O&&A.defaultSelectedKeys&&(x.selectedKeys=Object(z.d)(A.defaultSelectedKeys,A))),A.checkable){var Ee;if(ie("checkedKeys")?Ee=Object(z.j)(A.checkedKeys)||{}:!O&&A.defaultCheckedKeys?Ee=Object(z.j)(A.defaultCheckedKeys)||{}:Pe&&(Ee=Object(z.j)(A.checkedKeys)||{checkedKeys:ee.checkedKeys,halfCheckedKeys:ee.halfCheckedKeys}),Ee){var Ne=Ee,Be=Ne.checkedKeys,Je=Be===void 0?[]:Be,Me=Ne.halfCheckedKeys,Ce=Me===void 0?[]:Me;if(!A.checkStrictly){var lt=Object(c.a)(Je,!0,be);Je=lt.checkedKeys,Ce=lt.halfCheckedKeys}x.checkedKeys=Je,x.halfCheckedKeys=Ce}}return ie("loadedKeys")&&(x.loadedKeys=A.loadedKeys),x}}]),de}(S.Component);X.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},X.TreeNode=te.a;var ge=X,pe=je.b=ge},k4n4:function(Ge,je,l){"use strict";var G=l("tJVT"),we=l("cDcd"),re=l.n(we),Se=l("e+RI"),xe=l.n(Se),fe=l("FTkQ"),$=l.n(fe),S=l("E/GV"),y=l.n(S),W=function(q){var oe=q.type,z=oe===void 0?1:oe,M=q.value,N=M===void 0?[]:M,D=q.onChange,K=q.disabled,h=K===void 0?!1:K,te=q.icon,he=Object(we.useState)(),Z=Object(G.a)(he,2),I=Z[0],d=Z[1],V=function(j){D(j)};return z===1?re.a.createElement("div",null,N==null?void 0:N.map(function(b,j){return re.a.createElement("div",{key:j,className:h?"".concat(xe.a.btn," ").concat(xe.a.btnDisabled):xe.a.btn},re.a.createElement("span",{className:xe.a.s1},b.name),re.a.createElement("img",{src:$.a,className:xe.a.s2,onClick:function(){return V(b.id)}}))})):re.a.createElement("div",null,N==null?void 0:N.map(function(b,j){return re.a.createElement("div",{key:j,className:xe.a.btn2},re.a.createElement("span",{className:xe.a.s1},re.a.createElement("img",{src:te||y.a}),b.name),re.a.createElement("img",{src:$.a,className:xe.a.s2,onClick:function(){return V(b.id)}}))}))};je.a=W},kSUc:function(Ge,je,l){},kqOp:function(Ge,je,l){"use strict";l.d(je,"a",function(){return W});var G=l("0Owb"),we=l("fWQN"),re=l("mtLc"),Se=l("yKVA"),xe=l("879j"),fe=l("cDcd"),$=l.n(fe),S=l("Ot1p"),y="\u2581",W=function(Y){Object(Se.a)(oe,Y);var q=Object(xe.a)(oe);function oe(){var z;Object(we.a)(this,oe);for(var M=arguments.length,N=new Array(M),D=0;D<M;D++)N[D]=arguments[D];return z=q.call.apply(q,[this].concat(N)),z.getChCountBeforeCursor=function(K,h){for(var te=h.line,he=0,Z=0;Z<te;Z++)he+=K.getLine(Z).split(y).length-1;var I=K.getLine(te).substring(0,h.ch);return he+=I.split(y).length-1,he},z.onCMBeforeChange=function(K,h){var te=K.getRange(h.from,h.to),he=0;if(h.text.forEach(function(V){he+=V.split(y).length-1}),te&&te.indexOf(y)!=-1){var Z=te.split(y).length-1,I=z.getChCountBeforeCursor(K,h.from);console.log("\u5220\u9664".concat(Z,"\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(I,"\u4E2A\uFF0C\u65B0\u589E").concat(he,"\u4E2A")),z.props.deleteEmptyDisabled?h.cancel():z.props.onPlaceholderChange&&z.props.onPlaceholderChange(I,Z,he)}else if(he){var d=z.getChCountBeforeCursor(K,h.from);console.log("\u65B0\u589E".concat(he,"\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(d,"\u4E2A")),z.props.onPlaceholderChange&&z.props.onPlaceholderChange(d,0,he)}},z}return Object(re.a)(oe,[{key:"render",value:function(){return $.a.createElement(S.a,Object(G.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),oe}(fe.Component)},lZu9:function(Ge,je,l){(function(G){G(l("VrN/"),l("1eCo"),l("8EBN"))})(function(G){"use strict";G.defineMode("markdown",function(we,re){var Se=G.getMode(we,"text/html"),xe=Se.name=="null";function fe(R){if(G.findModeByName){var c=G.findModeByName(R);c&&(R=c.mime||c.mimes[0])}var X=G.getMode(we,R);return X.name=="null"?null:X}re.highlightFormatting===void 0&&(re.highlightFormatting=!1),re.maxBlockquoteDepth===void 0&&(re.maxBlockquoteDepth=0),re.taskLists===void 0&&(re.taskLists=!1),re.strikethrough===void 0&&(re.strikethrough=!1),re.emoji===void 0&&(re.emoji=!1),re.fencedCodeBlockHighlighting===void 0&&(re.fencedCodeBlockHighlighting=!0),re.fencedCodeBlockDefaultMode===void 0&&(re.fencedCodeBlockDefaultMode="text/plain"),re.xml===void 0&&(re.xml=!0),re.tokenTypeOverrides===void 0&&(re.tokenTypeOverrides={});var $={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var S in $)$.hasOwnProperty(S)&&re.tokenTypeOverrides[S]&&($[S]=re.tokenTypeOverrides[S]);var y=/^([*\-_])(?:\s*\1){2,}\s*$/,W=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Y=/^\[(x| )\](?=\s)/i,q=re.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,oe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,z=/^[^#!\[\]*_\\<>` "'(~:]+/,M=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,N=/^\s*\[[^\]]+?\]:.*$/,D=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,K=" ";function h(R,c,X){return c.f=c.inline=X,X(R,c)}function te(R,c,X){return c.f=c.block=X,X(R,c)}function he(R){return!R||!/\S/.test(R.string)}function Z(R){if(R.linkTitle=!1,R.linkHref=!1,R.linkText=!1,R.em=!1,R.strong=!1,R.strikethrough=!1,R.quote=0,R.indentedCode=!1,R.f==d){var c=xe;if(!c){var X=G.innerMode(Se,R.htmlState);c=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}c&&(R.f=v,R.block=I,R.htmlState=null)}return R.trailingSpace=0,R.trailingSpaceNewLine=!1,R.prevLine=R.thisLine,R.thisLine={stream:null},null}function I(R,c){var X=R.column()===c.indentation,ge=he(c.prevLine.stream),pe=c.indentedCode,Oe=c.prevLine.hr,me=c.list!==!1,de=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var H=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,me)){for(c.list=null;H<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=H-c.listStack[c.listStack.length-1])}var A=!ge&&!Oe&&!c.prevLine.header&&(!me||!pe)&&!c.prevLine.fencedCodeEnd,ee=(c.list===!1||Oe||ge)&&c.indentation<=de&&R.match(y),O=null;if(c.indentationDiff>=4&&(pe||c.prevLine.fencedCodeEnd||c.prevLine.header||ge))return R.skipToEnd(),c.indentedCode=!0,$.code;if(R.eatSpace())return null;if(X&&c.indentation<=de&&(O=R.match(q))&&O[1].length<=6)return c.quote=0,c.header=O[1].length,c.thisLine.header=!0,re.highlightFormatting&&(c.formatting="header"),c.f=c.inline,b(c);if(c.indentation<=de&&R.eat(">"))return c.quote=X?1:c.quote+1,re.highlightFormatting&&(c.formatting="quote"),R.eatSpace(),b(c);if(!ee&&!c.setext&&X&&c.indentation<=de&&(O=R.match(W))){var x=O[1]?"ol":"ul";return c.indentation=H+R.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,re.taskLists&&R.match(Y,!1)&&(c.taskList=!0),c.f=c.inline,re.highlightFormatting&&(c.formatting=["list","list-"+x]),b(c)}else{if(X&&c.indentation<=de&&(O=R.match(M,!0)))return c.quote=0,c.fencedEndRE=new RegExp(O[1]+"+ *$"),c.localMode=re.fencedCodeBlockHighlighting&&fe(O[2]||re.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=G.startState(c.localMode)),c.f=c.block=V,re.highlightFormatting&&(c.formatting="code-block"),c.code=-1,b(c);if(c.setext||(!A||!me)&&!c.quote&&c.list===!1&&!c.code&&!ee&&!N.test(R.string)&&(O=R.lookAhead(1))&&(O=O.match(oe)))return c.setext?(c.header=c.setext,c.setext=0,R.skipToEnd(),re.highlightFormatting&&(c.formatting="header")):(c.header=O[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,b(c);if(ee)return R.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,$.hr;if(R.peek()==="[")return h(R,c,F)}return h(R,c,c.inline)}function d(R,c){var X=Se.token(R,c.htmlState);if(!xe){var ge=G.innerMode(Se,c.htmlState);(ge.mode.name=="xml"&&ge.state.tagStart===null&&!ge.state.context&&ge.state.tokenize.isInText||c.md_inside&&R.current().indexOf(">")>-1)&&(c.f=v,c.block=I,c.htmlState=null)}return X}function V(R,c){var X=c.listStack[c.listStack.length-1]||0,ge=c.indentation<X,pe=X+3;if(c.fencedEndRE&&c.indentation<=pe&&(ge||R.match(c.fencedEndRE))){re.highlightFormatting&&(c.formatting="code-block");var Oe;return ge||(Oe=b(c)),c.localMode=c.localState=null,c.block=I,c.f=v,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,ge?te(R,c,c.block):Oe}else return c.localMode?c.localMode.token(R,c.localState):(R.skipToEnd(),$.code)}function b(R){var c=[];if(R.formatting){c.push($.formatting),typeof R.formatting=="string"&&(R.formatting=[R.formatting]);for(var X=0;X<R.formatting.length;X++)c.push($.formatting+"-"+R.formatting[X]),R.formatting[X]==="header"&&c.push($.formatting+"-"+R.formatting[X]+"-"+R.header),R.formatting[X]==="quote"&&(!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=R.quote?c.push($.formatting+"-"+R.formatting[X]+"-"+R.quote):c.push("error"))}if(R.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(R.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(R.linkHref?c.push($.linkHref,"url"):(R.strong&&c.push($.strong),R.em&&c.push($.em),R.strikethrough&&c.push($.strikethrough),R.emoji&&c.push($.emoji),R.linkText&&c.push($.linkText),R.code&&c.push($.code),R.image&&c.push($.image),R.imageAltText&&c.push($.imageAltText,"link"),R.imageMarker&&c.push($.imageMarker)),R.header&&c.push($.header,$.header+"-"+R.header),R.quote&&(c.push($.quote),!re.maxBlockquoteDepth||re.maxBlockquoteDepth>=R.quote?c.push($.quote+"-"+R.quote):c.push($.quote+"-"+re.maxBlockquoteDepth)),R.list!==!1){var ge=(R.listStack.length-1)%3;ge?ge===1?c.push($.list2):c.push($.list3):c.push($.list1)}return R.trailingSpaceNewLine?c.push("trailing-space-new-line"):R.trailingSpace&&c.push("trailing-space-"+(R.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function j(R,c){return R.match(z,!0)?b(c):void 0}function v(R,c){var X=c.text(R,c);if(typeof X!="undefined")return X;if(c.list)return c.list=null,b(c);if(c.taskList){var ge=R.match(Y,!0)[1]===" ";return ge?c.taskOpen=!0:c.taskClosed=!0,re.highlightFormatting&&(c.formatting="task"),c.taskList=!1,b(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&R.match(/^#+$/,!0))return re.highlightFormatting&&(c.formatting="header"),b(c);var pe=R.next();if(c.linkTitle){c.linkTitle=!1;var Oe=pe;pe==="("&&(Oe=")"),Oe=(Oe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var me="^\\s*(?:[^"+Oe+"\\\\]+|\\\\\\\\|\\\\.)"+Oe;if(R.match(new RegExp(me),!0))return $.linkHref}if(pe==="`"){var de=c.formatting;re.highlightFormatting&&(c.formatting="code"),R.eatWhile("`");var H=R.current().length;if(c.code==0&&(!c.quote||H==1))return c.code=H,b(c);if(H==c.code){var A=b(c);return c.code=0,A}else return c.formatting=de,b(c)}else if(c.code)return b(c);if(pe==="\\"&&(R.next(),re.highlightFormatting)){var ee=b(c),O=$.formatting+"-escape";return ee?ee+" "+O:O}if(pe==="!"&&R.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,re.highlightFormatting&&(c.formatting="image"),b(c);if(pe==="["&&c.imageMarker&&R.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,re.highlightFormatting&&(c.formatting="image"),b(c);if(pe==="]"&&c.imageAltText){re.highlightFormatting&&(c.formatting="image");var ee=b(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=L,ee}if(pe==="["&&!c.image)return c.linkText&&R.match(/^.*?\]/)||(c.linkText=!0,re.highlightFormatting&&(c.formatting="link")),b(c);if(pe==="]"&&c.linkText){re.highlightFormatting&&(c.formatting="link");var ee=b(c);return c.linkText=!1,c.inline=c.f=R.match(/\(.*?\)| ?\[.*?\]/,!1)?L:v,ee}if(pe==="<"&&R.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=m,re.highlightFormatting&&(c.formatting="link");var ee=b(c);return ee?ee+=" ":ee="",ee+$.linkInline}if(pe==="<"&&R.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=m,re.highlightFormatting&&(c.formatting="link");var ee=b(c);return ee?ee+=" ":ee="",ee+$.linkEmail}if(re.xml&&pe==="<"&&R.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var x=R.string.indexOf(">",R.pos);if(x!=-1){var ie=R.string.substring(R.start,x);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ie)&&(c.md_inside=!0)}return R.backUp(1),c.htmlState=G.startState(Se),te(R,c,d)}if(re.xml&&pe==="<"&&R.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(pe==="*"||pe==="_"){for(var Pe=1,Fe=R.pos==1?" ":R.string.charAt(R.pos-2);Pe<3&&R.eat(pe);)Pe++;var be=R.peek()||" ",Ae=!/\s/.test(be)&&(!D.test(be)||/\s/.test(Fe)||D.test(Fe)),ve=!/\s/.test(Fe)&&(!D.test(Fe)||/\s/.test(be)||D.test(be)),Ee=null,Ne=null;if(Pe%2&&(!c.em&&Ae&&(pe==="*"||!ve||D.test(Fe))?Ee=!0:c.em==pe&&ve&&(pe==="*"||!Ae||D.test(be))&&(Ee=!1)),Pe>1&&(!c.strong&&Ae&&(pe==="*"||!ve||D.test(Fe))?Ne=!0:c.strong==pe&&ve&&(pe==="*"||!Ae||D.test(be))&&(Ne=!1)),Ne!=null||Ee!=null){re.highlightFormatting&&(c.formatting=Ee==null?"strong":Ne==null?"em":"strong em"),Ee===!0&&(c.em=pe),Ne===!0&&(c.strong=pe);var A=b(c);return Ee===!1&&(c.em=!1),Ne===!1&&(c.strong=!1),A}}else if(pe===" "&&(R.eat("*")||R.eat("_"))){if(R.peek()===" ")return b(c);R.backUp(1)}if(re.strikethrough){if(pe==="~"&&R.eatWhile(pe)){if(c.strikethrough){re.highlightFormatting&&(c.formatting="strikethrough");var A=b(c);return c.strikethrough=!1,A}else if(R.match(/^[^\s]/,!1))return c.strikethrough=!0,re.highlightFormatting&&(c.formatting="strikethrough"),b(c)}else if(pe===" "&&R.match(/^~~/,!0)){if(R.peek()===" ")return b(c);R.backUp(2)}}if(re.emoji&&pe===":"&&R.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,re.highlightFormatting&&(c.formatting="emoji");var Be=b(c);return c.emoji=!1,Be}return pe===" "&&(R.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),b(c)}function m(R,c){var X=R.next();if(X===">"){c.f=c.inline=v,re.highlightFormatting&&(c.formatting="link");var ge=b(c);return ge?ge+=" ":ge="",ge+$.linkInline}return R.match(/^[^>]+/,!0),$.linkInline}function L(R,c){if(R.eatSpace())return null;var X=R.next();return X==="("||X==="["?(c.f=c.inline=_(X==="("?")":"]"),re.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,b(c)):"error"}var P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _(R){return function(c,X){var ge=c.next();if(ge===R){X.f=X.inline=v,re.highlightFormatting&&(X.formatting="link-string");var pe=b(X);return X.linkHref=!1,pe}return c.match(P[R]),X.linkHref=!0,b(X)}}function F(R,c){return R.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=ue,R.next(),re.highlightFormatting&&(c.formatting="link"),c.linkText=!0,b(c)):h(R,c,v)}function ue(R,c){if(R.match(/^\]:/,!0)){c.f=c.inline=Q,re.highlightFormatting&&(c.formatting="link");var X=b(c);return c.linkText=!1,X}return R.match(/^([^\]\\]|\\.)+/,!0),$.linkText}function Q(R,c){return R.eatSpace()?null:(R.match(/^[^\s]+/,!0),R.peek()===void 0?c.linkTitle=!0:R.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),c.f=c.inline=v,$.linkHref+" url")}var ye={startState:function(){return{f:I,prevLine:{stream:null},thisLine:{stream:null},block:I,htmlState:null,indentation:0,inline:v,text:j,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(R){return{f:R.f,prevLine:R.prevLine,thisLine:R.thisLine,block:R.block,htmlState:R.htmlState&&G.copyState(Se,R.htmlState),indentation:R.indentation,localMode:R.localMode,localState:R.localMode?G.copyState(R.localMode,R.localState):null,inline:R.inline,text:R.text,formatting:!1,linkText:R.linkText,linkTitle:R.linkTitle,linkHref:R.linkHref,code:R.code,em:R.em,strong:R.strong,strikethrough:R.strikethrough,emoji:R.emoji,header:R.header,setext:R.setext,hr:R.hr,taskList:R.taskList,list:R.list,listStack:R.listStack.slice(0),quote:R.quote,indentedCode:R.indentedCode,trailingSpace:R.trailingSpace,trailingSpaceNewLine:R.trailingSpaceNewLine,md_inside:R.md_inside,fencedEndRE:R.fencedEndRE}},token:function(R,c){if(c.formatting=!1,R!=c.thisLine.stream){if(c.header=0,c.hr=!1,R.match(/^\s*$/,!0))return Z(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:R},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=d)){var X=R.match(/^\s*/,!0)[0].replace(/\t/g,K).length;if(c.indentation=X,c.indentationDiff=null,X>0)return null}}return c.f(R,c)},innerMode:function(R){return R.block==d?{state:R.htmlState,mode:Se}:R.localState?{state:R.localState,mode:R.localMode}:{state:R,mode:ye}},indent:function(R,c,X){return R.block==d&&Se.indent?Se.indent(R.htmlState,c,X):R.localState&&R.localMode.indent?R.localMode.indent(R.localState,c,X):G.Pass},blankLine:Z,getType:b,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ye},"xml"),G.defineMIME("text/markdown","markdown"),G.defineMIME("text/x-markdown","markdown")})},lnNo:function(Ge,je,l){Ge.exports=l.p+"static/up.69f3b3fd.svg"},m3fD:function(Ge,je,l){Ge.exports={flex_box_center:"flex_box_center___1w3aZ",flex_space_between:"flex_space_between___26eB1",flex_box_vertical_center:"flex_box_vertical_center___LffUi",flex_box_center_end:"flex_box_center_end___2AiD3",flex_box_column:"flex_box_column___hZDm1",wrap:"wrap___3Du1e",btns:"btns___35pkF",crumbs:"crumbs___3CPsi",oneWrap:"oneWrap___3F99r",title:"title___2n1na",formWrap:"formWrap___3CHwR",rb:"rb___19sZ1"}},osHv:function(Ge,je,l){(function(G){G(l("VrN/"))})(function(G){"use strict";var we=G.Pos;function re(D,K){return D.line-K.line||D.ch-K.ch}var Se="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",xe=Se+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+Se+"]["+xe+"]*)","g");function $(D,K,h,te){this.line=K,this.ch=h,this.cm=D,this.text=D.getLine(K),this.min=te?Math.max(te.from,D.firstLine()):D.firstLine(),this.max=te?Math.min(te.to-1,D.lastLine()):D.lastLine()}function S(D,K){var h=D.cm.getTokenTypeAt(we(D.line,K));return h&&/\btag\b/.test(h)}function y(D){return D.line>=D.max?void 0:(D.ch=0,D.text=D.cm.getLine(++D.line),!0)}function W(D){return D.line<=D.min?void 0:(D.text=D.cm.getLine(--D.line),D.ch=D.text.length,!0)}function Y(D){for(;;){var K=D.text.indexOf(">",D.ch);if(K==-1){if(y(D))continue;return}if(!S(D,K+1)){D.ch=K+1;continue}var h=D.text.lastIndexOf("/",K),te=h>-1&&!/\S/.test(D.text.slice(h+1,K));return D.ch=K+1,te?"selfClose":"regular"}}function q(D){for(;;){var K=D.ch?D.text.lastIndexOf("<",D.ch-1):-1;if(K==-1){if(W(D))continue;return}if(!S(D,K+1)){D.ch=K;continue}fe.lastIndex=K,D.ch=K;var h=fe.exec(D.text);if(h&&h.index==K)return h}}function oe(D){for(;;){fe.lastIndex=D.ch;var K=fe.exec(D.text);if(!K){if(y(D))continue;return}if(!S(D,K.index+1)){D.ch=K.index+1;continue}return D.ch=K.index+K[0].length,K}}function z(D){for(;;){var K=D.ch?D.text.lastIndexOf(">",D.ch-1):-1;if(K==-1){if(W(D))continue;return}if(!S(D,K+1)){D.ch=K;continue}var h=D.text.lastIndexOf("/",K),te=h>-1&&!/\S/.test(D.text.slice(h+1,K));return D.ch=K+1,te?"selfClose":"regular"}}function M(D,K){for(var h=[];;){var te=oe(D),he,Z=D.line,I=D.ch-(te?te[0].length:0);if(!te||!(he=Y(D)))return;if(he=="selfClose")continue;if(te[1]){for(var d=h.length-1;d>=0;--d)if(h[d]==te[2]){h.length=d;break}if(d<0&&(!K||K==te[2]))return{tag:te[2],from:we(Z,I),to:we(D.line,D.ch)}}else h.push(te[2])}}function N(D,K){for(var h=[];;){var te=z(D);if(!te)return;if(te=="selfClose"){q(D);continue}var he=D.line,Z=D.ch,I=q(D);if(!I)return;if(I[1])h.push(I[2]);else{for(var d=h.length-1;d>=0;--d)if(h[d]==I[2]){h.length=d;break}if(d<0&&(!K||K==I[2]))return{tag:I[2],from:we(D.line,D.ch),to:we(he,Z)}}}}G.registerHelper("fold","xml",function(D,K){for(var h=new $(D,K.line,0);;){var te=oe(h);if(!te||h.line!=K.line)return;var he=Y(h);if(!he)return;if(!te[1]&&he!="selfClose"){var Z=we(h.line,h.ch),I=M(h,te[2]);return I&&re(I.from,Z)>0?{from:Z,to:I.from}:null}}}),G.findMatchingTag=function(D,K,h){var te=new $(D,K.line,K.ch,h);if(te.text.indexOf(">")==-1&&te.text.indexOf("<")==-1)return;var he=Y(te),Z=he&&we(te.line,te.ch),I=he&&q(te);if(!he||!I||re(te,K)>0)return;var d={from:we(te.line,te.ch),to:Z,tag:I[2]};return he=="selfClose"?{open:d,close:null,at:"open"}:I[1]?{open:N(te,I[2]),close:d,at:"close"}:(te=new $(D,Z.line,Z.ch,h),{open:d,close:M(te,I[2]),at:"open"})},G.findEnclosingTag=function(D,K,h,te){for(var he=new $(D,K.line,K.ch,h);;){var Z=N(he,te);if(!Z)break;var I=new $(D,K.line,K.ch,h),d=M(I,Z.tag);if(d)return{open:Z,close:d}}},G.scanForClosingTag=function(D,K,h,te){var he=new $(D,K.line,K.ch,te?{from:0,to:te}:null);return M(he,h)}})},p5ED:function(Ge,je,l){"use strict";var G=l("+L6B"),we=l("2/Rp"),re=l("5Dmo"),Se=l("3S7+"),xe=l("k1fw"),fe=l("tJVT"),$=l("cDcd"),S=l.n($),y=l("vHTk"),W=l.n(y),Y=l("yEEn"),q=l("ZW9T"),oe=l("1vsH");je.a=function(z){var M=z.name,N=z.data,D=z.theme,K=z.type,h=z.filename,te=z.monacoEditor,he=z.className,Z=z.style,I=z.close,d=z.onClose,V=z.hasMask,b=Object($.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),j=Object(fe.a)(b,2),v=j[0],m=j[1],L=Object($.useState)(""),P=Object(fe.a)(L,2),_=P[0],F=P[1],ue=Object($.useRef)();h&&(te.filename=h),Object($.useEffect)(function(){var R,c,X=(R=document.cookie)===null||R===void 0||((c=R.replace(/\s/g,""))===null||c===void 0)?void 0:c.split(";");X==null||X.map(function(ge){var pe=ge.split("=");pe[0]==="_educoder_session"&&F(pe[1])})},[]);var Q=function(){if(N.startsWith("http")||N.startsWith("/")){ye();return}Object(oe.x)(h||"educoder",N,h)},ye=function(){Object(oe.v)(h||M,N)};return console.log("data:",N,"fileanme:",h," name:",M),S.a.createElement("div",{style:Object(xe.a)({},Z||{}),className:"".concat(V&&W.a.bgBlack," ").concat(K?W.a.wrp:"hide")},I&&S.a.createElement("div",{className:W.a.close,ref:ue},S.a.createElement(Se.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ue.current}},S.a.createElement("span",{onClick:ye},S.a.createElement("i",{className:"icon-quxiaozhiding"}))),S.a.createElement(Se.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ue.current}},S.a.createElement("span",{className:"",onClick:d},S.a.createElement("i",{className:"icon-guanbi1"})))),S.a.createElement("div",{className:"".concat(W.a[he]," ").concat(he," ").concat(W.a.monaco," ").concat(K==="txt"?"show":"hide")},K==="txt"&&S.a.createElement(q.b,te)),K==="audio"&&S.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}),K==="video"&&S.a.createElement(S.a.Fragment,null,N!=null&&N.startsWith("/")?S.a.createElement("video",{controls:!0,src:"".concat(N),autoPlay:!0}):S.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})),K==="pdf"&&S.a.createElement("embed",{className:W.a.embed,src:N}),K==="image"&&S.a.createElement(S.a.Fragment,null,S.a.createElement("img",{src:"".concat(N!=null&&N.startsWith("/")||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(N)})),K==="other"&&S.a.createElement("div",null,S.a.createElement(we.a,{type:"primary",size:"large",onClick:Q},S.a.createElement(Y.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(K==="download"||K==="office")&&S.a.createElement(we.a,{type:"primary",size:"large",onClick:Q},S.a.createElement(Y.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Ge,je,l){},"rAM+":function(Ge,je,l){"use strict";l.d(je,"a",function(){return we});var G=l("Qw5x");function we(re,Se){var xe;if(typeof Symbol=="undefined"||re[Symbol.iterator]==null){if(Array.isArray(re)||(xe=Object(G.a)(re))||Se&&re&&typeof re.length=="number"){xe&&(re=xe);var fe=0,$=function(){};return{s:$,n:function(){return fe>=re.length?{done:!0}:{done:!1,value:re[fe++]}},e:function(q){throw q},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.`)}var S=!0,y=!1,W;return{s:function(){xe=re[Symbol.iterator]()},n:function(){var q=xe.next();return S=q.done,q},e:function(q){y=!0,W=q},f:function(){try{!S&&xe.return!=null&&xe.return()}finally{if(y)throw W}}}}},rUJ1:function(Ge,je){const l=/[&<>"']/,G=/[&<>"']/g,we=/[<>"']|&(?!#?\w+;)/,re=/[<>"']|&(?!#?\w+;)/g,Se={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xe=V=>Se[V];function fe(V,b){if(b){if(l.test(V))return V.replace(G,xe)}else if(we.test(V))return V.replace(re,xe);return V}const $=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(V){return V.replace($,(b,j)=>(j=j.toLowerCase(),j==="colon"?":":j.charAt(0)==="#"?j.charAt(1)==="x"?String.fromCharCode(parseInt(j.substring(2),16)):String.fromCharCode(+j.substring(1)):""))}const y=/(^|[^\[])\^/g;function W(V,b){V=V.source||V,b=b||"";const j={replace:(v,m)=>(m=m.source||m,m=m.replace(y,"$1"),V=V.replace(v,m),j),getRegex:()=>new RegExp(V,b)};return j}const Y=/[^\w:]/g,q=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function oe(V,b,j){if(V){let v;try{v=decodeURIComponent(S(j)).replace(Y,"").toLowerCase()}catch(m){return null}if(v.indexOf("javascript:")===0||v.indexOf("vbscript:")===0||v.indexOf("data:")===0)return null}b&&!q.test(j)&&(j=K(b,j));try{j=encodeURI(j).replace(/%25/g,"%")}catch(v){return null}return j}const z={},M=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,D=/^([^:]+:\/*[^/]*)[\s\S]*$/;function K(V,b){z[" "+V]||(M.test(V)?z[" "+V]=V+"/":z[" "+V]=Z(V,"/",!0)),V=z[" "+V];const j=V.indexOf(":")===-1;return b.substring(0,2)==="//"?j?b:V.replace(N,"$1")+b:b.charAt(0)==="/"?j?b:V.replace(D,"$1")+b:V+b}const h={exec:function(){}};function te(V){let b=1,j,v;for(;b<arguments.length;b++){j=arguments[b];for(v in j)Object.prototype.hasOwnProperty.call(j,v)&&(V[v]=j[v])}return V}function he(V,b){const j=V.replace(/\|/g,(L,P,_)=>{let F=!1,ue=P;for(;--ue>=0&&_[ue]==="\\";)F=!F;return F?"|":" |"}),v=j.split(/ \|/);let m=0;if(v.length>b)v.splice(b);else for(;v.length<b;)v.push("");for(;m<v.length;m++)v[m]=v[m].trim().replace(/\\\|/g,"|");return v}function Z(V,b,j){const v=V.length;if(v===0)return"";let m=0;for(;m<v;){const L=V.charAt(v-m-1);if(L===b&&!j)m++;else if(L!==b&&j)m++;else break}return V.substr(0,v-m)}function I(V,b){if(V.indexOf(b[1])===-1)return-1;const j=V.length;let v=0,m=0;for(;m<j;m++)if(V[m]==="\\")m++;else if(V[m]===b[0])v++;else if(V[m]===b[1]&&(v--,v<0))return m;return-1}function d(V){V&&V.sanitize&&!V.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")}Ge.exports={escape:fe,unescape:S,edit:W,cleanUrl:oe,resolveUrl:K,noopTest:h,merge:te,splitCells:he,rtrim:Z,findClosingBracket:I,checkSanitizeDeprecation:d}},sbIO:function(Ge,je,l){"use strict";var G=l("DjyN"),we=l("NUBc"),re=l("5Dmo"),Se=l("3S7+"),xe=l("/zsF"),fe=l("PArb"),$=l("Q9mQ"),S=l("diRs"),y=l("+L6B"),W=l("2/Rp"),Y=l("5NDa"),q=l("5rEg"),oe=l("miYZ"),z=l("tsqr"),M=l("9og8"),N=l("giR+"),D=l("fyUT"),K=l("2qtc"),h=l("kLXV"),te=l("tJVT"),he=l("WmNS"),Z=l.n(he),I=l("cDcd"),d=l.n(I),V=l("PsQE"),b=l.n(V),j=l("0eGx"),v=l.n(j),m=l("9Bee"),L=l("Ty5D"),P=l("9kvl"),_=l("ErOA"),F=l("+yhJ"),ue=l.n(F),Q=l("RZ/O"),ye=l.n(Q),R=l("LvDl"),c=l("6K3P"),X=l.n(c),ge=l("sRBo"),pe=l("kaz8"),Oe=l("oBTY"),me=l("PpiC"),de=l("Ot1p"),H=l("kqOp"),A=l("7qnI"),ee=l("1vsH"),O=l("PGNT"),x=l.n(O),ie=["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"],Pe=function(E,T){var k=E.globalSetting,p=E.loading,g=E.dispatch,w=E.isEdit,C=E.editData,J=Object(me.a)(E,["globalSetting","loading","dispatch","isEdit","editData"]),ae=Object(I.useState)(""),se=Object(te.a)(ae,2),rt=se[0],ze=se[1],Te=Object(I.useState)(""),Ot=Object(te.a)(Te,2),kt=Ot[0],it=Ot[1],Kt=Object(I.useState)([]),He=Object(te.a)(Kt,2),zt=He[0],Ut=He[1],gt=Object(I.useState)(""),Ft=Object(te.a)(gt,2),Pt=Ft[0],ot=Ft[1],Qe=Object(I.useState)(),Xe=Object(te.a)(Qe,2),ft=Xe[0],Tt=Xe[1],Dt=Object(I.useState)(!1),Zt=Object(te.a)(Dt,2),Bt=Zt[0],ut=Zt[1];Object(I.useEffect)(function(){if(!C||!w)return;ze(C==null?void 0:C.name),it(C==null?void 0:C.analysis),Tt(C==null?void 0:C.is_ordered),ut(!0)},[C]),Object(I.useEffect)(function(){if(!Bt)return;var Ie=C==null?void 0:C.standard_answer.map(function(Ye){return Ye.answer_text});Ut(Ie),ut(!1)},[Bt]),Object(I.useImperativeHandle)(T,function(){return{onSave:Yt,Clear:yt}});var Yt=function(){var Ye=[],We=!1;return rt?(zt.forEach(function(on,mn){Ye.push({position:mn+1,answer_text:[]}),on.forEach(function(En,kn){Ye[mn].answer_text.push(En),(!En||!Object(ee.bb)(En,1e4))&&(ot("".concat(mn,"-").concat(kn)),z.b.info(En?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),We=!0)})}),We?!1:(Ye==null?void 0:Ye.length)>20?(z.b.warn("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:rt,analysis:kt,standard_answers:Ye,is_ordered:ft}):(z.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},yt=function(){ze(""),it(""),Ut([]),Tt(!1)},qt=function(Ye,We,on){var mn=zt.slice();if(We&&mn.splice(Ye,We),on)for(var En=0;En<on;En++)mn.splice(Ye+En,0,[""]);Ut(mn)},Lt=function(Ye,We,on){ot("");var mn=zt.slice();mn[Ye][We]=on,Ut(mn)},en=function(Ye){var We=zt.slice();We[Ye]=[].concat(Object(Oe.a)(We[Ye]),[""]),Ut(We)},Mn=function(Ye,We){var on=zt.slice();if(!on[Ye][We]){on[Ye]=on[Ye].filter(function(mn,En){return En!==We}),Ut(on);return}h.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:x.a.modal,onOk:function(){on[Ye]=on[Ye].filter(function(En,kn){return kn!==We}),Ut(on)}})},Vt=function(Ye){h.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:x.a.modal,onOk:function(){var on=zt.slice();on=zt.filter(function(mn,En){return Ye!==En}),Ut(on)}})};return d.a.createElement("section",{className:x.a.wrap},d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement("div",null,d.a.createElement(H.a,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:rt,onChange:function(Ye){return ze(Ye)},showNullButton:!0,onPlaceholderChange:qt})),d.a.createElement("div",{className:"mt20"},zt.map(function(Ie,Ye){return d.a.createElement(A.a,{key:Ye,answers:Ie,index:Ye,flex:1,is_md:!0,activeOptionErrorIndex:Pt,onAnswerChange:Lt,addChildAnswer:en,deleteChildAnswer:Mn,deleteChildAnswermain:Vt})})),d.a.createElement("div",{className:"mt20"},zt.length>1&&d.a.createElement("span",null,d.a.createElement(pe.a,{checked:ft,onChange:function(Ye){return Tt(Ye.target.checked)},className:"".concat(x.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),d.a.createElement("span",{className:"".concat(x.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:x.a.titleWrap},d.a.createElement("span",{className:x.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(de.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:kt,onChange:function(Ye){return it(Ye)}}))},Fe=Object(P.a)(function(Ue){var E=Ue.loading,T=Ue.globalSetting;return{globalSetting:T,loading:E.effects}},null,null,{forwardRef:!0})(Object(I.forwardRef)(Pe)),be=l("7Kak"),Ae=l("9yH6"),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"],Ee=function(E,T){var k=E.globalSetting,p=E.loading,g=E.editData,w=E.dispatch,C=E.onRef,J=C===void 0?function(){}:C,ae=E.isEdit,se=Object(me.a)(E,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),rt=Object(I.useState)(),ze=Object(te.a)(rt,2),Te=ze[0],Ot=ze[1],kt=Object(I.useState)(""),it=Object(te.a)(kt,2),Kt=it[0],He=it[1],zt=Object(I.useState)(""),Ut=Object(te.a)(zt,2),gt=Ut[0],Ft=Ut[1];Object(I.useEffect)(function(){if(!g||!ae)return;He(g==null?void 0:g.name),Ft(g==null?void 0:g.analysis);var Qe=g==null?void 0:g.choices.find(function(Xe){return Xe.is_answer});Ot(Qe.choice_text==="\u6B63\u786E"?"0":"1")},[g]),Object(I.useImperativeHandle)(T,function(){return{onSave:Pt,Clear:ot}});var Pt=function(){if(!Kt)return z.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Te)return z.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;var Xe=[{choice_text:"\u6B63\u786E",is_answer:Te==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Te==="1"?1:0}];return{name:Kt,choices:Xe,analysis:gt}},ot=function(){He(""),Ft(""),Ot("")};return d.a.createElement("section",{className:x.a.wrap},d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(de.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Kt,onChange:function(Xe){return He(Xe)}}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:x.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),d.a.createElement(Ae.a.Group,{buttonStyle:"solid",value:Te,onChange:function(Xe){return Ot(Xe.target.value)}},d.a.createElement(Ae.a.Button,{value:"0",className:"".concat(x.a.radio," mr40")},"\u6B63\u786E"),d.a.createElement(Ae.a.Button,{value:"1",className:x.a.radio},"\u9519\u8BEF")),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(de.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:gt,onChange:function(Xe){return Ft(Xe)}}))},Ne=Object(P.a)(function(Ue){var E=Ue.loading,T=Ue.globalSetting;return{globalSetting:T,loading:E.effects}},null,null,{forwardRef:!0})(Object(I.forwardRef)(Ee)),Be=["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"],Je=function(E,T){var k=E.editData,p=E.globalSetting,g=E.loading,w=E.dispatch,C=E.onRef,J=C===void 0?function(){}:C,ae=E.isEdit,se=Object(me.a)(E,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),rt=Object(I.useState)([]),ze=Object(te.a)(rt,2),Te=ze[0],Ot=ze[1],kt=Object(I.useState)(),it=Object(te.a)(kt,2),Kt=it[0],He=it[1],zt=Object(I.useState)([]),Ut=Object(te.a)(zt,2),gt=Ut[0],Ft=Ut[1],Pt=Object(I.useState)(""),ot=Object(te.a)(Pt,2),Qe=ot[0],Xe=ot[1],ft=Object(I.useState)(""),Tt=Object(te.a)(ft,2),Dt=Tt[0],Zt=Tt[1];Object(I.useEffect)(function(){Ot(["","","",""])},[]),Object(I.useEffect)(function(){if(!k||!ae)return;Xe(k==null?void 0:k.name),Zt(k==null?void 0:k.analysis),Ot(k==null?void 0:k.choices.map(function(yt){return yt.choice_text}));var Yt=[];k==null||k.choices.map(function(yt,qt){yt.is_answer&&Yt.push(qt)}),Ft(Yt)},[k]),Object(I.useImperativeHandle)(T,function(){return{onSave:Bt,Clear:ut}});var Bt=function(){if(!Qe)return z.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var yt=Te.findIndex(function(Lt){return!Lt});if(yt>-1)return z.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Be[yt]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(!gt.length)return z.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(gt.length<2)return z.b.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;var qt=Te.map(function(Lt,en){return{choice_text:Lt,is_answer:gt.includes(en)?1:0}});return{name:Qe,choices:qt,analysis:Dt}},ut=function(){Ot(["","","",""]),Xe(""),Zt(""),Ft("")};return d.a.createElement("section",{className:x.a.wrap},d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(de.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Qe,onChange:function(yt){return Xe(yt)}}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:x.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Te.map(function(Yt,yt){return d.a.createElement("div",{className:x.a.choiceWrap,key:yt},d.a.createElement(Se.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(x.a.answer," ").concat(gt.includes(yt)?x.a.activeAnswer:""),onClick:function(){gt.includes(yt)?Ft(gt.filter(function(Lt){return Lt!==yt})):Ft([].concat(Object(Oe.a)(gt),[yt]))}},Be[yt])),d.a.createElement("div",{className:x.a.editorWrap},Kt===yt?d.a.createElement(de.a,{id:"single-question-option-".concat(yt),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Yt,onChange:function(Lt){Te[yt]=Lt,Ot(Te)}}):d.a.createElement("div",{className:x.a.htmlWrap,onClick:function(){return He(yt)}},d.a.createElement(m.a,{value:Yt}))),yt>1&&d.a.createElement(Se.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(x.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){Ot(Te.filter(function(Lt,en){return en!==yt})),gt.includes(yt)?Ft(gt.filter(function(Lt){return Lt!==yt})):Ft([].concat(Object(Oe.a)(gt),[yt]))}})),yt<7&&yt===Te.length-1&&d.a.createElement(Se.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(x.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Ot([].concat(Object(Oe.a)(Te),[""]))}})))}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(de.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Dt,onChange:function(yt){return Zt(yt)}}))},Me=Object(P.a)(function(Ue){var E=Ue.loading,T=Ue.globalSetting;return{globalSetting:T,loading:E.effects}},null,null,{forwardRef:!0})(Object(I.forwardRef)(Je)),Ce=["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"],lt=function(E,T){var k=E.editData,p=E.globalSetting,g=E.loading,w=E.dispatch,C=E.onRef,J=C===void 0?function(){}:C,ae=E.isEdit,se=Object(me.a)(E,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),rt=Object(I.useState)([]),ze=Object(te.a)(rt,2),Te=ze[0],Ot=ze[1],kt=Object(I.useState)(),it=Object(te.a)(kt,2),Kt=it[0],He=it[1],zt=Object(I.useState)(),Ut=Object(te.a)(zt,2),gt=Ut[0],Ft=Ut[1],Pt=Object(I.useState)(""),ot=Object(te.a)(Pt,2),Qe=ot[0],Xe=ot[1],ft=Object(I.useState)(""),Tt=Object(te.a)(ft,2),Dt=Tt[0],Zt=Tt[1];Object(I.useEffect)(function(){Ot(["","","",""])},[]),Object(I.useEffect)(function(){if(!k||!ae)return;Xe(k==null?void 0:k.name),Zt(k==null?void 0:k.analysis),Ot(k==null?void 0:k.choices.map(function(Yt){return Yt.choice_text})),Ft(k==null?void 0:k.choices.findIndex(function(Yt){return Yt.is_answer}))},[k]),Object(I.useImperativeHandle)(T,function(){return{onSave:Bt,Clear:ut}});var Bt=function(){if(!Qe)return z.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var yt=Te.findIndex(function(Lt){return!Lt});if(yt>-1)return z.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Ce[yt]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(console.log("activeAnswer: ",gt),!(typeof gt=="number"))return z.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 qt=Te.map(function(Lt,en){return{choice_text:Lt,is_answer:gt===en?1:0}});return{name:Qe,choices:qt,analysis:Dt}},ut=function(){Ot(["","","",""]),Xe(""),Zt(""),Ft("")};return d.a.createElement("section",{className:x.a.wrap},d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(de.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Qe,onChange:function(yt){return Xe(yt)}}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:x.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Te.map(function(Yt,yt){return d.a.createElement("div",{className:x.a.choiceWrap,key:yt},d.a.createElement(Se.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(x.a.answer," ").concat(gt===yt?x.a.activeAnswer:""),onClick:function(){return Ft(yt)}},Ce[yt])),d.a.createElement("div",{className:x.a.editorWrap},Kt===yt?d.a.createElement(de.a,{id:"single-question-option-".concat(yt),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Yt,onChange:function(Lt){Te[yt]=Lt,Ot(Te)}}):d.a.createElement("div",{className:x.a.htmlWrap,onClick:function(){return He(yt)}},d.a.createElement(m.a,{value:Yt}))),yt>1&&d.a.createElement(Se.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(x.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){Ot(Te.filter(function(Lt,en){return en!==yt})),yt===gt&&Ft(null)}})),yt<7&&yt===Te.length-1&&d.a.createElement(Se.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(x.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Ot([].concat(Object(Oe.a)(Te),[""]))}})))}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(de.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Dt,onChange:function(yt){return Zt(yt)}}))},at=Object(P.a)(function(Ue){var E=Ue.loading,T=Ue.globalSetting;return{globalSetting:T,loading:E.effects}},null,null,{forwardRef:!0})(Object(I.forwardRef)(lt)),pt=["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"],et=function(E,T){var k=E.editData,p=E.globalSetting,g=E.loading,w=E.dispatch,C=E.onRef,J=C===void 0?function(){}:C,ae=E.isEdit,se=Object(me.a)(E,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),rt=Object(I.useState)(""),ze=Object(te.a)(rt,2),Te=ze[0],Ot=ze[1],kt=Object(I.useState)(""),it=Object(te.a)(kt,2),Kt=it[0],He=it[1],zt=Object(I.useState)(""),Ut=Object(te.a)(zt,2),gt=Ut[0],Ft=Ut[1];Object(I.useEffect)(function(){var Qe;if(!k||!ae)return;Ot(k==null?void 0:k.name),He(k==null?void 0:k.analysis),Ft(k==null||((Qe=k.answer_texts)===null||Qe===void 0)?void 0:Qe[0])},[k]),Object(I.useImperativeHandle)(T,function(){return{onSave:Pt,Clear:ot}});var Pt=function(){return Te?gt?{name:Te,answer_texts:[gt],analysis:Kt}:(z.b.info("\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848"),!1):(z.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},ot=function(){Ot(""),He(""),Ft("")};return d.a.createElement("section",{className:x.a.wrap},d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(de.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Te,onChange:function(Xe){return Ot(Xe)}}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),d.a.createElement(de.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:gt,onChange:function(Xe){return Ft(Xe)}}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(de.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Kt,onChange:function(Xe){return He(Xe)}}))},_t=Object(P.a)(function(Ue){var E=Ue.loading,T=Ue.globalSetting;return{globalSetting:T,loading:E.effects}},null,null,{forwardRef:!0})(Object(I.forwardRef)(et)),vt=l("k1fw"),ht=["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"],Re=function(E,T){var k=E.globalSetting,p=E.loading,g=E.dispatch,w=E.editData,C=E.onRef,J=C===void 0?function(){}:C,ae=E.isEdit,se=Object(me.a)(E,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),rt=Object(I.useState)(""),ze=Object(te.a)(rt,2),Te=ze[0],Ot=ze[1],kt=Object(I.useState)([]),it=Object(te.a)(kt,2),Kt=it[0],He=it[1];console.log(Kt),Object(I.useEffect)(function(){var Pt;if(!w||!ae)return;Ot(w==null?void 0:w.name);var ot=w==null||((Pt=w.sub_item_banks)===null||Pt===void 0)?void 0:Pt.map(function(Qe){var Xe,ft,Tt;return Object(vt.a)(Object(vt.a)({},Qe),{},{id:Qe.id,open:!1,qusList:Qe==null||((Xe=Qe.choices)===null||Xe===void 0)?void 0:Xe.map(function(Dt){return Dt.choice_text}),activeQusEditor:null,qusAnswer:(ft=[Qe==null||((Tt=Qe.choices)===null||Tt===void 0)?void 0:Tt.findIndex(function(Dt){return Dt.is_answer})])===null||ft===void 0?void 0:ft.filter(function(Dt){return Dt!==-1})})});He(ot)},[w]),Object(I.useImperativeHandle)(T,function(){return{onSave:zt,Clear:Ut}});var zt=function(){if(!Te)return z.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(Kt.length===0)return z.b.info("\u8BF7\u60A8\u6DFB\u52A0\u5C0F\u9898"),!1;for(var ot=0;ot<Kt.length;ot++){var Qe,Xe=Kt[ot];if(!(Xe!=null&&Xe.name))return z.b.info("\u8BF7\u60A8\u8F93\u5165\u7B2C".concat(ot+1,"\u5C0F\u9898\u9898\u5E72")),!1;var ft=Xe==null||((Qe=Xe.qusList)===null||Qe===void 0)?void 0:Qe.findIndex(function(Dt){return!Dt});if(ft>-1)return z.b.info("\u8BF7\u5148\u8F93\u5165\u7B2C".concat(ot+1,"\u5C0F\u9898").concat(ht[ft],"\u9009\u9879\u7684\u5185\u5BB9")),!1;if(!(Xe!=null&&Xe.qusAnswer.length))return z.b.info("\u8BF7\u8BBE\u7F6E\u7B2C".concat(ot+1,"\u5C0F\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E")),!1}var Tt=Kt.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(Zt,Bt){return{choice_text:Zt,is_answer:Dt.qusAnswer[0]===Bt?1:0}})}});return{name:Te,sub_item_banks:Tt}},Ut=function(){Ot(""),He([])},gt=function(){var ot={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};He(Kt.concat(ot))},Ft=function(ot,Qe,Xe){var ft=Object(R.cloneDeep)(Kt);if(ot==="open"&&(ft[Qe].open=!ft[Qe].open),ot==="delete"&&ft.splice(Qe,1),ot==="value"&&(ft[Qe].name=Xe),ot==="answer"&&(ft[Qe].qusAnswer=[Xe]),ot==="edit"&&(ft[Qe].activeQusEditor=Xe),ot==="details"&&(ft[Qe].qusList[ft[Qe].activeQusEditor]=Xe),ot==="addQus"&&(ft[Qe].qusList=ft[Qe].qusList.concat("")),ot==="deleteQus"){var Tt;ft[Qe].qusList=ft[Qe].qusList.filter(function(Dt,Zt){return Zt!==Xe}),ft[Qe].qusAnswer=(Tt=ft[Qe].qusAnswer)===null||Tt===void 0?void 0:Tt.filter(function(Dt){return Dt!==Xe})}ot==="analysis"&&(ft[Qe].analysis=Xe),He(ft)};return d.a.createElement("section",{className:x.a.wrap},d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(de.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Te,onChange:function(ot){return Ot(ot)}}),Kt==null?void 0:Kt.map(function(Pt,ot){var Qe;return d.a.createElement("div",{className:x.a.fold,key:Pt.id},d.a.createElement("div",{onClick:function(){return Ft("open",ot)},className:x.a.head},d.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:Pt.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),d.a.createElement("span",null,"\u7B2C",ot+1,"\u5C0F\u9898\uFF08\u5355\u9009\u9898\uFF09"),d.a.createElement("b",{style:{visibility:"hidden"},onClick:function(ft){ft.stopPropagation(),Ft("delete",ot)},className:"iconfont icon-shanchu8"})),d.a.createElement("div",{className:"mb10",style:{display:Pt.open?"block":"none"}},d.a.createElement(de.a,{watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pt==null?void 0:Pt.name,onChange:function(ft){return Ft("value",ot,ft)}}),d.a.createElement("p",{className:x.a.titleWrap},d.a.createElement("span",{className:x.a.required},"*"),d.a.createElement("span",{className:x.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:x.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pt==null||((Qe=Pt.qusList)===null||Qe===void 0)?void 0:Qe.map(function(Xe,ft){var Tt,Dt;return d.a.createElement("div",{className:x.a.choiceWrap,key:ft},d.a.createElement(Se.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(x.a.answer," ").concat(Pt!=null&&(Tt=Pt.qusAnswer)!==null&&Tt!==void 0&&Tt.includes(ft)?x.a.activeAnswer:""),onClick:function(){return Ft("answer",ot,ft)}},ht[ft])),d.a.createElement("div",{className:x.a.editorWrap},(Pt==null?void 0:Pt.activeQusEditor)===ft?d.a.createElement(de.a,{id:"single-question-option-".concat(ft),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Xe,onChange:function(Bt){return Ft("details",ot,Bt)}}):d.a.createElement("div",{className:x.a.htmlWrap,onClick:function(){return Ft("edit",ot,ft)}},d.a.createElement(m.a,{value:Xe}))),ft>1&&d.a.createElement(Se.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(x.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Ft("deleteQus",ot,ft)}})),ft<7&&ft===(Pt==null||((Dt=Pt.qusList)===null||Dt===void 0)?void 0:Dt.length)-1&&d.a.createElement(Se.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(x.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Ft("addQus",ot)}})))}),d.a.createElement("p",{className:"mb10 mt10"},d.a.createElement("span",{className:x.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(de.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Pt.analysis,onChange:function(ft){return Ft("analysis",ot,ft)}})))}))},wt=Object(P.a)(function(Ue){var E=Ue.loading,T=Ue.globalSetting;return{globalSetting:T,loading:E.effects}},null,null,{forwardRef:!0})(Object(I.forwardRef)(Re)),mt=function(E){var T,k,p,g,w,C,J,ae,se=E.data,rt=E.submit,ze=E.goBack,Te=E.loading,Ot=E.onTypeScore,kt=E.editPreview,it=kt===void 0?!1:kt,Kt=E.onSkipExamination,He=E.selectValue,zt=E.onExchange,Ut=Object(I.useRef)(),gt=Object(I.useRef)(Object(R.debounce)(function(){return qt()},100,{leading:!0,trailing:!0})),Ft=Object(I.useState)(null),Pt=Object(te.a)(Ft,2),ot=Pt[0],Qe=Pt[1],Xe=Object(I.useState)(!1),ft=Object(te.a)(Xe,2),Tt=ft[0],Dt=ft[1],Zt=Object(L.i)();Object(I.useEffect)(function(){return window.addEventListener("scroll",gt==null?void 0:gt.current),function(){window.removeEventListener("scroll",gt==null?void 0:gt.current)}},[]),Object(I.useEffect)(function(){Dt(!0)},[]),Object(I.useEffect)(function(){var bt,ce,Ve,At,Ct=(bt=document.getElementById("examName"))===null||bt===void 0||((ce=bt.getElementsByClassName("ant-pagination-options-quick-jumper"))===null||ce===void 0||((Ve=ce[0])===null||Ve===void 0||((At=Ve.childNodes)===null||At===void 0)))?void 0:At[2];Ct&&(Ct.nodeValue="\u4EFD")},[se]);var Bt=function(ce){var Ve=parseInt(ce);return isNaN(Ve)?"":Ve};function ut(){var bt=0,ce=0,Ve=0;return document.body&&(ce=document.body.scrollTop),document.documentElement&&(Ve=document.documentElement.scrollTop),bt=ce-Ve>0?ce:Ve,bt}function Yt(){var bt=0,ce=0,Ve=0;return document.body&&(ce=document.body.scrollHeight),document.documentElement&&(Ve=document.documentElement.scrollHeight),bt=ce-Ve>0?ce:Ve,bt}function yt(){var bt=0;return document.compatMode=="CSS1Compat"?bt=document.documentElement.clientHeight:bt=document.body.clientHeight,bt}var qt=function(){var ce=document.getElementById("preview_btns"),Ve=document.getElementById("preview_btns_else");ut()+yt()>=Yt()-68?(ce.style.visibility="hidden",Ve.style.visibility="visible"):(ce.style.visibility="visible",Ve.style.visibility="hidden")},Lt=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],en=function(ce){var Ve,At=[];return d.a.createElement(d.a.Fragment,null,d.a.createElement("aside",{className:b.a.single},ce==null||((Ve=ce.choices)===null||Ve===void 0)?void 0:Ve.map(function(Ct,Et){return Ct.is_answer&&At.push(We[Et]),d.a.createElement("ul",{key:Et},d.a.createElement("li",null,We[Et],"\u3001"),d.a.createElement("li",null,d.a.createElement(m.a,{value:Ct.choice_text})))})),d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",At.join(""),d.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Lt[ce.difficulty])),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(m.a,{value:ce.analysis?ce.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(ce==null?void 0:ce.discipline_name,"/").concat(ce==null?void 0:ce.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ce==null?void 0:ce.tag_discipline_name))))},Mn=function(ce){var Ve,At=ce==null||((Ve=ce.standard_answer)===null||Ve===void 0)?void 0:Ve.map(function(Ct){var Et;return"\u7B54\u6848\uFF08\u586B\u7A7A".concat(Ct.position,"\uFF09\uFF1A").concat(Ct==null||((Et=Ct.answer_text)===null||Et===void 0)?void 0:Et.join("\u3001"))});return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",At),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(m.a,{value:ce.analysis?ce.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(ce==null?void 0:ce.discipline_name,"/").concat(ce==null?void 0:ce.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ce==null?void 0:ce.tag_discipline_name))))},Vt=function(ce){var Ve;return d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",ce==null||((Ve=ce.answer_texts)===null||Ve===void 0)?void 0:Ve[0]),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(m.a,{value:ce.analysis?ce.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(ce==null?void 0:ce.discipline_name,"/").concat(ce==null?void 0:ce.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ce==null?void 0:ce.tag_discipline_name)))},Ie=function(ce){var Ve;return d.a.createElement("div",{className:b.a.analysis},d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u9884\u671F\u8F93\u51FA:"),d.a.createElement(m.a,{value:ce==null||((Ve=ce.program_attr)===null||Ve===void 0)?void 0:Ve.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(ce==null?void 0:ce.discipline_name,"/").concat(ce==null?void 0:ce.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ce==null?void 0:ce.tag_discipline_name)))},Ye=function(ce,Ve){var At;return d.a.createElement("div",null,ce==null||((At=ce.sub_item_banks)===null||At===void 0)?void 0:At.map(function(Ct,Et){var Rt,an=[];return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},Ve+1+"."+(Et+1),"\uFF08\u5355\u9009\u9898\uFF09",Ct.name),d.a.createElement("aside",{className:b.a.single},Ct==null||((Rt=Ct.choices)===null||Rt===void 0)?void 0:Rt.map(function(yn,dn){return yn.is_answer&&an.push(We[dn]),d.a.createElement("ul",{key:dn},d.a.createElement("li",null,We[dn],"\u3001"),d.a.createElement("li",null,d.a.createElement(m.a,{value:yn.choice_text})))})),d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",an.join(""),d.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Lt[Ct.difficulty])),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(m.a,{value:Ct.analysis?Ct.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(ce==null?void 0:ce.discipline_name,"/").concat(ce==null?void 0:ce.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ce==null?void 0:ce.tag_discipline_name))))}))},We=["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"],on=function(ce){console.log("---",ce);var Ve=[];ce.questions.map(function(Ct){return Ct==null?void 0:Ct.sub_item_banks.map(function(Et){Ve.push(Et)})});var At=0;ce.type==="COMBINATION"?At=ce.questions_score/Ve.length:At=ce.questions_score/ce.questions_count,h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:d.a.createElement("div",{className:b.a.modalColumn},d.a.createElement("div",{className:b.a.modalRow,style:{justifyContent:"flex-start"}},d.a.createElement("sup",{className:b.a.sup},"*"),d.a.createElement("span",null,ce==null?void 0:ce.name,(ce==null?void 0:ce.type)==="COMBINATION"&&"\u4E2D\u7684\u6BCF\u5C0F\u9898","\uFF1A"),d.a.createElement(D.a,{min:1,parser:Bt,defaultValue:At,onChange:function(Et){At=Et}}),d.a.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ct=Object(M.a)(Z.a.mark(function Rt(){var an,yn;return Z.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:if(At){Sn.next=3;break}return z.b.warn("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Sn.abrupt("return",Promise.reject());case 3:ce.type==="COMBINATION"?(an={type:ce==null?void 0:ce.type,score:At,scoreTotal:At*(Ve==null?void 0:Ve.length)},Ot(an)):(yn={type:ce==null?void 0:ce.type,score:At,scoreTotal:At*ce.questions_count},Ot(yn));case 4:case"end":return Sn.stop()}},Rt)}));function Et(){return Ct.apply(this,arguments)}return Et}()})},mn=function(){var ce="";h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:d.a.createElement("div",{className:b.a.modalColumn},d.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20"},d.a.createElement("img",{style:{marginRight:5},src:X.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:b.a.modalRow,style:{marginTop:20}},d.a.createElement("sup",{className:b.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:ce,onChange:function(At){ce=At.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ve=Object(M.a)(Z.a.mark(function Ct(){var Et,Rt,an,yn,dn;return Z.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:if(ce){Xn.next=3;break}return z.b.warn("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Xn.abrupt("return",Promise.reject());case 3:return Rt=[],an=[],yn=[],se==null||((Et=se.questionList)===null||Et===void 0)||Et.forEach(function(xn){var Jn;(Jn=xn.questions)===null||Jn===void 0||Jn.forEach(function(Ha){Rt.push(Ha.id),an.push(xn.questions_score/xn.questions_count),xn.type==="COMBINATION"&&yn.push({id:Ha.id,sub_item_bank_ids:Ha.sub_item_banks.map(function(Yn){return Yn.id})})})}),console.log("-----",yn),dn={item_bank_ids:Rt,item_bank_scores:an,name:ce,combination_item_banks:yn},Xn.next=11,rt(dn);case 11:case"end":return Xn.stop()}},Ct)}));function At(){return Ve.apply(this,arguments)}return At}()})},En=function(ce,Ve,At,Ct){var Et,Rt=(Et=Ct.questions)===null||Et===void 0?void 0:Et.map(function(yn){return yn.id}),an=h.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 yn=Object(M.a)(Z.a.mark(function Sn(){return Z.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return an.update({cancelButtonProps:{disabled:!0}}),xn.next=3,zt({single_question_id:ce,seleted_item_bank_ids:Rt},{type:Ve,index:At});case 3:an.update({cancelButtonProps:{disabled:!1}}),z.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898");case 5:case"end":return xn.stop()}},Sn)}));function dn(){return yn.apply(this,arguments)}return dn}()})},kn=function(ce){var Ve,At=(Ve=ce.questions)===null||Ve===void 0?void 0:Ve.map(function(Rt){return Rt.id}),Ct=ce.name,Et=h.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362".concat(Ct,"\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Rt=Object(M.a)(Z.a.mark(function yn(){return Z.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:return Et.update({cancelButtonProps:{disabled:!0}}),Sn.next=3,zt({seleted_item_bank_ids:At},{type:ce.type});case 3:Et.update({cancelButtonProps:{disabled:!1}}),z.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210".concat(Ct,"\u8BD5\u9898"));case 5:case"end":return Sn.stop()}},yn)}));function an(){return Rt.apply(this,arguments)}return an}()})},jt=function(){var ce=h.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 Ve=Object(M.a)(Z.a.mark(function Ct(){return Z.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return ce.update({cancelButtonProps:{disabled:!0}}),Rt.next=3,zt();case 3:ce.update({cancelButtonProps:{disabled:!1}}),z.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898");case 5:case"end":return Rt.stop()}},Ct)}));function At(){return Ve.apply(this,arguments)}return At}()})},Ka=function(ce){console.log(ce,"key"),Kt(ce-1)},Da=function(){return d.a.createElement(d.a.Fragment,null,d.a.createElement(S.a,{color:"#55575D",overlayClassName:b.a.popover,visible:Tt,getPopupContainer:function(Ve){return Ve==null?void 0:Ve.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(W.a,{onMouseEnter:function(){return Dt(!0)},onMouseLeave:function(){return Dt(!1)},onClick:function(){mn()}},"\u4FDD\u5B58")),d.a.createElement(W.a,{onClick:function(){document.body.scrollIntoView(),ze()}},"\u8FD4\u56DE"),d.a.createElement(W.a,{loading:Te,onClick:function(){return rt()},type:"primary"},"\u63D0\u4EA4"))},vn=function(){var ce;return d.a.createElement(d.a.Fragment,null,d.a.createElement(W.a,{onClick:ze},"\u8FD4\u56DE"),He>0&&d.a.createElement(W.a,{onClick:function(){return Ka(He)},type:"primary"},"\u4E0A\u4E00\u4EFD"),He<(se==null||((ce=se.exam)===null||ce===void 0)?void 0:ce.total_num)-1&&d.a.createElement(W.a,{onClick:function(){return Ka(He+2)}},"\u4E0B\u4E00\u4EFD"))},In=function(ce,Ve){if(console.log(ce,222),Ve==="SINGLE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(at,{ref:Ut,editData:ce,isEdit:!0}),d.a.createElement(fe.a,null));if(Ve==="MULTIPLE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Me,{ref:Ut,editData:ce,isEdit:!0}),d.a.createElement(fe.a,null));if(Ve==="JUDGMENT")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Ne,{ref:Ut,editData:ce,isEdit:!0}),d.a.createElement(fe.a,null));if(Ve==="COMPLETION")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Fe,{ref:Ut,editData:ce,isEdit:!0}),d.a.createElement(fe.a,null));if(Ve==="SUBJECTIVE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(_t,{ref:Ut,editData:ce,isEdit:!0}),d.a.createElement(fe.a,null));if(Ve==="COMBINATION")return d.a.createElement(d.a.Fragment,null,d.a.createElement(wt,{ref:Ut,editData:ce,isEdit:!0}),d.a.createElement(fe.a,null));if(Ve==="PROGRAM"){var At;P.d.push("/problems/".concat(ce==null||((At=ce.program_attr)===null||At===void 0)?void 0:At.identifier,"/edit?type=exercises&express_id=").concat(Zt.categoryId,"&question_id=").concat(ce==null?void 0:ce.id,"&score=").concat(ce==null?void 0:ce.score,"&callback_url=").concat(location.pathname,"&select=").concat(He,"&exercise=true"))}},Za=function(){var bt=Object(M.a)(Z.a.mark(function ce(Ve,At){var Ct,Et,Rt,an,yn,dn,Sn,Xn,xn,Jn;return Z.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return Yn.next=2,(Ct=Ut.current)===null||Ct===void 0?void 0:Ct.onSave();case 2:if(Et=Yn.sent,Et){Yn.next=5;break}return Yn.abrupt("return");case 5:return Rt={question_score:At.score,analysis:Et.analysis},console.log(Et,"editorData"),(Ve==="SINGLE"||Ve==="MULTIPLE"||Ve==="JUDGMENT")&&(yn=[],dn=[],Rt.question_type=Ve==="JUDGMENT"?2:1,Rt.question_title=Et==null?void 0:Et.name,Et==null||((an=Et.choices)===null||an===void 0)||an.forEach(function(On,Ma){yn.push(On.choice_text),On!=null&&On.is_answer&&dn.push(Ma+1)}),Rt.question_choices=yn,Rt.standard_answers=dn),Ve==="COMPLETION"&&(Rt.is_ordered=Et.is_ordered,Rt.question_title=Et==null?void 0:Et.name,Rt.question_type=3,Xn=[],Et==null||((Sn=Et.standard_answers)===null||Sn===void 0)||Sn.forEach(function(On,Ma){Xn.push({choice_id:On.position,answer_text:On.answer_text})}),Rt.standard_answers=Xn),Ve==="SUBJECTIVE"&&(Rt.question_title=Et==null?void 0:Et.name,Rt.question_type=3,Rt.standard_answers=Et==null?void 0:Et.answer_texts),Ve==="COMBINATION"&&(Rt.question_title=Et==null?void 0:Et.name,Rt.question_type=7,Rt.sub_questions=Et==null||((xn=Et.sub_item_banks)===null||xn===void 0)?void 0:xn.map(function(On,Ma){return{id:On.id,question_title:On.name,question_type:1,question_choices:On.choices.map(function(ga){return ga.choice_text}),standard_answers:[On.choices.findIndex(function(ga){return ga.is_answer})+1],analysis:On.analysis}}),delete Rt.analysis),Yn.next=13,Object(_.a)("/api/exercise_questions/".concat(At.id,".json"),{method:"put",body:Rt});case 13:Jn=Yn.sent,(Jn==null?void 0:Jn.status)===0&&(z.b.success("\u7F16\u8F91\u6210\u529F"),Ka(He+1)),Qe(null);case 16:case"end":return Yn.stop()}},ce)}));return function(Ve,At){return bt.apply(this,arguments)}}(),za=function(){for(var ce=[],Ve=0;Ve<(se==null||((At=se.exam)===null||At===void 0)?void 0:At.total_num);Ve++){var At;ce.push({})}return ce};console.log(za(),"data");var wn=se==null||((T=se.questionList)===null||T===void 0)?void 0:T.reduce(function(bt,ce){return bt+ce.questions_score},0),Aa=it&&(se==null||((k=se.exam)===null||k===void 0)?void 0:k.exercise_status)!==1;return d.a.createElement("section",{className:b.a.wrap},d.a.createElement("div",{id:"id_left_preview",className:b.a.left,onMouseEnter:function(ce){var Ve=document.getElementById("id_left_preview");Ve.style.overflowY="auto"},onMouseLeave:function(ce){var Ve=document.getElementById("id_left_preview");Ve.style.overflowY="hidden"}},d.a.createElement("div",{className:b.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:b.a.total},d.a.createElement("div",null,d.a.createElement("img",{src:ue.a}),d.a.createElement("span",null,"\u9898\u6570(\u9053)"),d.a.createElement("aside",null,se==null?void 0:se.all_questions_count)),d.a.createElement("div",{className:"mr30 ml30"},d.a.createElement("img",{src:ye.a}),d.a.createElement("span",null,"\u603B\u5206(\u5206)"),d.a.createElement("aside",null,wn)),d.a.createElement("div",null,d.a.createElement("img",{src:v.a}),d.a.createElement("span",null,"\u65F6\u957F(\u5206)"),d.a.createElement("aside",null,se==null||((p=se.exam)===null||p===void 0)?void 0:p.time))),se==null||((g=se.questionList)===null||g===void 0)?void 0:g.map(function(bt,ce){var Ve;return d.a.createElement("div",{className:b.a.list,key:ce},d.a.createElement("div",{className:b.a.name},d.a.createElement("b",null),d.a.createElement("span",null,bt.name)),d.a.createElement("aside",null,d.a.createElement("div",null,"\u5171",d.a.createElement("span",{className:b.a.b},bt.questions_count),"\u9898 ",d.a.createElement("span",{className:b.a.l},"|"),"\u5171",d.a.createElement("span",{className:b.a.r},bt.questions_score),"\u5206"),d.a.createElement("div",{className:b.a.answerSheet},bt==null||((Ve=bt.questions)===null||Ve===void 0)?void 0:Ve.map(function(At,Ct){return d.a.createElement("div",{onClick:function(){var Rt="Anchor_".concat(At.id),an=document.getElementById(Rt);an&&setTimeout(function(){return an.scrollIntoView({block:"center",behavior:"smooth"})})},key:At.id,className:b.a.tag},Ct+1)}))))})),d.a.createElement("div",{className:b.a.right},d.a.createElement("div",{className:b.a.examName,id:"examName"},d.a.createElement("div",{className:b.a.name},d.a.createElement(Se.a,{title:se==null||((w=se.exam)===null||w===void 0)?void 0:w.name,getPopupContainer:function(ce){return ce.parentNode}},d.a.createElement("span",{className:b.a.t},se==null||((C=se.exam)===null||C===void 0)?void 0:C.name))),it?d.a.createElement(we.a,{showTotal:function(ce){return d.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"\u5171\u8BA1",d.a.createElement("span",{className:"c-light-primary"},ce),"\u4EFD\u8BD5\u5377")},total:se==null||((J=se.exam)===null||J===void 0)?void 0:J.total_num,pageSize:1,current:He+1,showSizeChanger:!1,onChange:Ka,showQuickJumper:!0,hideOnSinglePage:!1}):d.a.createElement(W.a,{onClick:jt,type:"primary"},"\u968F\u673A\u66F4\u6362")),d.a.createElement("div",{className:b.a.topWarp},se==null||((ae=se.questionList)===null||ae===void 0)?void 0:ae.map(function(bt,ce){var Ve,At;return d.a.createElement(d.a.Fragment,{key:ce},d.a.createElement("div",{className:b.a.head,style:ce===0?{border:0,marginTop:-16}:{}},d.a.createElement("div",{className:b.a.name},d.a.createElement("b",null),d.a.createElement("span",null,bt.name)),d.a.createElement("div",{className:b.a.so},"\u5171",d.a.createElement("span",{className:b.a.b},bt.questions_count," "),"\u9898 ",bt.type==="COMBINATION"&&"\uFF08\u5305\u542B".concat(bt==null||((Ve=bt.questions)===null||Ve===void 0)?void 0:Ve.map(function(Ct){var Et;return Ct==null||((Et=Ct.sub_item_banks)===null||Et===void 0)?void 0:Et.length}).reduce(function(Ct,Et){return Ct+Et}),"\u5C0F\u9898\uFF09"),d.a.createElement("span",{className:b.a.l},"|"),"\u5171",d.a.createElement("span",{className:b.a.r},bt.questions_score),"\u5206"),!it&&d.a.createElement("div",{className:b.a.btn},d.a.createElement(W.a,{onClick:function(){on(bt)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),d.a.createElement(W.a,{onClick:function(){return kn(bt)},type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),bt==null||((At=bt.questions)===null||At===void 0)?void 0:At.map(function(Ct,Et){return ot===Ct.id?d.a.createElement("div",{id:"Anchor_".concat(Ct.id),className:b.a.content,style:{padding:0,marginTop:10},key:Ct.id},d.a.createElement("div",{style:{float:"right",marginTop:-6}},d.a.createElement(W.a,{onClick:function(){return Qe(null)},className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),d.a.createElement(W.a,{onClick:function(){return Za(bt==null?void 0:bt.type,Ct)},type:"primary"},"\u4FDD\u5B58")),In(Ct,bt.type)):d.a.createElement("div",{id:"Anchor_".concat(Ct.id),className:b.a.content,key:Ct.id},d.a.createElement("div",{className:b.a.titleWrap},d.a.createElement(m.a,{style:{paddingRight:10},className:b.a.titleHtml,value:Et+1+"\u3001"+"".concat((Ct==null?void 0:Ct.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+Ct.name}),it&&d.a.createElement(W.a,{disabled:Aa,onClick:function(){if(ot){z.b.warn("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Qe(Ct.id)},type:"primary",className:"mr20",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),d.a.createElement(W.a,{disabled:Aa,onClick:function(){return En(Ct.id,bt.type,Et,bt)},type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(bt.type==="SINGLE"||bt.type==="JUDGMENT"||bt.type==="MULTIPLE")&&en(Ct),bt.type==="COMPLETION"&&Mn(Ct),bt.type==="SUBJECTIVE"&&Vt(Ct),bt.type==="PROGRAM"&&Ie(Ct),bt.type==="COMBINATION"&&Ye(Ct,Et),d.a.createElement("div",null))}))})),d.a.createElement("div",{className:b.a.btnsElse,id:"preview_btns_else"},it?vn():Da()),d.a.createElement("div",{className:b.a.btnsWrap,id:"preview_btns"},d.a.createElement("div",{className:b.a.btns},it?vn():Da()))))},ke=je.a=mt},sboe:function(Ge,je,l){"use strict";l.d(je,"a",function(){return re});var G=l("cDcd"),we=l.n(G),re=G.createContext(null)},tmPe:function(Ge,je,l){Ge.exports={flex_box_center:"flex_box_center___ivyUy",flex_space_between:"flex_space_between___1h8Qq",flex_box_vertical_center:"flex_box_vertical_center___3eC95",flex_box_center_end:"flex_box_center_end___nrhvX",flex_box_column:"flex_box_column___2po4_",customTree:"customTree___1LpRW",name:"name___17ZTs"}},vHTk:function(Ge,je,l){Ge.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);