(window.webpackJsonp=window.webpackJsonp||[]).push([[177,6,7,8,11],{"+NIl":function(ht,$e,ue){(function(fe){fe(ue("VrN/"))})(function(fe){"use strict";fe.defineMode("stex",function(Z,O){"use strict";function J(L,A){L.cmdState.push(A)}function U(L){return L.cmdState.length>0?L.cmdState[L.cmdState.length-1]:null}function k(L){var A=L.cmdState.pop();A&&A.closeBracket()}function G(L){for(var A=L.cmdState,S=A.length-1;S>=0;S--){var d=A[S];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function H(L,A,S){return function(){this.name=L,this.bracketNo=0,this.style=A,this.styles=S,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var F={};F.importmodule=H("importmodule","tag",["string","builtin"]),F.documentclass=H("documentclass","tag",["","atom"]),F.usepackage=H("usepackage","tag",["atom"]),F.begin=H("begin","tag",["atom"]),F.end=H("end","tag",["atom"]),F.label=H("label","tag",["atom"]),F.ref=H("ref","tag",["atom"]),F.eqref=H("eqref","tag",["atom"]),F.cite=H("cite","tag",["atom"]),F.bibitem=H("bibitem","tag",["atom"]),F.Bibitem=H("Bibitem","tag",["atom"]),F.RBibitem=H("RBibitem","tag",["atom"]),F.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function R(L,A){L.f=A}function E(L,A){var S;if(L.match(/^\\[a-zA-Z@]+/)){var d=L.current().slice(1);return S=F.hasOwnProperty(d)?F[d]:F.DEFAULT,S=new S,J(A,S),R(A,M),S.style}if(L.match(/^\\[$&%#{}_]/))return"tag";if(L.match(/^\\[,;!\/\\]/))return"tag";if(L.match("\\["))return R(A,function(l,u){return w(l,u,"\\]")}),"keyword";if(L.match("\\("))return R(A,function(l,u){return w(l,u,"\\)")}),"keyword";if(L.match("$$"))return R(A,function(l,u){return w(l,u,"$$")}),"keyword";if(L.match("$"))return R(A,function(l,u){return w(l,u,"$")}),"keyword";var o=L.next();if(o=="%")return L.skipToEnd(),"comment";if(o=="}"||o=="]"){if(S=U(A),S)S.closeBracket(o),R(A,M);else return"error";return"bracket"}else return o=="{"||o=="["?(S=F.DEFAULT,S=new S,J(A,S),"bracket"):/\d/.test(o)?(L.eatWhile(/[\w.%]/),"atom"):(L.eatWhile(/[\w\-_]/),S=G(A),S.name=="begin"&&(S.argument=L.current()),S.styleIdentifier())}function w(L,A,S){if(L.eatSpace())return null;if(S&&L.match(S))return R(A,E),"keyword";if(L.match(/^\\[a-zA-Z@]+/))return"tag";if(L.match(/^[a-zA-Z]+/))return"variable-2";if(L.match(/^\\[$&%#{}_]/))return"tag";if(L.match(/^\\[,;!\/]/))return"tag";if(L.match(/^[\^_&]/))return"tag";if(L.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(L.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=L.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(L.skipToEnd(),"comment"):"error"}function M(L,A){var S=L.peek(),d;return S=="{"||S=="["?(d=U(A),d.openBracket(S),L.eat(S),R(A,E),"bracket"):/[ \t\r]/.test(S)?(L.eat(S),null):(R(A,E),k(A),E(L,A))}return{startState:function(){var L=O.inMathMode?function(A,S){return w(A,S)}:E;return{cmdState:[],f:L}},copyState:function(L){return{cmdState:L.cmdState.slice(),f:L.f}},token:function(L,A){return A.f(L,A)},blankLine:function(L){L.f=E,L.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},"19Vz":function(ht,$e,ue){(function(fe){fe(ue("VrN/"))})(function(fe){fe.defineOption("placeholder","",function(H,F,R){var E=R&&R!=fe.Init;if(F&&!E)H.on("blur",U),H.on("change",k),H.on("swapDoc",k),fe.on(H.getInputField(),"compositionupdate",H.state.placeholderCompose=function(){J(H)}),k(H);else if(!F&&E){H.off("blur",U),H.off("change",k),H.off("swapDoc",k),fe.off(H.getInputField(),"compositionupdate",H.state.placeholderCompose),Z(H);var w=H.getWrapperElement();w.className=w.className.replace(" CodeMirror-empty","")}F&&!H.hasFocus()&&U(H)});function Z(H){H.state.placeholder&&(H.state.placeholder.parentNode.removeChild(H.state.placeholder),H.state.placeholder=null)}function O(H){Z(H);var F=H.state.placeholder=document.createElement("pre");F.style.cssText="height: 0; overflow: visible",F.style.direction=H.getOption("direction"),F.className="CodeMirror-placeholder CodeMirror-line-like";var R=H.getOption("placeholder");typeof R=="string"&&(R=document.createTextNode(R)),F.appendChild(R),H.display.lineSpace.insertBefore(F,H.display.lineSpace.firstChild)}function J(H){setTimeout(function(){var F=!1,R=H.getInputField();R.nodeName=="TEXTAREA"?F=!R.value:H.lineCount()==1&&(F=!/[^\u200b]/.test(R.querySelector(".CodeMirror-line").textContent)),F?O(H):Z(H)},20)}function U(H){G(H)&&O(H)}function k(H){var F=H.getWrapperElement(),R=G(H);F.className=F.className.replace(" CodeMirror-empty","")+(R?" CodeMirror-empty":""),R?O(H):Z(H)}function G(H){return H.lineCount()===1&&H.getLine(0)===""}})},"1eCo":function(ht,$e,ue){(function(fe){fe(ue("VrN/"))})(function(fe){"use strict";var Z={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(J,U){var k=J.indentUnit,G={},H=U.htmlMode?Z:O;for(var F in H)G[F]=H[F];for(var F in U)G[F]=U[F];var R,E;function w(a,y){function g(j){return y.tokenize=j,j(a,y)}var b=a.next();if(b=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?g(A("atom","]]>")):null:a.match("--")?g(A("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),g(S(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),y.tokenize=A("meta","?>"),"meta"):(R=a.eat("/")?"closeTag":"openTag",y.tokenize=M,"tag bracket");if(b=="&"){var N;return a.eat("#")?a.eat("x")?N=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):N=a.eatWhile(/[\d]/)&&a.eat(";"):N=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),N?"atom":"error"}else return a.eatWhile(/[^&<]/),null}w.isInText=!0;function M(a,y){var g=a.next();if(g==">"||g=="/"&&a.eat(">"))return y.tokenize=w,R=g==">"?"endTag":"selfcloseTag","tag bracket";if(g=="=")return R="equals",null;if(g=="<"){y.tokenize=w,y.state=u,y.tagName=y.tagStart=null;var b=y.tokenize(a,y);return b?b+" tag error":"tag error"}else return/[\'\"]/.test(g)?(y.tokenize=L(g),y.stringStartCol=a.column(),y.tokenize(a,y)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function L(a){var y=function(g,b){for(;!g.eol();)if(g.next()==a){b.tokenize=M;break}return"string"};return y.isInAttribute=!0,y}function A(a,y){return function(g,b){for(;!g.eol();){if(g.match(y)){b.tokenize=w;break}g.next()}return a}}function S(a){return function(y,g){for(var b;(b=y.next())!=null;){if(b=="<")return g.tokenize=S(a+1),g.tokenize(y,g);if(b==">")if(a==1){g.tokenize=w;break}else return g.tokenize=S(a-1),g.tokenize(y,g)}return"meta"}}function d(a,y,g){this.prev=a.context,this.tagName=y,this.indent=a.indented,this.startOfLine=g,(G.doNotIndent.hasOwnProperty(y)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function l(a,y){for(var g;;){if(!a.context)return;if(g=a.context.tagName,!G.contextGrabbers.hasOwnProperty(g)||!G.contextGrabbers[g].hasOwnProperty(y))return;o(a)}}function u(a,y,g){return a=="openTag"?(g.tagStart=y.column(),C):a=="closeTag"?v:u}function C(a,y,g){return a=="word"?(g.tagName=y.current(),E="tag",x):G.allowMissingTagName&&a=="endTag"?(E="tag bracket",x(a,y,g)):(E="error",C)}function v(a,y,g){if(a=="word"){var b=y.current();return g.context&&g.context.tagName!=b&&G.implicitlyClosed.hasOwnProperty(g.context.tagName)&&o(g),g.context&&g.context.tagName==b||G.matchClosing===!1?(E="tag",m):(E="tag error",_)}else return G.allowMissingTagName&&a=="endTag"?(E="tag bracket",m(a,y,g)):(E="error",_)}function m(a,y,g){return a!="endTag"?(E="error",m):(o(g),u)}function _(a,y,g){return E="error",m(a,y,g)}function x(a,y,g){if(a=="word")return E="attribute",p;if(a=="endTag"||a=="selfcloseTag"){var b=g.tagName,N=g.tagStart;return g.tagName=g.tagStart=null,a=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(b)?l(g,b):(l(g,b),g.context=new d(g,b,N==g.indented)),u}return E="error",x}function p(a,y,g){return a=="equals"?c:(G.allowMissing||(E="error"),x(a,y,g))}function c(a,y,g){return a=="string"?h:a=="word"&&G.allowUnquoted?(E="string",x):(E="error",x(a,y,g))}function h(a,y,g){return a=="string"?h:x(a,y,g)}return{startState:function(a){var y={tokenize:w,state:u,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(y.baseIndent=a),y},token:function(a,y){if(!y.tagName&&a.sol()&&(y.indented=a.indentation()),a.eatSpace())return null;R=null;var g=y.tokenize(a,y);return(g||R)&&g!="comment"&&(E=null,y.state=y.state(R||g,a,y),E&&(g=E=="error"?g+" error":E)),g},indent:function(a,y,g){var b=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+k;if(b&&b.noIndent)return fe.Pass;if(a.tokenize!=M&&a.tokenize!=w)return g?g.match(/^(\s*)/)[0].length:0;if(a.tagName)return G.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+k*(G.multilineTagIndentFactor||1);if(G.alignCDATA&&/$/,blockCommentStart:"",configuration:G.htmlMode?"html":"xml",helperType:G.htmlMode?"html":"xml",skipAttribute:function(a){a.state==c&&(a.state=x)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var y=[],g=a.context;g;g=g.prev)g.tagName&&y.push(g.tagName);return y.reverse()}}}),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"500L":function(ht,$e,ue){"use strict";ue.d($e,"a",function(){return v});var fe=ue("+L6B"),Z=ue("2/Rp"),O=ue("2qtc"),J=ue("kLXV"),U=ue("9og8"),k=ue("k1fw"),G=ue("miYZ"),H=ue("tsqr"),F=ue("oBTY"),R=ue("tJVT"),E=ue("DZo9"),w=ue("8z0m"),M=ue("WmNS"),L=ue.n(M),A=ue("q1tI"),S=ue.n(A),d=ue("m3rI"),o=ue("wzkS"),l=ue("y5JW"),u=ue("LtfV"),C=w.a.Dragger;function v(m){var _=[];return m&&m.length>0&&(_=m.map(function(x){return{uid:x.id,id:x.id,name:x.title+l.c+x.filesize,url:x.url,filesize:x.filesize,status:"done",response:{id:x.id}}})),_}$e.b=function(m){var _=m.value,x=m.onChange,p=m.action,c=m.className,h=m.maxSize,a=h===void 0?150:h,y=m.title,g=y===void 0?"\u4E0A\u4F20\u9644\u4EF6":y,b=m.showRemoveModal,N=b===void 0?!1:b,j=m.accept,K=j===void 0?"":j,V=m.additionalText,P=m.isDragger,I=m.number,$=I===void 0?1e3:I,ne=m.aloneClear,de=ne===void 0?!1:ne,me=Object(A.useState)(!1),De=Object(R.a)(me,2),xe=De[0],Le=De[1],Te=Object(A.useState)(_||[]),Se=Object(R.a)(Te,2),ve=Se[0],z=Se[1];Object(A.useEffect)(function(){_&&(z(Object(F.a)(_)),$===(_==null?void 0:_.length)&&Le(!0))},[_]);var s=function(){setTimeout(function(){ve.pop(),z(Object(F.a)(ve))},500)},f={multiple:!0,disabled:xe,accept:K,withCredentials:!0,fileList:ve,beforeUpload:function(B,se){var be=B.size/1024/1024;return ve.concat(se).length>$?(ve.pop(),z(Object(F.a)(ve)),H.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat($,"\u4E2A\u6587\u4EF6")),de?Promise.reject():(s(),!1)):!0},action:p||"".concat(d.a.API_SERVER,"/api/attachments.json"),onChange:function(B){var se,be,we=Object(F.a)(B.fileList);if(B.file.status==="done"&&((se=B.file)===null||se===void 0||((be=se.response)===null||be===void 0)?void 0:be.status)===-1){var Oe,_e;H.b.error((Oe=B.file)===null||Oe===void 0||((_e=Oe.response)===null||_e===void 0)?void 0:_e.message);return}we.length>=$?Le(!0):Le(!1),z(Object(F.a)(we)),we=we.map(function(Re){var Pe;if(Re!=null&&(Pe=Re.response)!==null&&Pe!==void 0&&Pe.id){var Fe;Re.url="/api/attachments/".concat(Re==null||((Fe=Re.response)===null||Fe===void 0)?void 0:Fe.id)}return Re.name.indexOf(l.c)===-1&&(Re.name="".concat(Re.name).concat(l.c).concat(Object(l.a)(Re.size))),Object(k.a)({},Re)}),console.log("info:",B),x(we)},onRemove:function(){var X=Object(U.a)(L.a.mark(function se(be){var we;return L.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(we=function(){var Re=Object(U.a)(L.a.mark(function Pe(){var Fe,Ge;return L.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(Fe=be.response?be.response.id:be.id,!Fe){We.next=8;break}return We.next=4,Object(o.d)(be.response?be.response.id:be.uid);case 4:return Ge=We.sent,We.abrupt("return",Ge);case 8:return We.abrupt("return",!0);case 9:case"end":return We.stop()}},Pe)}));return function(){return Re.apply(this,arguments)}}(),!N){_e.next=5;break}return _e.abrupt("return",new Promise(function(Re,Pe){J.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:S.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Fe=Object(U.a)(L.a.mark(function ze(){var We;return L.a.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,we();case 2:We=Ke.sent,H.b.success("\u5220\u9664\u6210\u529F"),Re(!0);case 5:case"end":return Ke.stop()}},ze)}));function Ge(){return Fe.apply(this,arguments)}return Ge}(),onCancel:function(){return Re(!1)}})}));case 5:return _e.next=7,we();case 7:return _e.abrupt("return",_e.sent);case 8:case"end":return _e.stop()}},se)}));function B(se){return X.apply(this,arguments)}return B}()};function D(X){X.preventDefault(),X.stopPropagation()}return S.a.createElement("div",{className:"multi-upload ".concat(c||"")},P&&S.a.createElement(C,f,S.a.createElement("p",{className:"ant-upload-drag-icon"},S.a.createElement(u.a,null)),S.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",S.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",a,"MB)"," "),V),!P&&S.a.createElement(w.a,f,S.a.createElement(Z.a,{style:{width:"108px",height:"32px",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)",borderRadius:"2px",border:"1px solid #BACFFE",color:"#3061D0"},icon:S.a.createElement("i",{className:"iconfont icon-shangchuan3",style:{marginRight:"6px"}}),disabled:xe},g),S.a.createElement("span",{onClick:D,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",a,"MB)"," ")))}},"55Ip":function(ht,$e,ue){"use strict";ue.d($e,"a",function(){return l});var fe=ue("Ty5D"),Z=ue("dI71"),O=ue("q1tI"),J=ue.n(O),U=ue("YS25"),k=ue("17x9"),G=ue.n(k),H=ue("wx14"),F=ue("zLVn"),R=ue("9R94"),E=function(c){Object(Z.a)(h,c);function h(){for(var y,g=arguments.length,b=new Array(g),N=0;N1&&arguments[1]!==void 0?arguments[1]:0,A=(G[M[L+0]]+G[M[L+1]]+G[M[L+2]]+G[M[L+3]]+"-"+G[M[L+4]]+G[M[L+5]]+"-"+G[M[L+6]]+G[M[L+7]]+"-"+G[M[L+8]]+G[M[L+9]]+"-"+G[M[L+10]]+G[M[L+11]]+G[M[L+12]]+G[M[L+13]]+G[M[L+14]]+G[M[L+15]]).toLowerCase();if(!k(A))throw TypeError("Stringified UUID is invalid");return A}var R=F;function E(M,L,A){M=M||{};var S=M.random||(M.rng||O)();if(S[6]=S[6]&15|64,S[8]=S[8]&63|128,L){A=A||0;for(var d=0;d<16;++d)L[A+d]=S[d];return L}return R(S)}var w=$e.a=E},"7ahc":function(ht,$e,ue){"use strict";ue.d($e,"a",function(){return C});var fe=ue("k1fw"),Z=ue("0Owb"),O=ue("+L6B"),J=ue("2/Rp"),U=ue("y8nQ"),k=ue("Vl3Y"),G=ue("tJVT"),H=ue("OaEy"),F=ue("2fM7"),R=ue("q1tI"),E=ue.n(R),w=ue("VrN/"),M=ue.n(w),L=ue("p77/"),A=ue.n(L),S=ue("c5Ni"),d=ue.n(S),o=F.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};$e.b=function(v){var m=v.callback,_=v.onCancel,x=Object(R.useState)("python"),p=Object(G.a)(x,2),c=p[0],h=p[1];function a(g){h(u[g][1])}function y(g){m(g)}return E.a.createElement(k.a,Object(Z.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:y}),E.a.createElement(k.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},E.a.createElement(F.a,{onChange:a},Object.keys(u).map(function(g){return E.a.createElement(o,{key:g,value:g},u[g][0])}))),E.a.createElement(k.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},E.a.createElement(C,{mode:c})),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(J.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(J.a,{type:"ghost",onClick:_},"\u53D6\u6D88")))};function C(v){var m=v.value,_=v.onChange,x=v.mode,p=v.options,c=p===void 0?{}:p,h=Object(R.useRef)(),a=Object(R.useState)(),y=Object(G.a)(a,2),g=y[0],b=y[1];return Object(R.useEffect)(function(){if(g){function N(j){var K=j.getValue();_&&_(K)}return g.on("change",N),function(){g.off("change",N)}}},[g,_]),Object(R.useEffect)(function(){g&&g.setOption("mode",x)},[g,x]),Object(R.useEffect)(function(){g&&((m!==g.getValue()||m==="")&&setTimeout(function(){g.setValue(m||" ")},300))},[g,m]),Object(R.useEffect)(function(){if(h.current&&!g){var N=M.a.fromTextArea(h.current,Object(fe.a)({mode:x,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));b(N)}},[h.current,g]),E.a.createElement("div",{className:"my-codemirror-container"},E.a.createElement("textarea",{ref:h}))}},"8EBN":function(ht,$e,ue){(function(fe){fe(ue("VrN/"))})(function(fe){"use strict";fe.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 Z=0;Z-1&&J.substring(G+1,J.length);if(H)return fe.findModeByExtension(H)},fe.findModeByName=function(J){J=J.toLowerCase();for(var U=0;U=ie.length?le.slice(ie.length):le}).join(`
`)}var d=[],o=[""],l=new L.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function C(){d.length=0,o=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(oe,q,ee,ie){if(q>=oe.length||oe[q].level<=ee)return q;var le=oe[q];ie.push("- "+le.text+""),q++;var te=[];return q=m(oe,q,le.level,te),te.length>0&&(ie.push("
"),te.forEach(function(ae){ie.push(ae)}),ie.push("
")),ie.push(" "),q=m(oe,q,ee,ie),q}function _(){return m(d,0,0,o),o.push("
"),o.join("")}var x={heading:function(q){var ee=u.exec(q);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function(q){var ee=this.rules.block.fences.exec(q);if(ee){var ie=ee[0],le=S(ie,ee[3]||""),te=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(te)>=0){var ae=h(),he=le;le=ae,a[ae]={type:"block",expression:he}}return{type:"code",raw:ie,lang:te,text:le}}}},p=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,h=function(){return"__special_katext_id_".concat(c++,"__")},a={};function y(){return a}function g(){c=0,a={}}function b(oe){return oe=oe.replace(p,function(q,ee){var ie=h();return a[ie]={type:"inline",expression:ee},ie}),oe}var N=l.listitem;l.listitem=function(oe){return N(b(oe))};var j=l.paragraph;l.paragraph=function(oe){return j(b(oe))};var K=l.tablecell;l.tablecell=function(oe,q){return K(b(oe),q)},l.code=function(oe,q,ee){var ie=(q||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"".concat(oe,"
"):'
').concat(ee?oe:Object(A.escape)(oe,!0),`
`):''+(ee?oe:Object(A.escape)(oe,!0))+"
"},l.heading=function(oe,q,ee){var ie=this.options.headerPrefix+ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:ie,level:q,text:oe}),"'+oe+""},L.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),L.a.use({tokenizer:x,renderer:l});var V=L.a,P=ue("SJMd"),I=ue("ulZh"),$=ue.n(I),ne=ue("m3rI"),de=ue("Oy/b"),me=ue("p5ED"),De=ue("ErOA"),xe=ue("STEk");/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Le=function(oe,q){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ie){ee.__proto__=ie}||function(ee,ie){for(var le in ie)Object.prototype.hasOwnProperty.call(ie,le)&&(ee[le]=ie[le])})(oe,q)};function Te(oe,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");function ee(){this.constructor=oe}Le(oe,q),oe.prototype=q===null?Object.create(q):(ee.prototype=q.prototype,new ee)}function Se(oe,q,ee,ie){return new(ee||(ee=Promise))(function(le,te){function ae(ye){try{ce(ie.next(ye))}catch(Ee){te(Ee)}}function he(ye){try{ce(ie.throw(ye))}catch(Ee){te(Ee)}}function ce(ye){var Ee;ye.done?le(ye.value):(Ee=ye.value,Ee instanceof ee?Ee:new ee(function(Me){Me(Ee)})).then(ae,he)}ce((ie=ie.apply(oe,q||[])).next())})}function ve(oe,q){var ee,ie,le,te,ae={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:he(0),throw:he(1),return:he(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function he(ce){return function(ye){return function(Ee){if(ee)throw new TypeError("Generator is already executing.");for(;ae;)try{if(ee=1,ie&&(le=2&Ee[0]?ie.return:Ee[0]?ie.throw||((le=ie.return)&&le.call(ie),0):ie.next)&&!(le=le.call(ie,Ee[1])).done)return le;switch(ie=0,le&&(Ee=[2&Ee[0],le.value]),Ee[0]){case 0:case 1:le=Ee;break;case 4:return ae.label++,{value:Ee[1],done:!1};case 5:ae.label++,ie=Ee[1],Ee=[0];continue;case 7:Ee=ae.ops.pop(),ae.trys.pop();continue;default:if(!(le=ae.trys,(le=le.length>0&&le[le.length-1])||Ee[0]!==6&&Ee[0]!==2)){ae=0;continue}if(Ee[0]===3&&(!le||Ee[1]>le[0]&&Ee[1]0&&ee>0){var ie=new _e(q,ee),le=ie.ratio>=1?20:ie.getHorizontalLength(20),te=ie.ratio<1?20:ie.getVerticalLength(20),ae=document.createElementNS("http://www.w3.org/2000/svg","svg");ae.setAttribute("xmlns","http://www.w3.org/2000/svg"),ae.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ae);var he=s.createDefs();ae.appendChild(he);var ce=s.createElement("clipPath",[["id","text-bg-clip"]]);he.appendChild(ce);var ye=s.createPath(s.getHollowRectanglePath((24-le)/2,(24-te)/2,le,te,(24-le)/2+2,(24-te)/2+2,le-4,te-4));ae.appendChild(ye);var Ee=s.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ee.appendChild(s.createTSpan(q+":"+ee)),ae.appendChild(Ee);var Me=Ee.getBBox();s.setAttributes(Ee,[["x",((24-Me.width)/2).toString()],["y",((24-Me.height)/2-Me.y).toString()]]);var He=s.createPath(s.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Me.width))/2,(24-Math.ceil(Me.height))/2,Math.ceil(Me.width),Math.ceil(Me.height)));return ce.appendChild(He),s.setAttributes(ye,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ae),ae.outerHTML}return''},oe}(),Pe=function(oe){function q(ee,ie,le){var te=oe.call(this,ee,ie)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return Te(q,oe),q.prototype.setupDropdown=function(){var ee=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ie){ie.className=ee.className,ie.colorsClassName=ee.colorsClassName,ee.dropdownBlock.appendChild(ie.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},q.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},q.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},q.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},q.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},q.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},q}(we),Fe=function(){function oe(q,ee){this.GRIP_SIZE=10,this.color=q,this.fillColor=ee,this.visual=s.createGroup(),this.visual.appendChild(s.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(s.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(q){return q===this.visual||q===this.visual.childNodes[0]||q===this.visual.childNodes[1]},oe.prototype.setCenter=function(q,ee){this.visual.childNodes.forEach(function(ie){return s.setAttributes(ie,[["cx",q.toString()],["cy",ee.toString()]])})},oe}(),Ge=function(){function oe(q,ee,ie,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=q,this.canvasHeight=ee,this.margin=ie,this.container=le,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(q){this._aspectRatio=q,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.gridContainer&&s.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(q){this._zoomFactor=q,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),oe.prototype.open=function(){var q=this;this.cropShadeElement=s.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=s.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var ee=0;eethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-ee.height/2),s.setAttributes(this.cropRectElement,[["x",ee.x.toString()],["y",ee.y.toString()],["width",ee.width.toString()],["height",ee.height.toString()]]);var ie=ee.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,ae){var he=ee.y+ie*(ae+1);s.setAttributes(te,[["x1",""+ee.x],["y1",""+he],["x2",""+(ee.x+ee.width)],["y2",""+he]])});var le=ee.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,ae){var he=ee.x+le*(ae+1);s.setAttributes(te,[["x1",""+he],["y1",""+ee.y],["x2",""+he],["y2",""+(ee.y+ee.height)]])}),s.setAttributes(this.cropShadeElement,[["d",s.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,ee.x,ee.y,ee.width,ee.height)]]),this.topLeftGrip.setCenter(ee.x,ee.y),this.topRightGrip.setCenter(ee.x+ee.width,ee.y),this.bottomLeftGrip.setCenter(ee.x,ee.y+ee.height),this.bottomRightGrip.setCenter(ee.x+ee.width,ee.y+ee.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},oe.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},oe.prototype.clientToLocalCoordinates=function(q,ee){var ie=this.container.getBoundingClientRect();return{x:q-ie.left+this.margin,y:ee-ie.top+this.margin}},oe.prototype.onPointerDown=function(q){this.container.setPointerCapture(q.pointerId),this.previousPoint=this.clientToLocalCoordinates(q.clientX,q.clientY),this.cropRectElement===q.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(q.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(q.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(q.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(q.target)&&(this.activeGrip=this.bottomRightGrip)},oe.prototype.onPointerMove=function(q){if(this.isMoving)this.move(this.clientToLocalCoordinates(q.clientX,q.clientY));else if(this.activeGrip){var ee=this.clientToLocalCoordinates(q.clientX,q.clientY);this.resize(ee)}q.preventDefault()},oe.prototype.onPointerUp=function(q){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(q.pointerId)},oe.prototype.move=function(q){var ee=q.x-this.previousPoint.x,ie=q.y-this.previousPoint.y;this.zoomFactor!==1&&(ee=-ee/this.zoomFactor,ie=-ie/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+ee),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ie),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=q},oe.prototype.resize=function(q){var ee=Object.assign({},this.cropRect),ie=q.x-this.previousPoint.x,le=q.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:ee.x+iethis.canvasWidth*this.zoomFactor&&(ie=this.canvasWidth*this.zoomFactor-ee.width),ee.width+=ie}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(ee.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ie),ee.height=this.aspectRatio.getVerticalLength(ee.width)):(ee.y+=le,ee.height=this.cropRect.y+this.cropRect.height-ee.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?ee.height=this.aspectRatio.getVerticalLength(ee.width):ee.height+=le}ee.width<10&&(ee.x=this.cropRect.x,ee.width=10),ee.height<10&&(ee.y=this.cropRect.y,ee.height=10),this.previousPoint=q,ee.x>=this.margin&&ee.y>=this.margin&&ee.x-this.margin+ee.width<=this.canvasWidth&&ee.y-this.margin+ee.height<=this.canvasHeight&&(this.cropRect=ee,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},oe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var q=this.cropRect.x+this.cropRect.width/2,ee=this.cropRect.y+this.cropRect.height/2,ie=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);ie/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=q-this.cropRect.width/2,this.cropRect.y=ee-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},oe.prototype.getRescaledRect=function(q,ee,ie,le,te,ae){var he=ie/q,ce=le/ee;return{x:(te.x-ae)*he+ae,y:(te.y-ae)*ce+ae,width:te.width*he,height:te.height*ce}},oe.prototype.scaleCanvas=function(q,ee){var ie=this.getRescaledRect(this.canvasWidth,this.canvasHeight,q,ee,this.cropRect,this.margin);this.canvasWidth=q,this.canvasHeight=ee,this.onCropChange&&this.onCropChange(ie),this.setCropRectangle(ie)},oe}(),ze=function(){function oe(q){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=q,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(oe.prototype,"angle",{get:function(){return this._angle},set:function(q){this._angle=q,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),oe.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},oe.prototype.onPointerDown=function(q){this.controlContainer.setPointerCapture(q.pointerId),this.isDragging=!0,this.previousPoint={x:q.clientX,y:q.clientY}},oe.prototype.onPointerMove=function(q){this.isDragging&&(this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.previousPoint.x=q.clientX)},oe.prototype.onPointerUp=function(q){this.isDragging&&this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(q.pointerId)},oe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var q=this.angleLabelText.getBBox();s.setAttributes(this.angleLabelElement,[["x",((this.width-q.width)/2).toString()],["y",(this.height/2).toString()]])}},oe.prototype.positionScaleShape=function(){if(this.scaleShape){var q=this.scaleShape.transform.baseVal.getItem(0);q.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(q,0)}},oe.prototype.getVisual=function(){var q=document.createElementNS("http://www.w3.org/2000/svg","svg");q.setAttribute("xmlns","http://www.w3.org/2000/svg"),q.setAttribute("width",this.width+"px"),q.setAttribute("height",this.height+"px"),q.setAttribute("viewBox","0 0 "+this.width+" "+this.height),q.style.flexShrink="0",document.body.appendChild(q);for(var ee="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ie=1;ie<=this.width/5+10;ie++){var le=ie%5==0?this.height/3:this.height/6;ee+="h4v"+-le+"h1v"+le}ee+="v1H0Z",this.scaleShape=s.createPath(ee);var te=s.createTransform();this.scaleShape.transform.baseVal.appendItem(te),q.appendChild(this.scaleShape),this.angleLabelElement=s.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=s.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ae=s.createTSpan("");return ae.innerHTML="°",this.angleLabelElement.appendChild(ae),q.appendChild(this.angleLabelElement),document.body.removeChild(q),q},oe}(),We=function(){function oe(){this.naturalSize=!1,this.imageType="image/png"}return oe.prototype.rasterize=function(q,ee,ie,le,te,ae,he){var ce=this;return new Promise(function(ye){var Ee=document.createElement("canvas");Ee.width=q.width.baseVal.value-2*le,Ee.height=q.height.baseVal.value-2*le;var Me=1,He=1;ce.naturalSize===!0?(Me=ee.naturalWidth/(q.width.baseVal.value-2*le)/ae,He=ee.naturalHeight/(q.height.baseVal.value-2*le)/he,Ee.width=ee.naturalWidth/ae,Ee.height=ee.naturalHeight/he):ce.width!==void 0&&ce.height!==void 0&&(Me=ce.width/ie.width,He=ce.height/ie.height,Ee.width*=Me,Ee.height*=He);var et=Ee.getContext("2d");et.translate(Ee.width/2,Ee.height/2),et.rotate(te*Math.PI/180),et.scale(ae,he),et.translate(-Ee.width/2,-Ee.height/2),et.drawImage(ee,0,0,Ee.width,Ee.height);var rt=document.createElement("canvas");rt.width=ie.width*Me,rt.height=ie.height*He,rt.getContext("2d").putImageData(et.getImageData((ie.x-le)*Me,(ie.y-le)*He,ie.width*Me,ie.height*He),0,0),ye(rt.toDataURL(ce.imageType,ce.imageQuality))})},oe}(),nt=function(){function oe(q){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=oe.instanceCounter++,this.styles=new f(this.instanceNo),this.target=q,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(q){this._zoomToCropEnabled=q,q?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(q){this._gridLines=q,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(q){this._rotationAngle=q,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){var q;return(q=this._aspectRatio)!==null&&q!==void 0?q:this.aspectRatios[0]},set:function(q){this._aspectRatio=q},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},oe.prototype.show=function(){this.showUI(),this.open()},oe.prototype.close=function(q){q===void 0&&(q=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),q||this.closeEventListeners.forEach(function(ee){return ee()}),this._isOpen=!1)},oe.prototype.addRenderEventListener=function(q){this.renderEventListeners.push(q)},oe.prototype.removeRenderEventListener=function(q){this.renderEventListeners.indexOf(q)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(q),1)},oe.prototype.addCloseEventListener=function(q){this.closeEventListeners.push(q)},oe.prototype.removeCloseEventListener=function(q){this.closeEventListeners.indexOf(q)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(q),1)},oe.prototype.setupResizeObserver=function(){var q=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){q.resize(q.target.clientWidth,q.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var q=1*this.target.clientWidth/this.target.clientHeight,ee=this.contentDiv.clientWidth/q>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*q:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ie=ee+2*this.CANVAS_MARGINq+this.CANVAS_MARGIN?this.target.offsetTop-(q+this.CANVAS_MARGIN):0;this.coverDiv.style.top=ee+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},oe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},oe.prototype.addTopToolbar=function(){var q=this;this.topToolbar=new B,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ee=new be;ee.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(ee);var ie=[];this.aspectRatios.forEach(function(He){var et=new we(Re.getIcon(He.horizontal,He.vertical),He.horizontal===0&&He.vertical===0?"FREE":He.horizontal+":"+He.vertical);et.onClick=function(){return q.ratioButtonClicked(He)},ie.push(et)}),this.aspectRatioButton=new Pe(Re.getIcon(0,0),"Aspect ratio",ie),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,ee.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new we('',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){q.isGridVisible=!q.isGridVisible,le.isActive=q.isGridVisible},ee.addButton(le);var te=new we('',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){q.zoomToCropEnabled=!q.zoomToCropEnabled,te.isActive=q.zoomToCropEnabled},ee.addButton(te),!z.isLicensed){var ae=new Oe;this.topToolbar.addElementBlock(ae);var he=document.createElement("div");he.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ce=document.createElement("a");ce.style.color="currentColor",ce.href="https://markerjs.com/products/cropro",ce.target="_blank",ce.innerHTML='',he.appendChild(ce),ae.addElement(he)}var ye=new be;ye.minWidth=3*this.toolbarHeight+"px",ye.contentAlign="end",this.topToolbar.addButtonBlock(ye);var Ee=new we('',"OK");Ee.onClick=this.startRenderAndClose,ye.addButton(Ee),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ee.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Me=new we('',"Close");Me.onClick=this.close,ye.addButton(Me),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Me.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},oe.prototype.addBottomToolbar=function(){var q=this;this.bottomToolbar=new B,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ee=new be;ee.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(ee);var ie=new we('',"Rotate left");ie.onClick=this.rotateLeftButtonClicked,ee.addButton(ie);var le=new we('',"Rotate right");le.onClick=this.rotateRightButtonClicked,ee.addButton(le);var te=new Oe;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new ze("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ye){q.rotateBy(ye),q.straightener.angle=q.rotationAngle},te.addElement(this.straightener.getUI());var ae=new be;ae.minWidth=2*this.toolbarHeight+"px",ae.contentAlign="end",this.bottomToolbar.addButtonBlock(ae);var he=new we('',"Flip horizontal");he.onClick=this.flipHorizontallyButtonClicked,ae.addButton(he);var ce=new we('',"Flip vertical");ce.onClick=this.flipVerticallyButtonClicked,ae.addButton(ce)},oe.prototype.ratioButtonClicked=function(q){this.aspectRatio=q,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},oe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Re.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},oe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new _e(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},oe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},oe.prototype.restoreState=function(q){if(q){var ee=this.cropLayer.getRescaledRect(q.width,q.height,this.imageWidth,this.imageHeight,q.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(ee),this.cropRectChanged(ee),this.flippedHorizontally=q.flippedHorizontally,this.flippedVertically=q.flippedVertically,this.applyFlip(),this.rotationAngle=q.rotationAngle,this.applyRotation()}},oe.prototype.clientToLocalCoordinates=function(q,ee){var ie=this.cropImage.getBoundingClientRect();return{x:q-ie.left,y:ee-ie.top}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var q=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=q+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},oe.prototype.rotateLeftButtonClicked=function(){var q=this.rotationAngle-90;this.rotationAngle%90!=0&&(q+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(q)},oe.prototype.rotateRightButtonClicked=function(){var q=this.rotationAngle+90;this.rotationAngle%90!=0&&(q-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(q)},oe.prototype.rotateTo=function(q){q=(q=q>180?q-360:q)<=-180?q+360:q,this.rotationAngle=q,this.applyRotation()},oe.prototype.rotateBy=function(q){this.rotateTo((this.rotationAngle+q)%360)},oe.prototype.applyRotation=function(){var q=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var ee=this.editingTargetRotationContainer.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(ee,0);var ie=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ie.width,this.imageHeight/ie.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=q},oe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},oe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},oe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},oe.prototype.startRenderAndClose=function(){return Se(this,void 0,void 0,function(){var q,ee;return ve(this,function(ie){switch(ie.label){case 0:return[4,this.render()];case 1:return q=ie.sent(),ee=this.getState(),this.renderEventListeners.forEach(function(le){return le(q,ee)}),this.close(!0),[2]}})})},oe.prototype.render=function(){return Se(this,void 0,void 0,function(){var q;return ve(this,function(ee){switch(ee.label){case 0:return(q=new We).naturalSize=this.renderAtNaturalSize,q.imageType=this.renderImageType,q.imageQuality=this.renderImageQuality,q.width=this.renderWidth,q.height=this.renderHeight,this.unzoomFromCrop(),s.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return ee.sent(),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,ee.sent()]}})})},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new X("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new X("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new X("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var q=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new X("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*q)+`px;
height: `+(this.toolbarHeight-2*q)+`px;
padding: `+q+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new X("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new X("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new D("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new D("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new X("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new X("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new X("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new X("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*q)+`px;
padding: `+q+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new X("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},oe.instanceCounter=0,oe}(),Ke=ue("8hTe"),Qe=ue.n(Ke),ke=/]*>/g;function Ze(oe){var q=document.createElement("div");return q.innerHTML=oe,q.childNodes.length===0?"":q.childNodes[0].nodeValue}var Ve=$e.a=function(oe){var q=oe.value,ee=q===void 0?"":q,ie=oe.edit,le=ie===void 0?!1:ie,te=oe.className,ae=oe.showTextOnly,he=oe.showLines,ce=oe.replaces,ye=oe.zoomImg,Ee=oe.hasMask,Me=oe.style,He=Me===void 0?{}:Me,et=oe.stylesPrev,rt=et===void 0?{}:et,vt=String(ee),ot=Object(R.useRef)(),it=Object(R.useRef)(),wt=Object(R.useState)(""),xt=Object(G.a)(wt,2),It=xt[0],Ot=xt[1],Et=Object(R.useState)("office"),mr=Object(G.a)(Et,2),Tr=mr[0],Yt=mr[1],gr=function(){var Tt=new nt(it.current);Tt.displayMode="popup",Tt.addRenderEventListener(function(){var Zt=Object(k.a)(F.a.mark(function mt(pt){var At;return F.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return ot.current.style.display="none",Ut.next=3,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:pt}});case 3:At=Ut.sent,At!=null&&At.id&&ce(it.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(At==null?void 0:At.id,"?type=").concat(At.content_type));case 5:case"end":return Ut.stop()}},mt)}));return function(mt){return Zt.apply(this,arguments)}}()),Tt.show()},cr=function(){var Tt=new xe.a(it.current);Tt.settings.displayMode="popup",Tt.addEventListener("render",function(){var Zt=Object(k.a)(F.a.mark(function mt(pt){var At;return F.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(ot.current.style.display="none",!it.current){Ut.next=6;break}return Ut.next=4,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:pt.dataUrl}});case 4:At=Ut.sent,At!=null&&At.id&&ce(it.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(At==null?void 0:At.id,"?type=").concat(At.content_type));case 6:case"end":return Ut.stop()}},mt)}));return function(mt){return Zt.apply(this,arguments)}}()),Tt.show(),window.markerArea=Tt},zr=Object(R.useMemo)(function(){ot.current&&(ot.current.style.zIndex=-1);try{var Je=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Tt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Zt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;vt=vt.replace(Je,"("+ne.a.API_SERVER+"/api/attachments/").replace(Tt,'"'+ne.a.API_SERVER+"/api/attachments/").replace(Zt,'"'+ne.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,`
`)}catch(vr){}var mt=V(vt),pt=y();if(vt.match(/\[TOC\]/)&&(mt=mt.replace("[TOC]
",_()),C()),mt=mt.replace(/(__special_katext_id_\d+__)/g,function(vr,Ut){var Be=pt[Ut],dt=Be.type,ri=Be.expression;return Object(de.renderToString)(Ze(ri)||"",{displayMode:dt==="block",throwOnError:!1,output:"html"})}),mt=mt.replace(/▁/g,"\u2581\u2581\u2581"),g(),ae){var At=document.createElement("div");return At.innerHTML=mt,At.innerText}return setTimeout(function(){return ti()},500),mt},[vt]),$t=Object(R.useRef)();v.WebkitLineClamp=he,he&&(He=Object(U.a)(Object(U.a)({},He),v));function Nr(Je){var Tt=Je.target;if(Tt.tagName.toUpperCase()==="IMG"){if(ye){var Zt=Tt.getAttribute("src");Ot(Zt),Yt("image")}}else if(Tt.tagName.toUpperCase()==="A"){var mt=Tt.getAttribute("href");if(mt.indexOf("office")>-1)Je.preventDefault(),Ot(mt),Yt("office");else if(mt.indexOf("application/pdf")>-1)Je.preventDefault(),Ot(mt),Yt("pdf");else if(mt.indexOf("text/html")>-1)Je.preventDefault(),Ot(mt),Yt("html");else if(mt.startsWith("#")){Je.preventDefault();var pt=document.getElementById(mt.replace("#",""));pt&&pt.scrollIntoView(!0)}}}var ti=function(){var Tt,Zt=(Tt=$t.current)===null||Tt===void 0?void 0:Tt.querySelectorAll("video");Zt==null||Zt.forEach(function(mt){if(mt.oncontextmenu=function(){return!1},mt.src.indexOf(".m3u8")>-1&&!mt.canPlayType("application/vnd.apple.mpegurl")){if($.a.isSupported()){var pt=new $.a;pt.loadSource(mt.src),pt.attachMedia(mt)}}})};Object(R.useEffect)(function(){if($t.current&&zr&&(zr.match(ke)&&window.PR.prettyPrint()),$t.current)return $t.current.addEventListener("click",Nr),function(){$t.current.removeEventListener("click",Nr),g(),C()}},[zr,$t.current,Nr]);var Pt=function(Tt){if(!le)return;Tt.target.nodeName==="IMG"?(ot.current.style.zIndex=1,ot.current.style.display="flex",ot.current.style.width=Tt.target.clientWidth+"px",ot.current.style.height=Tt.target.clientHeight+"px",ot.current.style.top=Tt.target.offsetTop+"px",ot.current.style.left=Tt.target.offsetLeft+"px",it.current.src=Tt.target.getAttribute("src")):ot.current.style.display="none"};return E.a.createElement("div",{style:{position:"relative"}},E.a.createElement("div",{ref:$t,style:Object(U.a)({},He),className:"".concat(te||""," markdown-body ").concat(Qe.a.mdBody),onMouseOver:Pt,dangerouslySetInnerHTML:{__html:zr}}),E.a.createElement("div",{ref:ot,className:Qe.a.button},E.a.createElement(Z.a,null,E.a.createElement(J.a,{onClick:function(){return gr()}},"\u88C1\u526A"),E.a.createElement(J.a,{onClick:function(){return cr()}},"\u7F16\u8F91"))),E.a.createElement("img",{ref:it,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),E.a.createElement(me.a,{close:!0,data:It,type:It!=null&&It.length?Tr:"",style:Object(U.a)({},rt),onClose:function(){return Ot("")}}))}},"9VGf":function(ht,$e,ue){"use strict";ue.d($e,"a",function(){return O});var fe=ue("q1tI"),Z=ue.n(fe);function O(J,U){var k=Object(fe.useRef)();Object(fe.useEffect)(function(){k.current=J}),Object(fe.useEffect)(function(){function G(){k.current()}if(U!==null){var H=setInterval(G,U);return function(){return clearInterval(H)}}},[U])}},Bd2K:function(ht,$e,ue){(function(fe){fe(ue("VrN/"),ue("osHv"))})(function(fe){fe.defineOption("autoCloseTags",!1,function(F,R,E){if(E!=fe.Init&&E&&F.removeKeyMap("autoCloseTags"),!R)return;var w={name:"autoCloseTags"};(typeof R!="object"||R.whenClosing!==!1)&&(w["'/'"]=function(M){return k(M)}),(typeof R!="object"||R.whenOpening!==!1)&&(w["'>'"]=function(M){return J(M)}),F.addKeyMap(w)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 J(F){if(F.getOption("disableInput"))return fe.Pass;for(var R=F.listSelections(),E=[],w=F.getOption("autoCloseTags"),M=0;ML.ch&&(l=l.slice(0,l.length-A.end+L.ch));var m=l.toLowerCase();if(!l||A.type=="string"&&(A.end!=L.ch||!/[\"\']/.test(A.string.charAt(A.string.length-1))||A.string.length==1)||A.type=="tag"&&o.close||A.string.indexOf("/")==L.ch-A.start-1||C&&G(C,m)>-1||H(F,S.mode.xmlCurrentContext&&S.mode.xmlCurrentContext(d)||[],l,L,!0))return fe.Pass;var _=typeof w=="object"&&w.emptyTags;if(_&&G(_,l)>-1){E[M]={text:"/>",newPos:fe.Pos(L.line,L.ch+2)};continue}var x=v&&G(v,m)>-1;E[M]={indent:x,text:">"+(x?`
`:"")+""+l+">",newPos:x?fe.Pos(L.line+1,0):fe.Pos(L.line,L.ch+1)}}for(var p=typeof w=="object"&&w.dontIndentOnAutoClose,M=R.length-1;M>=0;M--){var c=E[M];F.replaceRange(c.text,R[M].head,R[M].anchor,"+insert");var h=F.listSelections().slice(0);h[M]={head:c.newPos,anchor:c.newPos},F.setSelections(h),!p&&c.indent&&(F.indentLine(c.newPos.line,null,!0),F.indentLine(c.newPos.line+1,null,!0))}}function U(F,R){for(var E=F.listSelections(),w=[],M=R?"/":"",L=F.getOption("autoCloseTags"),A=typeof L=="object"&&L.dontIndentOnSlash,S=0;S"&&(C+=">"),w[S]=C}if(F.replaceSelections(w),E=F.listSelections(),!A)for(var S=0;S=0&&R[d]==E;d--)++S;w=A.to;for(var d=1;d0){for(var R=0;R1&&arguments[1]!==void 0?arguments[1]:"",R=[],E=0;Eee.length)&&(ie=ee.length);for(var le=0,te=new Array(ie);le=ee.length?{done:!0}:{done:!1,value:ee[te++]}}}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 le=ee[Symbol.iterator](),le.next.bind(le)}function k(ee,ie){return ie={exports:{}},ee(ie,ie.exports),ie.exports}var G=k(function(ee){function ie(){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 le(te){ee.exports.defaults=te}ee.exports={defaults:ie(),getDefaults:ie,changeDefaults:le}}),H=G.defaults,F=G.getDefaults,R=G.changeDefaults,E=/[&<>"']/,w=/[&<>"']/g,M=/[<>"']|&(?!#?\w+;)/,L=/[<>"']|&(?!#?\w+;)/g,A={"&":"&","<":"<",">":">",'"':""","'":"'"},S=function(ie){return A[ie]};function d(ee,ie){if(ie){if(E.test(ee))return ee.replace(w,S)}else if(M.test(ee))return ee.replace(L,S);return ee}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ee){return ee.replace(o,function(ie,le){return le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""})}var u=/(^|[^\[])\^/g;function C(ee,ie){ee=ee.source||ee,ie=ie||"";var le={replace:function(ae,he){return he=he.source||he,he=he.replace(u,"$1"),ee=ee.replace(ae,he),le},getRegex:function(){return new RegExp(ee,ie)}};return le}var v=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(ee,ie,le){if(ee){var te;try{te=decodeURIComponent(l(le)).replace(v,"").toLowerCase()}catch(ae){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}ie&&!m.test(le)&&(le=a(ie,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(ae){return null}return le}var x={},p=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,h=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(ee,ie){x[" "+ee]||(p.test(ee)?x[" "+ee]=ee+"/":x[" "+ee]=N(ee,"/",!0)),ee=x[" "+ee];var le=ee.indexOf(":")===-1;return ie.substring(0,2)==="//"?le?ie:ee.replace(c,"$1")+ie:ie.charAt(0)==="/"?le?ie:ee.replace(h,"$1")+ie:ee+ie}var y={exec:function(){}};function g(ee){for(var ie=1,le,te;ie=0&&ye[Me]==="\\";)Ee=!Ee;return Ee?"|":" |"}),te=le.split(/ \|/),ae=0;if(te.length>ie)te.splice(ie);else for(;te.length=te.length?ae.slice(te.length):ae}).join(`
`)}var xe=function(){function ee(le){this.options=le||P}var ie=ee.prototype;return ie.space=function(te){var ae=this.rules.block.newline.exec(te);if(ae)return ae[0].length>1?{type:"space",raw:ae[0]}:{raw:`
`}},ie.code=function(te,ae){var he=this.rules.block.code.exec(te);if(he){var ce=ae[ae.length-1];if(ce&&ce.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var ye=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?ye:I(ye,`
`)}}},ie.fences=function(te){var ae=this.rules.block.fences.exec(te);if(ae){var he=ae[0],ce=De(he,ae[3]||"");return{type:"code",raw:he,lang:ae[2]?ae[2].trim():ae[2],text:ce}}},ie.heading=function(te){var ae=this.rules.block.heading.exec(te);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},ie.nptable=function(te){var ae=this.rules.block.nptable.exec(te);if(ae){var he={type:"table",header:$(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(`
`):[],raw:ae[0]};if(he.header.length===he.align.length){var ce=he.align.length,ye;for(ye=0;ye ?/gm,"");return{type:"blockquote",raw:ae[0],text:he}}},ie.list=function(te){var ae=this.rules.block.list.exec(te);if(ae){for(var he=ae[0],ce=ae[2],ye=ce.length>1,Ee=ce[ce.length-1]===")",Me={type:"list",raw:he,ordered:ye,start:ye?+ce.slice(0,-1):"",loose:!1,items:[]},He=ae[0].match(this.rules.block.item),et=!1,rt,vt,ot,it,wt,xt,It,Ot=He.length,Et=0;Et1||this.options.smartLists&&ot!==ce)&&(it=He.slice(Et+1).join(`
`),Me.raw=Me.raw.substring(0,Me.raw.length-it.length),Et=Ot-1)),wt=et||/\n\n(?!\s*$)/.test(rt),Et!==Ot-1&&(et=rt.charAt(rt.length-1)===`
`,wt||(wt=et)),wt&&(Me.loose=!0),xt=/^\[[ xX]\] /.test(rt),It=void 0,xt&&(It=rt[1]!==" ",rt=rt.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:he,task:xt,checked:It,loose:wt,text:rt});return Me}},ie.html=function(te){var ae=this.rules.block.html.exec(te);if(ae)return{type:this.options.sanitize?"paragraph":"html",raw:ae[0],pre:!this.options.sanitizer&&(ae[1]==="pre"||ae[1]==="script"||ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):ne(ae[0]):ae[0]}},ie.def=function(te){var ae=this.rules.block.def.exec(te);if(ae){ae[3]&&(ae[3]=ae[3].substring(1,ae[3].length-1));var he=ae[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:ae[0],href:ae[2],title:ae[3]}}},ie.table=function(te){var ae=this.rules.block.table.exec(te);if(ae){var he={type:"table",header:$(ae[1].replace(/^ *| *\| *$/g,"")),align:ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ae[3]?ae[3].replace(/\n$/,"").split(`
`):[]};if(he.header.length===he.align.length){he.raw=ae[0];var ce=he.align.length,ye;for(ye=0;ye/i.test(ce[0])&&(ae=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(ce[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ce[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:ce[0],inLink:ae,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ne(ce[0]):ce[0]}},ie.link=function(te){var ae=this.rules.inline.link.exec(te);if(ae){var he=de(ae[2],"()");if(he>-1){var ce=ae[0].indexOf("!")===0?5:4,ye=ce+ae[1].length+he;ae[2]=ae[2].substring(0,he),ae[0]=ae[0].substring(0,ye).trim(),ae[3]=""}var Ee=ae[2],Me="";if(this.options.pedantic){var He=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ee);He?(Ee=He[1],Me=He[3]):Me=""}else Me=ae[3]?ae[3].slice(1,-1):"";Ee=Ee.trim().replace(/^<([\s\S]*)>$/,"$1");var et=me(ae,{href:Ee&&Ee.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},ae[0]);return et}},ie.reflink=function(te,ae){var he;if((he=this.rules.inline.reflink.exec(te))||(he=this.rules.inline.nolink.exec(te))){var ce=(he[2]||he[1]).replace(/\s+/g," ");if(ce=ae[ce.toLowerCase()],!ce||!ce.href){var ye=he[0].charAt(0);return{type:"text",raw:ye,text:ye}}var Ee=me(he,ce,he[0]);return Ee}},ie.strong=function(te,ae,he){he===void 0&&(he="");var ce=this.rules.inline.strong.start.exec(te);if(ce&&(!ce[1]||ce[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ae=ae.slice(-1*te.length);var ye=ce[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ye.lastIndex=0;for(var Ee;(ce=ye.exec(ae))!=null;)if(Ee=this.rules.inline.strong.middle.exec(ae.slice(0,ce.index+3)),Ee)return{type:"strong",raw:te.slice(0,Ee[0].length),text:te.slice(2,Ee[0].length-2)}}},ie.em=function(te,ae,he){he===void 0&&(he="");var ce=this.rules.inline.em.start.exec(te);if(ce&&(!ce[1]||ce[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ae=ae.slice(-1*te.length);var ye=ce[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ye.lastIndex=0;for(var Ee;(ce=ye.exec(ae))!=null;)if(Ee=this.rules.inline.em.middle.exec(ae.slice(0,ce.index+2)),Ee)return{type:"em",raw:te.slice(0,Ee[0].length),text:te.slice(1,Ee[0].length-1)}}},ie.codespan=function(te){var ae=this.rules.inline.code.exec(te);if(ae){var he=ae[2].replace(/\n/g," "),ce=/[^ ]/.test(he),ye=he.startsWith(" ")&&he.endsWith(" ");return ce&&ye&&(he=he.substring(1,he.length-1)),he=ne(he,!0),{type:"codespan",raw:ae[0],text:he}}},ie.br=function(te){var ae=this.rules.inline.br.exec(te);if(ae)return{type:"br",raw:ae[0]}},ie.del=function(te){var ae=this.rules.inline.del.exec(te);if(ae)return{type:"del",raw:ae[0],text:ae[1]}},ie.autolink=function(te,ae){var he=this.rules.inline.autolink.exec(te);if(he){var ce,ye;return he[2]==="@"?(ce=ne(this.options.mangle?ae(he[1]):he[1]),ye="mailto:"+ce):(ce=ne(he[1]),ye=ce),{type:"link",raw:he[0],text:ce,href:ye,tokens:[{type:"text",raw:ce,text:ce}]}}},ie.url=function(te,ae){var he;if(he=this.rules.inline.url.exec(te)){var ce,ye;if(he[2]==="@")ce=ne(this.options.mangle?ae(he[0]):he[0]),ye="mailto:"+ce;else{var Ee;do Ee=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Ee!==he[0]);ce=ne(he[0]),he[1]==="www."?ye="http://"+ce:ye=ce}return{type:"link",raw:he[0],text:ce,href:ye,tokens:[{type:"text",raw:ce,text:ce}]}}},ie.inlineText=function(te,ae,he){var ce=this.rules.inline.text.exec(te);if(ce){var ye;return ae?ye=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ne(ce[0]):ce[0]:ye=ne(this.options.smartypants?he(ce[0]):ce[0]),{type:"text",raw:ce[0],text:ye}}},ee}(),Le=V.noopTest,Te=V.edit,Se=V.merge,ve={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Le,table:Le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ve._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ve._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ve.def=Te(ve.def).replace("label",ve._label).replace("title",ve._title).getRegex(),ve.bullet=/(?:[*+-]|\d{1,9}[.)])/,ve.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ve.item=Te(ve.item,"gm").replace(/bull/g,ve.bullet).getRegex(),ve.list=Te(ve.list).replace(/bull/g,ve.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ve.def.source+")").getRegex(),ve._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",ve._comment=//,ve.html=Te(ve.html,"i").replace("comment",ve._comment).replace("tag",ve._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ve.paragraph=Te(ve._paragraph).replace("hr",ve.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ve._tag).getRegex(),ve.blockquote=Te(ve.blockquote).replace("paragraph",ve.paragraph).getRegex(),ve.normal=Se({},ve),ve.gfm=Se({},ve.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*|$)"}),ve.gfm.nptable=Te(ve.gfm.nptable).replace("hr",ve.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ve._tag).getRegex(),ve.gfm.table=Te(ve.gfm.table).replace("hr",ve.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ve._tag).getRegex(),ve.pedantic=Se({},ve.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Le,paragraph:Te(ve.normal._paragraph).replace("hr",ve.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ve.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Le,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[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:Le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",z.punctuation=Te(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=Te(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=Te(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=Te(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=Te(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=Te(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=Te(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=Te(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=Te(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=Te(z._blockSkip,"g").getRegex(),z.overlapSkip=Te(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._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])?)+(?![-_])/,z.autolink=Te(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=Te(z.tag).replace("comment",ve._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=Te(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=Te(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=Te(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=Se({},z),z.pedantic=Se({},z.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:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=Se({},z.normal,{escape:Te(z.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&&(te="x"+te.toString(16)),ie+=""+te+";";return ie}var be=function(){function ee(le){this.tokens=[],this.tokens.links=Object.create(null),this.options=le||f,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:D.normal,inline:X.normal};this.options.pedantic?(te.block=D.pedantic,te.inline=X.pedantic):this.options.gfm&&(te.block=D.gfm,this.options.breaks?te.inline=X.breaks:te.inline=X.gfm),this.tokenizer.rules=te}ee.lex=function(te,ae){var he=new ee(ae);return he.lex(te)};var ie=ee.prototype;return ie.lex=function(te){return te=te.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(te,this.tokens,!0),this.inline(this.tokens),this.tokens},ie.blockTokens=function(te,ae,he){ae===void 0&&(ae=[]),he===void 0&&(he=!0),te=te.replace(/^ +$/gm,"");for(var ce,ye,Ee,Me;te;){if(ce=this.tokenizer.space(te)){te=te.substring(ce.raw.length),ce.type&&ae.push(ce);continue}if(ce=this.tokenizer.code(te,ae)){te=te.substring(ce.raw.length),ce.type?ae.push(ce):(Me=ae[ae.length-1],Me.raw+=`
`+ce.raw,Me.text+=`
`+ce.text);continue}if(ce=this.tokenizer.fences(te)){te=te.substring(ce.raw.length),ae.push(ce);continue}if(ce=this.tokenizer.heading(te)){te=te.substring(ce.raw.length),ae.push(ce);continue}if(ce=this.tokenizer.nptable(te)){te=te.substring(ce.raw.length),ae.push(ce);continue}if(ce=this.tokenizer.hr(te)){te=te.substring(ce.raw.length),ae.push(ce);continue}if(ce=this.tokenizer.blockquote(te)){te=te.substring(ce.raw.length),ce.tokens=this.blockTokens(ce.text,[],he),ae.push(ce);continue}if(ce=this.tokenizer.list(te)){for(te=te.substring(ce.raw.length),Ee=ce.items.length,ye=0;ye0)for(;(He=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)et.includes(He[0].slice(He[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,He.index)+"["+"a".repeat(He[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(He=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,He.index)+"["+"a".repeat(He[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Ee=this.tokenizer.escape(te)){te=te.substring(Ee.raw.length),ae.push(Ee);continue}if(Ee=this.tokenizer.tag(te,he,ce)){te=te.substring(Ee.raw.length),he=Ee.inLink,ce=Ee.inRawBlock,ae.push(Ee);continue}if(Ee=this.tokenizer.link(te)){te=te.substring(Ee.raw.length),Ee.type==="link"&&(Ee.tokens=this.inlineTokens(Ee.text,[],!0,ce)),ae.push(Ee);continue}if(Ee=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Ee.raw.length),Ee.type==="link"&&(Ee.tokens=this.inlineTokens(Ee.text,[],!0,ce)),ae.push(Ee);continue}if(Ee=this.tokenizer.strong(te,Me,ye)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],he,ce),ae.push(Ee);continue}if(Ee=this.tokenizer.em(te,Me,ye)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],he,ce),ae.push(Ee);continue}if(Ee=this.tokenizer.codespan(te)){te=te.substring(Ee.raw.length),ae.push(Ee);continue}if(Ee=this.tokenizer.br(te)){te=te.substring(Ee.raw.length),ae.push(Ee);continue}if(Ee=this.tokenizer.del(te)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],he,ce),ae.push(Ee);continue}if(Ee=this.tokenizer.autolink(te,se)){te=te.substring(Ee.raw.length),ae.push(Ee);continue}if(!he&&(Ee=this.tokenizer.url(te,se))){te=te.substring(Ee.raw.length),ae.push(Ee);continue}if(Ee=this.tokenizer.inlineText(te,ce,B)){te=te.substring(Ee.raw.length),ye=Ee.raw.slice(-1),ae.push(Ee);continue}if(te){var rt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(rt);break}else throw new Error(rt)}}return ae},Z(ee,null,[{key:"rules",get:function(){return{block:D,inline:X}}}]),ee}(),we=G.defaults,Oe=V.cleanUrl,_e=V.escape,Re=function(){function ee(le){this.options=le||we}var ie=ee.prototype;return ie.code=function(te,ae,he){var ce=(ae||"").match(/\S*/)[0];if(this.options.highlight){var ye=this.options.highlight(te,ce);ye!=null&&ye!==te&&(he=!0,te=ye)}return ce?''+(he?te:_e(te,!0))+`
`:""+(he?te:_e(te,!0))+`
`},ie.blockquote=function(te){return`
`+te+`
`},ie.html=function(te){return te},ie.heading=function(te,ae,he,ce){return this.options.headerIds?"
`:""+te+"
`},ie.hr=function(){return this.options.xhtml?`
`:`
`},ie.list=function(te,ae,he){var ce=ae?"ol":"ul",ye=ae&&he!==1?' start="'+he+'"':"";return"<"+ce+ye+`>
`+te+""+ce+`>
`},ie.listitem=function(te){return""+te+`
`},ie.checkbox=function(te){return" "},ie.paragraph=function(te){return""+te+`
`},ie.table=function(te,ae){return ae&&(ae=""+ae+""),`
`},ie.tablerow=function(te){return`
`+te+`
`},ie.tablecell=function(te,ae){var he=ae.header?"th":"td",ce=ae.align?"<"+he+' align="'+ae.align+'">':"<"+he+">";return ce+te+""+he+`>
`},ie.strong=function(te){return""+te+""},ie.em=function(te){return""+te+""},ie.codespan=function(te){return""+te+""},ie.br=function(){return this.options.xhtml?"
":"
"},ie.del=function(te){return""+te+""},ie.link=function(te,ae,he){if(te=Oe(this.options.sanitize,this.options.baseUrl,te),te===null)return he;var ce='"+he+"",ce},ie.image=function(te,ae,he){if(te=Oe(this.options.sanitize,this.options.baseUrl,te),te===null)return he;var ce='
":">",ce},ie.text=function(te){return te},ee}(),Pe=function(){function ee(){}var ie=ee.prototype;return ie.strong=function(te){return te},ie.em=function(te){return te},ie.codespan=function(te){return te},ie.del=function(te){return te},ie.html=function(te){return te},ie.text=function(te){return te},ie.link=function(te,ae,he){return""+he},ie.image=function(te,ae,he){return""+he},ie.br=function(){return""},ee}(),Fe=function(){function ee(){this.seen={}}var ie=ee.prototype;return ie.slug=function(te){var ae=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ae)){var he=ae;do this.seen[he]++,ae=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(ae))}return this.seen[ae]=0,ae},ee}(),Ge=G.defaults,ze=V.unescape,We=function(){function ee(le){this.options=le||Ge,this.options.renderer=this.options.renderer||new Re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Pe,this.slugger=new Fe}ee.parse=function(te,ae){var he=new ee(ae);return he.parse(te)};var ie=ee.prototype;return ie.parse=function(te,ae){ae===void 0&&(ae=!0);var he="",ce,ye,Ee,Me,He,et,rt,vt,ot,it,wt,xt,It,Ot,Et,mr,Tr,Yt,gr=te.length;for(ce=0;ce0&&Et.tokens[0].type==="text"?(Et.tokens[0].text=Yt+" "+Et.tokens[0].text,Et.tokens[0].tokens&&Et.tokens[0].tokens.length>0&&Et.tokens[0].tokens[0].type==="text"&&(Et.tokens[0].tokens[0].text=Yt+" "+Et.tokens[0].tokens[0].text)):Et.tokens.unshift({type:"text",text:Yt}):Ot+=Yt),Ot+=this.parse(Et.tokens,It),ot+=this.renderer.listitem(Ot,Tr,mr);he+=this.renderer.list(ot,wt,xt);continue}case"html":{he+=this.renderer.html(it.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(ot=it.tokens?this.parseInline(it.tokens):it.text;ce+1An error occurred:
"+Qe(Ee.message+"",!0)+"
";throw Ee}}oe.options=oe.setOptions=function(ee){return nt(oe.defaults,ee),Ze(oe.defaults),oe},oe.getDefaults=ke,oe.defaults=Ve,oe.use=function(ee){var ie=nt({},ee);if(ee.renderer&&function(){var te=oe.defaults.renderer||new Re,ae=function(ye){var Ee=te[ye];te[ye]=function(){for(var Me=arguments.length,He=new Array(Me),et=0;et`,triples:"",explode:"[]{}"},O=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(A,S,d){d&&d!=fe.Init&&(A.removeKeyMap(U),A.state.closeBrackets=null),S&&(k(J(S,"pairs")),A.state.closeBrackets=S,A.addKeyMap(U))});function J(A,S){return S=="pairs"&&typeof A=="string"?A:typeof A=="object"&&A[S]!=null?A[S]:Z[S]}var U={Backspace:F,Enter:R};function k(A){for(var S=0;S=0;l--){var C=o[l].head;A.replaceRange("",O(C.line,C.ch-1),O(C.line,C.ch+1),"+delete")}}function R(A){var S=H(A),d=S&&J(S,"explode");if(!d||A.getOption("disableInput"))return fe.Pass;for(var o=A.listSelections(),l=0;l0;return{anchor:new O(A.anchor.line,A.anchor.ch+(S?-1:1)),head:new O(A.head.line,A.head.ch+(S?1:-1))}}function w(A,S){var d=H(A);if(!d||A.getOption("disableInput"))return fe.Pass;var o=J(d,"pairs"),l=o.indexOf(S);if(l==-1)return fe.Pass;for(var u=J(d,"closeBefore"),C=J(d,"triples"),v=o.charAt(l+1)==S,m=A.listSelections(),_=l%2==0,x,p=0;p=0&&A.getRange(h,O(h.line,h.ch+3))==S+S+S?a="skipThree":a="skip";else if(v&&h.ch>1&&C.indexOf(S)>=0&&A.getRange(O(h.line,h.ch-2),h)==S+S){if(h.ch>2&&/\bstring/.test(A.getTokenTypeAt(O(h.line,h.ch-2))))return fe.Pass;a="addFour"}else if(v){var g=h.ch==0?" ":A.getRange(O(h.line,h.ch-1),h);if(!fe.isWordChar(y)&&g!=S&&!fe.isWordChar(g))a="both";else return fe.Pass}else if(_&&(y.length===0||/\s/.test(y)||u.indexOf(y)>-1))a="both";else return fe.Pass;if(!x)x=a;else if(x!=a)return fe.Pass}var b=l%2?o.charAt(l-1):S,N=l%2?S:o.charAt(l+1);A.operation(function(){if(x=="skip")A.execCommand("goCharRight");else if(x=="skipThree")for(var j=0;j<3;j++)A.execCommand("goCharRight");else if(x=="surround"){for(var K=A.getSelections(),j=0;j0&&(de.percent=de.loaded/de.total*100),V.onProgress(de)});var I=new FormData;V.data&&Object.keys(V.data).forEach(function(ne){var de=V.data[ne];if(Array.isArray(de)){de.forEach(function(me){I.append(ne+"[]",me)});return}I.append(ne,V.data[ne])}),V.file instanceof Blob?I.append(V.filename,V.file,V.file.name):I.append(V.filename,V.file),P.onerror=function(de){V.onError(de)},P.onload=function(){return P.status<200||P.status>=300?V.onError(U(V,P),k(P)):V.onSuccess(k(P),P)},P.open(V.method,V.action,!0),V.withCredentials&&"withCredentials"in P&&(P.withCredentials=!0);var $=V.headers||{};return $["X-Requested-With"]!==null&&P.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys($).forEach(function(ne){$[ne]!==null&&P.setRequestHeader(ne,$[ne])}),P.send(I),{abort:function(){P.abort()}}}var H=+new Date,F=0;function R(){return"rc-upload-"+H+"-"+ ++F}function E(V,P){return V.indexOf(P,V.length-P.length)!==-1}var w=function(V,P){if(V&&P){var I=Array.isArray(P)?P:P.split(","),$=V.name||"",ne=V.type||"",de=ne.replace(/\/.*$/,"");return I.some(function(me){var De=me.trim();return De.charAt(0)==="."?E($.toLowerCase(),De.toLowerCase()):/\/\*$/.test(De)?de===De.replace(/\/.*$/,""):ne===De})}return!0};function M(V,P){var I=V.createReader(),$=[];function ne(){I.readEntries(function(de){var me=Array.prototype.slice.apply(de);$=$.concat(me);var De=!me.length;De?P($):ne()})}ne()}var L=function(P,I,$){var ne=function de(me,De){De=De||"",me.isFile?me.file(function(xe){$(xe)&&(me.fullPath&&!xe.webkitRelativePath&&(Object.defineProperties(xe,{webkitRelativePath:{writable:!0}}),xe.webkitRelativePath=me.fullPath.replace(/^\//,""),Object.defineProperties(xe,{webkitRelativePath:{writable:!1}})),I([xe]))}):me.isDirectory&&M(me,function(xe){xe.forEach(function(Le){de(Le,""+De+me.name+"/")})})};P.forEach(function(de){ne(de.webkitGetAsEntry())})},A=L,S=Object.assign||function(V){for(var P=1;P=0)continue;if(!Object.prototype.hasOwnProperty.call(V,$))continue;I[$]=V[$]}return I}function C(V,P){if(!(V instanceof P))throw new TypeError("Cannot call a class as a function")}function v(V,P){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:V}function m(V,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);V.prototype=Object.create(P&&P.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(V,P):V.__proto__=P)}var _=function(P){return Object.keys(P).reduce(function(I,$){return($.substr(0,5)==="data-"||$.substr(0,5)==="aria-"||$==="role")&&(I[$]=P[$]),I},{})},x=function(V){m(P,V);function P(){var I,$,ne,de;C(this,P);for(var me=arguments.length,De=Array(me),xe=0;xe1&&arguments[1]!==void 0?arguments[1]:1,le=Pe.length,te=0;te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(_.a)(I).map(function(ne,de){if(!U.isValidElement(ne)||!ne.type)return null;var me=ne.type.isSelectOptGroup,De=ne.key,xe=ne.props,Le=xe.children,Te=Object(G.a)(xe,["children"]);return $||!me?x(ne):Object(m.a)(Object(m.a)({key:"__RC_SELECT_GRP__".concat(De===null?de:De,"__"),label:De},Te),{},{options:p(Le)})}).filter(function(ne){return ne})}var c=ue("2Qr1"),h=ue("qNPg"),a=ue("U8pU"),y=ue("Kwbf"),g=ue("WKfj");function b(I){var $=I.mode,ne=I.options,de=I.children,me=I.backfill,De=I.allowClear,xe=I.placeholder,Le=I.getInputElement,Te=I.showSearch,Se=I.onSearch,ve=I.defaultOpen,z=I.autoFocus,s=I.labelInValue,f=I.value,D=I.inputValue,X=I.optionLabelProp,B=$==="multiple"||$==="tags",se=Te!==void 0?Te:B||$==="combobox",be=ne||p(de);if(Object(y.a)($!=="tags"||be.every(function(Re){return!Re.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var we=be.some(function(Re){return Re.options?Re.options.some(function(Pe){return typeof("value"in Pe?Pe.value:Pe.key)=="number"}):typeof("value"in Re?Re.value:Re.key)=="number"});Object(y.a)(!we,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(y.a)($!=="combobox"||!X,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(y.a)($==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(y.a)($==="combobox"||!Le,"`getInputElement` only work with `combobox` mode."),Object(y.b)($!=="combobox"||!Le||!De||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Se&&!se&&$!=="combobox"&&$!=="tags"&&Object(y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(y.b)(!ve||z,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),f!=null){var Oe=Object(g.d)(f);Object(y.a)(!s||Oe.every(function(Re){return Object(a.a)(Re)==="object"&&("key"in Re||"value"in Re)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(y.a)(!B||Array.isArray(f),"`value` should be array when `mode` is `multiple` or `tags`")}if(de){var _e=null;Object(_.a)(de).some(function(Re){if(!U.isValidElement(Re)||!Re.type)return!1;var Pe=Re.type;if(Pe.isSelectOption)return!1;if(Pe.isSelectOptGroup){var Fe=Object(_.a)(Re.props.children).every(function(Ge){return!U.isValidElement(Ge)||!Re.type||Ge.type.isSelectOption?!0:(_e=Ge.type,!1)});return!Fe}return _e=Pe,!0}),_e&&Object(y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_e.displayName||_e.name||_e,"`.")),Object(y.a)(D===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var N=b,j=Object(h.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:p,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:N,fillOptionsWithMissingValue:c.a}),K=function(I){Object(O.a)(ne,I);var $=Object(J.a)(ne);function ne(){var de;return Object(fe.a)(this,ne),de=$.apply(this,arguments),de.selectRef=U.createRef(),de.focus=function(){de.selectRef.current.focus()},de.blur=function(){de.selectRef.current.blur()},de}return Object(Z.a)(ne,[{key:"render",value:function(){return U.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),ne}(U.Component);K.Option=u,K.OptGroup=v;var V=K,P=$e.c=V},M8RZ:function(ht,$e,ue){"use strict";ue.d($e,"a",function(){return F});var fe=ue("fWQN"),Z=ue("mtLc"),O=ue("yKVA"),J=ue("879j"),U=ue("q1tI"),k=ue.n(U),G=ue("i8i4"),H=ue.n(G),F=function(R){Object(O.a)(w,R);var E=Object(J.a)(w);function w(M){var L;Object(fe.a)(this,w),L=E.call(this,M);var A=window.document;return L.node=A.createElement("div"),A.body.appendChild(L.node),L}return Object(Z.a)(w,[{key:"render",value:function(){var L=this.props.children;return Object(G.createPortal)(L,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),w}(k.a.Component)},Ot1p:function(ht,$e,ue){"use strict";var fe=ue("2qtc"),Z=ue("kLXV"),O=ue("rAM+"),J=ue("miYZ"),U=ue("tsqr"),k=ue("9og8"),G=ue("tJVT"),H=ue("jrin"),F=ue("WmNS"),R=ue.n(F),E=ue("q1tI"),w=ue.n(E),M=ue("VrN/"),L=ue.n(M),A=ue("bdgK"),S=ue("p77/"),d=ue("Bd2K"),o=ue("ELLl"),l=ue("19Vz"),u=ue("lZu9"),C=ue("+NIl"),v=ue("kSUc"),m=ue("9Bee"),_=function(ye){var Ee=ye.value,Me=Ee===void 0?"":Ee,He=ye.className,et=ye.showTextOnly,rt=ye.showLines,vt=ye.style,ot=vt===void 0?{}:vt,it=Object(E.useMemo)(function(){return""},[Me]);return w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{dangerouslySetInnerHTML:{__html:it}}))},x=ue("0Owb"),p=ue("dejd"),c=ue("C+DQ"),h=ue("1vsH"),a=ue("m3rI"),y=[{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 g(ye){var Ee=ye.onActionCallback,Me=ye.title,He=ye.icon,et=ye.actionName,rt=ye.className,vt=rt===void 0?"":rt,ot=ye.children;function it(){Ee(et)}return w.a.createElement("a",{title:Me,className:vt,onClick:it},w.a.createElement("i",{className:"md-iconfont ".concat(He)}),ot)}var b=function(ye){var Ee=ye.watch,Me=ye.showNullButton,He=ye.onActionCallback,et=ye.fullScreen,rt=ye.insertTemp,vt=ye.hidetoolBar,ot=ye.uuid,it=ye.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(h.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(h.F)("_educoder_session"),"&key=").concat(ot,"&api=").concat(encodeURIComponent(a.a.PROXY_SERVER)));var wt=[].concat(y,[{title:"".concat(Ee?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ee?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return w.a.createElement("ul",{className:"markdown-toolbar-container"},!vt&&wt.map(function(xt,It){return w.a.createElement("li",{key:It},xt.actionName?w.a.createElement(g,Object(x.a)({},xt,{onActionCallback:He})):w.a.createElement("span",{className:"v-line"}))}),Me?w.a.createElement("li",null,w.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:He},w.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,rt&&w.a.createElement("li",null,w.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(rt),onActionCallback:He},w.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),w.a.createElement("li",{className:"btn-full-screen"},w.a.createElement(g,{icon:"".concat(et?"icon-shrink":"icon-enlarge"),title:et?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:He})))},N=ue("M8RZ"),j=ue("+L6B"),K=ue("2/Rp"),V=ue("y8nQ"),P=ue("Vl3Y"),I=ue("5NDa"),$=ue("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},de=function(ye){var Ee=ye.callback,Me=ye.onCancel;function He(et){Ee(et)}return w.a.createElement(P.a,Object(x.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:He}),w.a.createElement(P.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},w.a.createElement($.a,null)),w.a.createElement(P.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},w.a.createElement($.a,null)),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},me=ue("7ahc"),De=ue("HmJG"),xe=ue("BjJ7"),Le=P.a.useForm,Te={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}},ve=function(ye){var Ee=ye.callback,Me=ye.onCancel,He=Le(),et=Object(G.a)(He,1),rt=et[0];function vt(wt){Ee(wt)}function ot(wt,xt){if(wt.status===-1){U.b.error(wt.message);return}rt.setFieldsValue({src:"/api/attachments/".concat(wt.id),type:xt.type})}function it(wt){var xt=wt.target.files[0];s(xt,ot)}return w.a.createElement(P.a,Object(x.a)({form:rt},Se,{className:"upload-image-panel",onFinish:vt}),w.a.createElement(P.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},w.a.createElement("div",{className:"flex-container"},w.a.createElement(P.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},w.a.createElement($.a,{style:Te})),w.a.createElement(z,{onFileChange:it}))),w.a.createElement(P.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},w.a.createElement($.a,{style:{width:264}})),w.a.createElement(P.a.Item,{style:{textAlign:"right"}},w.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))};function z(ye){var Ee=ye.onFileChange;return w.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",w.a.createElement("input",{type:"file",onChange:Ee}))}function s(ye,Ee){if(!ye)throw new String("\u6CA1\u6709\u6587\u4EF6");var Me=new FormData;Me.append("editormd-image-file",ye),Me.append("file_param_name","editormd-image-file"),Me.append("byxhr","true");var He=new window.XMLHttpRequest;He.withCredentials=!0,He.addEventListener("load",function(et){Ee(JSON.parse(et.target.responseText),ye)},!1),He.addEventListener("error",function(et){console.error(et)},!1),He.open("POST","".concat(xe.a,"/api/attachments.json")),He.send(Me)}var f=ue("giR+"),D=ue("fyUT"),X=ue("7Kak"),B=ue("9yH6"),se=B.a.Group,be={margin:"0 8px"},we=function(ye){var Ee=ye.callback,Me=ye.onCancel;function He(et){Ee(et)}return w.a.createElement(P.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:He},w.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},w.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),w.a.createElement("span",{style:be},"\u884C\u6570"),w.a.createElement(P.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},w.a.createElement(D.a,null)),w.a.createElement("span",{style:be},"\u5217\u6570"),w.a.createElement(P.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},w.a.createElement(D.a,null))),w.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},w.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),w.a.createElement(P.a.Item,{name:"align"},w.a.createElement(se,null,w.a.createElement(B.a,{value:"default"},w.a.createElement("i",{className:"fa fa-align-justify"})),w.a.createElement(B.a,{value:"left"},w.a.createElement("i",{className:"fa fa-align-left"})),w.a.createElement(B.a,{value:"center"},w.a.createElement("i",{className:"fa fa-align-center"})),w.a.createElement(B.a,{value:"right"},w.a.createElement("i",{className:"fa fa-align-right"}))))),w.a.createElement("div",{className:"flex-container flex-end"},w.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),w.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},Oe=ue("ErOA"),_e=ue("7Cbv"),Re="link",Pe="upload-image",Fe="code-block",Ge="add-table",ze="------------",We={default:ze,left:":".concat(ze),center:":".concat(ze,":"),right:"".concat(ze,":")},nt=ue("9VGf"),Ke,Qe;function ke(){}var Ze=0,Ve=1e4,oe="\u2581",q=`
**\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 ee(ye){return/^\d+$/.test(ye)?"".concat(ye,"px"):ye}var ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,le=ie?"Cmd":"Ctrl",te=["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"],ae=(Ke={},Object(H.a)(Ke,le+"-B","bold"),Object(H.a)(Ke,le+"-I","italic"),Ke),he=(Qe={},Object(H.a)(Qe,Re,"\u6DFB\u52A0\u94FE\u63A5"),Object(H.a)(Qe,Fe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(H.a)(Qe,Pe,"\u6DFB\u52A0\u6587\u4EF6"),Object(H.a)(Qe,Ge,"\u6DFB\u52A0\u8868\u683C"),Qe),ce=$e.a=function(ye){var Ee=ye.defaultValue,Me=Ee===void 0?"":Ee,He=ye.onChange,et=ye.width,rt=et===void 0?"100%":et,vt=ye.height,ot=vt===void 0?400:vt,it=ye.miniToolbar,wt=it===void 0?!1:it,xt=ye.isFocus,It=xt===void 0?!1:xt,Ot=ye.watch,Et=ye.insertTemp,mr=ye.mode,Tr=mr===void 0?"markdown":mr,Yt=ye.id,gr=Yt===void 0?"markdown-editor-id":Yt,cr=ye.showResizeBar,zr=cr===void 0?!1:cr,$t=ye.noStorage,Nr=$t===void 0?!1:$t,ti=ye.showNullButton,Pt=ti===void 0?!1:ti,Je=ye.hidetoolBar,Tt=Je===void 0?!1:Je,Zt=ye.fullScreen,mt=Zt===void 0?!1:Zt,pt=ye.onBlur,At=ye.onCMBeforeChange,vr=ye.onFullScreen,Ut=ye.className,Be=Ut===void 0?"":Ut,dt=ye.disablePaste,ri=dt===void 0?!1:dt,bi=ye.placeholder,xi=bi===void 0?"":bi,ii=ye.values,Ei=ii===void 0?"":ii,ft=Object(E.useState)(null),_n=Object(G.a)(ft,2),Ue=_n[0],Si=_n[1],Er=Object(E.useState)(Me),Ki=Object(G.a)(Er,2),ni=Ki[0],Cr=Ki[1],Vi=Object(E.useState)(Ot),Xi=Object(G.a)(Vi,2),wr=Xi[0],Yi=Xi[1],Ln=Object(E.useState)(mt),$i=Object(G.a)(Ln,2),Ar=$i[0],kn=$i[1],aa=Object(E.useState)(""),Zi=Object(G.a)(aa,2),rr=Zi[0],Kr=Zi[1],oa=Object(E.useState)(0),ai=Object(G.a)(oa,2),_r=ai[0],Ji=ai[1],sa=Object(E.useState)(ot),Dn=Object(G.a)(sa,2),Rn=Dn[0],Ti=Dn[1],On=Object(E.useState)(!1),Pn=Object(G.a)(On,2),la=Pn[0],Ci=Pn[1],oi=Object(E.useRef)(Object(_e.a)()),si=Object(E.useRef)(!1),wi=Object(E.useRef)(),Br=Object(E.useRef)(),Fr=Object(E.useRef)(),Ur=Object(E.useRef)(),Ai=Object(E.useRef)(),Mn=function(){var at=Object(k.a)(R.a.mark(function ct(){var lt,yt;return R.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,Object(Oe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:oi.current}});case 2:yt=Dt.sent,yt!=null&&(lt=yt.attachments)!==null&<!==void 0&<.length&&(console.log("cm:",Ue,Br),yt.attachments.map(function(St){St.content_type.indexOf("image")>-1?Ue.replaceSelection(".concat(St.content_type,")")):St.content_type.indexOf("video")>-1?Ue.replaceSelection('')):St.content_type.indexOf("pdf")>-1?Ue.replaceSelection('').concat(St.name,"")):Ue.replaceSelection("[".concat(St.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(St.content_type,")"))}));case 4:case"end":return Dt.stop()}},ct)}));return function(){return at.apply(this,arguments)}}();Object(E.useEffect)(function(){Cr(Ei),Ue==null||Ue.setValue(Ei)},[Ei]),Object(E.useEffect)(function(){vr==null||vr(Ar)},[Ar]),Object(E.useEffect)(function(){if(Br.current){var at=L.a.fromTextArea(Br.current,{mode:Tr,lineNumbers:!wt,lineWrapping:!0,value:Me,autoCloseTags:!0,autoCloseBrackets:!0});It&&at.focus();function ct(lt,yt){if(ri){yt.preventDefault();return}var Ct=yt.clipboardData;if(Ct){var Dt=Ct.types.toString(),St=Ct.items;if(Dt==="Files"||Ct.types.indexOf("Files")>-1){if(yt.preventDefault(),Tr=="stex")return;try{var Ht,ar=St[1];((Ht=St[0])===null||Ht===void 0?void 0:Ht.kind)==="file"&&(ar=St[0]);var bt=ar.getAsFile(),jr=bt.name.split(".").pop();s(bt,function(_t){if(_t.id){var or,qt,Sr;(bt==null||((or=bt.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?at.replaceSelection(".concat(_t.content_type,")")):(bt==null||((qt=bt.type)===null||qt===void 0)?void 0:qt.indexOf("video"))>-1?at.replaceSelection('')):(bt==null||((Sr=bt.type)===null||Sr===void 0)?void 0:Sr.indexOf("pdf"))>-1?at.replaceSelection('').concat(bt.name,"")):te.includes(jr)?at.replaceSelection('').concat(bt.name,"")):at.replaceSelection("[".concat(bt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(_t.id,"?type=").concat(_t.content_type,")"))}else(_t==null?void 0:_t.status)===401&&(document.location.href="/user/login")})}catch(_t){U.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return at.on("paste",ct),at.on("dragleave",function(lt,yt){Fr.current.classList.remove("mouse-hover-md")}),at.on("dragover",function(lt,yt){Fr.current.classList.add("mouse-hover-md")}),at.on("drop",function(lt,yt){Fr.current.classList.add("mouse-hover-md");var Ct;if(Ct=yt.dataTransfer.files,Ct.length>0){yt.preventDefault(),yt.stopPropagation();for(var Dt=function(ar){var bt=Ct[ar],jr=bt.name.split(".").pop();s(bt,function(_t){if(_t.id){var or,qt,Sr;(bt==null||((or=bt.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?at.replaceSelection(".concat(_t.content_type,")")):(bt==null||((qt=bt.type)===null||qt===void 0)?void 0:qt.indexOf("video"))>-1?at.replaceSelection('')):(bt==null||((Sr=bt.type)===null||Sr===void 0)?void 0:Sr.indexOf("pdf"))>-1?at.replaceSelection('').concat(bt.name,"")):te.includes(jr)?at.replaceSelection('').concat(bt.name,"")):at.replaceSelection("[".concat(bt.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(_t.id,"?type=").concat(_t.content_type,")"))}else(_t==null?void 0:_t.status)===401&&(document.location.href="/user/login")})},St=0;St0||St.target.offsetWidth>0)&&(yr(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(Ht){Ct.e(Ht)}finally{Ct.f()}});return lt.observe(Br.current.parentElement),lt}if(Ue){var ct=at();return function(){ct.unobserve(Br.current.parentElement)}}},[Ue,yr]),Object(E.useEffect)(function(){if(Ue){for(var at=[],ct=function(){var St=yt[lt];Ct=Object(G.a)(St,2);var Ht=Ct[0],ar=Ct[1],bt=Object(H.a)({},Ht,function(){In(ar)});at.push(bt),Ue.addKeyMap(bt)},lt=0,yt=Object.entries(ae);lt0){var at=new Date().getTime(),ct=window.sessionStorage.getItem(gr);at>=_r+Ve&&(!ct||ct!==ni)&&(window.sessionStorage.setItem(gr,ni),Ci(!0))}},Ve),Object(E.useEffect)(function(){Yi(Ot)},[Ue,Ot]),Object(E.useEffect)(function(){Ue&&(It&&Ue.focus())},[Ue,It]),Object(E.useEffect)(function(){if(wr&&Ue){var at=Ue.getScrollerElement();function ct(lt){var yt=lt.target;if(Ai.current){var Ct=yt.scrollTop/yt.scrollHeight;Ai.current.scrollTop=Ai.current.scrollHeight*Ct}}return at.addEventListener("scroll",ct),function(){at.removeEventListener("scroll",ct)}}},[Ue,wr]),Object(E.useEffect)(function(){if(Ue&&At){function at(ct,lt){At(ct,lt)}return Ue.on("beforeChange",at),function(){Ue.off("beforeChange",at)}}},[Ue,At]),Object(E.useEffect)(function(){if(Ue&&pt){function at(){pt(Ue.getValue())}return Ue.on("blur",at),function(){Ue.off("blur",at)}}},[Ue,pt]),Object(E.useEffect)(function(){if(Ue){function at(ct){var lt=ct.getValue();Cr(lt),Ji(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),He&&He(lt)}return Ue.on("change",at),function(){Ue.off("change",at)}}},[Ue,He]),Object(E.useEffect)(function(){Ue&&(Me==null?(Ue.setValue(""),Cr("")):Me!==Ue.getValue()&&(Ue.setValue(Me),Cr(Me),Ue.setCursor(Ue.lineCount(),0)))},[Ue,Me]);var In=Object(E.useCallback)(function(at){var ct=Ue.getCursor(),lt=Ue.getSelection(),yt=lt.split(`
`);switch(at){case"bold":return Ue.replaceSelection("**"+lt+"**"),lt===""&&Ue.setCursor(ct.line,ct.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+lt+"*"),lt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+lt+"`"),lt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+lt+"$$`"),lt===""&&Ue.setCursor(ct.line,ct.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+lt+"\n```"),Ue.setCursor(ct.line+1,lt.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`
`),Ue.focus();case"list-ul":return lt===""?Ue.replaceSelection("- "+lt):Ue.replaceSelection(yt.map(function(Ct){return Ct===""?"":"- ".concat(Ct)}).join(`
`)),Ue.focus();case"list-ol":return lt===""?Ue.replaceSelection("1. "+lt):Ue.replaceSelection(yt.map(function(Ct,Dt){return Ct===""?"":"".concat(Dt+1,". ").concat(Ct)}).join(`
`)),Ue.focus();case"add-null-ch":return lt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.replaceSelection(oe),Ue.focus();case"inster-template-1":return lt===""&&Ue.setCursor(ct.line,ct.ch),Ue.replaceSelection(q),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return Yi(!wr),Ue.focus();case"trigger-full-screen":return kn(!Ar),Ue.focus();case Re:Kr(Re);return;case Fe:Kr(Fe);return;case Pe:Kr(Pe);return;case Ge:Kr(Ge);return;default:throw new Error}},[Ue,wr,Ar]),_i=Object(E.useCallback)(function(at){Kr("");switch(rr){case Re:var ct=at.title,lt=at.link;return Ue.replaceSelection("[".concat(ct,"](").concat(lt,")")),Ue.focus();case Fe:var yt=at.language,Ct=at.content;return Ue.replaceSelection(["```"+yt,Ct,"```"].join(`
`)),Ue.focus();case Pe:var Dt=at.src,St=at.alt;return St?Ue.replaceSelection(".concat(Dt,' "').concat(St,'" )')):Ue.replaceSelection("")),Ue.focus();case Ge:for(var Ht=at.row,ar=at.col,bt=at.align,jr=`
`,_t=0;_t300&&(Ht=300);var ar=ot+Ht+"px";Ti(ar)}}return at.addEventListener("mousedown",yt),document.addEventListener("mousemove",Dt),document.addEventListener("mouseup",Ct),function(){at.removeEventListener("mousedown",yt),document.removeEventListener("mousemove",Dt),document.removeEventListener("mouseup",Ct)}}},[Ue,Ur]),Object(E.useEffect)(function(){Ti(ot)},[ot]);var Or=ee(rt),qi=ee(Rn),Lr={width:Or,height:qi},en=Object(E.useMemo)(function(){if(_r){var at=new Date(_r),ct=at.getHours(),lt=at.getMinutes(),yt=at.getSeconds();return ct=ct<10?"0"+ct:ct,lt=lt<10?"0"+lt:lt,yt=yt<10?"0"+yt:yt,"".concat(ct,":").concat(lt,":").concat(yt)}return 0},[_r]);function Nn(){window.sessionStorage.removeItem(gr),Ci(!1),Ji(0)}function li(){Ci(!1),Ji(0),Ue.setValue(window.sessionStorage.getItem(gr))}function ua(at,ct){var lt=Ue.getValue();lt=lt.replace(at,ct),Cr(lt),Ue==null||Ue.setValue(lt)}return w.a.createElement(E.Fragment,null,w.a.createElement("div",{className:"markdown-editor-wrapper",ref:Fr},w.a.createElement("div",{className:"markdown-editor-container ".concat(Be," ").concat(wr?"on-preview":""," ").concat(wt?"mini":""," ").concat(Ar?"full-screen":""),style:Lr},w.a.createElement(b,{insertTemp:Et,watch:wr,fullScreen:Ar,showNullButton:Pt,onActionCallback:In,hidetoolBar:Tt,uuid:oi.current,setOpenPhones:function(){si.current=!0}}),w.a.createElement("div",{className:"markdown-editor-body"},w.a.createElement("div",{className:"codemirror-container"},w.a.createElement("textarea",{ref:Br,placeholder:xi})),wr?w.a.createElement("div",{ref:Ai,className:"preview-container"},Tr==="stex"&&w.a.createElement(_,{value:ni}),Tr!=="stex"&&w.a.createElement(m.a,{edit:!0,value:ni,replaces:ua})):null))),zr?w.a.createElement("a",{ref:Ur,className:"editor-resize"}):null,w.a.createElement(N.a,null,he[rr]?w.a.createElement(Z.a,{centered:!0,title:he[rr],visible:!0,onCancel:Vr,footer:null,className:"markdown-popup-form"},Qi):null))}},SJMd:function(ht,$e){/**
* @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 ue,fe,Z,O=!1,J,U;window.PR_SHOULD_USE_CONTINUATION=!0;var k,G;(function(){var H=window,F=["break,continue,do,else,for,if,return,while"],R=[F,"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"],E=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],w=[E,"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"],M=[E,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],L=[E,"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"],A="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",S=[E,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[F,"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"],l=[F,"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"],u=[F,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],C=[w,L,M,S,d,o,l,u],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",_="kwd",x="com",p="typ",c="lit",h="pun",a="pln",y="tag",g="dec",b="src",N="atn",j="atv",K="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function P(se){for(var be=0,we=!1,Oe=!1,_e=0,Re=se.length;_e122||(te<65||le>90||Ze.push([Math.max(65,le)|32,Math.min(te,90)|32]),te<97||le>122||Ze.push([Math.max(97,le)&~32,Math.min(te,122)&~32]))}}Ze.sort(function(ye,Ee){return ye[0]-Ee[0]||Ee[1]-ye[1]});for(var ae=[],he=[],q=0;qce[0]&&(ce[1]+1>ce[0]&&oe.push("-"),oe.push(ze(ce[1])))}return oe.push("]"),oe.join("")}function nt(Qe){for(var ke=Qe.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")),Ze=ke.length,Ve=[],oe=0,q=0;oe=2&&le==="["?ke[oe]=We(ee):le!=="\\"&&(ke[oe]=ee.replace(/[a-zA-Z]/g,function(he){var ce=he.charCodeAt(0);return"["+String.fromCharCode(ce&~32,ce|32)+"]"}))}return ke.join("")}for(var Ke=[],_e=0,Re=se.length;_e=0;)we[Ke.charAt(Qe)]=nt;var ke=nt[1],Ze=""+ke;Ge.hasOwnProperty(Ze)||(Fe.push(ke),Ge[Ze]=null)}Fe.push(/[\0-\uffff]/),Oe=P(Fe)})();var _e=be.length,Re=function(Pe){for(var Fe=Pe.sourceCode,Ge=Pe.basePos,ze=Pe.sourceNode,We=[Ge,a],nt=0,Ke=Fe.match(Oe)||[],Qe={},ke=0,Ze=Ke.length;ke=5&&oe.substring(0,5)==="lang-",ee&&!(q&&typeof q[1]=="string")&&(ee=!1,oe=b),ee||(Qe[Ve]=oe)}var te=nt;if(nt+=Ve.length,!ee)We.push(Ge+te,oe);else{var ae=q[1],he=Ve.indexOf(ae),ce=he+ae.length;q[2]&&(ce=Ve.length-q[2].length,he=ce-ae.length);var ye=oe.substring(5);$(ze,Ge+te,Ve.substring(0,he),Re,We),$(ze,Ge+te+he,ae,z(ye,ae),We),$(ze,Ge+te+ce,Ve.substring(ce),Re,We)}}Pe.decorations=We};return Re}function De(se){var be=[],we=[];se.tripleQuotedStrings?be.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):se.multiLineStrings?be.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):be.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),se.verbatimStrings&&we.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Oe=se.hashComments;Oe&&(se.cStyleComments?(Oe>1?be.push([x,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):be.push([x,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),we.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):be.push([x,/^#[^\r\n]*/,null,"#"])),se.cStyleComments&&(we.push([x,/^\/\/[^\r\n]*/,null]),we.push([x,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var _e=se.regexLiterals;if(_e){var Re=_e>1?"":`
\r`,Pe=Re?".":"[\\S\\s]",Fe="/(?=[^/*"+Re+"])(?:[^/\\x5B\\x5C"+Re+"]|\\x5C"+Pe+"|\\x5B(?:[^\\x5C\\x5D"+Re+"]|\\x5C"+Pe+")*(?:\\x5D|$))+/";we.push(["lang-regex",RegExp("^"+V+"("+Fe+")")])}var Ge=se.types;Ge&&we.push([p,Ge]);var ze=(""+se.keywords).replace(/^ | $/g,"");ze.length&&we.push([_,new RegExp("^(?:"+ze.replace(/[\s,]+/g,"|")+")\\b"),null]),be.push([a,/^\s+/,null,` \r
\xA0`]);var We="^.[^\\s\\w.$@'\"`/\\\\]*";return se.regexLiterals&&(We+="(?!s*/)"),we.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[p,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[h,new RegExp(We),null]),me(be,we)}var xe=De({keywords:C,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Le(se,be,we){for(var Oe=/(?:^|\s)nocode(?:\s|$)/,_e=/\r\n?|\n/,Re=se.ownerDocument,Pe=Re.createElement("li");se.firstChild;)Pe.appendChild(se.firstChild);var Fe=[Pe];function Ge(ke){var Ze=ke.nodeType;if(Ze==1&&!Oe.test(ke.className))if(ke.nodeName==="br")ze(ke),ke.parentNode&&ke.parentNode.removeChild(ke);else for(var Ve=ke.firstChild;Ve;Ve=Ve.nextSibling)Ge(Ve);else if((Ze==3||Ze==4)&&we){var oe=ke.nodeValue,q=oe.match(_e);if(q){var ee=oe.substring(0,q.index);ke.nodeValue=ee;var ie=oe.substring(q.index+q[0].length);if(ie){var le=ke.parentNode;le.insertBefore(Re.createTextNode(ie),ke.nextSibling)}ze(ke),ee||ke.parentNode.removeChild(ke)}}}function ze(ke){for(;!ke.nextSibling;)if(ke=ke.parentNode,!ke)return;function Ze(q,ee){var ie=ee?q.cloneNode(!1):q,le=q.parentNode;if(le){var te=Ze(le,1),ae=q.nextSibling;te.appendChild(ie);for(var he=ae;he;he=ae)ae=he.nextSibling,te.appendChild(he)}return ie}for(var Ve=Ze(ke.nextSibling,0),oe;(oe=Ve.parentNode)&&oe.nodeType===1;)Ve=oe;Fe.push(Ve)}for(var We=0;We=le&&(Ge+=2),Re>=te&&(nt+=2)}}finally{oe&&(oe.style.display=q)}}var Se={};function ve(se,be){for(var we=be.length;--we>=0;){var Oe=be[we];Se.hasOwnProperty(Oe)?H.console&&console.warn("cannot override language handler %s",Oe):Se[Oe]=se}}function z(se,be){return se&&Se.hasOwnProperty(se)||(se=/^\s*]*(?:>|$)/],[x,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[h,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^