(window.webpackJsonp=window.webpackJsonp||[]).push([[157,6,7],{"+NIl":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){"use strict";j.defineMode("stex",function(ve,te){"use strict";function we(ie,U){ie.cmdState.push(U)}function be(ie){return ie.cmdState.length>0?ie.cmdState[ie.cmdState.length-1]:null}function $(ie){var U=ie.cmdState.pop();U&&U.closeBracket()}function P(ie){for(var U=ie.cmdState,F=U.length-1;F>=0;F--){var I=U[F];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function M(ie,U,F){return function(){this.name=ie,this.bracketNo=0,this.style=U,this.styles=F,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var b={};b.importmodule=M("importmodule","tag",["string","builtin"]),b.documentclass=M("documentclass","tag",["","atom"]),b.usepackage=M("usepackage","tag",["atom"]),b.begin=M("begin","tag",["atom"]),b.end=M("end","tag",["atom"]),b.label=M("label","tag",["atom"]),b.ref=M("ref","tag",["atom"]),b.eqref=M("eqref","tag",["atom"]),b.cite=M("cite","tag",["atom"]),b.bibitem=M("bibitem","tag",["atom"]),b.Bibitem=M("Bibitem","tag",["atom"]),b.RBibitem=M("RBibitem","tag",["atom"]),b.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function H(ie,U){ie.f=U}function K(ie,U){var F;if(ie.match(/^\\[a-zA-Z@]+/)){var I=ie.current().slice(1);return F=b.hasOwnProperty(I)?b[I]:b.DEFAULT,F=new F,we(U,F),H(U,Ee),F.style}if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/\\]/))return"tag";if(ie.match("\\["))return H(U,function(ae,Re){return re(ae,Re,"\\]")}),"keyword";if(ie.match("\\("))return H(U,function(ae,Re){return re(ae,Re,"\\)")}),"keyword";if(ie.match("$$"))return H(U,function(ae,Re){return re(ae,Re,"$$")}),"keyword";if(ie.match("$"))return H(U,function(ae,Re){return re(ae,Re,"$")}),"keyword";var se=ie.next();if(se=="%")return ie.skipToEnd(),"comment";if(se=="}"||se=="]"){if(F=be(U),F)F.closeBracket(se),H(U,Ee);else return"error";return"bracket"}else return se=="{"||se=="["?(F=b.DEFAULT,F=new F,we(U,F),"bracket"):/\d/.test(se)?(ie.eatWhile(/[\w.%]/),"atom"):(ie.eatWhile(/[\w\-_]/),F=P(U),F.name=="begin"&&(F.argument=ie.current()),F.styleIdentifier())}function re(ie,U,F){if(ie.eatSpace())return null;if(F&&ie.match(F))return H(U,K),"keyword";if(ie.match(/^\\[a-zA-Z@]+/))return"tag";if(ie.match(/^[a-zA-Z]+/))return"variable-2";if(ie.match(/^\\[$&%#{}_]/))return"tag";if(ie.match(/^\\[,;!\/]/))return"tag";if(ie.match(/^[\^_&]/))return"tag";if(ie.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ie.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=ie.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?(ie.skipToEnd(),"comment"):"error"}function Ee(ie,U){var F=ie.peek(),I;return F=="{"||F=="["?(I=be(U),I.openBracket(F),ie.eat(F),H(U,K),"bracket"):/[ \t\r]/.test(F)?(ie.eat(F),null):(H(U,K),$(U),K(ie,U))}return{startState:function(){var ie=te.inMathMode?function(U,F){return re(U,F)}:K;return{cmdState:[],f:ie}},copyState:function(ie){return{cmdState:ie.cmdState.slice(),f:ie.f}},token:function(ie,U){return U.f(ie,U)},blankLine:function(ie){ie.f=K,ie.cmdState.length=0},lineComment:"%"}}),j.defineMIME("text/x-stex","stex"),j.defineMIME("text/x-latex","stex")})},"19Vz":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){j.defineOption("placeholder","",function(M,b,H){var K=H&&H!=j.Init;if(b&&!K)M.on("blur",be),M.on("change",$),M.on("swapDoc",$),j.on(M.getInputField(),"compositionupdate",M.state.placeholderCompose=function(){we(M)}),$(M);else if(!b&&K){M.off("blur",be),M.off("change",$),M.off("swapDoc",$),j.off(M.getInputField(),"compositionupdate",M.state.placeholderCompose),ve(M);var re=M.getWrapperElement();re.className=re.className.replace(" CodeMirror-empty","")}b&&!M.hasFocus()&&be(M)});function ve(M){M.state.placeholder&&(M.state.placeholder.parentNode.removeChild(M.state.placeholder),M.state.placeholder=null)}function te(M){ve(M);var b=M.state.placeholder=document.createElement("pre");b.style.cssText="height: 0; overflow: visible",b.style.direction=M.getOption("direction"),b.className="CodeMirror-placeholder CodeMirror-line-like";var H=M.getOption("placeholder");typeof H=="string"&&(H=document.createTextNode(H)),b.appendChild(H),M.display.lineSpace.insertBefore(b,M.display.lineSpace.firstChild)}function we(M){setTimeout(function(){var b=!1,H=M.getInputField();H.nodeName=="TEXTAREA"?b=!H.value:M.lineCount()==1&&(b=!/[^\u200b]/.test(H.querySelector(".CodeMirror-line").textContent)),b?te(M):ve(M)},20)}function be(M){P(M)&&te(M)}function $(M){var b=M.getWrapperElement(),H=P(M);b.className=b.className.replace(" CodeMirror-empty","")+(H?" CodeMirror-empty":""),H?te(M):ve(M)}function P(M){return M.lineCount()===1&&M.getLine(0)===""}})},"1eCo":function(ot,ze,x){(function(j){j(x("VrN/"))})(function(j){"use strict";var ve={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},te={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};j.defineMode("xml",function(we,be){var $=we.indentUnit,P={},M=be.htmlMode?ve:te;for(var b in M)P[b]=M[b];for(var b in be)P[b]=be[b];var H,K;function re(y,z){function W(N){return z.tokenize=N,N(y,z)}var w=y.next();if(w=="<")return y.eat("!")?y.eat("[")?y.match("CDATA[")?W(U("atom","]]>")):null:y.match("--")?W(U("comment","-->")):y.match("DOCTYPE",!0,!0)?(y.eatWhile(/[\w\._\-]/),W(F(1))):null:y.eat("?")?(y.eatWhile(/[\w\._\-]/),z.tokenize=U("meta","?>"),"meta"):(H=y.eat("/")?"closeTag":"openTag",z.tokenize=Ee,"tag bracket");if(w=="&"){var Y;return y.eat("#")?y.eat("x")?Y=y.eatWhile(/[a-fA-F\d]/)&&y.eat(";"):Y=y.eatWhile(/[\d]/)&&y.eat(";"):Y=y.eatWhile(/[\w\.\-:]/)&&y.eat(";"),Y?"atom":"error"}else return y.eatWhile(/[^&<]/),null}re.isInText=!0;function Ee(y,z){var W=y.next();if(W==">"||W=="/"&&y.eat(">"))return z.tokenize=re,H=W==">"?"endTag":"selfcloseTag","tag bracket";if(W=="=")return H="equals",null;if(W=="<"){z.tokenize=re,z.state=Re,z.tagName=z.tagStart=null;var w=z.tokenize(y,z);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(W)?(z.tokenize=ie(W),z.stringStartCol=y.column(),z.tokenize(y,z)):(y.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ie(y){var z=function(W,w){for(;!W.eol();)if(W.next()==y){w.tokenize=Ee;break}return"string"};return z.isInAttribute=!0,z}function U(y,z){return function(W,w){for(;!W.eol();){if(W.match(z)){w.tokenize=re;break}W.next()}return y}}function F(y){return function(z,W){for(var w;(w=z.next())!=null;){if(w=="<")return W.tokenize=F(y+1),W.tokenize(z,W);if(w==">")if(y==1){W.tokenize=re;break}else return W.tokenize=F(y-1),W.tokenize(z,W)}return"meta"}}function I(y,z,W){this.prev=y.context,this.tagName=z,this.indent=y.indented,this.startOfLine=W,(P.doNotIndent.hasOwnProperty(z)||y.context&&y.context.noIndent)&&(this.noIndent=!0)}function se(y){y.context&&(y.context=y.context.prev)}function ae(y,z){for(var W;;){if(!y.context)return;if(W=y.context.tagName,!P.contextGrabbers.hasOwnProperty(W)||!P.contextGrabbers[W].hasOwnProperty(z))return;se(y)}}function Re(y,z,W){return y=="openTag"?(W.tagStart=z.column(),He):y=="closeTag"?de:Re}function He(y,z,W){return y=="word"?(W.tagName=z.current(),K="tag",me):P.allowMissingTagName&&y=="endTag"?(K="tag bracket",me(y,z,W)):(K="error",He)}function de(y,z,W){if(y=="word"){var w=z.current();return W.context&&W.context.tagName!=w&&P.implicitlyClosed.hasOwnProperty(W.context.tagName)&&se(W),W.context&&W.context.tagName==w||P.matchClosing===!1?(K="tag",Oe):(K="tag error",De)}else return P.allowMissingTagName&&y=="endTag"?(K="tag bracket",Oe(y,z,W)):(K="error",De)}function Oe(y,z,W){return y!="endTag"?(K="error",Oe):(se(W),Re)}function De(y,z,W){return K="error",Oe(y,z,W)}function me(y,z,W){if(y=="word")return K="attribute",ge;if(y=="endTag"||y=="selfcloseTag"){var w=W.tagName,Y=W.tagStart;return W.tagName=W.tagStart=null,y=="selfcloseTag"||P.autoSelfClosers.hasOwnProperty(w)?ae(W,w):(ae(W,w),W.context=new I(W,w,Y==W.indented)),Re}return K="error",me}function ge(y,z,W){return y=="equals"?le:(P.allowMissing||(K="error"),me(y,z,W))}function le(y,z,W){return y=="string"?Z:y=="word"&&P.allowUnquoted?(K="string",me):(K="error",me(y,z,W))}function Z(y,z,W){return y=="string"?Z:me(y,z,W)}return{startState:function(y){var z={tokenize:re,state:Re,indented:y||0,tagName:null,tagStart:null,context:null};return y!=null&&(z.baseIndent=y),z},token:function(y,z){if(!z.tagName&&y.sol()&&(z.indented=y.indentation()),y.eatSpace())return null;H=null;var W=z.tokenize(y,z);return(W||H)&&W!="comment"&&(K=null,z.state=z.state(H||W,y,z),K&&(W=K=="error"?W+" error":K)),W},indent:function(y,z,W){var w=y.context;if(y.tokenize.isInAttribute)return y.tagStart==y.indented?y.stringStartCol+1:y.indented+$;if(w&&w.noIndent)return j.Pass;if(y.tokenize!=Ee&&y.tokenize!=re)return W?W.match(/^(\s*)/)[0].length:0;if(y.tagName)return P.multilineTagIndentPastTag!==!1?y.tagStart+y.tagName.length+2:y.tagStart+$*(P.multilineTagIndentFactor||1);if(P.alignCDATA&&/$/,blockCommentStart:"",configuration:P.htmlMode?"html":"xml",helperType:P.htmlMode?"html":"xml",skipAttribute:function(y){y.state==le&&(y.state=me)},xmlCurrentTag:function(y){return y.tagName?{name:y.tagName,close:y.type=="closeTag"}:null},xmlCurrentContext:function(y){for(var z=[],W=y.context;W;W=W.prev)W.tagName&&z.push(W.tagName);return z.reverse()}}}),j.defineMIME("text/xml","xml"),j.defineMIME("application/xml","xml"),j.mimeModes.hasOwnProperty("text/html")||j.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"55Ip":function(ot,ze,x){"use strict";x.d(ze,"a",function(){return ae}),x.d(ze,"b",function(){return me});var j=x("Ty5D"),ve=x("dI71"),te=x("q1tI"),we=x.n(te),be=x("YS25"),$=x("17x9"),P=x.n($),M=x("wx14"),b=x("zLVn"),H=x("9R94"),K=function(le){Object(ve.a)(Z,le);function Z(){for(var z,W=arguments.length,w=new Array(W),Y=0;Y ".concat(p,""],re=new P.a.Renderer,Ee=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ie(){H.length=0,K=["
"]}var U={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function F(p,C,R,q){if(C>=p.length||p[C].level<=R)return C;var ye=p[C];q.push("
"),K.join("")}var se={heading:function(C){var R=Ee.exec(C);if(R)return{type:"heading",raw:R[0],depth:R[1].length,text:R[2]}},fences:function(C){var R=this.rules.block.fences.exec(C);if(R){var q=R[0],ye=b(q,R[3]||""),oe=R[2]?R[2].trim():R[2];if(["latex","katex","math"].indexOf(oe)>=0){var Se=He(),ne=ye;ye=Se,de[Se]={type:"block",expression:ne}}return{type:"code",raw:q,lang:oe,text:ye}}}},ae=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Re=0,He=function(){return"__special_katext_id_".concat(Re++,"__")},de={};function Oe(){return de}function De(){Re=0,de={}}function me(p){return p=p.replace(ae,function(C,R){var q=He();return de[q]={type:"inline",expression:R},q}),p}var ge=re.listitem;re.listitem=function(p){return ge(me(p))};var le=re.paragraph;re.paragraph=function(p){return le(me(p))};var Z=re.tablecell;re.tablecell=function(p,C){return Z(me(p),C)},re.code=function(p,C,R){var q=(C||"").match(/\S*/)[0];return q?["latex","katex","math"].indexOf(q)>=0?""),oe.forEach(function(Se){q.push(Se)}),q.push("
")),q.push("
`):'').concat(R?p:Object(M.escape)(p,!0),`
"},re.heading=function(p,C,R){var q=this.options.headerPrefix+R.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return H.push({anchor:q,level:C,text:p}),"'+(R?p:Object(M.escape)(p,!0))+"]*>/g;function c(p){var C=document.createElement("div");return C.innerHTML=p,C.childNodes.length===0?"":C.childNodes[0].nodeValue}var l=ze.a=function(p){var C=p.value,R=C===void 0?"":C,q=p.className,ye=p.showTextOnly,oe=p.showLines,Se=p.style,ne=Se===void 0?{}:Se,fe=p.stylesPrev,B=fe===void 0?{}:fe,Q=String(R),h=Object(te.useState)(""),T=Object(ve.a)(h,2),v=T[0],ee=T[1],ue=Object(te.useMemo)(function(){try{var Le=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ae=/\"\/api\/attachments\/|\"\/attachments\/download\//g,pe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Q=Q.replace(Le,"("+Y.a.API_SERVER+"/api/attachments/").replace(Ae,'"'+Y.a.API_SERVER+"/api/attachments/").replace(pe,'"'+Y.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Q=Q.replace(new RegExp("(?[TOC]
'+(g?f:Ae(f,!0))+`
`:""+(g?f:Ae(f,!0))+`
`},O.blockquote=function(f){return``+f+``},O.html=function(f){return f},O.heading=function(f,m,g,E){return this.options.headerIds?"
"+f+`
`},O.table=function(f,m){return m&&(m=""+m+""),`"+f+""},O.br=function(){return this.options.xhtml?""+Ve(ce.message+"",!0)+"";throw ce}}Te.options=Te.setOptions=function(_){return nt(Te.defaults,_),rt(Te.defaults),Te},Te.getDefaults=xe,Te.defaults=Je,Te.use=function(_){var O=nt({},_);if(_.renderer&&function(){var f=Te.defaults.renderer||new pe,m=function(V){var ce=f[V];f[V]=function(){for(var Pe=arguments.length,tt=new Array(Pe),ft=0;ft
1&&arguments[1]!==void 0?arguments[1]:1,D=Ce.length,f=0;f1&&arguments[1]!==void 0?arguments[1]:!1;return Object(De.a)(l).map(function(C,R){if(!be.isValidElement(C)||!C.type)return null;var q=C.type.isSelectOptGroup,ye=C.key,oe=C.props,Se=oe.children,ne=Object(P.a)(oe,["children"]);return p||!q?me(C):Object(Oe.a)(Object(Oe.a)({key:"__RC_SELECT_GRP__".concat(ye===null?R:ye,"__"),label:ye},ne),{},{options:ge(Se)})}).filter(function(C){return C})}var le=x("2Qr1"),Z=x("qNPg"),y=x("U8pU"),z=x("Kwbf"),W=x("WKfj");function w(l){var p=l.mode,C=l.options,R=l.children,q=l.backfill,ye=l.allowClear,oe=l.placeholder,Se=l.getInputElement,ne=l.showSearch,fe=l.onSearch,B=l.defaultOpen,Q=l.autoFocus,h=l.labelInValue,T=l.value,v=l.inputValue,ee=l.optionLabelProp,ue=p==="multiple"||p==="tags",G=ne!==void 0?ne:ue||p==="combobox",he=C||ge(R);if(Object(z.a)(p!=="tags"||he.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),p==="tags"||p==="combobox"){var _e=he.some(function(pe){return pe.options?pe.options.some(function(Ce){return typeof("value"in Ce?Ce.value:Ce.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(z.a)(!_e,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(z.a)(p!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(z.a)(p==="combobox"||!q,"`backfill` only works with `combobox` mode."),Object(z.a)(p==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(z.b)(p!=="combobox"||!Se||!ye||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),fe&&!G&&p!=="combobox"&&p!=="tags"&&Object(z.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(z.b)(!B||Q,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),T!=null){var Le=Object(W.d)(T);Object(z.a)(!h||Le.every(function(pe){return Object(y.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(z.a)(!ue||Array.isArray(T),"`value` should be array when `mode` is `multiple` or `tags`")}if(R){var Ae=null;Object(De.a)(R).some(function(pe){if(!be.isValidElement(pe)||!pe.type)return!1;var Ce=pe.type;if(Ce.isSelectOption)return!1;if(Ce.isSelectOptGroup){var Ie=Object(De.a)(pe.props.children).every(function(Ye){return!be.isValidElement(Ye)||!pe.type||Ye.type.isSelectOption?!0:(Ae=Ye.type,!1)});return!Ie}return Ae=Ce,!0}),Ae&&Object(z.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ae.displayName||Ae.name||Ae,"`.")),Object(z.a)(v===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var Y=w,N=Object(Z.a)({prefixCls:"rc-select",components:{optionList:se},convertChildrenToData:ge,flattenOptions:le.d,getLabeledValue:le.e,filterOptions:le.b,isValueDisabled:le.g,findValueOption:le.c,warningProps:Y,fillOptionsWithMissingValue:le.a}),L=function(l){Object(te.a)(C,l);var p=Object(we.a)(C);function C(){var R;return Object(j.a)(this,C),R=p.apply(this,arguments),R.selectRef=be.createRef(),R.focus=function(){R.selectRef.current.focus()},R.blur=function(){R.selectRef.current.blur()},R}return Object(ve.a)(C,[{key:"render",value:function(){return be.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),C}(be.Component);L.Option=Re,L.OptGroup=de;var S=L,c=ze.c=S},M8RZ:function(ot,ze,x){"use strict";x.d(ze,"a",function(){return b});var j=x("fWQN"),ve=x("mtLc"),te=x("yKVA"),we=x("879j"),be=x("q1tI"),$=x.n(be),P=x("i8i4"),M=x.n(P),b=function(H){Object(te.a)(re,H);var K=Object(we.a)(re);function re(Ee){var ie;Object(j.a)(this,re),ie=K.call(this,Ee);var U=window.document;return ie.node=U.createElement("div"),U.body.appendChild(ie.node),ie}return Object(ve.a)(re,[{key:"render",value:function(){var ie=this.props.children;return Object(P.createPortal)(ie,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),re}($.a.Component)},OLES:function(ot,ze,x){"use strict";var j=x("U8pU"),ve=x("VTBJ"),te=x("Ff2n"),we=x("q1tI"),be=x("uciX"),$=x("7ixt"),P=function(Ee){var ie=Ee.overlay,U=Ee.prefixCls,F=Ee.id,I=Ee.overlayInnerStyle;return we.createElement("div",{className:"".concat(U,"-inner"),id:F,role:"tooltip",style:I},typeof ie=="function"?ie():ie)},M=P,b=function(Ee,ie){var U=Ee.overlayClassName,F=Ee.trigger,I=F===void 0?["hover"]:F,se=Ee.mouseEnterDelay,ae=se===void 0?0:se,Re=Ee.mouseLeaveDelay,He=Re===void 0?.1:Re,de=Ee.overlayStyle,Oe=Ee.prefixCls,De=Oe===void 0?"rc-tooltip":Oe,me=Ee.children,ge=Ee.onVisibleChange,le=Ee.afterVisibleChange,Z=Ee.transitionName,y=Ee.animation,z=Ee.placement,W=z===void 0?"right":z,w=Ee.align,Y=w===void 0?{}:w,N=Ee.destroyTooltipOnHide,L=N===void 0?!1:N,S=Ee.defaultVisible,c=Ee.getTooltipContainer,l=Ee.overlayInnerStyle,p=Object(te.a)(Ee,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),C=Object(we.useRef)(null);Object(we.useImperativeHandle)(ie,function(){return C.current});var R=Object(ve.a)({},p);"visible"in Ee&&(R.popupVisible=Ee.visible);var q=function(){var fe=Ee.arrowContent,B=fe===void 0?null:fe,Q=Ee.overlay,h=Ee.id;return[we.createElement("div",{className:"".concat(De,"-arrow"),key:"arrow"},B),we.createElement(M,{key:"content",prefixCls:De,id:h,overlay:Q,overlayInnerStyle:l})]},ye=!1,oe=!1;if(typeof L=="boolean")ye=L;else if(L&&Object(j.a)(L)==="object"){var Se=L.keepParent;ye=Se===!0,oe=Se===!1}return we.createElement(be.a,Object.assign({popupClassName:U,prefixCls:De,popup:q,action:I,builtinPlacements:$.a,popupPlacement:W,ref:C,popupAlign:Y,getPopupContainer:c,onPopupVisibleChange:ge,afterPopupVisibleChange:le,popupTransitionName:Z,popupAnimation:y,defaultPopupVisible:S,destroyPopupOnHide:ye,autoDestroy:oe,mouseLeaveDelay:He,popupStyle:de,mouseEnterDelay:ae},R),me)},H=Object(we.forwardRef)(b),K=ze.a=H},Ot1p:function(ot,ze,x){"use strict";var j=x("2qtc"),ve=x("kLXV"),te=x("rAM+"),we=x("miYZ"),be=x("tsqr"),$=x("tJVT"),P=x("jrin"),M=x("q1tI"),b=x.n(M),H=x("VrN/"),K=x.n(H),re=x("bdgK"),Ee=x("p77/"),ie=x("Bd2K"),U=x("ELLl"),F=x("19Vz"),I=x("lZu9"),se=x("+NIl"),ae=x("kSUc"),Re=x("9Bee"),He=function(_){var O=_.value,D=O===void 0?"":O,f=_.className,m=_.showTextOnly,g=_.showLines,E=_.style,V=E===void 0?{}:E,ce=Object(M.useMemo)(function(){return""},[D]);return b.a.createElement(b.a.Fragment,null,b.a.createElement("div",{dangerouslySetInnerHTML:{__html:ce}}))},de=x("0Owb"),Oe=x("dejd"),De=x("C+DQ"),me=[{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 ge(_){var O=_.onActionCallback,D=_.title,f=_.icon,m=_.actionName,g=_.className,E=g===void 0?"":g,V=_.children;function ce(){O(m)}return b.a.createElement("a",{title:D,className:E,onClick:ce},b.a.createElement("i",{className:"md-iconfont ".concat(f)}),V)}var le=function(_){var O=_.watch,D=_.showNullButton,f=_.onActionCallback,m=_.fullScreen,g=_.insertTemp,E=_.hidetoolBar,V=[].concat(me,[{title:"".concat(O?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(O?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return b.a.createElement("ul",{className:"markdown-toolbar-container"},!E&&V.map(function(ce,Pe){return b.a.createElement("li",{key:Pe},ce.actionName?b.a.createElement(ge,Object(de.a)({},ce,{onActionCallback:f})):b.a.createElement("span",{className:"v-line"}))}),D?b.a.createElement("li",null,b.a.createElement(ge,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:f},b.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,g&&b.a.createElement("li",null,b.a.createElement(ge,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(g),onActionCallback:f},b.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),b.a.createElement("li",{className:"btn-full-screen"},b.a.createElement(ge,{icon:"".concat(m?"icon-shrink":"icon-enlarge"),title:m?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:f})))},Z=x("M8RZ"),y=x("+L6B"),z=x("2/Rp"),W=x("y8nQ"),w=x("Vl3Y"),Y=x("5NDa"),N=x("5rEg"),L={labelCol:{span:4},wrapperCol:{span:20}},S=function(_){var O=_.callback,D=_.onCancel;function f(m){O(m)}return b.a.createElement(w.a,Object(de.a)({},L,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:f}),b.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},b.a.createElement(N.a,null)),b.a.createElement(w.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},b.a.createElement(N.a,null)),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(z.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))},c=x("7ahc"),l=x("HmJG"),p=x("BjJ7"),C=w.a.useForm,R={width:280,marginRight:10},q={labelCol:{span:5},wrapperCol:{span:19}},ye=function(_){var O=_.callback,D=_.onCancel,f=C(),m=Object($.a)(f,1),g=m[0];function E(Pe){O(Pe)}function V(Pe,tt){g.setFieldsValue({src:"/api/attachments/".concat(Pe.id),type:tt.type})}function ce(Pe){var tt=Pe.target.files[0];Se(tt,V)}return b.a.createElement(w.a,Object(de.a)({form:g},q,{className:"upload-image-panel",onFinish:E}),b.a.createElement(w.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},b.a.createElement("div",{className:"flex-container"},b.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},b.a.createElement(N.a,{style:R})),b.a.createElement(oe,{onFileChange:ce}))),b.a.createElement(w.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},b.a.createElement(N.a,{style:{width:264}})),b.a.createElement(w.a.Item,{style:{textAlign:"right"}},b.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(z.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function oe(_){var O=_.onFileChange;return b.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",b.a.createElement("input",{type:"file",onChange:O}))}function Se(_,O){if(!_)throw new String("\u6CA1\u6709\u6587\u4EF6");var D=new FormData;D.append("editormd-image-file",_),D.append("file_param_name","editormd-image-file"),D.append("byxhr","true");var f=new window.XMLHttpRequest;f.withCredentials=!0,f.addEventListener("load",function(m){O(JSON.parse(m.target.responseText),_)},!1),f.addEventListener("error",function(m){console.error(m)},!1),f.open("POST","".concat(p.a,"/api/attachments.json")),f.send(D)}var ne=x("giR+"),fe=x("fyUT"),B=x("7Kak"),Q=x("9yH6"),h=Q.a.Group,T={margin:"0 8px"},v=function(_){var O=_.callback,D=_.onCancel;function f(m){O(m)}return b.a.createElement(w.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:f},b.a.createElement("div",{className:"flex-container"},b.a.createElement("span",{style:T},"\u5355\u5143\u683C\u6570\uFF1A"),b.a.createElement("span",{style:T},"\u884C\u6570"),b.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},b.a.createElement(fe.a,null)),b.a.createElement("span",{style:T},"\u5217\u6570"),b.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},b.a.createElement(fe.a,null))),b.a.createElement("div",{className:"flex-container",style:{marginTop:12}},b.a.createElement("span",{style:T},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),b.a.createElement(w.a.Item,{name:"align"},b.a.createElement(h,null,b.a.createElement(Q.a,{value:"default"},b.a.createElement("i",{className:"fa fa-align-justify"})),b.a.createElement(Q.a,{value:"left"},b.a.createElement("i",{className:"fa fa-align-left"})),b.a.createElement(Q.a,{value:"center"},b.a.createElement("i",{className:"fa fa-align-center"})),b.a.createElement(Q.a,{value:"right"},b.a.createElement("i",{className:"fa fa-align-right"}))))),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(z.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))},ee=x("m3rI"),ue="link",G="upload-image",he="code-block",_e="add-table",Le="------------",Ae={default:Le,left:":".concat(Le),center:":".concat(Le,":"),right:"".concat(Le,":")},pe=x("9VGf"),Ce,Ie;function Ye(){}var Xe=0,Ke=1e4,nt="\u2581",qe=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ve(_){return/^\d+$/.test(_)?"".concat(_,"px"):_}var xe=navigator.platform.toUpperCase().indexOf("MAC")>=0,rt=xe?"Cmd":"Ctrl",Je=(Ce={},Object(P.a)(Ce,rt+"-B","bold"),Object(P.a)(Ce,rt+"-I","italic"),Ce),Te=(Ie={},Object(P.a)(Ie,ue,"\u6DFB\u52A0\u94FE\u63A5"),Object(P.a)(Ie,he,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(P.a)(Ie,G,"\u6DFB\u52A0\u56FE\u7247"),Object(P.a)(Ie,_e,"\u6DFB\u52A0\u8868\u683C"),Ie),Fe=ze.a=function(_){var O=_.defaultValue,D=O===void 0?"":O,f=_.onChange,m=_.width,g=m===void 0?"100%":m,E=_.height,V=E===void 0?400:E,ce=_.miniToolbar,Pe=ce===void 0?!1:ce,tt=_.isFocus,ft=tt===void 0?!1:tt,at=_.watch,Pt=_.insertTemp,pt=_.mode,lt=pt===void 0?"markdown":pt,Bt=_.id,bt=Bt===void 0?"markdown-editor-id":Bt,$t=_.showResizeBar,Wt=$t===void 0?!1:$t,mt=_.noStorage,Cn=mt===void 0?!1:mt,Kn=_.showNullButton,un=Kn===void 0?!1:Kn,kn=_.hidetoolBar,pn=kn===void 0?!1:kn,bi=_.fullScreen,cn=bi===void 0?!1:bi,Vn=_.onBlur,dr=_.onCMBeforeChange,St=_.onFullScreen,Ze=_.className,Sn=Ze===void 0?"":Ze,fr=_.disablePaste,dn=fr===void 0?!1:fr,gt=_.placeholder,_n=gt===void 0?"":gt,Rn=_.values,$n=Rn===void 0?"":Rn,Ne=Object(M.useState)(null),ut=Object($.a)(Ne,2),Ue=ut[0],Ir=ut[1],hr=Object(M.useState)(D),Yn=Object($.a)(hr,2),Jn=Yn[0],st=Yn[1],Zi=Object(M.useState)(at),Fr=Object($.a)(Zi,2),fn=Fr[0],on=Fr[1],yi=Object(M.useState)(cn),Ur=Object($.a)(yi,2),nn=Ur[0],pr=Ur[1],xi=Object(M.useState)(""),mr=Object($.a)(xi,2),Tn=mr[0],On=mr[1],wi=Object(M.useState)(0),Br=Object($.a)(wi,2),Zn=Br[0],Wr=Br[1],Ei=Object(M.useState)(V),hn=Object($.a)(Ei,2),Ci=hn[0],ki=hn[1],gr=Object(M.useState)(!1),Dn=Object($.a)(gr,2),Ia=Dn[0],Hr=Dn[1],qn=Object(M.useRef)(),zr=Object(M.useRef)(),Pn=Object(M.useRef)(),Qn=Object(M.useRef)();Object(M.useEffect)(function(){st($n),Ue==null||Ue.setValue($n)},[$n]),Object(M.useEffect)(function(){St==null||St(nn)},[nn]),Object(M.useEffect)(function(){if(qn.current){var Qe=K.a.fromTextArea(qn.current,{mode:lt,lineNumbers:!Pe,lineWrapping:!0,value:D,autoCloseTags:!0,autoCloseBrackets:!0});ft&&Qe.focus();function ct(dt,xt){if(dn){xt.preventDefault();return}var wt=xt.clipboardData;if(wt){var Ct=wt.types.toString(),Lt=wt.items,_t=["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(Ct==="Files"||wt.types.indexOf("Files")>-1){if(xt.preventDefault(),lt=="stex")return;try{var Xt,mn=Lt[1];((Xt=Lt[0])===null||Xt===void 0?void 0:Xt.kind)==="file"&&(mn=Lt[0]);var kt=mn.getAsFile(),Nn=kt.name.split(".").pop();Se(kt,function(Gt){if(Gt.id){var jn,In,br;(kt==null||((jn=kt.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?Qe.replaceSelection(".concat(Gt.content_type,")")):(kt==null||((In=kt.type)===null||In===void 0)?void 0:In.indexOf("video"))>-1?Qe.replaceSelection('')):(kt==null||((br=kt.type)===null||br===void 0)?void 0:br.indexOf("pdf"))>-1?Qe.replaceSelection('').concat(kt.name,"")):_t.includes(Nn)?Qe.replaceSelection('').concat(kt.name,"")):Qe.replaceSelection("[".concat(kt.name,"](").concat(ee.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})}catch(Gt){be.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Qe.on("paste",ct),Ir(Qe),function(){Qe.off("paste",ct)}}},[]);var Si=Object(M.useCallback)(function(){if(zr.current)try{}catch(Qe){console.log(Qe,"---- to set md editor body height")}},[Ci,zr,nn]);Object(M.useEffect)(function(){function Qe(){var dt=new re.default(function(xt){var wt=Object(te.a)(xt),Ct;try{for(wt.s();!(Ct=wt.n()).done;){var Lt=Ct.value;(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&(Si(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(_t){wt.e(_t)}finally{wt.f()}});return dt.observe(qn.current.parentElement),dt}if(Ue){var ct=Qe();return function(){ct.unobserve(qn.current.parentElement)}}},[Ue,Si]),Object(M.useEffect)(function(){if(Ue){for(var Qe=[],ct=function(){var Lt=xt[dt];wt=Object($.a)(Lt,2);var _t=wt[0],Xt=wt[1],mn=Object(P.a)({},_t,function(){Xr(Xt)});Qe.push(mn),Ue.addKeyMap(mn)},dt=0,xt=Object.entries(Je);dt 0){var Qe=new Date().getTime(),ct=window.sessionStorage.getItem(bt);Qe>=Zn+Ke&&(!ct||ct!==Jn)&&(window.sessionStorage.setItem(bt,Jn),Hr(!0))}},Ke),Object(M.useEffect)(function(){on(at)},[Ue,at]),Object(M.useEffect)(function(){Ue&&(ft&&Ue.focus())},[Ue,ft]),Object(M.useEffect)(function(){if(fn&&Ue){var Qe=Ue.getScrollerElement();function ct(dt){var xt=dt.target;if(Qn.current){var wt=xt.scrollTop/xt.scrollHeight;Qn.current.scrollTop=Qn.current.scrollHeight*wt}}return Qe.addEventListener("scroll",ct),function(){Qe.removeEventListener("scroll",ct)}}},[Ue,fn]),Object(M.useEffect)(function(){if(Ue&&dr){function Qe(ct,dt){dr(ct,dt)}return Ue.on("beforeChange",Qe),function(){Ue.off("beforeChange",Qe)}}},[Ue,dr]),Object(M.useEffect)(function(){if(Ue&&Vn){function Qe(){Vn(Ue.getValue())}return Ue.on("blur",Qe),function(){Ue.off("blur",Qe)}}},[Ue,Vn]),Object(M.useEffect)(function(){if(Ue){function Qe(ct){var dt=ct.getValue();st(dt),Wr(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),f&&f(dt)}return Ue.on("change",Qe),function(){Ue.off("change",Qe)}}},[Ue,f]),Object(M.useEffect)(function(){Ue&&(D==null?(Ue.setValue(""),st("")):D!==Ue.getValue()&&(Ue.setValue(D),st(D),Ue.setCursor(Ue.lineCount(),0)))},[Ue,D]);var Xr=Object(M.useCallback)(function(Qe){var ct=Ue.getCursor(),dt=Ue.getSelection(),xt=dt.split(` `);switch(Qe){case"bold":return Ue.replaceSelection("**"+dt+"**"),dt===""&&Ue.setCursor(ct.line,ct.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+dt+"*"),dt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+dt+"`"),dt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+dt+"$$`"),dt===""&&Ue.setCursor(ct.line,ct.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+dt+"\n```"),Ue.setCursor(ct.line+1,dt.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`
`),Ue.focus();case"list-ul":return dt===""?Ue.replaceSelection("- "+dt):Ue.replaceSelection(xt.map(function(wt){return wt===""?"":"- ".concat(wt)}).join(` `)),Ue.focus();case"list-ol":return dt===""?Ue.replaceSelection("1. "+dt):Ue.replaceSelection(xt.map(function(wt,Ct){return wt===""?"":"".concat(Ct+1,". ").concat(wt)}).join(` `)),Ue.focus();case"add-null-ch":return dt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.replaceSelection(nt),Ue.focus();case"inster-template-1":return dt===""&&Ue.setCursor(ct.line,ct.ch),Ue.replaceSelection(qe),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return on(!fn),Ue.focus();case"trigger-full-screen":return pr(!nn),Ue.focus();case ue:On(ue);return;case he:On(he);return;case G:On(G);return;case _e:On(_e);return;default:throw new Error}},[Ue,fn,nn]),er=Object(M.useCallback)(function(Qe){On("");switch(Tn){case ue:var ct=Qe.title,dt=Qe.link;return Ue.replaceSelection("[".concat(ct,"](").concat(dt,")")),Ue.focus();case he:var xt=Qe.language,wt=Qe.content;return Ue.replaceSelection(["```"+xt,wt,"```"].join(` `)),Ue.focus();case G:var Ct=Qe.src,Lt=Qe.alt;return Ue.replaceSelection(".concat(Ct,' "').concat(Lt,'" )')),Ue.focus();case _e:for(var _t=Qe.row,Xt=Qe.col,mn=Qe.align,kt=` `,Nn=0;Nn<_t;Nn++){for(var Gt=[],jn=[],In=0;In300&&(_t=300);var Xt=V+_t+"px";ki(Xt)}}return Qe.addEventListener("mousedown",xt),document.addEventListener("mousemove",Ct),document.addEventListener("mouseup",wt),function(){Qe.removeEventListener("mousedown",xt),document.removeEventListener("mousemove",Ct),document.removeEventListener("mouseup",wt)}}},[Ue,Pn]),Object(M.useEffect)(function(){ki(V)},[V]);var Gr=Ve(g),_i=Ve(Ci),Ti={width:Gr,height:_i},Kr=Object(M.useMemo)(function(){if(Zn){var Qe=new Date(Zn),ct=Qe.getHours(),dt=Qe.getMinutes(),xt=Qe.getSeconds();return ct=ct<10?"0"+ct:ct,dt=dt<10?"0"+dt:dt,xt=xt<10?"0"+xt:xt,"".concat(ct,":").concat(dt,":").concat(xt)}return 0},[Zn]);function Fa(){window.sessionStorage.removeItem(bt),Hr(!1),Wr(0)}function qi(){Hr(!1),Wr(0),Ue.setValue(window.sessionStorage.getItem(bt))}return b.a.createElement(M.Fragment,null,b.a.createElement("div",{className:"markdown-editor-wrapper",ref:zr},b.a.createElement("div",{className:"markdown-editor-container ".concat(Sn," ").concat(fn?"on-preview":""," ").concat(Pe?"mini":""," ").concat(nn?"full-screen":""),style:Ti},b.a.createElement(le,{insertTemp:Pt,watch:fn,fullScreen:nn,showNullButton:un,onActionCallback:Xr,hidetoolBar:pn}),b.a.createElement("div",{className:"markdown-editor-body"},b.a.createElement("div",{className:"codemirror-container"},b.a.createElement("textarea",{ref:qn,placeholder:_n})),fn?b.a.createElement("div",{ref:Qn,className:"preview-container"},lt==="stex"&&b.a.createElement(He,{value:Jn}),lt!=="stex"&&b.a.createElement(Re.a,{value:Jn})):null))),Wt?b.a.createElement("a",{ref:Pn,className:"editor-resize"}):null,b.a.createElement(Z.a,null,Te[Tn]?b.a.createElement(ve.a,{centered:!0,title:Te[Tn],visible:!0,onCancel:yn,footer:null},vr):null))}},SJMd:function(ot,ze){/** * @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 x,j,ve,te=!1,we,be;window.PR_SHOULD_USE_CONTINUATION=!0;var $,P;(function(){var M=window,b=["break,continue,do,else,for,if,return,while"],H=[b,"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"],K=[H,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],re=[K,"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"],Ee=[K,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],ie=[K,"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"],U="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",F=[K,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",se=[b,"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"],ae=[b,"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"],Re=[b,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],He=[re,ie,Ee,F,I,se,ae,Re],de=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Oe="str",De="kwd",me="com",ge="typ",le="lit",Z="pun",y="pln",z="tag",W="dec",w="src",Y="atn",N="atv",L="nocode",S="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(G){for(var he=0,_e=!1,Le=!1,Ae=0,pe=G.length;Ae 122||(f<65||D>90||rt.push([Math.max(65,D)|32,Math.min(f,90)|32]),f<97||D>122||rt.push([Math.max(97,D)&~32,Math.min(f,122)&~32]))}}rt.sort(function(V,ce){return V[0]-ce[0]||ce[1]-V[1]});for(var m=[],g=[],Fe=0;Fe E[0]&&(E[1]+1>E[0]&&Te.push("-"),Te.push(Xe(E[1])))}return Te.push("]"),Te.join("")}function nt(Ve){for(var xe=Ve.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),rt=xe.length,Je=[],Te=0,Fe=0;Te