(window.webpackJsonp=window.webpackJsonp||[]).push([[205,6,7,9,12],{"+NIl":function(ut,Ye,de){(function(ce){ce(de("VrN/"))})(function(ce){"use strict";ce.defineMode("stex",function($,O){"use strict";function J(k,w){k.cmdState.push(w)}function U(k){return k.cmdState.length>0?k.cmdState[k.cmdState.length-1]:null}function D(k){var w=k.cmdState.pop();w&&w.closeBracket()}function G(k){for(var w=k.cmdState,T=w.length-1;T>=0;T--){var d=w[T];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function H(k,w,T){return function(){this.name=k,this.bracketNo=0,this.style=w,this.styles=T,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var I={};I.importmodule=H("importmodule","tag",["string","builtin"]),I.documentclass=H("documentclass","tag",["","atom"]),I.usepackage=H("usepackage","tag",["atom"]),I.begin=H("begin","tag",["atom"]),I.end=H("end","tag",["atom"]),I.label=H("label","tag",["atom"]),I.ref=H("ref","tag",["atom"]),I.eqref=H("eqref","tag",["atom"]),I.cite=H("cite","tag",["atom"]),I.bibitem=H("bibitem","tag",["atom"]),I.Bibitem=H("Bibitem","tag",["atom"]),I.RBibitem=H("RBibitem","tag",["atom"]),I.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function _(k,w){k.f=w}function b(k,w){var T;if(k.match(/^\\[a-zA-Z@]+/)){var d=k.current().slice(1);return T=I.hasOwnProperty(d)?I[d]:I.DEFAULT,T=new T,J(w,T),_(w,P),T.style}if(k.match(/^\\[$&%#{}_]/))return"tag";if(k.match(/^\\[,;!\/\\]/))return"tag";if(k.match("\\["))return _(w,function(l,h){return A(l,h,"\\]")}),"keyword";if(k.match("\\("))return _(w,function(l,h){return A(l,h,"\\)")}),"keyword";if(k.match("$$"))return _(w,function(l,h){return A(l,h,"$$")}),"keyword";if(k.match("$"))return _(w,function(l,h){return A(l,h,"$")}),"keyword";var o=k.next();if(o=="%")return k.skipToEnd(),"comment";if(o=="}"||o=="]"){if(T=U(w),T)T.closeBracket(o),_(w,P);else return"error";return"bracket"}else return o=="{"||o=="["?(T=I.DEFAULT,T=new T,J(w,T),"bracket"):/\d/.test(o)?(k.eatWhile(/[\w.%]/),"atom"):(k.eatWhile(/[\w\-_]/),T=G(w),T.name=="begin"&&(T.argument=k.current()),T.styleIdentifier())}function A(k,w,T){if(k.eatSpace())return null;if(T&&k.match(T))return _(w,b),"keyword";if(k.match(/^\\[a-zA-Z@]+/))return"tag";if(k.match(/^[a-zA-Z]+/))return"variable-2";if(k.match(/^\\[$&%#{}_]/))return"tag";if(k.match(/^\\[,;!\/]/))return"tag";if(k.match(/^[\^_&]/))return"tag";if(k.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(k.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=k.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(k.skipToEnd(),"comment"):"error"}function P(k,w){var T=k.peek(),d;return T=="{"||T=="["?(d=U(w),d.openBracket(T),k.eat(T),_(w,b),"bracket"):/[ \t\r]/.test(T)?(k.eat(T),null):(_(w,b),D(w),b(k,w))}return{startState:function(){var k=O.inMathMode?function(w,T){return A(w,T)}:b;return{cmdState:[],f:k}},copyState:function(k){return{cmdState:k.cmdState.slice(),f:k.f}},token:function(k,w){return w.f(k,w)},blankLine:function(k){k.f=b,k.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},"19Vz":function(ut,Ye,de){(function(ce){ce(de("VrN/"))})(function(ce){ce.defineOption("placeholder","",function(H,I,_){var b=_&&_!=ce.Init;if(I&&!b)H.on("blur",U),H.on("change",D),H.on("swapDoc",D),ce.on(H.getInputField(),"compositionupdate",H.state.placeholderCompose=function(){J(H)}),D(H);else if(!I&&b){H.off("blur",U),H.off("change",D),H.off("swapDoc",D),ce.off(H.getInputField(),"compositionupdate",H.state.placeholderCompose),$(H);var A=H.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}I&&!H.hasFocus()&&U(H)});function $(H){H.state.placeholder&&(H.state.placeholder.parentNode.removeChild(H.state.placeholder),H.state.placeholder=null)}function O(H){$(H);var I=H.state.placeholder=document.createElement("pre");I.style.cssText="height: 0; overflow: visible",I.style.direction=H.getOption("direction"),I.className="CodeMirror-placeholder CodeMirror-line-like";var _=H.getOption("placeholder");typeof _=="string"&&(_=document.createTextNode(_)),I.appendChild(_),H.display.lineSpace.insertBefore(I,H.display.lineSpace.firstChild)}function J(H){setTimeout(function(){var I=!1,_=H.getInputField();_.nodeName=="TEXTAREA"?I=!_.value:H.lineCount()==1&&(I=!/[^\u200b]/.test(_.querySelector(".CodeMirror-line").textContent)),I?O(H):$(H)},20)}function U(H){G(H)&&O(H)}function D(H){var I=H.getWrapperElement(),_=G(H);I.className=I.className.replace(" CodeMirror-empty","")+(_?" CodeMirror-empty":""),_?O(H):$(H)}function G(H){return H.lineCount()===1&&H.getLine(0)===""}})},"1eCo":function(ut,Ye,de){(function(ce){ce(de("VrN/"))})(function(ce){"use strict";var $={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};ce.defineMode("xml",function(J,U){var D=J.indentUnit,G={},H=U.htmlMode?$:O;for(var I in H)G[I]=H[I];for(var I in U)G[I]=U[I];var _,b;function A(a,y){function m(W){return y.tokenize=W,W(a,y)}var x=a.next();if(x=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?m(w("atom","]]>")):null:a.match("--")?m(w("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),m(T(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),y.tokenize=w("meta","?>"),"meta"):(_=a.eat("/")?"closeTag":"openTag",y.tokenize=P,"tag bracket");if(x=="&"){var B;return a.eat("#")?a.eat("x")?B=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):B=a.eatWhile(/[\d]/)&&a.eat(";"):B=a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),B?"atom":"error"}else return a.eatWhile(/[^&<]/),null}A.isInText=!0;function P(a,y){var m=a.next();if(m==">"||m=="/"&&a.eat(">"))return y.tokenize=A,_=m==">"?"endTag":"selfcloseTag","tag bracket";if(m=="=")return _="equals",null;if(m=="<"){y.tokenize=A,y.state=h,y.tagName=y.tagStart=null;var x=y.tokenize(a,y);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(m)?(y.tokenize=k(m),y.stringStartCol=a.column(),y.tokenize(a,y)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function k(a){var y=function(m,x){for(;!m.eol();)if(m.next()==a){x.tokenize=P;break}return"string"};return y.isInAttribute=!0,y}function w(a,y){return function(m,x){for(;!m.eol();){if(m.match(y)){x.tokenize=A;break}m.next()}return a}}function T(a){return function(y,m){for(var x;(x=y.next())!=null;){if(x=="<")return m.tokenize=T(a+1),m.tokenize(y,m);if(x==">")if(a==1){m.tokenize=A;break}else return m.tokenize=T(a-1),m.tokenize(y,m)}return"meta"}}function d(a,y,m){this.prev=a.context,this.tagName=y,this.indent=a.indented,this.startOfLine=m,(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 m;;){if(!a.context)return;if(m=a.context.tagName,!G.contextGrabbers.hasOwnProperty(m)||!G.contextGrabbers[m].hasOwnProperty(y))return;o(a)}}function h(a,y,m){return a=="openTag"?(m.tagStart=y.column(),C):a=="closeTag"?v:h}function C(a,y,m){return a=="word"?(m.tagName=y.current(),b="tag",E):G.allowMissingTagName&&a=="endTag"?(b="tag bracket",E(a,y,m)):(b="error",C)}function v(a,y,m){if(a=="word"){var x=y.current();return m.context&&m.context.tagName!=x&&G.implicitlyClosed.hasOwnProperty(m.context.tagName)&&o(m),m.context&&m.context.tagName==x||G.matchClosing===!1?(b="tag",g):(b="tag error",L)}else return G.allowMissingTagName&&a=="endTag"?(b="tag bracket",g(a,y,m)):(b="error",L)}function g(a,y,m){return a!="endTag"?(b="error",g):(o(m),h)}function L(a,y,m){return b="error",g(a,y,m)}function E(a,y,m){if(a=="word")return b="attribute",p;if(a=="endTag"||a=="selfcloseTag"){var x=m.tagName,B=m.tagStart;return m.tagName=m.tagStart=null,a=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(x)?l(m,x):(l(m,x),m.context=new d(m,x,B==m.indented)),h}return b="error",E}function p(a,y,m){return a=="equals"?c:(G.allowMissing||(b="error"),E(a,y,m))}function c(a,y,m){return a=="string"?u:a=="word"&&G.allowUnquoted?(b="string",E):(b="error",E(a,y,m))}function u(a,y,m){return a=="string"?u:E(a,y,m)}return{startState:function(a){var y={tokenize:A,state:h,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;_=null;var m=y.tokenize(a,y);return(m||_)&&m!="comment"&&(b=null,y.state=y.state(_||m,a,y),b&&(m=b=="error"?m+" error":b)),m},indent:function(a,y,m){var x=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+D;if(x&&x.noIndent)return ce.Pass;if(a.tokenize!=P&&a.tokenize!=A)return m?m.match(/^(\s*)/)[0].length:0;if(a.tagName)return G.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+D*(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=E)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var y=[],m=a.context;m;m=m.prev)m.tagName&&y.push(m.tagName);return y.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"55Ip":function(ut,Ye,de){"use strict";de.d(Ye,"a",function(){return l});var ce=de("Ty5D"),$=de("dI71"),O=de("q1tI"),J=de.n(O),U=de("YS25"),D=de("17x9"),G=de.n(D),H=de("wx14"),I=de("zLVn"),_=de("9R94"),b=function(c){Object($.a)(u,c);function u(){for(var y,m=arguments.length,x=new Array(m),B=0;B1&&arguments[1]!==void 0?arguments[1]:0,w=(G[P[k+0]]+G[P[k+1]]+G[P[k+2]]+G[P[k+3]]+"-"+G[P[k+4]]+G[P[k+5]]+"-"+G[P[k+6]]+G[P[k+7]]+"-"+G[P[k+8]]+G[P[k+9]]+"-"+G[P[k+10]]+G[P[k+11]]+G[P[k+12]]+G[P[k+13]]+G[P[k+14]]+G[P[k+15]]).toLowerCase();if(!D(w))throw TypeError("Stringified UUID is invalid");return w}var _=I;function b(P,k,w){P=P||{};var T=P.random||(P.rng||O)();if(T[6]=T[6]&15|64,T[8]=T[8]&63|128,k){w=w||0;for(var d=0;d<16;++d)k[w+d]=T[d];return k}return _(T)}var A=Ye.a=b},"7ahc":function(ut,Ye,de){"use strict";de.d(Ye,"a",function(){return C});var ce=de("k1fw"),$=de("0Owb"),O=de("+L6B"),J=de("2/Rp"),U=de("y8nQ"),D=de("Vl3Y"),G=de("tJVT"),H=de("OaEy"),I=de("2fM7"),_=de("q1tI"),b=de.n(_),A=de("VrN/"),P=de.n(A),k=de("p77/"),w=de.n(k),T=de("c5Ni"),d=de.n(T),o=I.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},h={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"]};Ye.b=function(v){var g=v.callback,L=v.onCancel,E=Object(_.useState)("python"),p=Object(G.a)(E,2),c=p[0],u=p[1];function a(m){u(h[m][1])}function y(m){g(m)}return b.a.createElement(D.a,Object($.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:y}),b.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},b.a.createElement(I.a,{onChange:a},Object.keys(h).map(function(m){return b.a.createElement(o,{key:m,value:m},h[m][0])}))),b.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},b.a.createElement(C,{mode:c})),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(J.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(J.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function C(v){var g=v.value,L=v.onChange,E=v.mode,p=v.options,c=p===void 0?{}:p,u=Object(_.useRef)(),a=Object(_.useState)(),y=Object(G.a)(a,2),m=y[0],x=y[1];return Object(_.useEffect)(function(){if(m){function B(W){var K=W.getValue();L&&L(K)}return m.on("change",B),function(){m.off("change",B)}}},[m,L]),Object(_.useEffect)(function(){m&&m.setOption("mode",E)},[m,E]),Object(_.useEffect)(function(){m&&((g!==m.getValue()||g==="")&&setTimeout(function(){m.setValue(g||" ")},300))},[m,g]),Object(_.useEffect)(function(){if(u.current&&!m){var B=P.a.fromTextArea(u.current,Object(ce.a)({mode:E,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));x(B)}},[u.current,m]),b.a.createElement("div",{className:"my-codemirror-container"},b.a.createElement("textarea",{ref:u}))}},"7ixt":function(ut,Ye,de){"use strict";de.d(Ye,"a",function(){return O});var ce={adjustX:1,adjustY:1},$=[0,0],O={left:{points:["cr","cl"],overflow:ce,offset:[-4,0],targetOffset:$},right:{points:["cl","cr"],overflow:ce,offset:[4,0],targetOffset:$},top:{points:["bc","tc"],overflow:ce,offset:[0,-4],targetOffset:$},bottom:{points:["tc","bc"],overflow:ce,offset:[0,4],targetOffset:$},topLeft:{points:["bl","tl"],overflow:ce,offset:[0,-4],targetOffset:$},leftTop:{points:["tr","tl"],overflow:ce,offset:[-4,0],targetOffset:$},topRight:{points:["br","tr"],overflow:ce,offset:[0,-4],targetOffset:$},rightTop:{points:["tl","tr"],overflow:ce,offset:[4,0],targetOffset:$},bottomRight:{points:["tr","br"],overflow:ce,offset:[0,4],targetOffset:$},rightBottom:{points:["bl","br"],overflow:ce,offset:[4,0],targetOffset:$},bottomLeft:{points:["tl","bl"],overflow:ce,offset:[0,4],targetOffset:$},leftBottom:{points:["br","bl"],overflow:ce,offset:[-4,0],targetOffset:$}},J=O},"8EBN":function(ut,Ye,de){(function(ce){ce(de("VrN/"))})(function(ce){"use strict";ce.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 $=0;$-1&&J.substring(G+1,J.length);if(H)return ce.findModeByExtension(H)},ce.findModeByName=function(J){J=J.toLowerCase();for(var U=0;U=ae.length?le.slice(ae.length):le}).join(`
`)}var d=[],o=[""],l=new k.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function C(){d.length=0,o=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(se,ee,q,ae){if(ee>=se.length||se[ee].level<=q)return ee;var le=se[ee];ae.push(""+le.text+" "),ee++;var te=[];return ee=g(se,ee,le.level,te),te.length>0&&(ae.push(""),te.forEach(function(ie){ae.push(ie)}),ae.push(" ")),ae.push(" "),ee=g(se,ee,q,ae),ee}function L(){return g(d,0,0,o),o.push(" "),o.join("")}var E={heading:function(ee){var q=h.exec(ee);if(q)return{type:"heading",raw:q[0],depth:q[1].length,text:q[2]}},fences:function(ee){var q=this.rules.block.fences.exec(ee);if(q){var ae=q[0],le=T(ae,q[3]||""),te=q[2]?q[2].trim():q[2];if(["latex","katex","math"].indexOf(te)>=0){var ie=u(),he=le;le=ie,a[ie]={type:"block",expression:he}}return{type:"code",raw:ae,lang:te,text:le}}}},p=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,u=function(){return"__special_katext_id_".concat(c++,"__")},a={};function y(){return a}function m(){c=0,a={}}function x(se){return se=se.replace(p,function(ee,q){var ae=u();return a[ae]={type:"inline",expression:q},ae}),se}var B=l.listitem;l.listitem=function(se){return B(x(se))};var W=l.paragraph;l.paragraph=function(se){return W(x(se))};var K=l.tablecell;l.tablecell=function(se,ee){return K(x(se),ee)},l.code=function(se,ee,q){var ae=(ee||"").match(/\S*/)[0];return ae?["latex","katex","math"].indexOf(ae)>=0?"".concat(se,"
"):' ').concat(q?se:Object(w.escape)(se,!0),`
`):''+(q?se:Object(w.escape)(se,!0))+" "},l.heading=function(se,ee,q){var ae=this.options.headerPrefix+q.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:ae,level:ee,text:se}),"'+se+" "},k.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),k.a.use({tokenizer:E,renderer:l});var V=k.a,M=de("SJMd"),N=de("ulZh"),Z=de.n(N),ne=de("m3rI"),ue=de("Oy/b"),me=de("p5ED"),Le=de("ErOA"),xe=de("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 De=function(se,ee){return(De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,ae){q.__proto__=ae}||function(q,ae){for(var le in ae)Object.prototype.hasOwnProperty.call(ae,le)&&(q[le]=ae[le])})(se,ee)};function Se(se,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Class extends value "+String(ee)+" is not a constructor or null");function q(){this.constructor=se}De(se,ee),se.prototype=ee===null?Object.create(ee):(q.prototype=ee.prototype,new q)}function Te(se,ee,q,ae){return new(q||(q=Promise))(function(le,te){function ie(ve){try{fe(ae.next(ve))}catch(Ee){te(Ee)}}function he(ve){try{fe(ae.throw(ve))}catch(Ee){te(Ee)}}function fe(ve){var Ee;ve.done?le(ve.value):(Ee=ve.value,Ee instanceof q?Ee:new q(function(Me){Me(Ee)})).then(ie,he)}fe((ae=ae.apply(se,ee||[])).next())})}function ye(se,ee){var q,ae,le,te,ie={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(fe){return function(ve){return function(Ee){if(q)throw new TypeError("Generator is already executing.");for(;ie;)try{if(q=1,ae&&(le=2&Ee[0]?ae.return:Ee[0]?ae.throw||((le=ae.return)&&le.call(ae),0):ae.next)&&!(le=le.call(ae,Ee[1])).done)return le;switch(ae=0,le&&(Ee=[2&Ee[0],le.value]),Ee[0]){case 0:case 1:le=Ee;break;case 4:return ie.label++,{value:Ee[1],done:!1};case 5:ie.label++,ae=Ee[1],Ee=[0];continue;case 7:Ee=ie.ops.pop(),ie.trys.pop();continue;default:if(!(le=ie.trys,(le=le.length>0&&le[le.length-1])||Ee[0]!==6&&Ee[0]!==2)){ie=0;continue}if(Ee[0]===3&&(!le||Ee[1]>le[0]&&Ee[1]0&&q>0){var ae=new ke(ee,q),le=ae.ratio>=1?20:ae.getHorizontalLength(20),te=ae.ratio<1?20:ae.getVerticalLength(20),ie=document.createElementNS("http://www.w3.org/2000/svg","svg");ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ie);var he=s.createDefs();ie.appendChild(he);var fe=s.createElement("clipPath",[["id","text-bg-clip"]]);he.appendChild(fe);var ve=s.createPath(s.getHollowRectanglePath((24-le)/2,(24-te)/2,le,te,(24-le)/2+2,(24-te)/2+2,le-4,te-4));ie.appendChild(ve);var Ee=s.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ee.appendChild(s.createTSpan(ee+":"+q)),ie.appendChild(Ee);var Me=Ee.getBBox();s.setAttributes(Ee,[["x",((24-Me.width)/2).toString()],["y",((24-Me.height)/2-Me.y).toString()]]);var We=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 fe.appendChild(We),s.setAttributes(ve,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ie),ie.outerHTML}return' '},se}(),_e=function(se){function ee(q,ae,le){var te=se.call(this,q,ae)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return Se(ee,se),ee.prototype.setupDropdown=function(){var q=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ae){ae.className=q.className,ae.colorsClassName=q.colorsClassName,q.dropdownBlock.appendChild(ae.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ee.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ee.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ee.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ee.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ee.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ee}(we),Ne=function(){function se(ee,q){this.GRIP_SIZE=10,this.color=ee,this.fillColor=q,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 se.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},se.prototype.setCenter=function(ee,q){this.visual.childNodes.forEach(function(ae){return s.setAttributes(ae,[["cx",ee.toString()],["cy",q.toString()]])})},se}(),Ge=function(){function se(ee,q,ae,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ee,this.canvasHeight=q,this.margin=ae,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(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ee){this._aspectRatio=ee,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ee){this._isGridVisible=ee,this.gridContainer&&s.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ee){this._zoomFactor=ee,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var ee=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 q=0;qthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-q.height/2),s.setAttributes(this.cropRectElement,[["x",q.x.toString()],["y",q.y.toString()],["width",q.width.toString()],["height",q.height.toString()]]);var ae=q.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,ie){var he=q.y+ae*(ie+1);s.setAttributes(te,[["x1",""+q.x],["y1",""+he],["x2",""+(q.x+q.width)],["y2",""+he]])});var le=q.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,ie){var he=q.x+le*(ie+1);s.setAttributes(te,[["x1",""+he],["y1",""+q.y],["x2",""+he],["y2",""+(q.y+q.height)]])}),s.setAttributes(this.cropShadeElement,[["d",s.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,q.x,q.y,q.width,q.height)]]),this.topLeftGrip.setCenter(q.x,q.y),this.topRightGrip.setCenter(q.x+q.width,q.y),this.bottomLeftGrip.setCenter(q.x,q.y+q.height),this.bottomRightGrip.setCenter(q.x+q.width,q.y+q.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.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)},se.prototype.clientToLocalCoordinates=function(ee,q){var ae=this.container.getBoundingClientRect();return{x:ee-ae.left+this.margin,y:q-ae.top+this.margin}},se.prototype.onPointerDown=function(ee){this.container.setPointerCapture(ee.pointerId),this.previousPoint=this.clientToLocalCoordinates(ee.clientX,ee.clientY),this.cropRectElement===ee.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ee.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ee.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ee.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ee.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(ee){if(this.isMoving)this.move(this.clientToLocalCoordinates(ee.clientX,ee.clientY));else if(this.activeGrip){var q=this.clientToLocalCoordinates(ee.clientX,ee.clientY);this.resize(q)}ee.preventDefault()},se.prototype.onPointerUp=function(ee){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ee.pointerId)},se.prototype.move=function(ee){var q=ee.x-this.previousPoint.x,ae=ee.y-this.previousPoint.y;this.zoomFactor!==1&&(q=-q/this.zoomFactor,ae=-ae/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+q),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ae),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ee},se.prototype.resize=function(ee){var q=Object.assign({},this.cropRect),ae=ee.x-this.previousPoint.x,le=ee.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:q.x+aethis.canvasWidth*this.zoomFactor&&(ae=this.canvasWidth*this.zoomFactor-q.width),q.width+=ae}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(q.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ae),q.height=this.aspectRatio.getVerticalLength(q.width)):(q.y+=le,q.height=this.cropRect.y+this.cropRect.height-q.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?q.height=this.aspectRatio.getVerticalLength(q.width):q.height+=le}q.width<10&&(q.x=this.cropRect.x,q.width=10),q.height<10&&(q.y=this.cropRect.y,q.height=10),this.previousPoint=ee,q.x>=this.margin&&q.y>=this.margin&&q.x-this.margin+q.width<=this.canvasWidth&&q.y-this.margin+q.height<=this.canvasHeight&&(this.cropRect=q,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ee=this.cropRect.x+this.cropRect.width/2,q=this.cropRect.y+this.cropRect.height/2,ae=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);ae/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=ee-this.cropRect.width/2,this.cropRect.y=q-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)}},se.prototype.getRescaledRect=function(ee,q,ae,le,te,ie){var he=ae/ee,fe=le/q;return{x:(te.x-ie)*he+ie,y:(te.y-ie)*fe+ie,width:te.width*he,height:te.height*fe}},se.prototype.scaleCanvas=function(ee,q){var ae=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ee,q,this.cropRect,this.margin);this.canvasWidth=ee,this.canvasHeight=q,this.onCropChange&&this.onCropChange(ae),this.setCropRectangle(ae)},se}(),He=function(){function se(ee){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ee,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(se.prototype,"angle",{get:function(){return this._angle},set:function(ee){this._angle=ee,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.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},se.prototype.onPointerDown=function(ee){this.controlContainer.setPointerCapture(ee.pointerId),this.isDragging=!0,this.previousPoint={x:ee.clientX,y:ee.clientY}},se.prototype.onPointerMove=function(ee){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ee.clientX-this.previousPoint.x)/5),this.previousPoint.x=ee.clientX)},se.prototype.onPointerUp=function(ee){this.isDragging&&this.onAngleChange&&this.onAngleChange((ee.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ee.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ee=this.angleLabelText.getBBox();s.setAttributes(this.angleLabelElement,[["x",((this.width-ee.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var ee=this.scaleShape.transform.baseVal.getItem(0);ee.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ee,0)}},se.prototype.getVisual=function(){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg");ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),ee.setAttribute("width",this.width+"px"),ee.setAttribute("height",this.height+"px"),ee.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ee.style.flexShrink="0",document.body.appendChild(ee);for(var q="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ae=1;ae<=this.width/5+10;ae++){var le=ae%5==0?this.height/3:this.height/6;q+="h4v"+-le+"h1v"+le}q+="v1H0Z",this.scaleShape=s.createPath(q);var te=s.createTransform();this.scaleShape.transform.baseVal.appendItem(te),ee.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 ie=s.createTSpan("");return ie.innerHTML="°",this.angleLabelElement.appendChild(ie),ee.appendChild(this.angleLabelElement),document.body.removeChild(ee),ee},se}(),ze=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(ee,q,ae,le,te,ie,he){var fe=this;return new Promise(function(ve){var Ee=document.createElement("canvas");Ee.width=ee.width.baseVal.value-2*le,Ee.height=ee.height.baseVal.value-2*le;var Me=1,We=1;fe.naturalSize===!0?(Me=q.naturalWidth/(ee.width.baseVal.value-2*le)/ie,We=q.naturalHeight/(ee.height.baseVal.value-2*le)/he,Ee.width=q.naturalWidth/ie,Ee.height=q.naturalHeight/he):fe.width!==void 0&&fe.height!==void 0&&(Me=fe.width/ae.width,We=fe.height/ae.height,Ee.width*=Me,Ee.height*=We);var qe=Ee.getContext("2d");qe.translate(Ee.width/2,Ee.height/2),qe.rotate(te*Math.PI/180),qe.scale(ie,he),qe.translate(-Ee.width/2,-Ee.height/2),qe.drawImage(q,0,0,Ee.width,Ee.height);var tt=document.createElement("canvas");tt.width=ae.width*Me,tt.height=ae.height*We,tt.getContext("2d").putImageData(qe.getImageData((ae.x-le)*Me,(ae.y-le)*We,ae.width*Me,ae.height*We),0,0),ve(tt.toDataURL(fe.imageType,fe.imageQuality))})},se}(),nt=function(){function se(ee){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=se.instanceCounter++,this.styles=new f(this.instanceNo),this.target=ee,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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ee){this._zoomToCropEnabled=ee,ee?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ee){this._isGridVisible=ee,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ee){this._gridLines=ee,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ee){this._rotationAngle=ee,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var ee;return(ee=this._aspectRatio)!==null&&ee!==void 0?ee:this.aspectRatios[0]},set:function(ee){this._aspectRatio=ee},enumerable:!1,configurable:!0}),se.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},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(ee){ee===void 0&&(ee=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ee||this.closeEventListeners.forEach(function(q){return q()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(ee){this.renderEventListeners.push(ee)},se.prototype.removeRenderEventListener=function(ee){this.renderEventListeners.indexOf(ee)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ee),1)},se.prototype.addCloseEventListener=function(ee){this.closeEventListeners.push(ee)},se.prototype.removeCloseEventListener=function(ee){this.closeEventListeners.indexOf(ee)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ee),1)},se.prototype.setupResizeObserver=function(){var ee=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ee.resize(ee.target.clientWidth,ee.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))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ee=1*this.target.clientWidth/this.target.clientHeight,q=this.contentDiv.clientWidth/ee>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ee:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ae=q+2*this.CANVAS_MARGINee+this.CANVAS_MARGIN?this.target.offsetTop-(ee+this.CANVAS_MARGIN):0;this.coverDiv.style.top=q+"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},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var ee=this;this.topToolbar=new F,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 q=new be;q.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(q);var ae=[];this.aspectRatios.forEach(function(We){var qe=new we(Re.getIcon(We.horizontal,We.vertical),We.horizontal===0&&We.vertical===0?"FREE":We.horizontal+":"+We.vertical);qe.onClick=function(){return ee.ratioButtonClicked(We)},ae.push(qe)}),this.aspectRatioButton=new _e(Re.getIcon(0,0),"Aspect ratio",ae),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,q.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new we(' ',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){ee.isGridVisible=!ee.isGridVisible,le.isActive=ee.isGridVisible},q.addButton(le);var te=new we(' ',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){ee.zoomToCropEnabled=!ee.zoomToCropEnabled,te.isActive=ee.zoomToCropEnabled},q.addButton(te),!z.isLicensed){var ie=new Oe;this.topToolbar.addElementBlock(ie);var he=document.createElement("div");he.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var fe=document.createElement("a");fe.style.color="currentColor",fe.href="https://markerjs.com/products/cropro",fe.target="_blank",fe.innerHTML=' ',he.appendChild(fe),ie.addElement(he)}var ve=new be;ve.minWidth=3*this.toolbarHeight+"px",ve.contentAlign="end",this.topToolbar.addButtonBlock(ve);var Ee=new we(' ',"OK");Ee.onClick=this.startRenderAndClose,ve.addButton(Ee),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ee.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Me=new we(' ',"Close");Me.onClick=this.close,ve.addButton(Me),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Me.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var ee=this;this.bottomToolbar=new F,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 q=new be;q.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(q);var ae=new we(' ',"Rotate left");ae.onClick=this.rotateLeftButtonClicked,q.addButton(ae);var le=new we(' ',"Rotate right");le.onClick=this.rotateRightButtonClicked,q.addButton(le);var te=new Oe;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new He("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(ve){ee.rotateBy(ve),ee.straightener.angle=ee.rotationAngle},te.addElement(this.straightener.getUI());var ie=new be;ie.minWidth=2*this.toolbarHeight+"px",ie.contentAlign="end",this.bottomToolbar.addButtonBlock(ie);var he=new we(' ',"Flip horizontal");he.onClick=this.flipHorizontallyButtonClicked,ie.addButton(he);var fe=new we(' ',"Flip vertical");fe.onClick=this.flipVerticallyButtonClicked,ie.addButton(fe)},se.prototype.ratioButtonClicked=function(ee){this.aspectRatio=ee,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Re.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ke(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(ee){if(ee){var q=this.cropLayer.getRescaledRect(ee.width,ee.height,this.imageWidth,this.imageHeight,ee.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(q),this.cropRectChanged(q),this.flippedHorizontally=ee.flippedHorizontally,this.flippedVertically=ee.flippedVertically,this.applyFlip(),this.rotationAngle=ee.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(ee,q){var ae=this.cropImage.getBoundingClientRect();return{x:ee-ae.left,y:q-ae.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ee=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ee+"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()},se.prototype.rotateLeftButtonClicked=function(){var ee=this.rotationAngle-90;this.rotationAngle%90!=0&&(ee+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ee)},se.prototype.rotateRightButtonClicked=function(){var ee=this.rotationAngle+90;this.rotationAngle%90!=0&&(ee-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ee)},se.prototype.rotateTo=function(ee){ee=(ee=ee>180?ee-360:ee)<=-180?ee+360:ee,this.rotationAngle=ee,this.applyRotation()},se.prototype.rotateBy=function(ee){this.rotateTo((this.rotationAngle+ee)%360)},se.prototype.applyRotation=function(){var ee=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var q=this.editingTargetRotationContainer.transform.baseVal.getItem(0);q.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(q,0);var ae=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ae.width,this.imageHeight/ae.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ee},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var ee,q;return ye(this,function(ae){switch(ae.label){case 0:return[4,this.render()];case 1:return ee=ae.sent(),q=this.getState(),this.renderEventListeners.forEach(function(le){return le(ee,q)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Te(this,void 0,void 0,function(){var ee;return ye(this,function(q){switch(q.label){case 0:return(ee=new ze).naturalSize=this.renderAtNaturalSize,ee.imageType=this.renderImageType,ee.imageQuality=this.renderImageQuality,ee.width=this.renderWidth,ee.height=this.renderHeight,this.unzoomFromCrop(),s.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ee.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 q.sent(),[4,ee.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,q.sent()]}})})},se.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 ee=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new X("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*ee)+`px;
height: `+(this.toolbarHeight-2*ee)+`px;
padding: `+ee+`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 R("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new R("."+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*ee)+`px;
padding: `+ee+`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;
`))},se.instanceCounter=0,se}(),$e=de("8hTe"),Xe=de.n($e),Pe=/]*>/g;function rt(se){var ee=document.createElement("div");return ee.innerHTML=se,ee.childNodes.length===0?"":ee.childNodes[0].nodeValue}var Qe=Ye.a=function(se){var ee=se.value,q=ee===void 0?"":ee,ae=se.edit,le=ae===void 0?!1:ae,te=se.className,ie=se.showTextOnly,he=se.showLines,fe=se.replaces,ve=se.zoomImg,Ee=se.hasMask,Me=se.style,We=Me===void 0?{}:Me,qe=se.stylesPrev,tt=qe===void 0?{}:qe,vt=String(q),ot=Object(_.useRef)(),it=Object(_.useRef)(),wt=Object(_.useState)(""),xt=Object(G.a)(wt,2),It=xt[0],_t=xt[1],Et=Object(_.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(D.a)(I.a.mark(function mt(pt){var At;return I.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return ot.current.style.display="none",Ut.next=3,Object(Le.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&&fe(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(D.a)(I.a.mark(function mt(pt){var At;return I.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(Le.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&&fe(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(_.useMemo)(function(){ot.current&&(ot.current.style.zIndex=-1);try{var Ze=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Tt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Zt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;vt=vt.replace(Ze,"("+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]
",L()),C()),mt=mt.replace(/(__special_katext_id_\d+__)/g,function(vr,Ut){var Be=pt[Ut],dt=Be.type,ri=Be.expression;return Object(ue.renderToString)(rt(ri)||"",{displayMode:dt==="block",throwOnError:!1,output:"html"})}),mt=mt.replace(/▁/g,"\u2581\u2581\u2581"),m(),ie){var At=document.createElement("div");return At.innerHTML=mt,At.innerText}return setTimeout(function(){return ti()},500),mt},[vt]),$t=Object(_.useRef)();v.WebkitLineClamp=he,he&&(We=Object(U.a)(Object(U.a)({},We),v));function Nr(Ze){var Tt=Ze.target;if(Tt.tagName.toUpperCase()==="IMG"){if(ve){var Zt=Tt.getAttribute("src");_t(Zt),Yt("image")}}else if(Tt.tagName.toUpperCase()==="A"){var mt=Tt.getAttribute("href");if(mt.indexOf("office")>-1)Ze.preventDefault(),_t(mt),Yt("office");else if(mt.indexOf("application/pdf")>-1)Ze.preventDefault(),_t(mt),Yt("pdf");else if(mt.indexOf("text/html")>-1)Ze.preventDefault(),_t(mt),Yt("html");else if(mt.startsWith("#")){Ze.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(Z.a.isSupported()){var pt=new Z.a;pt.loadSource(mt.src),pt.attachMedia(mt)}}})};Object(_.useEffect)(function(){if($t.current&&zr&&(zr.match(Pe)&&window.PR.prettyPrint()),$t.current)return $t.current.addEventListener("click",Nr),function(){$t.current.removeEventListener("click",Nr),m(),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 b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:$t,style:Object(U.a)({},We),className:"".concat(te||""," markdown-body ").concat(Xe.a.mdBody),onMouseOver:Pt,dangerouslySetInnerHTML:{__html:zr}}),b.a.createElement("div",{ref:ot,className:Xe.a.button},b.a.createElement($.a,null,b.a.createElement(J.a,{onClick:function(){return gr()}},"\u88C1\u526A"),b.a.createElement(J.a,{onClick:function(){return cr()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:it,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),b.a.createElement(me.a,{close:!0,data:It,type:It!=null&&It.length?Tr:"",style:Object(U.a)({},tt),onClose:function(){return _t("")}}))}},"9VGf":function(ut,Ye,de){"use strict";de.d(Ye,"a",function(){return O});var ce=de("q1tI"),$=de.n(ce);function O(J,U){var D=Object(ce.useRef)();Object(ce.useEffect)(function(){D.current=J}),Object(ce.useEffect)(function(){function G(){D.current()}if(U!==null){var H=setInterval(G,U);return function(){return clearInterval(H)}}},[U])}},Bd2K:function(ut,Ye,de){(function(ce){ce(de("VrN/"),de("osHv"))})(function(ce){ce.defineOption("autoCloseTags",!1,function(I,_,b){if(b!=ce.Init&&b&&I.removeKeyMap("autoCloseTags"),!_)return;var A={name:"autoCloseTags"};(typeof _!="object"||_.whenClosing!==!1)&&(A["'/'"]=function(P){return D(P)}),(typeof _!="object"||_.whenOpening!==!1)&&(A["'>'"]=function(P){return J(P)}),I.addKeyMap(A)});var $=["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(I){if(I.getOption("disableInput"))return ce.Pass;for(var _=I.listSelections(),b=[],A=I.getOption("autoCloseTags"),P=0;P<_.length;P++){if(!_[P].empty())return ce.Pass;var k=_[P].head,w=I.getTokenAt(k),T=ce.innerMode(I.getMode(),w.state),d=T.state,o=T.mode.xmlCurrentTag&&T.mode.xmlCurrentTag(d),l=o&&o.name;if(!l)return ce.Pass;var h=T.mode.configuration=="html",C=typeof A=="object"&&A.dontCloseTags||h&&$,v=typeof A=="object"&&A.indentTags||h&&O;w.end>k.ch&&(l=l.slice(0,l.length-w.end+k.ch));var g=l.toLowerCase();if(!l||w.type=="string"&&(w.end!=k.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&o.close||w.string.indexOf("/")==k.ch-w.start-1||C&&G(C,g)>-1||H(I,T.mode.xmlCurrentContext&&T.mode.xmlCurrentContext(d)||[],l,k,!0))return ce.Pass;var L=typeof A=="object"&&A.emptyTags;if(L&&G(L,l)>-1){b[P]={text:"/>",newPos:ce.Pos(k.line,k.ch+2)};continue}var E=v&&G(v,g)>-1;b[P]={indent:E,text:">"+(E?`
`:"")+""+l+">",newPos:E?ce.Pos(k.line+1,0):ce.Pos(k.line,k.ch+1)}}for(var p=typeof A=="object"&&A.dontIndentOnAutoClose,P=_.length-1;P>=0;P--){var c=b[P];I.replaceRange(c.text,_[P].head,_[P].anchor,"+insert");var u=I.listSelections().slice(0);u[P]={head:c.newPos,anchor:c.newPos},I.setSelections(u),!p&&c.indent&&(I.indentLine(c.newPos.line,null,!0),I.indentLine(c.newPos.line+1,null,!0))}}function U(I,_){for(var b=I.listSelections(),A=[],P=_?"/":"",k=I.getOption("autoCloseTags"),w=typeof k=="object"&&k.dontIndentOnSlash,T=0;T"&&(C+=">"),A[T]=C}if(I.replaceSelections(A),b=I.listSelections(),!w)for(var T=0;T=0&&_[d]==b;d--)++T;A=w.to;for(var d=1;d0){for(var _=0;_1&&arguments[1]!==void 0?arguments[1]:"",_=[],b=0;bq.length)&&(ae=q.length);for(var le=0,te=new Array(ae);le=q.length?{done:!0}:{done:!1,value:q[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=q[Symbol.iterator](),le.next.bind(le)}function D(q,ae){return ae={exports:{}},q(ae,ae.exports),ae.exports}var G=D(function(q){function ae(){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){q.exports.defaults=te}q.exports={defaults:ae(),getDefaults:ae,changeDefaults:le}}),H=G.defaults,I=G.getDefaults,_=G.changeDefaults,b=/[&<>"']/,A=/[&<>"']/g,P=/[<>"']|&(?!#?\w+;)/,k=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},T=function(ae){return w[ae]};function d(q,ae){if(ae){if(b.test(q))return q.replace(A,T)}else if(P.test(q))return q.replace(k,T);return q}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(q){return q.replace(o,function(ae,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 h=/(^|[^\[])\^/g;function C(q,ae){q=q.source||q,ae=ae||"";var le={replace:function(ie,he){return he=he.source||he,he=he.replace(h,"$1"),q=q.replace(ie,he),le},getRegex:function(){return new RegExp(q,ae)}};return le}var v=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(q,ae,le){if(q){var te;try{te=decodeURIComponent(l(le)).replace(v,"").toLowerCase()}catch(ie){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}ae&&!g.test(le)&&(le=a(ae,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(ie){return null}return le}var E={},p=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(q,ae){E[" "+q]||(p.test(q)?E[" "+q]=q+"/":E[" "+q]=B(q,"/",!0)),q=E[" "+q];var le=q.indexOf(":")===-1;return ae.substring(0,2)==="//"?le?ae:q.replace(c,"$1")+ae:ae.charAt(0)==="/"?le?ae:q.replace(u,"$1")+ae:q+ae}var y={exec:function(){}};function m(q){for(var ae=1,le,te;ae=0&&ve[Me]==="\\";)Ee=!Ee;return Ee?"|":" |"}),te=le.split(/ \|/),ie=0;if(te.length>ae)te.splice(ae);else for(;te.length=te.length?ie.slice(te.length):ie}).join(`
`)}var xe=function(){function q(le){this.options=le||M}var ae=q.prototype;return ae.space=function(te){var ie=this.rules.block.newline.exec(te);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
`}},ae.code=function(te,ie){var he=this.rules.block.code.exec(te);if(he){var fe=ie[ie.length-1];if(fe&&fe.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var ve=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?ve:N(ve,`
`)}}},ae.fences=function(te){var ie=this.rules.block.fences.exec(te);if(ie){var he=ie[0],fe=Le(he,ie[3]||"");return{type:"code",raw:he,lang:ie[2]?ie[2].trim():ie[2],text:fe}}},ae.heading=function(te){var ie=this.rules.block.heading.exec(te);if(ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},ae.nptable=function(te){var ie=this.rules.block.nptable.exec(te);if(ie){var he={type:"table",header:Z(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[],raw:ie[0]};if(he.header.length===he.align.length){var fe=he.align.length,ve;for(ve=0;ve ?/gm,"");return{type:"blockquote",raw:ie[0],text:he}}},ae.list=function(te){var ie=this.rules.block.list.exec(te);if(ie){for(var he=ie[0],fe=ie[2],ve=fe.length>1,Ee=fe[fe.length-1]===")",Me={type:"list",raw:he,ordered:ve,start:ve?+fe.slice(0,-1):"",loose:!1,items:[]},We=ie[0].match(this.rules.block.item),qe=!1,tt,vt,ot,it,wt,xt,It,_t=We.length,Et=0;Et<_t;Et++)tt=We[Et],he=tt,vt=tt.length,tt=tt.replace(/^ *([*+-]|\d+[.)]) */,""),~tt.indexOf(`
`)&&(vt-=tt.length,tt=this.options.pedantic?tt.replace(/^ {1,4}/gm,""):tt.replace(new RegExp("^ {1,"+vt+"}","gm"),"")),Et!==_t-1&&(ot=this.rules.block.bullet.exec(We[Et+1])[0],(ve?ot.length===1||!Ee&&ot[ot.length-1]===")":ot.length>1||this.options.smartLists&&ot!==fe)&&(it=We.slice(Et+1).join(`
`),Me.raw=Me.raw.substring(0,Me.raw.length-it.length),Et=_t-1)),wt=qe||/\n\n(?!\s*$)/.test(tt),Et!==_t-1&&(qe=tt.charAt(tt.length-1)===`
`,wt||(wt=qe)),wt&&(Me.loose=!0),xt=/^\[[ xX]\] /.test(tt),It=void 0,xt&&(It=tt[1]!==" ",tt=tt.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:he,task:xt,checked:It,loose:wt,text:tt});return Me}},ae.html=function(te){var ie=this.rules.block.html.exec(te);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):ne(ie[0]):ie[0]}},ae.def=function(te){var ie=this.rules.block.def.exec(te);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var he=ie[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:ie[0],href:ie[2],title:ie[3]}}},ae.table=function(te){var ie=this.rules.block.table.exec(te);if(ie){var he={type:"table",header:Z(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[]};if(he.header.length===he.align.length){he.raw=ie[0];var fe=he.align.length,ve;for(ve=0;ve/i.test(fe[0])&&(ie=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(fe[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(fe[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:fe[0],inLink:ie,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):ne(fe[0]):fe[0]}},ae.link=function(te){var ie=this.rules.inline.link.exec(te);if(ie){var he=ue(ie[2],"()");if(he>-1){var fe=ie[0].indexOf("!")===0?5:4,ve=fe+ie[1].length+he;ie[2]=ie[2].substring(0,he),ie[0]=ie[0].substring(0,ve).trim(),ie[3]=""}var Ee=ie[2],Me="";if(this.options.pedantic){var We=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ee);We?(Ee=We[1],Me=We[3]):Me=""}else Me=ie[3]?ie[3].slice(1,-1):"";Ee=Ee.trim().replace(/^<([\s\S]*)>$/,"$1");var qe=me(ie,{href:Ee&&Ee.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},ie[0]);return qe}},ae.reflink=function(te,ie){var he;if((he=this.rules.inline.reflink.exec(te))||(he=this.rules.inline.nolink.exec(te))){var fe=(he[2]||he[1]).replace(/\s+/g," ");if(fe=ie[fe.toLowerCase()],!fe||!fe.href){var ve=he[0].charAt(0);return{type:"text",raw:ve,text:ve}}var Ee=me(he,fe,he[0]);return Ee}},ae.strong=function(te,ie,he){he===void 0&&(he="");var fe=this.rules.inline.strong.start.exec(te);if(fe&&(!fe[1]||fe[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ie=ie.slice(-1*te.length);var ve=fe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ve.lastIndex=0;for(var Ee;(fe=ve.exec(ie))!=null;)if(Ee=this.rules.inline.strong.middle.exec(ie.slice(0,fe.index+3)),Ee)return{type:"strong",raw:te.slice(0,Ee[0].length),text:te.slice(2,Ee[0].length-2)}}},ae.em=function(te,ie,he){he===void 0&&(he="");var fe=this.rules.inline.em.start.exec(te);if(fe&&(!fe[1]||fe[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){ie=ie.slice(-1*te.length);var ve=fe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ve.lastIndex=0;for(var Ee;(fe=ve.exec(ie))!=null;)if(Ee=this.rules.inline.em.middle.exec(ie.slice(0,fe.index+2)),Ee)return{type:"em",raw:te.slice(0,Ee[0].length),text:te.slice(1,Ee[0].length-1)}}},ae.codespan=function(te){var ie=this.rules.inline.code.exec(te);if(ie){var he=ie[2].replace(/\n/g," "),fe=/[^ ]/.test(he),ve=he.startsWith(" ")&&he.endsWith(" ");return fe&&ve&&(he=he.substring(1,he.length-1)),he=ne(he,!0),{type:"codespan",raw:ie[0],text:he}}},ae.br=function(te){var ie=this.rules.inline.br.exec(te);if(ie)return{type:"br",raw:ie[0]}},ae.del=function(te){var ie=this.rules.inline.del.exec(te);if(ie)return{type:"del",raw:ie[0],text:ie[1]}},ae.autolink=function(te,ie){var he=this.rules.inline.autolink.exec(te);if(he){var fe,ve;return he[2]==="@"?(fe=ne(this.options.mangle?ie(he[1]):he[1]),ve="mailto:"+fe):(fe=ne(he[1]),ve=fe),{type:"link",raw:he[0],text:fe,href:ve,tokens:[{type:"text",raw:fe,text:fe}]}}},ae.url=function(te,ie){var he;if(he=this.rules.inline.url.exec(te)){var fe,ve;if(he[2]==="@")fe=ne(this.options.mangle?ie(he[0]):he[0]),ve="mailto:"+fe;else{var Ee;do Ee=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Ee!==he[0]);fe=ne(he[0]),he[1]==="www."?ve="http://"+fe:ve=fe}return{type:"link",raw:he[0],text:fe,href:ve,tokens:[{type:"text",raw:fe,text:fe}]}}},ae.inlineText=function(te,ie,he){var fe=this.rules.inline.text.exec(te);if(fe){var ve;return ie?ve=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):ne(fe[0]):fe[0]:ve=ne(this.options.smartypants?he(fe[0]):fe[0]),{type:"text",raw:fe[0],text:ve}}},q}(),De=V.noopTest,Se=V.edit,Te=V.merge,ye={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:De,table:De,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ye._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ye._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ye.def=Se(ye.def).replace("label",ye._label).replace("title",ye._title).getRegex(),ye.bullet=/(?:[*+-]|\d{1,9}[.)])/,ye.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ye.item=Se(ye.item,"gm").replace(/bull/g,ye.bullet).getRegex(),ye.list=Se(ye.list).replace(/bull/g,ye.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ye.def.source+")").getRegex(),ye._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",ye._comment=//,ye.html=Se(ye.html,"i").replace("comment",ye._comment).replace("tag",ye._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ye.paragraph=Se(ye._paragraph).replace("hr",ye.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",ye._tag).getRegex(),ye.blockquote=Se(ye.blockquote).replace("paragraph",ye.paragraph).getRegex(),ye.normal=Te({},ye),ye.gfm=Te({},ye.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*|$)"}),ye.gfm.nptable=Se(ye.gfm.nptable).replace("hr",ye.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",ye._tag).getRegex(),ye.gfm.table=Se(ye.gfm.table).replace("hr",ye.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",ye._tag).getRegex(),ye.pedantic=Te({},ye.normal,{html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ye._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:De,paragraph:Se(ye.normal._paragraph).replace("hr",ye.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ye.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:De,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:De,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",z.punctuation=Se(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=Se(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=Se(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=Se(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=Se(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=Se(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=Se(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=Se(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=Se(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=Se(z._blockSkip,"g").getRegex(),z.overlapSkip=Se(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=Se(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=Se(z.tag).replace("comment",ye._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=Se(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=Se(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=Se(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=Te({},z),z.pedantic=Te({},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:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=Te({},z.normal,{escape:Se(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)),ae+=""+te+";";return ae}var be=function(){function q(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:R.normal,inline:X.normal};this.options.pedantic?(te.block=R.pedantic,te.inline=X.pedantic):this.options.gfm&&(te.block=R.gfm,this.options.breaks?te.inline=X.breaks:te.inline=X.gfm),this.tokenizer.rules=te}q.lex=function(te,ie){var he=new q(ie);return he.lex(te)};var ae=q.prototype;return ae.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},ae.blockTokens=function(te,ie,he){ie===void 0&&(ie=[]),he===void 0&&(he=!0),te=te.replace(/^ +$/gm,"");for(var fe,ve,Ee,Me;te;){if(fe=this.tokenizer.space(te)){te=te.substring(fe.raw.length),fe.type&&ie.push(fe);continue}if(fe=this.tokenizer.code(te,ie)){te=te.substring(fe.raw.length),fe.type?ie.push(fe):(Me=ie[ie.length-1],Me.raw+=`
`+fe.raw,Me.text+=`
`+fe.text);continue}if(fe=this.tokenizer.fences(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.heading(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.nptable(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.hr(te)){te=te.substring(fe.raw.length),ie.push(fe);continue}if(fe=this.tokenizer.blockquote(te)){te=te.substring(fe.raw.length),fe.tokens=this.blockTokens(fe.text,[],he),ie.push(fe);continue}if(fe=this.tokenizer.list(te)){for(te=te.substring(fe.raw.length),Ee=fe.items.length,ve=0;ve0)for(;(We=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)qe.includes(We[0].slice(We[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,We.index)+"["+"a".repeat(We[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(We=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,We.index)+"["+"a".repeat(We[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),ie.push(Ee);continue}if(Ee=this.tokenizer.tag(te,he,fe)){te=te.substring(Ee.raw.length),he=Ee.inLink,fe=Ee.inRawBlock,ie.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,fe)),ie.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,fe)),ie.push(Ee);continue}if(Ee=this.tokenizer.strong(te,Me,ve)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],he,fe),ie.push(Ee);continue}if(Ee=this.tokenizer.em(te,Me,ve)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],he,fe),ie.push(Ee);continue}if(Ee=this.tokenizer.codespan(te)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.br(te)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.del(te)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],he,fe),ie.push(Ee);continue}if(Ee=this.tokenizer.autolink(te,oe)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(!he&&(Ee=this.tokenizer.url(te,oe))){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.inlineText(te,fe,F)){te=te.substring(Ee.raw.length),ve=Ee.raw.slice(-1),ie.push(Ee);continue}if(te){var tt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(tt);break}else throw new Error(tt)}}return ie},$(q,null,[{key:"rules",get:function(){return{block:R,inline:X}}}]),q}(),we=G.defaults,Oe=V.cleanUrl,ke=V.escape,Re=function(){function q(le){this.options=le||we}var ae=q.prototype;return ae.code=function(te,ie,he){var fe=(ie||"").match(/\S*/)[0];if(this.options.highlight){var ve=this.options.highlight(te,fe);ve!=null&&ve!==te&&(he=!0,te=ve)}return fe?''+(he?te:ke(te,!0))+`
`:""+(he?te:ke(te,!0))+`
`},ae.blockquote=function(te){return`
`+te+`
`},ae.html=function(te){return te},ae.heading=function(te,ie,he,fe){return this.options.headerIds?"
`:""+te+"
`},ae.hr=function(){return this.options.xhtml?`
`:`
`},ae.list=function(te,ie,he){var fe=ie?"ol":"ul",ve=ie&&he!==1?' start="'+he+'"':"";return"<"+fe+ve+`>
`+te+""+fe+`>
`},ae.listitem=function(te){return""+te+`
`},ae.checkbox=function(te){return" "},ae.paragraph=function(te){return""+te+`
`},ae.table=function(te,ie){return ie&&(ie=""+ie+" "),`
`},ae.tablerow=function(te){return`
`+te+`
`},ae.tablecell=function(te,ie){var he=ie.header?"th":"td",fe=ie.align?"<"+he+' align="'+ie.align+'">':"<"+he+">";return fe+te+""+he+`>
`},ae.strong=function(te){return""+te+" "},ae.em=function(te){return""+te+" "},ae.codespan=function(te){return""+te+""},ae.br=function(){return this.options.xhtml?" ":" "},ae.del=function(te){return""+te+""},ae.link=function(te,ie,he){if(te=Oe(this.options.sanitize,this.options.baseUrl,te),te===null)return he;var fe='"+he+" ",fe},ae.image=function(te,ie,he){if(te=Oe(this.options.sanitize,this.options.baseUrl,te),te===null)return he;var fe=' ":">",fe},ae.text=function(te){return te},q}(),_e=function(){function q(){}var ae=q.prototype;return ae.strong=function(te){return te},ae.em=function(te){return te},ae.codespan=function(te){return te},ae.del=function(te){return te},ae.html=function(te){return te},ae.text=function(te){return te},ae.link=function(te,ie,he){return""+he},ae.image=function(te,ie,he){return""+he},ae.br=function(){return""},q}(),Ne=function(){function q(){this.seen={}}var ae=q.prototype;return ae.slug=function(te){var ie=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ie)){var he=ie;do this.seen[he]++,ie=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(ie))}return this.seen[ie]=0,ie},q}(),Ge=G.defaults,He=V.unescape,ze=function(){function q(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 _e,this.slugger=new Ne}q.parse=function(te,ie){var he=new q(ie);return he.parse(te)};var ae=q.prototype;return ae.parse=function(te,ie){ie===void 0&&(ie=!0);var he="",fe,ve,Ee,Me,We,qe,tt,vt,ot,it,wt,xt,It,_t,Et,mr,Tr,Yt,gr=te.length;for(fe=0;fe0&&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}):_t+=Yt),_t+=this.parse(Et.tokens,It),ot+=this.renderer.listitem(_t,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;fe+1An error occurred:
"+Xe(Ee.message+"",!0)+" ";throw Ee}}se.options=se.setOptions=function(q){return nt(se.defaults,q),rt(se.defaults),se},se.getDefaults=Pe,se.defaults=Qe,se.use=function(q){var ae=nt({},q);if(q.renderer&&function(){var te=se.defaults.renderer||new Re,ie=function(ve){var Ee=te[ve];te[ve]=function(){for(var Me=arguments.length,We=new Array(Me),qe=0;qe`,triples:"",explode:"[]{}"},O=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(w,T,d){d&&d!=ce.Init&&(w.removeKeyMap(U),w.state.closeBrackets=null),T&&(D(J(T,"pairs")),w.state.closeBrackets=T,w.addKeyMap(U))});function J(w,T){return T=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[T]!=null?w[T]:$[T]}var U={Backspace:I,Enter:_};function D(w){for(var T=0;T=0;l--){var C=o[l].head;w.replaceRange("",O(C.line,C.ch-1),O(C.line,C.ch+1),"+delete")}}function _(w){var T=H(w),d=T&&J(T,"explode");if(!d||w.getOption("disableInput"))return ce.Pass;for(var o=w.listSelections(),l=0;l0;return{anchor:new O(w.anchor.line,w.anchor.ch+(T?-1:1)),head:new O(w.head.line,w.head.ch+(T?1:-1))}}function A(w,T){var d=H(w);if(!d||w.getOption("disableInput"))return ce.Pass;var o=J(d,"pairs"),l=o.indexOf(T);if(l==-1)return ce.Pass;for(var h=J(d,"closeBefore"),C=J(d,"triples"),v=o.charAt(l+1)==T,g=w.listSelections(),L=l%2==0,E,p=0;p=0&&w.getRange(u,O(u.line,u.ch+3))==T+T+T?a="skipThree":a="skip";else if(v&&u.ch>1&&C.indexOf(T)>=0&&w.getRange(O(u.line,u.ch-2),u)==T+T){if(u.ch>2&&/\bstring/.test(w.getTokenTypeAt(O(u.line,u.ch-2))))return ce.Pass;a="addFour"}else if(v){var m=u.ch==0?" ":w.getRange(O(u.line,u.ch-1),u);if(!ce.isWordChar(y)&&m!=T&&!ce.isWordChar(m))a="both";else return ce.Pass}else if(L&&(y.length===0||/\s/.test(y)||h.indexOf(y)>-1))a="both";else return ce.Pass;if(!E)E=a;else if(E!=a)return ce.Pass}var x=l%2?o.charAt(l-1):T,B=l%2?T:o.charAt(l+1);w.operation(function(){if(E=="skip")w.execCommand("goCharRight");else if(E=="skipThree")for(var W=0;W<3;W++)w.execCommand("goCharRight");else if(E=="surround"){for(var K=w.getSelections(),W=0;W0&&(ue.percent=ue.loaded/ue.total*100),V.onProgress(ue)});var N=new FormData;V.data&&Object.keys(V.data).forEach(function(ne){var ue=V.data[ne];if(Array.isArray(ue)){ue.forEach(function(me){N.append(ne+"[]",me)});return}N.append(ne,V.data[ne])}),V.file instanceof Blob?N.append(V.filename,V.file,V.file.name):N.append(V.filename,V.file),M.onerror=function(ue){V.onError(ue)},M.onload=function(){return M.status<200||M.status>=300?V.onError(U(V,M),D(M)):V.onSuccess(D(M),M)},M.open(V.method,V.action,!0),V.withCredentials&&"withCredentials"in M&&(M.withCredentials=!0);var Z=V.headers||{};return Z["X-Requested-With"]!==null&&M.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Z).forEach(function(ne){Z[ne]!==null&&M.setRequestHeader(ne,Z[ne])}),M.send(N),{abort:function(){M.abort()}}}var H=+new Date,I=0;function _(){return"rc-upload-"+H+"-"+ ++I}function b(V,M){return V.indexOf(M,V.length-M.length)!==-1}var A=function(V,M){if(V&&M){var N=Array.isArray(M)?M:M.split(","),Z=V.name||"",ne=V.type||"",ue=ne.replace(/\/.*$/,"");return N.some(function(me){var Le=me.trim();return Le.charAt(0)==="."?b(Z.toLowerCase(),Le.toLowerCase()):/\/\*$/.test(Le)?ue===Le.replace(/\/.*$/,""):ne===Le})}return!0};function P(V,M){var N=V.createReader(),Z=[];function ne(){N.readEntries(function(ue){var me=Array.prototype.slice.apply(ue);Z=Z.concat(me);var Le=!me.length;Le?M(Z):ne()})}ne()}var k=function(M,N,Z){var ne=function ue(me,Le){Le=Le||"",me.isFile?me.file(function(xe){Z(xe)&&(me.fullPath&&!xe.webkitRelativePath&&(Object.defineProperties(xe,{webkitRelativePath:{writable:!0}}),xe.webkitRelativePath=me.fullPath.replace(/^\//,""),Object.defineProperties(xe,{webkitRelativePath:{writable:!1}})),N([xe]))}):me.isDirectory&&P(me,function(xe){xe.forEach(function(De){ue(De,""+Le+me.name+"/")})})};M.forEach(function(ue){ne(ue.webkitGetAsEntry())})},w=k,T=Object.assign||function(V){for(var M=1;M=0)continue;if(!Object.prototype.hasOwnProperty.call(V,Z))continue;N[Z]=V[Z]}return N}function C(V,M){if(!(V instanceof M))throw new TypeError("Cannot call a class as a function")}function v(V,M){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:V}function g(V,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);V.prototype=Object.create(M&&M.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(V,M):V.__proto__=M)}var L=function(M){return Object.keys(M).reduce(function(N,Z){return(Z.substr(0,5)==="data-"||Z.substr(0,5)==="aria-"||Z==="role")&&(N[Z]=M[Z]),N},{})},E=function(V){g(M,V);function M(){var N,Z,ne,ue;C(this,M);for(var me=arguments.length,Le=Array(me),xe=0;xe1&&arguments[1]!==void 0?arguments[1]:1,le=_e.length,te=0;te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(N).map(function(ne,ue){if(!U.isValidElement(ne)||!ne.type)return null;var me=ne.type.isSelectOptGroup,Le=ne.key,xe=ne.props,De=xe.children,Se=Object(G.a)(xe,["children"]);return Z||!me?E(ne):Object(g.a)(Object(g.a)({key:"__RC_SELECT_GRP__".concat(Le===null?ue:Le,"__"),label:Le},Se),{},{options:p(De)})}).filter(function(ne){return ne})}var c=de("2Qr1"),u=de("qNPg"),a=de("U8pU"),y=de("Kwbf"),m=de("WKfj");function x(N){var Z=N.mode,ne=N.options,ue=N.children,me=N.backfill,Le=N.allowClear,xe=N.placeholder,De=N.getInputElement,Se=N.showSearch,Te=N.onSearch,ye=N.defaultOpen,z=N.autoFocus,s=N.labelInValue,f=N.value,R=N.inputValue,X=N.optionLabelProp,F=Z==="multiple"||Z==="tags",oe=Se!==void 0?Se:F||Z==="combobox",be=ne||p(ue);if(Object(y.a)(Z!=="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."),Z==="tags"||Z==="combobox"){var we=be.some(function(Re){return Re.options?Re.options.some(function(_e){return typeof("value"in _e?_e.value:_e.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)(Z!=="combobox"||!X,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(y.a)(Z==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(y.a)(Z==="combobox"||!De,"`getInputElement` only work with `combobox` mode."),Object(y.b)(Z!=="combobox"||!De||!Le||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Te&&!oe&&Z!=="combobox"&&Z!=="tags"&&Object(y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(y.b)(!ye||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(m.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)(!F||Array.isArray(f),"`value` should be array when `mode` is `multiple` or `tags`")}if(ue){var ke=null;Object(L.a)(ue).some(function(Re){if(!U.isValidElement(Re)||!Re.type)return!1;var _e=Re.type;if(_e.isSelectOption)return!1;if(_e.isSelectOptGroup){var Ne=Object(L.a)(Re.props.children).every(function(Ge){return!U.isValidElement(Ge)||!Re.type||Ge.type.isSelectOption?!0:(ke=Ge.type,!1)});return!Ne}return ke=_e,!0}),ke&&Object(y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ke.displayName||ke.name||ke,"`.")),Object(y.a)(R===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var B=x,W=Object(u.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:B,fillOptionsWithMissingValue:c.a}),K=function(N){Object(O.a)(ne,N);var Z=Object(J.a)(ne);function ne(){var ue;return Object(ce.a)(this,ne),ue=Z.apply(this,arguments),ue.selectRef=U.createRef(),ue.focus=function(){ue.selectRef.current.focus()},ue.blur=function(){ue.selectRef.current.blur()},ue}return Object($.a)(ne,[{key:"render",value:function(){return U.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),ne}(U.Component);K.Option=h,K.OptGroup=v;var V=K,M=Ye.c=V},M8RZ:function(ut,Ye,de){"use strict";de.d(Ye,"a",function(){return I});var ce=de("fWQN"),$=de("mtLc"),O=de("yKVA"),J=de("879j"),U=de("q1tI"),D=de.n(U),G=de("i8i4"),H=de.n(G),I=function(_){Object(O.a)(A,_);var b=Object(J.a)(A);function A(P){var k;Object(ce.a)(this,A),k=b.call(this,P);var w=window.document;return k.node=w.createElement("div"),w.body.appendChild(k.node),k}return Object($.a)(A,[{key:"render",value:function(){var k=this.props.children;return Object(G.createPortal)(k,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),A}(D.a.Component)},OLES:function(ut,Ye,de){"use strict";var ce=de("U8pU"),$=de("VTBJ"),O=de("Ff2n"),J=de("q1tI"),U=de("uciX"),D=de("7ixt"),G=function(P){var k=P.overlay,w=P.prefixCls,T=P.id,d=P.overlayInnerStyle;return J.createElement("div",{className:"".concat(w,"-inner"),id:T,role:"tooltip",style:d},typeof k=="function"?k():k)},H=G,I=function(P,k){var w=P.overlayClassName,T=P.trigger,d=T===void 0?["hover"]:T,o=P.mouseEnterDelay,l=o===void 0?0:o,h=P.mouseLeaveDelay,C=h===void 0?.1:h,v=P.overlayStyle,g=P.prefixCls,L=g===void 0?"rc-tooltip":g,E=P.children,p=P.onVisibleChange,c=P.afterVisibleChange,u=P.transitionName,a=P.animation,y=P.placement,m=y===void 0?"right":y,x=P.align,B=x===void 0?{}:x,W=P.destroyTooltipOnHide,K=W===void 0?!1:W,V=P.defaultVisible,M=P.getTooltipContainer,N=P.overlayInnerStyle,Z=Object(O.a)(P,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ne=Object(J.useRef)(null);Object(J.useImperativeHandle)(k,function(){return ne.current});var ue=Object($.a)({},Z);"visible"in P&&(ue.popupVisible=P.visible);var me=function(){var Te=P.arrowContent,ye=Te===void 0?null:Te,z=P.overlay,s=P.id;return[J.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},ye),J.createElement(H,{key:"content",prefixCls:L,id:s,overlay:z,overlayInnerStyle:N})]},Le=!1,xe=!1;if(typeof K=="boolean")Le=K;else if(K&&Object(ce.a)(K)==="object"){var De=K.keepParent;Le=De===!0,xe=De===!1}return J.createElement(U.a,Object.assign({popupClassName:w,prefixCls:L,popup:me,action:d,builtinPlacements:D.a,popupPlacement:m,ref:ne,popupAlign:B,getPopupContainer:M,onPopupVisibleChange:p,afterPopupVisibleChange:c,popupTransitionName:u,popupAnimation:a,defaultPopupVisible:V,destroyPopupOnHide:Le,autoDestroy:xe,mouseLeaveDelay:C,popupStyle:v,mouseEnterDelay:l},ue),E)},_=Object(J.forwardRef)(I),b=Ye.a=_},Ot1p:function(ut,Ye,de){"use strict";var ce=de("2qtc"),$=de("kLXV"),O=de("rAM+"),J=de("miYZ"),U=de("tsqr"),D=de("9og8"),G=de("tJVT"),H=de("jrin"),I=de("WmNS"),_=de.n(I),b=de("q1tI"),A=de.n(b),P=de("VrN/"),k=de.n(P),w=de("bdgK"),T=de("p77/"),d=de("Bd2K"),o=de("ELLl"),l=de("19Vz"),h=de("lZu9"),C=de("+NIl"),v=de("kSUc"),g=de("9Bee"),L=function(ve){var Ee=ve.value,Me=Ee===void 0?"":Ee,We=ve.className,qe=ve.showTextOnly,tt=ve.showLines,vt=ve.style,ot=vt===void 0?{}:vt,it=Object(b.useMemo)(function(){return""},[Me]);return A.a.createElement(A.a.Fragment,null,A.a.createElement("div",{dangerouslySetInnerHTML:{__html:it}}))},E=de("0Owb"),p=de("dejd"),c=de("C+DQ"),u=de("1vsH"),a=de("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 m(ve){var Ee=ve.onActionCallback,Me=ve.title,We=ve.icon,qe=ve.actionName,tt=ve.className,vt=tt===void 0?"":tt,ot=ve.children;function it(){Ee(qe)}return A.a.createElement("a",{title:Me,className:vt,onClick:it},A.a.createElement("i",{className:"md-iconfont ".concat(We)}),ot)}var x=function(ve){var Ee=ve.watch,Me=ve.showNullButton,We=ve.onActionCallback,qe=ve.fullScreen,tt=ve.insertTemp,vt=ve.hidetoolBar,ot=ve.uuid,it=ve.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(u.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(u.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 A.a.createElement("ul",{className:"markdown-toolbar-container"},!vt&&wt.map(function(xt,It){return A.a.createElement("li",{key:It},xt.actionName?A.a.createElement(m,Object(E.a)({},xt,{onActionCallback:We})):A.a.createElement("span",{className:"v-line"}))}),Me?A.a.createElement("li",null,A.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:We},A.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,tt&&A.a.createElement("li",null,A.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(tt),onActionCallback:We},A.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),A.a.createElement("li",{className:"btn-full-screen"},A.a.createElement(m,{icon:"".concat(qe?"icon-shrink":"icon-enlarge"),title:qe?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:We})))},B=de("M8RZ"),W=de("+L6B"),K=de("2/Rp"),V=de("y8nQ"),M=de("Vl3Y"),N=de("5NDa"),Z=de("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},ue=function(ve){var Ee=ve.callback,Me=ve.onCancel;function We(qe){Ee(qe)}return A.a.createElement(M.a,Object(E.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:We}),A.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},A.a.createElement(Z.a,null)),A.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},A.a.createElement(Z.a,null)),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},me=de("7ahc"),Le=de("HmJG"),xe=de("BjJ7"),De=M.a.useForm,Se={width:280,marginRight:10},Te={labelCol:{span:5},wrapperCol:{span:19}},ye=function(ve){var Ee=ve.callback,Me=ve.onCancel,We=De(),qe=Object(G.a)(We,1),tt=qe[0];function vt(wt){Ee(wt)}function ot(wt,xt){if(wt.status===-1){U.b.error(wt.message);return}tt.setFieldsValue({src:"/api/attachments/".concat(wt.id),type:xt.type})}function it(wt){var xt=wt.target.files[0];s(xt,ot)}return A.a.createElement(M.a,Object(E.a)({form:tt},Te,{className:"upload-image-panel",onFinish:vt}),A.a.createElement(M.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},A.a.createElement("div",{className:"flex-container"},A.a.createElement(M.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},A.a.createElement(Z.a,{style:Se})),A.a.createElement(z,{onFileChange:it}))),A.a.createElement(M.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},A.a.createElement(Z.a,{style:{width:264}})),A.a.createElement(M.a.Item,{style:{textAlign:"right"}},A.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))};function z(ve){var Ee=ve.onFileChange;return A.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",A.a.createElement("input",{type:"file",onChange:Ee}))}function s(ve,Ee){if(!ve)throw new String("\u6CA1\u6709\u6587\u4EF6");var Me=new FormData;Me.append("editormd-image-file",ve),Me.append("file_param_name","editormd-image-file"),Me.append("byxhr","true");var We=new window.XMLHttpRequest;We.withCredentials=!0,We.addEventListener("load",function(qe){Ee(JSON.parse(qe.target.responseText),ve)},!1),We.addEventListener("error",function(qe){console.error(qe)},!1),We.open("POST","".concat(xe.a,"/api/attachments.json")),We.send(Me)}var f=de("giR+"),R=de("fyUT"),X=de("7Kak"),F=de("9yH6"),oe=F.a.Group,be={margin:"0 8px"},we=function(ve){var Ee=ve.callback,Me=ve.onCancel;function We(qe){Ee(qe)}return A.a.createElement(M.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:We},A.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},A.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),A.a.createElement("span",{style:be},"\u884C\u6570"),A.a.createElement(M.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},A.a.createElement(R.a,null)),A.a.createElement("span",{style:be},"\u5217\u6570"),A.a.createElement(M.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},A.a.createElement(R.a,null))),A.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},A.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),A.a.createElement(M.a.Item,{name:"align"},A.a.createElement(oe,null,A.a.createElement(F.a,{value:"default"},A.a.createElement("i",{className:"fa fa-align-justify"})),A.a.createElement(F.a,{value:"left"},A.a.createElement("i",{className:"fa fa-align-left"})),A.a.createElement(F.a,{value:"center"},A.a.createElement("i",{className:"fa fa-align-center"})),A.a.createElement(F.a,{value:"right"},A.a.createElement("i",{className:"fa fa-align-right"}))))),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},Oe=de("ErOA"),ke=de("7Cbv"),Re="link",_e="upload-image",Ne="code-block",Ge="add-table",He="------------",ze={default:He,left:":".concat(He),center:":".concat(He,":"),right:"".concat(He,":")},nt=de("9VGf"),$e,Xe;function Pe(){}var rt=0,Qe=1e4,se="\u2581",ee=`
**\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 q(ve){return/^\d+$/.test(ve)?"".concat(ve,"px"):ve}var ae=navigator.platform.toUpperCase().indexOf("MAC")>=0,le=ae?"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"],ie=($e={},Object(H.a)($e,le+"-B","bold"),Object(H.a)($e,le+"-I","italic"),$e),he=(Xe={},Object(H.a)(Xe,Re,"\u6DFB\u52A0\u94FE\u63A5"),Object(H.a)(Xe,Ne,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(H.a)(Xe,_e,"\u6DFB\u52A0\u6587\u4EF6"),Object(H.a)(Xe,Ge,"\u6DFB\u52A0\u8868\u683C"),Xe),fe=Ye.a=function(ve){var Ee=ve.defaultValue,Me=Ee===void 0?"":Ee,We=ve.onChange,qe=ve.width,tt=qe===void 0?"100%":qe,vt=ve.height,ot=vt===void 0?400:vt,it=ve.miniToolbar,wt=it===void 0?!1:it,xt=ve.isFocus,It=xt===void 0?!1:xt,_t=ve.watch,Et=ve.insertTemp,mr=ve.mode,Tr=mr===void 0?"markdown":mr,Yt=ve.id,gr=Yt===void 0?"markdown-editor-id":Yt,cr=ve.showResizeBar,zr=cr===void 0?!1:cr,$t=ve.noStorage,Nr=$t===void 0?!1:$t,ti=ve.showNullButton,Pt=ti===void 0?!1:ti,Ze=ve.hidetoolBar,Tt=Ze===void 0?!1:Ze,Zt=ve.fullScreen,mt=Zt===void 0?!1:Zt,pt=ve.onBlur,At=ve.onCMBeforeChange,vr=ve.onFullScreen,Ut=ve.className,Be=Ut===void 0?"":Ut,dt=ve.disablePaste,ri=dt===void 0?!1:dt,bi=ve.placeholder,xi=bi===void 0?"":bi,ii=ve.values,Ei=ii===void 0?"":ii,ft=Object(b.useState)(null),Ln=Object(G.a)(ft,2),Ue=Ln[0],Si=Ln[1],Er=Object(b.useState)(Me),Ki=Object(G.a)(Er,2),ni=Ki[0],Cr=Ki[1],Vi=Object(b.useState)(_t),Xi=Object(G.a)(Vi,2),wr=Xi[0],Yi=Xi[1],kn=Object(b.useState)(mt),$i=Object(G.a)(kn,2),Ar=$i[0],Dn=$i[1],aa=Object(b.useState)(""),Zi=Object(G.a)(aa,2),rr=Zi[0],Kr=Zi[1],oa=Object(b.useState)(0),ai=Object(G.a)(oa,2),Lr=ai[0],Ji=ai[1],sa=Object(b.useState)(ot),Rn=Object(G.a)(sa,2),On=Rn[0],Ti=Rn[1],_n=Object(b.useState)(!1),Pn=Object(G.a)(_n,2),la=Pn[0],Ci=Pn[1],oi=Object(b.useRef)(Object(ke.a)()),si=Object(b.useRef)(!1),wi=Object(b.useRef)(),Fr=Object(b.useRef)(),Br=Object(b.useRef)(),Ur=Object(b.useRef)(),Ai=Object(b.useRef)(),Mn=function(){var at=Object(D.a)(_.a.mark(function ct(){var lt,yt;return _.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,Object(Oe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:oi.current}});case 2:yt=Rt.sent,yt!=null&&(lt=yt.attachments)!==null&<!==void 0&<.length&&(console.log("cm:",Ue,Fr),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 Rt.stop()}},ct)}));return function(){return at.apply(this,arguments)}}();Object(b.useEffect)(function(){Cr(Ei),Ue==null||Ue.setValue(Ei)},[Ei]),Object(b.useEffect)(function(){vr==null||vr(Ar)},[Ar]),Object(b.useEffect)(function(){if(Fr.current){var at=k.a.fromTextArea(Fr.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 Rt=Ct.types.toString(),St=Ct.items;if(Rt==="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(Lt){if(Lt.id){var or,qt,Sr;(bt==null||((or=bt.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?at.replaceSelection(".concat(Lt.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(Lt.id,"?type=").concat(Lt.content_type,")"))}else(Lt==null?void 0:Lt.status)===401&&(document.location.href="/user/login")})}catch(Lt){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){Br.current.classList.remove("mouse-hover-md")}),at.on("dragover",function(lt,yt){Br.current.classList.add("mouse-hover-md")}),at.on("drop",function(lt,yt){Br.current.classList.add("mouse-hover-md");var Ct;if(Ct=yt.dataTransfer.files,Ct.length>0){yt.preventDefault(),yt.stopPropagation();for(var Rt=function(ar){var bt=Ct[ar],jr=bt.name.split(".").pop();s(bt,function(Lt){if(Lt.id){var or,qt,Sr;(bt==null||((or=bt.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?at.replaceSelection(".concat(Lt.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(Lt.id,"?type=").concat(Lt.content_type,")"))}else(Lt==null?void 0:Lt.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(Fr.current.parentElement),lt}if(Ue){var ct=at();return function(){ct.unobserve(Fr.current.parentElement)}}},[Ue,yr]),Object(b.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(ie);lt0){var at=new Date().getTime(),ct=window.sessionStorage.getItem(gr);at>=Lr+Qe&&(!ct||ct!==ni)&&(window.sessionStorage.setItem(gr,ni),Ci(!0))}},Qe),Object(b.useEffect)(function(){Yi(_t)},[Ue,_t]),Object(b.useEffect)(function(){Ue&&(It&&Ue.focus())},[Ue,It]),Object(b.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(b.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(b.useEffect)(function(){if(Ue&&pt){function at(){pt(Ue.getValue())}return Ue.on("blur",at),function(){Ue.off("blur",at)}}},[Ue,pt]),Object(b.useEffect)(function(){if(Ue){function at(ct){var lt=ct.getValue();Cr(lt),Ji(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),We&&We(lt)}return Ue.on("change",at),function(){Ue.off("change",at)}}},[Ue,We]),Object(b.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(b.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,Rt){return Ct===""?"":"".concat(Rt+1,". ").concat(Ct)}).join(`
`)),Ue.focus();case"add-null-ch":return lt===""&&Ue.setCursor(ct.line,ct.ch+1),Ue.replaceSelection(se),Ue.focus();case"inster-template-1":return lt===""&&Ue.setCursor(ct.line,ct.ch),Ue.replaceSelection(ee),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return Yi(!wr),Ue.focus();case"trigger-full-screen":return Dn(!Ar),Ue.focus();case Re:Kr(Re);return;case Ne:Kr(Ne);return;case _e:Kr(_e);return;case Ge:Kr(Ge);return;default:throw new Error}},[Ue,wr,Ar]),Li=Object(b.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 Ne:var yt=at.language,Ct=at.content;return Ue.replaceSelection(["```"+yt,Ct,"```"].join(`
`)),Ue.focus();case _e:var Rt=at.src,St=at.alt;return St?Ue.replaceSelection(".concat(Rt,' "').concat(St,'" )')):Ue.replaceSelection("")),Ue.focus();case Ge:for(var Ht=at.row,ar=at.col,bt=at.align,jr=`
`,Lt=0;Lt300&&(Ht=300);var ar=ot+Ht+"px";Ti(ar)}}return at.addEventListener("mousedown",yt),document.addEventListener("mousemove",Rt),document.addEventListener("mouseup",Ct),function(){at.removeEventListener("mousedown",yt),document.removeEventListener("mousemove",Rt),document.removeEventListener("mouseup",Ct)}}},[Ue,Ur]),Object(b.useEffect)(function(){Ti(ot)},[ot]);var _r=q(tt),qi=q(On),kr={width:_r,height:qi},en=Object(b.useMemo)(function(){if(Lr){var at=new Date(Lr),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},[Lr]);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 A.a.createElement(b.Fragment,null,A.a.createElement("div",{className:"markdown-editor-wrapper",ref:Br},A.a.createElement("div",{className:"markdown-editor-container ".concat(Be," ").concat(wr?"on-preview":""," ").concat(wt?"mini":""," ").concat(Ar?"full-screen":""),style:kr},A.a.createElement(x,{insertTemp:Et,watch:wr,fullScreen:Ar,showNullButton:Pt,onActionCallback:In,hidetoolBar:Tt,uuid:oi.current,setOpenPhones:function(){si.current=!0}}),A.a.createElement("div",{className:"markdown-editor-body"},A.a.createElement("div",{className:"codemirror-container"},A.a.createElement("textarea",{ref:Fr,placeholder:xi})),wr?A.a.createElement("div",{ref:Ai,className:"preview-container"},Tr==="stex"&&A.a.createElement(L,{value:ni}),Tr!=="stex"&&A.a.createElement(g.a,{edit:!0,value:ni,replaces:ua})):null))),zr?A.a.createElement("a",{ref:Ur,className:"editor-resize"}):null,A.a.createElement(B.a,null,he[rr]?A.a.createElement($.a,{centered:!0,title:he[rr],visible:!0,onCancel:Vr,footer:null,className:"markdown-popup-form"},Qi):null))}},SJMd:function(ut,Ye){/**
* @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 de,ce,$,O=!1,J,U;window.PR_SHOULD_USE_CONTINUATION=!0;var D,G;(function(){var H=window,I=["break,continue,do,else,for,if,return,while"],_=[I,"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"],b=[_,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],A=[b,"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"],P=[b,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],k=[b,"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"],w="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",T=[b,"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=[I,"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=[I,"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"],h=[I,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],C=[A,k,P,T,d,o,l,h],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,g="str",L="kwd",E="com",p="typ",c="lit",u="pun",a="pln",y="tag",m="dec",x="src",B="atn",W="atv",K="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function M(oe){for(var be=0,we=!1,Oe=!1,ke=0,Re=oe.length;ke122||(te<65||le>90||rt.push([Math.max(65,le)|32,Math.min(te,90)|32]),te<97||le>122||rt.push([Math.max(97,le)&~32,Math.min(te,122)&~32]))}}rt.sort(function(ve,Ee){return ve[0]-Ee[0]||Ee[1]-ve[1]});for(var ie=[],he=[],ee=0;eefe[0]&&(fe[1]+1>fe[0]&&se.push("-"),se.push(He(fe[1])))}return se.push("]"),se.join("")}function nt(Xe){for(var Pe=Xe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),rt=Pe.length,Qe=[],se=0,ee=0;se=2&&le==="["?Pe[se]=ze(q):le!=="\\"&&(Pe[se]=q.replace(/[a-zA-Z]/g,function(he){var fe=he.charCodeAt(0);return"["+String.fromCharCode(fe&~32,fe|32)+"]"}))}return Pe.join("")}for(var $e=[],ke=0,Re=oe.length;ke=0;)we[$e.charAt(Xe)]=nt;var Pe=nt[1],rt=""+Pe;Ge.hasOwnProperty(rt)||(Ne.push(Pe),Ge[rt]=null)}Ne.push(/[\0-\uffff]/),Oe=M(Ne)})();var ke=be.length,Re=function(_e){for(var Ne=_e.sourceCode,Ge=_e.basePos,He=_e.sourceNode,ze=[Ge,a],nt=0,$e=Ne.match(Oe)||[],Xe={},Pe=0,rt=$e.length;Pe=5&&se.substring(0,5)==="lang-",q&&!(ee&&typeof ee[1]=="string")&&(q=!1,se=x),q||(Xe[Qe]=se)}var te=nt;if(nt+=Qe.length,!q)ze.push(Ge+te,se);else{var ie=ee[1],he=Qe.indexOf(ie),fe=he+ie.length;ee[2]&&(fe=Qe.length-ee[2].length,he=fe-ie.length);var ve=se.substring(5);Z(He,Ge+te,Qe.substring(0,he),Re,ze),Z(He,Ge+te+he,ie,z(ve,ie),ze),Z(He,Ge+te+fe,Qe.substring(fe),Re,ze)}}_e.decorations=ze};return Re}function Le(oe){var be=[],we=[];oe.tripleQuotedStrings?be.push([g,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?be.push([g,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):be.push([g,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&we.push([g,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Oe=oe.hashComments;Oe&&(oe.cStyleComments?(Oe>1?be.push([E,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):be.push([E,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),we.push([g,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):be.push([E,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&(we.push([E,/^\/\/[^\r\n]*/,null]),we.push([E,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ke=oe.regexLiterals;if(ke){var Re=ke>1?"":`
\r`,_e=Re?".":"[\\S\\s]",Ne="/(?=[^/*"+Re+"])(?:[^/\\x5B\\x5C"+Re+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+Re+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";we.push(["lang-regex",RegExp("^"+V+"("+Ne+")")])}var Ge=oe.types;Ge&&we.push([p,Ge]);var He=(""+oe.keywords).replace(/^ | $/g,"");He.length&&we.push([L,new RegExp("^(?:"+He.replace(/[\s,]+/g,"|")+")\\b"),null]),be.push([a,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(ze+="(?!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],[u,new RegExp(ze),null]),me(be,we)}var xe=Le({keywords:C,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function De(oe,be,we){for(var Oe=/(?:^|\s)nocode(?:\s|$)/,ke=/\r\n?|\n/,Re=oe.ownerDocument,_e=Re.createElement("li");oe.firstChild;)_e.appendChild(oe.firstChild);var Ne=[_e];function Ge(Pe){var rt=Pe.nodeType;if(rt==1&&!Oe.test(Pe.className))if(Pe.nodeName==="br")He(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var Qe=Pe.firstChild;Qe;Qe=Qe.nextSibling)Ge(Qe);else if((rt==3||rt==4)&&we){var se=Pe.nodeValue,ee=se.match(ke);if(ee){var q=se.substring(0,ee.index);Pe.nodeValue=q;var ae=se.substring(ee.index+ee[0].length);if(ae){var le=Pe.parentNode;le.insertBefore(Re.createTextNode(ae),Pe.nextSibling)}He(Pe),q||Pe.parentNode.removeChild(Pe)}}}function He(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function rt(ee,q){var ae=q?ee.cloneNode(!1):ee,le=ee.parentNode;if(le){var te=rt(le,1),ie=ee.nextSibling;te.appendChild(ae);for(var he=ie;he;he=ie)ie=he.nextSibling,te.appendChild(he)}return ae}for(var Qe=rt(Pe.nextSibling,0),se;(se=Qe.parentNode)&&se.nodeType===1;)Qe=se;Ne.push(Qe)}for(var ze=0;ze=le&&(Ge+=2),Re>=te&&(nt+=2)}}finally{se&&(se.style.display=ee)}}var Te={};function ye(oe,be){for(var we=be.length;--we>=0;){var Oe=be[we];Te.hasOwnProperty(Oe)?H.console&&console.warn("cannot override language handler %s",Oe):Te[Oe]=oe}}function z(oe,be){return oe&&Te.hasOwnProperty(oe)||(oe=/^\s*]*(?:>|$)/],[E,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[u,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^