(window.webpackJsonp=window.webpackJsonp||[]).push([[169,7,8],{"+NIl":function(Je,We,l){(function(G){G(l("VrN/"))})(function(G){"use strict";G.defineMode("stex",function(Oe,ie){"use strict";function Te(H,M){H.cmdState.push(M)}function Se(H){return H.cmdState.length>0?H.cmdState[H.cmdState.length-1]:null}function ce(H){var M=H.cmdState.pop();M&&M.closeBracket()}function K(H){for(var M=H.cmdState,A=M.length-1;A>=0;A--){var k=M[A];if(k.name=="DEFAULT")continue;return k}return{styleIdentifier:function(){return null}}}function S(H,M,A){return function(){this.name=H,this.bracketNo=0,this.style=M,this.styles=A,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(H,M){H.f=M}function J(H,M){var A;if(H.match(/^\\[a-zA-Z@]+/)){var k=H.current().slice(1);return A=y.hasOwnProperty(k)?y[k]:y.DEFAULT,A=new A,Te(M,A),W(M,le),A.style}if(H.match(/^\\[$&%#{}_]/))return"tag";if(H.match(/^\\[,;!\/\\]/))return"tag";if(H.match("\\["))return W(M,function(h,ee){return ne(h,ee,"\\]")}),"keyword";if(H.match("\\("))return W(M,function(h,ee){return ne(h,ee,"\\)")}),"keyword";if(H.match("$$"))return W(M,function(h,ee){return ne(h,ee,"$$")}),"keyword";if(H.match("$"))return W(M,function(h,ee){return ne(h,ee,"$")}),"keyword";var F=H.next();if(F=="%")return H.skipToEnd(),"comment";if(F=="}"||F=="]"){if(A=Se(M),A)A.closeBracket(F),W(M,le);else return"error";return"bracket"}else return F=="{"||F=="["?(A=y.DEFAULT,A=new A,Te(M,A),"bracket"):/\d/.test(F)?(H.eatWhile(/[\w.%]/),"atom"):(H.eatWhile(/[\w\-_]/),A=K(M),A.name=="begin"&&(A.argument=H.current()),A.styleIdentifier())}function ne(H,M,A){if(H.eatSpace())return null;if(A&&H.match(A))return W(M,J),"keyword";if(H.match(/^\\[a-zA-Z@]+/))return"tag";if(H.match(/^[a-zA-Z]+/))return"variable-2";if(H.match(/^\\[$&%#{}_]/))return"tag";if(H.match(/^\\[,;!\/]/))return"tag";if(H.match(/^[\^_&]/))return"tag";if(H.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(H.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var k=H.next();return k=="{"||k=="}"||k=="["||k=="]"||k=="("||k==")"?"bracket":k=="%"?(H.skipToEnd(),"comment"):"error"}function le(H,M){var A=H.peek(),k;return A=="{"||A=="["?(k=Se(M),k.openBracket(A),H.eat(A),W(M,J),"bracket"):/[ \t\r]/.test(A)?(H.eat(A),null):(W(M,J),ce(M),J(H,M))}return{startState:function(){var H=ie.inMathMode?function(M,A){return ne(M,A)}:J;return{cmdState:[],f:H}},copyState:function(H){return{cmdState:H.cmdState.slice(),f:H.f}},token:function(H,M){return M.f(H,M)},blankLine:function(H){H.f=J,H.cmdState.length=0},lineComment:"%"}}),G.defineMIME("text/x-stex","stex"),G.defineMIME("text/x-latex","stex")})},"+RXH":function(Je,We,l){Je.exports=l.p+"static/shu.a39bf729.svg"},"+yhJ":function(Je,We,l){Je.exports=l.p+"static/xixi.d492fb65.svg"},"0eGx":function(Je,We,l){Je.exports=l.p+"static/zhong.c1924b73.svg"},"19Vz":function(Je,We,l){(function(G){G(l("VrN/"))})(function(G){G.defineOption("placeholder","",function(S,y,W){var J=W&&W!=G.Init;if(y&&!J)S.on("blur",Se),S.on("change",ce),S.on("swapDoc",ce),G.on(S.getInputField(),"compositionupdate",S.state.placeholderCompose=function(){Te(S)}),ce(S);else if(!y&&J){S.off("blur",Se),S.off("change",ce),S.off("swapDoc",ce),G.off(S.getInputField(),"compositionupdate",S.state.placeholderCompose),Oe(S);var ne=S.getWrapperElement();ne.className=ne.className.replace(" CodeMirror-empty","")}y&&!S.hasFocus()&&Se(S)});function Oe(S){S.state.placeholder&&(S.state.placeholder.parentNode.removeChild(S.state.placeholder),S.state.placeholder=null)}function ie(S){Oe(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 Te(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?ie(S):Oe(S)},20)}function Se(S){K(S)&&ie(S)}function ce(S){var y=S.getWrapperElement(),W=K(S);y.className=y.className.replace(" CodeMirror-empty","")+(W?" CodeMirror-empty":""),W?ie(S):Oe(S)}function K(S){return S.lineCount()===1&&S.getLine(0)===""}})},"1eCo":function(Je,We,l){(function(G){G(l("VrN/"))})(function(G){"use strict";var Oe={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},ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};G.defineMode("xml",function(Te,Se){var ce=Te.indentUnit,K={},S=Se.htmlMode?Oe:ie;for(var y in S)K[y]=S[y];for(var y in Se)K[y]=Se[y];var W,J;function ne(v,L){function R(de){return L.tokenize=de,de(v,L)}var _=v.next();if(_=="<")return v.eat("!")?v.eat("[")?v.match("CDATA[")?R(M("atom","]]>")):null:v.match("--")?R(M("comment","-->")):v.match("DOCTYPE",!0,!0)?(v.eatWhile(/[\w\._\-]/),R(A(1))):null:v.eat("?")?(v.eatWhile(/[\w\._\-]/),L.tokenize=M("meta","?>"),"meta"):(W=v.eat("/")?"closeTag":"openTag",L.tokenize=le,"tag bracket");if(_=="&"){var B;return v.eat("#")?v.eat("x")?B=v.eatWhile(/[a-fA-F\d]/)&&v.eat(";"):B=v.eatWhile(/[\d]/)&&v.eat(";"):B=v.eatWhile(/[\w\.\-:]/)&&v.eat(";"),B?"atom":"error"}else return v.eatWhile(/[^&<]/),null}ne.isInText=!0;function le(v,L){var R=v.next();if(R==">"||R=="/"&&v.eat(">"))return L.tokenize=ne,W=R==">"?"endTag":"selfcloseTag","tag bracket";if(R=="=")return W="equals",null;if(R=="<"){L.tokenize=ne,L.state=ee,L.tagName=L.tagStart=null;var _=L.tokenize(v,L);return _?_+" tag error":"tag error"}else return/[\'\"]/.test(R)?(L.tokenize=H(R),L.stringStartCol=v.column(),L.tokenize(v,L)):(v.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function H(v){var L=function(R,_){for(;!R.eol();)if(R.next()==v){_.tokenize=le;break}return"string"};return L.isInAttribute=!0,L}function M(v,L){return function(R,_){for(;!R.eol();){if(R.match(L)){_.tokenize=ne;break}R.next()}return v}}function A(v){return function(L,R){for(var _;(_=L.next())!=null;){if(_=="<")return R.tokenize=A(v+1),R.tokenize(L,R);if(_==">")if(v==1){R.tokenize=ne;break}else return R.tokenize=A(v-1),R.tokenize(L,R)}return"meta"}}function k(v,L,R){this.prev=v.context,this.tagName=L,this.indent=v.indented,this.startOfLine=R,(K.doNotIndent.hasOwnProperty(L)||v.context&&v.context.noIndent)&&(this.noIndent=!0)}function F(v){v.context&&(v.context=v.context.prev)}function h(v,L){for(var R;;){if(!v.context)return;if(R=v.context.tagName,!K.contextGrabbers.hasOwnProperty(R)||!K.contextGrabbers[R].hasOwnProperty(L))return;F(v)}}function ee(v,L,R){return v=="openTag"?(R.tagStart=L.column(),ge):v=="closeTag"?q:ee}function ge(v,L,R){return v=="word"?(R.tagName=L.current(),J="tag",V):K.allowMissingTagName&&v=="endTag"?(J="tag bracket",V(v,L,R)):(J="error",ge)}function q(v,L,R){if(v=="word"){var _=L.current();return R.context&&R.context.tagName!=_&&K.implicitlyClosed.hasOwnProperty(R.context.tagName)&&F(R),R.context&&R.context.tagName==_||K.matchClosing===!1?(J="tag",j):(J="tag error",d)}else return K.allowMissingTagName&&v=="endTag"?(J="tag bracket",j(v,L,R)):(J="error",d)}function j(v,L,R){return v!="endTag"?(J="error",j):(F(R),ee)}function d(v,L,R){return J="error",j(v,L,R)}function V(v,L,R){if(v=="word")return J="attribute",b;if(v=="endTag"||v=="selfcloseTag"){var _=R.tagName,B=R.tagStart;return R.tagName=R.tagStart=null,v=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(_)?h(R,_):(h(R,_),R.context=new k(R,_,B==R.indented)),ee}return J="error",V}function b(v,L,R){return v=="equals"?N:(K.allowMissing||(J="error"),V(v,L,R))}function N(v,L,R){return v=="string"?m:v=="word"&&K.allowUnquoted?(J="string",V):(J="error",V(v,L,R))}function m(v,L,R){return v=="string"?m:V(v,L,R)}return{startState:function(v){var L={tokenize:ne,state:ee,indented:v||0,tagName:null,tagStart:null,context:null};return v!=null&&(L.baseIndent=v),L},token:function(v,L){if(!L.tagName&&v.sol()&&(L.indented=v.indentation()),v.eatSpace())return null;W=null;var R=L.tokenize(v,L);return(R||W)&&R!="comment"&&(J=null,L.state=L.state(W||R,v,L),J&&(R=J=="error"?R+" error":J)),R},indent:function(v,L,R){var _=v.context;if(v.tokenize.isInAttribute)return v.tagStart==v.indented?v.stringStartCol+1:v.indented+ce;if(_&&_.noIndent)return G.Pass;if(v.tokenize!=le&&v.tokenize!=ne)return R?R.match(/^(\s*)/)[0].length:0;if(v.tagName)return K.multilineTagIndentPastTag!==!1?v.tagStart+v.tagName.length+2:v.tagStart+ce*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/$/,blockCommentStart:"",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(v){v.state==N&&(v.state=V)},xmlCurrentTag:function(v){return v.tagName?{name:v.tagName,close:v.type=="closeTag"}:null},xmlCurrentContext:function(v){for(var L=[],R=v.context;R;R=R.prev)R.tagName&&L.push(R.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(Je,We,l){Je.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(Je,We,l){Je.exports=l.p+"static/sc.c1696770.svg"},"5MlY":function(Je,We,l){Je.exports=l.p+"static/sm.8ccb50bf.svg"},"6+eU":function(Je,We,l){"use strict";l.d(We,"a",function(){return j});var G=l("wx14"),Oe=l("rePB"),ie=l("VTBJ"),Te=l("1OyB"),Se=l("vuIU"),ce=l("Ji7U"),K=l("LK+K"),S=l("q1tI"),y=l.n(S),W=l("TSYQ"),J=l.n(W),ne=function(V){var b,N="".concat(V.rootPrefixCls,"-item"),m=J()(N,"".concat(N,"-").concat(V.page),(b={},Object(Oe.a)(b,"".concat(N,"-active"),V.active),Object(Oe.a)(b,V.className,!!V.className),Object(Oe.a)(b,"".concat(N,"-disabled"),!V.page),b)),v=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:m,onClick:v,onKeyPress:L,tabIndex:"0"},V.itemRender(V.page,"page",y.a.createElement("a",{rel:"nofollow"},V.page)))},le=ne,H={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(ce.a)(b,d);var V=Object(K.a)(b);function b(){var N;Object(Te.a)(this,b);for(var m=arguments.length,v=new Array(m),L=0;L=0||R.relatedTarget.className.indexOf("".concat(Q,"-next"))>=0))return;N.setState({goInputText:""}),de(N.getValidValue())},N.go=function(R){var _=N.state.goInputText;if(_==="")return;(R.keyCode===H.ENTER||R.type==="click")&&(N.setState({goInputText:""}),N.props.quickGo(N.getValidValue()))},N}return Object(Se.a)(b,[{key:"getValidValue",value:function(){var m=this.state,v=m.goInputText,L=m.current;return!v||isNaN(v)?L:Number(v)}},{key:"getPageSizeOptions",value:function(){var m=this.props,v=m.pageSize,L=m.pageSizeOptions;return L.some(function(R){return R.toString()===v.toString()})?L:L.concat([v.toString()]).sort(function(R,_){var B=isNaN(Number(R))?0:Number(R),de=isNaN(Number(_))?0:Number(_);return B-de})}},{key:"render",value:function(){var m=this,v=this.props,L=v.pageSize,R=v.locale,_=v.rootPrefixCls,B=v.changeSize,de=v.quickGo,Q=v.goButton,Ce=v.selectComponentClass,T=v.buildOptionText,c=v.selectPrefixCls,$=v.disabled,xe=this.state.goInputText,_e="".concat(_,"-options"),ke=Ce,Ee=null,pe=null,X=null;if(!B&&!de)return null;var P=this.getPageSizeOptions();if(B&&ke){var Z=P.map(function(O,C){return y.a.createElement(ke.Option,{key:C,value:O.toString()},(T||m.buildOptionText)(O))});Ee=y.a.createElement(ke,{disabled:$,prefixCls:c,showSearch:!1,className:"".concat(_e,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(L||P[0]).toString(),onChange:this.changeSize,getPopupContainer:function(C){return C.parentNode}},Z)}return de&&(Q&&(X=typeof Q=="boolean"?y.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:$,className:"".concat(_e,"-quick-jumper-button")},R.jump_to_confirm):y.a.createElement("span",{onClick:this.go,onKeyUp:this.go},Q)),pe=y.a.createElement("div",{className:"".concat(_e,"-quick-jumper")},R.jump_to,y.a.createElement("input",{disabled:$,type:"text",value:xe,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),R.page,X)),y.a.createElement("li",{className:"".concat(_e)},Ee,pe)}}]),b}(y.a.Component);M.defaultProps={pageSizeOptions:["10","20","50","100"]};var A=M,k=l("N2Kk");function F(){}function h(d){return typeof d=="number"&&isFinite(d)&&Math.floor(d)===d}function ee(d,V,b){return b}function ge(d,V,b){var N=typeof d=="undefined"?V.pageSize:d;return Math.floor((b.total-1)/N)+1}var q=function(d){Object(ce.a)(b,d);var V=Object(K.a)(b);function b(N){var m;Object(Te.a)(this,b),m=V.call(this,N),m.getJumpPrevPage=function(){return Math.max(1,m.state.current-(m.props.showLessItems?3:5))},m.getJumpNextPage=function(){return Math.min(ge(void 0,m.state,m.props),m.state.current+(m.props.showLessItems?3:5))},m.getItemIcon=function(B,de){var Q=m.props.prefixCls,Ce=B||y.a.createElement("button",{type:"button","aria-label":de,className:"".concat(Q,"-item-link")});return typeof B=="function"&&(Ce=y.a.createElement(B,Object(ie.a)({},m.props))),Ce},m.savePaginationNode=function(B){m.paginationNode=B},m.isValid=function(B){return h(B)&&B!==m.state.current},m.shouldDisplayQuickJumper=function(){var B=m.props,de=B.showQuickJumper,Q=B.pageSize,Ce=B.total;return Ce<=Q?!1:de},m.handleKeyDown=function(B){(B.keyCode===H.ARROW_UP||B.keyCode===H.ARROW_DOWN)&&B.preventDefault()},m.handleKeyUp=function(B){var de=m.getValidValue(B),Q=m.state.currentInputValue;de!==Q&&m.setState({currentInputValue:de}),B.keyCode===H.ENTER?m.handleChange(de):B.keyCode===H.ARROW_UP?m.handleChange(de-1):B.keyCode===H.ARROW_DOWN&&m.handleChange(de+1)},m.changePageSize=function(B){var de=m.state.current,Q=ge(B,m.state,m.props);de=de>Q?Q:de,Q===0&&(de=m.state.current),typeof B=="number"&&("pageSize"in m.props||m.setState({pageSize:B}),"current"in m.props||m.setState({current:de,currentInputValue:de})),m.props.onShowSizeChange(de,B),"onChange"in m.props&&m.props.onChange&&m.props.onChange(de,B)},m.handleChange=function(B){var de=m.props.disabled,Q=B;if(m.isValid(Q)&&!de){var Ce=ge(void 0,m.state,m.props);Q>Ce?Q=Ce:Q<1&&(Q=1),"current"in m.props||m.setState({current:Q,currentInputValue:Q});var T=m.state.pageSize;return m.props.onChange(Q,T),Q}return m.state.current},m.prev=function(){m.hasPrev()&&m.handleChange(m.state.current-1)},m.next=function(){m.hasNext()&&m.handleChange(m.state.current+1)},m.jumpPrev=function(){m.handleChange(m.getJumpPrevPage())},m.jumpNext=function(){m.handleChange(m.getJumpNextPage())},m.hasPrev=function(){return m.state.current>1},m.hasNext=function(){return m.state.current2?Q-2:0),T=2;T=L?_=L:_=Number(v),_}},{key:"getShowSizeChanger",value:function(){var m=this.props,v=m.showSizeChanger,L=m.total,R=m.totalBoundaryShowSizeChanger;return typeof v!="undefined"?v:L>R}},{key:"renderPrev",value:function(m){var v=this.props,L=v.prevIcon,R=v.itemRender,_=R(m,"prev",this.getItemIcon(L,"prev page")),B=!this.hasPrev();return Object(S.isValidElement)(_)?Object(S.cloneElement)(_,{disabled:B}):_}},{key:"renderNext",value:function(m){var v=this.props,L=v.nextIcon,R=v.itemRender,_=R(m,"next",this.getItemIcon(L,"next page")),B=!this.hasNext();return Object(S.isValidElement)(_)?Object(S.cloneElement)(_,{disabled:B}):_}},{key:"render",value:function(){var m=this,v=this.props,L=v.prefixCls,R=v.className,_=v.style,B=v.disabled,de=v.hideOnSinglePage,Q=v.total,Ce=v.locale,T=v.showQuickJumper,c=v.showLessItems,$=v.showTitle,xe=v.showTotal,_e=v.simple,ke=v.itemRender,Ee=v.showPrevNextJumpers,pe=v.jumpPrevIcon,X=v.jumpNextIcon,P=v.selectComponentClass,Z=v.selectPrefixCls,O=v.pageSizeOptions,C=this.state,re=C.current,De=C.pageSize,me=C.currentInputValue;if(de===!0&&Q<=De)return null;var te=ge(void 0,this.state,this.props),ye=[],ve=null,he=null,je=null,Ke=null,Ve=null,Me=T&&T.goButton,Ae=c?1:2,et=re-1>0?re-1:0,at=re+1=Ae*2&&re!==1+2&&(ye[0]=Object(S.cloneElement)(ye[0],{className:"".concat(L,"-item-after-jump-prev")}),ye.unshift(ve)),te-re>=Ae*2&&re!==te-2&&(ye[ye.length-1]=Object(S.cloneElement)(ye[ye.length-1],{className:"".concat(L,"-item-before-jump-next")}),ye.push(he)),Ot!==1&&ye.unshift(je),yt!==te&&ye.push(Ke)}var D=null;xe&&(D=y.a.createElement("li",{className:"".concat(L,"-total-text")},xe(Q,[Q===0?0:(re-1)*De+1,re*De>Q?Q:re*De])));var I=!this.hasPrev()||!te,w=!this.hasNext()||!te;return y.a.createElement("ul",Object(G.a)({className:J()(L,R,Object(Oe.a)({},"".concat(L,"-disabled"),B)),style:_,unselectable:"unselectable",ref:this.savePaginationNode},pt),D,y.a.createElement("li",{title:$?Ce.prev_page:null,onClick:this.prev,tabIndex:I?null:0,onKeyPress:this.runIfEnterPrev,className:J()("".concat(L,"-prev"),Object(Oe.a)({},"".concat(L,"-disabled"),I)),"aria-disabled":I},this.renderPrev(et)),ye,y.a.createElement("li",{title:$?Ce.next_page:null,onClick:this.next,tabIndex:w?null:0,onKeyPress:this.runIfEnterNext,className:J()("".concat(L,"-next"),Object(Oe.a)({},"".concat(L,"-disabled"),w)),"aria-disabled":w},this.renderNext(at)),y.a.createElement(A,{disabled:B,locale:Ce,rootPrefixCls:L,selectComponentClass:P,selectPrefixCls:Z,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:De,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Me}))}}],[{key:"getDerivedStateFromProps",value:function(m,v){var L={};if("current"in m&&(L.current=m.current,m.current!==v.current&&(L.currentInputValue=L.current)),"pageSize"in m&&m.pageSize!==v.pageSize){var R=v.current,_=ge(m.pageSize,v,m);R=R>_?_:R,"current"in m||(L.current=R,L.currentInputValue=R),L.pageSize=m.pageSize}return L}}]),b}(y.a.Component);q.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:F,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:F,locale:k.a,style:{},itemRender:ee,totalBoundaryShowSizeChanger:50};var j=q},"6K3P":function(Je,We,l){Je.exports=l.p+"static/jinshi.9b74f304.svg"},"7ahc":function(Je,We,l){"use strict";l.d(We,"a",function(){return ge});var G=l("k1fw"),Oe=l("0Owb"),ie=l("+L6B"),Te=l("2/Rp"),Se=l("y8nQ"),ce=l("Vl3Y"),K=l("tJVT"),S=l("OaEy"),y=l("2fM7"),W=l("q1tI"),J=l.n(W),ne=l("VrN/"),le=l.n(ne),H=l("p77/"),M=l.n(H),A=l("c5Ni"),k=l.n(A),F=y.a.Option,h={labelCol:{span:4},wrapperCol:{span:20}},ee={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"]};We.b=function(q){var j=q.callback,d=q.onCancel,V=Object(W.useState)("python"),b=Object(K.a)(V,2),N=b[0],m=b[1];function v(R){m(ee[R][1])}function L(R){j(R)}return J.a.createElement(ce.a,Object(Oe.a)({},h,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:L}),J.a.createElement(ce.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},J.a.createElement(y.a,{onChange:v},Object.keys(ee).map(function(R){return J.a.createElement(F,{key:R,value:R},ee[R][0])}))),J.a.createElement(ce.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},J.a.createElement(ge,{mode:N})),J.a.createElement("div",{className:"flex-container flex-end"},J.a.createElement(Te.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),J.a.createElement(Te.a,{type:"ghost",onClick:d},"\u53D6\u6D88")))};function ge(q){var j=q.value,d=q.onChange,V=q.mode,b=q.options,N=b===void 0?{}:b,m=Object(W.useRef)(),v=Object(W.useState)(),L=Object(K.a)(v,2),R=L[0],_=L[1];return Object(W.useEffect)(function(){if(R){function B(de){var Q=de.getValue();d&&d(Q)}return R.on("change",B),function(){R.off("change",B)}}},[R,d]),Object(W.useEffect)(function(){R&&R.setOption("mode",V)},[R,V]),Object(W.useEffect)(function(){R&&((j!==R.getValue()||j==="")&&setTimeout(function(){R.setValue(j||" ")},300))},[R,j]),Object(W.useEffect)(function(){if(m.current&&!R){var B=le.a.fromTextArea(m.current,Object(G.a)({mode:V,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},N));_(B)}},[m.current,R]),J.a.createElement("div",{className:"my-codemirror-container"},J.a.createElement("textarea",{ref:m}))}},"7ixt":function(Je,We,l){"use strict";l.d(We,"a",function(){return ie});var G={adjustX:1,adjustY:1},Oe=[0,0],ie={left:{points:["cr","cl"],overflow:G,offset:[-4,0],targetOffset:Oe},right:{points:["cl","cr"],overflow:G,offset:[4,0],targetOffset:Oe},top:{points:["bc","tc"],overflow:G,offset:[0,-4],targetOffset:Oe},bottom:{points:["tc","bc"],overflow:G,offset:[0,4],targetOffset:Oe},topLeft:{points:["bl","tl"],overflow:G,offset:[0,-4],targetOffset:Oe},leftTop:{points:["tr","tl"],overflow:G,offset:[-4,0],targetOffset:Oe},topRight:{points:["br","tr"],overflow:G,offset:[0,-4],targetOffset:Oe},rightTop:{points:["tl","tr"],overflow:G,offset:[4,0],targetOffset:Oe},bottomRight:{points:["tr","br"],overflow:G,offset:[0,4],targetOffset:Oe},rightBottom:{points:["bl","br"],overflow:G,offset:[4,0],targetOffset:Oe},bottomLeft:{points:["tl","bl"],overflow:G,offset:[0,4],targetOffset:Oe},leftBottom:{points:["br","bl"],overflow:G,offset:[-4,0],targetOffset:Oe}},Te=ie},"7qnI":function(Je,We,l){"use strict";var G=l("5Dmo"),Oe=l("3S7+"),ie=l("fWQN"),Te=l("mtLc"),Se=l("yKVA"),ce=l("879j"),K=l("5NDa"),S=l("5rEg"),y=l("q1tI"),W=l.n(y),J=l("O2Wb"),ne=l.n(J),le=S.a.TextArea,H=function(M){Object(Se.a)(k,M);var A=Object(ce.a)(k);function k(){return Object(ie.a)(this,k),A.apply(this,arguments)}return Object(Te.a)(k,[{key:"render",value:function(){var h=this,ee=this.props,ge=ee.index,q=ee.onAnswerChange,j=ee.addChildAnswer,d=ee.exerciseIsPublish,V=ee.answers,b=ee.activeOptionErrorIndex,N=ee.flex,m=N===void 0?"0 0 1000px":N;return W.a.createElement("div",{className:ne.a.flex},W.a.createElement("div",{className:"".concat(ne.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",ge+1,"):"),W.a.createElement("div",{className:"".concat(ne.a.flex," ").concat(ne.a.flex1),style:{flexDirection:"column"}},V.map(function(v,L){var R="".concat(ge,"-").concat(L);return W.a.createElement("div",{className:"".concat(ne.a.flex," ").concat(ne.a.flex1),key:L},W.a.createElement("div",{className:ne.a.flex1,style:{flex:m}},W.a.createElement("div",null,W.a.createElement(le,{className:R===b?ne.a.error:"",spellCheck:!1,rows:4,value:v||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(L==0?"":"(\u53EF\u9009)"),onChange:function(B){return q(ge,L,B.target.value)},style:{minHeight:95}}))),!d&&W.a.createElement(W.a.Fragment,null,L!=0&&W.a.createElement(Oe.a,{title:"\u5220\u9664"},W.a.createElement("i",{className:"".concat(ne.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return h.props.deleteChildAnswer(ge,L)},style:{float:"right"}})),L===0&&W.a.createElement(Oe.a,{title:"\u5220\u9664"},W.a.createElement("i",{className:"".concat(ne.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return h.props.deleteChildAnswermain(ge,L)},style:{float:"right"}})),W.a.createElement(Oe.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},W.a.createElement("i",{className:"".concat(ne.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return j(ge)},style:{float:"right",visibility:L==V.length-1?"":"hidden"}}))))})))}}]),k}(y.Component);We.a=H},"815F":function(Je,We,l){"use strict";l.d(We,"e",function(){return K}),l.d(We,"c",function(){return y}),l.d(We,"d",function(){return W}),l.d(We,"a",function(){return ne}),l.d(We,"f",function(){return le}),l.d(We,"b",function(){return H});var G=l("KQm4"),Oe=l("VTBJ"),ie=l("Ff2n"),Te=l("Zm9Q"),Se=l("Kwbf"),ce=l("OZM5");function K(M,A){return M!=null?M:A}function S(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=new Map;function k(F){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(F||[]).forEach(function(ee){var ge=ee.key,q=ee.children;Object(Se.a)(ge!=null,"Tree node must have a certain key: [".concat(h).concat(ge,"]"));var j=String(ge);Object(Se.a)(!A.has(j)||ge===null||ge===void 0,"Same 'key' exist in the Tree: ".concat(j)),A.set(j,!0),k(q,"".concat(h).concat(j," > "))})}k(M)}function y(M){function A(k){var F=Object(Te.a)(k);return F.map(function(h){if(!Object(ce.i)(h))return Object(Se.a)(!h,"Tree/TreeNode can only accept TreeNode as children."),null;var ee=h.key,ge=h.props,q=ge.children,j=Object(ie.a)(ge,["children"]),d=Object(Oe.a)({key:ee},j),V=A(q);return V.length&&(d.children=V),d}).filter(function(h){return h})}return A(M)}function W(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],k=new Set(A===!0?[]:A),F=[];function h(ee){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ee.map(function(q,j){var d=Object(ce.h)(ge?ge.pos:"0",j),V=K(q.key,d),b=Object(Oe.a)(Object(Oe.a)({},q),{},{parent:ge,pos:d,children:null,data:q,isStart:[].concat(Object(G.a)(ge?ge.isStart:[]),[j===0]),isEnd:[].concat(Object(G.a)(ge?ge.isEnd:[]),[j===ee.length-1])});return F.push(b),A===!0||k.has(V)?b.children=h(q.children||[],b):b.children=[],b})}return h(M),F}function J(M,A,k){var F;k?typeof k=="string"?F=function(ge){return ge[k]}:typeof k=="function"&&(F=function(ge){return k(ge)}):F=function(ge,q){return K(ge.key,q)};function h(ee,ge,q){var j=ee?ee.children:M,d=ee?Object(ce.h)(q.pos,ge):"0";if(ee){var V=F(ee,d),b={node:ee,index:ge,pos:d,key:V,parentPos:q.node?q.pos:null,level:q.level+1};A(b)}j&&j.forEach(function(N,m){h(N,m,{node:ee,pos:d,level:q?q.level+1:-1})})}h(null)}function ne(M){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=A.initWrapper,F=A.processEntity,h=A.onProcessFinished,ee=arguments.length>2?arguments[2]:void 0,ge={},q={},j={posEntities:ge,keyEntities:q};return k&&(j=k(j)||j),J(M,function(d){var V=d.node,b=d.index,N=d.pos,m=d.key,v=d.parentPos,L=d.level,R={node:V,index:b,key:m,pos:N,level:L},_=K(m,N);ge[N]=R,q[_]=R,R.parent=ge[v],R.parent&&(R.parent.children=R.parent.children||[],R.parent.children.push(R)),F&&F(R,j)},ee),h&&h(j),j}function le(M,A){var k=A.expandedKeys,F=A.selectedKeys,h=A.loadedKeys,ee=A.loadingKeys,ge=A.checkedKeys,q=A.halfCheckedKeys,j=A.dragOverNodeKey,d=A.dropPosition,V=A.keyEntities,b=V[M],N={eventKey:M,expanded:k.indexOf(M)!==-1,selected:F.indexOf(M)!==-1,loaded:h.indexOf(M)!==-1,loading:ee.indexOf(M)!==-1,checked:ge.indexOf(M)!==-1,halfChecked:q.indexOf(M)!==-1,pos:String(b?b.pos:""),dragOver:j===M&&d===0,dragOverGapTop:j===M&&d===-1,dragOverGapBottom:j===M&&d===1};return N}function H(M){var A=M.data,k=M.expanded,F=M.selected,h=M.checked,ee=M.loaded,ge=M.loading,q=M.halfChecked,j=M.dragOver,d=M.dragOverGapTop,V=M.dragOverGapBottom,b=M.pos,N=M.active,m=Object(Oe.a)(Object(Oe.a)({},A),{},{expanded:k,selected:F,checked:h,loaded:ee,loading:ge,halfChecked:q,dragOver:j,dragOverGapTop:d,dragOverGapBottom:V,pos:b,active:N});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(Se.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),M}}),m}},"8EBN":function(Je,We,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 Oe=0;Oe-1&&Te.substring(K+1,Te.length);if(S)return G.findModeByExtension(S)},G.findModeByName=function(Te){Te=Te.toLowerCase();for(var Se=0;Se=ke.length?Ee.slice(ke.length):Ee}).join(` `)}var W=[],J=["
    "],ne=new K.a.Renderer,le=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function H(){W.length=0,J=["
      "]}var M={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function A($,xe,_e,ke){if(xe>=$.length||$[xe].level<=_e)return xe;var Ee=$[xe];ke.push("
    • "+Ee.text+""),xe++;var pe=[];return xe=A($,xe,Ee.level,pe),pe.length>0&&(ke.push("
        "),pe.forEach(function(X){ke.push(X)}),ke.push("
      ")),ke.push("
    • "),xe=A($,xe,_e,ke),xe}function k(){return A(W,0,0,J),J.push("
    "),J.join("")}var F={heading:function(xe){var _e=le.exec(xe);if(_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},fences:function(xe){var _e=this.rules.block.fences.exec(xe);if(_e){var ke=_e[0],Ee=y(ke,_e[3]||""),pe=_e[2]?_e[2].trim():_e[2];if(["latex","katex","math"].indexOf(pe)>=0){var X=ge(),P=Ee;Ee=X,q[X]={type:"block",expression:P}}return{type:"code",raw:ke,lang:pe,text:Ee}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,ee=0,ge=function(){return"__special_katext_id_".concat(ee++,"__")},q={};function j(){return q}function d(){ee=0,q={}}function V($){return $=$.replace(h,function(xe,_e){var ke=ge();return q[ke]={type:"inline",expression:_e},ke}),$}var b=ne.listitem;ne.listitem=function($){return b(V($))};var N=ne.paragraph;ne.paragraph=function($){return N(V($))};var m=ne.tablecell;ne.tablecell=function($,xe){return m(V($),xe)},ne.code=function($,xe,_e){var ke=(xe||"").match(/\S*/)[0];return ke?["latex","katex","math"].indexOf(ke)>=0?"

    ".concat($,"

    "):'
    ').concat(_e?$:Object(S.escape)($,!0),`
    `):'
    '+(_e?$:Object(S.escape)($,!0))+"
    "},ne.heading=function($,xe,_e){var ke=this.options.headerPrefix+_e.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return W.push({anchor:ke,level:xe,text:$}),"'+$+""},K.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),K.a.use({tokenizer:F,renderer:ne});var v=K.a,L=l("SJMd"),R=l("ulZh"),_=l.n(R),B=l("m3rI"),de=l("Oy/b"),Q=l("p5ED"),Ce=/]*>/g;function T($){var xe=document.createElement("div");return xe.innerHTML=$,xe.childNodes.length===0?"":xe.childNodes[0].nodeValue}var c=We.a=function($){var xe,_e=$.value,ke=_e===void 0?"":_e,Ee=$.className,pe=$.showTextOnly,X=$.showLines,P=$.style,Z=P===void 0?{}:P,O=$.stylesPrev,C=O===void 0?{}:O,re=(xe=String(ke))===null||xe===void 0?void 0:xe.replace(/|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),De=Object(ie.useState)(""),me=Object(Oe.a)(De,2),te=me[0],ye=me[1],ve=Object(ie.useMemo)(function(){try{var Ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Me=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ae=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;re=re.replace(Ve,"("+B.a.API_SERVER+"/api/attachments/").replace(Me,'"'+B.a.API_SERVER+"/api/attachments/").replace(Ae,'"'+B.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,` `),re=re.replace(new RegExp("(?[TOC]

    ",k()),H()),et=et.replace(/(__special_katext_id_\d+__)/g,function(ot,wt){var bt=at[wt],dt=bt.type,Re=bt.expression;return Object(de.renderToString)(T(Re)||"",{displayMode:dt==="block",throwOnError:!1,output:"html"})}),et=et.replace(/▁/g,"\u2581\u2581\u2581"),d(),pe){var pt=document.createElement("div");return pt.innerHTML=et,pt.innerText}return setTimeout(function(){return Ke()},500),et},[re]),he=Object(ie.useRef)();M.WebkitLineClamp=X,X&&(Z=Object(G.a)(Object(G.a)({},Z),M));function je(Ve){var Me=Ve.target;if(Me.tagName.toUpperCase()==="A"){var Ae=Me.getAttribute("href");if(Ae.indexOf("office")>-1)Ve.preventDefault(),ye(Ae);else if(Ae.startsWith("#")){Ve.preventDefault();var et=document.getElementById(Ae.replace("#",""));et&&et.scrollIntoView(!0)}}}var Ke=function(){var Me,Ae=(Me=he.current)===null||Me===void 0?void 0:Me.querySelectorAll("video");Ae==null||Ae.forEach(function(et){if(et.oncontextmenu=function(){return!1},et.src.indexOf(".m3u8")>-1&&!et.canPlayType("application/vnd.apple.mpegurl")){if(_.a.isSupported()){var at=new _.a;at.loadSource(et.src),at.attachMedia(et)}}})};return Object(ie.useEffect)(function(){if(he.current&&ve&&(ve.match(Ce)&&window.PR.prettyPrint()),he.current)return he.current.addEventListener("click",je),function(){he.current.removeEventListener("click",je),d(),H()}},[ve,he.current,je]),Te.a.createElement(Te.a.Fragment,null,Te.a.createElement("div",{ref:he,style:Object(G.a)({},Z),className:"".concat(Ee||""," markdown-body "),dangerouslySetInnerHTML:{__html:ve}}),Te.a.createElement(Q.a,{close:!0,data:te,type:te!=null&&te.length?"office":"",style:Object(G.a)({},C),onClose:function(){return ye("")}}))}},"9VGf":function(Je,We,l){"use strict";l.d(We,"a",function(){return ie});var G=l("q1tI"),Oe=l.n(G);function ie(Te,Se){var ce=Object(G.useRef)();Object(G.useEffect)(function(){ce.current=Te}),Object(G.useEffect)(function(){function K(){ce.current()}if(Se!==null){var S=setInterval(K,Se);return function(){return clearInterval(S)}}},[Se])}},"A+k2":function(Je,We,l){Je.exports={tabs:"tabs___2hYAP",active:"active___2Xkwd"}},Bd2K:function(Je,We,l){(function(G){G(l("VrN/"),l("osHv"))})(function(G){G.defineOption("autoCloseTags",!1,function(y,W,J){if(J!=G.Init&&J&&y.removeKeyMap("autoCloseTags"),!W)return;var ne={name:"autoCloseTags"};(typeof W!="object"||W.whenClosing!==!1)&&(ne["'/'"]=function(le){return ce(le)}),(typeof W!="object"||W.whenOpening!==!1)&&(ne["'>'"]=function(le){return Te(le)}),y.addKeyMap(ne)});var Oe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ie=["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 Te(y){if(y.getOption("disableInput"))return G.Pass;for(var W=y.listSelections(),J=[],ne=y.getOption("autoCloseTags"),le=0;leH.ch&&(h=h.slice(0,h.length-M.end+H.ch));var j=h.toLowerCase();if(!h||M.type=="string"&&(M.end!=H.ch||!/[\"\']/.test(M.string.charAt(M.string.length-1))||M.string.length==1)||M.type=="tag"&&F.close||M.string.indexOf("/")==H.ch-M.start-1||ge&&K(ge,j)>-1||S(y,A.mode.xmlCurrentContext&&A.mode.xmlCurrentContext(k)||[],h,H,!0))return G.Pass;var d=typeof ne=="object"&&ne.emptyTags;if(d&&K(d,h)>-1){J[le]={text:"/>",newPos:G.Pos(H.line,H.ch+2)};continue}var V=q&&K(q,j)>-1;J[le]={indent:V,text:">"+(V?` `:"")+"",newPos:V?G.Pos(H.line+1,0):G.Pos(H.line,H.ch+1)}}for(var b=typeof ne=="object"&&ne.dontIndentOnAutoClose,le=W.length-1;le>=0;le--){var N=J[le];y.replaceRange(N.text,W[le].head,W[le].anchor,"+insert");var m=y.listSelections().slice(0);m[le]={head:N.newPos,anchor:N.newPos},y.setSelections(m),!b&&N.indent&&(y.indentLine(N.newPos.line,null,!0),y.indentLine(N.newPos.line+1,null,!0))}}function Se(y,W){for(var J=y.listSelections(),ne=[],le=W?"/":""&&(ge+=">"),ne[A]=ge}if(y.replaceSelections(ne),J=y.listSelections(),!M)for(var A=0;A=0&&W[k]==J;k--)++A;ne=M.to;for(var k=1;k0){for(var W=0;W1&&arguments[1]!==void 0?arguments[1]:"",W=[],J=0;JD.length)&&(I=D.length);for(var w=0,p=new Array(I);w=D.length?{done:!0}:{done:!1,value:D[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 w=D[Symbol.iterator](),w.next.bind(w)}function ce(D,I){return I={exports:{}},D(I,I.exports),I.exports}var K=ce(function(D){function I(){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 w(p){D.exports.defaults=p}D.exports={defaults:I(),getDefaults:I,changeDefaults:w}}),S=K.defaults,y=K.getDefaults,W=K.changeDefaults,J=/[&<>"']/,ne=/[&<>"']/g,le=/[<>"']|&(?!#?\w+;)/,H=/[<>"']|&(?!#?\w+;)/g,M={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(I){return M[I]};function k(D,I){if(I){if(J.test(D))return D.replace(ne,A)}else if(le.test(D))return D.replace(H,A);return D}var F=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function h(D){return D.replace(F,function(I,w){return w=w.toLowerCase(),w==="colon"?":":w.charAt(0)==="#"?w.charAt(1)==="x"?String.fromCharCode(parseInt(w.substring(2),16)):String.fromCharCode(+w.substring(1)):""})}var ee=/(^|[^\[])\^/g;function ge(D,I){D=D.source||D,I=I||"";var w={replace:function(g,E){return E=E.source||E,E=E.replace(ee,"$1"),D=D.replace(g,E),w},getRegex:function(){return new RegExp(D,I)}};return w}var q=/[^\w:]/g,j=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(D,I,w){if(D){var p;try{p=decodeURIComponent(h(w)).replace(q,"").toLowerCase()}catch(g){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}I&&!j.test(w)&&(w=v(I,w));try{w=encodeURI(w).replace(/%25/g,"%")}catch(g){return null}return w}var V={},b=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(D,I){V[" "+D]||(b.test(D)?V[" "+D]=D+"/":V[" "+D]=B(D,"/",!0)),D=V[" "+D];var w=D.indexOf(":")===-1;return I.substring(0,2)==="//"?w?I:D.replace(N,"$1")+I:I.charAt(0)==="/"?w?I:D.replace(m,"$1")+I:D+I}var L={exec:function(){}};function R(D){for(var I=1,w,p;I=0&&Y[ue]==="\\";)oe=!oe;return oe?"|":" |"}),p=w.split(/ \|/),g=0;if(p.length>I)p.splice(I);else for(;p.length=p.length?g.slice(p.length):g}).join(` `)}var pe=function(){function D(w){this.options=w||T}var I=D.prototype;return I.space=function(p){var g=this.rules.block.newline.exec(p);if(g)return g[0].length>1?{type:"space",raw:g[0]}:{raw:` `}},I.code=function(p,g){var E=this.rules.block.code.exec(p);if(E){var x=g[g.length-1];if(x&&x.type==="paragraph")return{raw:E[0],text:E[0].trimRight()};var Y=E[0].replace(/^ {4}/gm,"");return{type:"code",raw:E[0],codeBlockStyle:"indented",text:this.options.pedantic?Y:c(Y,` `)}}},I.fences=function(p){var g=this.rules.block.fences.exec(p);if(g){var E=g[0],x=Ee(E,g[3]||"");return{type:"code",raw:E,lang:g[2]?g[2].trim():g[2],text:x}}},I.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]}},I.nptable=function(p){var g=this.rules.block.nptable.exec(p);if(g){var E={type:"table",header:$(g[1].replace(/^ *| *\| *$/g,"")),align:g[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:g[3]?g[3].replace(/\n$/,"").split(` `):[],raw:g[0]};if(E.header.length===E.align.length){var x=E.align.length,Y;for(Y=0;Y ?/gm,"");return{type:"blockquote",raw:g[0],text:E}}},I.list=function(p){var g=this.rules.block.list.exec(p);if(g){for(var E=g[0],x=g[2],Y=x.length>1,oe=x[x.length-1]===")",ue={type:"list",raw:E,ordered:Y,start:Y?+x.slice(0,-1):"",loose:!1,items:[]},tt=g[0].match(this.rules.block.item),Ue=!1,Pe,vt,Dt,ht,Kt,Ge,Ht,Lt=tt.length,xt=0;xt1||this.options.smartLists&&Dt!==x)&&(ht=tt.slice(xt+1).join(` `),ue.raw=ue.raw.substring(0,ue.raw.length-ht.length),xt=Lt-1)),Kt=Ue||/\n\n(?!\s*$)/.test(Pe),xt!==Lt-1&&(Ue=Pe.charAt(Pe.length-1)===` `,Kt||(Kt=Ue)),Kt&&(ue.loose=!0),Ge=/^\[[ xX]\] /.test(Pe),Ht=void 0,Ge&&(Ht=Pe[1]!==" ",Pe=Pe.replace(/^\[[ xX]\] +/,"")),ue.items.push({type:"list_item",raw:E,task:Ge,checked:Ht,loose:Kt,text:Pe});return ue}},I.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]):xe(g[0]):g[0]}},I.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 E=g[1].toLowerCase().replace(/\s+/g," ");return{tag:E,raw:g[0],href:g[2],title:g[3]}}},I.table=function(p){var g=this.rules.block.table.exec(p);if(g){var E={type:"table",header:$(g[1].replace(/^ *| *\| *$/g,"")),align:g[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:g[3]?g[3].replace(/\n$/,"").split(` `):[]};if(E.header.length===E.align.length){E.raw=g[0];var x=E.align.length,Y;for(Y=0;Y/i.test(x[0])&&(g=!1),!E&&/^<(pre|code|kbd|script)(\s|>)/i.test(x[0])?E=!0:E&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(x[0])&&(E=!1),{type:this.options.sanitize?"text":"html",raw:x[0],inLink:g,inRawBlock:E,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(x[0]):xe(x[0]):x[0]}},I.link=function(p){var g=this.rules.inline.link.exec(p);if(g){var E=_e(g[2],"()");if(E>-1){var x=g[0].indexOf("!")===0?5:4,Y=x+g[1].length+E;g[2]=g[2].substring(0,E),g[0]=g[0].substring(0,Y).trim(),g[3]=""}var oe=g[2],ue="";if(this.options.pedantic){var tt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(oe);tt?(oe=tt[1],ue=tt[3]):ue=""}else ue=g[3]?g[3].slice(1,-1):"";oe=oe.trim().replace(/^<([\s\S]*)>$/,"$1");var Ue=ke(g,{href:oe&&oe.replace(this.rules.inline._escapes,"$1"),title:ue&&ue.replace(this.rules.inline._escapes,"$1")},g[0]);return Ue}},I.reflink=function(p,g){var E;if((E=this.rules.inline.reflink.exec(p))||(E=this.rules.inline.nolink.exec(p))){var x=(E[2]||E[1]).replace(/\s+/g," ");if(x=g[x.toLowerCase()],!x||!x.href){var Y=E[0].charAt(0);return{type:"text",raw:Y,text:Y}}var oe=ke(E,x,E[0]);return oe}},I.strong=function(p,g,E){E===void 0&&(E="");var x=this.rules.inline.strong.start.exec(p);if(x&&(!x[1]||x[1]&&(E===""||this.rules.inline.punctuation.exec(E)))){g=g.slice(-1*p.length);var Y=x[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Y.lastIndex=0;for(var oe;(x=Y.exec(g))!=null;)if(oe=this.rules.inline.strong.middle.exec(g.slice(0,x.index+3)),oe)return{type:"strong",raw:p.slice(0,oe[0].length),text:p.slice(2,oe[0].length-2)}}},I.em=function(p,g,E){E===void 0&&(E="");var x=this.rules.inline.em.start.exec(p);if(x&&(!x[1]||x[1]&&(E===""||this.rules.inline.punctuation.exec(E)))){g=g.slice(-1*p.length);var Y=x[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Y.lastIndex=0;for(var oe;(x=Y.exec(g))!=null;)if(oe=this.rules.inline.em.middle.exec(g.slice(0,x.index+2)),oe)return{type:"em",raw:p.slice(0,oe[0].length),text:p.slice(1,oe[0].length-1)}}},I.codespan=function(p){var g=this.rules.inline.code.exec(p);if(g){var E=g[2].replace(/\n/g," "),x=/[^ ]/.test(E),Y=E.startsWith(" ")&&E.endsWith(" ");return x&&Y&&(E=E.substring(1,E.length-1)),E=xe(E,!0),{type:"codespan",raw:g[0],text:E}}},I.br=function(p){var g=this.rules.inline.br.exec(p);if(g)return{type:"br",raw:g[0]}},I.del=function(p){var g=this.rules.inline.del.exec(p);if(g)return{type:"del",raw:g[0],text:g[1]}},I.autolink=function(p,g){var E=this.rules.inline.autolink.exec(p);if(E){var x,Y;return E[2]==="@"?(x=xe(this.options.mangle?g(E[1]):E[1]),Y="mailto:"+x):(x=xe(E[1]),Y=x),{type:"link",raw:E[0],text:x,href:Y,tokens:[{type:"text",raw:x,text:x}]}}},I.url=function(p,g){var E;if(E=this.rules.inline.url.exec(p)){var x,Y;if(E[2]==="@")x=xe(this.options.mangle?g(E[0]):E[0]),Y="mailto:"+x;else{var oe;do oe=E[0],E[0]=this.rules.inline._backpedal.exec(E[0])[0];while(oe!==E[0]);x=xe(E[0]),E[1]==="www."?Y="http://"+x:Y=x}return{type:"link",raw:E[0],text:x,href:Y,tokens:[{type:"text",raw:x,text:x}]}}},I.inlineText=function(p,g,E){var x=this.rules.inline.text.exec(p);if(x){var Y;return g?Y=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(x[0]):xe(x[0]):x[0]:Y=xe(this.options.smartypants?E(x[0]):x[0]),{type:"text",raw:x[0],text:Y}}},D}(),X=Ce.noopTest,P=Ce.edit,Z=Ce.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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:X,table:X,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=P(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=P(O.item,"gm").replace(/bull/g,O.bullet).getRegex(),O.list=P(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=//,O.html=P(O.html,"i").replace("comment",O._comment).replace("tag",O._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O.paragraph=P(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",")|<(?:script|pre|style|!--)").replace("tag",O._tag).getRegex(),O.blockquote=P(O.blockquote).replace("paragraph",O.paragraph).getRegex(),O.normal=Z({},O),O.gfm=Z({},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=P(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",")|<(?:script|pre|style|!--)").replace("tag",O._tag).getRegex(),O.gfm.table=P(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",")|<(?:script|pre|style|!--)").replace("tag",O._tag).getRegex(),O.pedantic=Z({},O.normal,{html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:X,paragraph:P(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 C={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:X,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:X,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",C.punctuation=P(C.punctuation).replace(/punctuation/g,C._punctuation).getRegex(),C._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",C._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",C.em.start=P(C.em.start).replace(/punctuation/g,C._punctuation).getRegex(),C.em.middle=P(C.em.middle).replace(/punctuation/g,C._punctuation).replace(/overlapSkip/g,C._overlapSkip).getRegex(),C.em.endAst=P(C.em.endAst,"g").replace(/punctuation/g,C._punctuation).getRegex(),C.em.endUnd=P(C.em.endUnd,"g").replace(/punctuation/g,C._punctuation).getRegex(),C.strong.start=P(C.strong.start).replace(/punctuation/g,C._punctuation).getRegex(),C.strong.middle=P(C.strong.middle).replace(/punctuation/g,C._punctuation).replace(/blockSkip/g,C._blockSkip).getRegex(),C.strong.endAst=P(C.strong.endAst,"g").replace(/punctuation/g,C._punctuation).getRegex(),C.strong.endUnd=P(C.strong.endUnd,"g").replace(/punctuation/g,C._punctuation).getRegex(),C.blockSkip=P(C._blockSkip,"g").getRegex(),C.overlapSkip=P(C._overlapSkip,"g").getRegex(),C._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,C._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,C._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])?)+(?![-_])/,C.autolink=P(C.autolink).replace("scheme",C._scheme).replace("email",C._email).getRegex(),C._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,C.tag=P(C.tag).replace("comment",O._comment).replace("attribute",C._attribute).getRegex(),C._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,C._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,C._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,C.link=P(C.link).replace("label",C._label).replace("href",C._href).replace("title",C._title).getRegex(),C.reflink=P(C.reflink).replace("label",C._label).getRegex(),C.reflinkSearch=P(C.reflinkSearch,"g").replace("reflink",C.reflink).replace("nolink",C.nolink).getRegex(),C.normal=Z({},C),C.pedantic=Z({},C.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:P(/^!?\[(label)\]\((.*?)\)/).replace("label",C._label).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C._label).getRegex()}),C.gfm=Z({},C.normal,{escape:P(C.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]*?(?:(?=[\\.5&&(p="x"+p.toString(16)),I+="&#"+p+";";return I}var he=function(){function D(w){this.tokens=[],this.tokens.links=Object.create(null),this.options=w||De,this.options.tokenizer=this.options.tokenizer||new pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var p={block:me.normal,inline:te.normal};this.options.pedantic?(p.block=me.pedantic,p.inline=te.pedantic):this.options.gfm&&(p.block=me.gfm,this.options.breaks?p.inline=te.breaks:p.inline=te.gfm),this.tokenizer.rules=p}D.lex=function(p,g){var E=new D(g);return E.lex(p)};var I=D.prototype;return I.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},I.blockTokens=function(p,g,E){g===void 0&&(g=[]),E===void 0&&(E=!0),p=p.replace(/^ +$/gm,"");for(var x,Y,oe,ue;p;){if(x=this.tokenizer.space(p)){p=p.substring(x.raw.length),x.type&&g.push(x);continue}if(x=this.tokenizer.code(p,g)){p=p.substring(x.raw.length),x.type?g.push(x):(ue=g[g.length-1],ue.raw+=` `+x.raw,ue.text+=` `+x.text);continue}if(x=this.tokenizer.fences(p)){p=p.substring(x.raw.length),g.push(x);continue}if(x=this.tokenizer.heading(p)){p=p.substring(x.raw.length),g.push(x);continue}if(x=this.tokenizer.nptable(p)){p=p.substring(x.raw.length),g.push(x);continue}if(x=this.tokenizer.hr(p)){p=p.substring(x.raw.length),g.push(x);continue}if(x=this.tokenizer.blockquote(p)){p=p.substring(x.raw.length),x.tokens=this.blockTokens(x.text,[],E),g.push(x);continue}if(x=this.tokenizer.list(p)){for(p=p.substring(x.raw.length),oe=x.items.length,Y=0;Y0)for(;(tt=this.tokenizer.rules.inline.reflinkSearch.exec(ue))!=null;)Ue.includes(tt[0].slice(tt[0].lastIndexOf("[")+1,-1))&&(ue=ue.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+ue.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(tt=this.tokenizer.rules.inline.blockSkip.exec(ue))!=null;)ue=ue.slice(0,tt.index)+"["+"a".repeat(tt[0].length-2)+"]"+ue.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;p;){if(oe=this.tokenizer.escape(p)){p=p.substring(oe.raw.length),g.push(oe);continue}if(oe=this.tokenizer.tag(p,E,x)){p=p.substring(oe.raw.length),E=oe.inLink,x=oe.inRawBlock,g.push(oe);continue}if(oe=this.tokenizer.link(p)){p=p.substring(oe.raw.length),oe.type==="link"&&(oe.tokens=this.inlineTokens(oe.text,[],!0,x)),g.push(oe);continue}if(oe=this.tokenizer.reflink(p,this.tokens.links)){p=p.substring(oe.raw.length),oe.type==="link"&&(oe.tokens=this.inlineTokens(oe.text,[],!0,x)),g.push(oe);continue}if(oe=this.tokenizer.strong(p,ue,Y)){p=p.substring(oe.raw.length),oe.tokens=this.inlineTokens(oe.text,[],E,x),g.push(oe);continue}if(oe=this.tokenizer.em(p,ue,Y)){p=p.substring(oe.raw.length),oe.tokens=this.inlineTokens(oe.text,[],E,x),g.push(oe);continue}if(oe=this.tokenizer.codespan(p)){p=p.substring(oe.raw.length),g.push(oe);continue}if(oe=this.tokenizer.br(p)){p=p.substring(oe.raw.length),g.push(oe);continue}if(oe=this.tokenizer.del(p)){p=p.substring(oe.raw.length),oe.tokens=this.inlineTokens(oe.text,[],E,x),g.push(oe);continue}if(oe=this.tokenizer.autolink(p,ve)){p=p.substring(oe.raw.length),g.push(oe);continue}if(!E&&(oe=this.tokenizer.url(p,ve))){p=p.substring(oe.raw.length),g.push(oe);continue}if(oe=this.tokenizer.inlineText(p,x,ye)){p=p.substring(oe.raw.length),Y=oe.raw.slice(-1),g.push(oe);continue}if(p){var Pe="Infinite loop on byte: "+p.charCodeAt(0);if(this.options.silent){console.error(Pe);break}else throw new Error(Pe)}}return g},Oe(D,null,[{key:"rules",get:function(){return{block:me,inline:te}}}]),D}(),je=K.defaults,Ke=Ce.cleanUrl,Ve=Ce.escape,Me=function(){function D(w){this.options=w||je}var I=D.prototype;return I.code=function(p,g,E){var x=(g||"").match(/\S*/)[0];if(this.options.highlight){var Y=this.options.highlight(p,x);Y!=null&&Y!==p&&(E=!0,p=Y)}return x?'
    '+(E?p:Ve(p,!0))+`
    `:"
    "+(E?p:Ve(p,!0))+`
    `},I.blockquote=function(p){return`
    `+p+`
    `},I.html=function(p){return p},I.heading=function(p,g,E,x){return this.options.headerIds?"'+p+" `:""+p+" `},I.hr=function(){return this.options.xhtml?`
    `:`
    `},I.list=function(p,g,E){var x=g?"ol":"ul",Y=g&&E!==1?' start="'+E+'"':"";return"<"+x+Y+`> `+p+" `},I.listitem=function(p){return"
  • "+p+`
  • `},I.checkbox=function(p){return" "},I.paragraph=function(p){return"

    "+p+`

    `},I.table=function(p,g){return g&&(g=""+g+""),` `+p+` `+g+`
    `},I.tablerow=function(p){return` `+p+` `},I.tablecell=function(p,g){var E=g.header?"th":"td",x=g.align?"<"+E+' align="'+g.align+'">':"<"+E+">";return x+p+" `},I.strong=function(p){return""+p+""},I.em=function(p){return""+p+""},I.codespan=function(p){return""+p+""},I.br=function(){return this.options.xhtml?"
    ":"
    "},I.del=function(p){return""+p+""},I.link=function(p,g,E){if(p=Ke(this.options.sanitize,this.options.baseUrl,p),p===null)return E;var x='",x},I.image=function(p,g,E){if(p=Ke(this.options.sanitize,this.options.baseUrl,p),p===null)return E;var x=''+E+'":">",x},I.text=function(p){return p},D}(),Ae=function(){function D(){}var I=D.prototype;return I.strong=function(p){return p},I.em=function(p){return p},I.codespan=function(p){return p},I.del=function(p){return p},I.html=function(p){return p},I.text=function(p){return p},I.link=function(p,g,E){return""+E},I.image=function(p,g,E){return""+E},I.br=function(){return""},D}(),et=function(){function D(){this.seen={}}var I=D.prototype;return I.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 E=g;do this.seen[E]++,g=E+"-"+this.seen[E];while(this.seen.hasOwnProperty(g))}return this.seen[g]=0,g},D}(),at=K.defaults,pt=Ce.unescape,ot=function(){function D(w){this.options=w||at,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new et}D.parse=function(p,g){var E=new D(g);return E.parse(p)};var I=D.prototype;return I.parse=function(p,g){g===void 0&&(g=!0);var E="",x,Y,oe,ue,tt,Ue,Pe,vt,Dt,ht,Kt,Ge,Ht,Lt,xt,Ft,Rt,ut,qe=p.length;for(x=0;x0&&xt.tokens[0].type==="text"?(xt.tokens[0].text=ut+" "+xt.tokens[0].text,xt.tokens[0].tokens&&xt.tokens[0].tokens.length>0&&xt.tokens[0].tokens[0].type==="text"&&(xt.tokens[0].tokens[0].text=ut+" "+xt.tokens[0].tokens[0].text)):xt.tokens.unshift({type:"text",text:ut}):Lt+=ut),Lt+=this.parse(xt.tokens,Ht),Dt+=this.renderer.listitem(Lt,Rt,Ft);E+=this.renderer.list(Dt,Kt,Ge);continue}case"html":{E+=this.renderer.html(ht.text);continue}case"paragraph":{E+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(Dt=ht.tokens?this.parseInline(ht.tokens):ht.text;x+1An error occurred:

    "+dt(oe.message+"",!0)+"
    ";throw oe}}Le.options=Le.setOptions=function(D){return wt(Le.defaults,D),Ot(Le.defaults),Le},Le.getDefaults=Re,Le.defaults=yt,Le.use=function(D){var I=wt({},D);if(D.renderer&&function(){var p=Le.defaults.renderer||new Me,g=function(Y){var oe=p[Y];p[Y]=function(){for(var ue=arguments.length,tt=new Array(ue),Ue=0;Ueut.length){var en=Object(Ae.xor)(Nt,ut);console.log(en,"newLevel"),Mt=Mt.filter(function(Wt){return!en.includes(Wt)})}tt(Mt),Ge(ut.length===(Ue==null||((He=Ue.tag_disciplines)===null||He===void 0)?void 0:He.length))},Lt=function(ut){var qe,He=Ue==null||((qe=Ue.tag_disciplines)===null||qe===void 0)?void 0:qe.map(function(gt){return gt.id});tt(ut.target.checked?Object(Ae.uniq)([].concat(Object(Ce.a)(ue),Object(Ce.a)(He))):ue==null?void 0:ue.filter(function(gt){return!He.includes(gt)})),Ge(ut.target.checked)};console.log(Ue,"options");var xt=function(){var ut,qe,He=(Ue==null?void 0:Ue.tag_disciplines)||[];if(Pe){var gt;He=(gt=He)===null||gt===void 0?void 0:gt.filter(function(Nt){var Mt;return Nt==null||((Mt=Nt.name)===null||Mt===void 0)?void 0:Mt.includes(Pe)})}return He=(ut=He)===null||ut===void 0?void 0:ut.map(function(Nt){return Object(W.a)(Object(W.a)({},Nt),{},{label:"".concat(Nt.name,"(".concat(Nt==null?void 0:Nt.item_count,")")),value:Nt.id})}),He=(qe=He)===null||qe===void 0?void 0:qe.filter(function(Nt){return Nt.item_count!==0}),He},Ft=function(){var ut=!1;if(!Pe)ut=!0;else{var qe;(qe=Ue.tag_disciplines)===null||qe===void 0||qe.forEach(function(He){if(!ut){var gt;ut=((gt=He.name)===null||gt===void 0?void 0:gt.includes(Pe))&&He.item_count!==0}})}return ut};return(Ue==null?void 0:Ue.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(R.a,{checked:Kt,onChange:Lt},h.a.createElement("span",{className:Me.a.box},h.a.createElement("span",{className:"font14 c-light-primary"},h.a.createElement("span",{title:Ue==null?void 0:Ue.name,className:Me.a.box1}," ",Ue==null?void 0:Ue.name),h.a.createElement("span",null," ","(".concat(Ue==null?void 0:Ue.item_count,")"))),h.a.createElement("i",{className:"iconfont icon-lujing font12 ml5"})))),h.a.createElement("div",{className:Me.a.cr},h.a.createElement(et,{options:xt(),value:ue,onChange:Ht})))},pt=at,ot=l("ErOA"),wt=l("ozfa"),bt=l("MJZm"),dt=l("0Owb"),Re=l("tmPe"),Ot=l.n(Re),yt=function(Y){var oe=Y.value,ue=Y.onChange,tt=Y.defaultValue,Ue=Y.treeData,Pe=Ue===void 0?[]:Ue,vt=Object(Ke.a)(Y,["value","onChange","defaultValue","treeData"]);return h.a.createElement("div",{className:Ot.a.customTree},h.a.createElement(bt.a,Object(dt.a)({multiple:!0,showIcon:!0,selectedKeys:oe,defaultExpandedKeys:tt,treeData:Pe,onSelect:ue},vt)))},Le=yt,Be=l("sbIO"),D=M.a.Search,I=function(Y){var oe,ue=Y.formValue,tt=Y.setFatherTabs,Ue=Y.tabs,Pe=Y.editData,vt=Y.dispatch,Dt=Object(ee.i)().id,ht=Object(F.useState)(["mine"]),Kt=Object(le.a)(ht,2),Ge=Kt[0],Ht=Kt[1],Lt=Object(F.useState)(!0),xt=Object(le.a)(Lt,2),Ft=xt[0],Rt=xt[1],ut=Object(F.useState)(!1),qe=Object(le.a)(ut,2),He=qe[0],gt=qe[1],Nt=Object(F.useState)(!1),Mt=Object(le.a)(Nt,2),en=Mt[0],Wt=Mt[1],ft=Object(F.useState)(""),Vt=Object(le.a)(ft,2),Ct=Vt[0],an=Vt[1],jt=Object(F.useState)(!1),on=Object(le.a)(jt,2),Cn=on[0],Jt=on[1],ze=Object(F.useState)(!1),Ze=Object(le.a)(ze,2),rn=Ze[0],sn=Ze[1],Xe=Object(F.useState)({}),bn=Object(le.a)(Xe,2),Mn=bn[0],Ut=bn[1],Un=Object(F.useState)([]),pa=Object(le.a)(Un,2),kn=pa[0],Pn=pa[1],ma=Object(F.useState)([]),It=Object(le.a)(ma,2),be=It[0],St=It[1],Fe=Object(F.useState)([]),ae=Object(le.a)(Fe,2),Ye=ae[0],kt=ae[1],ct=Object(F.useState)([]),nt=Object(le.a)(ct,2),At=nt[0],tn=nt[1],cn=Object(F.useState)(null),fn=Object(le.a)(cn,2),wn=fn[0],Yn=fn[1],yn=Object(F.useRef)([]),Zn=Object(F.useState)(!1),Ua=Object(le.a)(Zn,2),ua=Ua[0],Kn=Ua[1],Ia=Object(F.useState)([]),va=Object(le.a)(Ia,2),Ln=va[0],Da=va[1],Qa=Object(F.useState)([0]),nr=Object(le.a)(Qa,2),Za=nr[0],Fa=nr[1],vr=Object(F.useState)([]),Ba=Object(le.a)(vr,2),ar=Ba[0],rr=Ba[1],Na=Object(F.useRef)([]),$r=Object(F.useState)(!1),ka=Object(le.a)($r,2),_i=ka[0],Xt=ka[1],Qt=Object(F.useState)([]),Zt=Object(le.a)(Qt,2),$t=Zt[0],ln=Zt[1],_n=Object(F.useState)([]),Sn=Object(le.a)(_n,2),On=Sn[0],Hn=Sn[1],ga=Object(F.useRef)([]),In=Object(F.useState)([]),Wa=Object(le.a)(In,2),qn=Wa[0],za=Wa[1],Ka=Object(F.useState)(!1),ir=Object(le.a)(Ka,2),Gi=ir[0],Vi=ir[1],Gr=Object(F.useRef)([]),Ei=Object(F.useState)(0),yi=Object(le.a)(Ei,2),xi=yi[0],Ya=yi[1],Ha=ar==null?void 0:ar.filter(function(st){return Ln==null?void 0:Ln.includes(st.id)}),Yi=On==null?void 0:On.filter(function(st){return $t==null?void 0:$t.includes(st.id)});Object(F.useEffect)(function(){gr()},[]),Object(F.useEffect)(function(){return Ue===1&&(vt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),vt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1})),function(){vt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),vt({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}},[Ue]),Object(F.useEffect)(function(){Dt?Pe&&Jn():(Pr(Ge),or(),Rt(!1))},[Pe]),Object(F.useEffect)(function(){Ct&&Ji()},[Ct]);var Ji=function(){var Qe=null;be==null||be.forEach(function(Ne){var we;(we=Ne.sub_disciplines)===null||we===void 0||we.forEach(function(lt){var it;(it=lt.tag_disciplines)===null||it===void 0||it.forEach(function(mt){var zt,qt=((zt=mt.name)===null||zt===void 0?void 0:zt.includes(Ct))&&mt.item_count!==0;qt&&!Qe&&(Qe=Ne.id)})})}),Qe&&Yn(Qe)},Qi=function(Qe){function Ne(we){var lt=we.children,it=Array.isArray(lt)&<.length>0,mt=we==null?void 0:we.group_id;return Gr.current.push({name:we==null?void 0:we.name,id:mt,count:we==null?void 0:we.count}),{title:h.a.createElement("div",{title:we==null?void 0:we.name,className:c.a.name},we==null?void 0:we.name,"\uFF08".concat(we==null?void 0:we.count,"\uFF09")),value:mt,name:we==null?void 0:we.name,key:mt,count:we==null?void 0:we.count,id:mt,icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:it?lt==null?void 0:lt.map(function(zt){return Ne(zt)}):[]}}return Qe==null?void 0:Qe.map(function(we){return Ne(we)})},gr=function(){var st=Object(y.a)(k.a.mark(function Qe(){var Ne,we;return k.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return it.next=2,Object($.x)({});case 2:Ne=it.sent,Gr.current=[{id:0,name:"\u6839\u76EE\u5F55",count:Ne==null?void 0:Ne.root_count}],Ne!=null&&Ne.data&&(we=[{title:h.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:c.a.name},"\u6839\u76EE\u5F55","\uFF08".concat((Ne==null?void 0:Ne.root_count)||0,"\uFF09")),value:0,id:0,key:0,count:Ne==null?void 0:Ne.root_count,name:"\u6839\u76EE\u5F55",icon:h.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Qi(Ne.data||[])}],rr(Gr.current),za(we));case 5:case"end":return it.stop()}},Qe)}));return function(){return st.apply(this,arguments)}}(),Jn=function(){var st=Object(y.a)(k.a.mark(function Qe(){var Ne,we,lt,it,mt,zt,qt,mn,hn,vn,dn,Wn,Tn,Rn,ea,Xn,Fn,ta;return k.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return vn=Pe==null||((Ne=Pe.tag_disciplines)===null||Ne===void 0)?void 0:Ne.map(function(un){return un.tag_discipline_id}),dn=Pe==null||((we=Pe.groups)===null||we===void 0)?void 0:we.map(function(un){return un.id}),Wn={source:Pe==null||((lt=Pe.examination_bank)===null||lt===void 0)?void 0:lt.source,group_ids:dn,tag_discipline_ids:vn,teach_group_ids:Pe==null?void 0:Pe.teach_group_ids},Yt.next=5,Object(ot.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:Wn});case 5:if(Tn=Yt.sent,!((Tn==null?void 0:Tn.status)===-1)){Yt.next=8;break}return Yt.abrupt("return");case 8:Rn=Tn==null?void 0:Tn.filter(function(un){var Nn;return!!(un!=null&&(Nn=un.item_banks)!==null&&Nn!==void 0&&Nn.length)}),Rn=Rn.map(function(un){return Object(W.a)(Object(W.a)({},un),{},{scoreTotal:0,score:0,questionTotal:0})}),Rn=(it=Rn)===null||it===void 0?void 0:it.map(function(un,Nn){var na,$n,_a;return Object(W.a)(Object(W.a)({},un),{},{score:(Pe==null||((na=Pe.score_settings)===null||na===void 0||(($n=na.find(function(Ea){return Ea.item_type===(un==null?void 0:un.item_type)}))===null||$n===void 0))?void 0:$n.score)||0,item_banks:un==null||((_a=un.item_banks)===null||_a===void 0)?void 0:_a.map(function(Ea){var En;return Object(W.a)(Object(W.a)({},Ea),{},{tag_disciplines:Ea==null||((En=Ea.tag_disciplines)===null||En===void 0)?void 0:En.map(function(An){var aa;return Object(W.a)(Object(W.a)({},An),{},{difficulties:An==null||((aa=An.difficulties)===null||aa===void 0)?void 0:aa.map(function(da){var ra=Pe==null?void 0:Pe.contents.find(function(Ca){return Ca.item_type===un.item_type&&Ca.sub_discipline_id===Ea.sub_discipline_id&&Ca.tag_discipline_id===An.tag_discipline_id&&Ca.difficulty===da.difficulty});return ra?Object(W.a)(Object(W.a)({},da),{},{num:ra==null?void 0:ra.quanlity}):Object(W.a)({},da)})})})})})})}),ea=br(Rn),Xn=ea.panel,Fn=ea.score_num_item,Rn=(mt=Rn)===null||mt===void 0?void 0:mt.map(function(un,Nn){var na,$n=(Xn==null||((na=Xn[Nn])===null||na===void 0)?void 0:na.reduce(function(_a,Ea){return _a+Ea},0))||0;return Object(W.a)(Object(W.a)({},un),{},{scoreTotal:$n*(Fn[Nn]||0),questionTotal:$n})}),ta=[],Pe==null||((zt=Pe.sort_by_item_type)===null||zt===void 0)||zt.forEach(function(un){var Nn=Rn.find(function(na){var $n,_a=($n=_r.find(function(Ea){return Ea.type===(na==null?void 0:na.item_type)}))===null||$n===void 0?void 0:$n.name;return _a===un});ta.push(Nn)}),ta=Object(Ae.compact)(ta),Pr(Pe==null||((qt=Pe.examination_bank)===null||qt===void 0)?void 0:qt.source),or(),Ht(Pe==null||((mn=Pe.examination_bank)===null||mn===void 0)?void 0:mn.source),tn(vn),yn.current=vn,Da(dn),ln((Pe==null?void 0:Pe.teach_group_ids)||[]),Ya(Pe==null||((hn=Pe.groups)===null||hn===void 0)?void 0:hn.map(function(un){return un.count}).reduce(function(un,Nn){return un+Nn},0)),Na.current=dn,Fa(dn!=null&&dn.length?dn:[0]),Pn(Object(Ae.cloneDeep)(ta)),Rt(!1);case 29:case"end":return Yt.stop()}},Qe)}));return function(){return st.apply(this,arguments)}}(),Zi=function(){var st=Object(y.a)(k.a.mark(function Qe(){var Ne;return k.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:Ne={source:Ge,group_ids:Ln,tag_discipline_ids:At,teach_group_ids:$t},qa(Ne),yn.current=At,Jt(!1);case 4:case"end":return lt.stop()}},Qe)}));return function(){return st.apply(this,arguments)}}(),Pr=function(){var st=Object(y.a)(k.a.mark(function Qe(Ne){var we,lt,it,mt,zt,qt;return k.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(ot.a)("/api/disciplines.json",{method:"get",params:{source:"question",question_source:Ne}});case 2:it=hn.sent,mt=[],it==null||((we=it.disciplines)===null||we===void 0)||we.forEach(function(vn){var dn;vn==null||((dn=vn.sub_disciplines)===null||dn===void 0)||dn.forEach(function(Wn){mt=mt.concat((Wn==null?void 0:Wn.tag_disciplines)||[])})}),zt=null,qt=it==null||((lt=it.disciplines)===null||lt===void 0)?void 0:lt.map(function(vn){var dn,Wn=vn==null||((dn=vn.sub_disciplines)===null||dn===void 0)?void 0:dn.reduce(function(Tn,Rn){return Tn+Rn.item_count},0);return!zt&&Wn!==0&&(zt=vn.id),Object(W.a)(Object(W.a)({},vn),{},{item_count:Wn})}),console.log(qt,48767874),St(qt),kt(mt),Yn(zt);case 11:case"end":return hn.stop()}},Qe)}));return function(Ne){return st.apply(this,arguments)}}(),or=function(){var st=Object(y.a)(k.a.mark(function Qe(){var Ne;return k.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,Object(ot.a)("/api/teach_groups.json",{method:"get",params:{is_random_exam:!0}});case 2:Ne=lt.sent,Hn((Ne==null?void 0:Ne.groups)||[]);case 4:case"end":return lt.stop()}},Qe)}));return function(){return st.apply(this,arguments)}}(),qa=function(){var st=Object(y.a)(k.a.mark(function Qe(Ne){var we,lt;return k.a.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return Rt(!0),mt.next=3,Object(ot.a)("/api/examination_intelligent_settings/form_paper.json",{method:"post",body:Ne});case 3:we=mt.sent,lt=we==null?void 0:we.filter(function(zt){var qt;return!!(zt!=null&&(qt=zt.item_banks)!==null&&qt!==void 0&&qt.length)}),lt=lt.map(function(zt){return Object(W.a)(Object(W.a)({},zt),{},{scoreTotal:0,score:0,questionTotal:0})}),Pn(lt),Rt(!1);case 8:case"end":return mt.stop()}},Qe)}));return function(Ne){return st.apply(this,arguments)}}(),Ci=function(){tn(yn.current),Jt(!1),an("")},qi=function(Qe){tn(Qe)},Vr=function(){for(var Qe=Ye==null?void 0:Ye.filter(function(mn){return At==null?void 0:At.includes(mn.id)}),Ne=Object(Ce.a)(Qe),we=0,lt=[],it=0;it1&&Qe!==0&&(Ne=sr(we,Qe,Qe-1)),Pn(Ne)},Ar=function(Qe){var Ne=[],we=Object(Ae.cloneDeep)(kn);we.length>1&&Qe!==we.length-1&&(Ne=sr(we,Qe,Qe+1)),Pn(Ne)},Er=function(){var st=Object(y.a)(k.a.mark(function Qe(Ne){var we,lt,it,mt;return k.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(it=Object(Ce.a)(Ge),Ge.includes(Ne)?it=it.filter(function(mn){return mn!==Ne}):it.push(Ne),!(it.length===0)){qt.next=5;break}return Q.b.warn("\u8BD5\u9898\u6765\u6E90\u4E3A\u5FC5\u9009\u9879"),qt.abrupt("return");case 5:(we=it)!==null&&we!==void 0&&we.includes("mine")||(Da([]),Na.current=[]),(lt=it)!==null&<!==void 0&<.includes("teach_groups")||(ln([]),ga.current=[]),Ht(it),Pr(it),tn([]),yn.current=[],mt={source:it,group_ids:Na.current,tag_discipline_ids:[],teach_group_ids:ga.current},qa(mt);case 13:case"end":return qt.stop()}},Qe)}));return function(Ne){return st.apply(this,arguments)}}(),Oi=function(Qe){var Ne={1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D",7:"\u4E03"};if(!Qe)return;var we=Qe||{},lt=we.exam,it=we.single_questions,mt=we.multiple_questions,zt=we.judgement_questions,qt=we.program_questions,mn=we.completion_questions,hn=we.subjective_questions,vn=we.practical_questions,dn=we.combination_questions,Wn=[Object(W.a)({type:"SINGLE",name:"\u5355\u9009\u9898"},it),Object(W.a)({type:"MULTIPLE",name:"\u591A\u9009\u9898"},mt),Object(W.a)({type:"COMPLETION",name:"\u586B\u7A7A\u9898"},mn),Object(W.a)({type:"JUDGMENT",name:"\u5224\u65AD\u9898"},zt),Object(W.a)({type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},hn),Object(W.a)({type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},qt),Object(W.a)({type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},vn),Object(W.a)({type:"COMBINATION",name:"\u7EC4\u5408\u9898"},dn)],Tn=[],Rn=0,ea=0,Xn=Wn.filter(function(Fn){return Fn.questions_count>0}).map(function(Fn,ta){var ba;return(ba=Fn.questions)===null||ba===void 0||ba.forEach(function(Yt){Tn.push(Yt.id),Rn=Rn+Yt.score,ea=ea+1}),Object(W.a)(Object(W.a)({},Fn),{number:Ne[ta+1]})});return{all_questions_count:ea,all_score:Rn,questionList:Xn,ids:Tn,exam:lt}},ja=function(Qe){var Ne,we,lt=Object(Ae.cloneDeep)(Mn),it=Object(Ae.cloneDeep)(kn);lt.questionList=lt==null||((Ne=lt.questionList)===null||Ne===void 0)?void 0:Ne.map(function(mt){return mt.type===Qe.type?Object(W.a)(Object(W.a)({},mt),{},{questions_score:Qe.scoreTotal}):mt}),it=(we=it)===null||we===void 0?void 0:we.map(function(mt){return mt.item_type===Qe.type?Object(W.a)(Object(W.a)({},mt),{},{score:Qe.score,scoreTotal:Qe.scoreTotal}):mt}),Pn(it),Ut(lt),console.log(Qe,Mn,kn)},$a=be==null||((oe=be.find(function(st){return st.id===wn}))===null||oe===void 0)?void 0:oe.sub_disciplines,yr=Vr();return rn?h.a.createElement(Be.a,{loading:He,submit:Si,goBack:function(){return sn(!1)},data:Mn,onTypeScore:ja,onExchange:Yr}):h.a.createElement("section",{className:c.a.wrap,style:{display:Ue?"flex":"none"}},h.a.createElement("div",{id:"id_left",className:c.a.left,onMouseEnter:function(Qe){var Ne=document.getElementById("id_left");Ne.style.overflowY="auto"},onMouseLeave:function(Qe){var Ne=document.getElementById("id_left");Ne.style.overflowY="hidden"}},h.a.createElement(Oe.a,{loading:Ft,active:!0,paragraph:{rows:5}},kn.map(function(st,Qe){var Ne;return h.a.createElement("div",{className:c.a.list,key:Qe},h.a.createElement("div",{className:c.a.name},h.a.createElement("b",null),h.a.createElement("span",null,(Ne=_r.find(function(we){return we.type===(st==null?void 0:st.item_type)}))===null||Ne===void 0?void 0:Ne.name)),h.a.createElement("aside",null,h.a.createElement("div",null,"\u5171",h.a.createElement("span",{className:c.a.b},st.questionTotal),"\u9898",h.a.createElement("span",{className:c.a.l},"|"),"\u5171",h.a.createElement("span",{className:c.a.r},st.scoreTotal),"\u5206"),h.a.createElement("div",null,Qe>0?h.a.createElement(B.a,{getPopupContainer:function(lt){return document.getElementById("id_left")},title:"\u4E0A\u79FB"},h.a.createElement("span",{onClick:function(){return Xa(Qe)},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"})),Qe"),h.a.createElement("span",{className:"current",onClick:function(){return ge.d.push("/paperlibrary")}},"\u8BD5\u5377\u5E93>"),h.a.createElement("span",{style:{color:"#bebebe"}},"\u968F\u673A\u7EC4\u5377")),Dt===0&&h.a.createElement(N,{value:Dt,onChange:an}),Dt===0&&h.a.createElement("section",{className:j.a.oneWrap},h.a.createElement("div",{className:j.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(ne.a,{className:j.a.formWrap,form:Ht,layout:"horizontal",onValuesChange:Vt},h.a.createElement(ne.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:j.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(ne.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:jt,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(ne.a.Item,{label:"\u8BD5\u9898\u96BE\u5EA6",name:"difficulty",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},h.a.createElement(ce.a.Group,{style:{display:"flex",width:286,justifyContent:"space-between"},size:"large"},h.a.createElement(ce.a.Button,{className:j.a.rb,value:1},"\u7B80\u5355"),h.a.createElement(ce.a.Button,{className:j.a.rb,value:2},"\u9002\u4E2D"),h.a.createElement(ce.a.Button,{className:j.a.rb,value:3},"\u56F0\u96BE"))),h.a.createElement(ne.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:j.a.btns},h.a.createElement(Te.a,{className:"mr40",onClick:function(){return ge.d.push("/paperlibrary")}},"\u8FD4\u56DE"),h.a.createElement(Te.a,{type:"primary",onClick:Object(y.a)(k.a.mark(function on(){return k.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.next=2,Ht.validateFields();case 2:ht(1);case 3:case"end":return Jt.stop()}},on)}))},"\u4E0B\u4E00\u6B65"))),h.a.createElement(w,{tabs:Dt,dispatch:Ue,editData:en,setFatherTabs:ht,formValue:Ft})))},E=We.default=Object(ge.a)(function(x){var Y=x.paperlibrary,oe=x.user,ue=x.globalSetting;return{paperlibrary:Y,user:oe,globalSetting:ue}})(g)},"E/GV":function(Je,We,l){Je.exports=l.p+"static/swenjianjia.1640bf70.svg"},ELLl:function(Je,We,l){(function(G){G(l("VrN/"))})(function(G){var Oe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ie=G.Pos;G.defineOption("autoCloseBrackets",!1,function(M,A,k){k&&k!=G.Init&&(M.removeKeyMap(Se),M.state.closeBrackets=null),A&&(ce(Te(A,"pairs")),M.state.closeBrackets=A,M.addKeyMap(Se))});function Te(M,A){return A=="pairs"&&typeof M=="string"?M:typeof M=="object"&&M[A]!=null?M[A]:Oe[A]}var Se={Backspace:y,Enter:W};function ce(M){for(var A=0;A=0;h--){var ge=F[h].head;M.replaceRange("",ie(ge.line,ge.ch-1),ie(ge.line,ge.ch+1),"+delete")}}function W(M){var A=S(M),k=A&&Te(A,"explode");if(!k||M.getOption("disableInput"))return G.Pass;for(var F=M.listSelections(),h=0;h0;return{anchor:new ie(M.anchor.line,M.anchor.ch+(A?-1:1)),head:new ie(M.head.line,M.head.ch+(A?1:-1))}}function ne(M,A){var k=S(M);if(!k||M.getOption("disableInput"))return G.Pass;var F=Te(k,"pairs"),h=F.indexOf(A);if(h==-1)return G.Pass;for(var ee=Te(k,"closeBefore"),ge=Te(k,"triples"),q=F.charAt(h+1)==A,j=M.listSelections(),d=h%2==0,V,b=0;b=0&&M.getRange(m,ie(m.line,m.ch+3))==A+A+A?v="skipThree":v="skip";else if(q&&m.ch>1&&ge.indexOf(A)>=0&&M.getRange(ie(m.line,m.ch-2),m)==A+A){if(m.ch>2&&/\bstring/.test(M.getTokenTypeAt(ie(m.line,m.ch-2))))return G.Pass;v="addFour"}else if(q){var R=m.ch==0?" ":M.getRange(ie(m.line,m.ch-1),m);if(!G.isWordChar(L)&&R!=A&&!G.isWordChar(R))v="both";else return G.Pass}else if(d&&(L.length===0||/\s/.test(L)||ee.indexOf(L)>-1))v="both";else return G.Pass;if(!V)V=v;else if(V!=v)return G.Pass}var _=h%2?F.charAt(h-1):A,B=h%2?A:F.charAt(h+1);M.operation(function(){if(V=="skip")M.execCommand("goCharRight");else if(V=="skipThree")for(var de=0;de<3;de++)M.execCommand("goCharRight");else if(V=="surround"){for(var Q=M.getSelections(),de=0;de1&&arguments[1]!==void 0?arguments[1]:1,w=Ae.length,p=0;p1&&arguments[1]!==void 0?arguments[1]:!1;return Object(d.a)(c).map(function(xe,_e){if(!Se.isValidElement(xe)||!xe.type)return null;var ke=xe.type.isSelectOptGroup,Ee=xe.key,pe=xe.props,X=pe.children,P=Object(K.a)(pe,["children"]);return $||!ke?V(xe):Object(j.a)(Object(j.a)({key:"__RC_SELECT_GRP__".concat(Ee===null?_e:Ee,"__"),label:Ee},P),{},{options:b(X)})}).filter(function(xe){return xe})}var N=l("2Qr1"),m=l("qNPg"),v=l("U8pU"),L=l("Kwbf"),R=l("WKfj");function _(c){var $=c.mode,xe=c.options,_e=c.children,ke=c.backfill,Ee=c.allowClear,pe=c.placeholder,X=c.getInputElement,P=c.showSearch,Z=c.onSearch,O=c.defaultOpen,C=c.autoFocus,re=c.labelInValue,De=c.value,me=c.inputValue,te=c.optionLabelProp,ye=$==="multiple"||$==="tags",ve=P!==void 0?P:ye||$==="combobox",he=xe||b(_e);if(Object(L.a)($!=="tags"||he.every(function(Me){return!Me.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var je=he.some(function(Me){return Me.options?Me.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in Me?Me.value:Me.key)=="number"});Object(L.a)(!je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(L.a)($!=="combobox"||!te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(L.a)($==="combobox"||!ke,"`backfill` only works with `combobox` mode."),Object(L.a)($==="combobox"||!X,"`getInputElement` only work with `combobox` mode."),Object(L.b)($!=="combobox"||!X||!Ee||!pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Z&&!ve&&$!=="combobox"&&$!=="tags"&&Object(L.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(L.b)(!O||C,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),De!=null){var Ke=Object(R.d)(De);Object(L.a)(!re||Ke.every(function(Me){return Object(v.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)(!ye||Array.isArray(De),"`value` should be array when `mode` is `multiple` or `tags`")}if(_e){var Ve=null;Object(d.a)(_e).some(function(Me){if(!Se.isValidElement(Me)||!Me.type)return!1;var Ae=Me.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var et=Object(d.a)(Me.props.children).every(function(at){return!Se.isValidElement(at)||!Me.type||at.type.isSelectOption?!0:(Ve=at.type,!1)});return!et}return Ve=Ae,!0}),Ve&&Object(L.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ve.displayName||Ve.name||Ve,"`.")),Object(L.a)(me===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var B=_,de=Object(m.a)({prefixCls:"rc-select",components:{optionList:F},convertChildrenToData:b,flattenOptions:N.d,getLabeledValue:N.e,filterOptions:N.b,isValueDisabled:N.g,findValueOption:N.c,warningProps:B,fillOptionsWithMissingValue:N.a}),Q=function(c){Object(ie.a)(xe,c);var $=Object(Te.a)(xe);function xe(){var _e;return Object(G.a)(this,xe),_e=$.apply(this,arguments),_e.selectRef=Se.createRef(),_e.focus=function(){_e.selectRef.current.focus()},_e.blur=function(){_e.selectRef.current.blur()},_e}return Object(Oe.a)(xe,[{key:"render",value:function(){return Se.createElement(de,Object.assign({ref:this.selectRef},this.props))}}]),xe}(Se.Component);Q.Option=ee,Q.OptGroup=q;var Ce=Q,T=We.c=Ce},M8RZ:function(Je,We,l){"use strict";l.d(We,"a",function(){return y});var G=l("fWQN"),Oe=l("mtLc"),ie=l("yKVA"),Te=l("879j"),Se=l("q1tI"),ce=l.n(Se),K=l("i8i4"),S=l.n(K),y=function(W){Object(ie.a)(ne,W);var J=Object(Te.a)(ne);function ne(le){var H;Object(G.a)(this,ne),H=J.call(this,le);var M=window.document;return H.node=M.createElement("div"),M.body.appendChild(H.node),H}return Object(Oe.a)(ne,[{key:"render",value:function(){var H=this.props.children;return Object(K.createPortal)(H,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),ne}(ce.a.Component)},NvD2:function(Je,We,l){"use strict";l.d(We,"a",function(){return ce});var G=l("Kwbf");function Oe(K,S){var y=new Set;return K.forEach(function(W){S.has(W)||y.add(W)}),y}function ie(K){var S=K||{},y=S.disabled,W=S.disableCheckbox,J=S.checkable;return!!(y||W)||J===!1}function Te(K,S,y,W){for(var J=new Set(K),ne=new Set,le=0;le<=y;le+=1){var H=S.get(le)||new Set;H.forEach(function(F){var h=F.key,ee=F.node,ge=F.children,q=ge===void 0?[]:ge;J.has(h)&&!W(ee)&&q.filter(function(j){return!W(j.node)}).forEach(function(j){J.add(j.key)})})}for(var M=new Set,A=y;A>=0;A-=1){var k=S.get(A)||new Set;k.forEach(function(F){var h=F.parent,ee=F.node;if(W(ee)||!F.parent||M.has(F.parent.key))return;if(W(F.parent.node)){M.add(h.key);return}var ge=!0,q=!1;(h.children||[]).filter(function(j){return!W(j.node)}).forEach(function(j){var d=j.key,V=J.has(d);ge&&!V&&(ge=!1),!q&&(V||ne.has(d))&&(q=!0)}),ge&&J.add(h.key),q&&ne.add(h.key),M.add(h.key)})}return{checkedKeys:Array.from(J),halfCheckedKeys:Array.from(Oe(ne,J))}}function Se(K,S,y,W,J){for(var ne=new Set(K),le=new Set(S),H=0;H<=W;H+=1){var M=y.get(H)||new Set;M.forEach(function(h){var ee=h.key,ge=h.node,q=h.children,j=q===void 0?[]:q;!ne.has(ee)&&!le.has(ee)&&!J(ge)&&j.filter(function(d){return!J(d.node)}).forEach(function(d){ne.delete(d.key)})})}le=new Set;for(var A=new Set,k=W;k>=0;k-=1){var F=y.get(k)||new Set;F.forEach(function(h){var ee=h.parent,ge=h.node;if(J(ge)||!h.parent||A.has(h.parent.key))return;if(J(h.parent.node)){A.add(ee.key);return}var q=!0,j=!1;(ee.children||[]).filter(function(d){return!J(d.node)}).forEach(function(d){var V=d.key,b=ne.has(V);q&&!b&&(q=!1),!j&&(b||le.has(V))&&(j=!0)}),q||ne.delete(ee.key),j&&le.add(ee.key),A.add(ee.key)})}return{checkedKeys:Array.from(ne),halfCheckedKeys:Array.from(Oe(le,ne))}}function ce(K,S,y,W){var J=[],ne;W?ne=W:ne=ie;var le=new Set(K.filter(function(k){var F=!!y[k];return F||J.push(k),F})),H=new Map,M=0;Object.keys(y).forEach(function(k){var F=y[k],h=F.level,ee=H.get(h);ee||(ee=new Set,H.set(h,ee)),ee.add(F),M=Math.max(M,h)}),Object(G.a)(!J.length,"Tree missing follow keys: ".concat(J.slice(0,100).map(function(k){return"'".concat(k,"'")}).join(", ")));var A;return S===!0?A=Te(le,H,M,ne):A=Se(le,S.halfCheckedKeys,H,M,ne),A}},O2Wb:function(Je,We,l){Je.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},OLES:function(Je,We,l){"use strict";var G=l("U8pU"),Oe=l("VTBJ"),ie=l("Ff2n"),Te=l("q1tI"),Se=l("uciX"),ce=l("7ixt"),K=function(le){var H=le.overlay,M=le.prefixCls,A=le.id,k=le.overlayInnerStyle;return Te.createElement("div",{className:"".concat(M,"-inner"),id:A,role:"tooltip",style:k},typeof H=="function"?H():H)},S=K,y=function(le,H){var M=le.overlayClassName,A=le.trigger,k=A===void 0?["hover"]:A,F=le.mouseEnterDelay,h=F===void 0?0:F,ee=le.mouseLeaveDelay,ge=ee===void 0?.1:ee,q=le.overlayStyle,j=le.prefixCls,d=j===void 0?"rc-tooltip":j,V=le.children,b=le.onVisibleChange,N=le.afterVisibleChange,m=le.transitionName,v=le.animation,L=le.placement,R=L===void 0?"right":L,_=le.align,B=_===void 0?{}:_,de=le.destroyTooltipOnHide,Q=de===void 0?!1:de,Ce=le.defaultVisible,T=le.getTooltipContainer,c=le.overlayInnerStyle,$=Object(ie.a)(le,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),xe=Object(Te.useRef)(null);Object(Te.useImperativeHandle)(H,function(){return xe.current});var _e=Object(Oe.a)({},$);"visible"in le&&(_e.popupVisible=le.visible);var ke=function(){var Z=le.arrowContent,O=Z===void 0?null:Z,C=le.overlay,re=le.id;return[Te.createElement("div",{className:"".concat(d,"-arrow"),key:"arrow"},O),Te.createElement(S,{key:"content",prefixCls:d,id:re,overlay:C,overlayInnerStyle:c})]},Ee=!1,pe=!1;if(typeof Q=="boolean")Ee=Q;else if(Q&&Object(G.a)(Q)==="object"){var X=Q.keepParent;Ee=X===!0,pe=X===!1}return Te.createElement(Se.a,Object.assign({popupClassName:M,prefixCls:d,popup:ke,action:k,builtinPlacements:ce.a,popupPlacement:R,ref:xe,popupAlign:B,getPopupContainer:T,onPopupVisibleChange:b,afterPopupVisibleChange:N,popupTransitionName:m,popupAnimation:v,defaultPopupVisible:Ce,destroyPopupOnHide:Ee,autoDestroy:pe,mouseLeaveDelay:ge,popupStyle:q,mouseEnterDelay:h},_e),V)},W=Object(Te.forwardRef)(y),J=We.a=W},OZM5:function(Je,We,l){"use strict";l.d(We,"b",function(){return W}),l.d(We,"a",function(){return J}),l.d(We,"k",function(){return ne}),l.d(We,"h",function(){return le}),l.d(We,"i",function(){return H}),l.d(We,"g",function(){return M}),l.d(We,"c",function(){return A}),l.d(We,"d",function(){return k}),l.d(We,"j",function(){return ee}),l.d(We,"e",function(){return ge}),l.d(We,"f",function(){return q});var G=l("KQm4"),Oe=l("U8pU"),ie=l("Ff2n"),Te=l("q1tI"),Se=l.n(Te),ce=l("Kwbf"),K=l("WaYH"),S=.25,y=2;function W(j,d){var V=j.slice(),b=V.indexOf(d);return b>=0&&V.splice(b,1),V}function J(j,d){var V=j.slice();return V.indexOf(d)===-1&&V.push(d),V}function ne(j){return j.split("-")}function le(j,d){return"".concat(j,"-").concat(d)}function H(j){return j&&j.type&&j.type.isTreeNode}function M(j,d){var V=[j],b=d[j];function N(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];m.forEach(function(v){var L=v.key,R=v.children;V.push(L),N(R)})}return N(b.children),V}function A(j,d){var V=j.clientY,b=d.selectHandle.getBoundingClientRect(),N=b.top,m=b.bottom,v=b.height,L=Math.max(v*S,y);return V<=N+L?-1:V>=m-L?1:0}function k(j,d){if(!j)return;var V=d.multiple;return V?j.slice():j.length?[j[0]]:j}var F=function(d){return d};function h(j,d){if(!j)return[];var V=d||{},b=V.processProps,N=b===void 0?F:b,m=Array.isArray(j)?j:[j];return m.map(function(v){var L=v.children,R=Object(ie.a)(v,["children"]),_=h(L,d);return Se.a.createElement(K.a,Object.assign({},N(R)),_)})}function ee(j){if(!j)return null;var d;if(Array.isArray(j))d={checkedKeys:j,halfCheckedKeys:void 0};else if(Object(Oe.a)(j)==="object")d={checkedKeys:j.checked||void 0,halfCheckedKeys:j.halfChecked||void 0};else return Object(ce.a)(!1,"`checkedKeys` is not an array or an object"),null;return d}function ge(j,d){var V=new Set;function b(N){if(V.has(N))return;var m=d[N];if(!m)return;V.add(N);var v=m.parent,L=m.node;if(L.disabled)return;v&&b(v.key)}return(j||[]).forEach(function(N){b(N)}),Object(G.a)(V)}function q(j){var d={};return Object.keys(j).forEach(function(V){(V.startsWith("data-")||V.startsWith("aria-"))&&(d[V]=j[V])}),d}},Ot1p:function(Je,We,l){"use strict";var G=l("2qtc"),Oe=l("kLXV"),ie=l("rAM+"),Te=l("miYZ"),Se=l("tsqr"),ce=l("tJVT"),K=l("jrin"),S=l("q1tI"),y=l.n(S),W=l("VrN/"),J=l.n(W),ne=l("bdgK"),le=l("p77/"),H=l("Bd2K"),M=l("ELLl"),A=l("19Vz"),k=l("lZu9"),F=l("+NIl"),h=l("kSUc"),ee=l("9Bee"),ge=function(w){var p=w.value,g=p===void 0?"":p,E=w.className,x=w.showTextOnly,Y=w.showLines,oe=w.style,ue=oe===void 0?{}:oe,tt=Object(S.useMemo)(function(){return""},[g]);return y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{dangerouslySetInnerHTML:{__html:tt}}))},q=l("0Owb"),j=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(w){var p=w.onActionCallback,g=w.title,E=w.icon,x=w.actionName,Y=w.className,oe=Y===void 0?"":Y,ue=w.children;function tt(){p(x)}return y.a.createElement("a",{title:g,className:oe,onClick:tt},y.a.createElement("i",{className:"md-iconfont ".concat(E)}),ue)}var N=function(w){var p=w.watch,g=w.showNullButton,E=w.onActionCallback,x=w.fullScreen,Y=w.insertTemp,oe=w.hidetoolBar,ue=[].concat(V,[{title:"".concat(p?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(p?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return y.a.createElement("ul",{className:"markdown-toolbar-container"},!oe&&ue.map(function(tt,Ue){return y.a.createElement("li",{key:Ue},tt.actionName?y.a.createElement(b,Object(q.a)({},tt,{onActionCallback:E})):y.a.createElement("span",{className:"v-line"}))}),g?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:E},y.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Y&&y.a.createElement("li",null,y.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Y),onActionCallback:E},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(x?"icon-shrink":"icon-enlarge"),title:x?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:E})))},m=l("M8RZ"),v=l("+L6B"),L=l("2/Rp"),R=l("y8nQ"),_=l("Vl3Y"),B=l("5NDa"),de=l("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},Ce=function(w){var p=w.callback,g=w.onCancel;function E(x){p(x)}return y.a.createElement(_.a,Object(q.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:E}),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(de.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(de.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:g},"\u53D6\u6D88")))},T=l("7ahc"),c=l("HmJG"),$=l("BjJ7"),xe=_.a.useForm,_e={width:280,marginRight:10},ke={labelCol:{span:5},wrapperCol:{span:19}},Ee=function(w){var p=w.callback,g=w.onCancel,E=xe(),x=Object(ce.a)(E,1),Y=x[0];function oe(Ue){p(Ue)}function ue(Ue,Pe){Y.setFieldsValue({src:"/api/attachments/".concat(Ue.id),type:Pe.type})}function tt(Ue){var Pe=Ue.target.files[0];X(Pe,ue)}return y.a.createElement(_.a,Object(q.a)({form:Y},ke,{className:"upload-image-panel",onFinish:oe}),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(de.a,{style:_e})),y.a.createElement(pe,{onFileChange:tt}))),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(de.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:g},"\u53D6\u6D88")))};function pe(w){var p=w.onFileChange;return y.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",y.a.createElement("input",{type:"file",onChange:p}))}function X(w,p){if(!w)throw new String("\u6CA1\u6709\u6587\u4EF6");var g=new FormData;g.append("editormd-image-file",w),g.append("file_param_name","editormd-image-file"),g.append("byxhr","true");var E=new window.XMLHttpRequest;E.withCredentials=!0,E.addEventListener("load",function(x){p(JSON.parse(x.target.responseText),w)},!1),E.addEventListener("error",function(x){console.error(x)},!1),E.open("POST","".concat($.a,"/api/attachments.json")),E.send(g)}var P=l("giR+"),Z=l("fyUT"),O=l("7Kak"),C=l("9yH6"),re=C.a.Group,De={margin:"0 8px"},me=function(w){var p=w.callback,g=w.onCancel;function E(x){p(x)}return y.a.createElement(_.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:E},y.a.createElement("div",{className:"flex-container"},y.a.createElement("span",{style:De},"\u5355\u5143\u683C\u6570\uFF1A"),y.a.createElement("span",{style:De},"\u884C\u6570"),y.a.createElement(_.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},y.a.createElement(Z.a,null)),y.a.createElement("span",{style:De},"\u5217\u6570"),y.a.createElement(_.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},y.a.createElement(Z.a,null))),y.a.createElement("div",{className:"flex-container",style:{marginTop:12}},y.a.createElement("span",{style:De},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),y.a.createElement(_.a.Item,{name:"align"},y.a.createElement(re,null,y.a.createElement(C.a,{value:"default"},y.a.createElement("i",{className:"fa fa-align-justify"})),y.a.createElement(C.a,{value:"left"},y.a.createElement("i",{className:"fa fa-align-left"})),y.a.createElement(C.a,{value:"center"},y.a.createElement("i",{className:"fa fa-align-center"})),y.a.createElement(C.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:g},"\u53D6\u6D88")))},te=l("m3rI"),ye=l("wMS7"),ve=l.n(ye),he="link",je="upload-image",Ke="code-block",Ve="add-table",Me="------------",Ae={default:Me,left:":".concat(Me),center:":".concat(Me,":"),right:"".concat(Me,":")},et=l("9VGf"),at,pt;function ot(){}var wt=0,bt=1e4,dt="\u2581",Re=` **\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 Ot(w){return/^\d+$/.test(w)?"".concat(w,"px"):w}var yt=navigator.platform.toUpperCase().indexOf("MAC")>=0,Le=yt?"Cmd":"Ctrl",Be=(at={},Object(K.a)(at,Le+"-B","bold"),Object(K.a)(at,Le+"-I","italic"),at),D=(pt={},Object(K.a)(pt,he,"\u6DFB\u52A0\u94FE\u63A5"),Object(K.a)(pt,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(K.a)(pt,je,"\u6DFB\u52A0\u56FE\u7247"),Object(K.a)(pt,Ve,"\u6DFB\u52A0\u8868\u683C"),pt),I=We.a=function(w){var p=w.defaultValue,g=p===void 0?"":p,E=w.onChange,x=w.width,Y=x===void 0?"100%":x,oe=w.height,ue=oe===void 0?400:oe,tt=w.miniToolbar,Ue=tt===void 0?!1:tt,Pe=w.isFocus,vt=Pe===void 0?!1:Pe,Dt=w.watch,ht=w.insertTemp,Kt=w.mode,Ge=Kt===void 0?"markdown":Kt,Ht=w.id,Lt=Ht===void 0?"markdown-editor-id":Ht,xt=w.showResizeBar,Ft=xt===void 0?!1:xt,Rt=w.noStorage,ut=Rt===void 0?!1:Rt,qe=w.showNullButton,He=qe===void 0?!1:qe,gt=w.hidetoolBar,Nt=gt===void 0?!1:gt,Mt=w.fullScreen,en=Mt===void 0?!1:Mt,Wt=w.onBlur,ft=w.onCMBeforeChange,Vt=w.onFullScreen,Ct=w.className,an=Ct===void 0?"":Ct,jt=w.disablePaste,on=jt===void 0?!1:jt,Cn=w.placeholder,Jt=Cn===void 0?"":Cn,ze=w.values,Ze=ze===void 0?"":ze,rn=Object(S.useState)(null),sn=Object(ce.a)(rn,2),Xe=sn[0],bn=sn[1],Mn=Object(S.useState)(g),Ut=Object(ce.a)(Mn,2),Un=Ut[0],pa=Ut[1],kn=Object(S.useState)(Dt),Pn=Object(ce.a)(kn,2),ma=Pn[0],It=Pn[1],be=Object(S.useState)(en),St=Object(ce.a)(be,2),Fe=St[0],ae=St[1],Ye=Object(S.useState)(""),kt=Object(ce.a)(Ye,2),ct=kt[0],nt=kt[1],At=Object(S.useState)(0),tn=Object(ce.a)(At,2),cn=tn[0],fn=tn[1],wn=Object(S.useState)(ue),Yn=Object(ce.a)(wn,2),yn=Yn[0],Zn=Yn[1],Ua=Object(S.useState)(!1),ua=Object(ce.a)(Ua,2),Kn=ua[0],Ia=ua[1],va=Object(S.useRef)(),Ln=Object(S.useRef)(),Da=Object(S.useRef)(),Qa=Object(S.useRef)();Object(S.useEffect)(function(){pa(Ze),Xe==null||Xe.setValue(Ze)},[Ze]),Object(S.useEffect)(function(){Vt==null||Vt(Fe)},[Fe]),Object(S.useEffect)(function(){if(va.current){var Xt=J.a.fromTextArea(va.current,{mode:Ge,lineNumbers:!Ue,lineWrapping:!0,value:g,autoCloseTags:!0,autoCloseBrackets:!0});vt&&Xt.focus();function Qt(Zt,$t){if(on){$t.preventDefault();return}var ln=$t.clipboardData;if(ln){var _n=ln.types.toString(),Sn=ln.items,On=["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(_n==="Files"||ln.types.indexOf("Files")>-1){if($t.preventDefault(),Ge=="stex")return;try{var Hn,ga=Sn[1];((Hn=Sn[0])===null||Hn===void 0?void 0:Hn.kind)==="file"&&(ga=Sn[0]);var In=ga.getAsFile(),Wa=In.name.split(".").pop();X(In,function(qn){if(qn.id){var za,Ka,ir;(In==null||((za=In.type)===null||za===void 0)?void 0:za.indexOf("image"))>-1?Xt.replaceSelection("![,](/api/attachments/".concat(qn.id,"?type=").concat(qn.content_type,")")):(In==null||((Ka=In.type)===null||Ka===void 0)?void 0:Ka.indexOf("video"))>-1?Xt.replaceSelection('')):(In==null||((ir=In.type)===null||ir===void 0)?void 0:ir.indexOf("pdf"))>-1?Xt.replaceSelection('
    ').concat(In.name,"")):On.includes(Wa)?Xt.replaceSelection('').concat(In.name,"")):Xt.replaceSelection("[".concat(In.name,"](").concat(te.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){Se.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Xt.on("paste",Qt),bn(Xt),function(){Xt.off("paste",Qt)}}},[]);var nr=Object(S.useCallback)(function(){if(Ln.current)try{}catch(Xt){console.log(Xt,"---- to set md editor body height")}},[yn,Ln,Fe]);Object(S.useEffect)(function(){function Xt(){var Zt=new ne.default(function($t){var ln=Object(ie.a)($t),_n;try{for(ln.s();!(_n=ln.n()).done;){var Sn=_n.value;(Sn.target.offsetHeight>0||Sn.target.offsetWidth>0)&&(nr(),Xe.setSize("100%","100%"),Xe.refresh())}}catch(On){ln.e(On)}finally{ln.f()}});return Zt.observe(va.current.parentElement),Zt}if(Xe){var Qt=Xt();return function(){Qt.unobserve(va.current.parentElement)}}},[Xe,nr]),Object(S.useEffect)(function(){if(Xe){for(var Xt=[],Qt=function(){var Sn=$t[Zt];ln=Object(ce.a)(Sn,2);var On=ln[0],Hn=ln[1],ga=Object(K.a)({},On,function(){Za(Hn)});Xt.push(ga),Xe.addKeyMap(ga)},Zt=0,$t=Object.entries(Be);Zt<$t.length;Zt++){var ln;Qt()}return function(){var _n=Object(ie.a)(Xt),Sn;try{for(_n.s();!(Sn=_n.n()).done;){var On=Sn.value;Xe.removeKeyMap(On)}}catch(Hn){_n.e(Hn)}finally{_n.f()}}}},[Xe]),Object(S.useEffect)(function(){en!==Fe&&ae(en)},[en]),Object(et.a)(function(){if(!ut&&cn>0){var Xt=new Date().getTime(),Qt=window.sessionStorage.getItem(Lt);Xt>=cn+bt&&(!Qt||Qt!==Un)&&(window.sessionStorage.setItem(Lt,Un),Ia(!0))}},bt),Object(S.useEffect)(function(){It(Dt)},[Xe,Dt]),Object(S.useEffect)(function(){Xe&&(vt&&Xe.focus())},[Xe,vt]),Object(S.useEffect)(function(){if(ma&&Xe){var Xt=Xe.getScrollerElement();function Qt(Zt){var $t=Zt.target;if(Qa.current){var ln=$t.scrollTop/$t.scrollHeight;Qa.current.scrollTop=Qa.current.scrollHeight*ln}}return Xt.addEventListener("scroll",Qt),function(){Xt.removeEventListener("scroll",Qt)}}},[Xe,ma]),Object(S.useEffect)(function(){if(Xe&&ft){function Xt(Qt,Zt){ft(Qt,Zt)}return Xe.on("beforeChange",Xt),function(){Xe.off("beforeChange",Xt)}}},[Xe,ft]),Object(S.useEffect)(function(){if(Xe&&Wt){function Xt(){Wt(Xe.getValue())}return Xe.on("blur",Xt),function(){Xe.off("blur",Xt)}}},[Xe,Wt]),Object(S.useEffect)(function(){if(Xe){function Xt(Qt){var Zt=ve.a.sanitize(Qt.getValue());pa(Zt),fn(new Date().getTime()),Qt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),E&&E(Zt)}return Xe.on("change",Xt),function(){Xe.off("change",Xt)}}},[Xe,E]),Object(S.useEffect)(function(){Xe&&(g==null?(Xe.setValue(""),pa("")):g!==Xe.getValue()&&(Xe.setValue(g),pa(g),Xe.setCursor(Xe.lineCount(),0)))},[Xe,g]);var Za=Object(S.useCallback)(function(Xt){var Qt=Xe.getCursor(),Zt=Xe.getSelection(),$t=Zt.split(` `);switch(Xt){case"bold":return Xe.replaceSelection("**"+Zt+"**"),Zt===""&&Xe.setCursor(Qt.line,Qt.ch+2),Xe.focus();case"italic":return Xe.replaceSelection("*"+Zt+"*"),Zt===""&&Xe.setCursor(Qt.line,Qt.ch+1),Xe.focus();case"code":return Xe.replaceSelection("`"+Zt+"`"),Zt===""&&Xe.setCursor(Qt.line,Qt.ch+1),Xe.focus();case"inline-latex":return Xe.replaceSelection("`$$"+Zt+"$$`"),Zt===""&&Xe.setCursor(Qt.line,Qt.ch+3),Xe.focus();case"latex":return Xe.replaceSelection("```latex\n"+Zt+"\n```"),Xe.setCursor(Qt.line+1,Zt.length+1),Xe.focus();case"line-break":return Xe.replaceSelection(`
    `),Xe.focus();case"list-ul":return Zt===""?Xe.replaceSelection("- "+Zt):Xe.replaceSelection($t.map(function(ln){return ln===""?"":"- ".concat(ln)}).join(` `)),Xe.focus();case"list-ol":return Zt===""?Xe.replaceSelection("1. "+Zt):Xe.replaceSelection($t.map(function(ln,_n){return ln===""?"":"".concat(_n+1,". ").concat(ln)}).join(` `)),Xe.focus();case"add-null-ch":return Zt===""&&Xe.setCursor(Qt.line,Qt.ch+1),Xe.replaceSelection(dt),Xe.focus();case"inster-template-1":return Zt===""&&Xe.setCursor(Qt.line,Qt.ch),Xe.replaceSelection(Re),Xe.focus();case"eraser":return Xe.setValue(""),Xe.focus();case"trigger-watch":return It(!ma),Xe.focus();case"trigger-full-screen":return ae(!Fe),Xe.focus();case he:nt(he);return;case Ke:nt(Ke);return;case je:nt(je);return;case Ve:nt(Ve);return;default:throw new Error}},[Xe,ma,Fe]),Fa=Object(S.useCallback)(function(Xt){nt("");switch(ct){case he:var Qt=Xt.title,Zt=Xt.link;return Xe.replaceSelection("[".concat(Qt,"](").concat(Zt,")")),Xe.focus();case Ke:var $t=Xt.language,ln=Xt.content;return Xe.replaceSelection(["```"+$t,ln,"```"].join(` `)),Xe.focus();case je:var _n=Xt.src,Sn=Xt.alt;return Xe.replaceSelection("![ ".concat(Sn," ]( ").concat(_n,' "').concat(Sn,'" )')),Xe.focus();case Ve:for(var On=Xt.row,Hn=Xt.col,ga=Xt.align,In=` `,Wa=0;Wa300&&(On=300);var Hn=ue+On+"px";Zn(Hn)}}return Xt.addEventListener("mousedown",$t),document.addEventListener("mousemove",_n),document.addEventListener("mouseup",ln),function(){Xt.removeEventListener("mousedown",$t),document.removeEventListener("mousemove",_n),document.removeEventListener("mouseup",ln)}}},[Xe,Da]),Object(S.useEffect)(function(){Zn(ue)},[ue]);var ar=Ot(Y),rr=Ot(yn),Na={width:ar,height:rr},$r=Object(S.useMemo)(function(){if(cn){var Xt=new Date(cn),Qt=Xt.getHours(),Zt=Xt.getMinutes(),$t=Xt.getSeconds();return Qt=Qt<10?"0"+Qt:Qt,Zt=Zt<10?"0"+Zt:Zt,$t=$t<10?"0"+$t:$t,"".concat(Qt,":").concat(Zt,":").concat($t)}return 0},[cn]);function ka(){window.sessionStorage.removeItem(Lt),Ia(!1),fn(0)}function _i(){Ia(!1),fn(0),Xe.setValue(window.sessionStorage.getItem(Lt))}return y.a.createElement(S.Fragment,null,y.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ln},y.a.createElement("div",{className:"markdown-editor-container ".concat(an," ").concat(ma?"on-preview":""," ").concat(Ue?"mini":""," ").concat(Fe?"full-screen":""),style:Na},y.a.createElement(N,{insertTemp:ht,watch:ma,fullScreen:Fe,showNullButton:He,onActionCallback:Za,hidetoolBar:Nt}),y.a.createElement("div",{className:"markdown-editor-body"},y.a.createElement("div",{className:"codemirror-container"},y.a.createElement("textarea",{ref:va,placeholder:Jt})),ma?y.a.createElement("div",{ref:Qa,className:"preview-container"},Ge==="stex"&&y.a.createElement(ge,{value:Un}),Ge!=="stex"&&y.a.createElement(ee.a,{value:Un})):null))),Ft?y.a.createElement("a",{ref:Da,className:"editor-resize"}):null,y.a.createElement(m.a,null,D[ct]?y.a.createElement(Oe.a,{centered:!0,title:D[ct],visible:!0,onCancel:Ba,footer:null},vr):null))}},PGNT:function(Je,We,l){Je.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(Je,We,l){Je.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(Je,We,l){Je.exports=l.p+"static/wenhao.50b63ac4.svg"},"RZ/O":function(Je,We,l){Je.exports=l.p+"static/bi.9c9b0364.svg"},SJMd:function(Je,We){/** * @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,Oe,ie=!1,Te,Se;window.PR_SHOULD_USE_CONTINUATION=!0;var ce,K;(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"],J=[W,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],ne=[J,"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"],le=[J,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],H=[J,"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",A=[J,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],k="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",F=[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"],ee=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],ge=[ne,H,le,A,k,F,h,ee],q=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,j="str",d="kwd",V="com",b="typ",N="lit",m="pun",v="pln",L="tag",R="dec",_="src",B="atn",de="atv",Q="nocode",Ce="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function T(ve){for(var he=0,je=!1,Ke=!1,Ve=0,Me=ve.length;Ve122||(p<65||w>90||Ot.push([Math.max(65,w)|32,Math.min(p,90)|32]),p<97||w>122||Ot.push([Math.max(97,w)&~32,Math.min(p,122)&~32]))}}Ot.sort(function(Y,oe){return Y[0]-oe[0]||oe[1]-Y[1]});for(var g=[],E=[],Be=0;Bex[0]&&(x[1]+1>x[0]&&Le.push("-"),Le.push(pt(x[1])))}return Le.push("]"),Le.join("")}function wt(dt){for(var Re=dt.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")),Ot=Re.length,yt=[],Le=0,Be=0;Le=2&&w==="["?Re[Le]=ot(D):w!=="\\"&&(Re[Le]=D.replace(/[a-zA-Z]/g,function(E){var x=E.charCodeAt(0);return"["+String.fromCharCode(x&~32,x|32)+"]"}))}return Re.join("")}for(var bt=[],Ve=0,Me=ve.length;Ve=0;)je[bt.charAt(dt)]=wt;var Re=wt[1],Ot=""+Re;at.hasOwnProperty(Ot)||(et.push(Re),at[Ot]=null)}et.push(/[\0-\uffff]/),Ke=T(et)})();var Ve=he.length,Me=function(Ae){for(var et=Ae.sourceCode,at=Ae.basePos,pt=Ae.sourceNode,ot=[at,v],wt=0,bt=et.match(Ke)||[],dt={},Re=0,Ot=bt.length;Re=5&&Le.substring(0,5)==="lang-",D&&!(Be&&typeof Be[1]=="string")&&(D=!1,Le=_),D||(dt[yt]=Le)}var p=wt;if(wt+=yt.length,!D)ot.push(at+p,Le);else{var g=Be[1],E=yt.indexOf(g),x=E+g.length;Be[2]&&(x=yt.length-Be[2].length,E=x-g.length);var Y=Le.substring(5);$(pt,at+p,yt.substring(0,E),Me,ot),$(pt,at+p+E,g,C(Y,g),ot),$(pt,at+p+x,yt.substring(x),Me,ot)}}Ae.decorations=ot};return Me}function Ee(ve){var he=[],je=[];ve.tripleQuotedStrings?he.push([j,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ve.multiLineStrings?he.push([j,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([j,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ve.verbatimStrings&&je.push([j,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ke=ve.hashComments;Ke&&(ve.cStyleComments?(Ke>1?he.push([V,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([V,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),je.push([j,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([V,/^#[^\r\n]*/,null,"#"])),ve.cStyleComments&&(je.push([V,/^\/\/[^\r\n]*/,null]),je.push([V,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ve=ve.regexLiterals;if(Ve){var Me=Ve>1?"":` \r`,Ae=Me?".":"[\\S\\s]",et="/(?=[^/*"+Me+"])(?:[^/\\x5B\\x5C"+Me+"]|\\x5C"+Ae+"|\\x5B(?:[^\\x5C\\x5D"+Me+"]|\\x5C"+Ae+")*(?:\\x5D|$))+/";je.push(["lang-regex",RegExp("^"+Ce+"("+et+")")])}var at=ve.types;at&&je.push([b,at]);var pt=(""+ve.keywords).replace(/^ | $/g,"");pt.length&&je.push([d,new RegExp("^(?:"+pt.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([v,/^\s+/,null,` \r \xA0`]);var ot="^.[^\\s\\w.$@'\"`/\\\\]*";return ve.regexLiterals&&(ot+="(?!s*/)"),je.push([N,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[v,/^[a-z_$][a-z_$@0-9]*/i,null],[N,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[v,/^\\[\s\S]?/,null],[m,new RegExp(ot),null]),ke(he,je)}var pe=Ee({keywords:ge,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function X(ve,he,je){for(var Ke=/(?:^|\s)nocode(?:\s|$)/,Ve=/\r\n?|\n/,Me=ve.ownerDocument,Ae=Me.createElement("li");ve.firstChild;)Ae.appendChild(ve.firstChild);var et=[Ae];function at(Re){var Ot=Re.nodeType;if(Ot==1&&!Ke.test(Re.className))if(Re.nodeName==="br")pt(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var yt=Re.firstChild;yt;yt=yt.nextSibling)at(yt);else if((Ot==3||Ot==4)&&je){var Le=Re.nodeValue,Be=Le.match(Ve);if(Be){var D=Le.substring(0,Be.index);Re.nodeValue=D;var I=Le.substring(Be.index+Be[0].length);if(I){var w=Re.parentNode;w.insertBefore(Me.createTextNode(I),Re.nextSibling)}pt(Re),D||Re.parentNode.removeChild(Re)}}}function pt(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function Ot(Be,D){var I=D?Be.cloneNode(!1):Be,w=Be.parentNode;if(w){var p=Ot(w,1),g=Be.nextSibling;p.appendChild(I);for(var E=g;E;E=g)g=E.nextSibling,p.appendChild(E)}return I}for(var yt=Ot(Re.nextSibling,0),Le;(Le=yt.parentNode)&&Le.nodeType===1;)yt=Le;et.push(yt)}for(var ot=0;ot=w&&(at+=2),Me>=p&&(wt+=2)}}finally{Le&&(Le.style.display=Be)}}var Z={};function O(ve,he){for(var je=he.length;--je>=0;){var Ke=he[je];Z.hasOwnProperty(Ke)?S.console&&console.warn("cannot override language handler %s",Ke):Z[Ke]=ve}}function C(ve,he){return ve&&Z.hasOwnProperty(ve)||(ve=/^\s*]*(?:>|$)/],[V,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[m,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),O(ke([[v,/^[\s]+/,null,` \r `],[de,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[L,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[B,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[m,/^[=<>\/]+/],["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(ke([],[[de,/^[\s\S]+/]]),["uq.val"]),O(Ee({keywords:ne,hashComments:!0,cStyleComments:!0,types:q}),["c","cc","cpp","cxx","cyc","m"]),O(Ee({keywords:"null,true,false"}),["json"]),O(Ee({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:q}),["cs"]),O(Ee({keywords:le,cStyleComments:!0}),["java"]),O(Ee({keywords:ee,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),O(Ee({keywords:F,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),O(Ee({keywords:k,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),O(Ee({keywords:h,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),O(Ee({keywords:A,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),O(Ee({keywords:M,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),O(ke([],[[j,/^[\s\S]+/]]),["regex"]);function re(ve){var he=ve.langExtension;try{var je=c(ve.sourceNode,ve.pre),Ke=je.sourceCode;ve.sourceCode=Ke,ve.spans=je.spans,ve.basePos=0,C(he,Ke)(ve),P(ve)}catch(Ve){S.console&&console.log(Ve&&Ve.stack||Ve)}}function De(ve,he,je){var Ke=je||!1,Ve=he||null,Me=document.createElement("div");Me.innerHTML="
    "+ve+"
    ",Me=Me.firstChild,Ke&&X(Me,Ke,!0);var Ae={langExtension:Ve,numberLines:Ke,sourceNode:Me,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Ae),Me.innerHTML}function me(ve,he){var je=he||document.body,Ke=je.ownerDocument||document;function Ve(I){return je.getElementsByTagName(I)}for(var Me=[Ve("pre"),Ve("code"),Ve("xmp")],Ae=[],et=0;et=15&&(ne=!1,y=!0);var j=h&&(W||ne&&(q==null||q<12.11)),d=ie||K&&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 N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function m(e,t){return N(e).appendChild(t)}function v(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)return o+(t-i);o+=s-i,o+=a-o%a,i=s+1}}var xe=function(){this.id=null,this.f=null,this.time=0,this.handler=T(this.onTimeout,this)};xe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},xe.prototype.set=function(e,t){this.f=t;var a=+new Date+e;(!this.id||a=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 C(e){for(;O.length<=e;)O.push(re(O)+" ");return O[e]}function re(e){return e[e.length-1]}function De(e,t){for(var a=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ve.test(e))}function je(e,t){return t?t.source.indexOf("\\w")>-1&&he(e)?!0:t.test(e):he(e)}function Ke(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ve=/[\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&&Ve.test(e)}function Ae(e,t,a){for(;(a<0?t>0:ta?-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;it||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 ot(e,t,a){var n;pt=null;for(var r=0;rt)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 wt=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,z){this.level=f,this.from=U,this.to=z}return function(f,U){var z=U=="ltr"?"L":"R";if(f.length==0||U=="ltr"&&!n.test(f))return!1;for(var fe=f.length,se=[],Ie=0;Ie-1&&(n[t]=r.slice(0,i).concat(r.slice(i+1)))}}}function Le(e,t){var a=Ot(e,t);if(!a.length)return;for(var n=Array.prototype.slice.call(arguments,2),r=0;r0}function w(e){e.prototype.on=function(t,a){Re(this,t,a)},e.prototype.off=function(t,a){yt(this,t,a)}}function p(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function g(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function E(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function x(e){p(e),g(e)}function Y(e){return e.target||e.srcElement}function oe(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 ue=function(){if(K&&S<9)return!1;var e=v("div");return"draggable"in e||"dragDrop"in e}(),tt;function Ue(e){if(tt==null){var t=v("span","\u200B");m(e,v("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(tt=t.offsetWidth<=1&&t.offsetHeight>2&&!(K&&S<8))}var a=tt?v("span","\u200B"):v("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Pe;function vt(e){if(Pe!=null)return Pe;var t=m(e,document.createTextNode("A\u062EA")),a=R(t,0,1).getBoundingClientRect(),n=R(t,1,2).getBoundingClientRect();return N(e),!a||a.left==a.right?!1:Pe=n.right-a.right<3}var Dt=` 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/)},ht=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(a){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Kt=function(){var e=v("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ge=null;function Ht(e){if(Ge!=null)return Ge;var t=m(e,v("span","x")),a=t.getBoundingClientRect(),n=R(t,0,1).getBoundingClientRect();return Ge=Math.abs(a.left-n.left)>1}var Lt={},xt={};function Ft(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Lt[e]=t}function Rt(e,t){xt[e]=t}function ut(e){if(typeof e=="string"&&xt.hasOwnProperty(e))e=xt[e];else if(e&&typeof e.name=="string"&&xt.hasOwnProperty(e.name)){var t=xt[e.name];typeof t=="string"&&(t={name:t}),e=ye(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ut("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ut("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function qe(e,t){t=ut(t);var a=Lt[t.name];if(!a)return qe(e,"text/plain");var n=a(e,t);if(He.hasOwnProperty(t.name)){var r=He[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 He={};function gt(e,t){var a=He.hasOwnProperty(e)?He[e]:He[e]={};c(t,a)}function Nt(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 Mt(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 en(e,t,a){return e.startState?e.startState(t,a):!0}var Wt=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};Wt.prototype.eol=function(){return this.pos>=this.string.length},Wt.prototype.sol=function(){return this.pos==this.lineStart},Wt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wt.prototype.next=function(){if(this.post},Wt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Wt.prototype.skipToEnd=function(){this.pos=this.string.length},Wt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Wt.prototype.backUp=function(e){this.pos-=e},Wt.prototype.column=function(){return this.lastColumnPos0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}},Wt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Wt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Wt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ft(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=e.first&&ta?ze(a,ft(e,a).text.length):Un(t,ft(e,t.line).text.length)}function Un(e,t){var a=e.ch;return a==null||a>t?ze(e.line,t):a<0?ze(e.line,0):e}function pa(e,t){for(var a=[],n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t},Pn.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}},Pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pn.fromSaved=function(e,t,a){return t instanceof kn?new Pn(e,Nt(e.mode,t.state),a,t.lookAhead):new Pn(e,Nt(e.mode,t),a)},Pn.prototype.save=function(e){var t=e!==!1?Nt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new kn(t,this.maxLookAhead):t};function ma(e,t,a,n){var r=[e.state.modeGen],i={};nt(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],z=1,fe=0;a.state=!0,nt(e,t.text,U.mode,a,function(se,Ie){for(var $e=z;fese&&r.splice(z,1,se,r[z+1],rt),z+=2,fe=Math.min(se,rt)}if(!Ie)return;if(U.opaque)r.splice($e,z-$e,se,"overlay "+Ie),z=$e+2;else for(;$ee.options.maxHighlightLength&&Nt(e.doc.mode,n.state),i=ma(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 be(e,t,a){var n=e.doc,r=e.display;if(!n.mode.startState)return new Pn(n,!0,t);var i=At(e,t,a),o=i>n.first&&ft(n,i-1).stateAfter,s=o?Pn.fromSaved(n,o,i):new Pn(n,en(n.mode),i);return n.iter(i,t,function(u){St(e,u.text,s);var f=s.line;u.stateAfter=f==t-1||f%5==0||f>=r.viewFrom&&ft.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ye=function(e,t,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=a};function kt(e,t,a,n){var r=e.doc,i=r.mode,o;t=Ut(r,t);var s=ft(r,t.line),u=be(e,t.line,a),f=new Wt(s.text,e.options.tabSize,u),U;for(n&&(U=[]);(n||f.pose.options.maxHighlightLength?(s=!1,o&&St(e,t,n,U.pos),U.pos=t.length,z=null):z=ct(ae(a,U,n.state,fe),i),fe){var se=fe[0].name;se&&(z="m-"+(z?se+" "+z:se))}if(!s||f!=z){for(;uo;--s){if(s<=i.first)return i.first;var u=ft(i,s-1),f=u.stateAfter;if(f&&(!a||s+(f instanceof kn?f.lookAhead:0)<=i.modeFrontier))return s;var U=$(u.text,null,e.options.tabSize);(r==null||n>U)&&(r=s-1,n=U)}return r}function tn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontiera;n--){var r=ft(e,n).stateAfter;if(r&&(!(r instanceof kn)||n+r.lookAhead=t:i.to>t);(n||(n=[])).push(new yn(o,i.from,u?null:i.to))}}return n}function Ia(e,t,a){var n;if(e)for(var r=0;r=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.from0&&s)for(var Pt=0;Pt0)continue;var U=[u,1],z=Ze(f.from,s.from),fe=Ze(f.to,s.to);(z<0||!o.inclusiveLeft&&!z)&&U.push({from:f.from,to:s.from}),(fe>0||!o.inclusiveRight&&!fe)&&U.push({from:s.to,to:f.to}),r.splice.apply(r,U),u+=U.length-3}return r}function Qa(e){var t=e.markedSpans;if(!t)return;for(var a=0;at)&&(!n||vr(n,i.marker)<0)&&(n=i.marker)}return n}function $r(e,t,a,n,r){var i=ft(e,t),o=fn&&i.markedSpans;if(o)for(var s=0;s=0&&z<=0||U<=0&&z>=0)continue;if(U<=0&&(u.marker.inclusiveRight&&r.inclusiveLeft?Ze(f.to,a)>=0:Ze(f.to,a)>0)||U>=0&&(u.marker.inclusiveRight&&r.inclusiveLeft?Ze(f.from,n)<=0:Ze(f.from,n)<0))return!0}}function ka(e){for(var t;t=ar(e);)e=t.find(-1,!0).line;return e}function _i(e){for(var t;t=rr(e);)e=t.find(1,!0).line;return e}function Xt(e){for(var t,a;t=rr(e);)e=t.find(1,!0).line,(a||(a=[])).push(e);return a}function Qt(e,t){var a=ft(e,t),n=ka(a);return a==n?t:jt(n)}function Zt(e,t){if(t>e.lastLine())return t;var a=ft(e,t),n;if(!$t(e,a))return t;for(;n=rr(a);)a=n.find(1,!0).line;return jt(a)+1}function $t(e,t){var a=fn&&t.markedSpans;if(a)for(var n=void 0,r=0;rt.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var Hn=function(e,t,a){this.text=e,nr(this,t),this.height=a?a(this):1};Hn.prototype.lineNo=function(){return jt(this)},w(Hn);function ga(e,t,a,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Qa(e),nr(e,a);var r=n?n(e):1;r!=e.height&&an(e,r)}function In(e){e.parent=null,Qa(e)}var Wa={},qn={};function za(e,t){if(!e||/^\s*$/.test(e))return null;var a=t.addModeClass?qn:Wa;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function Ka(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,vt(e.display.measure)&&(o=bt(i,e.doc.direction))&&(n.addToken=Gr(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&jt(i);yi(i,n,It(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(Ue(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 Le(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Q(n.pre.className,n.textClass||"")),n}function ir(e){var t=v("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function 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),K&&S<9&&(f=!0),e.pos+=t.length;else{U=document.createDocumentFragment();for(var z=0;;){u.lastIndex=z;var fe=u.exec(t),se=fe?fe.index-z:t.length-z;if(se){var Ie=document.createTextNode(s.slice(z,z+se));K&&S<9?U.appendChild(v("span",[Ie])):U.appendChild(Ie),e.map.push(e.pos,e.pos+se,Ie),e.col+=se,e.pos+=se}if(!fe)break;z+=se+1;var $e=void 0;if(fe[0]==" "){var rt=e.cm.options.tabSize,_t=rt-e.col%rt;$e=U.appendChild(v("span",C(_t),"cm-tab")),$e.setAttribute("role","presentation"),$e.setAttribute("cm-text"," "),e.col+=_t}else fe[0]=="\r"||fe[0]==` `?($e=U.appendChild(v("span",fe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$e.setAttribute("cm-text",fe[0]),e.col+=1):($e=e.cm.options.specialCharPlaceholder(fe[0]),$e.setAttribute("cm-text",fe[0]),K&&S<9?U.appendChild(v("span",[$e])):U.appendChild($e),e.col+=1);e.map.push(e.pos,e.pos+1,$e),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,a||n||r||f||i||o){var Tt=a||"";n&&(Tt+=n),r&&(Tt+=r);var Et=v("span",[U],Tt,i);if(o)for(var Pt in o)o.hasOwnProperty(Pt)&&Pt!="style"&&Pt!="class"&&Et.setAttribute(Pt,o[Pt]);return e.content.appendChild(Et)}e.content.appendChild(U)}function Vi(e,t){if(e.length>1&&!/ /.test(e))return e;for(var a=t,n="",r=0;rf&&z.from<=f);fe++);if(z.to>=U)return e(a,n,r,i,o,s,u);e(a,n.slice(0,z.to-f),r,i,null,s,u),i=null,n=n.slice(z.to-f),f=z.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;ou||nn.collapsed&&Bt.to==u&&Bt.from==u)){if(Bt.to!=null&&Bt.to!=u&&se>Bt.to&&(se=Bt.to,$e=""),nn.className&&(Ie+=" "+nn.className),nn.css&&(fe=(fe?fe+";":"")+nn.css),nn.startStyle&&Bt.from==u&&(rt+=" "+nn.startStyle),nn.endStyle&&Bt.to==se&&(Pt||(Pt=[])).push(nn.endStyle,Bt.to),nn.title&&((Tt||(Tt={})).title=nn.title),nn.attributes)for(var xn in nn.attributes)(Tt||(Tt={}))[xn]=nn.attributes[xn];nn.collapsed&&(!_t||vr(_t.marker,nn)<0)&&(_t=Bt)}else Bt.from>u&&se>Bt.from&&(se=Bt.from)}if(Pt)for(var sa=0;sa=s)break;for(var Aa=Math.min(s,se);;){if(U){var Oa=u+U.length;if(!_t){var Gn=Oa>Aa?U.slice(0,Aa-u):U;t.addToken(t,Gn,z?z+Ie:Ie,rt,u+Gn.length==se?$e:"",fe,Tt)}if(Oa>=Aa){U=U.slice(Aa-u),u=Aa;break}u=Oa,rt=""}U=r.slice(i,i=a[f++]),z=za(a[f++],t.cm.options)}}}function xi(e,t,a){this.line=t,this.rest=Xt(t),this.size=this.rest?jt(re(this.rest))-a+1:1,this.node=this.text=null,this.hidden=$t(e,t)}function Ya(e,t,a){for(var n=[],r,i=t;i2&&i.push((u.bottom+f.top)/2-a.top)}}i.push(a.bottom-a.top)}}function Qe(e,t,a){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;na)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ne(e,t){t=ka(t);var a=jt(t),n=e.display.externalMeasured=new xi(e.doc,t,a);n.lineN=a;var r=n.built=Ka(e,n);return n.text=r.pre,m(e.display.lineMeasure,r.pre),n}function we(e,t,a,n){return mt(e,it(e,t),a,n)}function lt(e,t){if(t>=e.display.viewFrom&&t=a.lineN&&tt)&&(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=0&&!((a=e[r]).left!=a.right);r--);return a}function hn(e,t,a,n){var r=qt(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+s0&&(u=n="right");var z;e.options.lineWrapping&&(z=i.getClientRects()).length>1?f=z[n=="right"?z.length-1:0]:f=i.getBoundingClientRect()}if(K&&S<9&&!o&&(!f||!f.left&&!f.right)){var fe=i.parentNode.getClientRects()[0];fe?f={left:fe.left,right:fe.left+Ca(e.display),top:fe.top,bottom:fe.bottom}:f=zt}for(var se=f.top-t.rect.top,Ie=f.bottom-t.rect.top,$e=(se+Ie)/2,rt=t.view.measure.heights,_t=0;_t=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(Ie,$e,rt){var _t=s[$e],Tt=_t.level==1;return o(rt?Ie-1:Ie,Tt!=rt)}var z=ot(s,u,f),fe=pt,se=U(u,z,f=="before");return fe!=null&&(se.other=U(u,fe,f!="before")),se}function un(e,t){var a=0;t=Ut(e.doc,t),e.options.lineWrapping||(a=Ca(e.display)*t.ch);var n=ft(e.doc,t.line),r=_n(n)+Ar(e.display);return{left:a,right:a,top:r,bottom:r+n.height}}function Nn(e,t,a,n,r){var i=ze(e,t,a);return i.xRel=r,n&&(i.outside=n),i}function na(e,t,a){var n=e.doc;if(a+=e.display.viewOffset,a<0)return Nn(n.first,0,null,-1,-1);var r=on(n,a),i=n.first+n.size-1;if(r>i)return Nn(n.first+n.size-1,ft(n,i).text.length,null,1,1);t<0&&(t=0);for(var o=ft(n,r);;){var s=En(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=ft(n,r=f.line)}}function $n(e,t,a,n){n-=Xn(t);var r=t.text.length,i=et(function(o){return mt(e,a,o-1).bottom<=n},r,0);return r=et(function(o){return mt(e,a,o).top>n},i,r),{begin:i,end:r}}function _a(e,t,a,n){a||(a=it(e,t));var r=Fn(e,t,mt(e,a,n),"line").top;return $n(e,t,a,r)}function Ea(e,t,a,n){return e.bottom<=a?!1:e.top>a?!0:(n?e.left:e.right)>t}function En(e,t,a,n,r){r-=_n(t);var i=it(e,t),o=Xn(t),s=0,u=t.text.length,f=!0,U=bt(t,e.doc.direction);if(U){var z=(e.options.lineWrapping?aa:An)(e,t,a,i,U,n,r);f=z.level!=1,s=f?z.from:z.to-1,u=f?z.to:z.from-1}var fe=null,se=null,Ie=et(function(Gt){var Bt=mt(e,i,Gt);return Bt.top+=o,Bt.bottom+=o,Ea(Bt,n,r,!1)?(Bt.top<=r&&Bt.left<=n&&(fe=Gt,se=Bt),!0):!1},s,u),$e,rt,_t=!1;if(se){var Tt=n-se.left=Pt.bottom?1:0}return Ie=Ae(t.text,Ie,1),Nn(a,Ie,rt,_t,n-$e)}function An(e,t,a,n,r,i,o){var s=et(function(z){var fe=r[z],se=fe.level!=1;return Ea(Yt(e,ze(a,se?fe.to:fe.from,se?"before":"after"),"line",t,n),i,o,!0)},0,r.length-1),u=r[s];if(s>0){var f=u.level!=1,U=Yt(e,ze(a,f?u.from:u.to,f?"after":"before"),"line",t,n);Ea(U,i,o,!0)&&U.top>o&&(u=r[s-1])}return u}function aa(e,t,a,n,r,i,o){var s=$n(e,t,n,o),u=s.begin,f=s.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var U=null,z=null,fe=0;fe=f||se.to<=u)continue;var Ie=se.level!=1,$e=mt(e,n,Ie?Math.min(f,se.to)-1:Math.max(u,se.from)).right,rt=$ert)&&(U=se,z=rt)}return U||(U=r[r.length-1]),U.fromf&&(U={from:U.from,to:f,level:U.level}),U}var da;function ra(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(da==null){da=v("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)da.appendChild(document.createTextNode("x")),da.appendChild(v("br"));da.appendChild(document.createTextNode("x"))}m(e.measure,da);var a=da.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),N(e.measure),a||1}function Ca(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=v("span","xxxxxxxxxx"),a=v("pre",[t],"CodeMirror-line-like");m(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:Qr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:a,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Qr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ko(e){var t=ra(e.display),a=e.options.lineWrapping,n=a&&Math.max(5,e.display.scroller.clientWidth/Ca(e.display)-3);return function(r){if($t(e.doc,r))return 0;var i=0;if(r.widgets)for(var o=0;o0&&(f=ft(e.doc,u.line).text).length==u.ch){var U=$(f,f.length,e.options.tabSize)-f.length;u=ze(u.line,Math.max(0,Math.round((i-Oi(e.display).left)/Ca(e.display))-U))}return u}function Cr(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;nt)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)fn&&Qt(e.doc,t)r.viewFrom?ur(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&a>=r.viewTo)ur(e);else if(t<=r.viewFrom){var i=Ti(e,a,a+n,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=n):ur(e)}else if(a>=r.viewTo){var o=Ti(e,t,t,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):ur(e)}else{var s=Ti(e,t,t,-1),u=Ti(e,a,a+n,1);s&&u?(r.view=r.view.slice(0,s.index).concat(Ya(e,s.lineN,u.lineN)).concat(r.view.slice(u.index)),r.viewTo+=n):ur(e)}var f=r.externalMeasured;f&&(a=r.lineN&&t=n.viewTo)return;var i=n.view[Cr(e,t)];if(i.node==null)return;var o=i.changes||(i.changes=[]);_e(o,a)==-1&&o.push(a)}function ur(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ti(e,t,a,n){var r=Cr(e,t),i,o=e.display.view;if(!fn||a==e.doc.first+e.doc.size)return{index:r,lineN:a};for(var s=e.display.viewFrom,u=0;u0){if(r==o.length-1)return null;i=s+o[r].size-t,r++}else i=s-t;t+=i,a+=i}for(;Qt(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=Ya(e,t,a),n.viewFrom=t):(n.viewFrom>t?n.view=Ya(e,t,n.viewFrom).concat(n.view):n.viewFroma&&(n.view=n.view.slice(0,Cr(e,a)))),n.viewTo=a}function Po(e){for(var t=e.display.view,a=0,n=0;n=e.display.viewTo||s.to().line0?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||(Le(e,"focus",e,t),e.state.focused=!0,de(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&&(Le(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.005||U<-.005)&&(an(r.line,o),No(r.line),r.rest))for(var z=0;ze.display.sizerWidth){var fe=Math.ceil(s/Ca(e.display));fe>e.display.maxLineLength&&(e.display.maxLineLength=fe,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function No(e){if(e.widgets)for(var t=0;t=o&&(i=on(t,_n(ft(t,u))-e.wrapper.clientHeight),o=u)}return{from:i,to:Math.max(o,i+1)}}function Vs(e,t){if(Be(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=v("div","\u200B",null,`position: absolute; top: `+(t.top-a.viewOffset-Ar(e.display))+`px; height: `+(t.bottom-t.top+ja(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 Ys(e,t,a,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==a&&(t=t.ch?ze(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,a=t.sticky=="before"?ze(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var o=!1,s=Yt(e,t),u=!a||a==t?s:Yt(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,z=e.doc.scrollLeft;if(f.scrollTop!=null&&(ei(e,f.scrollTop),Math.abs(e.doc.scrollTop-U)>1&&(o=!0)),f.scrollLeft!=null&&(wr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-z)>1&&(o=!0)),!o)break}return r}function Js(e,t){var a=ro(e,t);a.scrollTop!=null&&ei(e,a.scrollTop),a.scrollLeft!=null&&wr(e,a.scrollLeft)}function ro(e,t){var a=e.display,n=ra(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,i=yr(e),o={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+Er(a),u=t.tops-n;if(t.topr+i){var U=Math.min(t.top,(f?s:t.bottom)-i);U!=r&&(o.scrollTop=U)}var z=e.options.fixedGutter?0:a.gutters.offsetWidth,fe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft-z,se=$a(e)-a.gutters.offsetWidth,Ie=t.right-t.left>se;return Ie&&(t.right=t.left+se),t.left<10?o.scrollLeft=0:t.leftse+fe-3&&(o.scrollLeft=t.right+(Ie?0:10)-se),o}function io(e,t){if(t==null)return;Ai(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Mr(e){Ai(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function qr(e,t,a){(t!=null||a!=null)&&Ai(e),t!=null&&(e.curOp.scrollLeft=t),a!=null&&(e.curOp.scrollTop=a)}function Qs(e,t){Ai(e),e.curOp.scrollToPos=t}function Ai(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var a=un(e,t.from),n=un(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});qr(e,r.scrollLeft,r.scrollTop)}function ei(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;ie||so(e,{top:t}),Uo(e,t,!0),ie&&so(e),ai(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 wr(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,zo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ti(e){var t=e.display,a=t.gutters.offsetWidth,n=Math.round(e.doc.height+Er(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+ja(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:a}}var Sr=function(e,t,a){this.cm=a;var n=this.vert=v("div",[v("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=v("div",[v("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,K&&S<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Sr.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}},Sr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Sr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Sr.prototype.zeroWidthHack=function(){var e=h&&!H?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new xe,this.disableVert=new xe},Sr.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)},Sr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ni=function(){};ni.prototype.update=function(){return{bottom:0,right:0}},ni.prototype.setScrollLeft=function(){},ni.prototype.setScrollTop=function(){},ni.prototype.clear=function(){};function Lr(e,t){t||(t=ti(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,ti(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:Sr,null:ni};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"?wr(e,t):ei(e,t)},e),e.display.scrollbars.addClass&&de(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function Or(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},Yi(e.curOp)}function Tr(e){var t=e.curOp;t&&Qi(t,function(a){for(var n=0;n=a.viewTo)||a.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Di(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=ti(t),a.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=we(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+ja(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-$a(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=e.display.viewTo)return;var a=+new Date+e.options.workTime,n=be(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?Nt(t.mode,n.state):null,u=ma(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 z=!o||o.length!=i.styles.length||f!=U&&(!f||!U||f.bgClass!=U.bgClass||f.textClass!=U.textClass),fe=0;!z&&fea)return ai(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&Pa(e,function(){for(var i=0;i=a.viewFrom&&t.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Po(e)==0)return!1;Ko(e)&&(ur(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.viewFromo&&a.viewTo-o<20&&(o=Math.min(r,a.viewTo)),fn&&(i=Qt(e.doc,i),o=Zt(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=_n(ft(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var u=Po(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),N(a.cursorDiv),N(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,s&&(a.lastWrapHeight=t.wrapperHeight,a.lastWrapWidth=t.wrapperWidth,ai(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==$a(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+Er(e.display)-yr(e),a.top)}),t.visible=Pi(e.display,e.doc,a),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Pi(e.display,e.doc,a));if(!oo(e,t))break;ki(e);var r=ti(e);Zr(e),Lr(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 Di(e,t);if(oo(e,a)){ki(e),Wo(e,a);var n=ti(e);Zr(e),Lr(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(Ie){var $e=Ie.nextSibling;return y&&h&&e.display.currentWheelTarget==Ie?Ie.style.display="none":Ie.parentNode.removeChild(Ie),$e}for(var u=n.view,f=n.viewFrom,U=0;U-1&&(se=!1),Pr(e,z,f,a)),se&&(N(z.lineNumber),z.lineNumber.appendChild(document.createTextNode(Jt(e.options,f)))),o=z.node.nextSibling}f+=z.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+ja(e)+"px"}function zo(e){var t=e.display,a=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Qr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,i=n+"px",o=0;oo.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 z=0;z=0&&Ze(e,n.to())<=0)return a}return-1};var pn=function(e,t){this.anchor=e,this.head=t};pn.prototype.from=function(){return bn(this.anchor,this.head)},pn.prototype.to=function(){return Xe(this.anchor,this.head)},pn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ga(e,t,a){var n=e&&e.options.selectionsMayTouch,r=t[a];t.sort(function(fe,se){return Ze(fe.from(),se.from())}),a=_e(t,r);for(var i=1;i0:u>=0){var f=bn(s.from(),o.from()),U=Xe(s.to(),o.to()),z=s.empty()?o.from()==o.head:s.from()==s.head;i<=a&&--a,t.splice(--i,2,new pn(z?U:f,z?f:U))}}return new La(t,a)}function cr(e,t){return new La([new pn(e,t||e)],0)}function dr(e){return e.text?ze(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Go(e,t){if(Ze(e,t.from)<0)return e;if(Ze(e,t.to)<=0)return dr(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+=dr(t).ch-t.to.ch),ze(a,n)}function fo(e,t){for(var a=[],n=0;n1&&e.remove(s.line+1,Ie-1),e.insert(s.line+1,_t)}Jn(e,"change",e,t)}function fr(e,t,a){function n(r,i,o){if(r.linked)for(var s=0;s1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(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=re(o.changes),Ze(t.from,t.to)==0&&Ze(t.from,s.to)==0?s.to=dr(t):o.changes.push(mo(e,t));else{var u=re(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||Le(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,re(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=re(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-1&&(re(s)[z]=f[z],delete f[z]))}}return n}function vo(e,t,a,n){if(n){var r=e.anchor;if(a){var i=Ze(t,r)<0;i!=Ze(a,r)<0?(r=t,t=a):i!=Ze(t,a)<0&&(t=a)}return new pn(r,t)}else return new pn(a||t,t)}function ji(e,t,a,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),fa(e,new La([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=t.ch:s.to>t.ch))){if(r&&(Le(u,"beforeCursorEnter"),u.explicitlyCleared))if(i.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(a){var z=u.find(n<0?1:-1),fe=void 0;if((n<0?U:f)&&(z=ls(e,z,-n,z&&z.line==t.line?i:null)),z&&z.line==t.line&&(fe=Ze(z,a))&&(n<0?fe<0:fe>0))return jr(e,z,t,n,r)}var se=u.find(n<0?-1:1);return(n<0?f:U)&&(se=ls(e,se,n,se.line==t.line?i:null)),se?jr(e,se,t,n,r):null}}return t}function Ii(e,t,a,n,r){var i=n||1,o=jr(e,t,a,i,r)||!r&&jr(e,t,a,i,!0)||jr(e,t,a,-i,r)||!r&&jr(e,t,a,-i,!0);return o||(e.cantEdit=!0,ze(e.first,0))}function ls(e,t,a,n){return a<0&&t.ch==0?t.line>e.first?Ut(e,ze(t.line-1)):null:a>0&&t.ch==(n||ft(e,t.line)).text.length?t.line=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]==""&&Ze(t.from,t.to)==0)return;var a=fo(e,t);qo(e,t,a,e.cm?e.cm.curOp.id:NaN),oi(e,t,a,va(e,t));var n=[];fr(e,function(r,i){!i&&_e(n,r.history)==-1&&(ms(r.history,t),n.push(r.history)),oi(r,t,null,va(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=0;--se){var Ie=fe(se);if(Ie)return Ie.v}}function fs(e,t){if(t==0)return;if(e.first+=t,e.sel=new La(De(e.sel.ranges,function(r){return new pn(ze(r.anchor.line+t,r.anchor.ch),ze(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){wa(e.cm,e.first,e.first-t,t);for(var a=e.cm.display,n=a.viewFrom;ne.lastLine())return;if(t.from.linei&&(t={from:t.from,to:ze(i,ft(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),a||(a=fo(e,t)),e.cm?El(e.cm,t,n):po(e,t,n),Ui(e,a,pe),e.cantEdit&&Ii(e,ze(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=jt(ka(ft(n,i.line))),n.iter(u,o.line+1,function(se){if(se==r.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&D(e),po(n,t,a,ko(e)),e.options.lineWrapping||(n.iter(u,i.line+t.text.length,function(se){var Ie=Sn(se);Ie>r.maxLineLength&&(r.maxLine=se,r.maxLineLength=Ie,r.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),tn(n,i.line),ai(e,400);var f=t.text.length-(o.line-i.line)-1;t.full?wa(e):i.line==o.line&&t.text.length==1&&!Yo(e.doc,t)?lr(e,i.line,"text"):wa(e,i.line,o.line+1,f);var U=I(e,"changes"),z=I(e,"change");if(z||U){var fe={from:i,to:o,text:t.text,removed:t.removed,origin:t.origin};z&&Jn(e,"change",e,fe),U&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(fe)}e.display.selForContextMenu=null}function Ir(e,t,a,n,r){var i;n||(n=a),Ze(n,a)<0&&(i=[n,a],a=i[0],n=i[1]),typeof t=="string"&&(t=e.splitLines(t)),Ur(e,{from:a,to:n,text:t,origin:r})}function hs(e,t,a,n){a1||!(this.children[0]instanceof li))){var s=[];this.collapse(s),this.children=[new li(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var o=r.lines.length%25+25,s=o;s10);e.parent.maybeSpill()},iterN:function(e,t,a){for(var n=0;ne.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=U,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&wa(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&&Jn(e,"markerCleared",e,this,n,r),t&&Tr(e),this.parent&&this.parent.clear()},hr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var a,n,r=0;r0||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($r(e,t.line,t,a,i)||t.line!=a.line&&$r(e,a.line,t,a,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Yn()}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(z){u&&i.collapsed&&!u.options.lineWrapping&&ka(z)==u.display.maxLine&&(f=!0),i.collapsed&&s!=t.line&&an(z,0),ua(z,new yn(i,s==t.line?t.ch:null,s==a.line?a.ch:null)),++s}),i.collapsed&&e.iter(t.line,a.line+1,function(z){$t(e,z)&&an(z,0)}),i.clearOnEnter&&Re(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(wn(),(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)wa(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++)lr(u,U,"text");i.atomic&&os(u.doc),Jn(u,"markerAdded",u,i)}return i}var di=function(e,t){this.markers=e,this.primary=t;for(var a=0;a=0;u--)Ur(this,n[u]);s?rs(this,s):this.cm&&Mr(this.cm)}),undo:oa(function(){Fi(this,"undo")}),redo:oa(function(){Fi(this,"redo")}),undoSelection:oa(function(){Fi(this,"undo",!0)}),redoSelection:oa(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.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,a){e=Ut(this,e),t=Ut(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=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;ne)return t=e,!0;e-=i,++a}),Ut(this,ze(a,t))},indexFromPos:function(e){e=Ut(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var U=e.dataTransfer.getData("Text");if(U){var z;if(t.state.draggingText&&!t.state.draggingText.copy&&(z=t.listSelections()),Ui(t.doc,cr(a,a)),z)for(var fe=0;fe=0;s--)Ir(e.doc,"",n[s].from,n[s].to,"+delete");Mr(e)})}function bo(e,t,a){var n=Ae(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 ze(t.line,n,a<0?"after":"before")}function Eo(e,t,a,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var i=bt(a,t.doc.direction);if(i){var o=r<0?re(i):i[0],s=r<0==(o.level==1),u=s?"after":"before",f;if(o.level>0||t.doc.direction=="rtl"){var U=it(t,a);f=r<0?a.text.length-1:0;var z=mt(t,U,f).top;f=et(function(fe){return mt(t,U,fe).top==z},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 ze(n,f,u)}}return new ze(n,r<0?a.text.length:0,r<0?"before":"after")}function Ll(e,t,a,n){var r=bt(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=ot(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=o.from&&fe>=U.begin)){var se=z?"before":"after";return new ze(a.line,fe,se)}}var Ie=function(_t,Tt,Et){for(var Pt=function(xn,sa){return sa?new ze(a.line,s(xn,1),"before"):new ze(a.line,xn,"after")};_t>=0&&_t0==(Gt.level!=1),nn=Bt?Et.begin:s(Et.end,-1);if(Gt.from<=nn&&nn0?U.end:s(U.begin,-1);return rt!=null&&!(n>0&&rt==t.text.length)&&($e=Ie(n>0?0:r.length-1,n,f(rt)),$e)?$e:null}var pi={selectAll:us,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),pe)},killLine:function(e){return Wr(e,function(t){if(t.empty()){var a=ft(e.doc,t.head.line).text.length;return t.head.ch==a&&t.head.line0)r=new ze(r.line,r.ch+1),e.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),ze(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var o=ft(e.doc,r.line-1).text;o&&(r=new ze(r.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),ze(r.line-1,o.length-1),r,"+transpose"))}}a.push(new pn(r,r))}e.setSelections(a)})},newlineAndIndent:function(e){return Pa(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;ne&&Ze(t,this.pos)==0&&a==this.button};var vi,gi;function Wl(e,t){var a=+new Date;return gi&&gi.compare(a,e,t)?(vi=gi=null,"triple"):vi&&vi.compare(a,e,t)?(gi=new xo(a,e,t),vi=null,"double"):(vi=new xo(a,e,t),gi=null,"single")}function Ms(e){var t=this,a=t.display;if(Be(t,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Xa(a,e)){y||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Co(t,e))return;var n=xr(t,e),r=oe(e),i=n?Wl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,r,n,i,e))return;r==1?n?Hl(t,n,i,e):Y(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 zl(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,mi(e,ws(i,r),r,function(o){if(typeof o=="string"&&(o=pi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,a)!=Ee}finally{e.state.suppressEdits=!1}return s})}function Kl(e,t,a){var n=e.getOption("configureMouse"),r=n?n(e,t,a):{};if(r.unit==null){var i=ee?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){K?setTimeout(T(Mo,e),0):e.curOp.focus=B();var r=Kl(e,a,n),i=e.doc.sel,o;e.options.dragDrop&&ue&&!e.isReadOnly()&&a=="single"&&(o=i.contains(t))>-1&&(Ze((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(Ze(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=ia(e,function(f){y&&(r.scroller.draggable=!1),e.state.draggingText=!1,yt(r.wrapper.ownerDocument,"mouseup",o),yt(r.wrapper.ownerDocument,"mousemove",s),yt(r.scroller,"dragstart",u),yt(r.scroller,"drop",o),i||(p(f),n.addNew||ji(e.doc,a,null,null,n.extend),y&&!le||K&&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 pn(t,t);if(a=="word")return e.findWordAt(t);if(a=="line")return new pn(ze(t.line,0),Ut(e.doc,ze(t.line+1,0)));var n=a(e,t);return new pn(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 pn(a,a)):(o=i.sel.primary(),s=i.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new pn(a,a)),a=xr(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,fa(i,Ga(e,f.concat([o]),s),{scroll:!1,origin:"*mouse"})):f.length>1&&f[s].empty()&&n.unit=="char"&&!n.extend?(fa(i,Ga(e,f.slice(0,s).concat(f.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=i.sel):go(i,s,o,X):(s=0,fa(i,new La([o],0),X),u=i.sel);var z=a;function fe(Et){if(Ze(z,Et)==0)return;if(z=Et,n.unit=="rectangle"){for(var Pt=[],Gt=e.options.tabSize,Bt=$(ft(i,a.line).text,a.ch,Gt),nn=$(ft(i,Et.line).text,Et.ch,Gt),xn=Math.min(Bt,nn),sa=Math.max(Bt,nn),jn=Math.min(a.line,Et.line),Aa=Math.min(e.lastLine(),Math.max(a.line,Et.line));jn<=Aa;jn++){var Oa=ft(i,jn).text,Gn=Z(Oa,xn,Gt);xn==sa?Pt.push(new pn(ze(jn,Gn),ze(jn,Gn))):Oa.length>Gn&&Pt.push(new pn(ze(jn,Gn),ze(jn,Z(Oa,sa,Gt))))}Pt.length||Pt.push(new pn(a,a)),fa(i,Ga(e,u.ranges.slice(0,s).concat(Pt),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Et)}else{var Ta=o,ca=Ls(e,Et,n.unit),Qn=Ta.anchor,Vn;Ze(ca.anchor,Qn)>0?(Vn=ca.head,Qn=bn(Ta.from(),ca.anchor)):(Vn=ca.anchor,Qn=Xe(Ta.to(),ca.head));var Bn=u.ranges.slice(0);Bn[s]=Gl(e,new pn(Ut(i,Qn),Vn)),fa(i,Ga(e,Bn,s),X)}}var se=r.wrapper.getBoundingClientRect(),Ie=0;function $e(Et){var Pt=++Ie,Gt=xr(e,Et,!0,n.unit=="rectangle");if(!Gt)return;if(Ze(Gt,z)!=0){e.curOp.focus=B(),fe(Gt);var Bt=Pi(r,i);(Gt.line>=Bt.to||Gt.linese.bottom?20:0;nn&&setTimeout(ia(e,function(){if(Ie!=Pt)return;r.scroller.scrollTop+=nn,$e(Et)}),50)}}function rt(Et){e.state.selectingText=!1,Ie=Infinity,Et&&(p(Et),r.input.focus()),yt(r.wrapper.ownerDocument,"mousemove",_t),yt(r.wrapper.ownerDocument,"mouseup",Tt),i.history.lastSelOrigin=null}var _t=ia(e,function(Et){Et.buttons===0||!oe(Et)?rt(Et):$e(Et)}),Tt=ia(e,rt);e.state.selectingText=Tt,Re(r.wrapper.ownerDocument,"mousemove",_t),Re(r.wrapper.ownerDocument,"mouseup",Tt)}function Gl(e,t){var a=t.anchor,n=t.head,r=ft(e.doc,a.line);if(Ze(a,n)==0&&a.sticky==n.sticky)return t;var i=bt(r);if(!i)return t;var o=ot(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=ot(i,n.ch,n.sticky),z=U-o||(n.ch-a.ch)*(s.level==1?-1:1);U==u-1||U==u?f=z<0:f=z>0}var fe=i[u+(f?-1:0)],se=f==(fe.level==1),Ie=se?fe.from:fe.to,$e=se?"after":"before";return a.ch==Ie&&a.sticky==$e?t:new pn(new ze(a.line,Ie,$e),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(fe){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||!I(e,a))return E(t);i-=s.top-o.viewOffset;for(var u=0;u=r){var U=on(e.doc,i),z=e.display.gutterSpecs[u];return Le(e,a,e,U,z.className,t),E(t)}}}function Co(e,t){return Ns(e,t,"gutterClick",!0)}function js(e,t){if(Xa(e.display,t)||Vl(e,t))return;if(Be(e,t,"contextmenu"))return;d||e.display.input.onContextMenu(t)}function Vl(e,t){return I(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-"),Tn(e)}var zr={toString:function(){return"CodeMirror.Init"}},Is={},Ki={};function Yl(e){var t=e.optionHandlers;function a(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(s,u,f){f!=zr&&i(s,u,f)}:i)}e.defineOption=a,e.Init=zr,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){ii(n),Tn(n),wa(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(ze(o,U))}o++});for(var s=i.length-1;s>=0;s--)Ir(n.doc,r,i[s],ze(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!=zr&&n.refresh()}),a("specialCharPlaceholder",ir,function(n){return n.refresh()},!0),a("electricChars",!0),a("inputStyle",F?"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",!ge),a("wholeLineUpdateBefore",!0),a("theme","default",function(n){Us(n),ri(n)},!0),a("keyMap","default",function(n,r,i){var o=Wi(r),s=i!=zr&&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),ri(n)},!0),a("fixedGutter",!0,function(n,r){n.display.gutters.style.left=r?Qr(n.display)+"px":"0",n.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(n){return Lr(n)},!0),a("scrollbarStyle","native",function(n){Bo(n),Lr(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),ri(n)},!0),a("firstLineNumber",1,ri,!0),a("lineNumberFormatter",function(n){return n},ri,!0),a("showCursorWhenSelecting",!1,Zr,!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,Jl),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Zr,!0),a("singleCursorHeightPerLine",!0,Zr,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,ii,!0),a("addModeClass",!1,ii,!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,ii,!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 Jl(e,t,a){var n=a&&a!=zr;if(!t!=!n){var r=e.display.dragFunctions,i=t?Re:yt;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?(de(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),On(e)),to(e),wa(e),Tn(e),setTimeout(function(){return Lr(e)},100)}function Dn(e,t){var a=this;if(!(this instanceof Dn))return new Dn(e,t);this.options=t=t?c(t):{},c(Is,t,!1);var n=t.value;typeof n=="string"?n=new Sa(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new Dn.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 xe,keySeq:null,specialChars:null},t.autofocus&&!F&&i.input.focus(),K&&S<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Zl(this),kl(),Or(this),this.curOp.forceUpdate=!0,Jo(this,n),t.autofocus&&!F||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ao(a)},20):Dr(this);for(var o in Ki)Ki.hasOwnProperty(o)&&Ki[o](this,t[o],zr);Ko(this),t.finishInit&&t.finishInit(this);for(var s=0;s20*20}Re(t.scroller,"touchstart",function(u){if(!Be(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&&!Xa(t,u)&&f.left!=null&&!f.moved&&new Date-f.start<300){var U=e.coordsChar(t.activeTouch,"page"),z;!f.prev||o(f,f.prev)?z=new pn(U,U):!f.prev.prev||o(f,f.prev.prev)?z=e.findWordAt(U):z=new pn(ze(U.line,0),Ut(e.doc,ze(U.line+1,0))),e.setSelection(z.anchor,z.head),e.focus(),p(u)}r()}),Re(t.scroller,"touchcancel",r),Re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ei(e,t.scroller.scrollTop),wr(e,t.scroller.scrollLeft,!0),Le(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){Be(e,u)||x(u)},over:function(u){Be(e,u)||(Rl(e,u),x(u))},start:function(u){return Tl(e,u)},drop:ia(e,Ol),leave:function(u){Be(e,u)||Es(e)}};var s=t.input.getField();Re(s,"keyup",function(u){return As.call(e,u)}),Re(s,"keydown",ia(e,Ps)),Re(s,"keypress",ia(e,Ds)),Re(s,"focus",function(u){return ao(e,u)}),Re(s,"blur",function(u){return Dr(e,u)})}var wo=[];Dn.defineInitHook=function(e){return wo.push(e)};function bi(e,t,a,n){var r=e.doc,i;a==null&&(a="add"),a=="smart"&&(r.mode.indent?i=be(e,t).state:a="prev");var o=e.options.tabSize,s=ft(r,t),u=$(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==Ee||U>150)){if(!n)return;a="prev"}a=="prev"?t>r.first?U=$(ft(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 z="",fe=0;if(e.options.indentWithTabs)for(var se=Math.floor(U/o);se;--se)fe+=o,z+=" ";if(feo,u=Dt(t),f=null;if(s&&n.ranges.length>1)if(Va&&Va.text.join(` `)==t){if(n.ranges.length%Va.text.length==0){f=[];for(var U=0;U=0;fe--){var se=n.ranges[fe],Ie=se.from(),$e=se.to();se.empty()&&(a&&a>0?Ie=ze(Ie.line,Ie.ch-a):e.state.overwrite&&!s?$e=ze($e.line,Math.min(ft(i,$e.line).text.length,$e.ch+re(u).length)):s&&Va&&Va.lineWise&&Va.text.join(` `)==u.join(` `)&&(Ie=$e=ze(Ie.line,0)));var rt={from:Ie,to:$e,text:f?f[fe%f.length]:u,origin:r||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Ur(e.doc,rt),Jn(e,"inputRead",e,rt)}t&&!s&&Bs(e,t),Mr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=z),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&&Pa(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-1){o=bi(e,r.head.line,"smart");break}}else i.electricInput&&(i.electricInput.test(ft(e.doc,r.head.line).text.slice(0,r.head.ch))&&(o=bi(e,r.head.line,"smart")));o&&Jn(e,"electricInput",e,r.head.line)}}function Ws(e){for(var t=[],a=[],n=0;ni&&(bi(this,s.head.line,n,!0),i=s.head.line,o==this.doc.sel.primIndex&&Mr(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 z=U;z0&&go(this.doc,o,new pn(u,fe[o].to()),pe)}}}),getTokenAt:function(n,r){return kt(this,n,r)},getLineTokens:function(n,r){return kt(this,ze(n),r,!0)},getTokenTypeAt:function(n){n=Ut(this.doc,n);var r=It(this,ft(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]u&&(n=u,o=!0),s=ft(this.doc,n)}else s=n;return Fn(this,s,{top:0,left:0},r||"page",i||o).top+(o?this.doc.height-_n(s):0)},defaultTextHeight:function(){return ra(this.display)},defaultCharWidth:function(){return Ca(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=Yt(this,Ut(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 z=Math.max(u.wrapper.clientHeight,this.doc.height),fe=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+r.offsetHeight>z)&&n.top>r.offsetHeight?f=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=z&&(f=n.bottom),U+r.offsetWidth>fe&&(U=fe-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&&Js(this,{left:U,top:f,right:U+r.offsetWidth,bottom:f+r.offsetHeight})},triggerOnKeyDown:ya(Ps),triggerOnKeyPress:ya(Ds),triggerOnKeyUp:As,triggerOnMouseDown:ya(Ms),execCommand:function(n){if(pi.hasOwnProperty(n))return pi[n].call(null,this)},triggerElectric:ya(function(n){Bs(this,n)}),findPosH:function(n,r,i,o){var s=1;r<0&&(s=-1,r=-r);for(var u=Ut(this.doc,n),f=0;f0&&U(i.charAt(o-1));)--o;for(;s.5||this.options.lineWrapping)&&to(this),Le(this,"refresh",this)}),swapDoc:ya(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),Jo(this,n),Tn(this),this.display.input.reset(),qr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Jn(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}},w(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=ft(e,t.line),u=r&&e.direction=="rtl"?-a:a;function f(){var Tt=t.line+u;return Tt=e.first+e.size?!1:(t=new ze(Tt,t.ch,t.sticky),s=ft(e,Tt))}function U(Tt){var Et;if(n=="codepoint"){var Pt=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Pt)?Et=null:Et=new ze(t.line,Math.max(0,Math.min(s.text.length,t.ch+a*(Pt>=55296&&Pt<56320?2:1))),-a)}else r?Et=Ll(e.cm,s,t,a):Et=_o(s,t,a);if(Et==null)if(!Tt&&f())t=Eo(r,e.cm,s,t.line,u);else return!1;else t=Et;return!0}if(n=="char"||n=="codepoint")U();else if(n=="column")U(!0);else if(n=="word"||n=="group")for(var z=null,fe=n=="group",se=e.cm&&e.cm.getHelper(t,"wordChars"),Ie=!0;!(a<0&&!U(!Ie));Ie=!1){var $e=s.text.charAt(t.ch)||` `,rt=je($e,se)?"w":fe&&$e==` `?"n":!fe||/\s/.test($e)?null:"p";if(fe&&!Ie&&!rt&&(rt="s"),z&&z!=rt){a<0&&(a=1,U(),t.sticky="after");break}if(rt&&(z=rt),a>0&&!U(!Ie))break}var _t=Ii(e,t,i,o,!0);return rn(i,_t)&&(_t.hitSide=!0),_t}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*ra(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=na(e,i,o),!f.outside);){if(a<0?o<=0:o>=r.height){f.hitSide=!0;break}o+=a*5}return f}var gn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new xe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};gn.prototype.init=function(e){var t=this,a=this,n=a.cm,r=a.div=e.lineDiv;zs(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)||Be(n,s)||Fs(s,n))return;S<=11&&setTimeout(ia(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)||Be(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,pe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var f=Va.text.join(` `);if(s.clipboardData.setData("Text",f),s.clipboardData.getData("Text")==f){s.preventDefault();return}}var U=Ks(),z=U.firstChild;n.display.lineSpace.insertBefore(U,n.display.lineSpace.firstChild),z.value=Va.text.join(` `);var fe=document.activeElement;Ce(z),setTimeout(function(){n.display.lineSpace.removeChild(U),fe.focus(),fe==r&&a.showPrimarySelection()},50)}Re(r,"copy",o),Re(r,"cut",o)},gn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},gn.prototype.prepareSelection=function(){var e=Ao(this.cm,!1);return e.focus=document.activeElement==this.div,e},gn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},gn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},gn.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&&Xs(t,n)||{node:s[0].measure.map[2],offset:0},f=r.linee.firstLine()&&(n=ze(n.line-1,ft(e.doc,n.line-1).length)),r.ch==ft(e.doc,r.line).text.length&&r.linet.viewTo-1)return!1;var i,o,s;n.line==t.viewFrom||(i=Cr(e,n.line))==0?(o=jt(t.view[0].line),s=t.view[0].node):(o=jt(t.view[i].line),s=t.view[i-1].node.nextSibling);var u=Cr(e,r.line),f,U;if(u==t.view.length-1?(f=t.viewTo-1,U=t.lineDiv.lastChild):(f=jt(t.view[u+1].line)-1,U=t.view[u+1].node.previousSibling),!s)return!1;for(var z=e.doc.splitLines(tu(e,s,U,o,f)),fe=Vt(e.doc,ze(o,0),ze(f,ft(e.doc,f).text.length));z.length>1&&fe.length>1;)if(re(z)==re(fe))z.pop(),fe.pop(),f--;else if(z[0]==fe[0])z.shift(),fe.shift(),o++;else break;for(var se=0,Ie=0,$e=z[0],rt=fe[0],_t=Math.min($e.length,rt.length);se<_t&&$e.charCodeAt(se)==rt.charCodeAt(se);)++se;for(var Tt=re(z),Et=re(fe),Pt=Math.min(Tt.length-(z.length==1?se:0),Et.length-(fe.length==1?se:0));Ien.ch&&Tt.charCodeAt(Tt.length-Ie-1)==Et.charCodeAt(Et.length-Ie-1);)se--,Ie++;z[z.length-1]=Tt.slice(0,Tt.length-Ie).replace(/^\u200b+/,""),z[0]=z[0].slice(se).replace(/\u200b+$/,"");var Gt=ze(o,se),Bt=ze(f,fe.length?re(fe).length-Ie:0);if(z.length>1||z[0]||Ze(Gt,Bt))return Ir(e.doc,z,Gt,Bt,"+input"),!0},gn.prototype.ensurePolled=function(){this.forceCompositionEnd()},gn.prototype.reset=function(){this.forceCompositionEnd()},gn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},gn.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)},gn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Pa(this.cm,function(){return wa(e.cm)})},gn.prototype.setUneditable=function(e){e.contentEditable="false"},gn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||ia(this.cm,So)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},gn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},gn.prototype.onContextMenu=function(){},gn.prototype.resetPosition=function(){},gn.prototype.needsContentAttribute=!0;function Xs(e,t){var a=lt(e,t.line);if(!a||a.hidden)return null;var n=ft(e.doc,t.line),r=Qe(a,n,t.line),i=bt(n,e.doc.direction),o="left";if(i){var s=ot(i,t.ch);o=s%2?"right":"left"}var u=qt(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(se){return function(Ie){return Ie.id==se}}function U(){o&&(i+=s,u&&(i+=s),o=u=!1)}function z(se){se&&(U(),i+=se)}function fe(se){if(se.nodeType==1){var Ie=se.getAttribute("cm-text");if(Ie){z(Ie);return}var $e=se.getAttribute("cm-marker"),rt;if($e){var _t=e.findMarks(ze(n,0),ze(r+1,0),f(+$e));_t.length&&(rt=_t[0].find(0))&&z(Vt(e.doc,rt.from,rt.to).join(s));return}if(se.getAttribute("contenteditable")=="false")return;var Tt=/^(pre|div|p|li|table|br)$/i.test(se.nodeName);if(!/^br$/i.test(se.nodeName)&&se.textContent.length==0)return;Tt&&U();for(var Et=0;Et=9&&t.hasSelection&&(t.hasSelection=null),a.poll()}),Re(r,"paste",function(o){if(Be(n,o)||Fs(o,n))return;n.state.pasteIncoming=+new Date,a.fastPoll()});function i(o){if(Be(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,pe):(a.prevInput="",r.value=s.text.join(` `),Ce(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(Xa(e,o)||Be(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){Xa(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)})},zn.prototype.createField=function(e){this.wrapper=Ks(),this.textarea=this.wrapper.firstChild},zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},zn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,a=e.doc,n=Ao(e);if(e.options.moveInputWithCursor){var r=Yt(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},zn.prototype.showSelection=function(e){var t=this.cm,a=t.display;m(a.cursorDiv,e.cursors),m(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},zn.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&&Ce(this.textarea),K&&S>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",K&&S>=9&&(this.hasSelection=null))},zn.prototype.getField=function(){return this.textarea},zn.prototype.supportsTouch=function(){return!1},zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!F||B()!=this.textarea))try{this.textarea.focus()}catch(e){}},zn.prototype.blur=function(){this.textarea.blur()},zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},zn.prototype.receivedFocus=function(){this.slowPoll()},zn.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()})},zn.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)},zn.prototype.poll=function(){var e=this,t=this.cm,a=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||ht(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(K&&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);o1e3||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},zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},zn.prototype.onKeyPress=function(){K&&S>=9&&(this.hasSelection=null),this.fastPoll()},zn.prototype.onContextMenu=function(e){var t=this,a=t.cm,n=a.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=xr(a,e),o=n.scroller.scrollTop;if(!i||ne)return;var s=a.options.resetSelectionOnContextMenu;s&&a.doc.sel.contains(i)==-1&&ia(a,fa)(a.doc,cr(i),pe);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: `+(K?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var z;y&&(z=window.scrollY),n.input.focus(),y&&window.scrollTo(null,z),n.input.reset(),a.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=se,n.selForContextMenu=a.doc.sel,clearTimeout(n.detectingSelectAll);function fe(){if(r.selectionStart!=null){var $e=a.somethingSelected(),rt="\u200B"+($e?r.value:"");r.value="\u21DA",r.value=rt,t.prevInput=$e?"":"\u200B",r.selectionStart=1,r.selectionEnd=rt.length,n.selForContextMenu=a.doc.sel}}function se(){if(t.contextMenuPending!=se)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,r.style.cssText=u,K&&S<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),r.selectionStart!=null){(!K||K&&S<9)&&fe();var $e=0,rt=function(){n.selForContextMenu==a.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?ia(a,us)(a):$e++<10?n.detectingSelectAll=setTimeout(rt,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(rt,200)}}if(K&&S>=9&&fe(),d){x(e);var Ie=function(){yt(window,"mouseup",Ie),setTimeout(se,20)};Re(window,"mouseup",Ie)}else setTimeout(se,50)},zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},zn.prototype.setUneditable=function(){},zn.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=B();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&&(yt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var s=Dn(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function ru(e){e.off=yt,e.on=Re,e.wheelEventPixels=dl,e.Doc=Sa,e.splitLines=Dt,e.countColumn=$,e.findColumn=Z,e.isWordChar=he,e.Pass=Ee,e.signal=Le,e.Line=Hn,e.changeEnd=dr,e.scrollbarModel=Fo,e.Pos=ze,e.cmpPos=Ze,e.modes=Lt,e.mimeModes=xt,e.resolveMode=ut,e.getMode=qe,e.modeExtensions=He,e.extendMode=gt,e.copyState=Nt,e.startState=en,e.innerMode=Mt,e.commands=pi,e.keyMap=er,e.keyName=Ss,e.isModifierKey=Cs,e.lookupKey=Br,e.normalizeKeyMap=Ml,e.StringStream=Wt,e.SharedTextMarker=di,e.TextMarker=hr,e.LineWidget=ci,e.e_preventDefault=p,e.e_stopPropagation=g,e.e_stop=x,e.addClass=de,e.contains=_,e.rmClass=b,e.keyNames=pr}Yl(Dn),ql(Dn);var iu="iter insert remove copy getEditor constructor".split(" ");for(var $i in Sa.prototype)Sa.prototype.hasOwnProperty($i)&&_e(iu,$i)<0&&(Dn.prototype[$i]=function(e){return function(){return e.apply(this.doc,arguments)}}(Sa.prototype[$i]));return w(Sa),Dn.inputStyles={textarea:zn,contenteditable:gn},Dn.defineMode=function(e){!Dn.defaults.mode&&e!="null"&&(Dn.defaults.mode=e),Ft.apply(this,arguments)},Dn.defineMIME=Rt,Dn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Dn.defineMIME("text/plain","null"),Dn.defineExtension=function(e,t){Dn.prototype[e]=t},Dn.defineDocExtension=function(e,t){Sa.prototype[e]=t},Dn.fromTextArea=au,ru(Dn),Dn.version="5.58.2",Dn})},WaYH:function(Je,We,l){"use strict";var G=l("rePB"),Oe=l("Ff2n"),ie=l("VTBJ"),Te=l("1OyB"),Se=l("vuIU"),ce=l("JX7q"),K=l("Ji7U"),S=l("LK+K"),y=l("q1tI"),W=l("TSYQ"),J=l.n(W),ne=l("sboe"),le=l("OZM5"),H=function(d){var V=d.prefixCls,b=d.level,N=d.isStart,m=d.isEnd;if(!b)return null;for(var v="".concat(V,"-indent-unit"),L=[],R=0;R1&&arguments[1]!==void 0?arguments[1]:!1,P=pe.getAttribute("id")||pe.getAttribute("data-reactid")||pe.getAttribute("name");if(X&&B[P])return B[P];var Z=window.getComputedStyle(pe),O=Z.getPropertyValue("box-sizing")||Z.getPropertyValue("-moz-box-sizing")||Z.getPropertyValue("-webkit-box-sizing"),C=parseFloat(Z.getPropertyValue("padding-bottom"))+parseFloat(Z.getPropertyValue("padding-top")),re=parseFloat(Z.getPropertyValue("border-bottom-width"))+parseFloat(Z.getPropertyValue("border-top-width")),De=_.map(function(te){return"".concat(te,":").concat(Z.getPropertyValue(te))}).join(";"),me={sizingStyle:De,paddingSize:C,borderSize:re,boxSizing:O};return X&&P&&(B[P]=me),me}function Ce(pe){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;de||(de=document.createElement("textarea"),de.setAttribute("tab-index","-1"),de.setAttribute("aria-hidden","true"),document.body.appendChild(de)),pe.getAttribute("wrap")?de.setAttribute("wrap",pe.getAttribute("wrap")):de.removeAttribute("wrap");var O=Q(pe,X),C=O.paddingSize,re=O.borderSize,De=O.boxSizing,me=O.sizingStyle;de.setAttribute("style","".concat(me,";").concat(R)),de.value=pe.value||pe.placeholder||"";var te=Number.MIN_SAFE_INTEGER,ye=Number.MAX_SAFE_INTEGER,ve=de.scrollHeight,he;if(De==="border-box"?ve+=re:De==="content-box"&&(ve-=C),P!==null||Z!==null){de.value=" ";var je=de.scrollHeight-C;P!==null&&(te=je*P,De==="border-box"&&(te=te+C+re),ve=Math.max(te,ve)),Z!==null&&(ye=je*Z,De==="border-box"&&(ye=ye+C+re),he=ve>ye?"":"hidden",ve=Math.min(ye,ve))}return{height:ve,minHeight:te,maxHeight:ye,overflowY:he,resize:"none"}}var T=l("Gytx"),c=l.n(T),$;(function(pe){pe[pe.NONE=0]="NONE",pe[pe.RESIZING=1]="RESIZING",pe[pe.RESIZED=2]="RESIZED"})($||($={}));var xe=function(pe){Object(Te.a)(P,pe);var X=Object(Se.a)(P);function P(Z){var O;return Object(Oe.a)(this,P),O=X.call(this,Z),O.nextFrameActionId=void 0,O.resizeFrameId=void 0,O.textArea=void 0,O.saveTextArea=function(C){O.textArea=C},O.handleResize=function(C){var re=O.state.resizeStatus,De=O.props,me=De.autoSize,te=De.onResize;if(re!==$.NONE)return;typeof te=="function"&&te(C),me&&O.resizeOnNextFrame()},O.resizeOnNextFrame=function(){cancelAnimationFrame(O.nextFrameActionId),O.nextFrameActionId=requestAnimationFrame(O.resizeTextarea)},O.resizeTextarea=function(){var C=O.props.autoSize;if(!C||!O.textArea)return;var re=C.minRows,De=C.maxRows,me=Ce(O.textArea,!1,re,De);O.setState({textareaStyles:me,resizeStatus:$.RESIZING},function(){cancelAnimationFrame(O.resizeFrameId),O.resizeFrameId=requestAnimationFrame(function(){O.setState({resizeStatus:$.RESIZED},function(){O.resizeFrameId=requestAnimationFrame(function(){O.setState({resizeStatus:$.NONE}),O.fixFirefoxAutoScroll()})})})})},O.renderTextArea=function(){var C=O.props,re=C.prefixCls,De=re===void 0?"rc-textarea":re,me=C.autoSize,te=C.onResize,ye=C.className,ve=C.disabled,he=O.state,je=he.textareaStyles,Ke=he.resizeStatus,Ve=Object(m.a)(O.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Me=L()(De,ye,Object(S.a)({},"".concat(De,"-disabled"),ve));"value"in Ve&&(Ve.value=Ve.value||"");var Ae=Object(K.a)(Object(K.a)(Object(K.a)({},O.props.style),je),Ke===$.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ce.createElement(N,{onResize:O.handleResize,disabled:!(me||te)},ce.createElement("textarea",Object(G.a)({},Ve,{className:Me,style:Ae,ref:O.saveTextArea})))},O.state={textareaStyles:{},resizeStatus:$.NONE},O}return Object(ie.a)(P,[{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,C=this.textArea.selectionEnd;this.textArea.setSelectionRange(O,C)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),P}(ce.Component),_e=xe,ke=function(pe){Object(Te.a)(P,pe);var X=Object(Se.a)(P);function P(Z){var O;Object(Oe.a)(this,P),O=X.call(this,Z),O.resizableTextArea=void 0,O.focus=function(){O.resizableTextArea.textArea.focus()},O.saveTextArea=function(re){O.resizableTextArea=re},O.handleChange=function(re){var De=O.props.onChange;O.setValue(re.target.value,function(){O.resizableTextArea.resizeTextarea()}),De&&De(re)},O.handleKeyDown=function(re){var De=O.props,me=De.onPressEnter,te=De.onKeyDown;re.keyCode===13&&me&&me(re),te&&te(re)};var C=typeof Z.value=="undefined"||Z.value===null?Z.defaultValue:Z.value;return O.state={value:C},O}return Object(ie.a)(P,[{key:"setValue",value:function(O,C){"value"in this.props||this.setState({value:O},C)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ce.createElement(_e,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}}]),P}(ce.Component),Ee=We.default=ke},YBdh:function(Je,We,l){Je.exports=l.p+"static/xiren.a6554bc1.svg"},ZW9T:function(Je,We,l){"use strict";l.d(We,"a",function(){return ge});var G=l("k1fw"),Oe=l("miYZ"),ie=l("tsqr"),Te=l("rAM+"),Se=l("tJVT"),ce=l("PpiC"),K=l("q1tI"),S=l.n(K),y=l("bdgK");function W(q,j,d,V,b){var N=j.getWordUntilPosition(d),m={startLineNumber:d.lineNumber,endLineNumber:d.lineNumber,startColumn:N.startColumn,endColumn:N.endColumn},v=V.map(function(L){return{label:L,kind:q.languages.CompletionItemKind.Keyword,insertText:L,insertTextRules:q.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:m}});return b.map(function(L){v.push(Object(G.a)(Object(G.a)({},L),{},{range:m}))}),v}var J=function(q){var j={label:"ifelse",kind:q.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:q.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"];q.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(m,v){var L=W(q,m,v,d,[j]);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"];q.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(m,v){var L=[{label:"print",kind:q.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:q.languages.CompletionItemInsertTextRule.InsertAsSnippet}],R=W(q,m,v,V,L);return{suggestions:R}}});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"];q.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(m,v){var L=[j,{label:"main",kind:q.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:q.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:q.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:q.languages.CompletionItemInsertTextRule.InsertAsSnippet}],R=W(q,m,v,b,L);return{suggestions:R}}})},ne="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",le=l("LvDl");function H(q){return/^\d+$/.test(q)?"".concat(q,"px"):q}function M(){}var A=!1,k={"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 F(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],j=q;if(Array.isArray(q)){for(var d=0;d0||ue.target.offsetWidth>0)&&ye.current.instance.layout()}}catch(tt){Y.e(tt)}finally{Y.f()}}),E.observe(te.current)),E}function at(){ie.b.warn(decodeURIComponent(ne))}var pt=function(){var x=ye.current.instance;if(N!=null&&x&&Me){var Y=x.getModel();Y&&N!==Y.getValue()&&(A=!0,Y.setValue(N),x.layout(),A=!1)}};Object(K.useEffect)(function(){ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){pt()},500)},[N,Me,ye.current]);function ot(){var E=ye.current.instance;if(E){var x=E.getSelection(),Y=ye.current.pastePos||{},oe=new h.Range(Y.startLineNumber||x.endLineNumber,Y.startColumn||x.endColumn,Y.endLineNumber||x.endLineNumber,Y.endColumn||x.endColumn);setTimeout(function(){E.executeEdits("",[{range:oe,text:""}])},300)}}function wt(E){(window.navigator.platform.match("Mac")?E.metaKey:E.ctrlKey)&&E.keyCode==83&&(E.preventDefault(),$())}var bt=function(){if(_e&&ye.current.instance){var x=ye.current.instance.getContentHeight();p(x0||P.target.offsetWidth>0)&&_e.layout()}}catch(Z){pe.e(Z)}finally{pe.f()}}),ke.observe(_.current)),ke}Object(K.useEffect)(function(){_.current&&l.e(26).then(l.t.bind(null,"M/lh",7)).then(function(_e){h=_e;var ke=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},R),{},{wordWrap:!0}));Ce(ke);var Ee=T(ke);return function(){ke.dispose();var pe=ke.getModel();pe&&pe.dispose(),Ee.unobserve(_.current)}})},[]),Object(K.useEffect)(function(){Q&&Q.setModel({original:h.editor.createModel(N,v),modified:h.editor.createModel(m,v)})},[N,m,v,Q]);var c=H(d),$=H(b),xe={width:c,height:$};return S.a.createElement("div",{className:"my-diff-editor",ref:_,style:xe})}},ZpRC:function(Je,We,l){"use strict";function G(J){return typeof J=="object"&&J!=null&&J.nodeType===1}function Oe(J,ne){return(!ne||J!=="hidden")&&J!=="visible"&&J!=="clip"}function ie(J,ne){if(J.clientHeightne||A>J&&k=ne&&F>=le?A-J-H:k>ne&&Fle?k-ne+M:0}var Se=function(J,ne){var le=window,H=ne.scrollMode,M=ne.block,A=ne.inline,k=ne.boundary,F=ne.skipOverflowHiddenElements,h=typeof k=="function"?k:function(je){return je!==k};if(!G(J))throw new TypeError("Invalid target");for(var ee=document.scrollingElement||document.documentElement,ge=[],q=J;G(q)&&h(q);){if((q=q.parentElement)===ee){ge.push(q);break}q!=null&&q===document.body&&ie(q)&&!ie(document.documentElement)||q!=null&&ie(q,F)&&ge.push(q)}for(var j=le.visualViewport?le.visualViewport.width:innerWidth,d=le.visualViewport?le.visualViewport.height:innerHeight,V=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,N=J.getBoundingClientRect(),m=N.height,v=N.width,L=N.top,R=N.right,_=N.bottom,B=N.left,de=M==="start"||M==="nearest"?L:M==="end"?_:L+m/2,Q=A==="center"?B+v/2:A==="end"?R:B,Ce=[],T=0;T=0&&B>=0&&_<=d&&R<=j&&L>=ke&&_<=pe&&B>=X&&R<=Ee)return Ce;var P=getComputedStyle(c),Z=parseInt(P.borderLeftWidth,10),O=parseInt(P.borderTopWidth,10),C=parseInt(P.borderRightWidth,10),re=parseInt(P.borderBottomWidth,10),De=0,me=0,te="offsetWidth"in c?c.offsetWidth-c.clientWidth-Z-C:0,ye="offsetHeight"in c?c.offsetHeight-c.clientHeight-O-re:0;if(ee===c)De=M==="start"?de:M==="end"?de-d:M==="nearest"?Te(b,b+d,d,O,re,b+de,b+de+m,m):de-d/2,me=A==="start"?Q:A==="center"?Q-j/2:A==="end"?Q-j:Te(V,V+j,j,Z,C,V+Q,V+Q+v,v),De=Math.max(0,De+b),me=Math.max(0,me+V);else{De=M==="start"?de-ke-O:M==="end"?de-pe+re+ye:M==="nearest"?Te(ke,pe,xe,O,re+ye,de,de+m,m):de-(ke+xe/2)+ye/2,me=A==="start"?Q-X-Z:A==="center"?Q-(X+_e/2)+te/2:A==="end"?Q-Ee+C+te:Te(X,Ee,_e,Z,C+te,Q,Q+v,v);var ve=c.scrollLeft,he=c.scrollTop;de+=he-(De=Math.max(0,Math.min(he+De,c.scrollHeight-xe+ye))),Q+=ve-(me=Math.max(0,Math.min(ve+me,c.scrollWidth-_e+te)))}Ce.push({el:c,top:De,left:me})}return Ce};function ce(J){return J===Object(J)&&Object.keys(J).length!==0}function K(J,ne){ne===void 0&&(ne="auto");var le="scrollBehavior"in document.body.style;J.forEach(function(H){var M=H.el,A=H.top,k=H.left;M.scroll&&le?M.scroll({top:A,left:k,behavior:ne}):(M.scrollTop=A,M.scrollLeft=k)})}function S(J){return J===!1?{block:"end",inline:"nearest"}:ce(J)?J:{block:"start",inline:"nearest"}}function y(J,ne){var le=!J.ownerDocument.documentElement.contains(J);if(ce(ne)&&typeof ne.behavior=="function")return ne.behavior(le?[]:Se(J,ne));if(le)return;var H=S(ne);return K(Se(J,H),H.behavior)}var W=We.a=y},bT9E:function(Je,We,l){"use strict";l.d(We,"a",function(){return Oe});var G=l("VTBJ");function Oe(ie,Te){var Se=Object(G.a)({},ie);return Array.isArray(Te)&&Te.forEach(function(ce){delete Se[ce]}),Se}},c5Ni:function(Je,We,l){},dejd:function(Je,We,l){},dmUQ:function(Je,We,l){"use strict";var G=l("Ff2n"),Oe=l("rePB"),ie=l("1OyB"),Te=l("vuIU"),Se=l("Ji7U"),ce=l("md7G"),K=l("foSv"),S=l("q1tI"),y=l.n(S),W=l("TSYQ"),J=l.n(W),ne=l("4IlW");function le(m,v){var L=Object.keys(m);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(m);v&&(R=R.filter(function(_){return Object.getOwnPropertyDescriptor(m,_).enumerable})),L.push.apply(L,R)}return L}function H(m){for(var v=1;v1?_e-1:0),Ee=1;Ee<_e;Ee++)ke[Ee-1]=arguments[Ee];T.apply(void 0,[Q].concat(ke))}},_.onKeyUp=function(Q){var Ce=_.props.onKeyUp;if(_.stop(),_.recordCursorPosition(),Ce){for(var T=arguments.length,c=new Array(T>1?T-1:0),$=1;$=0)return parseInt(Ce.slice(Ce.indexOf("e-")+2),10);var T=0;return Ce.indexOf(".")>=0&&(T=Ce.length-Ce.indexOf(".")-1),T},_.getInputDisplayValue=function(Q){var Ce=Q||_.state,T=Ce.focused,c=Ce.inputValue,$=Ce.value,xe;T?xe=c:xe=_.toPrecisionAsStep($),xe==null&&(xe="");var _e=_.formatWrapper(xe);return j(_.props.decimalSeparator)&&(_e=_e.toString().replace(".",_.props.decimalSeparator)),_e},_.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 Ce=_.input.value,T=Ce.lastIndexOf(Q);if(T===-1)return!1;var c=_.cursorBefore.length;return _.lastKeyCode===ne.a.DELETE&&_.cursorBefore.charAt(c-1)===Q[0]?(_.fixCaret(c,c),!0):T+Q.length===Ce.length?(_.fixCaret(T,T),!0):!1},_.partRestoreByAfter=function(Q){return Q===void 0?!1:Array.prototype.some.call(Q,function(Ce,T){var c=Q.substring(T);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,Ce,T){_.pressingUpOrDown=!0,_.step("down",Q,Ce,T)},_.up=function(Q,Ce,T){_.pressingUpOrDown=!0,_.step("up",Q,Ce,T)},_.saveInput=function(Q){_.input=Q};var B=R.value;B===void 0&&(B=R.defaultValue),_.state={focused:R.autoFocus};var de=_.getValidValue(_.toNumber(B));return _.state=H(H({},_.state),{},{inputValue:_.toPrecisionAsStep(de),value:de}),_}return Object(Te.a)(L,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(_){var B=this.props,de=B.value,Q=B.onChange,Ce=B.max,T=B.min,c=this.state.focused;if(_){if(!d(_.value,de)||!d(_.max,Ce)||!d(_.min,T)){var $=c?de:this.getValidValue(de),xe;this.pressingUpOrDown?xe=$:this.inputting?xe=this.rawInput:xe=this.toPrecisionAsStep($),this.setState({value:$,inputValue:xe})}var _e="value"in this.props?de:this.state.value;"max"in this.props&&_.max!==Ce&&typeof _e=="number"&&_e>Ce&&Q&&Q(Ce),"min"in this.props&&_.min!==T&&typeof _e=="number"&&_e1&&arguments[1]!==void 0?arguments[1]:this.props.min,de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,Q=parseFloat(_);return isNaN(Q)?_:(Qde&&(Q=de),Q)}},{key:"setValue",value:function(_,B){var de=this.props.precision,Q=this.isNotCompleteNumber(parseFloat(_))?null:parseFloat(_),Ce=this.state.value,T=Ce===void 0?null:Ce,c=this.state.inputValue,$=c===void 0?null:c,xe=typeof Q=="number"?Q.toFixed(de):"".concat(Q),_e=Q!==T||xe!=="".concat($);return"value"in this.props?($=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:$},B)):this.setState({value:Q,inputValue:this.toPrecisionAsStep(_)},B),_e&&this.props.onChange(Q),Q}},{key:"getMaxPrecision",value:function(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=this.props,Q=de.precision,Ce=de.step;if(j(Q))return Q;var T=this.getPrecision(B),c=this.getPrecision(Ce),$=this.getPrecision(_);return _?Math.max($,T+c):T+c}},{key:"getPrecisionFactor",value:function(_){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=this.getMaxPrecision(_,B);return Math.pow(10,de)}},{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 B=Math.abs(this.getMaxPrecision(_));return isNaN(B)?_.toString():Number(_).toFixed(B)}},{key:"toNumber",value:function(_){var B=this.props.precision,de=this.state.focused,Q=_&&_.length>16&&de;return this.isNotCompleteNumber(_)||Q?_:j(B)?Math.round(_*Math.pow(10,B))/Math.pow(10,B):Number(_)}},{key:"upStep",value:function(_,B){var de=this.props.step,Q=this.getPrecisionFactor(_,B),Ce=Math.abs(this.getMaxPrecision(_,B)),T=((Q*_+Q*de*B)/Q).toFixed(Ce);return this.toNumber(T)}},{key:"downStep",value:function(_,B){var de=this.props.step,Q=this.getPrecisionFactor(_,B),Ce=Math.abs(this.getMaxPrecision(_,B)),T=((Q*_-Q*de*B)/Q).toFixed(Ce);return this.toNumber(T)}},{key:"step",value:function(_,B){var de=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Ce=arguments.length>3?arguments[3]:void 0;this.stop(),B&&(B.persist(),B.preventDefault());var T=this.props;if(T.disabled)return;var c=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(c))return;var $=this["".concat(_,"Step")](c,Q),xe=$>T.max||$T.max?$=T.max:$=ke),Be=(wt||wt===0)&&(isNaN(wt)||Number(wt)<=Ee),D=Le||Q||Ce,I=Be||Q||Ce,w=J()("".concat(de,"-handler"),"".concat(de,"-handler-up"),Object(Oe.a)({},"".concat(de,"-handler-up-disabled"),D)),p=J()("".concat(de,"-handler"),"".concat(de,"-handler-down"),Object(Oe.a)({},"".concat(de,"-handler-down-disabled"),I)),g=T?{onTouchStart:D?k:this.up,onTouchEnd:this.stop}:{onMouseDown:D?k:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},E=T?{onTouchStart:I?k:this.down,onTouchEnd:this.stop}:{onMouseDown:I?k:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return y.a.createElement("div",{className:dt,style:pe,title:X,onMouseEnter:P,onMouseLeave:Z,onMouseOver:O,onMouseOut:C,onFocus:function(){return null},onBlur:function(){return null}},y.a.createElement("div",{className:"".concat(de,"-handler-wrap")},y.a.createElement("span",Object.assign({unselectable:"on"},g,{role:"button","aria-label":"Increase Value","aria-disabled":D,className:w}),$||y.a.createElement("span",{unselectable:"on",className:"".concat(de,"-handler-up-inner"),onClick:F})),y.a.createElement("span",Object.assign({unselectable:"on"},E,{role:"button","aria-label":"Decrease Value","aria-disabled":I,className:p}),xe||y.a.createElement("span",{unselectable:"on",className:"".concat(de,"-handler-down-inner"),onClick:F}))),y.a.createElement("div",{className:"".concat(de,"-input-wrap")},y.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ee,"aria-valuemax":ke,"aria-valuenow":wt,required:re,type:te,placeholder:ye,onPaste:et,onClick:De,onMouseUp:this.onMouseUp,className:"".concat(de,"-input"),tabIndex:me,autoComplete:c,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ot?this.onKeyDown:k,onKeyUp:Ot?this.onKeyUp:k,autoFocus:Me,maxLength:Ve,readOnly:Ce,disabled:Q,max:ke,min:Ee,step:Ke,name:Ae,title:X,id:ve,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(yt),pattern:je,inputMode:he,onInput:at},Re))))}}]),L}(y.a.Component);V.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:q,min:-q,step:1,style:{},onChange:k,onKeyDown:k,onPressEnter:k,onFocus:k,onBlur:k,parser:h,required:!1,autoComplete:"off"};var b=V,N=We.a=b},"e+RI":function(Je,We,l){Je.exports={btn:"btn___35XHi",s1:"s1___yzdGB",s2:"s2___3kxXm",btnDisabled:"btnDisabled___lI9pA",btn2:"btn2___2KLJQ"}},"eS0+":function(Je,We,l){"use strict";var G=l("giR+"),Oe=l("fyUT"),ie=l("tJVT"),Te=l("PpiC"),Se=l("OaEy"),ce=l("2fM7"),K=l("q1tI"),S=l.n(K),y=l("2sxD"),W=l.n(y),J=l("51dB"),ne=l.n(J),le=l("5MlY"),H=l.n(le),M=l("lnNo"),A=l.n(M),k=l("YBdh"),F=l.n(k),h=l("LvDl"),ee=l.n(h),ge=l("TSYQ"),q=l.n(ge),j=ce.a.Option,d=function(m){var v=parseInt(m);return Object(h.isNaN)(v)?0:v},V=function(m){var v,L,R=m.index,_=m.value,B=_===void 0?[]:_,de=m.onChange,Q=m.type,Ce=m.disabled,T=Ce===void 0?!1:Ce,c=m.expansion,$=c===void 0?!0:c,xe=Object(Te.a)(m,["index","value","onChange","type","disabled","expansion"]),_e=Object(K.useState)(!0),ke=Object(ie.a)(_e,2),Ee=ke[0],pe=ke[1],X=function(Z,O){var C=Object(h.cloneDeep)(B);C.difficulties[O].num=Z,console.log(C,444),de(C)};return S.a.createElement("div",{className:W.a.ListGroup,style:{borderWidth:R?1:0}},S.a.createElement("div",{className:W.a.a},R+1),S.a.createElement("div",{"data-type":"width",className:W.a.b},B==null?void 0:B.name),S.a.createElement("div",{className:W.a.c},B==null||((v=B.difficulties)===null||v===void 0)?void 0:v.map(function(P,Z){return S.a.createElement("div",{key:Z,style:{display:Ee?"flex":Z?"none":"flex"},className:W.a.c1},S.a.createElement("span",{style:{color:"#777777",marginRight:5}},"\u96BE\u5EA6"),P.difficulty===1&&S.a.createElement("span",{className:W.a.radio},"\u7B80\u5355"),P.difficulty===2&&S.a.createElement("span",{className:W.a.radio},"\u9002\u4E2D"),P.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"),R===0&&Z===0?S.a.createElement("div",{id:"".concat(Q,"_sum")},S.a.createElement(Oe.a,{disabled:T,parser:d,onChange:function(C){return X(C,Z)},min:0,max:P==null?void 0:P.count,value:(P==null?void 0:P.num)||0,style:{width:66}}),S.a.createElement("span",{style:{display:"none"}},"\u8BF7\u8F93\u5165\u6570\u91CF")):S.a.createElement(Oe.a,{disabled:T,parser:d,onChange:function(C){return X(C,Z)},min:0,max:P==null?void 0:P.count,value:(P==null?void 0:P.num)||0,style:{width:66}}),S.a.createElement("span",{style:{marginLeft:5}},"/",P==null?void 0:P.count))})),S.a.createElement("div",{style:{display:(B==null||((L=B.difficulties)===null||L===void 0)?void 0:L.length)===1||!$?"none":"block"},onClick:function(){return pe(!Ee)},className:W.a.d},Ee?"\u6536\u8D77":"\u5C55\u5F00",S.a.createElement("img",{style:{marginTop:-2,transform:Ee?"rotate(0deg)":"rotate(180deg)"},src:A.a,className:"ml5"})))},b=function(m){var v,L,R=m.value,_=R===void 0?[]:R,B=m.onChange,de=m.listClassName,Q=m.disabled,Ce=Q===void 0?!1:Q,T=m.expansion,c=T===void 0?!0:T,$=Object(Te.a)(m,["value","onChange","listClassName","disabled","expansion"]),xe=Object(K.useState)(!0),_e=Object(ie.a)(xe,2),ke=_e[0],Ee=_e[1],pe=function(C){var re,De=C.score||0,me=[];C==null||((re=C.item_banks)===null||re===void 0)||re.forEach(function(ye){var ve;ye==null||((ve=ye.tag_disciplines)===null||ve===void 0)||ve.forEach(function(he){var je;he==null||((je=he.difficulties)===null||je===void 0)||je.forEach(function(Ke){Ke.num&&me.push(Ke.num)})})});var te=me.reduce(function(ye,ve){return ye+ve},0);return te*De},X=[{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"}],P=function(C,re,De){var me=Object(h.cloneDeep)(_);me.item_banks[re].tag_disciplines[De]=C;var te=pe(me);me.scoreTotal=te,console.log(me,"newValue"),B(me)},Z=function(C){var re=Object(h.cloneDeep)(_);re.score=C;var De=pe(re);re.scoreTotal=De,B(re)};return S.a.createElement("div",{className:q()(W.a.list,de)},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,(v=X.find(function(O){return O.type===(_==null?void 0:_.item_type)}))===null||v===void 0?void 0:v.name)),S.a.createElement("div",{className:W.a.right},c&&S.a.createElement("div",{onClick:function(){return Ee(!ke)},className:"current c-light-primary mb10"},ke?"\u6536\u8D77":"\u5C55\u5F00",S.a.createElement("img",{style:{marginTop:-2,transform:ke?"rotate(0deg)":"rotate(180deg)"},src:A.a,className:"ml5"})),S.a.createElement("div",null,S.a.createElement("img",{src:ne.a}),S.a.createElement("span",{className:"ml10 mr20"},"\u603B\u5206",_.scoreTotal,"\u5206"),S.a.createElement("img",{className:"mr10",src:H.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(Oe.a,{disabled:Ce,parser:d,min:0,onChange:Z,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:ke?"block":"none"}},_==null||((L=_.item_banks)===null||L===void 0)?void 0:L.map(function(O,C){var re;return S.a.createElement(S.a.Fragment,{key:C},S.a.createElement("div",{className:W.a.top},S.a.createElement("img",{src:F.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||((re=O.tag_disciplines)===null||re===void 0)?void 0:re.map(function(De,me){return S.a.createElement(V,{expansion:c,disabled:Ce,type:_==null?void 0:_.item_type,key:"".concat(C,"-").concat(me),value:De,index:me,onChange:function(ye){return P(ye,C,me)}})}))))})))};We.a=b},exQ7:function(Je,We,l){Je.exports=l.p+"static/te.6f9c0684.svg"},fAei:function(Je,We,l){"use strict";l.d(We,"a",function(){return ee.a});var G=l("rePB"),Oe=l("VTBJ"),ie=l("KQm4"),Te=l("1OyB"),Se=l("vuIU"),ce=l("Ji7U"),K=l("LK+K"),S=l("q1tI"),y=l("4IlW"),W=l("Kwbf"),J=l("TSYQ"),ne=l.n(J),le=l("sboe"),H=l("OZM5"),M=l("815F"),A=l("ODXe"),k=l("Ff2n"),F=l("+nKL"),h=l("8XRh"),ee=l("WaYH"),ge=function(Ee,pe){var X=Ee.className,P=Ee.style,Z=Ee.motion,O=Ee.motionNodes,C=Ee.motionType,re=Ee.onMotionStart,De=Ee.onMotionEnd,me=Ee.active,te=Ee.treeNodeRequiredProps,ye=Object(k.a)(Ee,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),ve=S.useState(!0),he=Object(A.a)(ve,2),je=he[0],Ke=he[1],Ve=S.useContext(le.a),Me=Ve.prefixCls,Ae=S.useRef(!1),et=function(){Ae.current||De(),Ae.current=!0};return Object(S.useEffect)(function(){O&&C==="hide"&&je&&Ke(!1)},[O]),Object(S.useEffect)(function(){return O&&re(),function(){O&&et()}},[]),O?S.createElement(h.default,Object.assign({ref:pe,visible:je},Z,{motionAppear:C==="show",onAppearEnd:et,onLeaveEnd:et}),function(at,pt){var ot=at.className,wt=at.style;return S.createElement("div",{ref:pt,className:ne()("".concat(Me,"-treenode-motion"),ot),style:wt},O.map(function(bt){var dt=bt.data,Re=dt.key,Ot=Object(k.a)(dt,["key"]),yt=bt.isStart,Le=bt.isEnd;delete Ot.children;var Be=Object(M.f)(Re,te);return S.createElement(ee.a,Object.assign({},Ot,Be,{active:me,data:bt.data,key:Re,isStart:yt,isEnd:Le}))}))}):S.createElement(ee.a,Object.assign({domRef:pe,className:X,style:P},ye,{active:me}))};ge.displayName="MotionTreeNode";var q=S.forwardRef(ge),j=q;function d(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],pe=ke.length,X=Ee.length;if(Math.abs(pe-X)!==1)return{add:!1,key:null};function P(Z,O){var C=new Map;Z.forEach(function(De){C.set(De,!0)});var re=O.filter(function(De){return!C.has(De)});return re.length===1?re[0]:null}return pe ").concat(Ee);return Ee}var Q=function(Ee,pe){var X=Ee.prefixCls,P=Ee.data,Z=Ee.selectable,O=Ee.checkable,C=Ee.expandedKeys,re=Ee.selectedKeys,De=Ee.checkedKeys,me=Ee.loadedKeys,te=Ee.loadingKeys,ye=Ee.halfCheckedKeys,ve=Ee.keyEntities,he=Ee.disabled,je=Ee.dragging,Ke=Ee.dragOverNodeKey,Ve=Ee.dropPosition,Me=Ee.motion,Ae=Ee.height,et=Ee.itemHeight,at=Ee.virtual,pt=Ee.focusable,ot=Ee.activeItem,wt=Ee.focused,bt=Ee.tabIndex,dt=Ee.onKeyDown,Re=Ee.onFocus,Ot=Ee.onBlur,yt=Ee.onActiveChange,Le=Ee.onListChangeStart,Be=Ee.onListChangeEnd,D=Object(k.a)(Ee,["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"]),I=S.useRef(null);S.useImperativeHandle(pe,function(){return{scrollTo:function(gt){I.current.scrollTo(gt)}}});var w=S.useState(C),p=Object(A.a)(w,2),g=p[0],E=p[1],x=S.useState(P),Y=Object(A.a)(x,2),oe=Y[0],ue=Y[1],tt=S.useState(P),Ue=Object(A.a)(tt,2),Pe=Ue[0],vt=Ue[1],Dt=S.useState([]),ht=Object(A.a)(Dt,2),Kt=ht[0],Ge=ht[1],Ht=S.useState(null),Lt=Object(A.a)(Ht,2),xt=Lt[0],Ft=Lt[1];function Rt(){ue(P),vt(P),Ge([]),Ft(null),Be()}S.useEffect(function(){E(C);var He=d(g,C);if(He.key!==null)if(He.add){var gt=oe.findIndex(function(Vt){var Ct=Vt.data.key;return Ct===He.key}),Nt=_(V(oe,P,He.key),at,Ae,et),Mt=oe.slice();Mt.splice(gt+1,0,R),vt(Mt),Ge(Nt),Ft("show")}else{var en=P.findIndex(function(Vt){var Ct=Vt.data.key;return Ct===He.key}),Wt=_(V(P,oe,He.key),at,Ae,et),ft=P.slice();ft.splice(en+1,0,R),vt(ft),Ge(Wt),Ft("hide")}else oe!==P&&(ue(P),vt(P))},[C,P]),S.useEffect(function(){je||Rt()},[je]);var ut=Me?Pe:P,qe={expandedKeys:C,selectedKeys:re,loadedKeys:me,loadingKeys:te,checkedKeys:De,halfCheckedKeys:ye,dragOverNodeKey:Ke,dropPosition:Ve,keyEntities:ve};return S.createElement(S.Fragment,null,wt&&ot&&S.createElement("span",{style:b,"aria-live":"assertive"},de(ot)),S.createElement("div",{role:"tree"},S.createElement("input",{style:b,disabled:pt===!1||he,tabIndex:pt!==!1?bt:null,onKeyDown:dt,onFocus:Re,onBlur:Ot,value:"",onChange:N})),S.createElement(F.a,Object.assign({},D,{data:ut,itemKey:B,height:Ae,fullHeight:!1,virtual:at,itemHeight:et,prefixCls:"".concat(X,"-list"),ref:I}),function(He){var gt=He.pos,Nt=He.data,Mt=Nt.key,en=Object(k.a)(Nt,["key"]),Wt=He.isStart,ft=He.isEnd,Vt=Object(M.e)(Mt,gt);delete en.children;var Ct=Object(M.f)(Vt,qe);return S.createElement(j,Object.assign({},en,Ct,{active:ot&&Mt===ot.data.key,pos:gt,data:He.data,isStart:Wt,isEnd:ft,motion:Me,motionNodes:Mt===m?Kt:null,motionType:xt,onMotionStart:Le,onMotionEnd:Rt,treeNodeRequiredProps:qe,onMouseMove:function(){yt(null)}}))}))},Ce=S.forwardRef(Q);Ce.displayName="NodeList";var T=Ce,c=l("NvD2"),$=function(ke){Object(ce.a)(pe,ke);var Ee=Object(K.a)(pe);function pe(){var X;return Object(Te.a)(this,pe),X=Ee.apply(this,arguments),X.destroyed=!1,X.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},X.listRef=S.createRef(),X.onNodeDragStart=function(P,Z){var O=X.state,C=O.expandedKeys,re=O.keyEntities,De=X.props.onDragStart,me=Z.props.eventKey;X.dragNode=Z;var te=Object(H.b)(C,me);X.setState({dragging:!0,dragNodesKeys:Object(H.g)(me,re)}),X.setExpandedKeys(te),De&&De({event:P,node:Object(M.b)(Z.props)})},X.onNodeDragEnter=function(P,Z){var O=X.state,C=O.expandedKeys,re=O.keyEntities,De=O.dragNodesKeys,me=X.props.onDragEnter,te=Z.props,ye=te.pos,ve=te.eventKey;if(!X.dragNode||De.indexOf(ve)!==-1)return;var he=Object(H.c)(P,Z);if(X.dragNode.props.eventKey===ve&&he===0){X.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){X.setState({dragOverNodeKey:ve,dropPosition:he}),X.delayedDragEnterLogic||(X.delayedDragEnterLogic={}),Object.keys(X.delayedDragEnterLogic).forEach(function(je){clearTimeout(X.delayedDragEnterLogic[je])}),X.delayedDragEnterLogic[ye]=window.setTimeout(function(){if(!X.state.dragging)return;var je=Object(ie.a)(C),Ke=re[ve];Ke&&(Ke.children||[]).length&&(je=Object(H.a)(C,ve)),"expandedKeys"in X.props||X.setExpandedKeys(je),me&&me({event:P,node:Object(M.b)(Z.props),expandedKeys:je})},400)},0)},X.onNodeDragOver=function(P,Z){var O=X.state.dragNodesKeys,C=X.props.onDragOver,re=Z.props.eventKey;if(O.indexOf(re)!==-1)return;if(X.dragNode&&re===X.state.dragOverNodeKey){var De=Object(H.c)(P,Z);if(De===X.state.dropPosition)return;X.setState({dropPosition:De})}C&&C({event:P,node:Object(M.b)(Z.props)})},X.onNodeDragLeave=function(P,Z){var O=X.props.onDragLeave;X.setState({dragOverNodeKey:""}),O&&O({event:P,node:Object(M.b)(Z.props)})},X.onNodeDragEnd=function(P,Z){var O=X.props.onDragEnd;X.setState({dragOverNodeKey:""}),X.cleanDragState(),O&&O({event:P,node:Object(M.b)(Z.props)}),X.dragNode=null},X.onNodeDrop=function(P,Z){var O=X.state,C=O.dragNodesKeys,re=C===void 0?[]:C,De=O.dropPosition,me=X.props.onDrop,te=Z.props,ye=te.eventKey,ve=te.pos;if(X.setState({dragOverNodeKey:""}),X.cleanDragState(),re.indexOf(ye)!==-1){Object(W.a)(!1,"Can not drop to dragNode(include it's children node)");return}var he=Object(H.k)(ve),je={event:P,node:Object(M.b)(Z.props),dragNode:X.dragNode?Object(M.b)(X.dragNode.props):null,dragNodesKeys:re.slice(),dropPosition:De+Number(he[he.length-1]),dropToGap:!1};De!==0&&(je.dropToGap=!0),me&&me(je),X.dragNode=null},X.cleanDragState=function(){var P=X.state.dragging;P&&X.setState({dragging:!1})},X.onNodeClick=function(P,Z){var O=X.props.onClick;O&&O(P,Z)},X.onNodeDoubleClick=function(P,Z){var O=X.props.onDoubleClick;O&&O(P,Z)},X.onNodeSelect=function(P,Z){var O=X.state.selectedKeys,C=X.state.keyEntities,re=X.props,De=re.onSelect,me=re.multiple,te=Z.selected,ye=Z.key,ve=!te;ve?me?O=Object(H.a)(O,ye):O=[ye]:O=Object(H.b)(O,ye);var he=O.map(function(je){var Ke=C[je];return Ke?Ke.node:null}).filter(function(je){return je});X.setUncontrolledState({selectedKeys:O}),De&&De(O,{event:"select",selected:ve,node:Z,selectedNodes:he,nativeEvent:P.nativeEvent})},X.onNodeCheck=function(P,Z,O){var C=X.state,re=C.keyEntities,De=C.checkedKeys,me=C.halfCheckedKeys,te=X.props,ye=te.checkStrictly,ve=te.onCheck,he=Z.key,je,Ke={event:"check",node:Z,checked:O,nativeEvent:P.nativeEvent};if(ye){var Ve=O?Object(H.a)(De,he):Object(H.b)(De,he),Me=Object(H.b)(me,he);je={checked:Ve,halfChecked:Me},Ke.checkedNodes=Ve.map(function(wt){return re[wt]}).filter(function(wt){return wt}).map(function(wt){return wt.node}),X.setUncontrolledState({checkedKeys:Ve})}else{var Ae=Object(c.a)([].concat(Object(ie.a)(De),[he]),!0,re),et=Ae.checkedKeys,at=Ae.halfCheckedKeys;if(!O){var pt=new Set(et);pt.delete(he);var ot=Object(c.a)(Array.from(pt),{checked:!1,halfCheckedKeys:at},re);et=ot.checkedKeys,at=ot.halfCheckedKeys}je=et,Ke.checkedNodes=[],Ke.checkedNodesPositions=[],Ke.halfCheckedKeys=at,et.forEach(function(wt){var bt=re[wt];if(!bt)return;var dt=bt.node,Re=bt.pos;Ke.checkedNodes.push(dt),Ke.checkedNodesPositions.push({node:dt,pos:Re})}),X.setUncontrolledState({checkedKeys:et},!1,{halfCheckedKeys:at})}ve&&ve(je,Ke)},X.onNodeLoad=function(P){return new Promise(function(Z){X.setState(function(O){var C=O.loadedKeys,re=C===void 0?[]:C,De=O.loadingKeys,me=De===void 0?[]:De,te=X.props,ye=te.loadData,ve=te.onLoad,he=P.key;if(!ye||re.indexOf(he)!==-1||me.indexOf(he)!==-1)return{};var je=ye(P);return je.then(function(){var Ke=X.state,Ve=Ke.loadedKeys,Me=Ke.loadingKeys,Ae=Object(H.a)(Ve,he),et=Object(H.b)(Me,he);ve&&ve(Ae,{event:"load",node:P}),X.setUncontrolledState({loadedKeys:Ae}),X.setState({loadingKeys:et}),Z()}),{loadingKeys:Object(H.a)(me,he)}})})},X.onNodeMouseEnter=function(P,Z){var O=X.props.onMouseEnter;O&&O({event:P,node:Z})},X.onNodeMouseLeave=function(P,Z){var O=X.props.onMouseLeave;O&&O({event:P,node:Z})},X.onNodeContextMenu=function(P,Z){var O=X.props.onRightClick;O&&(P.preventDefault(),O({event:P,node:Z}))},X.onFocus=function(){var P=X.props.onFocus;X.setState({focused:!0}),P&&P.apply(void 0,arguments)},X.onBlur=function(){var P=X.props.onBlur;X.setState({focused:!1}),X.onActiveChange(null),P&&P.apply(void 0,arguments)},X.getTreeNodeRequiredProps=function(){var P=X.state,Z=P.expandedKeys,O=P.selectedKeys,C=P.loadedKeys,re=P.loadingKeys,De=P.checkedKeys,me=P.halfCheckedKeys,te=P.dragOverNodeKey,ye=P.dropPosition,ve=P.keyEntities;return{expandedKeys:Z||[],selectedKeys:O||[],loadedKeys:C||[],loadingKeys:re||[],checkedKeys:De||[],halfCheckedKeys:me||[],dragOverNodeKey:te,dropPosition:ye,keyEntities:ve}},X.setExpandedKeys=function(P){var Z=X.state.treeData,O=Object(M.d)(Z,P);X.setUncontrolledState({expandedKeys:P,flattenNodes:O},!0)},X.onNodeExpand=function(P,Z){var O=X.state.expandedKeys,C=X.state.listChanging,re=X.props,De=re.onExpand,me=re.loadData,te=Z.key,ye=Z.expanded;if(C)return;var ve=O.indexOf(te),he=!ye;if(Object(W.a)(ye&&ve!==-1||!ye&&ve===-1,"Expand state not sync with index check"),he?O=Object(H.a)(O,te):O=Object(H.b)(O,te),X.setExpandedKeys(O),De&&De(O,{node:Z,expanded:he,nativeEvent:P.nativeEvent}),he&&me){var je=X.onNodeLoad(Z);je&&je.then(function(){var Ke=Object(M.d)(X.state.treeData,O);X.setUncontrolledState({flattenNodes:Ke})})}},X.onListChangeStart=function(){X.setUncontrolledState({listChanging:!0})},X.onListChangeEnd=function(){setTimeout(function(){X.setUncontrolledState({listChanging:!1})})},X.onActiveChange=function(P){var Z=X.state.activeKey,O=X.props.onActiveChange;if(Z===P)return;X.setState({activeKey:P}),P!==null&&X.scrollTo({key:P}),O&&O(P)},X.getActiveItem=function(){var P=X.state,Z=P.activeKey,O=P.flattenNodes;return Z===null?null:O.find(function(C){var re=C.data.key;return re===Z})||null},X.offsetActiveKey=function(P){var Z=X.state,O=Z.flattenNodes,C=Z.activeKey,re=O.findIndex(function(te){var ye=te.data.key;return ye===C});re===-1&&P<0&&(re=O.length),re=(re+P+O.length)%O.length;var De=O[re];if(De){var me=De.data.key;X.onActiveChange(me)}else X.onActiveChange(null)},X.onKeyDown=function(P){var Z=X.state,O=Z.activeKey,C=Z.expandedKeys,re=Z.checkedKeys,De=X.props,me=De.onKeyDown,te=De.checkable,ye=De.selectable;switch(P.which){case y.a.UP:{X.offsetActiveKey(-1),P.preventDefault();break}case y.a.DOWN:{X.offsetActiveKey(1),P.preventDefault();break}}var ve=X.getActiveItem();if(ve&&ve.data){var he=X.getTreeNodeRequiredProps(),je=ve.data.isLeaf===!1||!!(ve.data.children||[]).length,Ke=Object(M.b)(Object(Oe.a)(Object(Oe.a)({},Object(M.f)(O,he)),{},{data:ve.data,active:!0}));switch(P.which){case y.a.LEFT:{je&&C.includes(O)?X.onNodeExpand({},Ke):ve.parent&&X.onActiveChange(ve.parent.data.key),P.preventDefault();break}case y.a.RIGHT:{je&&!C.includes(O)?X.onNodeExpand({},Ke):ve.children&&ve.children.length&&X.onActiveChange(ve.children[0].data.key),P.preventDefault();break}case y.a.ENTER:case y.a.SPACE:{te&&!Ke.disabled&&Ke.checkable!==!1&&!Ke.disableCheckbox?X.onNodeCheck({},Ke,!re.includes(O)):!te&&ye&&!Ke.disabled&&Ke.selectable!==!1&&X.onNodeSelect({},Ke);break}}}me&&me(P)},X.setUncontrolledState=function(P){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(X.destroyed)return;var C=!1,re=!0,De={};Object.keys(P).forEach(function(me){if(me in X.props){re=!1;return}C=!0,De[me]=P[me]}),C&&(!Z||re)&&X.setState(Object(Oe.a)(Object(Oe.a)({},De),O))},X.scrollTo=function(P){X.listRef.current.scrollTo(P)},X}return Object(Se.a)(pe,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var P,Z=this.state,O=Z.focused,C=Z.flattenNodes,re=Z.keyEntities,De=Z.dragging,me=Z.activeKey,te=this.props,ye=te.prefixCls,ve=te.className,he=te.style,je=te.showLine,Ke=te.focusable,Ve=te.tabIndex,Me=Ve===void 0?0:Ve,Ae=te.selectable,et=te.showIcon,at=te.icon,pt=te.switcherIcon,ot=te.draggable,wt=te.checkable,bt=te.checkStrictly,dt=te.disabled,Re=te.motion,Ot=te.loadData,yt=te.filterTreeNode,Le=te.height,Be=te.itemHeight,D=te.virtual,I=te.titleRender,w=te.onContextMenu,p=Object(H.f)(this.props);return S.createElement(le.a.Provider,{value:{prefixCls:ye,selectable:Ae,showIcon:et,icon:at,switcherIcon:pt,draggable:ot,checkable:wt,checkStrictly:bt,disabled:dt,keyEntities:re,loadData:Ot,filterTreeNode:yt,titleRender:I,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:ne()(ye,ve,(P={},Object(G.a)(P,"".concat(ye,"-show-line"),je),Object(G.a)(P,"".concat(ye,"-focused"),O),Object(G.a)(P,"".concat(ye,"-active-focused"),me!==null),P))},S.createElement(T,Object.assign({ref:this.listRef,prefixCls:ye,style:he,data:C,disabled:dt,selectable:Ae,checkable:!!wt,motion:Re,dragging:De,height:Le,itemHeight:Be,virtual:D,focusable:Ke,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:w},this.getTreeNodeRequiredProps(),p))))}}],[{key:"getDerivedStateFromProps",value:function(P,Z){var O=Z.prevProps,C={prevProps:P};function re(at){return!O&&at in P||O&&O[at]!==P[at]}var De;if(re("treeData")?De=P.treeData:re("children")&&(Object(W.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),De=Object(M.c)(P.children)),De){C.treeData=De;var me=Object(M.a)(De);C.keyEntities=Object(Oe.a)(Object(G.a)({},m,L),me.keyEntities)}var te=C.keyEntities||Z.keyEntities;if(re("expandedKeys")||O&&re("autoExpandParent"))C.expandedKeys=P.autoExpandParent||!O&&P.defaultExpandParent?Object(H.e)(P.expandedKeys,te):P.expandedKeys;else if(!O&&P.defaultExpandAll){var ye=Object(Oe.a)({},te);delete ye[m],C.expandedKeys=Object.keys(ye).map(function(at){return ye[at].key})}else!O&&P.defaultExpandedKeys&&(C.expandedKeys=P.autoExpandParent||P.defaultExpandParent?Object(H.e)(P.defaultExpandedKeys,te):P.defaultExpandedKeys);if(C.expandedKeys||delete C.expandedKeys,De||C.expandedKeys){var ve=Object(M.d)(De||Z.treeData,C.expandedKeys||Z.expandedKeys);C.flattenNodes=ve}if(P.selectable&&(re("selectedKeys")?C.selectedKeys=Object(H.d)(P.selectedKeys,P):!O&&P.defaultSelectedKeys&&(C.selectedKeys=Object(H.d)(P.defaultSelectedKeys,P))),P.checkable){var he;if(re("checkedKeys")?he=Object(H.j)(P.checkedKeys)||{}:!O&&P.defaultCheckedKeys?he=Object(H.j)(P.defaultCheckedKeys)||{}:De&&(he=Object(H.j)(P.checkedKeys)||{checkedKeys:Z.checkedKeys,halfCheckedKeys:Z.halfCheckedKeys}),he){var je=he,Ke=je.checkedKeys,Ve=Ke===void 0?[]:Ke,Me=je.halfCheckedKeys,Ae=Me===void 0?[]:Me;if(!P.checkStrictly){var et=Object(c.a)(Ve,!0,te);Ve=et.checkedKeys,Ae=et.halfCheckedKeys}C.checkedKeys=Ve,C.halfCheckedKeys=Ae}}return re("loadedKeys")&&(C.loadedKeys=P.loadedKeys),C}}]),pe}(S.Component);$.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:[]},$.TreeNode=ee.a;var xe=$,_e=We.b=xe},k4n4:function(Je,We,l){"use strict";var G=l("tJVT"),Oe=l("q1tI"),ie=l.n(Oe),Te=l("e+RI"),Se=l.n(Te),ce=l("FTkQ"),K=l.n(ce),S=l("E/GV"),y=l.n(S),W=function(ne){var le=ne.type,H=le===void 0?1:le,M=ne.value,A=M===void 0?[]:M,k=ne.onChange,F=ne.disabled,h=F===void 0?!1:F,ee=ne.icon,ge=Object(Oe.useState)(),q=Object(G.a)(ge,2),j=q[0],d=q[1],V=function(N){k(N)};return H===1?ie.a.createElement("div",null,A==null?void 0:A.map(function(b,N){return ie.a.createElement("div",{key:N,className:h?"".concat(Se.a.btn," ").concat(Se.a.btnDisabled):Se.a.btn},ie.a.createElement("span",{className:Se.a.s1},b.name),ie.a.createElement("img",{src:K.a,className:Se.a.s2,onClick:function(){return V(b.id)}}))})):ie.a.createElement("div",null,A==null?void 0:A.map(function(b,N){return ie.a.createElement("div",{key:N,className:Se.a.btn2},ie.a.createElement("span",{className:Se.a.s1},ie.a.createElement("img",{src:ee||y.a}),b.name),ie.a.createElement("img",{src:K.a,className:Se.a.s2,onClick:function(){return V(b.id)}}))}))};We.a=W},kSUc:function(Je,We,l){},kqOp:function(Je,We,l){"use strict";l.d(We,"a",function(){return W});var G=l("0Owb"),Oe=l("fWQN"),ie=l("mtLc"),Te=l("yKVA"),Se=l("879j"),ce=l("q1tI"),K=l.n(ce),S=l("Ot1p"),y="\u2581",W=function(J){Object(Te.a)(le,J);var ne=Object(Se.a)(le);function le(){var H;Object(Oe.a)(this,le);for(var M=arguments.length,A=new Array(M),k=0;k` "'(~:]+/,M=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,A=/^\s*\[[^\]]+?\]:.*$/,k=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,F=" ";function h(T,c,$){return c.f=c.inline=$,$(T,c)}function ee(T,c,$){return c.f=c.block=$,$(T,c)}function ge(T){return!T||!/\S/.test(T.string)}function q(T){if(T.linkTitle=!1,T.linkHref=!1,T.linkText=!1,T.em=!1,T.strong=!1,T.strikethrough=!1,T.quote=0,T.indentedCode=!1,T.f==d){var c=Se;if(!c){var $=G.innerMode(Te,T.htmlState);c=$.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText}c&&(T.f=m,T.block=j,T.htmlState=null)}return T.trailingSpace=0,T.trailingSpaceNewLine=!1,T.prevLine=T.thisLine,T.thisLine={stream:null},null}function j(T,c){var $=T.column()===c.indentation,xe=ge(c.prevLine.stream),_e=c.indentedCode,ke=c.prevLine.hr,Ee=c.list!==!1,pe=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var X=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Ee)){for(c.list=null;X=4&&(_e||c.prevLine.fencedCodeEnd||c.prevLine.header||xe))return T.skipToEnd(),c.indentedCode=!0,K.code;if(T.eatSpace())return null;if($&&c.indentation<=pe&&(O=T.match(ne))&&O[1].length<=6)return c.quote=0,c.header=O[1].length,c.thisLine.header=!0,ie.highlightFormatting&&(c.formatting="header"),c.f=c.inline,b(c);if(c.indentation<=pe&&T.eat(">"))return c.quote=$?1:c.quote+1,ie.highlightFormatting&&(c.formatting="quote"),T.eatSpace(),b(c);if(!Z&&!c.setext&&$&&c.indentation<=pe&&(O=T.match(W))){var C=O[1]?"ol":"ul";return c.indentation=X+T.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,ie.taskLists&&T.match(J,!1)&&(c.taskList=!0),c.f=c.inline,ie.highlightFormatting&&(c.formatting=["list","list-"+C]),b(c)}else{if($&&c.indentation<=pe&&(O=T.match(M,!0)))return c.quote=0,c.fencedEndRE=new RegExp(O[1]+"+ *$"),c.localMode=ie.fencedCodeBlockHighlighting&&ce(O[2]||ie.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=G.startState(c.localMode)),c.f=c.block=V,ie.highlightFormatting&&(c.formatting="code-block"),c.code=-1,b(c);if(c.setext||(!P||!Ee)&&!c.quote&&c.list===!1&&!c.code&&!Z&&!A.test(T.string)&&(O=T.lookAhead(1))&&(O=O.match(le)))return c.setext?(c.header=c.setext,c.setext=0,T.skipToEnd(),ie.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(Z)return T.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,K.hr;if(T.peek()==="[")return h(T,c,B)}return h(T,c,c.inline)}function d(T,c){var $=Te.token(T,c.htmlState);if(!Se){var xe=G.innerMode(Te,c.htmlState);(xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText||c.md_inside&&T.current().indexOf(">")>-1)&&(c.f=m,c.block=j,c.htmlState=null)}return $}function V(T,c){var $=c.listStack[c.listStack.length-1]||0,xe=c.indentation<$,_e=$+3;if(c.fencedEndRE&&c.indentation<=_e&&(xe||T.match(c.fencedEndRE))){ie.highlightFormatting&&(c.formatting="code-block");var ke;return xe||(ke=b(c)),c.localMode=c.localState=null,c.block=j,c.f=m,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,xe?ee(T,c,c.block):ke}else return c.localMode?c.localMode.token(T,c.localState):(T.skipToEnd(),K.code)}function b(T){var c=[];if(T.formatting){c.push(K.formatting),typeof T.formatting=="string"&&(T.formatting=[T.formatting]);for(var $=0;$=T.quote?c.push(K.formatting+"-"+T.formatting[$]+"-"+T.quote):c.push("error"))}if(T.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(T.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(T.linkHref?c.push(K.linkHref,"url"):(T.strong&&c.push(K.strong),T.em&&c.push(K.em),T.strikethrough&&c.push(K.strikethrough),T.emoji&&c.push(K.emoji),T.linkText&&c.push(K.linkText),T.code&&c.push(K.code),T.image&&c.push(K.image),T.imageAltText&&c.push(K.imageAltText,"link"),T.imageMarker&&c.push(K.imageMarker)),T.header&&c.push(K.header,K.header+"-"+T.header),T.quote&&(c.push(K.quote),!ie.maxBlockquoteDepth||ie.maxBlockquoteDepth>=T.quote?c.push(K.quote+"-"+T.quote):c.push(K.quote+"-"+ie.maxBlockquoteDepth)),T.list!==!1){var xe=(T.listStack.length-1)%3;xe?xe===1?c.push(K.list2):c.push(K.list3):c.push(K.list1)}return T.trailingSpaceNewLine?c.push("trailing-space-new-line"):T.trailingSpace&&c.push("trailing-space-"+(T.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function N(T,c){return T.match(H,!0)?b(c):void 0}function m(T,c){var $=c.text(T,c);if(typeof $!="undefined")return $;if(c.list)return c.list=null,b(c);if(c.taskList){var xe=T.match(J,!0)[1]===" ";return xe?c.taskOpen=!0:c.taskClosed=!0,ie.highlightFormatting&&(c.formatting="task"),c.taskList=!1,b(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&T.match(/^#+$/,!0))return ie.highlightFormatting&&(c.formatting="header"),b(c);var _e=T.next();if(c.linkTitle){c.linkTitle=!1;var ke=_e;_e==="("&&(ke=")"),ke=(ke+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ee="^\\s*(?:[^"+ke+"\\\\]+|\\\\\\\\|\\\\.)"+ke;if(T.match(new RegExp(Ee),!0))return K.linkHref}if(_e==="`"){var pe=c.formatting;ie.highlightFormatting&&(c.formatting="code"),T.eatWhile("`");var X=T.current().length;if(c.code==0&&(!c.quote||X==1))return c.code=X,b(c);if(X==c.code){var P=b(c);return c.code=0,P}else return c.formatting=pe,b(c)}else if(c.code)return b(c);if(_e==="\\"&&(T.next(),ie.highlightFormatting)){var Z=b(c),O=K.formatting+"-escape";return Z?Z+" "+O:O}if(_e==="!"&&T.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,ie.highlightFormatting&&(c.formatting="image"),b(c);if(_e==="["&&c.imageMarker&&T.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,ie.highlightFormatting&&(c.formatting="image"),b(c);if(_e==="]"&&c.imageAltText){ie.highlightFormatting&&(c.formatting="image");var Z=b(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=L,Z}if(_e==="["&&!c.image)return c.linkText&&T.match(/^.*?\]/)||(c.linkText=!0,ie.highlightFormatting&&(c.formatting="link")),b(c);if(_e==="]"&&c.linkText){ie.highlightFormatting&&(c.formatting="link");var Z=b(c);return c.linkText=!1,c.inline=c.f=T.match(/\(.*?\)| ?\[.*?\]/,!1)?L:m,Z}if(_e==="<"&&T.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=v,ie.highlightFormatting&&(c.formatting="link");var Z=b(c);return Z?Z+=" ":Z="",Z+K.linkInline}if(_e==="<"&&T.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=v,ie.highlightFormatting&&(c.formatting="link");var Z=b(c);return Z?Z+=" ":Z="",Z+K.linkEmail}if(ie.xml&&_e==="<"&&T.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var C=T.string.indexOf(">",T.pos);if(C!=-1){var re=T.string.substring(T.start,C);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(c.md_inside=!0)}return T.backUp(1),c.htmlState=G.startState(Te),ee(T,c,d)}if(ie.xml&&_e==="<"&&T.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(_e==="*"||_e==="_"){for(var De=1,me=T.pos==1?" ":T.string.charAt(T.pos-2);De<3&&T.eat(_e);)De++;var te=T.peek()||" ",ye=!/\s/.test(te)&&(!k.test(te)||/\s/.test(me)||k.test(me)),ve=!/\s/.test(me)&&(!k.test(me)||/\s/.test(te)||k.test(te)),he=null,je=null;if(De%2&&(!c.em&&ye&&(_e==="*"||!ve||k.test(me))?he=!0:c.em==_e&&ve&&(_e==="*"||!ye||k.test(te))&&(he=!1)),De>1&&(!c.strong&&ye&&(_e==="*"||!ve||k.test(me))?je=!0:c.strong==_e&&ve&&(_e==="*"||!ye||k.test(te))&&(je=!1)),je!=null||he!=null){ie.highlightFormatting&&(c.formatting=he==null?"strong":je==null?"em":"strong em"),he===!0&&(c.em=_e),je===!0&&(c.strong=_e);var P=b(c);return he===!1&&(c.em=!1),je===!1&&(c.strong=!1),P}}else if(_e===" "&&(T.eat("*")||T.eat("_"))){if(T.peek()===" ")return b(c);T.backUp(1)}if(ie.strikethrough){if(_e==="~"&&T.eatWhile(_e)){if(c.strikethrough){ie.highlightFormatting&&(c.formatting="strikethrough");var P=b(c);return c.strikethrough=!1,P}else if(T.match(/^[^\s]/,!1))return c.strikethrough=!0,ie.highlightFormatting&&(c.formatting="strikethrough"),b(c)}else if(_e===" "&&T.match(/^~~/,!0)){if(T.peek()===" ")return b(c);T.backUp(2)}}if(ie.emoji&&_e===":"&&T.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,ie.highlightFormatting&&(c.formatting="emoji");var Ke=b(c);return c.emoji=!1,Ke}return _e===" "&&(T.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),b(c)}function v(T,c){var $=T.next();if($===">"){c.f=c.inline=m,ie.highlightFormatting&&(c.formatting="link");var xe=b(c);return xe?xe+=" ":xe="",xe+K.linkInline}return T.match(/^[^>]+/,!0),K.linkInline}function L(T,c){if(T.eatSpace())return null;var $=T.next();return $==="("||$==="["?(c.f=c.inline=_($==="("?")":"]"),ie.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,b(c)):"error"}var R={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function _(T){return function(c,$){var xe=c.next();if(xe===T){$.f=$.inline=m,ie.highlightFormatting&&($.formatting="link-string");var _e=b($);return $.linkHref=!1,_e}return c.match(R[T]),$.linkHref=!0,b($)}}function B(T,c){return T.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=de,T.next(),ie.highlightFormatting&&(c.formatting="link"),c.linkText=!0,b(c)):h(T,c,m)}function de(T,c){if(T.match(/^\]:/,!0)){c.f=c.inline=Q,ie.highlightFormatting&&(c.formatting="link");var $=b(c);return c.linkText=!1,$}return T.match(/^([^\]\\]|\\.)+/,!0),K.linkText}function Q(T,c){return T.eatSpace()?null:(T.match(/^[^\s]+/,!0),T.peek()===void 0?c.linkTitle=!0:T.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),c.f=c.inline=m,K.linkHref+" url")}var Ce={startState:function(){return{f:j,prevLine:{stream:null},thisLine:{stream:null},block:j,htmlState:null,indentation:0,inline:m,text:N,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(T){return{f:T.f,prevLine:T.prevLine,thisLine:T.thisLine,block:T.block,htmlState:T.htmlState&&G.copyState(Te,T.htmlState),indentation:T.indentation,localMode:T.localMode,localState:T.localMode?G.copyState(T.localMode,T.localState):null,inline:T.inline,text:T.text,formatting:!1,linkText:T.linkText,linkTitle:T.linkTitle,linkHref:T.linkHref,code:T.code,em:T.em,strong:T.strong,strikethrough:T.strikethrough,emoji:T.emoji,header:T.header,setext:T.setext,hr:T.hr,taskList:T.taskList,list:T.list,listStack:T.listStack.slice(0),quote:T.quote,indentedCode:T.indentedCode,trailingSpace:T.trailingSpace,trailingSpaceNewLine:T.trailingSpaceNewLine,md_inside:T.md_inside,fencedEndRE:T.fencedEndRE}},token:function(T,c){if(c.formatting=!1,T!=c.thisLine.stream){if(c.header=0,c.hr=!1,T.match(/^\s*$/,!0))return q(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:T},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=d)){var $=T.match(/^\s*/,!0)[0].replace(/\t/g,F).length;if(c.indentation=$,c.indentationDiff=null,$>0)return null}}return c.f(T,c)},innerMode:function(T){return T.block==d?{state:T.htmlState,mode:Te}:T.localState?{state:T.localState,mode:T.localMode}:{state:T,mode:Ce}},indent:function(T,c,$){return T.block==d&&Te.indent?Te.indent(T.htmlState,c,$):T.localState&&T.localMode.indent?T.localMode.indent(T.localState,c,$):G.Pass},blankLine:q,getType:b,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ce},"xml"),G.defineMIME("text/markdown","markdown"),G.defineMIME("text/x-markdown","markdown")})},lnNo:function(Je,We,l){Je.exports=l.p+"static/up.69f3b3fd.svg"},m3fD:function(Je,We,l){Je.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(Je,We,l){(function(G){G(l("VrN/"))})(function(G){"use strict";var Oe=G.Pos;function ie(k,F){return k.line-F.line||k.ch-F.ch}var Te="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",Se=Te+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ce=new RegExp("<(/?)(["+Te+"]["+Se+"]*)","g");function K(k,F,h,ee){this.line=F,this.ch=h,this.cm=k,this.text=k.getLine(F),this.min=ee?Math.max(ee.from,k.firstLine()):k.firstLine(),this.max=ee?Math.min(ee.to-1,k.lastLine()):k.lastLine()}function S(k,F){var h=k.cm.getTokenTypeAt(Oe(k.line,F));return h&&/\btag\b/.test(h)}function y(k){return k.line>=k.max?void 0:(k.ch=0,k.text=k.cm.getLine(++k.line),!0)}function W(k){return k.line<=k.min?void 0:(k.text=k.cm.getLine(--k.line),k.ch=k.text.length,!0)}function J(k){for(;;){var F=k.text.indexOf(">",k.ch);if(F==-1){if(y(k))continue;return}if(!S(k,F+1)){k.ch=F+1;continue}var h=k.text.lastIndexOf("/",F),ee=h>-1&&!/\S/.test(k.text.slice(h+1,F));return k.ch=F+1,ee?"selfClose":"regular"}}function ne(k){for(;;){var F=k.ch?k.text.lastIndexOf("<",k.ch-1):-1;if(F==-1){if(W(k))continue;return}if(!S(k,F+1)){k.ch=F;continue}ce.lastIndex=F,k.ch=F;var h=ce.exec(k.text);if(h&&h.index==F)return h}}function le(k){for(;;){ce.lastIndex=k.ch;var F=ce.exec(k.text);if(!F){if(y(k))continue;return}if(!S(k,F.index+1)){k.ch=F.index+1;continue}return k.ch=F.index+F[0].length,F}}function H(k){for(;;){var F=k.ch?k.text.lastIndexOf(">",k.ch-1):-1;if(F==-1){if(W(k))continue;return}if(!S(k,F+1)){k.ch=F;continue}var h=k.text.lastIndexOf("/",F),ee=h>-1&&!/\S/.test(k.text.slice(h+1,F));return k.ch=F+1,ee?"selfClose":"regular"}}function M(k,F){for(var h=[];;){var ee=le(k),ge,q=k.line,j=k.ch-(ee?ee[0].length:0);if(!ee||!(ge=J(k)))return;if(ge=="selfClose")continue;if(ee[1]){for(var d=h.length-1;d>=0;--d)if(h[d]==ee[2]){h.length=d;break}if(d<0&&(!F||F==ee[2]))return{tag:ee[2],from:Oe(q,j),to:Oe(k.line,k.ch)}}else h.push(ee[2])}}function A(k,F){for(var h=[];;){var ee=H(k);if(!ee)return;if(ee=="selfClose"){ne(k);continue}var ge=k.line,q=k.ch,j=ne(k);if(!j)return;if(j[1])h.push(j[2]);else{for(var d=h.length-1;d>=0;--d)if(h[d]==j[2]){h.length=d;break}if(d<0&&(!F||F==j[2]))return{tag:j[2],from:Oe(k.line,k.ch),to:Oe(ge,q)}}}}G.registerHelper("fold","xml",function(k,F){for(var h=new K(k,F.line,0);;){var ee=le(h);if(!ee||h.line!=F.line)return;var ge=J(h);if(!ge)return;if(!ee[1]&&ge!="selfClose"){var q=Oe(h.line,h.ch),j=M(h,ee[2]);return j&&ie(j.from,q)>0?{from:q,to:j.from}:null}}}),G.findMatchingTag=function(k,F,h){var ee=new K(k,F.line,F.ch,h);if(ee.text.indexOf(">")==-1&&ee.text.indexOf("<")==-1)return;var ge=J(ee),q=ge&&Oe(ee.line,ee.ch),j=ge&&ne(ee);if(!ge||!j||ie(ee,F)>0)return;var d={from:Oe(ee.line,ee.ch),to:q,tag:j[2]};return ge=="selfClose"?{open:d,close:null,at:"open"}:j[1]?{open:A(ee,j[2]),close:d,at:"close"}:(ee=new K(k,q.line,q.ch,h),{open:d,close:M(ee,j[2]),at:"open"})},G.findEnclosingTag=function(k,F,h,ee){for(var ge=new K(k,F.line,F.ch,h);;){var q=A(ge,ee);if(!q)break;var j=new K(k,F.line,F.ch,h),d=M(j,q.tag);if(d)return{open:q,close:d}}},G.scanForClosingTag=function(k,F,h,ee){var ge=new K(k,F.line,F.ch,ee?{from:0,to:ee}:null);return M(ge,h)}})},p5ED:function(Je,We,l){"use strict";var G=l("+L6B"),Oe=l("2/Rp"),ie=l("5Dmo"),Te=l("3S7+"),Se=l("k1fw"),ce=l("tJVT"),K=l("q1tI"),S=l.n(K),y=l("vHTk"),W=l.n(y),J=l("yEEn"),ne=l("ZW9T"),le=l("1vsH");We.a=function(H){var M=H.name,A=H.data,k=H.theme,F=H.type,h=H.filename,ee=H.monacoEditor,ge=H.className,q=H.style,j=H.close,d=H.onClose,V=H.hasMask,b=Object(K.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),N=Object(ce.a)(b,2),m=N[0],v=N[1],L=Object(K.useState)(""),R=Object(ce.a)(L,2),_=R[0],B=R[1],de=Object(K.useRef)();h&&(ee.filename=h),Object(K.useEffect)(function(){var T,c,$=(T=document.cookie)===null||T===void 0||((c=T.replace(/\s/g,""))===null||c===void 0)?void 0:c.split(";");$==null||$.map(function(xe){var _e=xe.split("=");_e[0]==="_educoder_session"&&B(_e[1])})},[]);var Q=function(){if(A.startsWith("http")||A.startsWith("/")){Ce();return}Object(le.y)(h||"educoder",A,h)},Ce=function(){Object(le.w)(h||M,A)};return console.log("data:",A,"fileanme:",h," name:",M),S.a.createElement("div",{style:Object(Se.a)({},q||{}),className:"".concat(V&&W.a.bgBlack," ").concat(F?W.a.wrp:"hide")},j&&S.a.createElement("div",{className:W.a.close,ref:de},S.a.createElement(Te.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return de.current}},S.a.createElement("span",{onClick:Ce},S.a.createElement("i",{className:"icon-quxiaozhiding"}))),S.a.createElement(Te.a,{title:"\u5173\u95ED",getPopupContainer:function(){return de.current}},S.a.createElement("span",{className:"",onClick:d},S.a.createElement("i",{className:"icon-guanbi1"})))),S.a.createElement("div",{className:"".concat(W.a[ge]," ").concat(ge," ").concat(W.a.monaco," ").concat(F==="txt"?"show":"hide")},F==="txt"&&S.a.createElement(ne.b,ee)),F==="audio"&&S.a.createElement("audio",{src:"".concat(A!=null&&A.startsWith("/")||(A==null?void 0:A.indexOf("https://"))>-1?A:"data:audio/mp3;base64,").concat(A),autoPlay:!0}),F==="video"&&S.a.createElement(S.a.Fragment,null,A!=null&&A.startsWith("/")?S.a.createElement("video",{controls:!0,src:"".concat(A),autoPlay:!0}):S.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})),F==="pdf"&&S.a.createElement("embed",{className:W.a.embed,src:A}),F==="image"&&S.a.createElement(S.a.Fragment,null,S.a.createElement("img",{src:"".concat(A!=null&&A.startsWith("/")||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(A)})),F==="other"&&S.a.createElement("div",null,S.a.createElement(Oe.a,{type:"primary",size:"large",onClick:Q},S.a.createElement(J.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(F==="download"||F==="office")&&S.a.createElement(Oe.a,{type:"primary",size:"large",onClick:Q},S.a.createElement(J.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Je,We,l){},"rAM+":function(Je,We,l){"use strict";l.d(We,"a",function(){return Oe});var G=l("Qw5x");function Oe(ie,Te){var Se;if(typeof Symbol=="undefined"||ie[Symbol.iterator]==null){if(Array.isArray(ie)||(Se=Object(G.a)(ie))||Te&&ie&&typeof ie.length=="number"){Se&&(ie=Se);var ce=0,K=function(){};return{s:K,n:function(){return ce>=ie.length?{done:!0}:{done:!1,value:ie[ce++]}},e:function(ne){throw ne},f:K}}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(){Se=ie[Symbol.iterator]()},n:function(){var ne=Se.next();return S=ne.done,ne},e:function(ne){y=!0,W=ne},f:function(){try{!S&&Se.return!=null&&Se.return()}finally{if(y)throw W}}}}},rUJ1:function(Je,We){const l=/[&<>"']/,G=/[&<>"']/g,Oe=/[<>"']|&(?!#?\w+;)/,ie=/[<>"']|&(?!#?\w+;)/g,Te={"&":"&","<":"<",">":">",'"':""","'":"'"},Se=V=>Te[V];function ce(V,b){if(b){if(l.test(V))return V.replace(G,Se)}else if(Oe.test(V))return V.replace(ie,Se);return V}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(V){return V.replace(K,(b,N)=>(N=N.toLowerCase(),N==="colon"?":":N.charAt(0)==="#"?N.charAt(1)==="x"?String.fromCharCode(parseInt(N.substring(2),16)):String.fromCharCode(+N.substring(1)):""))}const y=/(^|[^\[])\^/g;function W(V,b){V=V.source||V,b=b||"";const N={replace:(m,v)=>(v=v.source||v,v=v.replace(y,"$1"),V=V.replace(m,v),N),getRegex:()=>new RegExp(V,b)};return N}const J=/[^\w:]/g,ne=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function le(V,b,N){if(V){let m;try{m=decodeURIComponent(S(N)).replace(J,"").toLowerCase()}catch(v){return null}if(m.indexOf("javascript:")===0||m.indexOf("vbscript:")===0||m.indexOf("data:")===0)return null}b&&!ne.test(N)&&(N=F(b,N));try{N=encodeURI(N).replace(/%25/g,"%")}catch(m){return null}return N}const H={},M=/^[^:]+:\/*[^/]*$/,A=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;function F(V,b){H[" "+V]||(M.test(V)?H[" "+V]=V+"/":H[" "+V]=q(V,"/",!0)),V=H[" "+V];const N=V.indexOf(":")===-1;return b.substring(0,2)==="//"?N?b:V.replace(A,"$1")+b:b.charAt(0)==="/"?N?b:V.replace(k,"$1")+b:V+b}const h={exec:function(){}};function ee(V){let b=1,N,m;for(;b{let B=!1,de=R;for(;--de>=0&&_[de]==="\\";)B=!B;return B?"|":" |"}),m=N.split(/ \|/);let v=0;if(m.length>b)m.splice(b);else for(;m.length20?(H.b.warn("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:tt,analysis:Dt,standard_answers:Ze,is_ordered:gt}):(H.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},Ct=function(){Ue(""),ht(""),Lt([]),Nt(!1)},an=function(Ze,rn,sn){var Xe=Ht.slice();if(rn&&Xe.splice(Ze,rn),sn)for(var bn=0;bn1&&d.a.createElement("span",null,d.a.createElement(_e.a,{checked:gt,onChange:function(Ze){return Nt(Ze.target.checked)},className:"".concat(C.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),d.a.createElement("span",{className:"".concat(C.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:C.a.titleWrap},d.a.createElement("span",{className:C.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Dt,onChange:function(Ze){return ht(Ze)}}))},me=Object(R.a)(function(Be){var D=Be.loading,I=Be.globalSetting;return{globalSetting:I,loading:D.effects}},null,null,{forwardRef:!0})(Object(j.forwardRef)(De)),te=l("7Kak"),ye=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"],he=function(D,I){var w=D.globalSetting,p=D.loading,g=D.editData,E=D.dispatch,x=D.onRef,Y=x===void 0?function(){}:x,oe=D.isEdit,ue=Object(Ee.a)(D,["globalSetting","loading","editData","dispatch","onRef","isEdit"]),tt=Object(j.useState)(),Ue=Object(ee.a)(tt,2),Pe=Ue[0],vt=Ue[1],Dt=Object(j.useState)(""),ht=Object(ee.a)(Dt,2),Kt=ht[0],Ge=ht[1],Ht=Object(j.useState)(""),Lt=Object(ee.a)(Ht,2),xt=Lt[0],Ft=Lt[1];Object(j.useEffect)(function(){if(!g||!oe)return;Ge(g==null?void 0:g.name),Ft(g==null?void 0:g.analysis);var qe=g==null?void 0:g.choices.find(function(He){return He.is_answer});vt(qe.choice_text==="\u6B63\u786E"?"0":"1")},[g]),Object(j.useImperativeHandle)(I,function(){return{onSave:Rt,Clear:ut}});var Rt=function(){if(!Kt)return H.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!Pe)return H.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;var He=[{choice_text:"\u6B63\u786E",is_answer:Pe==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Pe==="1"?1:0}];return{name:Kt,choices:He,analysis:xt}},ut=function(){Ge(""),Ft(""),vt("")};return d.a.createElement("section",{className:C.a.wrap},d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Kt,onChange:function(He){return Ge(He)}}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:C.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),d.a.createElement(ye.a.Group,{buttonStyle:"solid",value:Pe,onChange:function(He){return vt(He.target.value)}},d.a.createElement(ye.a.Button,{value:"0",className:"".concat(C.a.radio," mr40")},"\u6B63\u786E"),d.a.createElement(ye.a.Button,{value:"1",className:C.a.radio},"\u9519\u8BEF")),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:xt,onChange:function(He){return Ft(He)}}))},je=Object(R.a)(function(Be){var D=Be.loading,I=Be.globalSetting;return{globalSetting:I,loading:D.effects}},null,null,{forwardRef:!0})(Object(j.forwardRef)(he)),Ke=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ve=function(D,I){var w=D.editData,p=D.globalSetting,g=D.loading,E=D.dispatch,x=D.onRef,Y=x===void 0?function(){}:x,oe=D.isEdit,ue=Object(Ee.a)(D,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),tt=Object(j.useState)([]),Ue=Object(ee.a)(tt,2),Pe=Ue[0],vt=Ue[1],Dt=Object(j.useState)(),ht=Object(ee.a)(Dt,2),Kt=ht[0],Ge=ht[1],Ht=Object(j.useState)([]),Lt=Object(ee.a)(Ht,2),xt=Lt[0],Ft=Lt[1],Rt=Object(j.useState)(""),ut=Object(ee.a)(Rt,2),qe=ut[0],He=ut[1],gt=Object(j.useState)(""),Nt=Object(ee.a)(gt,2),Mt=Nt[0],en=Nt[1];Object(j.useEffect)(function(){vt(["","","",""])},[]),Object(j.useEffect)(function(){if(!w||!oe)return;He(w==null?void 0:w.name),en(w==null?void 0:w.analysis),vt(w==null?void 0:w.choices.map(function(Ct){return Ct.choice_text}));var Vt=[];w==null||w.choices.map(function(Ct,an){Ct.is_answer&&Vt.push(an)}),Ft(Vt)},[w]),Object(j.useImperativeHandle)(I,function(){return{onSave:Wt,Clear:ft}});var Wt=function(){if(!qe)return H.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var Ct=Pe.findIndex(function(jt){return!jt});if(Ct>-1)return H.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Ke[Ct]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(!xt.length)return H.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(xt.length<2)return H.b.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;var an=Pe.map(function(jt,on){return{choice_text:jt,is_answer:xt.includes(on)?1:0}});return{name:qe,choices:an,analysis:Mt}},ft=function(){vt(["","","",""]),He(""),en(""),Ft("")};return d.a.createElement("section",{className:C.a.wrap},d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:qe,onChange:function(Ct){return He(Ct)}}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:C.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pe.map(function(Vt,Ct){return d.a.createElement("div",{className:C.a.choiceWrap,key:Ct},d.a.createElement(Te.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(C.a.answer," ").concat(xt.includes(Ct)?C.a.activeAnswer:""),onClick:function(){xt.includes(Ct)?Ft(xt.filter(function(jt){return jt!==Ct})):Ft([].concat(Object(ke.a)(xt),[Ct]))}},Ke[Ct])),d.a.createElement("div",{className:C.a.editorWrap},Kt===Ct?d.a.createElement(pe.a,{id:"single-question-option-".concat(Ct),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Vt,onChange:function(jt){Pe[Ct]=jt,vt(Pe)}}):d.a.createElement("div",{className:C.a.htmlWrap,onClick:function(){return Ge(Ct)}},d.a.createElement(v.a,{value:Vt}))),Ct>1&&d.a.createElement(Te.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(C.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){vt(Pe.filter(function(jt,on){return on!==Ct})),xt.includes(Ct)?Ft(xt.filter(function(jt){return jt!==Ct})):Ft([].concat(Object(ke.a)(xt),[Ct]))}})),Ct<7&&Ct===Pe.length-1&&d.a.createElement(Te.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(C.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return vt([].concat(Object(ke.a)(Pe),[""]))}})))}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Mt,onChange:function(Ct){return en(Ct)}}))},Me=Object(R.a)(function(Be){var D=Be.loading,I=Be.globalSetting;return{globalSetting:I,loading:D.effects}},null,null,{forwardRef:!0})(Object(j.forwardRef)(Ve)),Ae=["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(D,I){var w=D.editData,p=D.globalSetting,g=D.loading,E=D.dispatch,x=D.onRef,Y=x===void 0?function(){}:x,oe=D.isEdit,ue=Object(Ee.a)(D,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),tt=Object(j.useState)([]),Ue=Object(ee.a)(tt,2),Pe=Ue[0],vt=Ue[1],Dt=Object(j.useState)(),ht=Object(ee.a)(Dt,2),Kt=ht[0],Ge=ht[1],Ht=Object(j.useState)(),Lt=Object(ee.a)(Ht,2),xt=Lt[0],Ft=Lt[1],Rt=Object(j.useState)(""),ut=Object(ee.a)(Rt,2),qe=ut[0],He=ut[1],gt=Object(j.useState)(""),Nt=Object(ee.a)(gt,2),Mt=Nt[0],en=Nt[1];Object(j.useEffect)(function(){vt(["","","",""])},[]),Object(j.useEffect)(function(){if(!w||!oe)return;He(w==null?void 0:w.name),en(w==null?void 0:w.analysis),vt(w==null?void 0:w.choices.map(function(Vt){return Vt.choice_text})),Ft(w==null?void 0:w.choices.findIndex(function(Vt){return Vt.is_answer}))},[w]),Object(j.useImperativeHandle)(I,function(){return{onSave:Wt,Clear:ft}});var Wt=function(){if(!qe)return H.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;var Ct=Pe.findIndex(function(jt){return!jt});if(Ct>-1)return H.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Ae[Ct]," \u9009\u9879\u7684\u5185\u5BB9")),!1;if(console.log("activeAnswer: ",xt),!(typeof xt=="number"))return H.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 an=Pe.map(function(jt,on){return{choice_text:jt,is_answer:xt===on?1:0}});return{name:qe,choices:an,analysis:Mt}},ft=function(){vt(["","","",""]),He(""),en(""),Ft("")};return d.a.createElement("section",{className:C.a.wrap},d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:qe,onChange:function(Ct){return He(Ct)}}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:C.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pe.map(function(Vt,Ct){return d.a.createElement("div",{className:C.a.choiceWrap,key:Ct},d.a.createElement(Te.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(C.a.answer," ").concat(xt===Ct?C.a.activeAnswer:""),onClick:function(){return Ft(Ct)}},Ae[Ct])),d.a.createElement("div",{className:C.a.editorWrap},Kt===Ct?d.a.createElement(pe.a,{id:"single-question-option-".concat(Ct),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Vt,onChange:function(jt){Pe[Ct]=jt,vt(Pe)}}):d.a.createElement("div",{className:C.a.htmlWrap,onClick:function(){return Ge(Ct)}},d.a.createElement(v.a,{value:Vt}))),Ct>1&&d.a.createElement(Te.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(C.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){vt(Pe.filter(function(jt,on){return on!==Ct})),Ct===xt&&Ft(null)}})),Ct<7&&Ct===Pe.length-1&&d.a.createElement(Te.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(C.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return vt([].concat(Object(ke.a)(Pe),[""]))}})))}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Mt,onChange:function(Ct){return en(Ct)}}))},at=Object(R.a)(function(Be){var D=Be.loading,I=Be.globalSetting;return{globalSetting:I,loading:D.effects}},null,null,{forwardRef:!0})(Object(j.forwardRef)(et)),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"],ot=function(D,I){var w=D.editData,p=D.globalSetting,g=D.loading,E=D.dispatch,x=D.onRef,Y=x===void 0?function(){}:x,oe=D.isEdit,ue=Object(Ee.a)(D,["editData","globalSetting","loading","dispatch","onRef","isEdit"]),tt=Object(j.useState)(""),Ue=Object(ee.a)(tt,2),Pe=Ue[0],vt=Ue[1],Dt=Object(j.useState)(""),ht=Object(ee.a)(Dt,2),Kt=ht[0],Ge=ht[1],Ht=Object(j.useState)(""),Lt=Object(ee.a)(Ht,2),xt=Lt[0],Ft=Lt[1];Object(j.useEffect)(function(){var qe;if(!w||!oe)return;vt(w==null?void 0:w.name),Ge(w==null?void 0:w.analysis),Ft(w==null||((qe=w.answer_texts)===null||qe===void 0)?void 0:qe[0])},[w]),Object(j.useImperativeHandle)(I,function(){return{onSave:Rt,Clear:ut}});var Rt=function(){return Pe?xt?{name:Pe,answer_texts:[xt],analysis:Kt}:(H.b.info("\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848"),!1):(H.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},ut=function(){vt(""),Ge(""),Ft("")};return d.a.createElement("section",{className:C.a.wrap},d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(pe.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pe,onChange:function(He){return vt(He)}}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),d.a.createElement(pe.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:xt,onChange:function(He){return Ft(He)}}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Kt,onChange:function(He){return Ge(He)}}))},wt=Object(R.a)(function(Be){var D=Be.loading,I=Be.globalSetting;return{globalSetting:I,loading:D.effects}},null,null,{forwardRef:!0})(Object(j.forwardRef)(ot)),bt=l("k1fw"),dt=["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(D,I){var w=D.globalSetting,p=D.loading,g=D.dispatch,E=D.editData,x=D.onRef,Y=x===void 0?function(){}:x,oe=D.isEdit,ue=Object(Ee.a)(D,["globalSetting","loading","dispatch","editData","onRef","isEdit"]),tt=Object(j.useState)(""),Ue=Object(ee.a)(tt,2),Pe=Ue[0],vt=Ue[1],Dt=Object(j.useState)([]),ht=Object(ee.a)(Dt,2),Kt=ht[0],Ge=ht[1];console.log(Kt),Object(j.useEffect)(function(){var Rt;if(!E||!oe)return;vt(E==null?void 0:E.name);var ut=E==null||((Rt=E.sub_item_banks)===null||Rt===void 0)?void 0:Rt.map(function(qe){var He,gt,Nt;return Object(bt.a)(Object(bt.a)({},qe),{},{id:qe.id,open:!1,qusList:qe==null||((He=qe.choices)===null||He===void 0)?void 0:He.map(function(Mt){return Mt.choice_text}),activeQusEditor:null,qusAnswer:(gt=[qe==null||((Nt=qe.choices)===null||Nt===void 0)?void 0:Nt.findIndex(function(Mt){return Mt.is_answer})])===null||gt===void 0?void 0:gt.filter(function(Mt){return Mt!==-1})})});Ge(ut)},[E]),Object(j.useImperativeHandle)(I,function(){return{onSave:Ht,Clear:Lt}});var Ht=function(){if(!Pe)return H.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(Kt.length===0)return H.b.info("\u8BF7\u60A8\u6DFB\u52A0\u5C0F\u9898"),!1;for(var ut=0;ut-1)return H.b.info("\u8BF7\u5148\u8F93\u5165\u7B2C".concat(ut+1,"\u5C0F\u9898").concat(dt[gt],"\u9009\u9879\u7684\u5185\u5BB9")),!1;if(!(He!=null&&He.qusAnswer.length))return H.b.info("\u8BF7\u8BBE\u7F6E\u7B2C".concat(ut+1,"\u5C0F\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E")),!1}var Nt=Kt.map(function(Mt){return{id:Mt.id>1?Mt.id:null,name:Mt.name,item_type:Mt.item_type,analysis:Mt.analysis,choices:Mt.qusList.map(function(en,Wt){return{choice_text:en,is_answer:Mt.qusAnswer[0]===Wt?1:0}})}});return{name:Pe,sub_item_banks:Nt}},Lt=function(){vt(""),Ge([])},xt=function(){var ut={id:Math.random(),item_type:"SINGLE",open:!1,name:"",qusList:["","","",""],activeQusEditor:null,qusAnswer:[],analysis:""};Ge(Kt.concat(ut))},Ft=function(ut,qe,He){var gt=Object(T.cloneDeep)(Kt);if(ut==="open"&&(gt[qe].open=!gt[qe].open),ut==="delete"&>.splice(qe,1),ut==="value"&&(gt[qe].name=He),ut==="answer"&&(gt[qe].qusAnswer=[He]),ut==="edit"&&(gt[qe].activeQusEditor=He),ut==="details"&&(gt[qe].qusList[gt[qe].activeQusEditor]=He),ut==="addQus"&&(gt[qe].qusList=gt[qe].qusList.concat("")),ut==="deleteQus"){var Nt;gt[qe].qusList=gt[qe].qusList.filter(function(Mt,en){return en!==He}),gt[qe].qusAnswer=(Nt=gt[qe].qusAnswer)===null||Nt===void 0?void 0:Nt.filter(function(Mt){return Mt!==He})}ut==="analysis"&&(gt[qe].analysis=He),Ge(gt)};return d.a.createElement("section",{className:C.a.wrap},d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u9898\u5E72\uFF1A")),d.a.createElement(pe.a,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pe,onChange:function(ut){return vt(ut)}}),Kt==null?void 0:Kt.map(function(Rt,ut){var qe;return d.a.createElement("div",{className:C.a.fold,key:Rt.id},d.a.createElement("div",{onClick:function(){return Ft("open",ut)},className:C.a.head},d.a.createElement("i",{className:"iconfont icon-sanjiaoxing",style:{transform:Rt.open?"initial":"rotate(270deg) translate(2px, 4px)"}}),d.a.createElement("span",null,"\u7B2C",ut+1,"\u5C0F\u9898\uFF08\u5355\u9009\u9898\uFF09"),d.a.createElement("b",{style:{visibility:"hidden"},onClick:function(gt){gt.stopPropagation(),Ft("delete",ut)},className:"iconfont icon-shanchu8"})),d.a.createElement("div",{className:"mb10",style:{display:Rt.open?"block":"none"}},d.a.createElement(pe.a,{watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Rt==null?void 0:Rt.name,onChange:function(gt){return Ft("value",ut,gt)}}),d.a.createElement("p",{className:C.a.titleWrap},d.a.createElement("span",{className:C.a.required},"*"),d.a.createElement("span",{className:C.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",d.a.createElement("span",{className:C.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Rt==null||((qe=Rt.qusList)===null||qe===void 0)?void 0:qe.map(function(He,gt){var Nt,Mt;return d.a.createElement("div",{className:C.a.choiceWrap,key:gt},d.a.createElement(Te.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},d.a.createElement("div",{className:"".concat(C.a.answer," ").concat(Rt!=null&&(Nt=Rt.qusAnswer)!==null&&Nt!==void 0&&Nt.includes(gt)?C.a.activeAnswer:""),onClick:function(){return Ft("answer",ut,gt)}},dt[gt])),d.a.createElement("div",{className:C.a.editorWrap},(Rt==null?void 0:Rt.activeQusEditor)===gt?d.a.createElement(pe.a,{id:"single-question-option-".concat(gt),watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:He,onChange:function(Wt){return Ft("details",ut,Wt)}}):d.a.createElement("div",{className:C.a.htmlWrap,onClick:function(){return Ft("edit",ut,gt)}},d.a.createElement(v.a,{value:He}))),gt>1&&d.a.createElement(Te.a,{title:"\u5220\u9664"},d.a.createElement("i",{className:"".concat(C.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return Ft("deleteQus",ut,gt)}})),gt<7&>===(Rt==null||((Mt=Rt.qusList)===null||Mt===void 0)?void 0:Mt.length)-1&&d.a.createElement(Te.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},d.a.createElement("i",{className:"".concat(C.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return Ft("addQus",ut)}})))}),d.a.createElement("p",{className:"mb10 mt10"},d.a.createElement("span",{className:C.a.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),d.a.createElement(pe.a,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Rt.analysis,onChange:function(gt){return Ft("analysis",ut,gt)}})))}))},Ot=Object(R.a)(function(Be){var D=Be.loading,I=Be.globalSetting;return{globalSetting:I,loading:D.effects}},null,null,{forwardRef:!0})(Object(j.forwardRef)(Re)),yt=function(D){var I,w,p,g,E,x,Y,oe,ue=D.data,tt=D.submit,Ue=D.goBack,Pe=D.loading,vt=D.onTypeScore,Dt=D.editPreview,ht=Dt===void 0?!1:Dt,Kt=D.onSkipExamination,Ge=D.selectValue,Ht=D.onExchange,Lt=Object(j.useRef)(),xt=Object(j.useRef)(Object(T.debounce)(function(){return an()},100,{leading:!0,trailing:!0})),Ft=Object(j.useState)(null),Rt=Object(ee.a)(Ft,2),ut=Rt[0],qe=Rt[1],He=Object(j.useState)(!1),gt=Object(ee.a)(He,2),Nt=gt[0],Mt=gt[1],en=Object(L.i)();Object(j.useEffect)(function(){return window.addEventListener("scroll",xt==null?void 0:xt.current),function(){window.removeEventListener("scroll",xt==null?void 0:xt.current)}},[]),Object(j.useEffect)(function(){Mt(!0)},[]),Object(j.useEffect)(function(){var Fe,ae,Ye,kt,ct=(Fe=document.getElementById("examName"))===null||Fe===void 0||((ae=Fe.getElementsByClassName("ant-pagination-options-quick-jumper"))===null||ae===void 0||((Ye=ae[0])===null||Ye===void 0||((kt=Ye.childNodes)===null||kt===void 0)))?void 0:kt[2];ct&&(ct.nodeValue="\u4EFD")},[ue]);var Wt=function(ae){var Ye=parseInt(ae);return isNaN(Ye)?"":Ye};function ft(){var Fe=0,ae=0,Ye=0;return document.body&&(ae=document.body.scrollTop),document.documentElement&&(Ye=document.documentElement.scrollTop),Fe=ae-Ye>0?ae:Ye,Fe}function Vt(){var Fe=0,ae=0,Ye=0;return document.body&&(ae=document.body.scrollHeight),document.documentElement&&(Ye=document.documentElement.scrollHeight),Fe=ae-Ye>0?ae:Ye,Fe}function Ct(){var Fe=0;return document.compatMode=="CSS1Compat"?Fe=document.documentElement.clientHeight:Fe=document.body.clientHeight,Fe}var an=function(){var ae=document.getElementById("preview_btns"),Ye=document.getElementById("preview_btns_else");ft()+Ct()>=Vt()-68?(ae.style.visibility="hidden",Ye.style.visibility="visible"):(ae.style.visibility="visible",Ye.style.visibility="hidden")},jt=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],on=function(ae){var Ye,kt=[];return d.a.createElement(d.a.Fragment,null,d.a.createElement("aside",{className:b.a.single},ae==null||((Ye=ae.choices)===null||Ye===void 0)?void 0:Ye.map(function(ct,nt){return ct.is_answer&&kt.push(rn[nt]),d.a.createElement("ul",{key:nt},d.a.createElement("li",null,rn[nt],"\u3001"),d.a.createElement("li",null,d.a.createElement(v.a,{value:ct.choice_text})))})),d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",kt.join(""),d.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jt[ae.difficulty])),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(v.a,{value:ae.analysis?ae.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(ae==null?void 0:ae.discipline_name,"/").concat(ae==null?void 0:ae.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ae==null?void 0:ae.tag_discipline_name))))},Cn=function(ae){var Ye,kt=ae==null||((Ye=ae.standard_answer)===null||Ye===void 0)?void 0:Ye.map(function(ct){var nt;return"\u7B54\u6848\uFF08\u586B\u7A7A".concat(ct.position,"\uFF09\uFF1A").concat(ct==null||((nt=ct.answer_text)===null||nt===void 0)?void 0:nt.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",kt),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(v.a,{value:ae.analysis?ae.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(ae==null?void 0:ae.discipline_name,"/").concat(ae==null?void 0:ae.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ae==null?void 0:ae.tag_discipline_name))))},Jt=function(ae){var Ye;return d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",ae==null||((Ye=ae.answer_texts)===null||Ye===void 0)?void 0:Ye[0]),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(v.a,{value:ae.analysis?ae.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(ae==null?void 0:ae.discipline_name,"/").concat(ae==null?void 0:ae.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ae==null?void 0:ae.tag_discipline_name)))},ze=function(ae){var Ye;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(v.a,{value:ae==null||((Ye=ae.program_attr)===null||Ye===void 0)?void 0:Ye.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(ae==null?void 0:ae.discipline_name,"/").concat(ae==null?void 0:ae.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ae==null?void 0:ae.tag_discipline_name)))},Ze=function(ae,Ye){var kt;return d.a.createElement("div",null,ae==null||((kt=ae.sub_item_banks)===null||kt===void 0)?void 0:kt.map(function(ct,nt){var At,tn=[];return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333"}},Ye+1+"."+(nt+1),"\uFF08\u5355\u9009\u9898\uFF09",ct.name),d.a.createElement("aside",{className:b.a.single},ct==null||((At=ct.choices)===null||At===void 0)?void 0:At.map(function(cn,fn){return cn.is_answer&&tn.push(rn[fn]),d.a.createElement("ul",{key:fn},d.a.createElement("li",null,rn[fn],"\u3001"),d.a.createElement("li",null,d.a.createElement(v.a,{value:cn.choice_text})))})),d.a.createElement("div",{className:b.a.analysis},d.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",tn.join(""),d.a.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jt[ct.difficulty])),d.a.createElement("aside",null,d.a.createElement("span",{className:b.a.text},"\u89E3\u6790:"),d.a.createElement(v.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(ae==null?void 0:ae.discipline_name,"/").concat(ae==null?void 0:ae.sub_discipline_name)),d.a.createElement("li",null,d.a.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ae==null?void 0:ae.tag_discipline_name))))}))},rn=["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"],sn=function(ae){console.log("---",ae);var Ye=[];ae.questions.map(function(ct){return ct==null?void 0:ct.sub_item_banks.map(function(nt){Ye.push(nt)})});var kt=0;ae.type==="COMBINATION"?kt=ae.questions_score/Ye.length:kt=ae.questions_score/ae.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,ae==null?void 0:ae.name,(ae==null?void 0:ae.type)==="COMBINATION"&&"\u4E2D\u7684\u6BCF\u5C0F\u9898","\uFF1A"),d.a.createElement(k.a,{min:1,parser:Wt,defaultValue:kt,onChange:function(nt){kt=nt}}),d.a.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var ct=Object(M.a)(q.a.mark(function At(){var tn,cn;return q.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(kt){wn.next=3;break}return H.b.warn("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),wn.abrupt("return",Promise.reject());case 3:ae.type==="COMBINATION"?(tn={type:ae==null?void 0:ae.type,score:kt,scoreTotal:kt*(Ye==null?void 0:Ye.length)},vt(tn)):(cn={type:ae==null?void 0:ae.type,score:kt,scoreTotal:kt*ae.questions_count},vt(cn));case 4:case"end":return wn.stop()}},At)}));function nt(){return ct.apply(this,arguments)}return nt}()})},Xe=function(){var ae="";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:$.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(ne.a,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:ae,onChange:function(kt){ae=kt.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ye=Object(M.a)(q.a.mark(function ct(){var nt,At,tn,cn,fn;return q.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:if(ae){Yn.next=3;break}return H.b.warn("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Yn.abrupt("return",Promise.reject());case 3:return At=[],tn=[],cn=[],ue==null||((nt=ue.questionList)===null||nt===void 0)||nt.forEach(function(yn){var Zn;(Zn=yn.questions)===null||Zn===void 0||Zn.forEach(function(Ua){At.push(Ua.id),tn.push(yn.questions_score/yn.questions_count),yn.type==="COMBINATION"&&cn.push({id:Ua.id,sub_item_bank_ids:Ua.sub_item_banks.map(function(ua){return ua.id})})})}),console.log("-----",cn),fn={item_bank_ids:At,item_bank_scores:tn,name:ae,combination_item_banks:cn},Yn.next=11,tt(fn);case 11:case"end":return Yn.stop()}},ct)}));function kt(){return Ye.apply(this,arguments)}return kt}()})},bn=function(ae,Ye,kt,ct){var nt,At=(nt=ct.questions)===null||nt===void 0?void 0:nt.map(function(cn){return cn.id}),tn=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 cn=Object(M.a)(q.a.mark(function wn(){return q.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return tn.update({cancelButtonProps:{disabled:!0}}),yn.next=3,Ht({single_question_id:ae,seleted_item_bank_ids:At},{type:Ye,index:kt});case 3:tn.update({cancelButtonProps:{disabled:!1}}),H.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898");case 5:case"end":return yn.stop()}},wn)}));function fn(){return cn.apply(this,arguments)}return fn}()})},Mn=function(ae){var Ye,kt=(Ye=ae.questions)===null||Ye===void 0?void 0:Ye.map(function(At){return At.id}),ct=ae.name,nt=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 At=Object(M.a)(q.a.mark(function cn(){return q.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return nt.update({cancelButtonProps:{disabled:!0}}),wn.next=3,Ht({seleted_item_bank_ids:kt},{type:ae.type});case 3:nt.update({cancelButtonProps:{disabled:!1}}),H.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210".concat(ct,"\u8BD5\u9898"));case 5:case"end":return wn.stop()}},cn)}));function tn(){return At.apply(this,arguments)}return tn}()})},Ut=function(){var ae=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 Ye=Object(M.a)(q.a.mark(function ct(){return q.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ae.update({cancelButtonProps:{disabled:!0}}),At.next=3,Ht();case 3:ae.update({cancelButtonProps:{disabled:!1}}),H.b.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898");case 5:case"end":return At.stop()}},ct)}));function kt(){return Ye.apply(this,arguments)}return kt}()})},Un=function(ae){console.log(ae,"key"),Kt(ae-1)},pa=function(){return d.a.createElement(d.a.Fragment,null,d.a.createElement(S.a,{color:"#55575D",overlayClassName:b.a.popover,visible:Nt,getPopupContainer:function(Ye){return Ye==null?void 0:Ye.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 Mt(!0)},onMouseLeave:function(){return Mt(!1)},onClick:function(){Xe()}},"\u4FDD\u5B58")),d.a.createElement(W.a,{onClick:function(){document.body.scrollIntoView(),Ue()}},"\u8FD4\u56DE"),d.a.createElement(W.a,{loading:Pe,onClick:function(){return tt()},type:"primary"},"\u63D0\u4EA4"))},kn=function(){var ae;return d.a.createElement(d.a.Fragment,null,d.a.createElement(W.a,{onClick:Ue},"\u8FD4\u56DE"),Ge>0&&d.a.createElement(W.a,{onClick:function(){return Un(Ge)},type:"primary"},"\u4E0A\u4E00\u4EFD"),Ge<(ue==null||((ae=ue.exam)===null||ae===void 0)?void 0:ae.total_num)-1&&d.a.createElement(W.a,{onClick:function(){return Un(Ge+2)}},"\u4E0B\u4E00\u4EFD"))},Pn=function(ae,Ye){if(console.log(ae,222),Ye==="SINGLE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(at,{ref:Lt,editData:ae,isEdit:!0}),d.a.createElement(ce.a,null));if(Ye==="MULTIPLE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Me,{ref:Lt,editData:ae,isEdit:!0}),d.a.createElement(ce.a,null));if(Ye==="JUDGMENT")return d.a.createElement(d.a.Fragment,null,d.a.createElement(je,{ref:Lt,editData:ae,isEdit:!0}),d.a.createElement(ce.a,null));if(Ye==="COMPLETION")return d.a.createElement(d.a.Fragment,null,d.a.createElement(me,{ref:Lt,editData:ae,isEdit:!0}),d.a.createElement(ce.a,null));if(Ye==="SUBJECTIVE")return d.a.createElement(d.a.Fragment,null,d.a.createElement(wt,{ref:Lt,editData:ae,isEdit:!0}),d.a.createElement(ce.a,null));if(Ye==="COMBINATION")return d.a.createElement(d.a.Fragment,null,d.a.createElement(Ot,{ref:Lt,editData:ae,isEdit:!0}),d.a.createElement(ce.a,null));if(Ye==="PROGRAM"){var kt;R.d.push("/problems/".concat(ae==null||((kt=ae.program_attr)===null||kt===void 0)?void 0:kt.identifier,"/edit?type=exercises&express_id=").concat(en.categoryId,"&question_id=").concat(ae==null?void 0:ae.id,"&score=").concat(ae==null?void 0:ae.score,"&callback_url=").concat(location.pathname,"&select=").concat(Ge,"&exercise=true"))}},ma=function(){var Fe=Object(M.a)(q.a.mark(function ae(Ye,kt){var ct,nt,At,tn,cn,fn,wn,Yn,yn,Zn;return q.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:return ua.next=2,(ct=Lt.current)===null||ct===void 0?void 0:ct.onSave();case 2:if(nt=ua.sent,nt){ua.next=5;break}return ua.abrupt("return");case 5:return At={question_score:kt.score,analysis:nt.analysis},console.log(nt,"editorData"),(Ye==="SINGLE"||Ye==="MULTIPLE"||Ye==="JUDGMENT")&&(cn=[],fn=[],At.question_type=Ye==="JUDGMENT"?2:1,At.question_title=nt==null?void 0:nt.name,nt==null||((tn=nt.choices)===null||tn===void 0)||tn.forEach(function(Kn,Ia){cn.push(Kn.choice_text),Kn!=null&&Kn.is_answer&&fn.push(Ia+1)}),At.question_choices=cn,At.standard_answers=fn),Ye==="COMPLETION"&&(At.is_ordered=nt.is_ordered,At.question_title=nt==null?void 0:nt.name,At.question_type=3,Yn=[],nt==null||((wn=nt.standard_answers)===null||wn===void 0)||wn.forEach(function(Kn,Ia){Yn.push({choice_id:Kn.position,answer_text:Kn.answer_text})}),At.standard_answers=Yn),Ye==="SUBJECTIVE"&&(At.question_title=nt==null?void 0:nt.name,At.question_type=3,At.standard_answers=nt==null?void 0:nt.answer_texts),Ye==="COMBINATION"&&(At.question_title=nt==null?void 0:nt.name,At.question_type=7,At.sub_questions=nt==null||((yn=nt.sub_item_banks)===null||yn===void 0)?void 0:yn.map(function(Kn,Ia){return{id:Kn.id,question_title:Kn.name,question_type:1,question_choices:Kn.choices.map(function(va){return va.choice_text}),standard_answers:[Kn.choices.findIndex(function(va){return va.is_answer})+1],analysis:Kn.analysis}}),delete At.analysis),ua.next=13,Object(_.a)("/api/exercise_questions/".concat(kt.id,".json"),{method:"put",body:At});case 13:Zn=ua.sent,(Zn==null?void 0:Zn.status)===0&&(H.b.success("\u7F16\u8F91\u6210\u529F"),Un(Ge+1)),qe(null);case 16:case"end":return ua.stop()}},ae)}));return function(Ye,kt){return Fe.apply(this,arguments)}}(),It=function(){for(var ae=[],Ye=0;Ye<(ue==null||((kt=ue.exam)===null||kt===void 0)?void 0:kt.total_num);Ye++){var kt;ae.push({})}return ae};console.log(It(),"data");var be=ue==null||((I=ue.questionList)===null||I===void 0)?void 0:I.reduce(function(Fe,ae){return Fe+ae.questions_score},0),St=ht&&(ue==null||((w=ue.exam)===null||w===void 0)?void 0:w.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(ae){var Ye=document.getElementById("id_left_preview");Ye.style.overflowY="auto"},onMouseLeave:function(ae){var Ye=document.getElementById("id_left_preview");Ye.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:de.a}),d.a.createElement("span",null,"\u9898\u6570(\u9053)"),d.a.createElement("aside",null,ue==null?void 0:ue.all_questions_count)),d.a.createElement("div",{className:"mr30 ml30"},d.a.createElement("img",{src:Ce.a}),d.a.createElement("span",null,"\u603B\u5206(\u5206)"),d.a.createElement("aside",null,be)),d.a.createElement("div",null,d.a.createElement("img",{src:m.a}),d.a.createElement("span",null,"\u65F6\u957F(\u5206)"),d.a.createElement("aside",null,ue==null||((p=ue.exam)===null||p===void 0)?void 0:p.time))),ue==null||((g=ue.questionList)===null||g===void 0)?void 0:g.map(function(Fe,ae){var Ye;return d.a.createElement("div",{className:b.a.list,key:ae},d.a.createElement("div",{className:b.a.name},d.a.createElement("b",null),d.a.createElement("span",null,Fe.name)),d.a.createElement("aside",null,d.a.createElement("div",null,"\u5171",d.a.createElement("span",{className:b.a.b},Fe.questions_count),"\u9898 ",d.a.createElement("span",{className:b.a.l},"|"),"\u5171",d.a.createElement("span",{className:b.a.r},Fe.questions_score),"\u5206"),d.a.createElement("div",{className:b.a.answerSheet},Fe==null||((Ye=Fe.questions)===null||Ye===void 0)?void 0:Ye.map(function(kt,ct){return d.a.createElement("div",{onClick:function(){var At="Anchor_".concat(kt.id),tn=document.getElementById(At);tn&&setTimeout(function(){return tn.scrollIntoView({block:"center",behavior:"smooth"})})},key:kt.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(Te.a,{title:ue==null||((E=ue.exam)===null||E===void 0)?void 0:E.name,getPopupContainer:function(ae){return ae.parentNode}},d.a.createElement("span",{className:b.a.t},ue==null||((x=ue.exam)===null||x===void 0)?void 0:x.name))),ht?d.a.createElement(Oe.a,{showTotal:function(ae){return d.a.createElement("span",{style:{color:"#656F87",fontSize:14}},"\u5171\u8BA1",d.a.createElement("span",{className:"c-light-primary"},ae),"\u4EFD\u8BD5\u5377")},total:ue==null||((Y=ue.exam)===null||Y===void 0)?void 0:Y.total_num,pageSize:1,current:Ge+1,showSizeChanger:!1,onChange:Un,showQuickJumper:!0,hideOnSinglePage:!1}):d.a.createElement(W.a,{onClick:Ut,type:"primary"},"\u968F\u673A\u66F4\u6362")),d.a.createElement("div",{className:b.a.topWarp},ue==null||((oe=ue.questionList)===null||oe===void 0)?void 0:oe.map(function(Fe,ae){var Ye,kt;return d.a.createElement(d.a.Fragment,{key:ae},d.a.createElement("div",{className:b.a.head,style:ae===0?{border:0,marginTop:-16}:{}},d.a.createElement("div",{className:b.a.name},d.a.createElement("b",null),d.a.createElement("span",null,Fe.name)),d.a.createElement("div",{className:b.a.so},"\u5171",d.a.createElement("span",{className:b.a.b},Fe.questions_count," "),"\u9898 ",Fe.type==="COMBINATION"&&"\uFF08\u5305\u542B".concat(Fe==null||((Ye=Fe.questions)===null||Ye===void 0)?void 0:Ye.map(function(ct){var nt;return ct==null||((nt=ct.sub_item_banks)===null||nt===void 0)?void 0:nt.length}).reduce(function(ct,nt){return ct+nt}),"\u5C0F\u9898\uFF09"),d.a.createElement("span",{className:b.a.l},"|"),"\u5171",d.a.createElement("span",{className:b.a.r},Fe.questions_score),"\u5206"),!ht&&d.a.createElement("div",{className:b.a.btn},d.a.createElement(W.a,{onClick:function(){sn(Fe)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),d.a.createElement(W.a,{onClick:function(){return Mn(Fe)},type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),Fe==null||((kt=Fe.questions)===null||kt===void 0)?void 0:kt.map(function(ct,nt){return ut===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 ma(Fe==null?void 0:Fe.type,ct)},type:"primary"},"\u4FDD\u5B58")),Pn(ct,Fe.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(v.a,{style:{paddingRight:10},className:b.a.titleHtml,value:nt+1+"\u3001"+"".concat((ct==null?void 0:ct.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+ct.name}),ht&&d.a.createElement(W.a,{disabled:St,onClick:function(){if(ut){H.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:St,onClick:function(){return bn(ct.id,Fe.type,nt,Fe)},type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Fe.type==="SINGLE"||Fe.type==="JUDGMENT"||Fe.type==="MULTIPLE")&&on(ct),Fe.type==="COMPLETION"&&Cn(ct),Fe.type==="SUBJECTIVE"&&Jt(ct),Fe.type==="PROGRAM"&&ze(ct),Fe.type==="COMBINATION"&&Ze(ct,nt),d.a.createElement("div",null))}))})),d.a.createElement("div",{className:b.a.btnsElse,id:"preview_btns_else"},ht?kn():pa()),d.a.createElement("div",{className:b.a.btnsWrap,id:"preview_btns"},d.a.createElement("div",{className:b.a.btns},ht?kn():pa()))))},Le=We.a=yt},sboe:function(Je,We,l){"use strict";l.d(We,"a",function(){return ie});var G=l("q1tI"),Oe=l.n(G),ie=G.createContext(null)},tmPe:function(Je,We,l){Je.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(Je,We,l){Je.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wMS7:function(Je,We,l){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(G,Oe){Je.exports=Oe()})(this,function(){"use strict";function G(me){if(Array.isArray(me)){for(var te=0,ye=Array(me.length);te1?ye-1:0),he=1;he/gm),_e=K(/^data-[\-\w.\u00B7-\uFFFF]/),ke=K(/^aria-[\-\w]+$/),Ee=K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pe=K(/^(?:\w+script|data):/i),X=K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(me){return typeof me}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me};function Z(me){if(Array.isArray(me)){for(var te=0,ye=Array(me.length);te0&&arguments[0]!==void 0?arguments[0]:O(),te=function(be){return re(be)};if(te.version="2.0.15",te.removed=[],!me||!me.document||me.document.nodeType!==9)return te.isSupported=!1,te;var ye=me.document,ve=!1,he=me.document,je=me.DocumentFragment,Ke=me.HTMLTemplateElement,Ve=me.Node,Me=me.NodeFilter,Ae=me.NamedNodeMap,et=Ae===void 0?me.NamedNodeMap||me.MozNamedAttrMap:Ae,at=me.Text,pt=me.Comment,ot=me.DOMParser,wt=me.trustedTypes;if(typeof Ke=="function"){var bt=he.createElement("template");bt.content&&bt.content.ownerDocument&&(he=bt.content.ownerDocument)}var dt=C(wt,ye),Re=dt&&Mt?dt.createHTML(""):"",Ot=he,yt=Ot.implementation,Le=Ot.createNodeIterator,Be=Ot.getElementsByTagName,D=Ot.createDocumentFragment,I=ye.importNode,w=v(he).documentMode?he.documentMode:{},p={};te.isSupported=yt&&typeof yt.createHTMLDocument!="undefined"&&w!==9;var g=$,E=xe,x=_e,Y=ke,oe=pe,ue=X,tt=Ee,Ue=null,Pe=m({},[].concat(Z(L),Z(R),Z(_),Z(B),Z(de))),vt=null,Dt=m({},[].concat(Z(Q),Z(Ce),Z(T),Z(c))),ht=null,Kt=null,Ge=!0,Ht=!0,Lt=!1,xt=!1,Ft=!1,Rt=!1,ut=!1,qe=!1,He=!1,gt=!1,Nt=!1,Mt=!1,en=!0,Wt=!0,ft=!1,Vt={},Ct=m({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),an=null,jt=m({},["audio","video","img","source","image","track"]),on=null,Cn=m({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Jt=null,ze=he.createElement("form"),Ze=function(be){if(Jt&&Jt===be)return;(!be||(typeof be=="undefined"?"undefined":P(be))!=="object")&&(be={}),be=v(be),Ue="ALLOWED_TAGS"in be?m({},be.ALLOWED_TAGS):Pe,vt="ALLOWED_ATTR"in be?m({},be.ALLOWED_ATTR):Dt,on="ADD_URI_SAFE_ATTR"in be?m(v(Cn),be.ADD_URI_SAFE_ATTR):Cn,an="ADD_DATA_URI_TAGS"in be?m(v(jt),be.ADD_DATA_URI_TAGS):jt,ht="FORBID_TAGS"in be?m({},be.FORBID_TAGS):{},Kt="FORBID_ATTR"in be?m({},be.FORBID_ATTR):{},Vt="USE_PROFILES"in be?be.USE_PROFILES:!1,Ge=be.ALLOW_ARIA_ATTR!==!1,Ht=be.ALLOW_DATA_ATTR!==!1,Lt=be.ALLOW_UNKNOWN_PROTOCOLS||!1,xt=be.SAFE_FOR_JQUERY||!1,Ft=be.SAFE_FOR_TEMPLATES||!1,Rt=be.WHOLE_DOCUMENT||!1,He=be.RETURN_DOM||!1,gt=be.RETURN_DOM_FRAGMENT||!1,Nt=be.RETURN_DOM_IMPORT||!1,Mt=be.RETURN_TRUSTED_TYPE||!1,qe=be.FORCE_BODY||!1,en=be.SANITIZE_DOM!==!1,Wt=be.KEEP_CONTENT!==!1,ft=be.IN_PLACE||!1,tt=be.ALLOWED_URI_REGEXP||tt,Ft&&(Ht=!1),gt&&(He=!0),Vt&&(Ue=m({},[].concat(Z(de))),vt=[],Vt.html===!0&&(m(Ue,L),m(vt,Q)),Vt.svg===!0&&(m(Ue,R),m(vt,Ce),m(vt,c)),Vt.svgFilters===!0&&(m(Ue,_),m(vt,Ce),m(vt,c)),Vt.mathMl===!0&&(m(Ue,B),m(vt,T),m(vt,c))),be.ADD_TAGS&&(Ue===Pe&&(Ue=v(Ue)),m(Ue,be.ADD_TAGS)),be.ADD_ATTR&&(vt===Dt&&(vt=v(vt)),m(vt,be.ADD_ATTR)),be.ADD_URI_SAFE_ATTR&&m(on,be.ADD_URI_SAFE_ATTR),Wt&&(Ue["#text"]=!0),Rt&&m(Ue,["html","head","body"]),Ue.table&&(m(Ue,["tbody"]),delete ht.tbody),ce&&ce(be),Jt=be},rn=function(be){A(te.removed,{element:be});try{be.parentNode.removeChild(be)}catch(St){be.outerHTML=Re}},sn=function(be,St){try{A(te.removed,{attribute:St.getAttributeNode(be),from:St})}catch(Fe){A(te.removed,{attribute:null,from:St})}St.removeAttribute(be)},Xe=function(be){var St=void 0,Fe=void 0;if(qe)be=""+be;else{var ae=h(be,/^[\r\n\t ]+/);Fe=ae&&ae[0]}var Ye=dt?dt.createHTML(be):be;try{St=new ot().parseFromString(Ye,"text/html")}catch(nt){}if(ve&&m(ht,["title"]),!St||!St.documentElement){St=yt.createHTMLDocument("");var kt=St,ct=kt.body;ct.parentNode.removeChild(ct.parentNode.firstElementChild),ct.outerHTML=Ye}return be&&Fe&&St.body.insertBefore(he.createTextNode(Fe),St.body.childNodes[0]||null),Be.call(St,Rt?"html":"body")[0]};te.isSupported&&function(){try{var It=Xe("</title><img>");j(/<\/title/,It.querySelector("title").innerHTML)&&(ve=!0)}catch(be){}}();var bn=function(be){return Le.call(be.ownerDocument||be,be,Me.SHOW_ELEMENT|Me.SHOW_COMMENT|Me.SHOW_TEXT,function(){return Me.FILTER_ACCEPT},!1)},Mn=function(be){return be instanceof at||be instanceof pt?!1:typeof be.nodeName!="string"||typeof be.textContent!="string"||typeof be.removeChild!="function"||!(be.attributes instanceof et)||typeof be.removeAttribute!="function"||typeof be.setAttribute!="function"||typeof be.namespaceURI!="string"},Ut=function(be){return(typeof Ve=="undefined"?"undefined":P(Ve))==="object"?be instanceof Ve:be&&(typeof be=="undefined"?"undefined":P(be))==="object"&&typeof be.nodeType=="number"&&typeof be.nodeName=="string"},Un=function(be,St,Fe){if(!p[be])return;ne(p[be],function(ae){ae.call(te,St,Fe,Jt)})},pa=function(be){var St=void 0;if(Un("beforeSanitizeElements",be,null),Mn(be))return rn(be),!0;if(h(be.nodeName,/[\u0080-\uFFFF]/))return rn(be),!0;var Fe=F(be.nodeName);if(Un("uponSanitizeElement",be,{tagName:Fe,allowedTags:Ue}),(Fe==="svg"||Fe==="math")&&be.querySelectorAll("p, br").length!==0)return rn(be),!0;if(!Ue[Fe]||ht[Fe]){if(Wt&&!Ct[Fe]&&typeof be.insertAdjacentHTML=="function")try{var ae=be.innerHTML;be.insertAdjacentHTML("AfterEnd",dt?dt.createHTML(ae):ae)}catch(Ye){}return rn(be),!0}return Fe==="noscript"&&j(/<\/noscript/i,be.innerHTML)||Fe==="noembed"&&j(/<\/noembed/i,be.innerHTML)?(rn(be),!0):(xt&&!Ut(be.firstElementChild)&&(!Ut(be.content)||!Ut(be.content.firstElementChild))&&j(/</g,be.textContent)&&(A(te.removed,{element:be.cloneNode()}),be.innerHTML?be.innerHTML=ee(be.innerHTML,/</g,"<"):be.innerHTML=ee(be.textContent,/</g,"<")),Ft&&be.nodeType===3&&(St=be.textContent,St=ee(St,g," "),St=ee(St,E," "),be.textContent!==St&&(A(te.removed,{element:be.cloneNode()}),be.textContent=St)),Un("afterSanitizeElements",be,null),!1)},kn=function(be,St,Fe){if(en&&(St==="id"||St==="name")&&(Fe in he||Fe in ze))return!1;if(!(Ht&&j(x,St))){if(!(Ge&&j(Y,St))){if(!vt[St]||Kt[St])return!1;if(!on[St]){if(!j(tt,ee(Fe,ue,""))){if(!((St==="src"||St==="xlink:href"||St==="href")&&be!=="script"&&ge(Fe,"data:")===0&&an[be])){if(!(Lt&&!j(oe,ee(Fe,ue,"")))){if(Fe)return!1}}}}}}return!0},Pn=function(be){var St=void 0,Fe=void 0,ae=void 0,Ye=void 0,kt=void 0;Un("beforeSanitizeAttributes",be,null);var ct=be.attributes;if(!ct)return;var nt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};for(kt=ct.length;kt--;){St=ct[kt];var At=St,tn=At.name,cn=At.namespaceURI;if(Fe=q(St.value),ae=F(tn),nt.attrName=ae,nt.attrValue=Fe,nt.keepAttr=!0,nt.forceKeepAttr=void 0,Un("uponSanitizeAttribute",be,nt),Fe=nt.attrValue,nt.forceKeepAttr)continue;if(ae==="name"&&be.nodeName==="IMG"&&ct.id)Ye=ct.id,ct=k(ct,[]),sn("id",be),sn(tn,be),le(ct,Ye)>kt&&be.setAttribute("id",Ye.value);else{if(be.nodeName==="INPUT"&&ae==="type"&&Fe==="file"&&nt.keepAttr&&(vt[ae]||!Kt[ae]))continue;tn==="id"&&be.setAttribute(tn,""),sn(tn,be)}if(!nt.keepAttr)continue;if(xt&&j(/\/>/i,Fe)){sn(tn,be);continue}if(j(/svg|math/i,be.namespaceURI)&&j(d("</("+H(Se(Ct),"|")+")","i"),Fe)){sn(tn,be);continue}Ft&&(Fe=ee(Fe,g," "),Fe=ee(Fe,E," "));var fn=be.nodeName.toLowerCase();if(!kn(fn,ae,Fe))continue;try{cn?be.setAttributeNS(cn,tn,Fe):be.setAttribute(tn,Fe),M(te.removed)}catch(wn){}}Un("afterSanitizeAttributes",be,null)},ma=function It(be){var St=void 0,Fe=bn(be);for(Un("beforeSanitizeShadowDOM",be,null);St=Fe.nextNode();){if(Un("uponSanitizeShadowNode",St,null),pa(St))continue;St.content instanceof je&&It(St.content),Pn(St)}Un("afterSanitizeShadowDOM",be,null)};return te.sanitize=function(It,be){var St=void 0,Fe=void 0,ae=void 0,Ye=void 0,kt=void 0;if(It||(It="<!-->"),typeof It!="string"&&!Ut(It)){if(typeof It.toString!="function")throw V("toString is not a function");if(It=It.toString(),typeof It!="string")throw V("dirty is not a string, aborting")}if(!te.isSupported){if(P(me.toStaticHTML)==="object"||typeof me.toStaticHTML=="function"){if(typeof It=="string")return me.toStaticHTML(It);if(Ut(It))return me.toStaticHTML(It.outerHTML)}return It}if(ut||Ze(be),te.removed=[],typeof It=="string"&&(ft=!1),!ft)if(It instanceof Ve)St=Xe("<!-->"),Fe=St.ownerDocument.importNode(It,!0),Fe.nodeType===1&&Fe.nodeName==="BODY"||Fe.nodeName==="HTML"?St=Fe:St.appendChild(Fe);else{if(!He&&!Ft&&!Rt&&It.indexOf("<")===-1)return dt&&Mt?dt.createHTML(It):It;if(St=Xe(It),!St)return He?null:Re}St&&qe&&rn(St.firstChild);for(var ct=bn(ft?It:St);ae=ct.nextNode();){if(ae.nodeType===3&&ae===Ye)continue;if(pa(ae))continue;ae.content instanceof je&&ma(ae.content),Pn(ae),Ye=ae}if(Ye=null,ft)return It;if(He){if(gt)for(kt=D.call(St.ownerDocument);St.firstChild;)kt.appendChild(St.firstChild);else kt=St;return Nt&&(kt=I.call(ye,kt,!0)),kt}var nt=Rt?St.outerHTML:St.innerHTML;return Ft&&(nt=ee(nt,g," "),nt=ee(nt,E," ")),dt&&Mt?dt.createHTML(nt):nt},te.setConfig=function(It){Ze(It),ut=!0},te.clearConfig=function(){Jt=null,ut=!1},te.isValidAttribute=function(It,be,St){Jt||Ze({});var Fe=F(It),ae=F(be);return kn(Fe,ae,St)},te.addHook=function(It,be){if(typeof be!="function")return;p[It]=p[It]||[],A(p[It],be)},te.removeHook=function(It){p[It]&&M(p[It])},te.removeHooks=function(It){p[It]&&(p[It]=[])},te.removeAllHooks=function(){p={}},te}var De=re();return De})}}]);