(window.webpackJsonp=window.webpackJsonp||[]).push([[185,6,7,8,11],{"+NIl":function(ft,it,pe){(function(fe){fe(pe("VrN/"))})(function(fe){"use strict";fe.defineMode("stex",function(Z,_){"use strict";function Q(L,A){L.cmdState.push(A)}function U(L){return L.cmdState.length>0?L.cmdState[L.cmdState.length-1]:null}function D(L){var A=L.cmdState.pop();A&&A.closeBracket()}function G(L){for(var A=L.cmdState,w=A.length-1;w>=0;w--){var d=A[w];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function H(L,A,w){return function(){this.name=L,this.bracketNo=0,this.style=A,this.styles=w,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var F={};F.importmodule=H("importmodule","tag",["string","builtin"]),F.documentclass=H("documentclass","tag",["","atom"]),F.usepackage=H("usepackage","tag",["atom"]),F.begin=H("begin","tag",["atom"]),F.end=H("end","tag",["atom"]),F.label=H("label","tag",["atom"]),F.ref=H("ref","tag",["atom"]),F.eqref=H("eqref","tag",["atom"]),F.cite=H("cite","tag",["atom"]),F.bibitem=H("bibitem","tag",["atom"]),F.Bibitem=H("Bibitem","tag",["atom"]),F.RBibitem=H("RBibitem","tag",["atom"]),F.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function O(L,A){L.f=A}function y(L,A){var w;if(L.match(/^\\[a-zA-Z@]+/)){var d=L.current().slice(1);return w=F.hasOwnProperty(d)?F[d]:F.DEFAULT,w=new w,Q(A,w),O(A,I),w.style}if(L.match(/^\\[$&%#{}_]/))return"tag";if(L.match(/^\\[,;!\/\\]/))return"tag";if(L.match("\\["))return O(A,function(l,u){return T(l,u,"\\]")}),"keyword";if(L.match("\\("))return O(A,function(l,u){return T(l,u,"\\)")}),"keyword";if(L.match("$$"))return O(A,function(l,u){return T(l,u,"$$")}),"keyword";if(L.match("$"))return O(A,function(l,u){return T(l,u,"$")}),"keyword";var o=L.next();if(o=="%")return L.skipToEnd(),"comment";if(o=="}"||o=="]"){if(w=U(A),w)w.closeBracket(o),O(A,I);else return"error";return"bracket"}else return o=="{"||o=="["?(w=F.DEFAULT,w=new w,Q(A,w),"bracket"):/\d/.test(o)?(L.eatWhile(/[\w.%]/),"atom"):(L.eatWhile(/[\w\-_]/),w=G(A),w.name=="begin"&&(w.argument=L.current()),w.styleIdentifier())}function T(L,A,w){if(L.eatSpace())return null;if(w&&L.match(w))return O(A,y),"keyword";if(L.match(/^\\[a-zA-Z@]+/))return"tag";if(L.match(/^[a-zA-Z]+/))return"variable-2";if(L.match(/^\\[$&%#{}_]/))return"tag";if(L.match(/^\\[,;!\/]/))return"tag";if(L.match(/^[\^_&]/))return"tag";if(L.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(L.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=L.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(L.skipToEnd(),"comment"):"error"}function I(L,A){var w=L.peek(),d;return w=="{"||w=="["?(d=U(A),d.openBracket(w),L.eat(w),O(A,y),"bracket"):/[ \t\r]/.test(w)?(L.eat(w),null):(O(A,y),D(A),y(L,A))}return{startState:function(){var L=_.inMathMode?function(A,w){return T(A,w)}:y;return{cmdState:[],f:L}},copyState:function(L){return{cmdState:L.cmdState.slice(),f:L.f}},token:function(L,A){return A.f(L,A)},blankLine:function(L){L.f=y,L.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},"19Vz":function(ft,it,pe){(function(fe){fe(pe("VrN/"))})(function(fe){fe.defineOption("placeholder","",function(H,F,O){var y=O&&O!=fe.Init;if(F&&!y)H.on("blur",U),H.on("change",D),H.on("swapDoc",D),fe.on(H.getInputField(),"compositionupdate",H.state.placeholderCompose=function(){Q(H)}),D(H);else if(!F&&y){H.off("blur",U),H.off("change",D),H.off("swapDoc",D),fe.off(H.getInputField(),"compositionupdate",H.state.placeholderCompose),Z(H);var T=H.getWrapperElement();T.className=T.className.replace(" CodeMirror-empty","")}F&&!H.hasFocus()&&U(H)});function Z(H){H.state.placeholder&&(H.state.placeholder.parentNode.removeChild(H.state.placeholder),H.state.placeholder=null)}function _(H){Z(H);var F=H.state.placeholder=document.createElement("pre");F.style.cssText="height: 0; overflow: visible",F.style.direction=H.getOption("direction"),F.className="CodeMirror-placeholder CodeMirror-line-like";var O=H.getOption("placeholder");typeof O=="string"&&(O=document.createTextNode(O)),F.appendChild(O),H.display.lineSpace.insertBefore(F,H.display.lineSpace.firstChild)}function Q(H){setTimeout(function(){var F=!1,O=H.getInputField();O.nodeName=="TEXTAREA"?F=!O.value:H.lineCount()==1&&(F=!/[^\u200b]/.test(O.querySelector(".CodeMirror-line").textContent)),F?_(H):Z(H)},20)}function U(H){G(H)&&_(H)}function D(H){var F=H.getWrapperElement(),O=G(H);F.className=F.className.replace(" CodeMirror-empty","")+(O?" CodeMirror-empty":""),O?_(H):Z(H)}function G(H){return H.lineCount()===1&&H.getLine(0)===""}})},"1eCo":function(ft,it,pe){(function(fe){fe(pe("VrN/"))})(function(fe){"use strict";var Z={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(Q,U){var D=Q.indentUnit,G={},H=U.htmlMode?Z:_;for(var F in H)G[F]=H[F];for(var F in U)G[F]=U[F];var O,y;function T(a,b){function m(W){return b.tokenize=W,W(a,b)}var E=a.next();if(E=="<")return a.eat("!")?a.eat("[")?a.match("CDATA[")?m(A("atom","]]>")):null:a.match("--")?m(A("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),m(w(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=A("meta","?>"),"meta"):(O=a.eat("/")?"closeTag":"openTag",b.tokenize=I,"tag bracket");if(E=="&"){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}T.isInText=!0;function I(a,b){var m=a.next();if(m==">"||m=="/"&&a.eat(">"))return b.tokenize=T,O=m==">"?"endTag":"selfcloseTag","tag bracket";if(m=="=")return O="equals",null;if(m=="<"){b.tokenize=T,b.state=u,b.tagName=b.tagStart=null;var E=b.tokenize(a,b);return E?E+" tag error":"tag error"}else return/[\'\"]/.test(m)?(b.tokenize=L(m),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function L(a){var b=function(m,E){for(;!m.eol();)if(m.next()==a){E.tokenize=I;break}return"string"};return b.isInAttribute=!0,b}function A(a,b){return function(m,E){for(;!m.eol();){if(m.match(b)){E.tokenize=T;break}m.next()}return a}}function w(a){return function(b,m){for(var E;(E=b.next())!=null;){if(E=="<")return m.tokenize=w(a+1),m.tokenize(b,m);if(E==">")if(a==1){m.tokenize=T;break}else return m.tokenize=w(a-1),m.tokenize(b,m)}return"meta"}}function d(a,b,m){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=m,(G.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function o(a){a.context&&(a.context=a.context.prev)}function l(a,b){for(var m;;){if(!a.context)return;if(m=a.context.tagName,!G.contextGrabbers.hasOwnProperty(m)||!G.contextGrabbers[m].hasOwnProperty(b))return;o(a)}}function u(a,b,m){return a=="openTag"?(m.tagStart=b.column(),C):a=="closeTag"?v:u}function C(a,b,m){return a=="word"?(m.tagName=b.current(),y="tag",x):G.allowMissingTagName&&a=="endTag"?(y="tag bracket",x(a,b,m)):(y="error",C)}function v(a,b,m){if(a=="word"){var E=b.current();return m.context&&m.context.tagName!=E&&G.implicitlyClosed.hasOwnProperty(m.context.tagName)&&o(m),m.context&&m.context.tagName==E||G.matchClosing===!1?(y="tag",g):(y="tag error",k)}else return G.allowMissingTagName&&a=="endTag"?(y="tag bracket",g(a,b,m)):(y="error",k)}function g(a,b,m){return a!="endTag"?(y="error",g):(o(m),u)}function k(a,b,m){return y="error",g(a,b,m)}function x(a,b,m){if(a=="word")return y="attribute",f;if(a=="endTag"||a=="selfcloseTag"){var E=m.tagName,B=m.tagStart;return m.tagName=m.tagStart=null,a=="selfcloseTag"||G.autoSelfClosers.hasOwnProperty(E)?l(m,E):(l(m,E),m.context=new d(m,E,B==m.indented)),u}return y="error",x}function f(a,b,m){return a=="equals"?p:(G.allowMissing||(y="error"),x(a,b,m))}function p(a,b,m){return a=="string"?h:a=="word"&&G.allowUnquoted?(y="string",x):(y="error",x(a,b,m))}function h(a,b,m){return a=="string"?h:x(a,b,m)}return{startState:function(a){var b={tokenize:T,state:u,indented:a||0,tagName:null,tagStart:null,context:null};return a!=null&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;O=null;var m=b.tokenize(a,b);return(m||O)&&m!="comment"&&(y=null,b.state=b.state(O||m,a,b),y&&(m=y=="error"?m+" error":y)),m},indent:function(a,b,m){var E=a.context;if(a.tokenize.isInAttribute)return a.tagStart==a.indented?a.stringStartCol+1:a.indented+D;if(E&&E.noIndent)return fe.Pass;if(a.tokenize!=I&&a.tokenize!=T)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==p&&(a.state=x)},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){for(var b=[],m=a.context;m;m=m.prev)m.tagName&&b.push(m.tagName);return b.reverse()}}}),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7Cbv":function(ft,it,pe){"use strict";var fe=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Z=new Uint8Array(16);function _(){if(!fe)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fe(Z)}var Q=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function U(I){return typeof I=="string"&&Q.test(I)}for(var D=U,G=[],H=0;H<256;++H)G.push((H+256).toString(16).substr(1));function F(I){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=(G[I[L+0]]+G[I[L+1]]+G[I[L+2]]+G[I[L+3]]+"-"+G[I[L+4]]+G[I[L+5]]+"-"+G[I[L+6]]+G[I[L+7]]+"-"+G[I[L+8]]+G[I[L+9]]+"-"+G[I[L+10]]+G[I[L+11]]+G[I[L+12]]+G[I[L+13]]+G[I[L+14]]+G[I[L+15]]).toLowerCase();if(!D(A))throw TypeError("Stringified UUID is invalid");return A}var O=F;function y(I,L,A){I=I||{};var w=I.random||(I.rng||_)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,L){A=A||0;for(var d=0;d<16;++d)L[A+d]=w[d];return L}return O(w)}var T=it.a=y},"7ahc":function(ft,it,pe){"use strict";pe.d(it,"a",function(){return C});var fe=pe("k1fw"),Z=pe("0Owb"),_=pe("+L6B"),Q=pe("2/Rp"),U=pe("y8nQ"),D=pe("Vl3Y"),G=pe("tJVT"),H=pe("OaEy"),F=pe("2fM7"),O=pe("q1tI"),y=pe.n(O),T=pe("VrN/"),I=pe.n(T),L=pe("p77/"),A=pe.n(L),w=pe("c5Ni"),d=pe.n(w),o=F.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},u={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};it.b=function(v){var g=v.callback,k=v.onCancel,x=Object(O.useState)("python"),f=Object(G.a)(x,2),p=f[0],h=f[1];function a(m){h(u[m][1])}function b(m){g(m)}return y.a.createElement(D.a,Object(Z.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:b}),y.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},y.a.createElement(F.a,{onChange:a},Object.keys(u).map(function(m){return y.a.createElement(o,{key:m,value:m},u[m][0])}))),y.a.createElement(D.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},y.a.createElement(C,{mode:p})),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(Q.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function C(v){var g=v.value,k=v.onChange,x=v.mode,f=v.options,p=f===void 0?{}:f,h=Object(O.useRef)(),a=Object(O.useState)(),b=Object(G.a)(a,2),m=b[0],E=b[1];return Object(O.useEffect)(function(){if(m){function B(W){var K=W.getValue();k&&k(K)}return m.on("change",B),function(){m.off("change",B)}}},[m,k]),Object(O.useEffect)(function(){m&&m.setOption("mode",x)},[m,x]),Object(O.useEffect)(function(){m&&((g!==m.getValue()||g==="")&&setTimeout(function(){m.setValue(g||" ")},300))},[m,g]),Object(O.useEffect)(function(){if(h.current&&!m){var B=I.a.fromTextArea(h.current,Object(fe.a)({mode:x,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},p));E(B)}},[h.current,m]),y.a.createElement("div",{className:"my-codemirror-container"},y.a.createElement("textarea",{ref:h}))}},"8EBN":function(ft,it,pe){(function(fe){fe(pe("VrN/"))})(function(fe){"use strict";fe.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Z=0;Z-1&&Q.substring(G+1,Q.length);if(H)return fe.findModeByExtension(H)},fe.findModeByName=function(Q){Q=Q.toLowerCase();for(var U=0;U=ne.length?le.slice(ne.length):le}).join(`
`)}var d=[],o=[""],l=new L.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function C(){d.length=0,o=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(oe,q,ee,ne){if(q>=oe.length||oe[q].level<=ee)return q;var le=oe[q];ne.push(""+le.text+" "),q++;var te=[];return q=g(oe,q,le.level,te),te.length>0&&(ne.push(""),te.forEach(function(ie){ne.push(ie)}),ne.push(" ")),ne.push(" "),q=g(oe,q,ee,ne),q}function k(){return g(d,0,0,o),o.push(" "),o.join("")}var x={heading:function(q){var ee=u.exec(q);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function(q){var ee=this.rules.block.fences.exec(q);if(ee){var ne=ee[0],le=w(ne,ee[3]||""),te=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(te)>=0){var ie=h(),ue=le;le=ie,a[ie]={type:"block",expression:ue}}return{type:"code",raw:ne,lang:te,text:le}}}},f=/(?:\${2})([^\n`]+?)(?:\${2})/gi,p=0,h=function(){return"__special_katext_id_".concat(p++,"__")},a={};function b(){return a}function m(){p=0,a={}}function E(oe){return oe=oe.replace(f,function(q,ee){var ne=h();return a[ne]={type:"inline",expression:ee},ne}),oe}var B=l.listitem;l.listitem=function(oe){return B(E(oe))};var W=l.paragraph;l.paragraph=function(oe){return W(E(oe))};var K=l.tablecell;l.tablecell=function(oe,q){return K(E(oe),q)},l.code=function(oe,q,ee){var ne=(q||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"".concat(oe,"
"):' ').concat(ee?oe:Object(A.escape)(oe,!0),`
`):''+(ee?oe:Object(A.escape)(oe,!0))+" "},l.heading=function(oe,q,ee){var ne=this.options.headerPrefix+ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:ne,level:q,text:oe}),"'+oe+" "},L.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),L.a.use({tokenizer:x,renderer:l});var V=L.a,M=pe("SJMd"),P=pe("ulZh"),$=pe.n(P),ae=pe("m3rI"),he=pe("Oy/b"),me=pe("p5ED"),De=pe("ErOA"),xe=pe("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 ke=function(oe,q){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ne){ee.__proto__=ne}||function(ee,ne){for(var le in ne)Object.prototype.hasOwnProperty.call(ne,le)&&(ee[le]=ne[le])})(oe,q)};function Te(oe,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");function ee(){this.constructor=oe}ke(oe,q),oe.prototype=q===null?Object.create(q):(ee.prototype=q.prototype,new ee)}function Se(oe,q,ee,ne){return new(ee||(ee=Promise))(function(le,te){function ie(ve){try{de(ne.next(ve))}catch(Ee){te(Ee)}}function ue(ve){try{de(ne.throw(ve))}catch(Ee){te(Ee)}}function de(ve){var Ee;ve.done?le(ve.value):(Ee=ve.value,Ee instanceof ee?Ee:new ee(function(Me){Me(Ee)})).then(ie,ue)}de((ne=ne.apply(oe,q||[])).next())})}function ye(oe,q){var ee,ne,le,te,ie={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return te={next:ue(0),throw:ue(1),return:ue(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function ue(de){return function(ve){return function(Ee){if(ee)throw new TypeError("Generator is already executing.");for(;ie;)try{if(ee=1,ne&&(le=2&Ee[0]?ne.return:Ee[0]?ne.throw||((le=ne.return)&&le.call(ne),0):ne.next)&&!(le=le.call(ne,Ee[1])).done)return le;switch(ne=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++,ne=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&&ee>0){var ne=new Le(q,ee),le=ne.ratio>=1?20:ne.getHorizontalLength(20),te=ne.ratio<1?20:ne.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 ue=s.createDefs();ie.appendChild(ue);var de=s.createElement("clipPath",[["id","text-bg-clip"]]);ue.appendChild(de);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(q+":"+ee)),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 Be=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 de.appendChild(Be),s.setAttributes(ve,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ie),ie.outerHTML}return' '},oe}(),Pe=function(oe){function q(ee,ne,le){var te=oe.call(this,ee,ne)||this;return te.isDropdownOpen=!1,te.onClick=te.dropdownButtonClicked,te.dropdownButtons=le,te}return Te(q,oe),q.prototype.setupDropdown=function(){var ee=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=ee.className,ne.colorsClassName=ee.colorsClassName,ee.dropdownBlock.appendChild(ne.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},q.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},q.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},q.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},q.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},q.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},q}(Ae),He=function(){function oe(q,ee){this.GRIP_SIZE=10,this.color=q,this.fillColor=ee,this.visual=s.createGroup(),this.visual.appendChild(s.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(s.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(q){return q===this.visual||q===this.visual.childNodes[0]||q===this.visual.childNodes[1]},oe.prototype.setCenter=function(q,ee){this.visual.childNodes.forEach(function(ne){return s.setAttributes(ne,[["cx",q.toString()],["cy",ee.toString()]])})},oe}(),Ge=function(){function oe(q,ee,ne,le){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=q,this.canvasHeight=ee,this.margin=ne,this.container=le,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(q){this._aspectRatio=q,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.gridContainer&&s.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(q){this._zoomFactor=q,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),oe.prototype.open=function(){var q=this;this.cropShadeElement=s.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=s.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var ee=0;eethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-ee.height/2),s.setAttributes(this.cropRectElement,[["x",ee.x.toString()],["y",ee.y.toString()],["width",ee.width.toString()],["height",ee.height.toString()]]);var ne=ee.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(te,ie){var ue=ee.y+ne*(ie+1);s.setAttributes(te,[["x1",""+ee.x],["y1",""+ue],["x2",""+(ee.x+ee.width)],["y2",""+ue]])});var le=ee.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(te,ie){var ue=ee.x+le*(ie+1);s.setAttributes(te,[["x1",""+ue],["y1",""+ee.y],["x2",""+ue],["y2",""+(ee.y+ee.height)]])}),s.setAttributes(this.cropShadeElement,[["d",s.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,ee.x,ee.y,ee.width,ee.height)]]),this.topLeftGrip.setCenter(ee.x,ee.y),this.topRightGrip.setCenter(ee.x+ee.width,ee.y),this.bottomLeftGrip.setCenter(ee.x,ee.y+ee.height),this.bottomRightGrip.setCenter(ee.x+ee.width,ee.y+ee.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},oe.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},oe.prototype.clientToLocalCoordinates=function(q,ee){var ne=this.container.getBoundingClientRect();return{x:q-ne.left+this.margin,y:ee-ne.top+this.margin}},oe.prototype.onPointerDown=function(q){this.container.setPointerCapture(q.pointerId),this.previousPoint=this.clientToLocalCoordinates(q.clientX,q.clientY),this.cropRectElement===q.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(q.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(q.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(q.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(q.target)&&(this.activeGrip=this.bottomRightGrip)},oe.prototype.onPointerMove=function(q){if(this.isMoving)this.move(this.clientToLocalCoordinates(q.clientX,q.clientY));else if(this.activeGrip){var ee=this.clientToLocalCoordinates(q.clientX,q.clientY);this.resize(ee)}q.preventDefault()},oe.prototype.onPointerUp=function(q){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(q.pointerId)},oe.prototype.move=function(q){var ee=q.x-this.previousPoint.x,ne=q.y-this.previousPoint.y;this.zoomFactor!==1&&(ee=-ee/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+ee),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=q},oe.prototype.resize=function(q){var ee=Object.assign({},this.cropRect),ne=q.x-this.previousPoint.x,le=q.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:ee.x+nethis.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-ee.width),ee.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(ee.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),ee.height=this.aspectRatio.getVerticalLength(ee.width)):(ee.y+=le,ee.height=this.cropRect.y+this.cropRect.height-ee.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?ee.height=this.aspectRatio.getVerticalLength(ee.width):ee.height+=le}ee.width<10&&(ee.x=this.cropRect.x,ee.width=10),ee.height<10&&(ee.y=this.cropRect.y,ee.height=10),this.previousPoint=q,ee.x>=this.margin&&ee.y>=this.margin&&ee.x-this.margin+ee.width<=this.canvasWidth&&ee.y-this.margin+ee.height<=this.canvasHeight&&(this.cropRect=ee,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},oe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var q=this.cropRect.x+this.cropRect.width/2,ee=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),le=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=q-this.cropRect.width/2,this.cropRect.y=ee-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},oe.prototype.getRescaledRect=function(q,ee,ne,le,te,ie){var ue=ne/q,de=le/ee;return{x:(te.x-ie)*ue+ie,y:(te.y-ie)*de+ie,width:te.width*ue,height:te.height*de}},oe.prototype.scaleCanvas=function(q,ee){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,q,ee,this.cropRect,this.margin);this.canvasWidth=q,this.canvasHeight=ee,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},oe}(),Xe=function(){function oe(q){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=q,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(oe.prototype,"angle",{get:function(){return this._angle},set:function(q){this._angle=q,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),oe.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},oe.prototype.onPointerDown=function(q){this.controlContainer.setPointerCapture(q.pointerId),this.isDragging=!0,this.previousPoint={x:q.clientX,y:q.clientY}},oe.prototype.onPointerMove=function(q){this.isDragging&&(this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.previousPoint.x=q.clientX)},oe.prototype.onPointerUp=function(q){this.isDragging&&this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(q.pointerId)},oe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var q=this.angleLabelText.getBBox();s.setAttributes(this.angleLabelElement,[["x",((this.width-q.width)/2).toString()],["y",(this.height/2).toString()]])}},oe.prototype.positionScaleShape=function(){if(this.scaleShape){var q=this.scaleShape.transform.baseVal.getItem(0);q.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(q,0)}},oe.prototype.getVisual=function(){var q=document.createElementNS("http://www.w3.org/2000/svg","svg");q.setAttribute("xmlns","http://www.w3.org/2000/svg"),q.setAttribute("width",this.width+"px"),q.setAttribute("height",this.height+"px"),q.setAttribute("viewBox","0 0 "+this.width+" "+this.height),q.style.flexShrink="0",document.body.appendChild(q);for(var ee="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var le=ne%5==0?this.height/3:this.height/6;ee+="h4v"+-le+"h1v"+le}ee+="v1H0Z",this.scaleShape=s.createPath(ee);var te=s.createTransform();this.scaleShape.transform.baseVal.appendItem(te),q.appendChild(this.scaleShape),this.angleLabelElement=s.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=s.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ie=s.createTSpan("");return ie.innerHTML="°",this.angleLabelElement.appendChild(ie),q.appendChild(this.angleLabelElement),document.body.removeChild(q),q},oe}(),ze=function(){function oe(){this.naturalSize=!1,this.imageType="image/png"}return oe.prototype.rasterize=function(q,ee,ne,le,te,ie,ue){var de=this;return new Promise(function(ve){var Ee=document.createElement("canvas");Ee.width=q.width.baseVal.value-2*le,Ee.height=q.height.baseVal.value-2*le;var Me=1,Be=1;de.naturalSize===!0?(Me=ee.naturalWidth/(q.width.baseVal.value-2*le)/ie,Be=ee.naturalHeight/(q.height.baseVal.value-2*le)/ue,Ee.width=ee.naturalWidth/ie,Ee.height=ee.naturalHeight/ue):de.width!==void 0&&de.height!==void 0&&(Me=de.width/ne.width,Be=de.height/ne.height,Ee.width*=Me,Ee.height*=Be);var Ye=Ee.getContext("2d");Ye.translate(Ee.width/2,Ee.height/2),Ye.rotate(te*Math.PI/180),Ye.scale(ie,ue),Ye.translate(-Ee.width/2,-Ee.height/2),Ye.drawImage(ee,0,0,Ee.width,Ee.height);var We=document.createElement("canvas");We.width=ne.width*Me,We.height=ne.height*Be,We.getContext("2d").putImageData(Ye.getImageData((ne.x-le)*Me,(ne.y-le)*Be,ne.width*Me,ne.height*Be),0,0),ve(We.toDataURL(de.imageType,de.imageQuality))})},oe}(),ot=function(){function oe(q){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=oe.instanceCounter++,this.styles=new c(this.instanceNo),this.target=q,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(q){this._zoomToCropEnabled=q,q?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(q){this._gridLines=q,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(q){this._rotationAngle=q,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){var q;return(q=this._aspectRatio)!==null&&q!==void 0?q:this.aspectRatios[0]},set:function(q){this._aspectRatio=q},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},oe.prototype.show=function(){this.showUI(),this.open()},oe.prototype.close=function(q){q===void 0&&(q=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),q||this.closeEventListeners.forEach(function(ee){return ee()}),this._isOpen=!1)},oe.prototype.addRenderEventListener=function(q){this.renderEventListeners.push(q)},oe.prototype.removeRenderEventListener=function(q){this.renderEventListeners.indexOf(q)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(q),1)},oe.prototype.addCloseEventListener=function(q){this.closeEventListeners.push(q)},oe.prototype.removeCloseEventListener=function(q){this.closeEventListeners.indexOf(q)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(q),1)},oe.prototype.setupResizeObserver=function(){var q=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){q.resize(q.target.clientWidth,q.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var q=1*this.target.clientWidth/this.target.clientHeight,ee=this.contentDiv.clientWidth/q>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*q:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=ee+2*this.CANVAS_MARGINq+this.CANVAS_MARGIN?this.target.offsetTop-(q+this.CANVAS_MARGIN):0;this.coverDiv.style.top=ee+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},oe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},oe.prototype.addTopToolbar=function(){var q=this;this.topToolbar=new N,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ee=new be;ee.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(ee);var ne=[];this.aspectRatios.forEach(function(Be){var Ye=new Ae(_e.getIcon(Be.horizontal,Be.vertical),Be.horizontal===0&&Be.vertical===0?"FREE":Be.horizontal+":"+Be.vertical);Ye.onClick=function(){return q.ratioButtonClicked(Be)},ne.push(Ye)}),this.aspectRatioButton=new Pe(_e.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,ee.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var le=new Ae(' ',"Toggle grid");le.isActive=this.isGridVisible,le.onClick=function(){q.isGridVisible=!q.isGridVisible,le.isActive=q.isGridVisible},ee.addButton(le);var te=new Ae(' ',"Zoom to selection");if(te.isActive=this.zoomToCropEnabled,te.onClick=function(){q.zoomToCropEnabled=!q.zoomToCropEnabled,te.isActive=q.zoomToCropEnabled},ee.addButton(te),!z.isLicensed){var ie=new Oe;this.topToolbar.addElementBlock(ie);var ue=document.createElement("div");ue.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var de=document.createElement("a");de.style.color="currentColor",de.href="https://markerjs.com/products/cropro",de.target="_blank",de.innerHTML=' ',ue.appendChild(de),ie.addElement(ue)}var ve=new be;ve.minWidth=3*this.toolbarHeight+"px",ve.contentAlign="end",this.topToolbar.addButtonBlock(ve);var Ee=new Ae(' ',"OK");Ee.onClick=this.startRenderAndClose,ve.addButton(Ee),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ee.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Me=new Ae(' ',"Close");Me.onClick=this.close,ve.addButton(Me),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Me.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},oe.prototype.addBottomToolbar=function(){var q=this;this.bottomToolbar=new N,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ee=new be;ee.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(ee);var ne=new Ae(' ',"Rotate left");ne.onClick=this.rotateLeftButtonClicked,ee.addButton(ne);var le=new Ae(' ',"Rotate right");le.onClick=this.rotateRightButtonClicked,ee.addButton(le);var te=new Oe;te.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(te),this.straightener=new Xe("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){q.rotateBy(ve),q.straightener.angle=q.rotationAngle},te.addElement(this.straightener.getUI());var ie=new be;ie.minWidth=2*this.toolbarHeight+"px",ie.contentAlign="end",this.bottomToolbar.addButtonBlock(ie);var ue=new Ae(' ',"Flip horizontal");ue.onClick=this.flipHorizontallyButtonClicked,ie.addButton(ue);var de=new Ae(' ',"Flip vertical");de.onClick=this.flipVerticallyButtonClicked,ie.addButton(de)},oe.prototype.ratioButtonClicked=function(q){this.aspectRatio=q,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},oe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=_e.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},oe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Le(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},oe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},oe.prototype.restoreState=function(q){if(q){var ee=this.cropLayer.getRescaledRect(q.width,q.height,this.imageWidth,this.imageHeight,q.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(ee),this.cropRectChanged(ee),this.flippedHorizontally=q.flippedHorizontally,this.flippedVertically=q.flippedVertically,this.applyFlip(),this.rotationAngle=q.rotationAngle,this.applyRotation()}},oe.prototype.clientToLocalCoordinates=function(q,ee){var ne=this.cropImage.getBoundingClientRect();return{x:q-ne.left,y:ee-ne.top}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var q=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=q+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},oe.prototype.rotateLeftButtonClicked=function(){var q=this.rotationAngle-90;this.rotationAngle%90!=0&&(q+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(q)},oe.prototype.rotateRightButtonClicked=function(){var q=this.rotationAngle+90;this.rotationAngle%90!=0&&(q-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(q)},oe.prototype.rotateTo=function(q){q=(q=q>180?q-360:q)<=-180?q+360:q,this.rotationAngle=q,this.applyRotation()},oe.prototype.rotateBy=function(q){this.rotateTo((this.rotationAngle+q)%360)},oe.prototype.applyRotation=function(){var q=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var ee=this.editingTargetRotationContainer.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(ee,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=q},oe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},oe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},oe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},oe.prototype.startRenderAndClose=function(){return Se(this,void 0,void 0,function(){var q,ee;return ye(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return q=ne.sent(),ee=this.getState(),this.renderEventListeners.forEach(function(le){return le(q,ee)}),this.close(!0),[2]}})})},oe.prototype.render=function(){return Se(this,void 0,void 0,function(){var q;return ye(this,function(ee){switch(ee.label){case 0:return(q=new ze).naturalSize=this.renderAtNaturalSize,q.imageType=this.renderImageType,q.imageQuality=this.renderImageQuality,q.width=this.renderWidth,q.height=this.renderHeight,this.unzoomFromCrop(),s.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return ee.sent(),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,ee.sent()]}})})},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Y("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 Y("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Y("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var q=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Y("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*q)+`px;
height: `+(this.toolbarHeight-2*q)+`px;
padding: `+q+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Y("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Y("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 Y("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 Y("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Y("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 Y("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*q)+`px;
padding: `+q+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Y("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},oe.instanceCounter=0,oe}(),$e=pe("8hTe"),Je=pe.n($e),Re=/]*>/g;function rt(oe){var q=document.createElement("div");return q.innerHTML=oe,q.childNodes.length===0?"":q.childNodes[0].nodeValue}var qe=it.a=function(oe){var q=oe.value,ee=q===void 0?"":q,ne=oe.edit,le=ne===void 0?!1:ne,te=oe.className,ie=oe.showTextOnly,ue=oe.showLines,de=oe.replaces,ve=oe.zoomImg,Ee=oe.hasMask,Me=oe.style,Be=Me===void 0?{}:Me,Ye=oe.stylesPrev,We=Ye===void 0?{}:Ye,pt=String(ee),nt=Object(O.useRef)(),tt=Object(O.useRef)(),Tt=Object(O.useState)(""),bt=Object(G.a)(Tt,2),xt=bt[0],kt=bt[1],Et=Object(O.useState)("office"),qt=Object(G.a)(Et,2),Tr=qt[0],Yt=qt[1],gr=function(){var wt=new ot(tt.current);wt.displayMode="popup",wt.addRenderEventListener(function(){var Zt=Object(D.a)(F.a.mark(function gt(mt){var Lt;return F.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return nt.current.style.display="none",Ut.next=3,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mt}});case 3:Lt=Ut.sent,Lt!=null&&Lt.id&&de(tt.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Lt==null?void 0:Lt.id,"?type=").concat(Lt.content_type));case 5:case"end":return Ut.stop()}},gt)}));return function(gt){return Zt.apply(this,arguments)}}()),wt.show()},fr=function(){var wt=new xe.a(tt.current);wt.settings.displayMode="popup",wt.addEventListener("render",function(){var Zt=Object(D.a)(F.a.mark(function gt(mt){var Lt;return F.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(nt.current.style.display="none",!tt.current){Ut.next=6;break}return Ut.next=4,Object(De.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:mt.dataUrl}});case 4:Lt=Ut.sent,Lt!=null&&Lt.id&&de(tt.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Lt==null?void 0:Lt.id,"?type=").concat(Lt.content_type));case 6:case"end":return Ut.stop()}},gt)}));return function(gt){return Zt.apply(this,arguments)}}()),wt.show(),window.markerArea=wt},zr=Object(O.useMemo)(function(){nt.current&&(nt.current.style.zIndex=-1);try{var Ze=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,wt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Zt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;pt=pt.replace(Ze,"("+ae.a.API_SERVER+"/api/attachments/").replace(wt,'"'+ae.a.API_SERVER+"/api/attachments/").replace(Zt,'"'+ae.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 gt=V(pt),mt=b();if(pt.match(/\[TOC\]/)&&(gt=gt.replace("[TOC]
",k()),C()),gt=gt.replace(/(__special_katext_id_\d+__)/g,function(vr,Ut){var Fe=mt[Ut],ht=Fe.type,ri=Fe.expression;return Object(he.renderToString)(rt(ri)||"",{displayMode:ht==="block",throwOnError:!1,output:"html"})}),gt=gt.replace(/▁/g,"\u2581\u2581\u2581"),m(),ie){var Lt=document.createElement("div");return Lt.innerHTML=gt,Lt.innerText}return setTimeout(function(){return ti()},500),gt},[pt]),$t=Object(O.useRef)();v.WebkitLineClamp=ue,ue&&(Be=Object(U.a)(Object(U.a)({},Be),v));function Nr(Ze){var wt=Ze.target;if(wt.tagName.toUpperCase()==="IMG"){if(ve){var Zt=wt.getAttribute("src");kt(Zt),Yt("image")}}else if(wt.tagName.toUpperCase()==="A"){var gt=wt.getAttribute("href");if(gt.indexOf("office")>-1)Ze.preventDefault(),kt(gt),Yt("office");else if(gt.indexOf("application/pdf")>-1)Ze.preventDefault(),kt(gt),Yt("pdf");else if(gt.indexOf("text/html")>-1)Ze.preventDefault(),kt(gt),Yt("html");else if(gt.startsWith("#")){Ze.preventDefault();var mt=document.getElementById(gt.replace("#",""));mt&&mt.scrollIntoView(!0)}}}var ti=function(){var wt,Zt=(wt=$t.current)===null||wt===void 0?void 0:wt.querySelectorAll("video");Zt==null||Zt.forEach(function(gt){if(gt.oncontextmenu=function(){return!1},gt.src.indexOf(".m3u8")>-1&&!gt.canPlayType("application/vnd.apple.mpegurl")){if($.a.isSupported()){var mt=new $.a;mt.loadSource(gt.src),mt.attachMedia(gt)}}})};Object(O.useEffect)(function(){if($t.current&&zr&&(zr.match(Re)&&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(wt){if(!le)return;wt.target.nodeName==="IMG"?(nt.current.style.zIndex=1,nt.current.style.display="flex",nt.current.style.width=wt.target.clientWidth+"px",nt.current.style.height=wt.target.clientHeight+"px",nt.current.style.top=wt.target.offsetTop+"px",nt.current.style.left=wt.target.offsetLeft+"px",tt.current.src=wt.target.getAttribute("src")):nt.current.style.display="none"};return y.a.createElement("div",{style:{position:"relative"}},y.a.createElement("div",{ref:$t,style:Object(U.a)({},Be),className:"".concat(te||""," markdown-body ").concat(Je.a.mdBody),onMouseOver:Pt,dangerouslySetInnerHTML:{__html:zr}}),y.a.createElement("div",{ref:nt,className:Je.a.button},y.a.createElement(Z.a,null,y.a.createElement(Q.a,{onClick:function(){return gr()}},"\u88C1\u526A"),y.a.createElement(Q.a,{onClick:function(){return fr()}},"\u7F16\u8F91"))),y.a.createElement("img",{ref:tt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),y.a.createElement(me.a,{close:!0,data:xt,type:xt!=null&&xt.length?Tr:"",style:Object(U.a)({},We),onClose:function(){return kt("")}}))}},"9VGf":function(ft,it,pe){"use strict";pe.d(it,"a",function(){return _});var fe=pe("q1tI"),Z=pe.n(fe);function _(Q,U){var D=Object(fe.useRef)();Object(fe.useEffect)(function(){D.current=Q}),Object(fe.useEffect)(function(){function G(){D.current()}if(U!==null){var H=setInterval(G,U);return function(){return clearInterval(H)}}},[U])}},"9ivq":function(ft,it,pe){},Bd2K:function(ft,it,pe){(function(fe){fe(pe("VrN/"),pe("osHv"))})(function(fe){fe.defineOption("autoCloseTags",!1,function(F,O,y){if(y!=fe.Init&&y&&F.removeKeyMap("autoCloseTags"),!O)return;var T={name:"autoCloseTags"};(typeof O!="object"||O.whenClosing!==!1)&&(T["'/'"]=function(I){return D(I)}),(typeof O!="object"||O.whenOpening!==!1)&&(T["'>'"]=function(I){return Q(I)}),F.addKeyMap(T)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_=["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 Q(F){if(F.getOption("disableInput"))return fe.Pass;for(var O=F.listSelections(),y=[],T=F.getOption("autoCloseTags"),I=0;IL.ch&&(l=l.slice(0,l.length-A.end+L.ch));var g=l.toLowerCase();if(!l||A.type=="string"&&(A.end!=L.ch||!/[\"\']/.test(A.string.charAt(A.string.length-1))||A.string.length==1)||A.type=="tag"&&o.close||A.string.indexOf("/")==L.ch-A.start-1||C&&G(C,g)>-1||H(F,w.mode.xmlCurrentContext&&w.mode.xmlCurrentContext(d)||[],l,L,!0))return fe.Pass;var k=typeof T=="object"&&T.emptyTags;if(k&&G(k,l)>-1){y[I]={text:"/>",newPos:fe.Pos(L.line,L.ch+2)};continue}var x=v&&G(v,g)>-1;y[I]={indent:x,text:">"+(x?`
`:"")+""+l+">",newPos:x?fe.Pos(L.line+1,0):fe.Pos(L.line,L.ch+1)}}for(var f=typeof T=="object"&&T.dontIndentOnAutoClose,I=O.length-1;I>=0;I--){var p=y[I];F.replaceRange(p.text,O[I].head,O[I].anchor,"+insert");var h=F.listSelections().slice(0);h[I]={head:p.newPos,anchor:p.newPos},F.setSelections(h),!f&&p.indent&&(F.indentLine(p.newPos.line,null,!0),F.indentLine(p.newPos.line+1,null,!0))}}function U(F,O){for(var y=F.listSelections(),T=[],I=O?"/":"",L=F.getOption("autoCloseTags"),A=typeof L=="object"&&L.dontIndentOnSlash,w=0;w"&&(C+=">"),T[w]=C}if(F.replaceSelections(T),y=F.listSelections(),!A)for(var w=0;w=0&&O[d]==y;d--)++w;T=A.to;for(var d=1;d0){for(var O=0;O1&&arguments[1]!==void 0?arguments[1]:"",O=[],y=0;yee.length)&&(ne=ee.length);for(var le=0,te=new Array(ne);le=ee.length?{done:!0}:{done:!1,value:ee[te++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return le=ee[Symbol.iterator](),le.next.bind(le)}function D(ee,ne){return ne={exports:{}},ee(ne,ne.exports),ne.exports}var G=D(function(ee){function ne(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function le(te){ee.exports.defaults=te}ee.exports={defaults:ne(),getDefaults:ne,changeDefaults:le}}),H=G.defaults,F=G.getDefaults,O=G.changeDefaults,y=/[&<>"']/,T=/[&<>"']/g,I=/[<>"']|&(?!#?\w+;)/,L=/[<>"']|&(?!#?\w+;)/g,A={"&":"&","<":"<",">":">",'"':""","'":"'"},w=function(ne){return A[ne]};function d(ee,ne){if(ne){if(y.test(ee))return ee.replace(T,w)}else if(I.test(ee))return ee.replace(L,w);return ee}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(ee){return ee.replace(o,function(ne,le){return le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""})}var u=/(^|[^\[])\^/g;function C(ee,ne){ee=ee.source||ee,ne=ne||"";var le={replace:function(ie,ue){return ue=ue.source||ue,ue=ue.replace(u,"$1"),ee=ee.replace(ie,ue),le},getRegex:function(){return new RegExp(ee,ne)}};return le}var v=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(ee,ne,le){if(ee){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}ne&&!g.test(le)&&(le=a(ne,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(ie){return null}return le}var x={},f=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,h=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(ee,ne){x[" "+ee]||(f.test(ee)?x[" "+ee]=ee+"/":x[" "+ee]=B(ee,"/",!0)),ee=x[" "+ee];var le=ee.indexOf(":")===-1;return ne.substring(0,2)==="//"?le?ne:ee.replace(p,"$1")+ne:ne.charAt(0)==="/"?le?ne:ee.replace(h,"$1")+ne:ee+ne}var b={exec:function(){}};function m(ee){for(var ne=1,le,te;ne=0&&ve[Me]==="\\";)Ee=!Ee;return Ee?"|":" |"}),te=le.split(/ \|/),ie=0;if(te.length>ne)te.splice(ne);else for(;te.length=te.length?ie.slice(te.length):ie}).join(`
`)}var xe=function(){function ee(le){this.options=le||M}var ne=ee.prototype;return ne.space=function(te){var ie=this.rules.block.newline.exec(te);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
`}},ne.code=function(te,ie){var ue=this.rules.block.code.exec(te);if(ue){var de=ie[ie.length-1];if(de&&de.type==="paragraph")return{raw:ue[0],text:ue[0].trimRight()};var ve=ue[0].replace(/^ {4}/gm,"");return{type:"code",raw:ue[0],codeBlockStyle:"indented",text:this.options.pedantic?ve:P(ve,`
`)}}},ne.fences=function(te){var ie=this.rules.block.fences.exec(te);if(ie){var ue=ie[0],de=De(ue,ie[3]||"");return{type:"code",raw:ue,lang:ie[2]?ie[2].trim():ie[2],text:de}}},ne.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]}},ne.nptable=function(te){var ie=this.rules.block.nptable.exec(te);if(ie){var ue={type:"table",header:$(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[],raw:ie[0]};if(ue.header.length===ue.align.length){var de=ue.align.length,ve;for(ve=0;ve ?/gm,"");return{type:"blockquote",raw:ie[0],text:ue}}},ne.list=function(te){var ie=this.rules.block.list.exec(te);if(ie){for(var ue=ie[0],de=ie[2],ve=de.length>1,Ee=de[de.length-1]===")",Me={type:"list",raw:ue,ordered:ve,start:ve?+de.slice(0,-1):"",loose:!1,items:[]},Be=ie[0].match(this.rules.block.item),Ye=!1,We,pt,nt,tt,Tt,bt,xt,kt=Be.length,Et=0;Et1||this.options.smartLists&&nt!==de)&&(tt=Be.slice(Et+1).join(`
`),Me.raw=Me.raw.substring(0,Me.raw.length-tt.length),Et=kt-1)),Tt=Ye||/\n\n(?!\s*$)/.test(We),Et!==kt-1&&(Ye=We.charAt(We.length-1)===`
`,Tt||(Tt=Ye)),Tt&&(Me.loose=!0),bt=/^\[[ xX]\] /.test(We),xt=void 0,bt&&(xt=We[1]!==" ",We=We.replace(/^\[[ xX]\] +/,"")),Me.items.push({type:"list_item",raw:ue,task:bt,checked:xt,loose:Tt,text:We});return Me}},ne.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]):ae(ie[0]):ie[0]}},ne.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 ue=ie[1].toLowerCase().replace(/\s+/g," ");return{tag:ue,raw:ie[0],href:ie[2],title:ie[3]}}},ne.table=function(te){var ie=this.rules.block.table.exec(te);if(ie){var ue={type:"table",header:$(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
`):[]};if(ue.header.length===ue.align.length){ue.raw=ie[0];var de=ue.align.length,ve;for(ve=0;ve/i.test(de[0])&&(ie=!1),!ue&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?ue=!0:ue&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(ue=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:ie,inRawBlock:ue,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ae(de[0]):de[0]}},ne.link=function(te){var ie=this.rules.inline.link.exec(te);if(ie){var ue=he(ie[2],"()");if(ue>-1){var de=ie[0].indexOf("!")===0?5:4,ve=de+ie[1].length+ue;ie[2]=ie[2].substring(0,ue),ie[0]=ie[0].substring(0,ve).trim(),ie[3]=""}var Ee=ie[2],Me="";if(this.options.pedantic){var Be=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ee);Be?(Ee=Be[1],Me=Be[3]):Me=""}else Me=ie[3]?ie[3].slice(1,-1):"";Ee=Ee.trim().replace(/^<([\s\S]*)>$/,"$1");var Ye=me(ie,{href:Ee&&Ee.replace(this.rules.inline._escapes,"$1"),title:Me&&Me.replace(this.rules.inline._escapes,"$1")},ie[0]);return Ye}},ne.reflink=function(te,ie){var ue;if((ue=this.rules.inline.reflink.exec(te))||(ue=this.rules.inline.nolink.exec(te))){var de=(ue[2]||ue[1]).replace(/\s+/g," ");if(de=ie[de.toLowerCase()],!de||!de.href){var ve=ue[0].charAt(0);return{type:"text",raw:ve,text:ve}}var Ee=me(ue,de,ue[0]);return Ee}},ne.strong=function(te,ie,ue){ue===void 0&&(ue="");var de=this.rules.inline.strong.start.exec(te);if(de&&(!de[1]||de[1]&&(ue===""||this.rules.inline.punctuation.exec(ue)))){ie=ie.slice(-1*te.length);var ve=de[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ve.lastIndex=0;for(var Ee;(de=ve.exec(ie))!=null;)if(Ee=this.rules.inline.strong.middle.exec(ie.slice(0,de.index+3)),Ee)return{type:"strong",raw:te.slice(0,Ee[0].length),text:te.slice(2,Ee[0].length-2)}}},ne.em=function(te,ie,ue){ue===void 0&&(ue="");var de=this.rules.inline.em.start.exec(te);if(de&&(!de[1]||de[1]&&(ue===""||this.rules.inline.punctuation.exec(ue)))){ie=ie.slice(-1*te.length);var ve=de[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ve.lastIndex=0;for(var Ee;(de=ve.exec(ie))!=null;)if(Ee=this.rules.inline.em.middle.exec(ie.slice(0,de.index+2)),Ee)return{type:"em",raw:te.slice(0,Ee[0].length),text:te.slice(1,Ee[0].length-1)}}},ne.codespan=function(te){var ie=this.rules.inline.code.exec(te);if(ie){var ue=ie[2].replace(/\n/g," "),de=/[^ ]/.test(ue),ve=ue.startsWith(" ")&&ue.endsWith(" ");return de&&ve&&(ue=ue.substring(1,ue.length-1)),ue=ae(ue,!0),{type:"codespan",raw:ie[0],text:ue}}},ne.br=function(te){var ie=this.rules.inline.br.exec(te);if(ie)return{type:"br",raw:ie[0]}},ne.del=function(te){var ie=this.rules.inline.del.exec(te);if(ie)return{type:"del",raw:ie[0],text:ie[1]}},ne.autolink=function(te,ie){var ue=this.rules.inline.autolink.exec(te);if(ue){var de,ve;return ue[2]==="@"?(de=ae(this.options.mangle?ie(ue[1]):ue[1]),ve="mailto:"+de):(de=ae(ue[1]),ve=de),{type:"link",raw:ue[0],text:de,href:ve,tokens:[{type:"text",raw:de,text:de}]}}},ne.url=function(te,ie){var ue;if(ue=this.rules.inline.url.exec(te)){var de,ve;if(ue[2]==="@")de=ae(this.options.mangle?ie(ue[0]):ue[0]),ve="mailto:"+de;else{var Ee;do Ee=ue[0],ue[0]=this.rules.inline._backpedal.exec(ue[0])[0];while(Ee!==ue[0]);de=ae(ue[0]),ue[1]==="www."?ve="http://"+de:ve=de}return{type:"link",raw:ue[0],text:de,href:ve,tokens:[{type:"text",raw:de,text:de}]}}},ne.inlineText=function(te,ie,ue){var de=this.rules.inline.text.exec(te);if(de){var ve;return ie?ve=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ae(de[0]):de[0]:ve=ae(this.options.smartypants?ue(de[0]):de[0]),{type:"text",raw:de[0],text:ve}}},ee}(),ke=V.noopTest,Te=V.edit,Se=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:ke,table:ke,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=Te(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=Te(ye.item,"gm").replace(/bull/g,ye.bullet).getRegex(),ye.list=Te(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=Te(ye.html,"i").replace("comment",ye._comment).replace("tag",ye._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ye.paragraph=Te(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=Te(ye.blockquote).replace("paragraph",ye.paragraph).getRegex(),ye.normal=Se({},ye),ye.gfm=Se({},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=Te(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=Te(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=Se({},ye.normal,{html:Te(`^ *(?: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:ke,paragraph:Te(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:ke,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:ke,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",z.punctuation=Te(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=Te(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=Te(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=Te(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=Te(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=Te(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=Te(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=Te(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=Te(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=Te(z._blockSkip,"g").getRegex(),z.overlapSkip=Te(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,z.autolink=Te(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=Te(z.tag).replace("comment",ye._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=Te(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=Te(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=Te(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=Se({},z),z.pedantic=Se({},z.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=Se({},z.normal,{escape:Te(z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(te="x"+te.toString(16)),ne+=""+te+";";return ne}var be=function(){function ee(le){this.tokens=[],this.tokens.links=Object.create(null),this.options=le||c,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:R.normal,inline:Y.normal};this.options.pedantic?(te.block=R.pedantic,te.inline=Y.pedantic):this.options.gfm&&(te.block=R.gfm,this.options.breaks?te.inline=Y.breaks:te.inline=Y.gfm),this.tokenizer.rules=te}ee.lex=function(te,ie){var ue=new ee(ie);return ue.lex(te)};var ne=ee.prototype;return ne.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},ne.blockTokens=function(te,ie,ue){ie===void 0&&(ie=[]),ue===void 0&&(ue=!0),te=te.replace(/^ +$/gm,"");for(var de,ve,Ee,Me;te;){if(de=this.tokenizer.space(te)){te=te.substring(de.raw.length),de.type&&ie.push(de);continue}if(de=this.tokenizer.code(te,ie)){te=te.substring(de.raw.length),de.type?ie.push(de):(Me=ie[ie.length-1],Me.raw+=`
`+de.raw,Me.text+=`
`+de.text);continue}if(de=this.tokenizer.fences(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.heading(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.nptable(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.hr(te)){te=te.substring(de.raw.length),ie.push(de);continue}if(de=this.tokenizer.blockquote(te)){te=te.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],ue),ie.push(de);continue}if(de=this.tokenizer.list(te)){for(te=te.substring(de.raw.length),Ee=de.items.length,ve=0;ve0)for(;(Be=this.tokenizer.rules.inline.reflinkSearch.exec(Me))!=null;)Ye.includes(Be[0].slice(Be[0].lastIndexOf("[")+1,-1))&&(Me=Me.slice(0,Be.index)+"["+"a".repeat(Be[0].length-2)+"]"+Me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Be=this.tokenizer.rules.inline.blockSkip.exec(Me))!=null;)Me=Me.slice(0,Be.index)+"["+"a".repeat(Be[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,ue,de)){te=te.substring(Ee.raw.length),ue=Ee.inLink,de=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,de)),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,de)),ie.push(Ee);continue}if(Ee=this.tokenizer.strong(te,Me,ve)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],ue,de),ie.push(Ee);continue}if(Ee=this.tokenizer.em(te,Me,ve)){te=te.substring(Ee.raw.length),Ee.tokens=this.inlineTokens(Ee.text,[],ue,de),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,[],ue,de),ie.push(Ee);continue}if(Ee=this.tokenizer.autolink(te,se)){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(!ue&&(Ee=this.tokenizer.url(te,se))){te=te.substring(Ee.raw.length),ie.push(Ee);continue}if(Ee=this.tokenizer.inlineText(te,de,N)){te=te.substring(Ee.raw.length),ve=Ee.raw.slice(-1),ie.push(Ee);continue}if(te){var We="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(We);break}else throw new Error(We)}}return ie},Z(ee,null,[{key:"rules",get:function(){return{block:R,inline:Y}}}]),ee}(),Ae=G.defaults,Oe=V.cleanUrl,Le=V.escape,_e=function(){function ee(le){this.options=le||Ae}var ne=ee.prototype;return ne.code=function(te,ie,ue){var de=(ie||"").match(/\S*/)[0];if(this.options.highlight){var ve=this.options.highlight(te,de);ve!=null&&ve!==te&&(ue=!0,te=ve)}return de?''+(ue?te:Le(te,!0))+`
`:""+(ue?te:Le(te,!0))+`
`},ne.blockquote=function(te){return`
`+te+`
`},ne.html=function(te){return te},ne.heading=function(te,ie,ue,de){return this.options.headerIds?"
`:""+te+"
`},ne.hr=function(){return this.options.xhtml?`
`:`
`},ne.list=function(te,ie,ue){var de=ie?"ol":"ul",ve=ie&&ue!==1?' start="'+ue+'"':"";return"<"+de+ve+`>
`+te+""+de+`>
`},ne.listitem=function(te){return""+te+`
`},ne.checkbox=function(te){return" "},ne.paragraph=function(te){return""+te+`
`},ne.table=function(te,ie){return ie&&(ie=""+ie+" "),`
`},ne.tablerow=function(te){return`
`+te+`
`},ne.tablecell=function(te,ie){var ue=ie.header?"th":"td",de=ie.align?"<"+ue+' align="'+ie.align+'">':"<"+ue+">";return de+te+""+ue+`>
`},ne.strong=function(te){return""+te+" "},ne.em=function(te){return""+te+" "},ne.codespan=function(te){return""+te+""},ne.br=function(){return this.options.xhtml?" ":" "},ne.del=function(te){return""+te+""},ne.link=function(te,ie,ue){if(te=Oe(this.options.sanitize,this.options.baseUrl,te),te===null)return ue;var de='"+ue+" ",de},ne.image=function(te,ie,ue){if(te=Oe(this.options.sanitize,this.options.baseUrl,te),te===null)return ue;var de=' ":">",de},ne.text=function(te){return te},ee}(),Pe=function(){function ee(){}var ne=ee.prototype;return ne.strong=function(te){return te},ne.em=function(te){return te},ne.codespan=function(te){return te},ne.del=function(te){return te},ne.html=function(te){return te},ne.text=function(te){return te},ne.link=function(te,ie,ue){return""+ue},ne.image=function(te,ie,ue){return""+ue},ne.br=function(){return""},ee}(),He=function(){function ee(){this.seen={}}var ne=ee.prototype;return ne.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 ue=ie;do this.seen[ue]++,ie=ue+"-"+this.seen[ue];while(this.seen.hasOwnProperty(ie))}return this.seen[ie]=0,ie},ee}(),Ge=G.defaults,Xe=V.unescape,ze=function(){function ee(le){this.options=le||Ge,this.options.renderer=this.options.renderer||new _e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Pe,this.slugger=new He}ee.parse=function(te,ie){var ue=new ee(ie);return ue.parse(te)};var ne=ee.prototype;return ne.parse=function(te,ie){ie===void 0&&(ie=!0);var ue="",de,ve,Ee,Me,Be,Ye,We,pt,nt,tt,Tt,bt,xt,kt,Et,qt,Tr,Yt,gr=te.length;for(de=0;de0&&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}):kt+=Yt),kt+=this.parse(Et.tokens,xt),nt+=this.renderer.listitem(kt,Tr,qt);ue+=this.renderer.list(nt,Tt,bt);continue}case"html":{ue+=this.renderer.html(tt.text);continue}case"paragraph":{ue+=this.renderer.paragraph(this.parseInline(tt.tokens));continue}case"text":{for(nt=tt.tokens?this.parseInline(tt.tokens):tt.text;de+1An error occurred:
"+Je(Ee.message+"",!0)+" ";throw Ee}}oe.options=oe.setOptions=function(ee){return ot(oe.defaults,ee),rt(oe.defaults),oe},oe.getDefaults=Re,oe.defaults=qe,oe.use=function(ee){var ne=ot({},ee);if(ee.renderer&&function(){var te=oe.defaults.renderer||new _e,ie=function(ve){var Ee=te[ve];te[ve]=function(){for(var Me=arguments.length,Be=new Array(Me),Ye=0;Ye`,triples:"",explode:"[]{}"},_=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(A,w,d){d&&d!=fe.Init&&(A.removeKeyMap(U),A.state.closeBrackets=null),w&&(D(Q(w,"pairs")),A.state.closeBrackets=w,A.addKeyMap(U))});function Q(A,w){return w=="pairs"&&typeof A=="string"?A:typeof A=="object"&&A[w]!=null?A[w]:Z[w]}var U={Backspace:F,Enter:O};function D(A){for(var w=0;w=0;l--){var C=o[l].head;A.replaceRange("",_(C.line,C.ch-1),_(C.line,C.ch+1),"+delete")}}function O(A){var w=H(A),d=w&&Q(w,"explode");if(!d||A.getOption("disableInput"))return fe.Pass;for(var o=A.listSelections(),l=0;l0;return{anchor:new _(A.anchor.line,A.anchor.ch+(w?-1:1)),head:new _(A.head.line,A.head.ch+(w?1:-1))}}function T(A,w){var d=H(A);if(!d||A.getOption("disableInput"))return fe.Pass;var o=Q(d,"pairs"),l=o.indexOf(w);if(l==-1)return fe.Pass;for(var u=Q(d,"closeBefore"),C=Q(d,"triples"),v=o.charAt(l+1)==w,g=A.listSelections(),k=l%2==0,x,f=0;f=0&&A.getRange(h,_(h.line,h.ch+3))==w+w+w?a="skipThree":a="skip";else if(v&&h.ch>1&&C.indexOf(w)>=0&&A.getRange(_(h.line,h.ch-2),h)==w+w){if(h.ch>2&&/\bstring/.test(A.getTokenTypeAt(_(h.line,h.ch-2))))return fe.Pass;a="addFour"}else if(v){var m=h.ch==0?" ":A.getRange(_(h.line,h.ch-1),h);if(!fe.isWordChar(b)&&m!=w&&!fe.isWordChar(m))a="both";else return fe.Pass}else if(k&&(b.length===0||/\s/.test(b)||u.indexOf(b)>-1))a="both";else return fe.Pass;if(!x)x=a;else if(x!=a)return fe.Pass}var E=l%2?o.charAt(l-1):w,B=l%2?w:o.charAt(l+1);A.operation(function(){if(x=="skip")A.execCommand("goCharRight");else if(x=="skipThree")for(var W=0;W<3;W++)A.execCommand("goCharRight");else if(x=="surround"){for(var K=A.getSelections(),W=0;W0&&(he.percent=he.loaded/he.total*100),V.onProgress(he)});var P=new FormData;V.data&&Object.keys(V.data).forEach(function(ae){var he=V.data[ae];if(Array.isArray(he)){he.forEach(function(me){P.append(ae+"[]",me)});return}P.append(ae,V.data[ae])}),V.file instanceof Blob?P.append(V.filename,V.file,V.file.name):P.append(V.filename,V.file),M.onerror=function(he){V.onError(he)},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 $=V.headers||{};return $["X-Requested-With"]!==null&&M.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys($).forEach(function(ae){$[ae]!==null&&M.setRequestHeader(ae,$[ae])}),M.send(P),{abort:function(){M.abort()}}}var H=+new Date,F=0;function O(){return"rc-upload-"+H+"-"+ ++F}function y(V,M){return V.indexOf(M,V.length-M.length)!==-1}var T=function(V,M){if(V&&M){var P=Array.isArray(M)?M:M.split(","),$=V.name||"",ae=V.type||"",he=ae.replace(/\/.*$/,"");return P.some(function(me){var De=me.trim();return De.charAt(0)==="."?y($.toLowerCase(),De.toLowerCase()):/\/\*$/.test(De)?he===De.replace(/\/.*$/,""):ae===De})}return!0};function I(V,M){var P=V.createReader(),$=[];function ae(){P.readEntries(function(he){var me=Array.prototype.slice.apply(he);$=$.concat(me);var De=!me.length;De?M($):ae()})}ae()}var L=function(M,P,$){var ae=function he(me,De){De=De||"",me.isFile?me.file(function(xe){$(xe)&&(me.fullPath&&!xe.webkitRelativePath&&(Object.defineProperties(xe,{webkitRelativePath:{writable:!0}}),xe.webkitRelativePath=me.fullPath.replace(/^\//,""),Object.defineProperties(xe,{webkitRelativePath:{writable:!1}})),P([xe]))}):me.isDirectory&&I(me,function(xe){xe.forEach(function(ke){he(ke,""+De+me.name+"/")})})};M.forEach(function(he){ae(he.webkitGetAsEntry())})},A=L,w=Object.assign||function(V){for(var M=1;M=0)continue;if(!Object.prototype.hasOwnProperty.call(V,$))continue;P[$]=V[$]}return P}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 k=function(M){return Object.keys(M).reduce(function(P,$){return($.substr(0,5)==="data-"||$.substr(0,5)==="aria-"||$==="role")&&(P[$]=M[$]),P},{})},x=function(V){g(M,V);function M(){var P,$,ae,he;C(this,M);for(var me=arguments.length,De=Array(me),xe=0;xe1&&arguments[1]!==void 0?arguments[1]:1,le=Pe.length,te=0;te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(P).map(function(ae,he){if(!U.isValidElement(ae)||!ae.type)return null;var me=ae.type.isSelectOptGroup,De=ae.key,xe=ae.props,ke=xe.children,Te=Object(G.a)(xe,["children"]);return $||!me?x(ae):Object(g.a)(Object(g.a)({key:"__RC_SELECT_GRP__".concat(De===null?he:De,"__"),label:De},Te),{},{options:f(ke)})}).filter(function(ae){return ae})}var p=pe("2Qr1"),h=pe("qNPg"),a=pe("U8pU"),b=pe("Kwbf"),m=pe("WKfj");function E(P){var $=P.mode,ae=P.options,he=P.children,me=P.backfill,De=P.allowClear,xe=P.placeholder,ke=P.getInputElement,Te=P.showSearch,Se=P.onSearch,ye=P.defaultOpen,z=P.autoFocus,s=P.labelInValue,c=P.value,R=P.inputValue,Y=P.optionLabelProp,N=$==="multiple"||$==="tags",se=Te!==void 0?Te:N||$==="combobox",be=ae||f(he);if(Object(b.a)($!=="tags"||be.every(function(_e){return!_e.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var Ae=be.some(function(_e){return _e.options?_e.options.some(function(Pe){return typeof("value"in Pe?Pe.value:Pe.key)=="number"}):typeof("value"in _e?_e.value:_e.key)=="number"});Object(b.a)(!Ae,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(b.a)($!=="combobox"||!Y,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(b.a)($==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(b.a)($==="combobox"||!ke,"`getInputElement` only work with `combobox` mode."),Object(b.b)($!=="combobox"||!ke||!De||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Se&&!se&&$!=="combobox"&&$!=="tags"&&Object(b.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(b.b)(!ye||z,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),c!=null){var Oe=Object(m.d)(c);Object(b.a)(!s||Oe.every(function(_e){return Object(a.a)(_e)==="object"&&("key"in _e||"value"in _e)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(b.a)(!N||Array.isArray(c),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Le=null;Object(k.a)(he).some(function(_e){if(!U.isValidElement(_e)||!_e.type)return!1;var Pe=_e.type;if(Pe.isSelectOption)return!1;if(Pe.isSelectOptGroup){var He=Object(k.a)(_e.props.children).every(function(Ge){return!U.isValidElement(Ge)||!_e.type||Ge.type.isSelectOption?!0:(Le=Ge.type,!1)});return!He}return Le=Pe,!0}),Le&&Object(b.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Le.displayName||Le.name||Le,"`.")),Object(b.a)(R===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var B=E,W=Object(h.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:f,flattenOptions:p.d,getLabeledValue:p.e,filterOptions:p.b,isValueDisabled:p.g,findValueOption:p.c,warningProps:B,fillOptionsWithMissingValue:p.a}),K=function(P){Object(_.a)(ae,P);var $=Object(Q.a)(ae);function ae(){var he;return Object(fe.a)(this,ae),he=$.apply(this,arguments),he.selectRef=U.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(Z.a)(ae,[{key:"render",value:function(){return U.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),ae}(U.Component);K.Option=u,K.OptGroup=v;var V=K,M=it.c=V},M8RZ:function(ft,it,pe){"use strict";pe.d(it,"a",function(){return F});var fe=pe("fWQN"),Z=pe("mtLc"),_=pe("yKVA"),Q=pe("879j"),U=pe("q1tI"),D=pe.n(U),G=pe("i8i4"),H=pe.n(G),F=function(O){Object(_.a)(T,O);var y=Object(Q.a)(T);function T(I){var L;Object(fe.a)(this,T),L=y.call(this,I);var A=window.document;return L.node=A.createElement("div"),A.body.appendChild(L.node),L}return Object(Z.a)(T,[{key:"render",value:function(){var L=this.props.children;return Object(G.createPortal)(L,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),T}(D.a.Component)},Ot1p:function(ft,it,pe){"use strict";var fe=pe("2qtc"),Z=pe("kLXV"),_=pe("rAM+"),Q=pe("miYZ"),U=pe("tsqr"),D=pe("9og8"),G=pe("tJVT"),H=pe("jrin"),F=pe("WmNS"),O=pe.n(F),y=pe("q1tI"),T=pe.n(y),I=pe("VrN/"),L=pe.n(I),A=pe("bdgK"),w=pe("p77/"),d=pe("Bd2K"),o=pe("ELLl"),l=pe("19Vz"),u=pe("lZu9"),C=pe("+NIl"),v=pe("kSUc"),g=pe("9Bee"),k=function(ve){var Ee=ve.value,Me=Ee===void 0?"":Ee,Be=ve.className,Ye=ve.showTextOnly,We=ve.showLines,pt=ve.style,nt=pt===void 0?{}:pt,tt=Object(y.useMemo)(function(){return""},[Me]);return T.a.createElement(T.a.Fragment,null,T.a.createElement("div",{dangerouslySetInnerHTML:{__html:tt}}))},x=pe("0Owb"),f=pe("dejd"),p=pe("C+DQ"),h=pe("1vsH"),a=pe("m3rI"),b=[{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,Be=ve.icon,Ye=ve.actionName,We=ve.className,pt=We===void 0?"":We,nt=ve.children;function tt(){Ee(Ye)}return T.a.createElement("a",{title:Me,className:pt,onClick:tt},T.a.createElement("i",{className:"md-iconfont ".concat(Be)}),nt)}var E=function(ve){var Ee=ve.watch,Me=ve.showNullButton,Be=ve.onActionCallback,Ye=ve.fullScreen,We=ve.insertTemp,pt=ve.hidetoolBar,nt=ve.uuid,tt=ve.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(h.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(h.F)("_educoder_session"),"&key=").concat(nt,"&api=").concat(encodeURIComponent(a.a.PROXY_SERVER)));var Tt=[].concat(b,[{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 T.a.createElement("ul",{className:"markdown-toolbar-container"},!pt&&Tt.map(function(bt,xt){return T.a.createElement("li",{key:xt},bt.actionName?T.a.createElement(m,Object(x.a)({},bt,{onActionCallback:Be})):T.a.createElement("span",{className:"v-line"}))}),Me?T.a.createElement("li",null,T.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Be},T.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,We&&T.a.createElement("li",null,T.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(We),onActionCallback:Be},T.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),T.a.createElement("li",{className:"btn-full-screen"},T.a.createElement(m,{icon:"".concat(Ye?"icon-shrink":"icon-enlarge"),title:Ye?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Be})))},B=pe("M8RZ"),W=pe("+L6B"),K=pe("2/Rp"),V=pe("y8nQ"),M=pe("Vl3Y"),P=pe("5NDa"),$=pe("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},he=function(ve){var Ee=ve.callback,Me=ve.onCancel;function Be(Ye){Ee(Ye)}return T.a.createElement(M.a,Object(x.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Be}),T.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},T.a.createElement($.a,null)),T.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},T.a.createElement($.a,null)),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},me=pe("7ahc"),De=pe("HmJG"),xe=pe("BjJ7"),ke=M.a.useForm,Te={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}},ye=function(ve){var Ee=ve.callback,Me=ve.onCancel,Be=ke(),Ye=Object(G.a)(Be,1),We=Ye[0];function pt(Tt){Ee(Tt)}function nt(Tt,bt){if(Tt.status===-1){U.b.error(Tt.message);return}We.setFieldsValue({src:"/api/attachments/".concat(Tt.id),type:bt.type})}function tt(Tt){var bt=Tt.target.files[0];s(bt,nt)}return T.a.createElement(M.a,Object(x.a)({form:We},Se,{className:"upload-image-panel",onFinish:pt}),T.a.createElement(M.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},T.a.createElement("div",{className:"flex-container"},T.a.createElement(M.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},T.a.createElement($.a,{style:Te})),T.a.createElement(z,{onFileChange:tt}))),T.a.createElement(M.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},T.a.createElement($.a,{style:{width:264}})),T.a.createElement(M.a.Item,{style:{textAlign:"right"}},T.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))};function z(ve){var Ee=ve.onFileChange;return T.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",T.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 Be=new window.XMLHttpRequest;Be.withCredentials=!0,Be.addEventListener("load",function(Ye){Ee(JSON.parse(Ye.target.responseText),ve)},!1),Be.addEventListener("error",function(Ye){console.error(Ye)},!1),Be.open("POST","".concat(xe.a,"/api/attachments.json")),Be.send(Me)}var c=pe("giR+"),R=pe("fyUT"),Y=pe("7Kak"),N=pe("9yH6"),se=N.a.Group,be={margin:"0 8px"},Ae=function(ve){var Ee=ve.callback,Me=ve.onCancel;function Be(Ye){Ee(Ye)}return T.a.createElement(M.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Be},T.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},T.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),T.a.createElement("span",{style:be},"\u884C\u6570"),T.a.createElement(M.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},T.a.createElement(R.a,null)),T.a.createElement("span",{style:be},"\u5217\u6570"),T.a.createElement(M.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},T.a.createElement(R.a,null))),T.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},T.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),T.a.createElement(M.a.Item,{name:"align"},T.a.createElement(se,null,T.a.createElement(N.a,{value:"default"},T.a.createElement("i",{className:"fa fa-align-justify"})),T.a.createElement(N.a,{value:"left"},T.a.createElement("i",{className:"fa fa-align-left"})),T.a.createElement(N.a,{value:"center"},T.a.createElement("i",{className:"fa fa-align-center"})),T.a.createElement(N.a,{value:"right"},T.a.createElement("i",{className:"fa fa-align-right"}))))),T.a.createElement("div",{className:"flex-container flex-end"},T.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.a.createElement(K.a,{type:"ghost",onClick:Me},"\u53D6\u6D88")))},Oe=pe("ErOA"),Le=pe("7Cbv"),_e="link",Pe="upload-image",He="code-block",Ge="add-table",Xe="------------",ze={default:Xe,left:":".concat(Xe),center:":".concat(Xe,":"),right:"".concat(Xe,":")},ot=pe("9VGf"),$e,Je;function Re(){}var rt=0,qe=1e4,oe="\u2581",q=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function ee(ve){return/^\d+$/.test(ve)?"".concat(ve,"px"):ve}var ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,le=ne?"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),ue=(Je={},Object(H.a)(Je,_e,"\u6DFB\u52A0\u94FE\u63A5"),Object(H.a)(Je,He,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(H.a)(Je,Pe,"\u6DFB\u52A0\u6587\u4EF6"),Object(H.a)(Je,Ge,"\u6DFB\u52A0\u8868\u683C"),Je),de=it.a=function(ve){var Ee=ve.defaultValue,Me=Ee===void 0?"":Ee,Be=ve.onChange,Ye=ve.width,We=Ye===void 0?"100%":Ye,pt=ve.height,nt=pt===void 0?400:pt,tt=ve.miniToolbar,Tt=tt===void 0?!1:tt,bt=ve.isFocus,xt=bt===void 0?!1:bt,kt=ve.watch,Et=ve.insertTemp,qt=ve.mode,Tr=qt===void 0?"markdown":qt,Yt=ve.id,gr=Yt===void 0?"markdown-editor-id":Yt,fr=ve.showResizeBar,zr=fr===void 0?!1:fr,$t=ve.noStorage,Nr=$t===void 0?!1:$t,ti=ve.showNullButton,Pt=ti===void 0?!1:ti,Ze=ve.hidetoolBar,wt=Ze===void 0?!1:Ze,Zt=ve.fullScreen,gt=Zt===void 0?!1:Zt,mt=ve.onBlur,Lt=ve.onCMBeforeChange,vr=ve.onFullScreen,Ut=ve.className,Fe=Ut===void 0?"":Ut,ht=ve.disablePaste,ri=ht===void 0?!1:ht,bi=ve.placeholder,xi=bi===void 0?"":bi,ii=ve.values,Ei=ii===void 0?"":ii,ct=Object(y.useState)(null),kn=Object(G.a)(ct,2),Ue=kn[0],Si=kn[1],Er=Object(y.useState)(Me),Ki=Object(G.a)(Er,2),ni=Ki[0],Cr=Ki[1],Vi=Object(y.useState)(kt),Xi=Object(G.a)(Vi,2),wr=Xi[0],Yi=Xi[1],Ln=Object(y.useState)(gt),$i=Object(G.a)(Ln,2),Ar=$i[0],Dn=$i[1],aa=Object(y.useState)(""),Zi=Object(G.a)(aa,2),ir=Zi[0],Kr=Zi[1],oa=Object(y.useState)(0),ai=Object(G.a)(oa,2),kr=ai[0],Ji=ai[1],sa=Object(y.useState)(nt),Rn=Object(G.a)(sa,2),On=Rn[0],Ti=Rn[1],_n=Object(y.useState)(!1),Mn=Object(G.a)(_n,2),la=Mn[0],Ci=Mn[1],oi=Object(y.useRef)(Object(Le.a)()),si=Object(y.useRef)(!1),wi=Object(y.useRef)(),Br=Object(y.useRef)(),Fr=Object(y.useRef)(),Ur=Object(y.useRef)(),Ai=Object(y.useRef)(),Pn=function(){var at=Object(D.a)(O.a.mark(function dt(){var lt,yt;return O.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Oe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:oi.current}});case 2:yt=_t.sent,yt!=null&&(lt=yt.attachments)!==null&<!==void 0&<.length&&(console.log("cm:",Ue,Br),yt.attachments.map(function(Ct){Ct.content_type.indexOf("image")>-1?Ue.replaceSelection(".concat(Ct.content_type,")")):Ct.content_type.indexOf("video")>-1?Ue.replaceSelection(' ')):Ct.content_type.indexOf("pdf")>-1?Ue.replaceSelection('').concat(Ct.name," ")):Ue.replaceSelection("[".concat(Ct.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Ct.id,"?type=").concat(Ct.content_type,")"))}));case 4:case"end":return _t.stop()}},dt)}));return function(){return at.apply(this,arguments)}}();Object(y.useEffect)(function(){Cr(Ei),Ue==null||Ue.setValue(Ei)},[Ei]),Object(y.useEffect)(function(){vr==null||vr(Ar)},[Ar]),Object(y.useEffect)(function(){if(Br.current){var at=L.a.fromTextArea(Br.current,{mode:Tr,lineNumbers:!Tt,lineWrapping:!0,value:Me,autoCloseTags:!0,autoCloseBrackets:!0});xt&&at.focus();function dt(lt,yt){if(ri){yt.preventDefault();return}var At=yt.clipboardData;if(At){var _t=At.types.toString(),Ct=At.items;if(_t==="Files"||At.types.indexOf("Files")>-1){if(yt.preventDefault(),Tr=="stex")return;try{var Ht,or=Ct[1];((Ht=Ct[0])===null||Ht===void 0?void 0:Ht.kind)==="file"&&(or=Ct[0]);var St=or.getAsFile(),jr=St.name.split(".").pop();s(St,function(Dt){if(Dt.id){var sr,er,Sr;(St==null||((sr=St.type)===null||sr===void 0)?void 0:sr.indexOf("image"))>-1?at.replaceSelection(".concat(Dt.content_type,")")):(St==null||((er=St.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?at.replaceSelection(' ')):(St==null||((Sr=St.type)===null||Sr===void 0)?void 0:Sr.indexOf("pdf"))>-1?at.replaceSelection('').concat(St.name," ")):te.includes(jr)?at.replaceSelection('').concat(St.name," ")):at.replaceSelection("[".concat(St.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Dt.id,"?type=").concat(Dt.content_type,")"))}else(Dt==null?void 0:Dt.status)===401&&(document.location.href="/user/login")})}catch(Dt){U.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return at.on("paste",dt),at.on("dragleave",function(lt,yt){Fr.current.classList.remove("mouse-hover-md")}),at.on("dragover",function(lt,yt){Fr.current.classList.add("mouse-hover-md")}),at.on("drop",function(lt,yt){Fr.current.classList.add("mouse-hover-md");var At;if(At=yt.dataTransfer.files,At.length>0){yt.preventDefault(),yt.stopPropagation();for(var _t=function(or){var St=At[or],jr=St.name.split(".").pop();s(St,function(Dt){if(Dt.id){var sr,er,Sr;(St==null||((sr=St.type)===null||sr===void 0)?void 0:sr.indexOf("image"))>-1?at.replaceSelection(".concat(Dt.content_type,")")):(St==null||((er=St.type)===null||er===void 0)?void 0:er.indexOf("video"))>-1?at.replaceSelection(' ')):(St==null||((Sr=St.type)===null||Sr===void 0)?void 0:Sr.indexOf("pdf"))>-1?at.replaceSelection('').concat(St.name," ")):te.includes(jr)?at.replaceSelection('').concat(St.name," ")):at.replaceSelection("[".concat(St.name,"](").concat(a.a.API_SERVER,"/api/attachments/").concat(Dt.id,"?type=").concat(Dt.content_type,")"))}else(Dt==null?void 0:Dt.status)===401&&(document.location.href="/user/login")})},Ct=0;Ct0||Ct.target.offsetWidth>0)&&(yr(),Ue.setSize("100%","100%"),Ue.refresh())}}catch(Ht){At.e(Ht)}finally{At.f()}});return lt.observe(Br.current.parentElement),lt}if(Ue){var dt=at();return function(){dt.unobserve(Br.current.parentElement)}}},[Ue,yr]),Object(y.useEffect)(function(){if(Ue){for(var at=[],dt=function(){var Ct=yt[lt];At=Object(G.a)(Ct,2);var Ht=At[0],or=At[1],St=Object(H.a)({},Ht,function(){In(or)});at.push(St),Ue.addKeyMap(St)},lt=0,yt=Object.entries(ie);lt0){var at=new Date().getTime(),dt=window.sessionStorage.getItem(gr);at>=kr+qe&&(!dt||dt!==ni)&&(window.sessionStorage.setItem(gr,ni),Ci(!0))}},qe),Object(y.useEffect)(function(){Yi(kt)},[Ue,kt]),Object(y.useEffect)(function(){Ue&&(xt&&Ue.focus())},[Ue,xt]),Object(y.useEffect)(function(){if(wr&&Ue){var at=Ue.getScrollerElement();function dt(lt){var yt=lt.target;if(Ai.current){var At=yt.scrollTop/yt.scrollHeight;Ai.current.scrollTop=Ai.current.scrollHeight*At}}return at.addEventListener("scroll",dt),function(){at.removeEventListener("scroll",dt)}}},[Ue,wr]),Object(y.useEffect)(function(){if(Ue&&Lt){function at(dt,lt){Lt(dt,lt)}return Ue.on("beforeChange",at),function(){Ue.off("beforeChange",at)}}},[Ue,Lt]),Object(y.useEffect)(function(){if(Ue&&mt){function at(){mt(Ue.getValue())}return Ue.on("blur",at),function(){Ue.off("blur",at)}}},[Ue,mt]),Object(y.useEffect)(function(){if(Ue){function at(dt){var lt=dt.getValue();Cr(lt),Ji(new Date().getTime()),dt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Be&&Be(lt)}return Ue.on("change",at),function(){Ue.off("change",at)}}},[Ue,Be]),Object(y.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(y.useCallback)(function(at){var dt=Ue.getCursor(),lt=Ue.getSelection(),yt=lt.split(`
`);switch(at){case"bold":return Ue.replaceSelection("**"+lt+"**"),lt===""&&Ue.setCursor(dt.line,dt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+lt+"*"),lt===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+lt+"`"),lt===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.focus();case"inline-latex":return Ue.replaceSelection("`$$"+lt+"$$`"),lt===""&&Ue.setCursor(dt.line,dt.ch+3),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+lt+"\n```"),Ue.setCursor(dt.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(At){return At===""?"":"- ".concat(At)}).join(`
`)),Ue.focus();case"list-ol":return lt===""?Ue.replaceSelection("1. "+lt):Ue.replaceSelection(yt.map(function(At,_t){return At===""?"":"".concat(_t+1,". ").concat(At)}).join(`
`)),Ue.focus();case"add-null-ch":return lt===""&&Ue.setCursor(dt.line,dt.ch+1),Ue.replaceSelection(oe),Ue.focus();case"inster-template-1":return lt===""&&Ue.setCursor(dt.line,dt.ch),Ue.replaceSelection(q),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return Yi(!wr),Ue.focus();case"trigger-full-screen":return Dn(!Ar),Ue.focus();case _e:Kr(_e);return;case He:Kr(He);return;case Pe:Kr(Pe);return;case Ge:Kr(Ge);return;default:throw new Error}},[Ue,wr,Ar]),ki=Object(y.useCallback)(function(at){Kr("");switch(ir){case _e:var dt=at.title,lt=at.link;return Ue.replaceSelection("[".concat(dt,"](").concat(lt,")")),Ue.focus();case He:var yt=at.language,At=at.content;return Ue.replaceSelection(["```"+yt,At,"```"].join(`
`)),Ue.focus();case Pe:var _t=at.src,Ct=at.alt;return Ct?Ue.replaceSelection(".concat(_t,' "').concat(Ct,'" )')):Ue.replaceSelection("")),Ue.focus();case Ge:for(var Ht=at.row,or=at.col,St=at.align,jr=`
`,Dt=0;Dt300&&(Ht=300);var or=nt+Ht+"px";Ti(or)}}return at.addEventListener("mousedown",yt),document.addEventListener("mousemove",_t),document.addEventListener("mouseup",At),function(){at.removeEventListener("mousedown",yt),document.removeEventListener("mousemove",_t),document.removeEventListener("mouseup",At)}}},[Ue,Ur]),Object(y.useEffect)(function(){Ti(nt)},[nt]);var _r=ee(We),qi=ee(On),Lr={width:_r,height:qi},en=Object(y.useMemo)(function(){if(kr){var at=new Date(kr),dt=at.getHours(),lt=at.getMinutes(),yt=at.getSeconds();return dt=dt<10?"0"+dt:dt,lt=lt<10?"0"+lt:lt,yt=yt<10?"0"+yt:yt,"".concat(dt,":").concat(lt,":").concat(yt)}return 0},[kr]);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,dt){var lt=Ue.getValue();lt=lt.replace(at,dt),Cr(lt),Ue==null||Ue.setValue(lt)}return T.a.createElement(y.Fragment,null,T.a.createElement("div",{className:"markdown-editor-wrapper",ref:Fr},T.a.createElement("div",{className:"markdown-editor-container ".concat(Fe," ").concat(wr?"on-preview":""," ").concat(Tt?"mini":""," ").concat(Ar?"full-screen":""),style:Lr},T.a.createElement(E,{insertTemp:Et,watch:wr,fullScreen:Ar,showNullButton:Pt,onActionCallback:In,hidetoolBar:wt,uuid:oi.current,setOpenPhones:function(){si.current=!0}}),T.a.createElement("div",{className:"markdown-editor-body"},T.a.createElement("div",{className:"codemirror-container"},T.a.createElement("textarea",{ref:Br,placeholder:xi})),wr?T.a.createElement("div",{ref:Ai,className:"preview-container"},Tr==="stex"&&T.a.createElement(k,{value:ni}),Tr!=="stex"&&T.a.createElement(g.a,{edit:!0,value:ni,replaces:ua})):null))),zr?T.a.createElement("a",{ref:Ur,className:"editor-resize"}):null,T.a.createElement(B.a,null,ue[ir]?T.a.createElement(Z.a,{centered:!0,title:ue[ir],visible:!0,onCancel:Vr,footer:null,className:"markdown-popup-form"},Qi):null))}},SJMd:function(ft,it){/**
* @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 pe,fe,Z,_=!1,Q,U;window.PR_SHOULD_USE_CONTINUATION=!0;var D,G;(function(){var H=window,F=["break,continue,do,else,for,if,return,while"],O=[F,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],y=[O,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],T=[y,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],I=[y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],L=[y,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],A="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",w=[y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[F,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],l=[F,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[F,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],C=[T,L,I,w,d,o,l,u],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,g="str",k="kwd",x="com",f="typ",p="lit",h="pun",a="pln",b="tag",m="dec",E="src",B="atn",W="atv",K="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function M(se){for(var be=0,Ae=!1,Oe=!1,Le=0,_e=se.length;Le<_e;++Le){var Pe=se[Le];if(Pe.ignoreCase)Oe=!0;else if(/[a-z]/i.test(Pe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ae=!0,Oe=!1;break}}var He={b:8,t:9,n:10,v:11,f:12,r:13};function Ge(Je){var Re=Je.charCodeAt(0);if(Re!==92)return Re;var rt=Je.charAt(1);return Re=He[rt],Re||("0"<=rt&&rt<="7"?parseInt(Je.substring(1),8):rt==="u"||rt==="x"?parseInt(Je.substring(2),16):Je.charCodeAt(1))}function Xe(Je){if(Je<32)return(Je<16?"\\x0":"\\x")+Je.toString(16);var Re=String.fromCharCode(Je);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function ze(Je){var Re=Je.substring(1,Je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),rt=[],qe=Re[0]==="^",oe=["["];qe&&oe.push("^");for(var q=qe?1:0,ee=Re.length;q122||(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=[],ue=[],q=0;qde[0]&&(de[1]+1>de[0]&&oe.push("-"),oe.push(Xe(de[1])))}return oe.push("]"),oe.join("")}function ot(Je){for(var Re=Je.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=Re.length,qe=[],oe=0,q=0;oe=2&&le==="["?Re[oe]=ze(ee):le!=="\\"&&(Re[oe]=ee.replace(/[a-zA-Z]/g,function(ue){var de=ue.charCodeAt(0);return"["+String.fromCharCode(de&~32,de|32)+"]"}))}return Re.join("")}for(var $e=[],Le=0,_e=se.length;Le<_e;++Le){var Pe=se[Le];if(Pe.global||Pe.multiline)throw new Error(""+Pe);$e.push("(?:"+ot(Pe)+")")}return new RegExp($e.join("|"),Oe?"gi":"g")}function P(se,be){var Ae=/(?:^|\s)nocode(?:\s|$)/,Oe=[],Le=0,_e=[],Pe=0;function He(Ge){var Xe=Ge.nodeType;if(Xe==1){if(Ae.test(Ge.className))return;for(var ze=Ge.firstChild;ze;ze=ze.nextSibling)He(ze);var ot=Ge.nodeName.toLowerCase();(ot==="br"||ot==="li")&&(Oe[Pe]=`
`,_e[Pe<<1]=Le++,_e[Pe++<<1|1]=Ge)}else if(Xe==3||Xe==4){var $e=Ge.nodeValue;$e.length&&(be?$e=$e.replace(/\r\n?/g,`
`):$e=$e.replace(/[ \t\r\n]+/g," "),Oe[Pe]=$e,_e[Pe<<1]=Le,Le+=$e.length,_e[Pe++<<1|1]=Ge)}}return He(se),{sourceCode:Oe.join("").replace(/\n$/,""),spans:_e}}function $(se,be,Ae,Oe,Le){if(!Ae)return;var _e={sourceNode:se,pre:1,langExtension:null,numberLines:null,sourceCode:Ae,spans:null,basePos:be,decorations:null};Oe(_e),Le.push.apply(Le,_e.decorations)}var ae=/\S/;function he(se){for(var be=void 0,Ae=se.firstChild;Ae;Ae=Ae.nextSibling){var Oe=Ae.nodeType;be=Oe===1?be?se:Ae:Oe===3&&ae.test(Ae.nodeValue)?se:be}return be===se?void 0:be}function me(se,be){var Ae={},Oe;(function(){for(var Pe=se.concat(be),He=[],Ge={},Xe=0,ze=Pe.length;Xe=0;)Ae[$e.charAt(Je)]=ot;var Re=ot[1],rt=""+Re;Ge.hasOwnProperty(rt)||(He.push(Re),Ge[rt]=null)}He.push(/[\0-\uffff]/),Oe=M(He)})();var Le=be.length,_e=function(Pe){for(var He=Pe.sourceCode,Ge=Pe.basePos,Xe=Pe.sourceNode,ze=[Ge,a],ot=0,$e=He.match(Oe)||[],Je={},Re=0,rt=$e.length;Re=5&&oe.substring(0,5)==="lang-",ee&&!(q&&typeof q[1]=="string")&&(ee=!1,oe=E),ee||(Je[qe]=oe)}var te=ot;if(ot+=qe.length,!ee)ze.push(Ge+te,oe);else{var ie=q[1],ue=qe.indexOf(ie),de=ue+ie.length;q[2]&&(de=qe.length-q[2].length,ue=de-ie.length);var ve=oe.substring(5);$(Xe,Ge+te,qe.substring(0,ue),_e,ze),$(Xe,Ge+te+ue,ie,z(ve,ie),ze),$(Xe,Ge+te+de,qe.substring(de),_e,ze)}}Pe.decorations=ze};return _e}function De(se){var be=[],Ae=[];se.tripleQuotedStrings?be.push([g,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):se.multiLineStrings?be.push([g,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):be.push([g,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),se.verbatimStrings&&Ae.push([g,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Oe=se.hashComments;Oe&&(se.cStyleComments?(Oe>1?be.push([x,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):be.push([x,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ae.push([g,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):be.push([x,/^#[^\r\n]*/,null,"#"])),se.cStyleComments&&(Ae.push([x,/^\/\/[^\r\n]*/,null]),Ae.push([x,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Le=se.regexLiterals;if(Le){var _e=Le>1?"":`
\r`,Pe=_e?".":"[\\S\\s]",He="/(?=[^/*"+_e+"])(?:[^/\\x5B\\x5C"+_e+"]|\\x5C"+Pe+"|\\x5B(?:[^\\x5C\\x5D"+_e+"]|\\x5C"+Pe+")*(?:\\x5D|$))+/";Ae.push(["lang-regex",RegExp("^"+V+"("+He+")")])}var Ge=se.types;Ge&&Ae.push([f,Ge]);var Xe=(""+se.keywords).replace(/^ | $/g,"");Xe.length&&Ae.push([k,new RegExp("^(?:"+Xe.replace(/[\s,]+/g,"|")+")\\b"),null]),be.push([a,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return se.regexLiterals&&(ze+="(?!s*/)"),Ae.push([p,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[a,/^[a-z_$][a-z_$@0-9]*/i,null],[p,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[a,/^\\[\s\S]?/,null],[h,new RegExp(ze),null]),me(be,Ae)}var xe=De({keywords:C,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ke(se,be,Ae){for(var Oe=/(?:^|\s)nocode(?:\s|$)/,Le=/\r\n?|\n/,_e=se.ownerDocument,Pe=_e.createElement("li");se.firstChild;)Pe.appendChild(se.firstChild);var He=[Pe];function Ge(Re){var rt=Re.nodeType;if(rt==1&&!Oe.test(Re.className))if(Re.nodeName==="br")Xe(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var qe=Re.firstChild;qe;qe=qe.nextSibling)Ge(qe);else if((rt==3||rt==4)&&Ae){var oe=Re.nodeValue,q=oe.match(Le);if(q){var ee=oe.substring(0,q.index);Re.nodeValue=ee;var ne=oe.substring(q.index+q[0].length);if(ne){var le=Re.parentNode;le.insertBefore(_e.createTextNode(ne),Re.nextSibling)}Xe(Re),ee||Re.parentNode.removeChild(Re)}}}function Xe(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function rt(q,ee){var ne=ee?q.cloneNode(!1):q,le=q.parentNode;if(le){var te=rt(le,1),ie=q.nextSibling;te.appendChild(ne);for(var ue=ie;ue;ue=ie)ie=ue.nextSibling,te.appendChild(ue)}return ne}for(var qe=rt(Re.nextSibling,0),oe;(oe=qe.parentNode)&&oe.nodeType===1;)qe=oe;He.push(qe)}for(var ze=0;ze=le&&(Ge+=2),_e>=te&&(ot+=2)}}finally{oe&&(oe.style.display=q)}}var Se={};function ye(se,be){for(var Ae=be.length;--Ae>=0;){var Oe=be[Ae];Se.hasOwnProperty(Oe)?H.console&&console.warn("cannot override language handler %s",Oe):Se[Oe]=se}}function z(se,be){return se&&Se.hasOwnProperty(se)||(se=/^\s*]*(?:>|$)/],[x,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[h,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^