You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Paths__New.973380ee.asyn...

355 lines
780 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[185,6,7,16],{"+NIl":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";q.defineMode("stex",function(ke,Ee){"use strict";function De(S,w){S.cmdState.push(w)}function ge(S){return S.cmdState.length>0?S.cmdState[S.cmdState.length-1]:null}function ue(S){var w=S.cmdState.pop();w&&w.closeBracket()}function Y(S){for(var w=S.cmdState,P=w.length-1;P>=0;P--){var g=w[P];if(g.name=="DEFAULT")continue;return g}return{styleIdentifier:function(){return null}}}function J(S,w,P){return function(){this.name=S,this.bracketNo=0,this.style=w,this.styles=P,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=J("importmodule","tag",["string","builtin"]),F.documentclass=J("documentclass","tag",["","atom"]),F.usepackage=J("usepackage","tag",["atom"]),F.begin=J("begin","tag",["atom"]),F.end=J("end","tag",["atom"]),F.label=J("label","tag",["atom"]),F.ref=J("ref","tag",["atom"]),F.eqref=J("eqref","tag",["atom"]),F.cite=J("cite","tag",["atom"]),F.bibitem=J("bibitem","tag",["atom"]),F.Bibitem=J("Bibitem","tag",["atom"]),F.RBibitem=J("RBibitem","tag",["atom"]),F.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function B(S,w){S.f=w}function C(S,w){var P;if(S.match(/^\\[a-zA-Z@]+/)){var g=S.current().slice(1);return P=F.hasOwnProperty(g)?F[g]:F.DEFAULT,P=new P,De(w,P),B(w,M),P.style}if(S.match(/^\\[$&%#{}_]/))return"tag";if(S.match(/^\\[,;!\/\\]/))return"tag";if(S.match("\\["))return B(w,function(O,W){return E(O,W,"\\]")}),"keyword";if(S.match("\\("))return B(w,function(O,W){return E(O,W,"\\)")}),"keyword";if(S.match("$$"))return B(w,function(O,W){return E(O,W,"$$")}),"keyword";if(S.match("$"))return B(w,function(O,W){return E(O,W,"$")}),"keyword";var y=S.next();if(y=="%")return S.skipToEnd(),"comment";if(y=="}"||y=="]"){if(P=ge(w),P)P.closeBracket(y),B(w,M);else return"error";return"bracket"}else return y=="{"||y=="["?(P=F.DEFAULT,P=new P,De(w,P),"bracket"):/\d/.test(y)?(S.eatWhile(/[\w.%]/),"atom"):(S.eatWhile(/[\w\-_]/),P=Y(w),P.name=="begin"&&(P.argument=S.current()),P.styleIdentifier())}function E(S,w,P){if(S.eatSpace())return null;if(P&&S.match(P))return B(w,C),"keyword";if(S.match(/^\\[a-zA-Z@]+/))return"tag";if(S.match(/^[a-zA-Z]+/))return"variable-2";if(S.match(/^\\[$&%#{}_]/))return"tag";if(S.match(/^\\[,;!\/]/))return"tag";if(S.match(/^[\^_&]/))return"tag";if(S.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(S.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var g=S.next();return g=="{"||g=="}"||g=="["||g=="]"||g=="("||g==")"?"bracket":g=="%"?(S.skipToEnd(),"comment"):"error"}function M(S,w){var P=S.peek(),g;return P=="{"||P=="["?(g=ge(w),g.openBracket(P),S.eat(P),B(w,C),"bracket"):/[ \t\r]/.test(P)?(S.eat(P),null):(B(w,C),ue(w),C(S,w))}return{startState:function(){var S=Ee.inMathMode?function(w,P){return E(w,P)}:C;return{cmdState:[],f:S}},copyState:function(S){return{cmdState:S.cmdState.slice(),f:S.f}},token:function(S,w){return w.f(S,w)},blankLine:function(S){S.f=C,S.cmdState.length=0},lineComment:"%"}}),q.defineMIME("text/x-stex","stex"),q.defineMIME("text/x-latex","stex")})},"+ua5":function(mt,Ce,h){},"/cxE":function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return Ee}),h.d(Ce,"f",function(){return De}),h.d(Ce,"g",function(){return ge}),h.d(Ce,"d",function(){return Y}),h.d(Ce,"a",function(){return J}),h.d(Ce,"b",function(){return F}),h.d(Ce,"c",function(){return B});var q=function(){function C(){this.listeners=[],this.unexpectedErrorHandler=function(E){setTimeout(function(){throw E.stack?new Error(E.message+`
`+E.stack):E},0)}}return C.prototype.emit=function(E){this.listeners.forEach(function(M){M(E)})},C.prototype.onUnexpectedError=function(E){this.unexpectedErrorHandler(E),this.emit(E)},C.prototype.onUnexpectedExternalError=function(E){this.unexpectedErrorHandler(E)},C}(),ke=new q;function Ee(C){Y(C)||ke.onUnexpectedError(C);return}function De(C){Y(C)||ke.onUnexpectedExternalError(C);return}function ge(C){if(C instanceof Error){var E=C.name,M=C.message,S=C.stacktrace||C.stack;return{$isError:!0,name:E,message:M,stack:S}}return C}var ue="Canceled";function Y(C){return C instanceof Error&&C.name===ue&&C.message===ue}function J(){var C=new Error(ue);return C.name=C.message,C}function F(C){return C?new Error("Illegal argument: "+C):new Error("Illegal argument")}function B(C){return C?new Error("Illegal state: "+C):new Error("Illegal state")}},"19Vz":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){q.defineOption("placeholder","",function(J,F,B){var C=B&&B!=q.Init;if(F&&!C)J.on("blur",ge),J.on("change",ue),J.on("swapDoc",ue),q.on(J.getInputField(),"compositionupdate",J.state.placeholderCompose=function(){De(J)}),ue(J);else if(!F&&C){J.off("blur",ge),J.off("change",ue),J.off("swapDoc",ue),q.off(J.getInputField(),"compositionupdate",J.state.placeholderCompose),ke(J);var E=J.getWrapperElement();E.className=E.className.replace(" CodeMirror-empty","")}F&&!J.hasFocus()&&ge(J)});function ke(J){J.state.placeholder&&(J.state.placeholder.parentNode.removeChild(J.state.placeholder),J.state.placeholder=null)}function Ee(J){ke(J);var F=J.state.placeholder=document.createElement("pre");F.style.cssText="height: 0; overflow: visible",F.style.direction=J.getOption("direction"),F.className="CodeMirror-placeholder CodeMirror-line-like";var B=J.getOption("placeholder");typeof B=="string"&&(B=document.createTextNode(B)),F.appendChild(B),J.display.lineSpace.insertBefore(F,J.display.lineSpace.firstChild)}function De(J){setTimeout(function(){var F=!1,B=J.getInputField();B.nodeName=="TEXTAREA"?F=!B.value:J.lineCount()==1&&(F=!/[^\u200b]/.test(B.querySelector(".CodeMirror-line").textContent)),F?Ee(J):ke(J)},20)}function ge(J){Y(J)&&Ee(J)}function ue(J){var F=J.getWrapperElement(),B=Y(J);F.className=F.className.replace(" CodeMirror-empty","")+(B?" CodeMirror-empty":""),B?Ee(J):ke(J)}function Y(J){return J.lineCount()===1&&J.getLine(0)===""}})},"1eCo":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";var ke={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},Ee={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(De,ge){var ue=De.indentUnit,Y={},J=ge.htmlMode?ke:Ee;for(var F in J)Y[F]=J[F];for(var F in ge)Y[F]=ge[F];var B,C;function E(j,Ae){function oe(te){return Ae.tokenize=te,te(j,Ae)}var K=j.next();if(K=="<")return j.eat("!")?j.eat("[")?j.match("CDATA[")?oe(w("atom","]]>")):null:j.match("--")?oe(w("comment","-->")):j.match("DOCTYPE",!0,!0)?(j.eatWhile(/[\w\._\-]/),oe(P(1))):null:j.eat("?")?(j.eatWhile(/[\w\._\-]/),Ae.tokenize=w("meta","?>"),"meta"):(B=j.eat("/")?"closeTag":"openTag",Ae.tokenize=M,"tag bracket");if(K=="&"){var z;return j.eat("#")?j.eat("x")?z=j.eatWhile(/[a-fA-F\d]/)&&j.eat(";"):z=j.eatWhile(/[\d]/)&&j.eat(";"):z=j.eatWhile(/[\w\.\-:]/)&&j.eat(";"),z?"atom":"error"}else return j.eatWhile(/[^&<]/),null}E.isInText=!0;function M(j,Ae){var oe=j.next();if(oe==">"||oe=="/"&&j.eat(">"))return Ae.tokenize=E,B=oe==">"?"endTag":"selfcloseTag","tag bracket";if(oe=="=")return B="equals",null;if(oe=="<"){Ae.tokenize=E,Ae.state=W,Ae.tagName=Ae.tagStart=null;var K=Ae.tokenize(j,Ae);return K?K+" tag error":"tag error"}else return/[\'\"]/.test(oe)?(Ae.tokenize=S(oe),Ae.stringStartCol=j.column(),Ae.tokenize(j,Ae)):(j.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function S(j){var Ae=function(oe,K){for(;!oe.eol();)if(oe.next()==j){K.tokenize=M;break}return"string"};return Ae.isInAttribute=!0,Ae}function w(j,Ae){return function(oe,K){for(;!oe.eol();){if(oe.match(Ae)){K.tokenize=E;break}oe.next()}return j}}function P(j){return function(Ae,oe){for(var K;(K=Ae.next())!=null;){if(K=="<")return oe.tokenize=P(j+1),oe.tokenize(Ae,oe);if(K==">")if(j==1){oe.tokenize=E;break}else return oe.tokenize=P(j-1),oe.tokenize(Ae,oe)}return"meta"}}function g(j,Ae,oe){this.prev=j.context,this.tagName=Ae,this.indent=j.indented,this.startOfLine=oe,(Y.doNotIndent.hasOwnProperty(Ae)||j.context&&j.context.noIndent)&&(this.noIndent=!0)}function y(j){j.context&&(j.context=j.context.prev)}function O(j,Ae){for(var oe;;){if(!j.context)return;if(oe=j.context.tagName,!Y.contextGrabbers.hasOwnProperty(oe)||!Y.contextGrabbers[oe].hasOwnProperty(Ae))return;y(j)}}function W(j,Ae,oe){return j=="openTag"?(oe.tagStart=Ae.column(),de):j=="closeTag"?pe:W}function de(j,Ae,oe){return j=="word"?(oe.tagName=Ae.current(),C="tag",ye):Y.allowMissingTagName&&j=="endTag"?(C="tag bracket",ye(j,Ae,oe)):(C="error",de)}function pe(j,Ae,oe){if(j=="word"){var K=Ae.current();return oe.context&&oe.context.tagName!=K&&Y.implicitlyClosed.hasOwnProperty(oe.context.tagName)&&y(oe),oe.context&&oe.context.tagName==K||Y.matchClosing===!1?(C="tag",re):(C="tag error",xe)}else return Y.allowMissingTagName&&j=="endTag"?(C="tag bracket",re(j,Ae,oe)):(C="error",xe)}function re(j,Ae,oe){return j!="endTag"?(C="error",re):(y(oe),W)}function xe(j,Ae,oe){return C="error",re(j,Ae,oe)}function ye(j,Ae,oe){if(j=="word")return C="attribute",Q;if(j=="endTag"||j=="selfcloseTag"){var K=oe.tagName,z=oe.tagStart;return oe.tagName=oe.tagStart=null,j=="selfcloseTag"||Y.autoSelfClosers.hasOwnProperty(K)?O(oe,K):(O(oe,K),oe.context=new g(oe,K,z==oe.indented)),W}return C="error",ye}function Q(j,Ae,oe){return j=="equals"?we:(Y.allowMissing||(C="error"),ye(j,Ae,oe))}function we(j,Ae,oe){return j=="string"?Z:j=="word"&&Y.allowUnquoted?(C="string",ye):(C="error",ye(j,Ae,oe))}function Z(j,Ae,oe){return j=="string"?Z:ye(j,Ae,oe)}return{startState:function(j){var Ae={tokenize:E,state:W,indented:j||0,tagName:null,tagStart:null,context:null};return j!=null&&(Ae.baseIndent=j),Ae},token:function(j,Ae){if(!Ae.tagName&&j.sol()&&(Ae.indented=j.indentation()),j.eatSpace())return null;B=null;var oe=Ae.tokenize(j,Ae);return(oe||B)&&oe!="comment"&&(C=null,Ae.state=Ae.state(B||oe,j,Ae),C&&(oe=C=="error"?oe+" error":C)),oe},indent:function(j,Ae,oe){var K=j.context;if(j.tokenize.isInAttribute)return j.tagStart==j.indented?j.stringStartCol+1:j.indented+ue;if(K&&K.noIndent)return q.Pass;if(j.tokenize!=M&&j.tokenize!=E)return oe?oe.match(/^(\s*)/)[0].length:0;if(j.tagName)return Y.multilineTagIndentPastTag!==!1?j.tagStart+j.tagName.length+2:j.tagStart+ue*(Y.multilineTagIndentFactor||1);if(Y.alignCDATA&&/<!\[CDATA\[/.test(Ae))return 0;var z=Ae&&/^<(\/)?([\w_:\.-]*)/.exec(Ae);if(z&&z[1])for(;K;)if(K.tagName==z[2]){K=K.prev;break}else if(Y.implicitlyClosed.hasOwnProperty(K.tagName))K=K.prev;else break;else if(z)for(;K;){var te=Y.contextGrabbers[K.tagName];if(te&&te.hasOwnProperty(z[2]))K=K.prev;else break}for(;K&&K.prev&&!K.startOfLine;)K=K.prev;return K?K.indent+ue:j.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Y.htmlMode?"html":"xml",helperType:Y.htmlMode?"html":"xml",skipAttribute:function(j){j.state==we&&(j.state=ye)},xmlCurrentTag:function(j){return j.tagName?{name:j.tagName,close:j.type=="closeTag"}:null},xmlCurrentContext:function(j){for(var Ae=[],oe=j.context;oe;oe=oe.prev)oe.tagName&&Ae.push(oe.tagName);return Ae.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q=h("JYp7"),ke=function(){function De(ge){this.element=ge,this.next=De.Undefined,this.prev=De.Undefined}return De.Undefined=new De(void 0),De}(),Ee=function(){function De(){this._first=ke.Undefined,this._last=ke.Undefined,this._size=0}return Object.defineProperty(De.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),De.prototype.isEmpty=function(){return this._first===ke.Undefined},De.prototype.clear=function(){this._first=ke.Undefined,this._last=ke.Undefined,this._size=0},De.prototype.unshift=function(ge){return this._insert(ge,!1)},De.prototype.push=function(ge){return this._insert(ge,!0)},De.prototype._insert=function(ge,ue){var Y=this,J=new ke(ge);if(this._first===ke.Undefined)this._first=J,this._last=J;else if(ue){var F=this._last;this._last=J,J.prev=F,F.next=J}else{var B=this._first;this._first=J,J.next=B,B.prev=J}this._size+=1;var C=!1;return function(){C||(C=!0,Y._remove(J))}},De.prototype.shift=function(){if(this._first===ke.Undefined)return;var ge=this._first.element;return this._remove(this._first),ge},De.prototype.pop=function(){if(this._last===ke.Undefined)return;var ge=this._last.element;return this._remove(this._last),ge},De.prototype._remove=function(ge){if(ge.prev!==ke.Undefined&&ge.next!==ke.Undefined){var ue=ge.prev;ue.next=ge.next,ge.next.prev=ue}else ge.prev===ke.Undefined&&ge.next===ke.Undefined?(this._first=ke.Undefined,this._last=ke.Undefined):ge.next===ke.Undefined?(this._last=this._last.prev,this._last.next=ke.Undefined):ge.prev===ke.Undefined&&(this._first=this._first.next,this._first.prev=ke.Undefined);this._size-=1},De.prototype.iterator=function(){var ge,ue=this._first;return{next:function(){return ue===ke.Undefined?q.c:(ge?ge.value=ue.element:ge={done:!1,value:ue.element},ue=ue.next,ge)}}},De.prototype.toArray=function(){for(var ge=[],ue=this._first;ue!==ke.Undefined;ue=ue.next)ge.push(ue.element);return ge},De}()},"746U":function(mt,Ce,h){"use strict";h.d(Ce,"d",function(){return ke}),h.d(Ce,"j",function(){return Ee}),h.d(Ce,"i",function(){return De}),h.d(Ce,"h",function(){return ge}),h.d(Ce,"e",function(){return ue}),h.d(Ce,"k",function(){return Y}),h.d(Ce,"l",function(){return J}),h.d(Ce,"a",function(){return F}),h.d(Ce,"f",function(){return C}),h.d(Ce,"g",function(){return E}),h.d(Ce,"m",function(){return M}),h.d(Ce,"c",function(){return P}),h.d(Ce,"b",function(){return g}),h.d(Ce,"n",function(){return y}),h.d(Ce,"o",function(){return O});var q={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function ke(W){return Array.isArray?Array.isArray(W):!!(W&&typeof W.length===q.number&&W.constructor===Array)}function Ee(W){return typeof W===q.string||W instanceof String}function De(W){return typeof W===q.object&&W!==null&&!Array.isArray(W)&&!(W instanceof RegExp)&&!(W instanceof Date)}function ge(W){return(typeof W===q.number||W instanceof Number)&&!isNaN(W)}function ue(W){return W===!0||W===!1}function Y(W){return typeof W===q.undefined}function J(W){return Y(W)||W===null}function F(W,de){if(!W)throw new Error(de?"Unexpected type, expected '"+de+"'":"Unexpected type")}var B=Object.prototype.hasOwnProperty;function C(W){if(!De(W))return!1;for(var de in W)if(B.call(W,de))return!1;return!0}function E(W){return typeof W===q.function}function M(W,de){for(var pe=Math.min(W.length,de.length),re=0;re<pe;re++)S(W[re],de[re])}function S(W,de){if(Ee(de)){if(typeof W!==de)throw new Error("argument does not match constraint: typeof "+de)}else if(E(de)){try{if(W instanceof de)return}catch(pe){}if(!J(W)&&W.constructor===de)return;if(de.length===1&&de.call(void 0,W)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function w(W){for(var de=[],pe=Object.getPrototypeOf(W);Object.prototype!==pe;)de=de.concat(Object.getOwnPropertyNames(pe)),pe=Object.getPrototypeOf(pe);return de}function P(W){for(var de=[],pe=0,re=w(W);pe<re.length;pe++){var xe=re[pe];typeof W[xe]=="function"&&de.push(xe)}return de}function g(W,de){for(var pe=function(we){return function(){var Z=Array.prototype.slice.call(arguments,0);return de(we,Z)}},re={},xe=0,ye=W;xe<ye.length;xe++){var Q=ye[xe];re[Q]=pe(Q)}return re}function y(W){return W===null?void 0:W}function O(W){return typeof W=="undefined"?null:W}},"7Cbv":function(mt,Ce,h){"use strict";var q=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),ke=new Uint8Array(16);function Ee(){if(!q)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return q(ke)}var De=/^(?:[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 ge(M){return typeof M=="string"&&De.test(M)}for(var ue=ge,Y=[],J=0;J<256;++J)Y.push((J+256).toString(16).substr(1));function F(M){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(Y[M[S+0]]+Y[M[S+1]]+Y[M[S+2]]+Y[M[S+3]]+"-"+Y[M[S+4]]+Y[M[S+5]]+"-"+Y[M[S+6]]+Y[M[S+7]]+"-"+Y[M[S+8]]+Y[M[S+9]]+"-"+Y[M[S+10]]+Y[M[S+11]]+Y[M[S+12]]+Y[M[S+13]]+Y[M[S+14]]+Y[M[S+15]]).toLowerCase();if(!ue(w))throw TypeError("Stringified UUID is invalid");return w}var B=F;function C(M,S,w){M=M||{};var P=M.random||(M.rng||Ee)();if(P[6]=P[6]&15|64,P[8]=P[8]&63|128,S){w=w||0;for(var g=0;g<16;++g)S[w+g]=P[g];return S}return B(P)}var E=Ce.a=C},"7ahc":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return de});var q=h("k1fw"),ke=h("0Owb"),Ee=h("+L6B"),De=h("2/Rp"),ge=h("y8nQ"),ue=h("Vl3Y"),Y=h("tJVT"),J=h("OaEy"),F=h("2fM7"),B=h("q1tI"),C=h.n(B),E=h("VrN/"),M=h.n(E),S=h("p77/"),w=h.n(S),P=h("c5Ni"),g=h.n(P),y=F.a.Option,O={labelCol:{span:4},wrapperCol:{span:20}},W={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"]};Ce.b=function(pe){var re=pe.callback,xe=pe.onCancel,ye=Object(B.useState)("python"),Q=Object(Y.a)(ye,2),we=Q[0],Z=Q[1];function j(oe){Z(W[oe][1])}function Ae(oe){re(oe)}return C.a.createElement(ue.a,Object(ke.a)({},O,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae}),C.a.createElement(ue.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},C.a.createElement(F.a,{onChange:j},Object.keys(W).map(function(oe){return C.a.createElement(y,{key:oe,value:oe},W[oe][0])}))),C.a.createElement(ue.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},C.a.createElement(de,{mode:we})),C.a.createElement("div",{className:"flex-container flex-end"},C.a.createElement(De.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),C.a.createElement(De.a,{type:"ghost",onClick:xe},"\u53D6\u6D88")))};function de(pe){var re=pe.value,xe=pe.onChange,ye=pe.mode,Q=pe.options,we=Q===void 0?{}:Q,Z=Object(B.useRef)(),j=Object(B.useState)(),Ae=Object(Y.a)(j,2),oe=Ae[0],K=Ae[1];return Object(B.useEffect)(function(){if(oe){function z(te){var G=te.getValue();xe&&xe(G)}return oe.on("change",z),function(){oe.off("change",z)}}},[oe,xe]),Object(B.useEffect)(function(){oe&&oe.setOption("mode",ye)},[oe,ye]),Object(B.useEffect)(function(){oe&&((re!==oe.getValue()||re==="")&&setTimeout(function(){oe.setValue(re||" ")},300))},[oe,re]),Object(B.useEffect)(function(){if(Z.current&&!oe){var z=M.a.fromTextArea(Z.current,Object(q.a)({mode:ye,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},we));K(z)}},[Z.current,oe]),C.a.createElement("div",{className:"my-codemirror-container"},C.a.createElement("textarea",{ref:Z}))}},"7ixt":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q={adjustX:1,adjustY:1},ke=[0,0],Ee={left:{points:["cr","cl"],overflow:q,offset:[-4,0],targetOffset:ke},right:{points:["cl","cr"],overflow:q,offset:[4,0],targetOffset:ke},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:ke},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:ke},topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:ke},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0],targetOffset:ke},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:ke},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0],targetOffset:ke},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:ke},rightBottom:{points:["bl","br"],overflow:q,offset:[4,0],targetOffset:ke},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:ke},leftBottom:{points:["br","bl"],overflow:q,offset:[-4,0],targetOffset:ke}},De=Ee},"815F":function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return Y}),h.d(Ce,"c",function(){return F}),h.d(Ce,"d",function(){return B}),h.d(Ce,"a",function(){return E}),h.d(Ce,"f",function(){return M}),h.d(Ce,"b",function(){return S});var q=h("KQm4"),ke=h("VTBJ"),Ee=h("Ff2n"),De=h("Zm9Q"),ge=h("Kwbf"),ue=h("OZM5");function Y(w,P){return w!=null?w:P}function J(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=new Map;function g(y){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(y||[]).forEach(function(W){var de=W.key,pe=W.children;Object(ge.a)(de!=null,"Tree node must have a certain key: [".concat(O).concat(de,"]"));var re=String(de);Object(ge.a)(!P.has(re)||de===null||de===void 0,"Same 'key' exist in the Tree: ".concat(re)),P.set(re,!0),g(pe,"".concat(O).concat(re," > "))})}g(w)}function F(w){function P(g){var y=Object(De.a)(g);return y.map(function(O){if(!Object(ue.i)(O))return Object(ge.a)(!O,"Tree/TreeNode can only accept TreeNode as children."),null;var W=O.key,de=O.props,pe=de.children,re=Object(Ee.a)(de,["children"]),xe=Object(ke.a)({key:W},re),ye=P(pe);return ye.length&&(xe.children=ye),xe}).filter(function(O){return O})}return P(w)}function B(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],g=new Set(P===!0?[]:P),y=[];function O(W){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return W.map(function(pe,re){var xe=Object(ue.h)(de?de.pos:"0",re),ye=Y(pe.key,xe),Q=Object(ke.a)(Object(ke.a)({},pe),{},{parent:de,pos:xe,children:null,data:pe,isStart:[].concat(Object(q.a)(de?de.isStart:[]),[re===0]),isEnd:[].concat(Object(q.a)(de?de.isEnd:[]),[re===W.length-1])});return y.push(Q),P===!0||g.has(ye)?Q.children=O(pe.children||[],Q):Q.children=[],Q})}return O(w),y}function C(w,P,g){var y;g?typeof g=="string"?y=function(de){return de[g]}:typeof g=="function"&&(y=function(de){return g(de)}):y=function(de,pe){return Y(de.key,pe)};function O(W,de,pe){var re=W?W.children:w,xe=W?Object(ue.h)(pe.pos,de):"0";if(W){var ye=y(W,xe),Q={node:W,index:de,pos:xe,key:ye,parentPos:pe.node?pe.pos:null,level:pe.level+1};P(Q)}re&&re.forEach(function(we,Z){O(we,Z,{node:W,pos:xe,level:pe?pe.level+1:-1})})}O(null)}function E(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=P.initWrapper,y=P.processEntity,O=P.onProcessFinished,W=arguments.length>2?arguments[2]:void 0,de={},pe={},re={posEntities:de,keyEntities:pe};return g&&(re=g(re)||re),C(w,function(xe){var ye=xe.node,Q=xe.index,we=xe.pos,Z=xe.key,j=xe.parentPos,Ae=xe.level,oe={node:ye,index:Q,key:Z,pos:we,level:Ae},K=Y(Z,we);de[we]=oe,pe[K]=oe,oe.parent=de[j],oe.parent&&(oe.parent.children=oe.parent.children||[],oe.parent.children.push(oe)),y&&y(oe,re)},W),O&&O(re),re}function M(w,P){var g=P.expandedKeys,y=P.selectedKeys,O=P.loadedKeys,W=P.loadingKeys,de=P.checkedKeys,pe=P.halfCheckedKeys,re=P.dragOverNodeKey,xe=P.dropPosition,ye=P.keyEntities,Q=ye[w],we={eventKey:w,expanded:g.indexOf(w)!==-1,selected:y.indexOf(w)!==-1,loaded:O.indexOf(w)!==-1,loading:W.indexOf(w)!==-1,checked:de.indexOf(w)!==-1,halfChecked:pe.indexOf(w)!==-1,pos:String(Q?Q.pos:""),dragOver:re===w&&xe===0,dragOverGapTop:re===w&&xe===-1,dragOverGapBottom:re===w&&xe===1};return we}function S(w){var P=w.data,g=w.expanded,y=w.selected,O=w.checked,W=w.loaded,de=w.loading,pe=w.halfChecked,re=w.dragOver,xe=w.dragOverGapTop,ye=w.dragOverGapBottom,Q=w.pos,we=w.active,Z=Object(ke.a)(Object(ke.a)({},P),{},{expanded:g,selected:y,checked:O,loaded:W,loading:de,halfChecked:pe,dragOver:re,dragOverGapTop:xe,dragOverGapBottom:ye,pos:Q,active:we});return"props"in Z||Object.defineProperty(Z,"props",{get:function(){return Object(ge.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),w}}),Z}},"8EBN":function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";q.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 ke=0;ke<q.modeInfo.length;ke++){var Ee=q.modeInfo[ke];Ee.mimes&&(Ee.mime=Ee.mimes[0])}q.findModeByMIME=function(De){De=De.toLowerCase();for(var ge=0;ge<q.modeInfo.length;ge++){var ue=q.modeInfo[ge];if(ue.mime==De)return ue;if(ue.mimes){for(var Y=0;Y<ue.mimes.length;Y++)if(ue.mimes[Y]==De)return ue}}if(/\+xml$/.test(De))return q.findModeByMIME("application/xml");if(/\+json$/.test(De))return q.findModeByMIME("application/json")},q.findModeByExtension=function(De){De=De.toLowerCase();for(var ge=0;ge<q.modeInfo.length;ge++){var ue=q.modeInfo[ge];if(ue.ext){for(var Y=0;Y<ue.ext.length;Y++)if(ue.ext[Y]==De)return ue}}},q.findModeByFileName=function(De){for(var ge=0;ge<q.modeInfo.length;ge++){var ue=q.modeInfo[ge];if(ue.file&&ue.file.test(De))return ue}var Y=De.lastIndexOf("."),J=Y>-1&&De.substring(Y+1,De.length);if(J)return q.findModeByExtension(J)},q.findModeByName=function(De){De=De.toLowerCase();for(var ge=0;ge<q.modeInfo.length;ge++){var ue=q.modeInfo[ge];if(ue.name.toLowerCase()==De)return ue;if(ue.alias){for(var Y=0;Y<ue.alias.length;Y++)if(ue.alias[Y].toLowerCase()==De)return ue}}}})},"8HAY":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return ue}),h.d(Ce,"b",function(){return Y});var q=h("pmY6"),ke=h("MI8n"),Ee=function(){var J=function(F,B){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var M in E)E.hasOwnProperty(M)&&(C[M]=E[M])},J(F,B)};return function(F,B){J(F,B);function C(){this.constructor=F}F.prototype=B===null?Object.create(B):(C.prototype=B.prototype,new C)}}(),De=function(J,F,B,C){function E(M){return M instanceof B?M:new B(function(S){S(M)})}return new(B||(B=Promise))(function(M,S){function w(y){try{g(C.next(y))}catch(O){S(O)}}function P(y){try{g(C.throw(y))}catch(O){S(O)}}function g(y){y.done?M(y.value):E(y.value).then(w,P)}g((C=C.apply(J,F||[])).next())})},ge=function(J,F){var B={label:0,sent:function(){if(M[0]&1)throw M[1];return M[1]},trys:[],ops:[]},C,E,M,S;return S={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function w(g){return function(y){return P([g,y])}}function P(g){if(C)throw new TypeError("Generator is already executing.");for(;B;)try{if(C=1,E&&(M=g[0]&2?E.return:g[0]?E.throw||((M=E.return)&&M.call(E),0):E.next)&&!(M=M.call(E,g[1])).done)return M;(E=0,M)&&(g=[g[0]&2,M.value]);switch(g[0]){case 0:case 1:M=g;break;case 4:return B.label++,{value:g[1],done:!1};case 5:B.label++,E=g[1],g=[0];continue;case 7:g=B.ops.pop(),B.trys.pop();continue;default:if(!(M=B.trys,M=M.length>0&&M[M.length-1])&&(g[0]===6||g[0]===2)){B=0;continue}if(g[0]===3&&(!M||g[1]>M[0]&&g[1]<M[3])){B.label=g[1];break}if(g[0]===6&&B.label<M[1]){B.label=M[1],M=g;break}if(M&&B.label<M[2]){B.label=M[2],B.ops.push(g);break}M[2]&&B.ops.pop(),B.trys.pop();continue}g=F.call(J,B)}catch(y){g=[6,y],E=0}finally{C=M=0}if(g[0]&5)throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}},ue=function(J){Ee(F,J);function F(B,C,E,M,S){C===void 0&&(C=""),E===void 0&&(E=""),M===void 0&&(M=!0);var w=J.call(this)||this;return w._onDidChange=w._register(new ke.a),w.onDidChange=w._onDidChange.event,w._enabled=!0,w._checked=!1,w._id=B,w._label=C,w._cssClass=E,w._enabled=M,w._actionCallback=S,w}return Object.defineProperty(F.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(F.prototype,"label",{get:function(){return this._label},set:function(B){this._setLabel(B)},enumerable:!0,configurable:!0}),F.prototype._setLabel=function(B){this._label!==B&&(this._label=B,this._onDidChange.fire({label:B}))},Object.defineProperty(F.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(B){this._setTooltip(B)},enumerable:!0,configurable:!0}),F.prototype._setTooltip=function(B){this._tooltip!==B&&(this._tooltip=B,this._onDidChange.fire({tooltip:B}))},Object.defineProperty(F.prototype,"class",{get:function(){return this._cssClass},set:function(B){this._setClass(B)},enumerable:!0,configurable:!0}),F.prototype._setClass=function(B){this._cssClass!==B&&(this._cssClass=B,this._onDidChange.fire({class:B}))},Object.defineProperty(F.prototype,"enabled",{get:function(){return this._enabled},set:function(B){this._setEnabled(B)},enumerable:!0,configurable:!0}),F.prototype._setEnabled=function(B){this._enabled!==B&&(this._enabled=B,this._onDidChange.fire({enabled:B}))},Object.defineProperty(F.prototype,"checked",{get:function(){return this._checked},set:function(B){this._setChecked(B)},enumerable:!0,configurable:!0}),F.prototype._setChecked=function(B){this._checked!==B&&(this._checked=B,this._onDidChange.fire({checked:B}))},F.prototype.run=function(B,C){return this._actionCallback?this._actionCallback(B):Promise.resolve(!0)},F}(q.a),Y=function(J){Ee(F,J);function F(){var B=J!==null&&J.apply(this,arguments)||this;return B._onDidBeforeRun=B._register(new ke.a),B.onDidBeforeRun=B._onDidBeforeRun.event,B._onDidRun=B._register(new ke.a),B.onDidRun=B._onDidRun.event,B}return F.prototype.run=function(B,C){return De(this,void 0,void 0,function(){var E,M;return ge(this,function(S){switch(S.label){case 0:if(!B.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:B}),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,this.runAction(B,C)];case 2:return E=S.sent(),this._onDidRun.fire({action:B,result:E}),[3,4];case 3:return M=S.sent(),this._onDidRun.fire({action:B,error:M}),[3,4];case 4:return[2]}})})},F.prototype.runAction=function(B,C){var E=C?B.run(C):B.run();return Promise.resolve(E)},F}(q.a)},"8Jsi":function(mt,Ce,h){"use strict";h.d(Ce,"d",function(){return j}),h.d(Ce,"a",function(){return D}),h.d(Ce,"b",function(){return L}),h.d(Ce,"c",function(){return $});var q=h("1OyB"),ke=h("vuIU"),Ee=h("Ji7U"),De=h("LK+K"),ge=h("KQm4"),ue=h("U8pU"),Y=h("ODXe"),J=h("VTBJ"),F=h("q1tI"),B=h("qNPg"),C=h("2Qr1"),E=h("815F"),M=h("NvD2"),S=h("wPlo"),w=h("6cGi"),P=h("Kwbf"),g=h("4IlW"),y=h("YrtM"),O=h("fAei"),W=F.createContext(null);function de(Oe,Fe){if(!Oe)return!0;var Be=Oe.data,Ge=Be.disabled,Ye=Be.disableCheckbox;switch(Fe){case"select":return Ge;case"checkbox":return Ge||Ye}return!1}function pe(Oe,Fe){var Be=F.useCallback(function(Ye){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Le=arguments.length>2?arguments[2]:void 0,Ve=Oe.get(Ye);return!Le&&de(Ve,Xe)?null:Ve},[Oe]),Ge=F.useCallback(function(Ye){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Le=arguments.length>2?arguments[2]:void 0,Ve=Fe.get(Ye);return!Le&&de(Ve,Xe)?null:Ve},[Fe]);return[Be,Ge]}function re(Oe){return F.useMemo(function(){var Fe=new Map,Be=new Map;return Oe.forEach(function(Ge){Fe.set(Ge.key,Ge),Be.set(Ge.data.value,Ge)}),[Fe,Be]},[Oe])}var xe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ye=function(Fe,Be){var Ge=Fe.prefixCls,Ye=Fe.height,Xe=Fe.itemHeight,Le=Fe.virtual,Ve=Fe.options,et=Fe.flattenOptions,_e=Fe.multiple,Ke=Fe.searchValue,me=Fe.onSelect,se=Fe.onToggleOpen,ve=Fe.open,R=Fe.notFoundContent,U=Fe.onMouseEnter,ee=F.useContext(W),ce=ee.checkable,je=ee.checkedKeys,Se=ee.halfCheckedKeys,qe=ee.treeExpandedKeys,at=ee.treeDefaultExpandAll,st=ee.treeDefaultExpandedKeys,lt=ee.onTreeExpand,St=ee.treeIcon,Ot=ee.showTreeIcon,dt=ee.switcherIcon,Ht=ee.treeLine,Nt=ee.treeNodeFilterProp,At=ee.loadData,kt=ee.treeLoadedKeys,Lt=ee.treeMotion,zt=ee.onTreeLoad,rn=F.useRef(),bt=Object(y.a)(function(){return Ve},[ve,Ve],function(ut,$e){return $e[0]&&ut[1]!==$e[1]}),Et=re(et),it=Object(Y.a)(Et,2),xt=it[0],Wt=it[1],Ut=pe(xt,Wt),Xt=Object(Y.a)(Ut,2),_t=Xt[0],vt=Xt[1],ln=F.useMemo(function(){return je.map(function(ut){var $e=vt(ut);return $e?$e.key:null})},[je]),An=F.useMemo(function(){return ce?{checked:ln,halfChecked:Se}:null},[ln,Se,ce]);F.useEffect(function(){if(ve&&!_e&&ln.length){var ut;(ut=rn.current)===null||ut===void 0||ut.scrollTo({key:ln[0]})}},[ve]);var En=String(Ke).toLowerCase(),jt=function($e){return En?String($e[Nt]).toLowerCase().includes(En):!1},gn=F.useState(st),fn=Object(Y.a)(gn,2),Vn=fn[0],Je=fn[1],ht=F.useState(null),It=Object(Y.a)(ht,2),Kt=It[0],Jt=It[1],qt=F.useMemo(function(){return qe?Object(ge.a)(qe):Ke?Kt:Vn},[Vn,Kt,En,qe]);F.useEffect(function(){Ke&&Jt(et.map(function(ut){return ut.key}))},[Ke]);var c=function($e){Je($e),Jt($e),lt&&lt($e)},o=function($e){$e.preventDefault()},a=function($e,Ct){var gt=Ct.node.key,Bt=_t(gt,ce?"checkbox":"select");Bt!==null&&me(Bt.data.value,{selected:!je.includes(Bt.data.value)}),_e||se(!1)},l=F.useState(null),f=Object(Y.a)(l,2),d=f[0],he=f[1],Ze=_t(d);if(F.useImperativeHandle(Be,function(){return{onKeyDown:function($e){var Ct,gt=$e.which;switch(gt){case g.a.UP:case g.a.DOWN:case g.a.LEFT:case g.a.RIGHT:(Ct=rn.current)===null||Ct===void 0||Ct.onKeyDown($e);break;case g.a.ENTER:{Ze!==null&&a(null,{node:{key:d},selected:!je.includes(Ze.data.value)});break}case g.a.ESC:se(!1)}},onKeyUp:function(){}}}),bt.length===0)return F.createElement("div",{role:"listbox",className:"".concat(Ge,"-empty"),onMouseDown:o},R);var rt={};return kt&&(rt.loadedKeys=kt),qt&&(rt.expandedKeys=qt),F.createElement("div",{onMouseDown:o,onMouseEnter:U},Ze&&ve&&F.createElement("span",{style:xe,"aria-live":"assertive"},Ze.data.value),F.createElement(O.b,Object.assign({ref:rn,focusable:!1,prefixCls:"".concat(Ge,"-tree"),treeData:bt,height:Ye,itemHeight:Xe,virtual:Le,multiple:_e,icon:St,showIcon:Ot,switcherIcon:dt,showLine:Ht,loadData:Ke?null:At,motion:Lt,checkable:ce,checkStrictly:!0,checkedKeys:An,selectedKeys:ce?[]:ln,defaultExpandAll:at},rt,{onActiveChange:he,onSelect:a,onCheck:a,onExpand:c,onLoad:zt,filterTreeNode:jt})))},Q=F.forwardRef(ye);Q.displayName="OptionList";var we=Q,Z=function(){return null},j=Z,Ae=h("Ff2n"),oe=h("Zm9Q");function K(Oe){return Object(oe.a)(Oe).map(function(Fe){if(!F.isValidElement(Fe)||!Fe.type)return null;var Be=Fe.key,Ge=Fe.props,Ye=Ge.children,Xe=Ge.value,Le=Object(Ae.a)(Ge,["children","value"]),Ve=Object(J.a)({key:Be,value:Xe},Le),et=K(Ye);return et.length&&(Ve.children=et),Ve}).filter(function(Fe){return Fe})}function z(Oe){if(!Oe)return Oe;var Fe=Object(J.a)({},Oe);return"props"in Fe||Object.defineProperty(Fe,"props",{get:function(){return Object(P.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),Fe}}),Fe}function te(Oe,Fe,Be,Ge,Ye){var Xe=null,Le=null;function Ve(){function et(_e){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return _e.map(function(se,ve){var R="".concat(Ke,"-").concat(ve),U=Be.includes(se.value),ee=et(se.children||[],R,U),ce=F.createElement(j,Object.assign({},se),ee.map(function(Se){return Se.node}));if(Fe===se.value&&(Xe=ce),U){var je={pos:R,node:ce,children:ee};return me||Le.push(je),je}return null}).filter(function(se){return se})}Le||(Le=[],et(Ge),Le.sort(function(_e,Ke){var me=_e.node.props.value,se=Ke.node.props.value,ve=Be.indexOf(me),R=Be.indexOf(se);return ve-R}))}Object.defineProperty(Oe,"triggerNode",{get:function(){return Object(P.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Ve(),Xe}}),Object.defineProperty(Oe,"allCheckedNodes",{get:function(){return Object(P.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Ve(),Ye?Le:Le.map(function(_e){var Ke=_e.node;return Ke})}})}function G(Oe){return Array.isArray(Oe)?Oe:Oe!==void 0?[Oe]:[]}function V(Oe,Fe){var Be=new Map;return Fe.forEach(function(Ge){var Ye=Ge.data;Be.set(Ye.value,Ye)}),Oe.map(function(Ge){return z(Be.get(Ge))})}function m(Oe,Fe){var Be=V([Oe],Fe)[0];return Be?Be.disabled:!1}function p(Oe){return Oe.disabled||Oe.disableCheckbox||Oe.checkable===!1}function H(Oe){for(var Fe=Oe.parent,Be=0,Ge=Fe;Ge;)Ge=Ge.parent,Be+=1;return Be}function ae(Oe){function Fe(Ge){return(Ge||[]).map(function(Ye){var Xe=Ye.value,Le=Ye.key,Ve=Ye.children,et=Object(J.a)(Object(J.a)({},Ye),{},{key:"key"in Ye?Le:Xe});return Ve&&(et.children=Fe(Ve)),et})}var Be=Object(E.d)(Fe(Oe),!0);return Be.map(function(Ge){return{key:Ge.data.key,data:Ge.data,level:H(Ge)}})}function Te(Oe){return function(Fe,Be){var Ge=Be[Oe];return String(Ge).toLowerCase().includes(String(Fe).toLowerCase())}}function We(Oe,Fe,Be){var Ge=Be.optionFilterProp,Ye=Be.filterOption;if(Ye===!1)return Fe;var Xe;typeof Ye=="function"?Xe=Ye:Xe=Te(Ge);function Le(Ve){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ve.map(function(_e){var Ke=_e.children,me=et||Xe(Oe,z(_e)),se=Le(Ke||[],me);return me||se.length?Object(J.a)(Object(J.a)({},_e),{},{children:se}):null}).filter(function(_e){return _e})}return Le(Fe)}function Re(Oe,Fe,Be,Ge){var Ye=new Map;return G(Fe).forEach(function(Xe){Xe&&Object(ue.a)(Xe)==="object"&&"value"in Xe&&Ye.set(Xe.value,Xe)}),Oe.map(function(Xe){var Le={value:Xe},Ve=Be(Xe,"select",!0),et=Ve?Ge(Ve.data):Xe;if(Ye.has(Xe)){var _e=Ye.get(Xe);Le.label="label"in _e?_e.label:et,"halfChecked"in _e&&(Le.halfChecked=_e.halfChecked)}else Le.label=et;return Le})}function Pe(Oe,Fe){var Be=new Set(Oe);return Be.add(Fe),Array.from(Be)}function ne(Oe,Fe){var Be=new Set(Oe);return Be.delete(Fe),Array.from(Be)}function _(Oe){var Fe=Oe.searchPlaceholder,Be=Oe.treeCheckStrictly,Ge=Oe.treeCheckable,Ye=Oe.labelInValue,Xe=Oe.value,Le=Oe.multiple;Object(P.a)(!Fe,"`searchPlaceholder` has been removed."),Be&&Ye===!1&&Object(P.a)(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(Ye||Be)&&Object(P.a)(G(Xe).every(function(Ve){return Ve&&Object(ue.a)(Ve)==="object"&&"value"in Ve}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),Be||Le||Ge?Object(P.a)(!Xe||Array.isArray(Xe),"`value` should be an array when `TreeSelect` is checkable or multiple."):Object(P.a)(!Array.isArray(Xe),"`value` should not be array when `TreeSelect` is single mode.")}var X=_,N=10;function I(Oe,Fe){var Be=Fe.id,Ge=Fe.pId,Ye=Fe.rootPId,Xe={},Le=[],Ve=Oe.map(function(et){var _e=Object(J.a)({},et),Ke=_e[Be];return Xe[Ke]=_e,_e.key=_e.key||Ke,_e});return Ve.forEach(function(et){var _e=et[Ge],Ke=Xe[_e];Ke&&(Ke.children=Ke.children||[],Ke.children.push(et)),(_e===Ye||!Ke&&Ye===null)&&Le.push(et)}),Le}function x(Oe,Fe){var Be=0,Ge=new Set;function Ye(Xe){return(Xe||[]).map(function(Le){var Ve=Le.key,et=Le.value,_e=Le.children,Ke=Object(Ae.a)(Le,["key","value","children"]),me="value"in Le?et:Ve,se=Object(J.a)(Object(J.a)({},Ke),{},{key:Ve!=null?Ve:me,value:me,title:Fe(Le)});return"children"in Le&&(se.children=Ye(_e)),se})}return Ye(Oe)}function k(Oe,Fe,Be){var Ge=Be.getLabelProp,Ye=Be.simpleMode,Xe=F.useRef({});return Oe?(Xe.current.formatTreeData=Xe.current.treeData===Oe?Xe.current.formatTreeData:x(Ye?I(Oe,Object(J.a)({id:"id",pId:"pId",rootPId:null},Ye!==!0?Ye:{})):Oe,Ge),Xe.current.treeData=Oe):Xe.current.formatTreeData=Xe.current.children===Fe?Xe.current.formatTreeData:x(K(Fe),Ge),Xe.current.formatTreeData}var D="SHOW_ALL",$="SHOW_PARENT",L="SHOW_CHILD";function A(Oe,Fe,Be){var Ge=new Set(Oe);return Fe===L?Oe.filter(function(Ye){var Xe=Be[Ye];return!(Xe&&Xe.children&&Xe.children.every(function(Le){var Ve=Le.node;return p(Ve)||Ge.has(Ve.key)}))}):Fe===$?Oe.filter(function(Ye){var Xe=Be[Ye],Le=Xe?Xe.parent:null;return!(Le&&!p(Le.node)&&Ge.has(Le.node.key))}):Oe}function ie(Oe,Fe){var Be=Fe.value,Ge=Fe.getEntityByValue,Ye=Fe.getEntityByKey,Xe=Fe.treeConduction,Le=Fe.showCheckedStrategy,Ve=Fe.conductKeyEntities,et=Fe.getLabelProp;return F.useMemo(function(){var _e=Oe;if(Xe){var Ke=A(Oe.map(function(me){var se=Ge(me);return se?se.key:me}),Le,Ve);_e=Ke.map(function(me){var se=Ye(me);return se?se.data.value:me})}return Re(_e,Be,Ge,et)},[Oe,Be,Xe,Le,Ge])}var be=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],Me=Object(B.a)({prefixCls:"rc-tree-select",components:{optionList:we},convertChildrenToData:function(){return null},flattenOptions:ae,getLabeledValue:C.e,filterOptions:We,isValueDisabled:m,findValueOption:V,omitDOMProps:function(Fe){var Be=Object(J.a)({},Fe);return be.forEach(function(Ge){delete Be[Ge]}),Be}});Me.displayName="Select";var Ue=F.forwardRef(function(Oe,Fe){var Be=Oe.multiple,Ge=Oe.treeCheckable,Ye=Oe.treeCheckStrictly,Xe=Oe.showCheckedStrategy,Le=Xe===void 0?"SHOW_CHILD":Xe,Ve=Oe.labelInValue,et=Oe.loadData,_e=Oe.treeLoadedKeys,Ke=Oe.treeNodeFilterProp,me=Ke===void 0?"value":Ke,se=Oe.treeNodeLabelProp,ve=Oe.treeDataSimpleMode,R=Oe.treeData,U=Oe.treeExpandedKeys,ee=Oe.treeDefaultExpandedKeys,ce=Oe.treeDefaultExpandAll,je=Oe.children,Se=Oe.treeIcon,qe=Oe.showTreeIcon,at=Oe.switcherIcon,st=Oe.treeLine,lt=Oe.treeMotion,St=Oe.filterTreeNode,Ot=Oe.dropdownPopupAlign,dt=Oe.onChange,Ht=Oe.onTreeExpand,Nt=Oe.onTreeLoad,At=Oe.onDropdownVisibleChange,kt=Oe.onSelect,Lt=Oe.onDeselect,zt=Ge||Ye,rn=Be||zt,bt=Ge&&!Ye,Et=Ye||Ve,it=F.useRef(null);F.useImperativeHandle(Fe,function(){return{focus:it.current.focus,blur:it.current.blur}});var xt=function(gt){return R&&gt.label||gt.title},Wt=function(gt){return se?gt[se]:xt(gt)},Ut=k(R,je,{getLabelProp:xt,simpleMode:ve}),Xt=Object(F.useMemo)(function(){return ae(Ut)},[Ut]),_t=re(Xt),vt=Object(Y.a)(_t,2),ln=vt[0],An=vt[1],En=pe(ln,An),jt=Object(Y.a)(En,2),gn=jt[0],fn=jt[1],Vn=Object(F.useMemo)(function(){return bt?Object(E.a)(Ut):{keyEntities:null}},[Ut,Ge,Ye]),Je=Vn.keyEntities,ht=Object(w.a)(Oe.defaultValue,{value:Oe.value}),It=Object(Y.a)(ht,2),Kt=It[0],Jt=It[1],qt=function(gt){var Bt=[],yn=[];return gt.forEach(function(cn){fn(cn)?yn.push(cn):Bt.push(cn)}),{missingRawValues:Bt,existRawValues:yn}},c=Object(F.useMemo)(function(){var Ct=[],gt=[];if(G(Kt).forEach(function(en){if(en&&Object(ue.a)(en)==="object"&&"value"in en)if(en.halfChecked&&Ye){var bn=fn(en.value);Ct.push(bn?bn.key:en.value)}else gt.push(en.value);else gt.push(en)}),bt){var Bt=qt(gt),yn=Bt.missingRawValues,cn=Bt.existRawValues,on=cn.map(function(en){return fn(en).key}),kn=Object(M.a)(on,!0,Je),Xn=kn.checkedKeys,wn=kn.halfCheckedKeys;return[[].concat(Object(ge.a)(yn),Object(ge.a)(Xn.map(function(en){return gn(en).data.value}))),wn]}return[gt,Ct]},[Kt,rn,Et,Ge,Ye]),o=Object(Y.a)(c,2),a=o[0],l=o[1],f=ie(a,{treeConduction:bt,value:Kt,showCheckedStrategy:Le,conductKeyEntities:Je,getEntityByValue:fn,getEntityByKey:gn,getLabelProp:Wt}),d=function(gt,Bt,yn){if(Jt(rn?gt:gt[0]),dt){var cn=gt;if(bt&&Le!=="SHOW_ALL"){var on=gt.map(function(Tn){var Bn=fn(Tn);return Bn?Bn.key:Tn}),kn=A(on,Le,Je);cn=kn.map(function(Tn){var Bn=gn(Tn);return Bn?Bn.data.value:Tn})}var Xn=Bt||{triggerValue:void 0,selected:void 0},wn=Xn.triggerValue,en=Xn.selected,bn=Et?Re(cn,Kt,fn,Wt):cn;if(Ye){var Qn=l.map(function(Tn){var Bn=gn(Tn);return Bn?Bn.data.value:Tn}).filter(function(Tn){return!cn.includes(Tn)});bn=[].concat(Object(ge.a)(bn),Object(ge.a)(Re(Qn,Kt,fn,Wt)))}var Sn={preValue:f,triggerValue:wn},ci=!0;(Ye||yn==="selection"&&!en)&&(ci=!1),te(Sn,wn,gt,Ut,ci),zt?Sn.checked=en:Sn.selected=en,dt(rn?bn:bn[0],Et?null:cn.map(function(Tn){var Bn=fn(Tn);return Bn?Wt(Bn.data):null}),Sn)}},he=function(gt,Bt,yn){var cn=gt;if(!rn)d([gt],{selected:!0,triggerValue:gt},yn);else{var on=Pe(a,gt);if(bt){var kn=qt(on),Xn=kn.missingRawValues,wn=kn.existRawValues,en=wn.map(function(Sn){return fn(Sn).key}),bn=Object(M.a)(en,!0,Je),Qn=bn.checkedKeys;on=[].concat(Object(ge.a)(Xn),Object(ge.a)(Qn.map(function(Sn){return gn(Sn).data.value})))}d(on,{selected:!0,triggerValue:gt},yn)}kt&&kt(cn,Bt)},Ze=function(gt,Bt,yn){var cn=gt,on=ne(a,gt);if(bt){var kn=qt(on),Xn=kn.missingRawValues,wn=kn.existRawValues,en=wn.map(function(Sn){return fn(Sn).key}),bn=Object(M.a)(en,{checked:!1,halfCheckedKeys:l},Je),Qn=bn.checkedKeys;on=[].concat(Object(ge.a)(Xn),Object(ge.a)(Qn.map(function(Sn){return gn(Sn).data.value})))}d(on,{selected:!1,triggerValue:gt},yn),Lt&&Lt(cn,Bt)},rt=function(){d([],null,"clear")},ut=F.useCallback(function(Ct){if(At){var gt={};Object.defineProperty(gt,"documentClickClose",{get:function(){return Object(P.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),At(Ct,gt)}},[At]),$e={optionLabelProp:null,optionFilterProp:me,dropdownAlign:Ot,internalProps:{mark:S.a,onClear:rt,skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:he,onRawDeselect:Ze}};return"filterTreeNode"in Oe&&($e.filterOption=St),F.createElement(W.Provider,{value:{checkable:zt,loadData:et,treeLoadedKeys:_e,onTreeLoad:Nt,checkedKeys:a,halfCheckedKeys:l,treeDefaultExpandAll:ce,treeExpandedKeys:U,treeDefaultExpandedKeys:ee,onTreeExpand:Ht,treeIcon:Se,treeMotion:lt,showTreeIcon:qe,switcherIcon:at,treeLine:st,treeNodeFilterProp:me}},F.createElement(Me,Object.assign({ref:it,mode:rn?"multiple":null},Oe,$e,{value:f,labelInValue:!0,options:Ut,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:ut})))}),ze=function(Oe){Object(Ee.a)(Be,Oe);var Fe=Object(De.a)(Be);function Be(){var Ge;return Object(q.a)(this,Be),Ge=Fe.apply(this,arguments),Ge.selectRef=F.createRef(),Ge.focus=function(){Ge.selectRef.current.focus()},Ge.blur=function(){Ge.selectRef.current.blur()},Ge}return Object(ke.a)(Be,[{key:"render",value:function(){return F.createElement(Ue,Object.assign({ref:this.selectRef},this.props))}}]),Be}(F.Component);ze.TreeNode=j,ze.SHOW_ALL=D,ze.SHOW_PARENT=$,ze.SHOW_CHILD=L;var He=ze,nt=Ce.e=He},"8hTe":function(mt,Ce,h){mt.exports={button:"button___1wy9m"}},"8pgt":function(mt,Ce,h){mt.exports={flexRow:"flexRow___2kcn2",flexColumn:"flexColumn___2bS_0",formWrap:"formWrap___3t-wi",example:"example___2J2YZ",footerWrap:"footerWrap___3u6gg"}},"9Bee":function(mt,Ce,h){"use strict";var q=h("DYRE"),ke=h("zeV3"),Ee=h("+L6B"),De=h("2/Rp"),ge=h("k1fw"),ue=h("9og8"),Y=h("tJVT"),J=h("WmNS"),F=h.n(J),B=h("q1tI"),C=h.n(B),E=h("vg9a"),M=h("DlQD"),S=h.n(M),w=h("rUJ1");function P(c,o){var a=c.match(/^(\s+)(?:```)/);if(a===null)return o;var l=a[1];return o.split(`
`).map(function(f){var d=f.match(/^\s+/);if(d===null)return f;var he=Object(Y.a)(d,1),Ze=he[0];return Ze.length>=l.length?f.slice(l.length):f}).join(`
`)}var g=[],y=["<ul>"],O=new S.a.Renderer,W=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function de(){g.length=0,y=["<ul>"]}var pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function re(c,o,a,l){if(o>=c.length||c[o].level<=a)return o;var f=c[o];l.push("<li><a href='#"+f.anchor+"'>"+f.text+"</a>"),o++;var d=[];return o=re(c,o,f.level,d),d.length>0&&(l.push("<ul>"),d.forEach(function(he){l.push(he)}),l.push("</ul>")),l.push("</li>"),o=re(c,o,a,l),o}function xe(){return re(g,0,0,y),y.push("</ul>"),y.join("")}var ye={heading:function(o){var a=W.exec(o);if(a)return{type:"heading",raw:a[0],depth:a[1].length,text:a[2]}},fences:function(o){var a=this.rules.block.fences.exec(o);if(a){var l=a[0],f=P(l,a[3]||""),d=a[2]?a[2].trim():a[2];if(["latex","katex","math"].indexOf(d)>=0){var he=Z(),Ze=f;f=he,j[he]={type:"block",expression:Ze}}return{type:"code",raw:l,lang:d,text:f}}}},Q=/(?:\${2})([^\n`]+?)(?:\${2})/gi,we=0,Z=function(){return"__special_katext_id_".concat(we++,"__")},j={};function Ae(){return j}function oe(){we=0,j={}}function K(c){return c=c.replace(Q,function(o,a){var l=Z();return j[l]={type:"inline",expression:a},l}),c}var z=O.listitem;O.listitem=function(c){return z(K(c))};var te=O.paragraph;O.paragraph=function(c){return te(K(c))};var G=O.tablecell;O.tablecell=function(c,o){return G(K(c),o)},O.code=function(c,o,a){var l=(o||"").match(/\S*/)[0];return l?["latex","katex","math"].indexOf(l)>=0?"<p class='editormd-tex'>".concat(c,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(o,'">').concat(a?c:Object(w.escape)(c,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(a?c:Object(w.escape)(c,!0))+"</code></pre>"},O.heading=function(c,o,a){var l=this.options.headerPrefix+a.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:l,level:o,text:c}),"<h"+o+' id="'+l+'">'+c+"</h"+o+">"},S.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),S.a.use({tokenizer:ye,renderer:O});var V=S.a,m=h("SJMd"),p=h("ulZh"),H=h.n(p),ae=h("m3rI"),Te=h("Oy/b"),We=h("p5ED"),Re=h("ErOA");/*! *****************************************************************************
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 Pe=function(c,o){return(Pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(a[f]=l[f])})(c,o)};function ne(c,o){function a(){this.constructor=c}Pe(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function _(c,o,a,l){return new(a||(a=Promise))(function(f,d){function he(ut){try{rt(l.next(ut))}catch($e){d($e)}}function Ze(ut){try{rt(l.throw(ut))}catch($e){d($e)}}function rt(ut){var $e;ut.done?f(ut.value):($e=ut.value,$e instanceof a?$e:new a(function(Ct){Ct($e)})).then(he,Ze)}rt((l=l.apply(c,o||[])).next())})}function X(c,o){var a,l,f,d,he={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function Ze(rt){return function(ut){return function($e){if(a)throw new TypeError("Generator is already executing.");for(;he;)try{if(a=1,l&&(f=2&$e[0]?l.return:$e[0]?l.throw||((f=l.return)&&f.call(l),0):l.next)&&!(f=f.call(l,$e[1])).done)return f;switch(l=0,f&&($e=[2&$e[0],f.value]),$e[0]){case 0:case 1:f=$e;break;case 4:return he.label++,{value:$e[1],done:!1};case 5:he.label++,l=$e[1],$e=[0];continue;case 7:$e=he.ops.pop(),he.trys.pop();continue;default:if(!(f=he.trys,(f=f.length>0&&f[f.length-1])||$e[0]!==6&&$e[0]!==2)){he=0;continue}if($e[0]===3&&(!f||$e[1]>f[0]&&$e[1]<f[3])){he.label=$e[1];break}if($e[0]===6&&he.label<f[1]){he.label=f[1],f=$e;break}if(f&&he.label<f[2]){he.label=f[2],he.ops.push($e);break}f[2]&&he.ops.pop(),he.trys.pop();continue}$e=o.call(c,he)}catch(Ct){$e=[6,Ct],l=0}finally{a=f=0}if(5&$e[0])throw $e[1];return{value:$e[0]?$e[1]:void 0,done:!0}}([rt,ut])}}}function N(){for(var c=0,o=0,a=arguments.length;o<a;o++)c+=arguments[o].length;var l=Array(c),f=0;for(o=0;o<a;o++)for(var d=arguments[o],he=0,Ze=d.length;he<Ze;he++,f++)l[f]=d[he];return l}var I=function(){function c(){}return c.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},c.setAttributes=function(o,a){for(var l=0,f=a;l<f.length;l++){var d=f[l],he=d[0],Ze=d[1];o.setAttribute(he,Ze)}},c.createRect=function(o,a,l){var f=document.createElementNS("http://www.w3.org/2000/svg","rect");return f.setAttribute("width",o.toString()),f.setAttribute("height",a.toString()),l&&c.setAttributes(f,l),f},c.createLine=function(o,a,l,f,d){var he=document.createElementNS("http://www.w3.org/2000/svg","line");return he.setAttribute("x1",o.toString()),he.setAttribute("y1",a.toString()),he.setAttribute("x2",l.toString()),he.setAttribute("y2",f.toString()),d&&c.setAttributes(he,d),he},c.createPolygon=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","polygon");return l.setAttribute("points",o),a&&c.setAttributes(l,a),l},c.createCircle=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","circle");return l.setAttribute("cx",(o/2).toString()),l.setAttribute("cy",(o/2).toString()),l.setAttribute("r",o.toString()),a&&c.setAttributes(l,a),l},c.createEllipse=function(o,a,l){var f=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return f.setAttribute("cx",(o/2).toString()),f.setAttribute("cy",(a/2).toString()),f.setAttribute("rx",(o/2).toString()),f.setAttribute("ry",(a/2).toString()),l&&c.setAttributes(f,l),f},c.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&c.setAttributes(a,o),a},c.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},c.createMarker=function(o,a,l,f,d,he,Ze){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return c.setAttributes(rt,[["id",o],["orient",a],["markerWidth",l.toString()],["markerHeight",f.toString()],["refX",d.toString()],["refY",he.toString()]]),rt.appendChild(Ze),rt},c.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&c.setAttributes(a,o),a},c.createTSpan=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","tspan");return l.textContent=o,a&&c.setAttributes(l,a),l},c.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&c.setAttributes(a,o),a},c.createPoint=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return l.x=o,l.y=a,l},c.createPath=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","path");return l.setAttribute("d",o),a&&c.setAttributes(l,a),l},c}(),x=function(){function c(){}return c.addKey=function(o){c.key=o},Object.defineProperty(c,"isLicensed",{get:function(){return!!c.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(c.key)},enumerable:!1,configurable:!0}),c}(),k=function(){function c(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return c.prototype.rasterize=function(o,a,l){var f=this;return new Promise(function(d){var he=l!==void 0?l:document.createElement("canvas");o===null&&(f.markersOnly=!0,f.naturalSize=!1);var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg");Ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ze.setAttribute("width",a.width.baseVal.valueAsString),Ze.setAttribute("height",a.height.baseVal.valueAsString),Ze.setAttribute("viewBox","0 0 "+a.viewBox.baseVal.width.toString()+" "+a.viewBox.baseVal.height.toString()),Ze.innerHTML=a.innerHTML,f.naturalSize===!0?(Ze.width.baseVal.value=o.naturalWidth,Ze.height.baseVal.value=o.naturalHeight):f.width!==void 0&&f.height!==void 0&&(Ze.width.baseVal.value=f.width,Ze.height.baseVal.value=f.height),he.width=Ze.width.baseVal.value,he.height=Ze.height.baseVal.value;var rt=Ze.outerHTML,ut=he.getContext("2d");f.markersOnly!==!0&&ut.drawImage(o,0,0,he.width,he.height);var $e=window.URL,Ct=new Image(he.width,he.height);Ct.setAttribute("crossOrigin","anonymous");var gt=new Blob([rt],{type:"image/svg+xml"}),Bt=$e.createObjectURL(gt);Ct.onload=function(){ut.drawImage(Ct,0,0),$e.revokeObjectURL(Bt);var yn=he.toDataURL(f.imageType,f.imageQuality);d(yn)},Ct.src=Bt})},c}(),D=function(){},$=function(){function c(o){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(c.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),c.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},c.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},c.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new L("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new L("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new L("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new A("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new A("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},c.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},c}(),L=function(c,o){this.selector=c,this.style=o},A=function(c,o){this.localName=c,this.style=o},ie=function(){function c(o,a,l,f,d){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=o,this.displayMode=a,this.markerItems=l,this.uiStyleSettings=f,this.styles=d,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return c.prototype.show=function(o){var a=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var l=document.createElement("div");l.className=this.toolbarBlockStyleClass.name,l.style.whiteSpace="nowrap",this.uiContainer.appendChild(l),this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(l,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(d){var he=document.createElement("div");he.className=""+a.toolbarButtonStyleClass.name,he.setAttribute("data-type-name",d.typeName),he.innerHTML=d.icon,he.addEventListener("click",function(){a.markerToolbarButtonClicked(he,d)}),a.buttons.push(he),a.markerButtons.push(he)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var f=document.createElement("div");f.className=this.toolbarBlockStyleClass.name,f.style.whiteSpace="nowrap",f.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(f),this.addActionButton(f,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(f,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},c.prototype.addButtonClickListener=function(o){this.buttonClickListeners.push(o)},c.prototype.removeButtonClickListener=function(o){this.buttonClickListeners.indexOf(o)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(o),1)},c.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},c.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var o=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var a=0;a<this.markerButtons.length;a++)a<o||a===o&&this.markerButtons.length-1===o?this.markerButtonBlock.appendChild(this.markerButtons[a]):(a===o&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[a]))}},c.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},c.prototype.resetButtonStyles=function(){var o=this;this.buttons.forEach(function(a){a.className=a.className.replace(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name,"").trim(),a.className=a.className.replace(o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?o.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:o.toolbarActiveButtonStyleColorsClass.name,"").trim(),a.className+=" "+(o.uiStyleSettings.toolbarButtonStyleColorsClassName?o.uiStyleSettings.toolbarButtonStyleColorsClassName:o.toolbarButtonStyleColorsClass.name)})},c.prototype.addActionButton=function(o,a,l){var f=this,d=document.createElement("div");switch(d.className=""+this.toolbarButtonStyleClass.name,d.innerHTML=a,d.setAttribute("data-action",l),d.addEventListener("click",function(){f.actionToolbarButtonClicked(d,l)}),l){case"select":d.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":d.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":d.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":d.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":d.style.fill=this.uiStyleSettings.closeButtonColor}o.appendChild(d),this.buttons.push(d)},c.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new A("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new A("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new A("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new A("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new A("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var o=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new A("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*o)+`px;
padding: `+o+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new A("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new A("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new L("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new L("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},c.prototype.markerToolbarButtonClicked=function(o,a){this.setActiveButton(o),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(l){return l("marker",a)}),this.markerButtonOverflowBlock.style.display="none"},c.prototype.actionToolbarButtonClicked=function(o,a){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(l){return l("action",a)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},c.prototype.setActiveButton=function(o){this.resetButtonStyles(),o.className=o.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),o.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},c.prototype.setActiveMarkerButton=function(o){var a=this.markerButtons.find(function(l){return l.getAttribute("data-type-name")===o});a&&this.setActiveButton(a)},c.prototype.setCurrentMarker=function(o){var a=this;this.currentMarker=o,this.buttons.filter(function(l){return/delete|notes/.test(l.getAttribute("data-action"))}).forEach(function(l){a.currentMarker===void 0?(l.style.fillOpacity="0.4",l.style.pointerEvents="none"):(l.style.fillOpacity="1",l.style.pointerEvents="all")})},c}(),be=function(){function c(o,a,l,f){this.panels=[],this.panelButtons=[],this.markerjsContainer=o,this.displayMode=a,this.uiStyleSettings=l,this.styles=f,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return c.prototype.addStyles=function(){var o;this.toolboxStyleClass=this.styles.addClass(new A("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new A("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var a=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new A("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new A("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new A("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new A("toolbox-panel-row_colors",`
background-color: `+((o=this.uiStyleSettings.toolboxBackgroundColor)!==null&&o!==void 0?o:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new A("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*a)+`px;
padding: `+a+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new A("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new A("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new L("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new L("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},c.prototype.show=function(o){var a;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=o,this.uiContainer.className=this.toolboxStyleClass.name+" "+((a=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},c.prototype.setPanelButtons=function(o){var a,l,f=this;this.panels=o,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((a=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&a!==void 0?a:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((l=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&l!==void 0?l:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(d){var he;d.uiStyleSettings=f.uiStyleSettings;var Ze=document.createElement("div");Ze.className=f.toolboxButtonStyleClass.name+" "+((he=f.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&he!==void 0?he:f.toolboxButtonStyleColorsClass.name),Ze.innerHTML=d.icon,Ze.title=d.title,Ze.addEventListener("click",function(){f.panelButtonClick(d)}),f.panelButtons.push(Ze),f.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},c.prototype.panelButtonClick=function(o){var a=this,l=-1;if(o!==this.activePanel){l=this.panels.indexOf(o),this.panelRow.innerHTML="";var f=o.getUi();f.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(f),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=o}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){a.displayMode==="inline"?a.panelRow.style.display="none":a.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(d,he){var Ze,rt;d.className=a.toolboxButtonStyleClass.name+" "+(he===l?""+((Ze=a.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:a.toolboxActiveButtonStyleColorsClass.name):""+((rt=a.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&rt!==void 0?rt:a.toolboxButtonStyleColorsClass.name))})},c}(),Me=function(c,o){this.title=c,this.icon=o},Ue=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return he.colors=[],he.addTransparent=!1,he.colorBoxes=[],he.colors=l,he.currentColor=f,he.setCurrentColor=he.setCurrentColor.bind(he),he.getColorBox=he.getColorBox.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.overflow="hidden",l.style.whiteSpace="nowrap",this.colors.forEach(function(f){var d=a.getColorBox(f);l.appendChild(d),a.colorBoxes.push(d)}),l},o.prototype.getColorBox=function(a){var l=this,f=this.uiStyleSettings.toolbarHeight/4,d=this.uiStyleSettings.toolbarHeight-f,he=document.createElement("div");he.style.display="inline-block",he.style.boxSizing="content-box",he.style.width=d-2+"px",he.style.height=d-2+"px",he.style.padding="1px",he.style.marginRight="2px",he.style.marginBottom="2px",he.style.borderWidth="2px",he.style.borderStyle="solid",he.style.borderRadius=(d+2)/2+"px",he.style.borderColor=a===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",he.addEventListener("click",function(){l.setCurrentColor(a,he)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=d-2+"px",Ze.style.height=d-2+"px",Ze.style.backgroundColor=a,Ze.style.borderRadius=d/2+"px",a==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),he.appendChild(Ze),he},o.prototype.setCurrentColor=function(a,l){var f=this;this.currentColor=a,this.colorBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(a)},o}(Me),ze=function(){function c(o,a,l){this._state="new",this._isSelected=!1,this._container=o,this._overlayContainer=a,this.globalSettings=l,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(c.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),c.prototype.ownsTarget=function(o){return!1},Object.defineProperty(c.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),c.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},c.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},c.prototype.pointerDown=function(o,a){},c.prototype.dblClick=function(o,a){},c.prototype.manipulate=function(o){},c.prototype.pointerUp=function(o){this.stateChanged()},c.prototype.dispose=function(){},c.prototype.addMarkerVisualToContainer=function(o){this.container.childNodes.length>0?this.container.insertBefore(o,this.container.childNodes[0]):this.container.appendChild(o)},c.prototype.getState=function(){return{typeName:c.typeName,state:this.state,notes:this.notes}},c.prototype.restoreState=function(o){this._state=o.state,this.notes=o.notes},c.prototype.scale=function(o,a){},c.prototype.colorChanged=function(o){this.onColorChanged&&this.onColorChanged(o),this.stateChanged()},c.prototype.fillColorChanged=function(o){this.onFillColorChanged&&this.onFillColorChanged(o),this.stateChanged()},c.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var o=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),o.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(o)&&this.onStateChanged(this)}},c.typeName="MarkerBase",c}(),He=function(){function c(){this.findGripByVisual=this.findGripByVisual.bind(this)}return c.prototype.findGripByVisual=function(o){return this.topLeft.ownsTarget(o)?this.topLeft:this.topCenter.ownsTarget(o)?this.topCenter:this.topRight.ownsTarget(o)?this.topRight:this.centerLeft.ownsTarget(o)?this.centerLeft:this.centerRight.ownsTarget(o)?this.centerRight:this.bottomLeft.ownsTarget(o)?this.bottomLeft:this.bottomCenter.ownsTarget(o)?this.bottomCenter:this.bottomRight.ownsTarget(o)?this.bottomRight:void 0},c}(),nt=function(){function c(){this.GRIP_SIZE=10,this.visual=I.createGroup(),this.visual.appendChild(I.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(I.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return c.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},c}(),Oe=function(){function c(){}return c.toITransformMatrix=function(o){return{a:o.a,b:o.b,c:o.c,d:o.d,e:o.e,f:o.f}},c.toSVGMatrix=function(o,a){return o.a=a.a,o.b=a.b,o.c=a.c,o.d=a.d,o.e=a.e,o.f=a.f,o},c}(),Fe=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.left=0,d.top=0,d.width=0,d.height=0,d.defaultSize={x:50,y:20},d.offsetX=0,d.offsetY=0,d.rotationAngle=0,d.CB_DISTANCE=10,d._suppressMarkerCreateEvent=!1,d.container.transform.baseVal.appendItem(I.createTransform()),d.setupControlBox(),d}return ne(o,c),Object.defineProperty(o.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"visual",{get:function(){return this._visual},set:function(a){this._visual=a;var l=I.createTransform();this._visual.transform.baseVal.appendItem(l)},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!!c.prototype.ownsTarget.call(this,a)||!!(this.controlGrips.findGripByVisual(a)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(a))},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="new"&&(this.left=a.x,this.top=a.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var f=this.unrotatePoint(a);if(this.manipulationStartX=f.x,this.manipulationStartY=f.y,this.offsetX=f.x-this.left,this.offsetY=f.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(l),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(l)){this.activeGrip=this.rotatorGrip;var d=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=d.x-this.width/2,this.top=d.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var he=this.container.transform.baseVal.getItem(0);he.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(he,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},o.prototype.pointerUp=function(a){var l=this.state;c.prototype.pointerUp.call(this,a),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(a),this._state="select",l==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},o.prototype.moveVisual=function(a){this.visual.style.transform="translate("+a.x+"px, "+a.y+"px)"},o.prototype.manipulate=function(a){var l=this.unrotatePoint(a);this.state==="creating"?this.resize(a):this.state==="move"?(this.left=this.manipulationStartLeft+(l.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(l.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(l):this.state==="rotate"&&this.rotate(a)},o.prototype.resize=function(a){var l=this.manipulationStartLeft,f=this.manipulationStartWidth,d=this.manipulationStartTop,he=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:l=this.manipulationStartLeft+a.x-this.manipulationStartX,f=this.manipulationStartWidth+this.manipulationStartLeft-l;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:f=this.manipulationStartWidth+a.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:d=this.manipulationStartTop+a.y-this.manipulationStartY,he=this.manipulationStartHeight+this.manipulationStartTop-d;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:he=this.manipulationStartHeight+a.y-this.manipulationStartY}f>=0?(this.left=l,this.width=f):(this.left=l+f,this.width=-f),he>=0?(this.top=d,this.height=he):(this.top=d+he,this.height=-he),this.setSize()},o.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},o.prototype.rotate=function(a){if(Math.abs(a.x-this.centerX)>.1){var l=Math.sign(a.x-this.centerX);this.rotationAngle=180*Math.atan((a.y-this.centerY)/(a.x-this.centerX))/Math.PI+90*l,this.applyRotation()}},o.prototype.applyRotation=function(){var a=this.container.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(a,0)},o.prototype.rotatePoint=function(a){if(this.rotationAngle===0)return a;var l=this.container.getCTM(),f=I.createPoint(a.x,a.y);return{x:(f=f.matrixTransform(l)).x,y:f.y}},o.prototype.unrotatePoint=function(a){if(this.rotationAngle===0)return a;var l=this.container.getCTM();l=l.inverse();var f=I.createPoint(a.x,a.y);return{x:(f=f.matrixTransform(l)).x,y:f.y}},o.prototype.select=function(){c.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){c.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=I.createGroup();var a=I.createTransform();a.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(a),this.container.appendChild(this.controlBox),this.controlRect=I.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=I.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new He,this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){var a=this.controlBox.transform.baseVal.getItem(0);a.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(a,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},o.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},o.prototype.createGrip=function(){var a=new nt;return a.visual.transform.baseVal.appendItem(I.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.controlGrips.topLeft.GRIP_SIZE,l=-a/2,f=l,d=(this.width+this.CB_DISTANCE)/2-a/2,he=(this.height+this.CB_DISTANCE)/2-a/2,Ze=this.height+this.CB_DISTANCE-a/2,rt=this.width+this.CB_DISTANCE-a/2;this.positionGrip(this.controlGrips.topLeft.visual,l,f),this.positionGrip(this.controlGrips.topCenter.visual,d,f),this.positionGrip(this.controlGrips.topRight.visual,rt,f),this.positionGrip(this.controlGrips.centerLeft.visual,l,he),this.positionGrip(this.controlGrips.centerRight.visual,rt,he),this.positionGrip(this.controlGrips.bottomLeft.visual,l,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,d,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,rt,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,d,f-3*this.CB_DISTANCE)},o.prototype.positionGrip=function(a,l,f){var d=a.transform.baseVal.getItem(0);d.setTranslate(l,f),a.transform.baseVal.replaceItem(d,0)},o.prototype.hideControlBox=function(){this.controlBox.style.display="none"},o.prototype.showControlBox=function(){this.controlBox.style.display=""},o.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Oe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Oe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.left=l.left,this.top=l.top,this.width=l.width,this.height=l.height,this.rotationAngle=l.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Oe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,l.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Oe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,l.containerTransformMatrix))},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l);var f=this.rotatePoint({x:this.left,y:this.top}),d=this.unrotatePoint({x:f.x*a,y:f.y*l});this.left=d.x,this.top=d.y,this.width=this.width*a,this.height=this.height*l,this.adjustControlBox()},o}(ze),Be=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.opacity=1,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.createVisual=d.createVisual.bind(d),d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=I.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){c.prototype.setSize.call(this),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){c.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&I.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){var l=a;this.fillColor=l.fillColor,this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.opacity=l.opacity,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setSize()},o.title="Rectangle marker",o}(Fe),Ge=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return he.widths=[],he.widthBoxes=[],he.widths=l,he.currentWidth=f,he.setCurrentWidth=he.setCurrentWidth.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2",this.widths.forEach(function(f){var d=document.createElement("div");d.style.display="flex",d.style.flexGrow="2",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.borderColor=f===a.currentWidth?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentWidth(f,d)}),l.appendChild(d);var he=document.createElement("div");he.innerText=f.toString(),he.style.marginRight="5px",d.appendChild(he);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var rt=document.createElement("hr");rt.style.minWidth="20px",rt.style.border="0px",rt.style.borderTop=f+"px solid "+a.uiStyleSettings.toolboxColor,rt.style.flexGrow="2",Ze.appendChild(rt),d.appendChild(Ze),a.widthBoxes.push(d)}),l},o.prototype.setCurrentWidth=function(a,l){var f=this;this.currentWidth=a,this.widthBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},o}(Me),Ye=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return he.styles=[],he.styleBoxes=[],he.styles=l,he.currentStyle=f,he.setCurrentStyle=he.setCurrentStyle.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2",this.styles.forEach(function(f){var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.overflow="hidden",d.style.maxWidth=100/a.styles.length-5+"%",d.style.borderColor=f===a.currentStyle?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentStyle(f,d)}),l.appendChild(d);var he=document.createElement("div");he.style.minHeight="20px",he.style.flexGrow="2",he.style.overflow="hidden";var Ze=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+a.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(f!==""?'stroke-dasharray="'+f+'"':"")+` />
</svg>`;he.innerHTML=Ze,d.appendChild(he),a.styleBoxes.push(d)}),l},o.prototype.setCurrentStyle=function(a,l){var f=this;this.currentStyle=a,this.styleBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},o}(Me),Xe=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.strokePanel=new Ue("Line color",f.defaultColorSet,f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return ne(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="FrameMarker",o.title="Frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',o}(Be),Le=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Ve=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.x1=0,d.y1=0,d.x2=0,d.y2=0,d.defaultLength=50,d.manipulationStartX=0,d.manipulationStartY=0,d.manipulationStartX1=0,d.manipulationStartY1=0,d.manipulationStartX2=0,d.manipulationStartY2=0,d.setupControlBox(),d}return ne(o,c),o.prototype.ownsTarget=function(a){return!!c.prototype.ownsTarget.call(this,a)||!(!this.grip1.ownsTarget(a)&&!this.grip2.ownsTarget(a))},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.manipulationStartX=a.x,this.manipulationStartY=a.y,this.state==="new"&&(this.x1=a.x,this.y1=a.y,this.x2=a.x,this.y2=a.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(l)?this.activeGrip=this.grip1:this.grip2.ownsTarget(l)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},o.prototype.pointerUp=function(a){var l=this.state;c.prototype.pointerUp.call(this,a),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(a),this._state="select",l==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},o.prototype.adjustVisual=function(){},o.prototype.manipulate=function(a){this.state==="creating"?this.resize(a):this.state==="move"?(this.x1=this.manipulationStartX1+a.x-this.manipulationStartX,this.y1=this.manipulationStartY1+a.y-this.manipulationStartY,this.x2=this.manipulationStartX2+a.x-this.manipulationStartX,this.y2=this.manipulationStartY2+a.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(a)},o.prototype.resize=function(a){switch(this.activeGrip){case this.grip1:this.x1=a.x,this.y1=a.y;break;case this.grip2:case void 0:this.x2=a.x,this.y2=a.y}this.adjustVisual(),this.adjustControlBox()},o.prototype.select=function(){c.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},o.prototype.deselect=function(){c.prototype.deselect.call(this),this.controlBox.style.display="none"},o.prototype.setupControlBox=function(){this.controlBox=I.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},o.prototype.adjustControlBox=function(){this.positionGrips()},o.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},o.prototype.createGrip=function(){var a=new nt;return a.visual.transform.baseVal.appendItem(I.createTransform()),this.controlBox.appendChild(a.visual),a},o.prototype.positionGrips=function(){var a=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-a/2,this.y1-a/2),this.positionGrip(this.grip2.visual,this.x2-a/2,this.y2-a/2)},o.prototype.positionGrip=function(a,l,f){var d=a.transform.baseVal.getItem(0);d.setTranslate(l,f),a.transform.baseVal.replaceItem(d,0)},o.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},c.prototype.getState.call(this))},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.x1=l.x1,this.y1=l.y1,this.x2=l.x2,this.y2=l.y2},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.x1=this.x1*a,this.y1=this.y1*l,this.x2=this.x2*a,this.y2=this.y2*l,this.adjustVisual(),this.adjustControlBox()},o}(ze),et=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.setStrokeColor=d.setStrokeColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.strokePanel=new Ue("Line color",f.defaultColorSet,f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorLine&&a!==this.visibleLine)},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.selectorLine=I.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=I.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},o.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),I.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.createVisual(),this.adjustVisual()},o.typeName="LineMarker",o.title="Line marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',o}(Ve),_e=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return he.fonts=[],he.fontBoxes=[],he.fonts=l,he.currentFont=f,he.setCurrentFont=he.setCurrentFont.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.overflow="hidden",l.style.flexGrow="2",this.fonts.forEach(function(f){var d=document.createElement("div");d.style.display="inline-block",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.overflow="hidden",d.style.maxWidth=100/a.fonts.length-5+"%",d.style.borderColor=f===a.currentFont?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentFont(f,d)}),l.appendChild(d);var he=document.createElement("div");he.style.display="flex",he.style.minHeight="20px",he.style.flexGrow="2",he.style.fontFamily=f,he.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",he.appendChild(Ze),d.appendChild(he),a.fontBoxes.push(d)}),l},o.prototype.setCurrentFont=function(a,l){var f=this;this.currentFont=a,this.fontBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},o}(Me),Ke=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.color="transparent",d.padding=5,d.DEFAULT_TEXT="your text here",d.text=d.DEFAULT_TEXT,d.isMoved=!1,d.color=f.defaultColor,d.fontFamily=f.defaultFontFamily,d.defaultSize={x:100,y:30},d.setColor=d.setColor.bind(d),d.setFont=d.setFont.bind(d),d.renderText=d.renderText.bind(d),d.sizeText=d.sizeText.bind(d),d.textEditDivClicked=d.textEditDivClicked.bind(d),d.showTextEditor=d.showTextEditor.bind(d),d.setSize=d.setSize.bind(d),d.positionTextEditor=d.positionTextEditor.bind(d),d.colorPanel=new Ue("Color",f.defaultColorSet,f.defaultColor),d.colorPanel.onColorChanged=d.setColor,d.fontFamilyPanel=new _e("Font",f.defaultFontFamilies,f.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d}return ne(o,c),o.prototype.ownsTarget=function(a){if(c.prototype.ownsTarget.call(this,a)||a===this.visual||a===this.textElement||a===this.bgRectangle)return!0;var l=!1;return this.textElement.childNodes.forEach(function(f){f===a&&(l=!0)}),l},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.bgRectangle=I.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=I.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.textElement.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.isMoved=!1,this.pointerDownPoint=a,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.renderText=function(){var a=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(l){a.textElement.appendChild(I.createTSpan(l.trim()===""?" ":l.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},o.prototype.getTextScale=function(){var a=this.textElement.getBBox(),l=1;if(a.width>0&&a.height>0){var f=(1*this.width-this.width*this.padding*2/100)/a.width,d=(1*this.height-this.height*this.padding*2/100)/a.height;l=Math.min(f,d)}return l},o.prototype.getTextPosition=function(a){var l=this.textElement.getBBox(),f=0,d=0;return l.width>0&&l.height>0&&(f=(this.width-l.width*a)/2,d=this.height/2-l.height*a/2),{x:f,y:d}},o.prototype.sizeText=function(){var a=this.textElement.getBBox(),l=this.getTextScale(),f=this.getTextPosition(l);f.y-=a.y*l,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+f.x+"px, "+f.y+"px) scale("+l+", "+l+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(f.x,f.y),this.textElement.transform.baseVal.getItem(1).setScale(l,l))},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(a.x-this.pointerDownPoint.x)>5||Math.abs(a.y-this.pointerDownPoint.y)>5)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.isMoved=!0,this.setSize(),this.sizeText()},o.prototype.setSize=function(){c.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},o.prototype.pointerUp=function(a){var l=this.state;l==="creating"&&(this._suppressMarkerCreateEvent=!0),c.prototype.pointerUp.call(this,a),this.setSize(),(l==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},o.prototype.showTextEditor=function(){var a=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(l){l.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var l=Number.parseFloat(a.textEditor.style.fontSize);a.textEditor.clientWidth>=Number.parseInt(a.textEditor.style.maxWidth)&&l>.9;)l-=.1,a.textEditor.style.fontSize=Math.max(l,.9)+"em"}),this.textEditor.addEventListener("keyup",function(l){l.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(l){if(l.clipboardData){var f=l.clipboardData.getData("text"),d=window.getSelection();if(!d.rangeCount)return!1;d.deleteFromDocument(),d.getRangeAt(0).insertNode(document.createTextNode(f)),l.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){a.textEditDivClicked(a.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},o.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var a=this.getTextScale(),l=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),f=this.textElement.getBBox(),d={x:f.width*a,y:f.height*a};l.x-=d.x/2,l.y-=d.y/2,this.textEditor.style.top=l.y+"px",this.textEditor.style.left=l.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-l.x+"px",this.textEditor.style.fontSize=Math.max(16*a,12)+"px",this.textElement.style.display="none"}},o.prototype.textEditDivClicked=function(a){this.text=a.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},o.prototype.select=function(){c.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},o.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),c.prototype.deselect.call(this)},o.prototype.dblClick=function(a,l){c.prototype.dblClick.call(this,a,l),this.showTextEditor()},o.prototype.setColor=function(a){this.textElement&&I.setAttributes(this.textElement,[["fill",a]]),this.color=a,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(a)},o.prototype.setFont=function(a){this.textElement&&I.setAttributes(this.textElement,[["font-family",a]]),this.fontFamily=a,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},o.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},o.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var l=a;this.color=l.color,this.fontFamily=l.fontFamily,this.padding=l.padding,this.text=l.text,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setSize(),this.sizeText(),this.positionTextEditor()},o.typeName="TextMarker",o.title="Text marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',o}(Fe),me=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.color="transparent",d.lineWidth=3,d.drawing=!1,d.pixelRatio=1,d.color=f.defaultColor,d.lineWidth=f.defaultStrokeWidth,d.pixelRatio=f.freehandPixelRatio,d.setColor=d.setColor.bind(d),d.addCanvas=d.addCanvas.bind(d),d.finishCreation=d.finishCreation.bind(d),d.setLineWidth=d.setLineWidth.bind(d),d.colorPanel=new Ue("Color",f.defaultColorSet,f.defaultColor),d.colorPanel.onColorChanged=d.setColor,d.lineWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.lineWidthPanel.onWidthChanged=d.setLineWidth,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.drawingImage)},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.drawingImage=I.createImage(),this.visual.appendChild(this.drawingImage);var a=I.createTransform();this.visual.transform.baseVal.appendItem(a),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,l){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(a.x,a.y),this.drawing=!0):c.prototype.pointerDown.call(this,a,l)},o.prototype.manipulate=function(a){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(a.x,a.y),this.canvasContext.stroke()):c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),I.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},o.prototype.pointerUp=function(a){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):c.prototype.pointerUp.call(this,a)},o.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},o.prototype.select=function(){this.state==="creating"&&this.finishCreation(),c.prototype.select.call(this)},o.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),c.prototype.deselect.call(this)},o.prototype.finishCreation=function(){for(var a=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),l=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],f=l[0],d=l[1],he=l[2],Ze=l[3],rt=!1,ut=0;ut<this.canvasElement.height;ut++)for(var $e=0;$e<this.canvasElement.width;$e++)a.data[ut*this.canvasElement.width*4+4*$e+3]>0&&(rt=!0,ut<d&&(d=ut),$e<f&&(f=$e),ut>Ze&&(Ze=ut),$e>he&&(he=$e));if(rt){this.left=f/this.pixelRatio,this.top=d/this.pixelRatio,this.width=(he-f)/this.pixelRatio,this.height=(Ze-d)/this.pixelRatio;var Ct=document.createElement("canvas");Ct.width=he-f,Ct.height=Ze-d,Ct.getContext("2d").putImageData(this.canvasContext.getImageData(f,d,he-f,Ze-d),0,0),this.drawingImgUrl=Ct.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},o.prototype.setDrawingImage=function(){I.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),I.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},o.prototype.setColor=function(a){this.color=a,this.colorChanged(a)},o.prototype.setLineWidth=function(a){this.lineWidth=a},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({drawingImgUrl:this.drawingImgUrl},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){this.createVisual(),c.prototype.restoreState.call(this,a),this.drawingImgUrl=a.drawingImgUrl,this.setDrawingImage()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setDrawingImage()},o.typeName="FreehandMarker",o.title="Freehand marker",o.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',o}(Fe),se=function(c){function o(a,l,f){var d=c.call(this,a,f||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return d.typeBoxes=[],d.currentType=l,d.setCurrentType=d.setCurrentType.bind(d),d}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2";for(var f=function(Ze){var rt="both";switch(Ze){case 0:rt="both";break;case 1:rt="start";break;case 2:rt="end";break;case 3:rt="none"}var ut=document.createElement("div");if(ut.style.display="flex",ut.style.flexGrow="2",ut.style.alignItems="center",ut.style.justifyContent="space-between",ut.style.padding="5px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderColor=rt===d.currentType?d.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){a.setCurrentType(rt,ut)}),l.appendChild(ut),rt==="both"||rt==="start"){var $e=document.createElement("div");$e.style.display="flex",$e.style.alignItems="center",$e.style.minHeight="20px",$e.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,$e.style.marginLeft="5px",ut.appendChild($e)}var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.style.flexGrow="2";var gt=document.createElement("hr");if(gt.style.minWidth="20px",gt.style.border="0px",gt.style.borderTop="3px solid "+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee"),gt.style.flexGrow="2",Ct.appendChild(gt),ut.appendChild(Ct),rt==="both"||rt==="end"){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.minHeight="20px",Bt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Bt.style.marginRight="5px",ut.appendChild(Bt)}d.typeBoxes.push(ut)},d=this,he=0;he<4;he++)f(he);return l},o.prototype.setCurrentType=function(a,l){var f=this;this.currentType=a,this.typeBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings!==void 0?f.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},o}(Me),ve=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.arrowType="end",d.arrowBaseHeight=10,d.arrowBaseWidth=10,d.getArrowPoints=d.getArrowPoints.bind(d),d.setArrowType=d.setArrowType.bind(d),d.arrowTypePanel=new se("Arrow type","end"),d.arrowTypePanel.onArrowTypeChanged=d.setArrowType,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.arrow1&&a!==this.arrow2)},o.prototype.getArrowPoints=function(a,l){var f=this.arrowBaseWidth+2*this.strokeWidth,d=this.arrowBaseHeight+2*this.strokeWidth;return a-f/2+","+(l+d/2)+" "+a+","+(l-d/2)+" "+(a+f/2)+","+(l+d/2)},o.prototype.createTips=function(){this.arrow1=I.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=I.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.arrow2)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(c.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",I.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),I.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),l=this.arrow1.transform.baseVal.getItem(0);l.setRotate(a,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(l,0);var f=this.arrow2.transform.baseVal.getItem(0);f.setRotate(a+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(f,0)}},o.prototype.setArrowType=function(a){this.arrowType=a,this.adjustVisual(),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({arrowType:this.arrowType},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.arrowType=l.arrowType,this.createTips(),this.adjustVisual()},o.typeName="ArrowMarker",o.title="Arrow marker",o.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',o}(et),R=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.fillColor=f.defaultFillColor,d.strokeWidth=0,d.fillPanel=new Ue("Color",f.defaultColorSet,f.defaultFillColor),d.fillPanel.onColorChanged=d.setFillColor,d}return ne(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="CoverMarker",o.title="Cover marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',o}(Be),U=function(c){function o(a,l,f,d){var he=c.call(this,a,d||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return he.opacities=[],he.opacityBoxes=[],he.opacities=l,he.currentOpacity=f,he.setCurrentOpacity=he.setCurrentOpacity.bind(he),he}return ne(o,c),o.prototype.getUi=function(){var a=this,l=document.createElement("div");return l.style.display="flex",l.style.overflow="hidden",l.style.flexGrow="2",l.style.justifyContent="space-between",this.opacities.forEach(function(f){var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.justifyContent="center",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.borderColor=f===a.currentOpacity?a.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){a.setCurrentOpacity(f,d)}),l.appendChild(d);var he=document.createElement("div");he.innerText=100*f+"%",d.appendChild(he),a.opacityBoxes.push(d)}),l},o.prototype.setCurrentOpacity=function(a,l){var f=this;this.currentOpacity=a,this.opacityBoxes.forEach(function(d){d.style.borderColor=d===l?f.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},o}(Me),ee=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.setOpacity=d.setOpacity.bind(d),d.fillColor=f.defaultHighlightColor,d.strokeWidth=0,d.opacity=f.defaultHighlightOpacity,d.fillPanel=new Ue("Color",f.defaultColorSet,d.fillColor),d.fillPanel.onColorChanged=d.setFillColor,d.opacityPanel=new U("Opacity",f.defaultOpacitySteps,d.opacity),d.opacityPanel.onOpacityChanged=d.setOpacity,d}return ne(o,c),o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&I.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="HighlightMarker",o.title="Highlight marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',o}(R),ce='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',je=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.bgColor="transparent",d.tipPosition={x:0,y:0},d.tipBase1Position={x:0,y:0},d.tipBase2Position={x:0,y:0},d.tipMoving=!1,d.color=f.defaultStrokeColor,d.bgColor=f.defaultFillColor,d.fontFamily=f.defaultFontFamily,d.defaultSize={x:100,y:30},d.setBgColor=d.setBgColor.bind(d),d.getTipPoints=d.getTipPoints.bind(d),d.positionTip=d.positionTip.bind(d),d.setTipPoints=d.setTipPoints.bind(d),d.colorPanel=new Ue("Text color",f.defaultColorSet,d.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),d.colorPanel.onColorChanged=d.setColor,d.bgColorPanel=new Ue("Fill color",f.defaultColorSet,d.bgColor,ce),d.bgColorPanel.onColorChanged=d.setBgColor,d.fontFamilyPanel=new _e("Font",f.defaultFontFamilies,f.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d.tipGrip=new nt,d.tipGrip.visual.transform.baseVal.appendItem(I.createTransform()),d.controlBox.appendChild(d.tipGrip.visual),d}return ne(o,c),o.prototype.ownsTarget=function(a){return c.prototype.ownsTarget.call(this,a)||this.tipGrip.ownsTarget(a)||this.tip===a},o.prototype.createTip=function(){I.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=I.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},o.prototype.pointerDown=function(a,l){this.state==="new"&&c.prototype.pointerDown.call(this,a,l),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(l)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):c.prototype.pointerDown.call(this,a,l)},o.prototype.pointerUp=function(a){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,c.prototype.pointerUp.call(this,a);else{var l=this.state==="creating";c.prototype.pointerUp.call(this,a),this.setTipPoints(l),this.positionTip()}},o.prototype.manipulate=function(a){if(this.tipMoving){var l=this.unrotatePoint(a);this.tipPosition={x:l.x-this.manipulationStartLeft,y:l.y-this.manipulationStartTop},this.positionTip()}else c.prototype.manipulate.call(this,a)},o.prototype.setBgColor=function(a){this.bgRectangle&&this.tip&&(I.setAttributes(this.bgRectangle,[["fill",a]]),I.setAttributes(this.tip,[["fill",a]])),this.bgColor=a,this.fillColorChanged(a)},o.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},o.prototype.setTipPoints=function(a){a===void 0&&(a=!1);var l=Math.min(this.height/2,15),f=this.height/5;a&&(this.tipPosition={x:l+f/2,y:this.height+20});var d=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?d<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(f=this.width/5,l=Math.min(this.width/2,15),this.tipBase1Position={x:l,y:0},this.tipBase2Position={x:l+f,y:0}):(this.tipBase1Position={x:0,y:l},this.tipBase2Position={x:0,y:l+f}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?d<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(f=this.width/5,l=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-l-f,y:0},this.tipBase2Position={x:this.width-l,y:0}):(this.tipBase1Position={x:this.width,y:l},this.tipBase2Position={x:this.width,y:l+f}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?d<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(f=this.width/5,l=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-l-f,y:this.height},this.tipBase2Position={x:this.width-l,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-l-f},this.tipBase2Position={x:this.width,y:this.height-l}):d<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(f=this.width/5,l=Math.min(this.width/2,15),this.tipBase1Position={x:l,y:this.height},this.tipBase2Position={x:l+f,y:this.height}):(this.tipBase1Position={x:0,y:this.height-l},this.tipBase2Position={x:0,y:this.height-l-f})},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.positionTip()},o.prototype.positionTip=function(){I.setAttributes(this.tip,[["points",this.getTipPoints()]]);var a=this.tipGrip.visual.transform.baseVal.getItem(0);a.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(a,0)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),o.prototype.select=function(){this.positionTip(),c.prototype.select.call(this)},o.prototype.getState=function(){var a=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var l=a;this.bgColor=l.bgColor,this.tipPosition=l.tipPosition,c.prototype.restoreState.call(this,a),this.createTip(),this.setTipPoints()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.tipPosition={x:this.tipPosition.x*a,y:this.tipPosition.y*l},this.positionTip()},o.typeName="CalloutMarker",o.title="Callout marker",o.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',o}(Ke),Se=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.opacity=1,d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.fillColor=f.defaultFillColor,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.setOpacity=d.setOpacity.bind(d),d.createVisual=d.createVisual.bind(d),d.strokePanel=new Ue("Line color",N(f.defaultColorSet,["transparent"]),f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.fillPanel=new Ue("Fill color",N(f.defaultColorSet,["transparent"]),d.fillColor,ce),d.fillPanel.onColorChanged=d.setFillColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d.opacityPanel=new U("Opacity",f.defaultOpacitySteps,d.opacity),d.opacityPanel.onOpacityChanged=d.setOpacity,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual)},o.prototype.createVisual=function(){this.visual=I.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="new"&&(this.createVisual(),this.moveVisual(a),this._state="creating")},o.prototype.manipulate=function(a){c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){c.prototype.resize.call(this,a),this.setSize()},o.prototype.setSize=function(){c.prototype.setSize.call(this),I.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},o.prototype.pointerUp=function(a){c.prototype.pointerUp.call(this,a),this.setSize()},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.visual&&I.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(a),this.stateChanged()},o.prototype.setFillColor=function(a){this.fillColor=a,this.visual&&I.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(a),this.stateChanged()},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.visual&&I.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.visual&&I.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},o.prototype.setOpacity=function(a){this.opacity=a,this.visual&&I.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){var l=a;this.fillColor=l.fillColor,this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.opacity=l.opacity,this.createVisual(),c.prototype.restoreState.call(this,a),this.setSize()},o.prototype.scale=function(a,l){c.prototype.scale.call(this,a,l),this.setSize()},o.typeName="EllipseMarker",o.title="Ellipse marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(Fe),qe=function(c){function o(a,l,f){return c.call(this,a,l,f)||this}return ne(o,c),Object.defineProperty(o.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.tip1&&a!==this.tip2)},o.prototype.createTips=function(){this.tip1=I.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.tip1),this.tip2=I.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(I.createTransform()),this.visual.appendChild(this.tip2)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.state==="creating"&&this.createTips()},o.prototype.adjustVisual=function(){if(c.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(I.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var a=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),l=this.tip1.transform.baseVal.getItem(0);l.setRotate(a,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(l,0);var f=this.tip2.transform.baseVal.getItem(0);f.setRotate(a+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(f,0)}},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a),this.createTips(),this.adjustVisual()},o.typeName="MeasurementMarker",o.title="Measurement marker",o.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',o}(et),at=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokePanel.colors=f.defaultColorSet,d.fillColor="transparent",d}return ne(o,c),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=c.prototype.getState.call(this);return a.typeName=o.typeName,a},o.typeName="EllipseFrameMarker",o.title="Ellipse frame marker",o.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',o}(Se),st=function(){function c(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(c.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),c.prototype.addUndoStep=function(o){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(o)||(this.undoStack.push(o),JSON.stringify(this.lastRedoStep)!==JSON.stringify(o)&&this.redoStack.splice(0,this.redoStack.length))},c.prototype.replaceLastUndoStep=function(o){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=o)},c.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},c.prototype.undo=function(){if(this.undoStack.length>1){var o=this.undoStack.pop();return o!==void 0&&this.redoStack.push(o),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},c.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},c}(),lt=function(c){function o(a,l,f){var d=c.call(this,a,l,f)||this;return d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.curveX=0,d.curveY=0,d.manipulationStartCurveX=0,d.manipulationStartCurveY=0,d.setStrokeColor=d.setStrokeColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.positionGrips=d.positionGrips.bind(d),d.addControlGrips=d.addControlGrips.bind(d),d.adjustVisual=d.adjustVisual.bind(d),d.setupControlBox=d.setupControlBox.bind(d),d.resize=d.resize.bind(d),d.strokeColor=f.defaultColor,d.strokeWidth=f.defaultStrokeWidth,d.strokeDasharray=f.defaultStrokeDasharray,d.strokePanel=new Ue("Line color",f.defaultColorSet,f.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new Ge("Line width",f.defaultStrokeWidths,f.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new Ye("Line style",f.defaultStrokeDasharrays,f.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return ne(o,c),o.prototype.ownsTarget=function(a){return!(!c.prototype.ownsTarget.call(this,a)&&a!==this.visual&&a!==this.selectorCurve&&a!==this.visibleCurve&&!this.curveGrip.ownsTarget(a))},o.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},o.prototype.createVisual=function(){this.visual=I.createGroup(),this.selectorCurve=I.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=I.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},o.prototype.pointerDown=function(a,l){c.prototype.pointerDown.call(this,a,l),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=a.x,this.curveY=a.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(l)&&(this.activeGrip=this.curveGrip,this._state="resize")},o.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),I.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),I.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),I.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},o.prototype.setupControlBox=function(){c.prototype.setupControlBox.call(this),this.curveControlLine1=I.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=I.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},o.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,c.prototype.addControlGrips.call(this)},o.prototype.positionGrips=function(){c.prototype.positionGrips.call(this);var a=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-a/2,this.curveY-a/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},o.prototype.manipulate=function(a){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+a.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+a.y-this.manipulationStartY),c.prototype.manipulate.call(this,a)},o.prototype.resize=function(a){this.activeGrip===this.curveGrip&&(this.curveX=a.x,this.curveY=a.y),c.prototype.resize.call(this,a),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},o.prototype.setStrokeColor=function(a){this.strokeColor=a,this.adjustVisual(),this.colorChanged(a)},o.prototype.setStrokeWidth=function(a){this.strokeWidth=a,this.adjustVisual()},o.prototype.setStrokeDasharray=function(a){this.strokeDasharray=a,this.adjustVisual()},o.prototype.scale=function(a,l){this.curveX=this.curveX*a,this.curveY=this.curveY*l,c.prototype.scale.call(this,a,l)},Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),o.prototype.getState=function(){var a=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},c.prototype.getState.call(this));return a.typeName=o.typeName,a},o.prototype.restoreState=function(a){c.prototype.restoreState.call(this,a);var l=a;this.strokeColor=l.strokeColor,this.strokeWidth=l.strokeWidth,this.strokeDasharray=l.strokeDasharray,this.curveX=l.curveX,this.curveY=l.curveY,this.createVisual(),this.adjustVisual()},o.typeName="CurveMarker",o.title="Curve marker",o.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',o}(Ve),St=function(){function c(o,a){a===void 0&&(a=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=o,this.cancelable=a}return Object.defineProperty(c.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),c.prototype.preventDefault=function(){this._defaultPrevented=!0},c}(),Ot=function(c){function o(a,l,f){var d=c.call(this,a,!1)||this;return d.dataUrl=l,d.state=f,d}return ne(o,c),o}(St),dt=function(c){function o(a,l,f){f===void 0&&(f=!1);var d=c.call(this,a,f)||this;return d.marker=l,d}return ne(o,c),o}(St),Ht=function(){function c(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return c.prototype.addEventListener=function(o,a){this[o].push(a)},c.prototype.removeEventListener=function(o,a){var l=this[o].indexOf(a);l>-1&&this[o].splice(l,1)},c}(),Nt=function(){function c(o){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Le,this._isOpen=!1,this.undoRedoManager=new st,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Ht,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=c.instanceCounter++,this.styles=new $(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=o,this.targetRoot=document.body,this.width=o.clientWidth,this.height=o.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.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.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(c.prototype,"ALL_MARKER_TYPES",{get:function(){return[Xe,me,ve,Ke,at,Se,ee,je,qe,R,et,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Xe,me,ve,Ke,Se,ee,je]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Xe,me,ve,Ke,ee]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(o){var a=this;this._availableMarkerTypes.splice(0),o.forEach(function(l){if(typeof l=="string"){var f=a.ALL_MARKER_TYPES.find(function(d){return d.typeName===l});f!==void 0&&a._availableMarkerTypes.push(f)}else a._availableMarkerTypes.push(l)})},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(o){this._zoomLevel=o,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),c.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),x.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},c.prototype.show=function(){var o=this;this.styles.styleSheetRoot===void 0&&D.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=D.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(a){return a(new St(o))})},c.prototype.render=function(){return _(this,void 0,void 0,function(){var o;return X(this,function(a){switch(a.label){case 0:return this.setCurrentMarker(),(o=new k).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.markersOnly=this.renderMarkersOnly,o.width=this.renderWidth,o.height=this.renderHeight,[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return a.sent(),[4,o.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,a.sent()]}})})},c.prototype.close=function(o){var a=this;if(o===void 0&&(o=!1),this.isOpen){var l=!1;o||this.eventListeners.beforeclose.forEach(function(f){var d=new St(a,!0);f(d),d.defaultPrevented&&(l=!0)}),l||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(f){return f(new St(a))}),this.detachEvents(),this._isOpen=!1)}},c.prototype.addMarkersToToolbar=function(){for(var o,a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];(o=this._availableMarkerTypes).push.apply(o,a)},c.prototype.addRenderEventListener=function(o){this.addEventListener("render",function(a){o(a.dataUrl,a.state)})},c.prototype.removeRenderEventListener=function(o){},c.prototype.addCloseEventListener=function(o){this.addEventListener("close",function(){o()})},c.prototype.removeCloseEventListener=function(o){},c.prototype.setupResizeObserver=function(){var o=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return o.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},c.prototype.onPopupTargetResize=function(){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.editorCanvas.clientWidth/o>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*o:this.editorCanvas.clientWidth,l=a<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/o;this.resize(a,l)},c.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},c.prototype.resize=function(o,a){this._isResizing=!0;var l=o/this.imageWidth,f=a/this.imageHeight;this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(l,f),this._isResizing=!1},c.prototype.scaleMarkers=function(o,a){var l,f=this;this._currentMarker&&this._currentMarker instanceof Ke?this._currentMarker.scale(o,a):(l=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(d){d!==f._currentMarker&&d.scale(o,a)}),l!==void 0&&this.setCurrentMarker(l)},c.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},c.prototype.setTopLeft=function(){var o=this.editingTarget.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left,this.top=o.top-a.top},c.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},c.prototype.addDefs=function(){for(var o,a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];this.defs=I.createDefs(),this.addDefsToImage(),(o=this.defs).append.apply(o,a)},c.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},c.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},c.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},c.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},c.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},c.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},c.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},c.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var o=document.createElement("a");o.href="https://markerjs.com/",o.target="_blank",o.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',o.title="Powered by marker.js",o.style.display="grid",o.style.alignItems="center",o.style.justifyItems="center",o.style.padding="3px",o.style.width="20px",o.style.height="20px",this.logoUI.appendChild(o),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},c.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},c.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},c.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},c.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.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.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.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.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ie(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",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.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new be(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},c.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},c.prototype.removeMarker=function(o){this.markerImage.removeChild(o.container),this.markers.indexOf(o)>-1&&this.markers.splice(this.markers.indexOf(o),1),o.dispose()},c.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},c.prototype.toolbarButtonClicked=function(o,a){if(o==="marker"&&a!==void 0)this.createNewMarker(a);else if(o==="action")switch(a){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},c.prototype.deleteSelectedMarker=function(){var o=this;if(this._currentMarker!==void 0){var a=!1;if(this.eventListeners.markerbeforedelete.forEach(function(f){var d=new dt(o,o._currentMarker,!0);f(d),d.defaultPrevented&&(a=!0)}),!a){var l=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(f){return f(new dt(o,l))})}}},c.prototype.clear=function(){var o=this,a=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(he){var Ze=new dt(o,void 0,!0);he(Ze),Ze.defaultPrevented&&(a=!0)}),!a)){this.setCurrentMarker();for(var l=function(he){var Ze=f.markers[he];f.setCurrentMarker(f.markers[he]),f._currentMarker.dispose(),f.markerImage.removeChild(f._currentMarker.container),f.markers.splice(f.markers.indexOf(f._currentMarker),1),f.eventListeners.markerdelete.forEach(function(rt){return rt(new dt(o,Ze))})},f=this,d=this.markers.length-1;d>=0;d--)l(d);this.addUndoStep()}},Object.defineProperty(c.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),c.prototype.showNotesEditor=function(){var o;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(o=this._currentMarker.notes)!==null&&o!==void 0?o:"",this.overlayContainer.appendChild(this.notesArea))},c.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},c.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},c.prototype.addUndoStep=function(){var o=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var a=this.getState(),l=this.undoRedoManager.getLastUndoStep();if(!l||l.width===a.width&&l.height===a.height){var f=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(a),f<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(d){return d(new St(o))})}else this.undoRedoManager.replaceLastUndoStep(a),this.eventListeners.statechange.forEach(function(d){return d(new St(o))})}},c.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},c.prototype.undoStep=function(){var o=this,a=this.undoRedoManager.undo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(l){return l(new St(o))}))},c.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},c.prototype.redoStep=function(){var o=this,a=this.undoRedoManager.redo();a!==void 0&&(this.restoreState(a),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(l){return l(new St(o))}))},c.prototype.stepZoom=function(){var o=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=o<this.zoomSteps.length-1?this.zoomSteps[o+1]:this.zoomSteps[0]},c.prototype.panTo=function(o){this.contentDiv.scrollBy({left:this.prevPanPoint.x-o.x,top:this.prevPanPoint.y-o.y}),this.prevPanPoint=o},c.prototype.startRenderAndClose=function(){return _(this,void 0,void 0,function(){var o,a,l=this;return X(this,function(f){switch(f.label){case 0:return[4,this.render()];case 1:return o=f.sent(),a=this.getState(),this.eventListeners.render.forEach(function(d){return d(new Ot(l,o,a))}),this.close(!0),[2]}})})},c.prototype.getState=function(o){o===!0&&this.setCurrentMarker();var a={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(l){return a.markers.push(l.getState())}),a},c.prototype.restoreState=function(o){var a=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);o.markers.forEach(function(l){var f=a._availableMarkerTypes.find(function(he){return he.typeName===l.typeName});if(f!==void 0){var d=a.addNewMarker(f);d.restoreState(l),a.markers.push(d)}}),o.width&&o.height&&(o.width!==this.imageWidth||o.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/o.width,this.imageHeight/o.height),this.eventListeners.restorestate.forEach(function(l){return l(new St(a))})},c.prototype.addNewMarker=function(o){var a=I.createGroup();return this.markerImage.appendChild(a),new o(a,this.overlayContainer,this.settings)},c.prototype.createNewMarker=function(o){var a,l=this;(a=typeof o=="string"?this._availableMarkerTypes.find(function(f){return f.typeName===o}):o)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(a),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(a.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(f){return f(new dt(l,l._currentMarker))}))},c.prototype.markerCreated=function(o){var a=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(o),this.setCurrentMarker(o),o instanceof me&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(me):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(l){return l(new dt(a,a._currentMarker))})},c.prototype.colorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=o,this.settings.defaultStrokeColor=o)},c.prototype.fillColorChanged=function(o){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=o)},c.prototype.markerStateChanged=function(o){var a=this;this.eventListeners.markerchange.forEach(function(l){return l(new dt(a,o))})},c.prototype.setCurrentMarker=function(o){var a=this;this._currentMarker!==o&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(l){return l(new dt(a,a._currentMarker))})),this._currentMarker=o,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(l){return l(new dt(a,a._currentMarker))}))},c.prototype.onPointerDown=function(o){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||o.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var a=this.markers.find(function(l){return l.ownsTarget(o.target)});a!==void 0?(this.setCurrentMarker(a),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:o.clientX,y:o.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(o.clientX,o.clientY))},c.prototype.onDblClick=function(o){if(this._isFocused||this.focus(),this.mode==="select"){var a=this.markers.find(function(l){return l.ownsTarget(o.target)});a!==void 0&&a!==this._currentMarker&&this.setCurrentMarker(a),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(o.clientX,o.clientY),o.target):this.setCurrentMarker()}},c.prototype.onPointerMove=function(o){this.touchPoints!==1&&o.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||o.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(o.clientX,o.clientY)):this.zoomLevel>1&&this.panTo({x:o.clientX,y:o.clientY}))},c.prototype.onPointerUp=function(o){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(o.clientX,o.clientY)),this.isDragging=!1,this.addUndoStep()},c.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},c.prototype.onKeyUp=function(o){this._currentMarker===void 0||this.notesArea!==void 0||o.key!=="Delete"&&o.key!=="Backspace"||this.deleteSelectedMarker()},c.prototype.clientToLocalCoordinates=function(o,a){var l=this.markerImage.getBoundingClientRect();return{x:(o-l.left)/this.zoomLevel,y:(a-l.top)/this.zoomLevel}},c.prototype.onWindowResize=function(){this.positionUI()},c.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var o=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=o+"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=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},c.prototype.addLicenseKey=function(o){x.addKey(o)},c.prototype.addEventListener=function(o,a){this.eventListeners.addEventListener(o,a)},c.prototype.removeEventListener=function(o,a){this.eventListeners.removeEventListener(o,a)},c.prototype.renderState=function(o){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(o),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(c.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),c.prototype.focus=function(){var o=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(a){return a(new St(o))}))},c.prototype.blur=function(){var o=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(a){return a(new St(o))}))},c.instanceCounter=0,c}();/* **********************************
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 At=function(c,o){return(At=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(a[f]=l[f])})(c,o)};function kt(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=c}At(c,o),c.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}function Lt(c,o,a,l){return new(a||(a=Promise))(function(f,d){function he(ut){try{rt(l.next(ut))}catch($e){d($e)}}function Ze(ut){try{rt(l.throw(ut))}catch($e){d($e)}}function rt(ut){var $e;ut.done?f(ut.value):($e=ut.value,$e instanceof a?$e:new a(function(Ct){Ct($e)})).then(he,Ze)}rt((l=l.apply(c,o||[])).next())})}function zt(c,o){var a,l,f,d,he={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function Ze(rt){return function(ut){return function($e){if(a)throw new TypeError("Generator is already executing.");for(;he;)try{if(a=1,l&&(f=2&$e[0]?l.return:$e[0]?l.throw||((f=l.return)&&f.call(l),0):l.next)&&!(f=f.call(l,$e[1])).done)return f;switch(l=0,f&&($e=[2&$e[0],f.value]),$e[0]){case 0:case 1:f=$e;break;case 4:return he.label++,{value:$e[1],done:!1};case 5:he.label++,l=$e[1],$e=[0];continue;case 7:$e=he.ops.pop(),he.trys.pop();continue;default:if(!(f=he.trys,(f=f.length>0&&f[f.length-1])||$e[0]!==6&&$e[0]!==2)){he=0;continue}if($e[0]===3&&(!f||$e[1]>f[0]&&$e[1]<f[3])){he.label=$e[1];break}if($e[0]===6&&he.label<f[1]){he.label=f[1],f=$e;break}if(f&&he.label<f[2]){he.label=f[2],he.ops.push($e);break}f[2]&&he.ops.pop(),he.trys.pop();continue}$e=o.call(c,he)}catch(Ct){$e=[6,Ct],l=0}finally{a=f=0}if(5&$e[0])throw $e[1];return{value:$e[0]?$e[1]:void 0,done:!0}}([rt,ut])}}}var rn=function(){function c(){}return c.addKey=function(o){c.key=o},Object.defineProperty(c,"isLicensed",{get:function(){return!!c.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(c.key)},enumerable:!1,configurable:!0}),c}(),bt=function(){function c(){}return c.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},c.setAttributes=function(o,a){for(var l=0,f=a;l<f.length;l++){var d=f[l],he=d[0],Ze=d[1];o.setAttribute(he,Ze)}},c.createRect=function(o,a,l){var f=document.createElementNS("http://www.w3.org/2000/svg","rect");return f.setAttribute("width",o.toString()),f.setAttribute("height",a.toString()),l&&c.setAttributes(f,l),f},c.createLine=function(o,a,l,f,d){var he=document.createElementNS("http://www.w3.org/2000/svg","line");return he.setAttribute("x1",o.toString()),he.setAttribute("y1",a.toString()),he.setAttribute("x2",l.toString()),he.setAttribute("y2",f.toString()),d&&c.setAttributes(he,d),he},c.createPolygon=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","polygon");return l.setAttribute("points",o),a&&c.setAttributes(l,a),l},c.createCircle=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","circle");return l.setAttribute("cx",(o/2).toString()),l.setAttribute("cy",(o/2).toString()),l.setAttribute("r",o.toString()),a&&c.setAttributes(l,a),l},c.createEllipse=function(o,a,l){var f=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return f.setAttribute("cx",(o/2).toString()),f.setAttribute("cy",(a/2).toString()),f.setAttribute("rx",(o/2).toString()),f.setAttribute("ry",(a/2).toString()),l&&c.setAttributes(f,l),f},c.createGroup=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","g");return o&&c.setAttributes(a,o),a},c.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},c.createMarker=function(o,a,l,f,d,he,Ze){var rt=document.createElementNS("http://www.w3.org/2000/svg","marker");return c.setAttributes(rt,[["id",o],["orient",a],["markerWidth",l.toString()],["markerHeight",f.toString()],["refX",d.toString()],["refY",he.toString()]]),rt.appendChild(Ze),rt},c.createText=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","text");return a.setAttribute("x","0"),a.setAttribute("y","0"),o&&c.setAttributes(a,o),a},c.createTSpan=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","tspan");return l.textContent=o,a&&c.setAttributes(l,a),l},c.createImage=function(o){var a=document.createElementNS("http://www.w3.org/2000/svg","image");return o&&c.setAttributes(a,o),a},c.createPoint=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return l.x=o,l.y=a,l},c.createPath=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg","path");return l.setAttribute("d",o),a&&c.setAttributes(l,a),l},c.createElement=function(o,a){var l=document.createElementNS("http://www.w3.org/2000/svg",o);return a&&c.setAttributes(l,a),l},c.getHollowRectanglePath=function(o,a,l,f,d,he,Ze,rt){return"M"+o+","+a+"V"+(a+f)+"H"+(o+l)+"V"+a+"H"+d+"V"+he+"H"+(d+Ze)+"V"+(he+rt)+"H"+d+"V"+a+"Z"},c}(),Et=function(){function c(o){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+o+"_"}return Object.defineProperty(c.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),c.prototype.addClass=function(o){return this.styleSheet===void 0&&this.addStyleSheet(),o.name=""+this.classNamePrefix+o.localName,this.classes.push(o),this.styleSheet.sheet.insertRule("."+o.name+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length),o},c.prototype.addRule=function(o){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(o),this.styleSheet.sheet.insertRule(o.selector+" {"+o.style+"}",this.styleSheet.sheet.cssRules.length)},c.prototype.addStyleSheet=function(){var o;this.styleSheet=document.createElement("style"),((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new xt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new xt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},c.prototype.removeStyleSheet=function(){var o;this.styleSheet&&(((o=this.styleSheetRoot)!==null&&o!==void 0?o:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},c}(),it=function(c,o){this.selector=c,this.style=o},xt=function(c,o){this.localName=c,this.style=o},Wt=function(){function c(){this.blocks=[],this.display=""}return c.prototype.addButtonBlock=function(o){o.className=this.blockClassName,o.buttonClassName=this.buttonClassName,o.buttonColorsClassName=this.buttonColorsClassName,o.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(o)},c.prototype.addElementBlock=function(o){o.className===void 0&&(o.className=this.blockClassName),this.blocks.push(o)},c.prototype.getUI=function(){var o=document.createElement("div");return o.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,o.style.display=this.display,this.blocks.forEach(function(a){return o.appendChild(a.getUI())}),o},c}(),Ut=function(){function c(){}return c.prototype.getUI=function(){var o=document.createElement("div");if(o.className=this.className,this.minWidth!==void 0&&(o.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":o.style.justifyContent="flex-start";break;case"center":o.style.justifyContent="center";break;case"end":o.style.justifyContent="flex-end"}return o.style.whiteSpace="nowrap",o},c}(),Xt=function(c){function o(){var a=c!==null&&c.apply(this,arguments)||this;return a.buttons=[],a}return kt(o,c),o.prototype.addButton=function(a){a.className=this.buttonClassName,a.colorsClassName=this.buttonColorsClassName,a.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(a)},o.prototype.getUI=function(){var a=c.prototype.getUI.call(this);return this.buttons.forEach(function(l){return a.appendChild(l.getUI())}),a},o}(Ut),_t=function(){function c(o,a){this._isActive=!1,this._isHidden=!1,this._icon=o,this.title=a,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(c.prototype,"icon",{get:function(){return this._icon},set:function(o){this._icon=o,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isActive",{get:function(){return this._isActive},set:function(o){this._isActive=o,this.adjustClassName()},enumerable:!1,configurable:!0}),c.prototype.getUI=function(){var o=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return o.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},c.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},c.prototype.hide=function(){this._isHidden=!0},c}(),vt=function(c){function o(){var a=c!==null&&c.apply(this,arguments)||this;return a.elements=[],a}return kt(o,c),o.prototype.addElement=function(a){this.elements.push(a)},o.prototype.getUI=function(){var a=c.prototype.getUI.call(this);return this.elements.forEach(function(l){return a.appendChild(l)}),a},o}(Ut),ln=function(){function c(o,a){this.horizontal=o,this.vertical=a}return Object.defineProperty(c.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),c.prototype.getVerticalLength=function(o){return o/this.ratio},c.prototype.getHorizontalLength=function(o){return o*this.ratio},c}(),An=function(){function c(){}return c.getIcon=function(o,a){if(o>0&&a>0){var l=new ln(o,a),f=l.ratio>=1?20:l.getHorizontalLength(20),d=l.ratio<1?20:l.getVerticalLength(20),he=document.createElementNS("http://www.w3.org/2000/svg","svg");he.setAttribute("xmlns","http://www.w3.org/2000/svg"),he.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(he);var Ze=bt.createDefs();he.appendChild(Ze);var rt=bt.createElement("clipPath",[["id","text-bg-clip"]]);Ze.appendChild(rt);var ut=bt.createPath(bt.getHollowRectanglePath((24-f)/2,(24-d)/2,f,d,(24-f)/2+2,(24-d)/2+2,f-4,d-4));he.appendChild(ut);var $e=bt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);$e.appendChild(bt.createTSpan(o+":"+a)),he.appendChild($e);var Ct=$e.getBBox();bt.setAttributes($e,[["x",((24-Ct.width)/2).toString()],["y",((24-Ct.height)/2-Ct.y).toString()]]);var gt=bt.createPath(bt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ct.width))/2,(24-Math.ceil(Ct.height))/2,Math.ceil(Ct.width),Math.ceil(Ct.height)));return rt.appendChild(gt),bt.setAttributes(ut,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(he),he.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},c}(),En=function(c){function o(a,l,f){var d=c.call(this,a,l)||this;return d.isDropdownOpen=!1,d.onClick=d.dropdownButtonClicked,d.dropdownButtons=f,d}return kt(o,c),o.prototype.setupDropdown=function(){var a=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(l){l.className=a.className,l.colorsClassName=a.colorsClassName,a.dropdownBlock.appendChild(l.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},o.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},o.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},o.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},o.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},o.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},o}(_t),jt=function(){function c(o,a){this.GRIP_SIZE=10,this.color=o,this.fillColor=a,this.visual=bt.createGroup(),this.visual.appendChild(bt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(bt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return c.prototype.ownsTarget=function(o){return o===this.visual||o===this.visual.childNodes[0]||o===this.visual.childNodes[1]},c.prototype.setCenter=function(o,a){this.visual.childNodes.forEach(function(l){return bt.setAttributes(l,[["cx",o.toString()],["cy",a.toString()]])})},c}(),gn=function(){function c(o,a,l,f){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=o,this.canvasHeight=a,this.margin=l,this.container=f,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(c.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(o){this._aspectRatio=o,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.gridContainer&&bt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(o){this._zoomFactor=o,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),c.prototype.open=function(){var o=this;this.cropShadeElement=bt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=bt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var a=0;a<this.numberOfGridLines;a++)this.horizontalGridLines.push(bt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(bt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(l){return o.gridContainer.appendChild(l)}),this.verticalGridLines.forEach(function(l){return o.gridContainer.appendChild(l)}),this.cropRectElement=bt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new jt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new jt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new jt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new jt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},c.prototype.setCropRectangle=function(o){this.cropRect=o;var a=Object.assign({},this.cropRect);this.zoomFactor!==1&&(a.width=this.cropRect.width*this.zoomFactor,a.height=this.cropRect.height*this.zoomFactor,a.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-a.width/2,a.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-a.height/2),bt.setAttributes(this.cropRectElement,[["x",a.x.toString()],["y",a.y.toString()],["width",a.width.toString()],["height",a.height.toString()]]);var l=a.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(d,he){var Ze=a.y+l*(he+1);bt.setAttributes(d,[["x1",""+a.x],["y1",""+Ze],["x2",""+(a.x+a.width)],["y2",""+Ze]])});var f=a.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(d,he){var Ze=a.x+f*(he+1);bt.setAttributes(d,[["x1",""+Ze],["y1",""+a.y],["x2",""+Ze],["y2",""+(a.y+a.height)]])}),bt.setAttributes(this.cropShadeElement,[["d",bt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,a.x,a.y,a.width,a.height)]]),this.topLeftGrip.setCenter(a.x,a.y),this.topRightGrip.setCenter(a.x+a.width,a.y),this.bottomLeftGrip.setCenter(a.x,a.y+a.height),this.bottomRightGrip.setCenter(a.x+a.width,a.y+a.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},c.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)},c.prototype.clientToLocalCoordinates=function(o,a){var l=this.container.getBoundingClientRect();return{x:o-l.left+this.margin,y:a-l.top+this.margin}},c.prototype.onPointerDown=function(o){this.container.setPointerCapture(o.pointerId),this.previousPoint=this.clientToLocalCoordinates(o.clientX,o.clientY),this.cropRectElement===o.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(o.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(o.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(o.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(o.target)&&(this.activeGrip=this.bottomRightGrip)},c.prototype.onPointerMove=function(o){if(this.isMoving)this.move(this.clientToLocalCoordinates(o.clientX,o.clientY));else if(this.activeGrip){var a=this.clientToLocalCoordinates(o.clientX,o.clientY);this.resize(a)}o.preventDefault()},c.prototype.onPointerUp=function(o){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(o.pointerId)},c.prototype.move=function(o){var a=o.x-this.previousPoint.x,l=o.y-this.previousPoint.y;this.zoomFactor!==1&&(a=-a/this.zoomFactor,l=-l/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+a),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+l),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=o},c.prototype.resize=function(o){var a=Object.assign({},this.cropRect),l=o.x-this.previousPoint.x,f=o.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:a.x+l<this.margin&&(l=this.margin-a.x),a.x+=l,a.width=this.cropRect.x+this.cropRect.width-a.x;break;case this.bottomRightGrip:case this.topRightGrip:a.width+l>this.canvasWidth*this.zoomFactor&&(l=this.canvasWidth*this.zoomFactor-a.width),a.width+=l}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(a.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(l),a.height=this.aspectRatio.getVerticalLength(a.width)):(a.y+=f,a.height=this.cropRect.y+this.cropRect.height-a.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?a.height=this.aspectRatio.getVerticalLength(a.width):a.height+=f}a.width<10&&(a.x=this.cropRect.x,a.width=10),a.height<10&&(a.y=this.cropRect.y,a.height=10),this.previousPoint=o,a.x>=this.margin&&a.y>=this.margin&&a.x-this.margin+a.width<=this.canvasWidth&&a.y-this.margin+a.height<=this.canvasHeight&&(this.cropRect=a,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},c.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var o=this.cropRect.x+this.cropRect.width/2,a=this.cropRect.y+this.cropRect.height/2,l=this.aspectRatio.getHorizontalLength(this.cropRect.height),f=this.aspectRatio.getVerticalLength(this.cropRect.width);l/this.canvasWidth<f/this.canvasHeight?this.cropRect.width=l:this.cropRect.height=f,this.cropRect.width>this.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=o-this.cropRect.width/2,this.cropRect.y=a-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)}},c.prototype.getRescaledRect=function(o,a,l,f,d,he){var Ze=l/o,rt=f/a;return{x:(d.x-he)*Ze+he,y:(d.y-he)*rt+he,width:d.width*Ze,height:d.height*rt}},c.prototype.scaleCanvas=function(o,a){var l=this.getRescaledRect(this.canvasWidth,this.canvasHeight,o,a,this.cropRect,this.margin);this.canvasWidth=o,this.canvasHeight=a,this.onCropChange&&this.onCropChange(l),this.setCropRectangle(l)},c}(),fn=function(){function c(o){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=o,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(c.prototype,"angle",{get:function(){return this._angle},set:function(o){this._angle=o,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),c.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},c.prototype.onPointerDown=function(o){this.controlContainer.setPointerCapture(o.pointerId),this.isDragging=!0,this.previousPoint={x:o.clientX,y:o.clientY}},c.prototype.onPointerMove=function(o){this.isDragging&&(this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.previousPoint.x=o.clientX)},c.prototype.onPointerUp=function(o){this.isDragging&&this.onAngleChange&&this.onAngleChange((o.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(o.pointerId)},c.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var o=this.angleLabelText.getBBox();bt.setAttributes(this.angleLabelElement,[["x",((this.width-o.width)/2).toString()],["y",(this.height/2).toString()]])}},c.prototype.positionScaleShape=function(){if(this.scaleShape){var o=this.scaleShape.transform.baseVal.getItem(0);o.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(o,0)}},c.prototype.getVisual=function(){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("width",this.width+"px"),o.setAttribute("height",this.height+"px"),o.setAttribute("viewBox","0 0 "+this.width+" "+this.height),o.style.flexShrink="0",document.body.appendChild(o);for(var a="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,l=1;l<=this.width/5+10;l++){var f=l%5==0?this.height/3:this.height/6;a+="h4v"+-f+"h1v"+f}a+="v1H0Z",this.scaleShape=bt.createPath(a);var d=bt.createTransform();this.scaleShape.transform.baseVal.appendItem(d),o.appendChild(this.scaleShape),this.angleLabelElement=bt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=bt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var he=bt.createTSpan("");return he.innerHTML="&deg;",this.angleLabelElement.appendChild(he),o.appendChild(this.angleLabelElement),document.body.removeChild(o),o},c}(),Vn=function(){function c(){this.naturalSize=!1,this.imageType="image/png"}return c.prototype.rasterize=function(o,a,l,f,d,he,Ze){var rt=this;return new Promise(function(ut){var $e=document.createElement("canvas");$e.width=o.width.baseVal.value-2*f,$e.height=o.height.baseVal.value-2*f;var Ct=1,gt=1;rt.naturalSize===!0?(Ct=a.naturalWidth/(o.width.baseVal.value-2*f)/he,gt=a.naturalHeight/(o.height.baseVal.value-2*f)/Ze,$e.width=a.naturalWidth/he,$e.height=a.naturalHeight/Ze):rt.width!==void 0&&rt.height!==void 0&&(Ct=rt.width/l.width,gt=rt.height/l.height,$e.width*=Ct,$e.height*=gt);var Bt=$e.getContext("2d");Bt.translate($e.width/2,$e.height/2),Bt.rotate(d*Math.PI/180),Bt.scale(he,Ze),Bt.translate(-$e.width/2,-$e.height/2),Bt.drawImage(a,0,0,$e.width,$e.height);var yn=document.createElement("canvas");yn.width=l.width*Ct,yn.height=l.height*gt,yn.getContext("2d").putImageData(Bt.getImageData((l.x-f)*Ct,(l.y-f)*gt,l.width*Ct,l.height*gt),0,0),ut(yn.toDataURL(rt.imageType,rt.imageQuality))})},c}(),Je=function(){function c(o){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=c.instanceCounter++,this.styles=new Et(this.instanceNo),this.target=o,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(c.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(o){this._zoomToCropEnabled=o,o?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(o){this._isGridVisible=o,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"gridLines",{get:function(){return this._gridLines},set:function(o){this._gridLines=o,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(o){this._rotationAngle=o,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"aspectRatio",{get:function(){var o;return(o=this._aspectRatio)!==null&&o!==void 0?o:this.aspectRatios[0]},set:function(o){this._aspectRatio=o},enumerable:!1,configurable:!0}),c.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},c.prototype.show=function(){this.showUI(),this.open()},c.prototype.close=function(o){o===void 0&&(o=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),o||this.closeEventListeners.forEach(function(a){return a()}),this._isOpen=!1)},c.prototype.addRenderEventListener=function(o){this.renderEventListeners.push(o)},c.prototype.removeRenderEventListener=function(o){this.renderEventListeners.indexOf(o)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(o),1)},c.prototype.addCloseEventListener=function(o){this.closeEventListeners.push(o)},c.prototype.removeCloseEventListener=function(o){this.closeEventListeners.indexOf(o)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(o),1)},c.prototype.setupResizeObserver=function(){var o=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){o.resize(o.target.clientWidth,o.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))},c.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var o=1*this.target.clientWidth/this.target.clientHeight,a=this.contentDiv.clientWidth/o>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*o:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,l=a+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/o;this.resize(a,l)}},c.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},c.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",bt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},c.prototype.resize=function(o,a){this.imageWidth=Math.round(o),this.imageHeight=Math.round(a),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},c.prototype.setEditingTarget=function(){var o=document.createElement("canvas");o.width=this.target.naturalWidth,o.height=this.target.naturalHeight,o.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var a=o.toDataURL();bt.setAttributes(this.editingTarget,[["href",a]]),this.setEditingTargetSize()},c.prototype.setTopLeft=function(){var o=this.target.getBoundingClientRect(),a=this.editorCanvas.getBoundingClientRect();this.left=o.left-a.left-this.CANVAS_MARGIN,this.top=o.top-a.top-this.CANVAS_MARGIN},c.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=bt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=bt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=bt.createGroup(),this.editingTargetRotationScaleContainer=bt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var o=bt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(o);var a=bt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(a),this.editingTargetContainer=bt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},c.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},c.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=bt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new gn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},c.prototype.zoomToCrop=function(){if(this.cropRect){var o=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,a=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=o+"px "+a+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-o+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-a+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},c.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},c.prototype.cropRectChanged=function(o){this.cropRect=o,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},c.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},c.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},c.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},c.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var o=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,a=this.target.offsetTop>o+this.CANVAS_MARGIN?this.target.offsetTop-(o+this.CANVAS_MARGIN):0;this.coverDiv.style.top=a+"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},c.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},c.prototype.addTopToolbar=function(){var o=this;this.topToolbar=new Wt,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 a=new Xt;a.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(a);var l=[];this.aspectRatios.forEach(function(gt){var Bt=new _t(An.getIcon(gt.horizontal,gt.vertical),gt.horizontal===0&&gt.vertical===0?"FREE":gt.horizontal+":"+gt.vertical);Bt.onClick=function(){return o.ratioButtonClicked(gt)},l.push(Bt)}),this.aspectRatioButton=new En(An.getIcon(0,0),"Aspect ratio",l),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,a.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var f=new _t('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");f.isActive=this.isGridVisible,f.onClick=function(){o.isGridVisible=!o.isGridVisible,f.isActive=o.isGridVisible},a.addButton(f);var d=new _t('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(d.isActive=this.zoomToCropEnabled,d.onClick=function(){o.zoomToCropEnabled=!o.zoomToCropEnabled,d.isActive=o.zoomToCropEnabled},a.addButton(d),!rn.isLicensed){var he=new vt;this.topToolbar.addElementBlock(he);var Ze=document.createElement("div");Ze.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var rt=document.createElement("a");rt.style.color="currentColor",rt.href="https://markerjs.com/products/cropro",rt.target="_blank",rt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ze.appendChild(rt),he.addElement(Ze)}var ut=new Xt;ut.minWidth=3*this.toolbarHeight+"px",ut.contentAlign="end",this.topToolbar.addButtonBlock(ut);var $e=new _t('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");$e.onClick=this.startRenderAndClose,ut.addButton($e),this.styles.settings.toolbarOkButtonStyleColorsClassName&&($e.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ct=new _t('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Ct.onClick=this.close,ut.addButton(Ct),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ct.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},c.prototype.addBottomToolbar=function(){var o=this;this.bottomToolbar=new Wt,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 a=new Xt;a.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(a);var l=new _t('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");l.onClick=this.rotateLeftButtonClicked,a.addButton(l);var f=new _t('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");f.onClick=this.rotateRightButtonClicked,a.addButton(f);var d=new vt;d.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(d),this.straightener=new fn("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(ut){o.rotateBy(ut),o.straightener.angle=o.rotationAngle},d.addElement(this.straightener.getUI());var he=new Xt;he.minWidth=2*this.toolbarHeight+"px",he.contentAlign="end",this.bottomToolbar.addButtonBlock(he);var Ze=new _t('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ze.onClick=this.flipHorizontallyButtonClicked,he.addButton(Ze);var rt=new _t('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");rt.onClick=this.flipVerticallyButtonClicked,he.addButton(rt)},c.prototype.ratioButtonClicked=function(o){this.aspectRatio=o,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},c.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=An.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},c.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ln(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},c.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},c.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},c.prototype.restoreState=function(o){if(o){var a=this.cropLayer.getRescaledRect(o.width,o.height,this.imageWidth,this.imageHeight,o.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(a),this.cropRectChanged(a),this.flippedHorizontally=o.flippedHorizontally,this.flippedVertically=o.flippedVertically,this.applyFlip(),this.rotationAngle=o.rotationAngle,this.applyRotation()}},c.prototype.clientToLocalCoordinates=function(o,a){var l=this.cropImage.getBoundingClientRect();return{x:o-l.left,y:a-l.top}},c.prototype.onWindowResize=function(){this.positionUI()},c.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var o=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=o+"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()},c.prototype.rotateLeftButtonClicked=function(){var o=this.rotationAngle-90;this.rotationAngle%90!=0&&(o+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(o)},c.prototype.rotateRightButtonClicked=function(){var o=this.rotationAngle+90;this.rotationAngle%90!=0&&(o-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(o)},c.prototype.rotateTo=function(o){o=(o=o>180?o-360:o)<=-180?o+360:o,this.rotationAngle=o,this.applyRotation()},c.prototype.rotateBy=function(o){this.rotateTo((this.rotationAngle+o)%360)},c.prototype.applyRotation=function(){var o=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var a=this.editingTargetRotationContainer.transform.baseVal.getItem(0);a.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(a,0);var l=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/l.width,this.imageHeight/l.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=o},c.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},c.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},c.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},c.prototype.startRenderAndClose=function(){return Lt(this,void 0,void 0,function(){var o,a;return zt(this,function(l){switch(l.label){case 0:return[4,this.render()];case 1:return o=l.sent(),a=this.getState(),this.renderEventListeners.forEach(function(f){return f(o,a)}),this.close(!0),[2]}})})},c.prototype.render=function(){return Lt(this,void 0,void 0,function(){var o;return zt(this,function(a){switch(a.label){case 0:return(o=new Vn).naturalSize=this.renderAtNaturalSize,o.imageType=this.renderImageType,o.imageQuality=this.renderImageQuality,o.width=this.renderWidth,o.height=this.renderHeight,this.unzoomFromCrop(),bt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,o.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 a.sent(),[4,o.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,a.sent()]}})})},c.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new xt("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 xt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new xt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var o=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new xt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*o)+`px;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new xt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new xt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new xt("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 xt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new xt("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 xt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*o)+`px;
padding: `+o+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new xt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},c.instanceCounter=0,c}(),ht=h("8hTe"),It=h.n(ht),Kt=/<pre[^>]*>/g;function Jt(c){var o=document.createElement("div");return o.innerHTML=c,o.childNodes.length===0?"":o.childNodes[0].nodeValue}var qt=Ce.a=function(c){var o=c.value,a=o===void 0?"":o,l=c.edit,f=l===void 0?!1:l,d=c.className,he=c.showTextOnly,Ze=c.showLines,rt=c.replaces,ut=c.zoomImg,$e=c.hasMask,Ct=c.style,gt=Ct===void 0?{}:Ct,Bt=c.stylesPrev,yn=Bt===void 0?{}:Bt,cn=String(a),on=Object(B.useRef)(),kn=Object(B.useRef)(),Xn=Object(B.useState)(""),wn=Object(Y.a)(Xn,2),en=wn[0],bn=wn[1],Qn=Object(B.useState)("office"),Sn=Object(Y.a)(Qn,2),ci=Sn[0],Tn=Sn[1],Bn=function(){var $t=new Je(kn.current);$t.displayMode="popup",$t.addRenderEventListener(function(){var Ln=Object(ue.a)(F.a.mark(function Gt(Cn){var Zt;return F.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return on.current.style.display="none",vn.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Cn}});case 3:Zt=vn.sent,Zt!=null&&Zt.id&&rt(kn.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 5:case"end":return vn.stop()}},Gt)}));return function(Gt){return Ln.apply(this,arguments)}}()),$t.show()},tn=function(){var $t=new Nt(kn.current);$t.settings.displayMode="popup",$t.addEventListener("render",function(){var Ln=Object(ue.a)(F.a.mark(function Gt(Cn){var Zt;return F.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:if(on.current.style.display="none",!kn.current){vn.next=6;break}return vn.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Cn.dataUrl}});case 4:Zt=vn.sent,Zt!=null&&Zt.id&&rt(kn.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 6:case"end":return vn.stop()}},Gt)}));return function(Gt){return Ln.apply(this,arguments)}}()),$t.show(),window.markerArea=$t},Tt=Object(B.useMemo)(function(){try{var pn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ln=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;cn=cn.replace(pn,"("+ae.a.API_SERVER+"/api/attachments/").replace($t,'"'+ae.a.API_SERVER+"/api/attachments/").replace(Ln,'"'+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,`
`),cn=cn.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Yn){}var Gt=V(cn),Cn=Ae();if(cn.match(/\[TOC\]/)&&(Gt=Gt.replace("<p>[TOC]</p>",xe()),de()),Gt=Gt.replace(/(__special_katext_id_\d+__)/g,function(Yn,vn){var Mn=Cn[vn],yi=Mn.type,ii=Mn.expression;return Object(Te.renderToString)(Jt(ii)||"",{displayMode:yi==="block",throwOnError:!1,output:"html"})}),Gt=Gt.replace(/▁/g,"\u2581\u2581\u2581"),oe(),he){var Zt=document.createElement("div");return Zt.innerHTML=Gt,Zt.innerText}return setTimeout(function(){return dn()},500),Gt},[cn]),ct=Object(B.useRef)();pe.WebkitLineClamp=Ze,Ze&&(gt=Object(ge.a)(Object(ge.a)({},gt),pe));function Nn(pn){var $t=pn.target;if($t.tagName.toUpperCase()==="IMG"){if(ut){var Ln=$t.getAttribute("src");bn(Ln),Tn("image")}}else if($t.tagName.toUpperCase()==="A"){var Gt=$t.getAttribute("href");if(Gt.indexOf("office")>-1)pn.preventDefault(),bn(Gt),Tn("office");else if(Gt.indexOf("application/pdf")>-1)pn.preventDefault(),bn(Gt),Tn("pdf");else if(Gt.indexOf("type=text")>-1)pn.preventDefault(),bn(Gt),Tn("html");else if(Gt.startsWith("#")){pn.preventDefault();var Cn=document.getElementById(Gt.replace("#",""));Cn&&Cn.scrollIntoView(!0)}}}var dn=function(){var $t,Ln=($t=ct.current)===null||$t===void 0?void 0:$t.querySelectorAll("video");Ln==null||Ln.forEach(function(Gt){if(Gt.oncontextmenu=function(){return!1},Gt.src.indexOf(".m3u8")>-1&&!Gt.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var Cn=new H.a;Cn.loadSource(Gt.src),Cn.attachMedia(Gt)}}})};Object(B.useEffect)(function(){if(ct.current&&Tt&&(Tt.match(Kt)&&window.PR.prettyPrint()),ct.current)return ct.current.addEventListener("click",Nn),function(){ct.current.removeEventListener("click",Nn),oe(),de()}},[Tt,ct.current,Nn]);var $n=function($t){if(!f)return;$t.target.nodeName==="IMG"?(on.current.style.display="flex",on.current.style.width=$t.target.clientWidth+"px",on.current.style.height=$t.target.clientHeight+"px",on.current.style.top=$t.target.offsetTop+"px",on.current.style.left=$t.target.offsetLeft+"px",kn.current.src=$t.target.getAttribute("src")):on.current.style.display="none"};return C.a.createElement("div",{style:{position:"relative"}},C.a.createElement("div",{ref:ct,style:Object(ge.a)({},gt),className:"".concat(d||""," markdown-body ").concat(It.a.mdBody),onMouseOver:$n,dangerouslySetInnerHTML:{__html:Tt}}),C.a.createElement("div",{ref:on,className:It.a.button},C.a.createElement(ke.a,null,C.a.createElement(De.a,{onClick:function(){return Bn()}},"\u88C1\u526A"),C.a.createElement(De.a,{onClick:function(){return tn()}},"\u7F16\u8F91"))),C.a.createElement("img",{ref:kn,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),C.a.createElement(We.a,{close:!0,data:en,hasMask:$e,type:en!=null&&en.length?ci:"",style:Object(ge.a)({},yn),onClose:function(){return bn("")}}))}},"9VGf":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q=h("q1tI"),ke=h.n(q);function Ee(De,ge){var ue=Object(q.useRef)();Object(q.useEffect)(function(){ue.current=De}),Object(q.useEffect)(function(){function Y(){ue.current()}if(ge!==null){var J=setInterval(Y,ge);return function(){return clearInterval(J)}}},[ge])}},Bd2K:function(mt,Ce,h){(function(q){q(h("VrN/"),h("osHv"))})(function(q){q.defineOption("autoCloseTags",!1,function(F,B,C){if(C!=q.Init&&C&&F.removeKeyMap("autoCloseTags"),!B)return;var E={name:"autoCloseTags"};(typeof B!="object"||B.whenClosing!==!1)&&(E["'/'"]=function(M){return ue(M)}),(typeof B!="object"||B.whenOpening!==!1)&&(E["'>'"]=function(M){return De(M)}),F.addKeyMap(E)});var ke=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ee=["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 De(F){if(F.getOption("disableInput"))return q.Pass;for(var B=F.listSelections(),C=[],E=F.getOption("autoCloseTags"),M=0;M<B.length;M++){if(!B[M].empty())return q.Pass;var S=B[M].head,w=F.getTokenAt(S),P=q.innerMode(F.getMode(),w.state),g=P.state,y=P.mode.xmlCurrentTag&&P.mode.xmlCurrentTag(g),O=y&&y.name;if(!O)return q.Pass;var W=P.mode.configuration=="html",de=typeof E=="object"&&E.dontCloseTags||W&&ke,pe=typeof E=="object"&&E.indentTags||W&&Ee;w.end>S.ch&&(O=O.slice(0,O.length-w.end+S.ch));var re=O.toLowerCase();if(!O||w.type=="string"&&(w.end!=S.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&y.close||w.string.indexOf("/")==S.ch-w.start-1||de&&Y(de,re)>-1||J(F,P.mode.xmlCurrentContext&&P.mode.xmlCurrentContext(g)||[],O,S,!0))return q.Pass;var xe=typeof E=="object"&&E.emptyTags;if(xe&&Y(xe,O)>-1){C[M]={text:"/>",newPos:q.Pos(S.line,S.ch+2)};continue}var ye=pe&&Y(pe,re)>-1;C[M]={indent:ye,text:">"+(ye?`
`:"")+"</"+O+">",newPos:ye?q.Pos(S.line+1,0):q.Pos(S.line,S.ch+1)}}for(var Q=typeof E=="object"&&E.dontIndentOnAutoClose,M=B.length-1;M>=0;M--){var we=C[M];F.replaceRange(we.text,B[M].head,B[M].anchor,"+insert");var Z=F.listSelections().slice(0);Z[M]={head:we.newPos,anchor:we.newPos},F.setSelections(Z),!Q&&we.indent&&(F.indentLine(we.newPos.line,null,!0),F.indentLine(we.newPos.line+1,null,!0))}}function ge(F,B){for(var C=F.listSelections(),E=[],M=B?"/":"</",S=F.getOption("autoCloseTags"),w=typeof S=="object"&&S.dontIndentOnSlash,P=0;P<C.length;P++){if(!C[P].empty())return q.Pass;var g=C[P].head,y=F.getTokenAt(g),O=q.innerMode(F.getMode(),y.state),W=O.state;if(B&&(y.type=="string"||y.string.charAt(0)!="<"||y.start!=g.ch-1))return q.Pass;var de,pe=O.mode.name!="xml"&&F.getMode().name=="htmlmixed";if(pe&&O.mode.name=="javascript")de=M+"script";else if(pe&&O.mode.name=="css")de=M+"style";else{var re=O.mode.xmlCurrentContext&&O.mode.xmlCurrentContext(W);if(!re||re.length&&J(F,re,re[re.length-1],g))return q.Pass;de=M+re[re.length-1]}F.getLine(g.line).charAt(y.end)!=">"&&(de+=">"),E[P]=de}if(F.replaceSelections(E),C=F.listSelections(),!w)for(var P=0;P<C.length;P++)(P==C.length-1||C[P].head.line<C[P+1].head.line)&&F.indentLine(C[P].head.line)}function ue(F){return F.getOption("disableInput")?q.Pass:ge(F,!0)}q.commands.closeTag=function(F){return ge(F)};function Y(F,B){if(F.indexOf)return F.indexOf(B);for(var C=0,E=F.length;C<E;++C)if(F[C]==B)return C;return-1}function J(F,B,C,E,M){if(!q.scanForClosingTag)return!1;var S=Math.min(F.lastLine()+1,E.line+500),w=q.scanForClosingTag(F,E,null,S);if(!w||w.tag!=C)return!1;for(var P=M?1:0,g=B.length-1;g>=0&&B[g]==C;g--)++P;E=w.to;for(var g=1;g<P;g++){var y=q.scanForClosingTag(F,E,null,S);if(!y||y.tag!=C)return!1;E=y.to}return!0}})},BjJ7:function(mt,Ce,h){"use strict";h.d(Ce,"d",function(){return ke}),h.d(Ce,"c",function(){return Ee}),h.d(Ce,"e",function(){return De}),h.d(Ce,"b",function(){return ge}),h.d(Ce,"a",function(){return Y});var q=h("m3rI");function ke(J){var F=!0;if(J.length>0){for(var B=0;B<J.length;B++)if(J[B].compile_success==0||!J[B].compile_success){F=!1;break}}else F=!1;return F}function Ee(J){for(var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",B=[],C=0;C<J.length;C++){var E=J[C],M=F?"".concat(F,"/").concat(E.name):"".concat(E.name);B.push({title:E.name,isLeaf:!(E.type==="tree"),key:M})}return B}function De(J,F,B){for(var C=0;C<J.length;C++){var E=J[C];if(E.key===F){E.children=B;break}E.children&&De(E.children,F,B)}return J}function ge(J,F,B){var C;return function(){var E=this,M=arguments,S=function(){C=null,B||J.apply(E,M)},w=B&&!C;clearTimeout(C),C=setTimeout(S,F),w&&J.apply(E,M)}}var ue=!0,Y=q.a.API_SERVER},"C+DQ":function(mt,Ce,h){},"C/vA":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return q});function q(ke){var Ee=this,De=!1,ge;return function(){return De||(De=!0,ge=ke.apply(Ee,arguments)),ge}}},"Cg/j":function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return q}),h.d(Ce,"a",function(){return ke}),h.d(Ce,"c",function(){return De}),h.d(Ce,"d",function(){return ge});var q;(function(ue){ue.serviceIds=new Map,ue.DI_TARGET="$di$target",ue.DI_DEPENDENCIES="$di$dependencies";function Y(J){return J[ue.DI_DEPENDENCIES]||[]}ue.getServiceDependencies=Y})(q||(q={}));var ke=De("instantiationService");function Ee(ue,Y,J,F){Y[q.DI_TARGET]===Y?Y[q.DI_DEPENDENCIES].push({id:ue,index:J,optional:F}):(Y[q.DI_DEPENDENCIES]=[{id:ue,index:J,optional:F}],Y[q.DI_TARGET]=Y)}function De(ue){if(q.serviceIds.has(ue))return q.serviceIds.get(ue);var Y=function(J,F,B){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ee(Y,J,B,!1)};return Y.toString=function(){return ue},q.serviceIds.set(ue,Y),Y}function ge(ue){return function(Y,J,F){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Ee(ue,Y,F,!0)}}},DlQD:function(mt,Ce,h){(function(q,ke){mt.exports=ke()})(this,function(){"use strict";function q(me,se){for(var ve=0;ve<se.length;ve++){var R=se[ve];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(me,R.key,R)}}function ke(me,se,ve){return se&&q(me.prototype,se),ve&&q(me,ve),me}function Ee(me,se){if(!me)return;if(typeof me=="string")return De(me,se);var ve=Object.prototype.toString.call(me).slice(8,-1);if(ve==="Object"&&me.constructor&&(ve=me.constructor.name),ve==="Map"||ve==="Set")return Array.from(me);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return De(me,se)}function De(me,se){(se==null||se>me.length)&&(se=me.length);for(var ve=0,R=new Array(se);ve<se;ve++)R[ve]=me[ve];return R}function ge(me,se){var ve;if(typeof Symbol=="undefined"||me[Symbol.iterator]==null){if(Array.isArray(me)||(ve=Ee(me))||se&&me&&typeof me.length=="number"){ve&&(me=ve);var R=0;return function(){return R>=me.length?{done:!0}:{done:!1,value:me[R++]}}}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 ve=me[Symbol.iterator](),ve.next.bind(ve)}function ue(me,se){return se={exports:{}},me(se,se.exports),se.exports}var Y=ue(function(me){function se(){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 ve(R){me.exports.defaults=R}me.exports={defaults:se(),getDefaults:se,changeDefaults:ve}}),J=Y.defaults,F=Y.getDefaults,B=Y.changeDefaults,C=/[&<>"']/,E=/[&<>"']/g,M=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P=function(se){return w[se]};function g(me,se){if(se){if(C.test(me))return me.replace(E,P)}else if(M.test(me))return me.replace(S,P);return me}var y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function O(me){return me.replace(y,function(se,ve){return ve=ve.toLowerCase(),ve==="colon"?":":ve.charAt(0)==="#"?ve.charAt(1)==="x"?String.fromCharCode(parseInt(ve.substring(2),16)):String.fromCharCode(+ve.substring(1)):""})}var W=/(^|[^\[])\^/g;function de(me,se){me=me.source||me,se=se||"";var ve={replace:function(U,ee){return ee=ee.source||ee,ee=ee.replace(W,"$1"),me=me.replace(U,ee),ve},getRegex:function(){return new RegExp(me,se)}};return ve}var pe=/[^\w:]/g,re=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function xe(me,se,ve){if(me){var R;try{R=decodeURIComponent(O(ve)).replace(pe,"").toLowerCase()}catch(U){return null}if(R.indexOf("javascript:")===0||R.indexOf("vbscript:")===0||R.indexOf("data:")===0)return null}se&&!re.test(ve)&&(ve=j(se,ve));try{ve=encodeURI(ve).replace(/%25/g,"%")}catch(U){return null}return ve}var ye={},Q=/^[^:]+:\/*[^/]*$/,we=/^([^:]+:)[\s\S]*$/,Z=/^([^:]+:\/*[^/]*)[\s\S]*$/;function j(me,se){ye[" "+me]||(Q.test(me)?ye[" "+me]=me+"/":ye[" "+me]=z(me,"/",!0)),me=ye[" "+me];var ve=me.indexOf(":")===-1;return se.substring(0,2)==="//"?ve?se:me.replace(we,"$1")+se:se.charAt(0)==="/"?ve?se:me.replace(Z,"$1")+se:me+se}var Ae={exec:function(){}};function oe(me){for(var se=1,ve,R;se<arguments.length;se++){ve=arguments[se];for(R in ve)Object.prototype.hasOwnProperty.call(ve,R)&&(me[R]=ve[R])}return me}function K(me,se){var ve=me.replace(/\|/g,function(ee,ce,je){for(var Se=!1,qe=ce;--qe>=0&&je[qe]==="\\";)Se=!Se;return Se?"|":" |"}),R=ve.split(/ \|/),U=0;if(R.length>se)R.splice(se);else for(;R.length<se;)R.push("");for(;U<R.length;U++)R[U]=R[U].trim().replace(/\\\|/g,"|");return R}function z(me,se,ve){var R=me.length;if(R===0)return"";for(var U=0;U<R;){var ee=me.charAt(R-U-1);if(ee===se&&!ve)U++;else if(ee!==se&&ve)U++;else break}return me.substr(0,R-U)}function te(me,se){if(me.indexOf(se[1])===-1)return-1;for(var ve=me.length,R=0,U=0;U<ve;U++)if(me[U]==="\\")U++;else if(me[U]===se[0])R++;else if(me[U]===se[1]&&(R--,R<0))return U;return-1}function G(me){me&&me.sanitize&&!me.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var V={escape:g,unescape:O,edit:de,cleanUrl:xe,resolveUrl:j,noopTest:Ae,merge:oe,splitCells:K,rtrim:z,findClosingBracket:te,checkSanitizeDeprecation:G},m=Y.defaults,p=V.rtrim,H=V.splitCells,ae=V.escape,Te=V.findClosingBracket;function We(me,se,ve){var R=se.href,U=se.title?ae(se.title):null,ee=me[1].replace(/\\([\[\]])/g,"$1");return me[0].charAt(0)!=="!"?{type:"link",raw:ve,href:R,title:U,text:ee}:{type:"image",raw:ve,href:R,title:U,text:ae(ee)}}function Re(me,se){var ve=me.match(/^(\s+)(?:```)/);if(ve===null)return se;var R=ve[1];return se.split(`
`).map(function(U){var ee=U.match(/^\s+/);if(ee===null)return U;var ce=ee[0];return ce.length>=R.length?U.slice(R.length):U}).join(`
`)}var Pe=function(){function me(ve){this.options=ve||m}var se=me.prototype;return se.space=function(R){var U=this.rules.block.newline.exec(R);if(U)return U[0].length>1?{type:"space",raw:U[0]}:{raw:`
`}},se.code=function(R,U){var ee=this.rules.block.code.exec(R);if(ee){var ce=U[U.length-1];if(ce&&ce.type==="paragraph")return{raw:ee[0],text:ee[0].trimRight()};var je=ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:ee[0],codeBlockStyle:"indented",text:this.options.pedantic?je:p(je,`
`)}}},se.fences=function(R){var U=this.rules.block.fences.exec(R);if(U){var ee=U[0],ce=Re(ee,U[3]||"");return{type:"code",raw:ee,lang:U[2]?U[2].trim():U[2],text:ce}}},se.heading=function(R){var U=this.rules.block.heading.exec(R);if(U)return{type:"heading",raw:U[0],depth:U[1].length,text:U[2]}},se.nptable=function(R){var U=this.rules.block.nptable.exec(R);if(U){var ee={type:"table",header:H(U[1].replace(/^ *| *\| *$/g,"")),align:U[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:U[3]?U[3].replace(/\n$/,"").split(`
`):[],raw:U[0]};if(ee.header.length===ee.align.length){var ce=ee.align.length,je;for(je=0;je<ce;je++)/^ *-+: *$/.test(ee.align[je])?ee.align[je]="right":/^ *:-+: *$/.test(ee.align[je])?ee.align[je]="center":/^ *:-+ *$/.test(ee.align[je])?ee.align[je]="left":ee.align[je]=null;for(ce=ee.cells.length,je=0;je<ce;je++)ee.cells[je]=H(ee.cells[je],ee.header.length);return ee}}},se.hr=function(R){var U=this.rules.block.hr.exec(R);if(U)return{type:"hr",raw:U[0]}},se.blockquote=function(R){var U=this.rules.block.blockquote.exec(R);if(U){var ee=U[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:U[0],text:ee}}},se.list=function(R){var U=this.rules.block.list.exec(R);if(U){for(var ee=U[0],ce=U[2],je=ce.length>1,Se=ce[ce.length-1]===")",qe={type:"list",raw:ee,ordered:je,start:je?+ce.slice(0,-1):"",loose:!1,items:[]},at=U[0].match(this.rules.block.item),st=!1,lt,St,Ot,dt,Ht,Nt,At,kt=at.length,Lt=0;Lt<kt;Lt++)lt=at[Lt],ee=lt,St=lt.length,lt=lt.replace(/^ *([*+-]|\d+[.)]) */,""),~lt.indexOf(`
`)&&(St-=lt.length,lt=this.options.pedantic?lt.replace(/^ {1,4}/gm,""):lt.replace(new RegExp("^ {1,"+St+"}","gm"),"")),Lt!==kt-1&&(Ot=this.rules.block.bullet.exec(at[Lt+1])[0],(je?Ot.length===1||!Se&&Ot[Ot.length-1]===")":Ot.length>1||this.options.smartLists&&Ot!==ce)&&(dt=at.slice(Lt+1).join(`
`),qe.raw=qe.raw.substring(0,qe.raw.length-dt.length),Lt=kt-1)),Ht=st||/\n\n(?!\s*$)/.test(lt),Lt!==kt-1&&(st=lt.charAt(lt.length-1)===`
`,Ht||(Ht=st)),Ht&&(qe.loose=!0),Nt=/^\[[ xX]\] /.test(lt),At=void 0,Nt&&(At=lt[1]!==" ",lt=lt.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:ee,task:Nt,checked:At,loose:Ht,text:lt});return qe}},se.html=function(R){var U=this.rules.block.html.exec(R);if(U)return{type:this.options.sanitize?"paragraph":"html",raw:U[0],pre:!this.options.sanitizer&&(U[1]==="pre"||U[1]==="script"||U[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(U[0]):ae(U[0]):U[0]}},se.def=function(R){var U=this.rules.block.def.exec(R);if(U){U[3]&&(U[3]=U[3].substring(1,U[3].length-1));var ee=U[1].toLowerCase().replace(/\s+/g," ");return{tag:ee,raw:U[0],href:U[2],title:U[3]}}},se.table=function(R){var U=this.rules.block.table.exec(R);if(U){var ee={type:"table",header:H(U[1].replace(/^ *| *\| *$/g,"")),align:U[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:U[3]?U[3].replace(/\n$/,"").split(`
`):[]};if(ee.header.length===ee.align.length){ee.raw=U[0];var ce=ee.align.length,je;for(je=0;je<ce;je++)/^ *-+: *$/.test(ee.align[je])?ee.align[je]="right":/^ *:-+: *$/.test(ee.align[je])?ee.align[je]="center":/^ *:-+ *$/.test(ee.align[je])?ee.align[je]="left":ee.align[je]=null;for(ce=ee.cells.length,je=0;je<ce;je++)ee.cells[je]=H(ee.cells[je].replace(/^ *\| *| *\| *$/g,""),ee.header.length);return ee}}},se.lheading=function(R){var U=this.rules.block.lheading.exec(R);if(U)return{type:"heading",raw:U[0],depth:U[2].charAt(0)==="="?1:2,text:U[1]}},se.paragraph=function(R){var U=this.rules.block.paragraph.exec(R);if(U)return{type:"paragraph",raw:U[0],text:U[1].charAt(U[1].length-1)===`
`?U[1].slice(0,-1):U[1]}},se.text=function(R,U){var ee=this.rules.block.text.exec(R);if(ee){var ce=U[U.length-1];return ce&&ce.type==="text"?{raw:ee[0],text:ee[0]}:{type:"text",raw:ee[0],text:ee[0]}}},se.escape=function(R){var U=this.rules.inline.escape.exec(R);if(U)return{type:"escape",raw:U[0],text:ae(U[1])}},se.tag=function(R,U,ee){var ce=this.rules.inline.tag.exec(R);if(ce)return!U&&/^<a /i.test(ce[0])?U=!0:U&&/^<\/a>/i.test(ce[0])&&(U=!1),!ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(ce[0])?ee=!0:ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ce[0])&&(ee=!1),{type:this.options.sanitize?"text":"html",raw:ce[0],inLink:U,inRawBlock:ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ae(ce[0]):ce[0]}},se.link=function(R){var U=this.rules.inline.link.exec(R);if(U){var ee=Te(U[2],"()");if(ee>-1){var ce=U[0].indexOf("!")===0?5:4,je=ce+U[1].length+ee;U[2]=U[2].substring(0,ee),U[0]=U[0].substring(0,je).trim(),U[3]=""}var Se=U[2],qe="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Se);at?(Se=at[1],qe=at[3]):qe=""}else qe=U[3]?U[3].slice(1,-1):"";Se=Se.trim().replace(/^<([\s\S]*)>$/,"$1");var st=We(U,{href:Se&&Se.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},U[0]);return st}},se.reflink=function(R,U){var ee;if((ee=this.rules.inline.reflink.exec(R))||(ee=this.rules.inline.nolink.exec(R))){var ce=(ee[2]||ee[1]).replace(/\s+/g," ");if(ce=U[ce.toLowerCase()],!ce||!ce.href){var je=ee[0].charAt(0);return{type:"text",raw:je,text:je}}var Se=We(ee,ce,ee[0]);return Se}},se.strong=function(R,U,ee){ee===void 0&&(ee="");var ce=this.rules.inline.strong.start.exec(R);if(ce&&(!ce[1]||ce[1]&&(ee===""||this.rules.inline.punctuation.exec(ee)))){U=U.slice(-1*R.length);var je=ce[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;je.lastIndex=0;for(var Se;(ce=je.exec(U))!=null;)if(Se=this.rules.inline.strong.middle.exec(U.slice(0,ce.index+3)),Se)return{type:"strong",raw:R.slice(0,Se[0].length),text:R.slice(2,Se[0].length-2)}}},se.em=function(R,U,ee){ee===void 0&&(ee="");var ce=this.rules.inline.em.start.exec(R);if(ce&&(!ce[1]||ce[1]&&(ee===""||this.rules.inline.punctuation.exec(ee)))){U=U.slice(-1*R.length);var je=ce[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;je.lastIndex=0;for(var Se;(ce=je.exec(U))!=null;)if(Se=this.rules.inline.em.middle.exec(U.slice(0,ce.index+2)),Se)return{type:"em",raw:R.slice(0,Se[0].length),text:R.slice(1,Se[0].length-1)}}},se.codespan=function(R){var U=this.rules.inline.code.exec(R);if(U){var ee=U[2].replace(/\n/g," "),ce=/[^ ]/.test(ee),je=ee.startsWith(" ")&&ee.endsWith(" ");return ce&&je&&(ee=ee.substring(1,ee.length-1)),ee=ae(ee,!0),{type:"codespan",raw:U[0],text:ee}}},se.br=function(R){var U=this.rules.inline.br.exec(R);if(U)return{type:"br",raw:U[0]}},se.del=function(R){var U=this.rules.inline.del.exec(R);if(U)return{type:"del",raw:U[0],text:U[1]}},se.autolink=function(R,U){var ee=this.rules.inline.autolink.exec(R);if(ee){var ce,je;return ee[2]==="@"?(ce=ae(this.options.mangle?U(ee[1]):ee[1]),je="mailto:"+ce):(ce=ae(ee[1]),je=ce),{type:"link",raw:ee[0],text:ce,href:je,tokens:[{type:"text",raw:ce,text:ce}]}}},se.url=function(R,U){var ee;if(ee=this.rules.inline.url.exec(R)){var ce,je;if(ee[2]==="@")ce=ae(this.options.mangle?U(ee[0]):ee[0]),je="mailto:"+ce;else{var Se;do Se=ee[0],ee[0]=this.rules.inline._backpedal.exec(ee[0])[0];while(Se!==ee[0]);ce=ae(ee[0]),ee[1]==="www."?je="http://"+ce:je=ce}return{type:"link",raw:ee[0],text:ce,href:je,tokens:[{type:"text",raw:ce,text:ce}]}}},se.inlineText=function(R,U,ee){var ce=this.rules.inline.text.exec(R);if(ce){var je;return U?je=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ae(ce[0]):ce[0]:je=ae(this.options.smartypants?ee(ce[0]):ce[0]),{type:"text",raw:ce[0],text:je}}},me}(),ne=V.noopTest,_=V.edit,X=V.merge,N={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*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\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:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};N._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,N._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,N.def=_(N.def).replace("label",N._label).replace("title",N._title).getRegex(),N.bullet=/(?:[*+-]|\d{1,9}[.)])/,N.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,N.item=_(N.item,"gm").replace(/bull/g,N.bullet).getRegex(),N.list=_(N.list).replace(/bull/g,N.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+N.def.source+")").getRegex(),N._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",N._comment=/<!--(?!-?>)[\s\S]*?-->/,N.html=_(N.html,"i").replace("comment",N._comment).replace("tag",N._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N.paragraph=_(N._paragraph).replace("hr",N.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",N._tag).getRegex(),N.blockquote=_(N.blockquote).replace("paragraph",N.paragraph).getRegex(),N.normal=X({},N),N.gfm=X({},N.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*|$)"}),N.gfm.nptable=_(N.gfm.nptable).replace("hr",N.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",N._tag).getRegex(),N.gfm.table=_(N.gfm.table).replace("hr",N.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",N._tag).getRegex(),N.pedantic=X({},N.normal,{html:_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",N._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:ne,paragraph:_(N.normal._paragraph).replace("hr",N.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",N.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var I={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};I._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",I.punctuation=_(I.punctuation).replace(/punctuation/g,I._punctuation).getRegex(),I._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",I._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",I.em.start=_(I.em.start).replace(/punctuation/g,I._punctuation).getRegex(),I.em.middle=_(I.em.middle).replace(/punctuation/g,I._punctuation).replace(/overlapSkip/g,I._overlapSkip).getRegex(),I.em.endAst=_(I.em.endAst,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.em.endUnd=_(I.em.endUnd,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.strong.start=_(I.strong.start).replace(/punctuation/g,I._punctuation).getRegex(),I.strong.middle=_(I.strong.middle).replace(/punctuation/g,I._punctuation).replace(/blockSkip/g,I._blockSkip).getRegex(),I.strong.endAst=_(I.strong.endAst,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.strong.endUnd=_(I.strong.endUnd,"g").replace(/punctuation/g,I._punctuation).getRegex(),I.blockSkip=_(I._blockSkip,"g").getRegex(),I.overlapSkip=_(I._overlapSkip,"g").getRegex(),I._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,I._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,I._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])?)+(?![-_])/,I.autolink=_(I.autolink).replace("scheme",I._scheme).replace("email",I._email).getRegex(),I._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,I.tag=_(I.tag).replace("comment",N._comment).replace("attribute",I._attribute).getRegex(),I._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,I._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,I._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,I.link=_(I.link).replace("label",I._label).replace("href",I._href).replace("title",I._title).getRegex(),I.reflink=_(I.reflink).replace("label",I._label).getRegex(),I.reflinkSearch=_(I.reflinkSearch,"g").replace("reflink",I.reflink).replace("nolink",I.nolink).getRegex(),I.normal=X({},I),I.pedantic=X({},I.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:_(/^!?\[(label)\]\((.*?)\)/).replace("label",I._label).getRegex(),reflink:_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I._label).getRegex()}),I.gfm=X({},I.normal,{escape:_(I.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),I.gfm.url=_(I.gfm.url,"i").replace("email",I.gfm._extended_email).getRegex(),I.breaks=X({},I.gfm,{br:_(I.br).replace("{2,}","*").getRegex(),text:_(I.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var x={block:N,inline:I},k=Y.defaults,D=x.block,$=x.inline;function L(me){return me.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function A(me){var se="",ve,R,U=me.length;for(ve=0;ve<U;ve++)R=me.charCodeAt(ve),Math.random()>.5&&(R="x"+R.toString(16)),se+="&#"+R+";";return se}var ie=function(){function me(ve){this.tokens=[],this.tokens.links=Object.create(null),this.options=ve||k,this.options.tokenizer=this.options.tokenizer||new Pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var R={block:D.normal,inline:$.normal};this.options.pedantic?(R.block=D.pedantic,R.inline=$.pedantic):this.options.gfm&&(R.block=D.gfm,this.options.breaks?R.inline=$.breaks:R.inline=$.gfm),this.tokenizer.rules=R}me.lex=function(R,U){var ee=new me(U);return ee.lex(R)};var se=me.prototype;return se.lex=function(R){return R=R.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(R,this.tokens,!0),this.inline(this.tokens),this.tokens},se.blockTokens=function(R,U,ee){U===void 0&&(U=[]),ee===void 0&&(ee=!0),R=R.replace(/^ +$/gm,"");for(var ce,je,Se,qe;R;){if(ce=this.tokenizer.space(R)){R=R.substring(ce.raw.length),ce.type&&U.push(ce);continue}if(ce=this.tokenizer.code(R,U)){R=R.substring(ce.raw.length),ce.type?U.push(ce):(qe=U[U.length-1],qe.raw+=`
`+ce.raw,qe.text+=`
`+ce.text);continue}if(ce=this.tokenizer.fences(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.heading(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.nptable(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.hr(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.blockquote(R)){R=R.substring(ce.raw.length),ce.tokens=this.blockTokens(ce.text,[],ee),U.push(ce);continue}if(ce=this.tokenizer.list(R)){for(R=R.substring(ce.raw.length),Se=ce.items.length,je=0;je<Se;je++)ce.items[je].tokens=this.blockTokens(ce.items[je].text,[],!1);U.push(ce);continue}if(ce=this.tokenizer.html(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ee&&(ce=this.tokenizer.def(R))){R=R.substring(ce.raw.length),this.tokens.links[ce.tag]||(this.tokens.links[ce.tag]={href:ce.href,title:ce.title});continue}if(ce=this.tokenizer.table(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.lheading(R)){R=R.substring(ce.raw.length),U.push(ce);continue}if(ee&&(ce=this.tokenizer.paragraph(R))){R=R.substring(ce.raw.length),U.push(ce);continue}if(ce=this.tokenizer.text(R,U)){R=R.substring(ce.raw.length),ce.type?U.push(ce):(qe=U[U.length-1],qe.raw+=`
`+ce.raw,qe.text+=`
`+ce.text);continue}if(R){var at="Infinite loop on byte: "+R.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return U},se.inline=function(R){var U,ee,ce,je,Se,qe,at=R.length;for(U=0;U<at;U++){qe=R[U];switch(qe.type){case"paragraph":case"text":case"heading":{qe.tokens=[],this.inlineTokens(qe.text,qe.tokens);break}case"table":{for(qe.tokens={header:[],cells:[]},je=qe.header.length,ee=0;ee<je;ee++)qe.tokens.header[ee]=[],this.inlineTokens(qe.header[ee],qe.tokens.header[ee]);for(je=qe.cells.length,ee=0;ee<je;ee++)for(Se=qe.cells[ee],qe.tokens.cells[ee]=[],ce=0;ce<Se.length;ce++)qe.tokens.cells[ee][ce]=[],this.inlineTokens(Se[ce],qe.tokens.cells[ee][ce]);break}case"blockquote":{this.inline(qe.tokens);break}case"list":{for(je=qe.items.length,ee=0;ee<je;ee++)this.inline(qe.items[ee].tokens);break}}}return R},se.inlineTokens=function(R,U,ee,ce,je){U===void 0&&(U=[]),ee===void 0&&(ee=!1),ce===void 0&&(ce=!1),je===void 0&&(je="");var Se,qe=R,at;if(this.tokens.links){var st=Object.keys(this.tokens.links);if(st.length>0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)st.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;R;){if(Se=this.tokenizer.escape(R)){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.tag(R,ee,ce)){R=R.substring(Se.raw.length),ee=Se.inLink,ce=Se.inRawBlock,U.push(Se);continue}if(Se=this.tokenizer.link(R)){R=R.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,ce)),U.push(Se);continue}if(Se=this.tokenizer.reflink(R,this.tokens.links)){R=R.substring(Se.raw.length),Se.type==="link"&&(Se.tokens=this.inlineTokens(Se.text,[],!0,ce)),U.push(Se);continue}if(Se=this.tokenizer.strong(R,qe,je)){R=R.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ee,ce),U.push(Se);continue}if(Se=this.tokenizer.em(R,qe,je)){R=R.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ee,ce),U.push(Se);continue}if(Se=this.tokenizer.codespan(R)){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.br(R)){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.del(R)){R=R.substring(Se.raw.length),Se.tokens=this.inlineTokens(Se.text,[],ee,ce),U.push(Se);continue}if(Se=this.tokenizer.autolink(R,A)){R=R.substring(Se.raw.length),U.push(Se);continue}if(!ee&&(Se=this.tokenizer.url(R,A))){R=R.substring(Se.raw.length),U.push(Se);continue}if(Se=this.tokenizer.inlineText(R,ce,L)){R=R.substring(Se.raw.length),je=Se.raw.slice(-1),U.push(Se);continue}if(R){var lt="Infinite loop on byte: "+R.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return U},ke(me,null,[{key:"rules",get:function(){return{block:D,inline:$}}}]),me}(),be=Y.defaults,Me=V.cleanUrl,Ue=V.escape,ze=function(){function me(ve){this.options=ve||be}var se=me.prototype;return se.code=function(R,U,ee){var ce=(U||"").match(/\S*/)[0];if(this.options.highlight){var je=this.options.highlight(R,ce);je!=null&&je!==R&&(ee=!0,R=je)}return ce?'<pre><code class="'+this.options.langPrefix+Ue(ce,!0)+'">'+(ee?R:Ue(R,!0))+`</code></pre>
`:"<pre><code>"+(ee?R:Ue(R,!0))+`</code></pre>
`},se.blockquote=function(R){return`<blockquote>
`+R+`</blockquote>
`},se.html=function(R){return R},se.heading=function(R,U,ee,ce){return this.options.headerIds?"<h"+U+' id="'+this.options.headerPrefix+ce.slug(ee)+'">'+R+"</h"+U+`>
`:"<h"+U+">"+R+"</h"+U+`>
`},se.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},se.list=function(R,U,ee){var ce=U?"ol":"ul",je=U&&ee!==1?' start="'+ee+'"':"";return"<"+ce+je+`>
`+R+"</"+ce+`>
`},se.listitem=function(R){return"<li>"+R+`</li>
`},se.checkbox=function(R){return"<input "+(R?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},se.paragraph=function(R){return"<p>"+R+`</p>
`},se.table=function(R,U){return U&&(U="<tbody>"+U+"</tbody>"),`<table>
<thead>
`+R+`</thead>
`+U+`</table>
`},se.tablerow=function(R){return`<tr>
`+R+`</tr>
`},se.tablecell=function(R,U){var ee=U.header?"th":"td",ce=U.align?"<"+ee+' align="'+U.align+'">':"<"+ee+">";return ce+R+"</"+ee+`>
`},se.strong=function(R){return"<strong>"+R+"</strong>"},se.em=function(R){return"<em>"+R+"</em>"},se.codespan=function(R){return"<code>"+R+"</code>"},se.br=function(){return this.options.xhtml?"<br/>":"<br>"},se.del=function(R){return"<del>"+R+"</del>"},se.link=function(R,U,ee){if(R=Me(this.options.sanitize,this.options.baseUrl,R),R===null)return ee;var ce='<a href="'+Ue(R)+'"';return U&&(ce+=' title="'+U+'"'),ce+=">"+ee+"</a>",ce},se.image=function(R,U,ee){if(R=Me(this.options.sanitize,this.options.baseUrl,R),R===null)return ee;var ce='<img src="'+R+'" alt="'+ee+'"';return U&&(ce+=' title="'+U+'"'),ce+=this.options.xhtml?"/>":">",ce},se.text=function(R){return R},me}(),He=function(){function me(){}var se=me.prototype;return se.strong=function(R){return R},se.em=function(R){return R},se.codespan=function(R){return R},se.del=function(R){return R},se.html=function(R){return R},se.text=function(R){return R},se.link=function(R,U,ee){return""+ee},se.image=function(R,U,ee){return""+ee},se.br=function(){return""},me}(),nt=function(){function me(){this.seen={}}var se=me.prototype;return se.slug=function(R){var U=R.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(U)){var ee=U;do this.seen[ee]++,U=ee+"-"+this.seen[ee];while(this.seen.hasOwnProperty(U))}return this.seen[U]=0,U},me}(),Oe=Y.defaults,Fe=V.unescape,Be=function(){function me(ve){this.options=ve||Oe,this.options.renderer=this.options.renderer||new ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He,this.slugger=new nt}me.parse=function(R,U){var ee=new me(U);return ee.parse(R)};var se=me.prototype;return se.parse=function(R,U){U===void 0&&(U=!0);var ee="",ce,je,Se,qe,at,st,lt,St,Ot,dt,Ht,Nt,At,kt,Lt,zt,rn,bt,Et=R.length;for(ce=0;ce<Et;ce++){dt=R[ce];switch(dt.type){case"space":continue;case"hr":{ee+=this.renderer.hr();continue}case"heading":{ee+=this.renderer.heading(this.parseInline(dt.tokens),dt.depth,Fe(this.parseInline(dt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ee+=this.renderer.code(dt.text,dt.lang,dt.escaped);continue}case"table":{for(St="",lt="",qe=dt.header.length,je=0;je<qe;je++)lt+=this.renderer.tablecell(this.parseInline(dt.tokens.header[je]),{header:!0,align:dt.align[je]});for(St+=this.renderer.tablerow(lt),Ot="",qe=dt.cells.length,je=0;je<qe;je++){for(st=dt.tokens.cells[je],lt="",at=st.length,Se=0;Se<at;Se++)lt+=this.renderer.tablecell(this.parseInline(st[Se]),{header:!1,align:dt.align[Se]});Ot+=this.renderer.tablerow(lt)}ee+=this.renderer.table(St,Ot);continue}case"blockquote":{Ot=this.parse(dt.tokens),ee+=this.renderer.blockquote(Ot);continue}case"list":{for(Ht=dt.ordered,Nt=dt.start,At=dt.loose,qe=dt.items.length,Ot="",je=0;je<qe;je++)Lt=dt.items[je],zt=Lt.checked,rn=Lt.task,kt="",Lt.task&&(bt=this.renderer.checkbox(zt),At?Lt.tokens.length>0&&Lt.tokens[0].type==="text"?(Lt.tokens[0].text=bt+" "+Lt.tokens[0].text,Lt.tokens[0].tokens&&Lt.tokens[0].tokens.length>0&&Lt.tokens[0].tokens[0].type==="text"&&(Lt.tokens[0].tokens[0].text=bt+" "+Lt.tokens[0].tokens[0].text)):Lt.tokens.unshift({type:"text",text:bt}):kt+=bt),kt+=this.parse(Lt.tokens,At),Ot+=this.renderer.listitem(kt,rn,zt);ee+=this.renderer.list(Ot,Ht,Nt);continue}case"html":{ee+=this.renderer.html(dt.text);continue}case"paragraph":{ee+=this.renderer.paragraph(this.parseInline(dt.tokens));continue}case"text":{for(Ot=dt.tokens?this.parseInline(dt.tokens):dt.text;ce+1<Et&&R[ce+1].type==="text";)dt=R[++ce],Ot+=`
`+(dt.tokens?this.parseInline(dt.tokens):dt.text);ee+=U?this.renderer.paragraph(Ot):Ot;continue}default:{var it='Token with "'+dt.type+'" type was not found.';if(this.options.silent){console.error(it);return}else throw new Error(it)}}}return ee},se.parseInline=function(R,U){U=U||this.renderer;var ee="",ce,je,Se=R.length;for(ce=0;ce<Se;ce++){je=R[ce];switch(je.type){case"escape":{ee+=U.text(je.text);break}case"html":{ee+=U.html(je.text);break}case"link":{ee+=U.link(je.href,je.title,this.parseInline(je.tokens,U));break}case"image":{ee+=U.image(je.href,je.title,je.text);break}case"strong":{ee+=U.strong(this.parseInline(je.tokens,U));break}case"em":{ee+=U.em(this.parseInline(je.tokens,U));break}case"codespan":{ee+=U.codespan(je.text);break}case"br":{ee+=U.br();break}case"del":{ee+=U.del(this.parseInline(je.tokens,U));break}case"text":{ee+=U.text(je.text);break}default:{var qe='Token with "'+je.type+'" type was not found.';if(this.options.silent){console.error(qe);return}else throw new Error(qe)}}}return ee},me}(),Ge=V.merge,Ye=V.checkSanitizeDeprecation,Xe=V.escape,Le=Y.getDefaults,Ve=Y.changeDefaults,et=Y.defaults;function _e(me,se,ve){if(typeof me=="undefined"||me===null)throw new Error("marked(): input parameter is undefined or null");if(typeof me!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(me)+", string expected");if(typeof se=="function"&&(ve=se,se=null),se=Ge({},_e.defaults,se||{}),Ye(se),ve){var R=se.highlight,U;try{U=ie.lex(me,se)}catch(Se){return ve(Se)}var ee=function(qe){var at;if(!qe)try{at=Be.parse(U,se)}catch(st){qe=st}return se.highlight=R,qe?ve(qe):ve(null,at)};if(!R||R.length<3)return ee();if(delete se.highlight,!U.length)return ee();var ce=0;_e.walkTokens(U,function(Se){Se.type==="code"&&(ce++,setTimeout(function(){R(Se.text,Se.lang,function(qe,at){if(qe)return ee(qe);at!=null&&at!==Se.text&&(Se.text=at,Se.escaped=!0),ce--,ce===0&&ee()})},0))}),ce===0&&ee();return}try{var je=ie.lex(me,se);return se.walkTokens&&_e.walkTokens(je,se.walkTokens),Be.parse(je,se)}catch(Se){if(Se.message+=`
Please report this to https://github.com/markedjs/marked.`,se.silent)return"<p>An error occurred:</p><pre>"+Xe(Se.message+"",!0)+"</pre>";throw Se}}_e.options=_e.setOptions=function(me){return Ge(_e.defaults,me),Ve(_e.defaults),_e},_e.getDefaults=Le,_e.defaults=et,_e.use=function(me){var se=Ge({},me);if(me.renderer&&function(){var R=_e.defaults.renderer||new ze,U=function(je){var Se=R[je];R[je]=function(){for(var qe=arguments.length,at=new Array(qe),st=0;st<qe;st++)at[st]=arguments[st];var lt=me.renderer[je].apply(R,at);return lt===!1&&(lt=Se.apply(R,at)),lt}};for(var ee in me.renderer)U(ee);se.renderer=R}(),me.tokenizer&&function(){var R=_e.defaults.tokenizer||new Pe,U=function(je){var Se=R[je];R[je]=function(){for(var qe=arguments.length,at=new Array(qe),st=0;st<qe;st++)at[st]=arguments[st];var lt=me.tokenizer[je].apply(R,at);return lt===!1&&(lt=Se.apply(R,at)),lt}};for(var ee in me.tokenizer)U(ee);se.tokenizer=R}(),me.walkTokens){var ve=_e.defaults.walkTokens;se.walkTokens=function(R){me.walkTokens(R),ve&&ve(R)}}_e.setOptions(se)},_e.walkTokens=function(me,se){for(var ve=ge(me),R;!(R=ve()).done;){var U=R.value;se(U);switch(U.type){case"table":{for(var ee=ge(U.tokens.header),ce;!(ce=ee()).done;){var je=ce.value;_e.walkTokens(je,se)}for(var Se=ge(U.tokens.cells),qe;!(qe=Se()).done;)for(var at=qe.value,st=ge(at),lt;!(lt=st()).done;){var St=lt.value;_e.walkTokens(St,se)}break}case"list":{_e.walkTokens(U.items,se);break}default:U.tokens&&_e.walkTokens(U.tokens,se)}}},_e.Parser=Be,_e.parser=Be.parse,_e.Renderer=ze,_e.TextRenderer=He,_e.Lexer=ie,_e.lexer=ie.lex,_e.Tokenizer=Pe,_e.Slugger=nt,_e.parse=_e;var Ke=_e;return Ke})},ELLl:function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){var ke={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ee=q.Pos;q.defineOption("autoCloseBrackets",!1,function(w,P,g){g&&g!=q.Init&&(w.removeKeyMap(ge),w.state.closeBrackets=null),P&&(ue(De(P,"pairs")),w.state.closeBrackets=P,w.addKeyMap(ge))});function De(w,P){return P=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[P]!=null?w[P]:ke[P]}var ge={Backspace:F,Enter:B};function ue(w){for(var P=0;P<w.length;P++){var g=w.charAt(P),y="'"+g+"'";ge[y]||(ge[y]=Y(g))}}ue(ke.pairs+"`");function Y(w){return function(P){return E(P,w)}}function J(w){var P=w.state.closeBrackets;if(!P||P.override)return P;var g=w.getModeAt(w.getCursor());return g.closeBrackets||P}function F(w){var P=J(w);if(!P||w.getOption("disableInput"))return q.Pass;for(var g=De(P,"pairs"),y=w.listSelections(),O=0;O<y.length;O++){if(!y[O].empty())return q.Pass;var W=M(w,y[O].head);if(!W||g.indexOf(W)%2!=0)return q.Pass}for(var O=y.length-1;O>=0;O--){var de=y[O].head;w.replaceRange("",Ee(de.line,de.ch-1),Ee(de.line,de.ch+1),"+delete")}}function B(w){var P=J(w),g=P&&De(P,"explode");if(!g||w.getOption("disableInput"))return q.Pass;for(var y=w.listSelections(),O=0;O<y.length;O++){if(!y[O].empty())return q.Pass;var W=M(w,y[O].head);if(!W||g.indexOf(W)%2!=0)return q.Pass}w.operation(function(){var de=w.lineSeparator()||`
`;w.replaceSelection(de+de,null),w.execCommand("goCharLeft"),y=w.listSelections();for(var pe=0;pe<y.length;pe++){var re=y[pe].head.line;w.indentLine(re,null,!0),w.indentLine(re+1,null,!0)}})}function C(w){var P=q.cmpPos(w.anchor,w.head)>0;return{anchor:new Ee(w.anchor.line,w.anchor.ch+(P?-1:1)),head:new Ee(w.head.line,w.head.ch+(P?1:-1))}}function E(w,P){var g=J(w);if(!g||w.getOption("disableInput"))return q.Pass;var y=De(g,"pairs"),O=y.indexOf(P);if(O==-1)return q.Pass;for(var W=De(g,"closeBefore"),de=De(g,"triples"),pe=y.charAt(O+1)==P,re=w.listSelections(),xe=O%2==0,ye,Q=0;Q<re.length;Q++){var we=re[Q],Z=we.head,j,Ae=w.getRange(Z,Ee(Z.line,Z.ch+1));if(xe&&!we.empty())j="surround";else if((pe||!xe)&&Ae==P)pe&&S(w,Z)?j="both":de.indexOf(P)>=0&&w.getRange(Z,Ee(Z.line,Z.ch+3))==P+P+P?j="skipThree":j="skip";else if(pe&&Z.ch>1&&de.indexOf(P)>=0&&w.getRange(Ee(Z.line,Z.ch-2),Z)==P+P){if(Z.ch>2&&/\bstring/.test(w.getTokenTypeAt(Ee(Z.line,Z.ch-2))))return q.Pass;j="addFour"}else if(pe){var oe=Z.ch==0?" ":w.getRange(Ee(Z.line,Z.ch-1),Z);if(!q.isWordChar(Ae)&&oe!=P&&!q.isWordChar(oe))j="both";else return q.Pass}else if(xe&&(Ae.length===0||/\s/.test(Ae)||W.indexOf(Ae)>-1))j="both";else return q.Pass;if(!ye)ye=j;else if(ye!=j)return q.Pass}var K=O%2?y.charAt(O-1):P,z=O%2?P:y.charAt(O+1);w.operation(function(){if(ye=="skip")w.execCommand("goCharRight");else if(ye=="skipThree")for(var te=0;te<3;te++)w.execCommand("goCharRight");else if(ye=="surround"){for(var G=w.getSelections(),te=0;te<G.length;te++)G[te]=K+G[te]+z;w.replaceSelections(G,"around"),G=w.listSelections().slice();for(var te=0;te<G.length;te++)G[te]=C(G[te]);w.setSelections(G)}else ye=="both"?(w.replaceSelection(K+z,null),w.triggerElectric(K+z),w.execCommand("goCharLeft")):ye=="addFour"&&(w.replaceSelection(K+K+K+K,"before"),w.execCommand("goCharRight"))})}function M(w,P){var g=w.getRange(Ee(P.line,P.ch-1),Ee(P.line,P.ch+1));return g.length==2?g:null}function S(w,P){var g=w.getTokenAt(Ee(P.line,P.ch+1));return/\bstring/.test(g.type)&&g.start==P.ch&&(P.ch==0||!/\bstring/.test(w.getTokenTypeAt(P)))}})},GfqC:function(mt,Ce,h){"use strict";var q=h("q1tI"),ke=h.n(q),Ee=h("TSYQ"),De=h.n(Ee);function ge(V,m){var p="cannot "+V.method+" "+V.action+" "+m.status+"'",H=new Error(p);return H.status=m.status,H.method=V.method,H.url=V.action,H}function ue(V){var m=V.responseText||V.response;if(!m)return m;try{return JSON.parse(m)}catch(p){return m}}function Y(V){var m=new XMLHttpRequest;V.onProgress&&m.upload&&(m.upload.onprogress=function(Te){Te.total>0&&(Te.percent=Te.loaded/Te.total*100),V.onProgress(Te)});var p=new FormData;V.data&&Object.keys(V.data).forEach(function(ae){var Te=V.data[ae];if(Array.isArray(Te)){Te.forEach(function(We){p.append(ae+"[]",We)});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(Te){V.onError(Te)},m.onload=function(){return m.status<200||m.status>=300?V.onError(ge(V,m),ue(m)):V.onSuccess(ue(m),m)},m.open(V.method,V.action,!0),V.withCredentials&&"withCredentials"in m&&(m.withCredentials=!0);var H=V.headers||{};return H["X-Requested-With"]!==null&&m.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(ae){H[ae]!==null&&m.setRequestHeader(ae,H[ae])}),m.send(p),{abort:function(){m.abort()}}}var J=+new Date,F=0;function B(){return"rc-upload-"+J+"-"+ ++F}function C(V,m){return V.indexOf(m,V.length-m.length)!==-1}var E=function(V,m){if(V&&m){var p=Array.isArray(m)?m:m.split(","),H=V.name||"",ae=V.type||"",Te=ae.replace(/\/.*$/,"");return p.some(function(We){var Re=We.trim();return Re.charAt(0)==="."?C(H.toLowerCase(),Re.toLowerCase()):/\/\*$/.test(Re)?Te===Re.replace(/\/.*$/,""):ae===Re})}return!0};function M(V,m){var p=V.createReader(),H=[];function ae(){p.readEntries(function(Te){var We=Array.prototype.slice.apply(Te);H=H.concat(We);var Re=!We.length;Re?m(H):ae()})}ae()}var S=function(m,p,H){var ae=function Te(We,Re){Re=Re||"",We.isFile?We.file(function(Pe){H(Pe)&&(We.fullPath&&!Pe.webkitRelativePath&&(Object.defineProperties(Pe,{webkitRelativePath:{writable:!0}}),Pe.webkitRelativePath=We.fullPath.replace(/^\//,""),Object.defineProperties(Pe,{webkitRelativePath:{writable:!1}})),p([Pe]))}):We.isDirectory&&M(We,function(Pe){Pe.forEach(function(ne){Te(ne,""+Re+We.name+"/")})})};m.forEach(function(Te){ae(Te.webkitGetAsEntry())})},w=S,P=Object.assign||function(V){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var H in p)Object.prototype.hasOwnProperty.call(p,H)&&(V[H]=p[H])}return V},g=function(){function V(m,p){var H=[],ae=!0,Te=!1,We=void 0;try{for(var Re=m[Symbol.iterator](),Pe;!(ae=(Pe=Re.next()).done)&&!(H.push(Pe.value),p&&H.length===p);ae=!0);}catch(ne){Te=!0,We=ne}finally{try{!ae&&Re.return&&Re.return()}finally{if(Te)throw We}}return H}return function(m,p){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return V(m,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(){function V(m,p){for(var H=0;H<p.length;H++){var ae=p[H];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(m,ae.key,ae)}}return function(m,p,H){return p&&V(m.prototype,p),H&&V(m,H),m}}();function O(V,m,p){return m in V?Object.defineProperty(V,m,{value:p,enumerable:!0,configurable:!0,writable:!0}):V[m]=p,V}function W(V,m){var p={};for(var H in V){if(m.indexOf(H)>=0)continue;if(!Object.prototype.hasOwnProperty.call(V,H))continue;p[H]=V[H]}return p}function de(V,m){if(!(V instanceof m))throw new TypeError("Cannot call a class as a function")}function pe(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 re(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 xe=function(m){return Object.keys(m).reduce(function(p,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(p[H]=m[H]),p},{})},ye=function(V){re(m,V);function m(){var p,H,ae,Te;de(this,m);for(var We=arguments.length,Re=Array(We),Pe=0;Pe<We;Pe++)Re[Pe]=arguments[Pe];return Te=(H=(ae=pe(this,(p=m.__proto__||Object.getPrototypeOf(m)).call.apply(p,[this].concat(Re))),ae),ae.state={uid:B()},ae.reqs={},ae.onChange=function(ne){var _=ne.target.files;ae.uploadFiles(_),ae.reset()},ae.onClick=function(ne){var _=ae.fileInput;if(!_)return;var X=ae.props,N=X.children,I=X.onClick;N&&N.type==="button"&&(_.parentNode.focus(),_.parentNode.querySelector("button").blur()),_.click(),I&&I(ne)},ae.onKeyDown=function(ne){ne.key==="Enter"&&ae.onClick()},ae.onFileDrop=function(ne){var _=ae.props.multiple;if(ne.preventDefault(),ne.type==="dragover")return;if(ae.props.directory)w(Array.prototype.slice.call(ne.dataTransfer.items),ae.uploadFiles,function(N){return E(N,ae.props.accept)});else{var X=Array.prototype.slice.call(ne.dataTransfer.files).filter(function(N){return E(N,ae.props.accept)});_===!1&&(X=X.slice(0,1)),ae.uploadFiles(X)}},ae.uploadFiles=function(ne){var _=Array.prototype.slice.call(ne);_.map(function(X){return X.uid=B(),X}).forEach(function(X){ae.upload(X,_)})},ae.saveFileInput=function(ne){ae.fileInput=ne},H),pe(ae,Te)}return y(m,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(H,ae){var Te=this,We=this.props;if(!We.beforeUpload)return setTimeout(function(){return Te.post(H)},0);var Re=We.beforeUpload(H,ae);Re&&Re.then?Re.then(function(Pe){var ne=Object.prototype.toString.call(Pe);return ne==="[object File]"||ne==="[object Blob]"?Te.post(Pe):Te.post(H)}).catch(function(Pe){console.log(Pe)}):Re!==!1&&setTimeout(function(){return Te.post(H)},0);return}},{key:"post",value:function(H){var ae=this;if(!this._isMounted)return;var Te=this.props,We=Te.onStart,Re=Te.onProgress,Pe=Te.transformFile,ne=Pe===void 0?function(_){return _}:Pe;new Promise(function(_){var X=Te.action;return typeof X=="function"&&(X=X(H)),_(X)}).then(function(_){var X=H.uid,N=Te.customRequest||Y,I=Promise.resolve(ne(H)).then(function(x){var k=Te.data;return typeof k=="function"&&(k=k(x)),Promise.all([x,k])}).catch(function(x){console.error(x)});I.then(function(x){var k=g(x,2),D=k[0],$=k[1],L={action:_,filename:Te.name,data:$,file:D,headers:Te.headers,withCredentials:Te.withCredentials,method:Te.method||"post",onProgress:Re?function(A){Re(A,H)}:null,onSuccess:function(ie,be){delete ae.reqs[X],Te.onSuccess(ie,H,be)},onError:function(ie,be){delete ae.reqs[X],Te.onError(ie,be,H)}};We(H),ae.reqs[X]=N(L)})})}},{key:"reset",value:function(){this.setState({uid:B()})}},{key:"abort",value:function(H){var ae=this.reqs;if(H){var Te=H;H&&H.uid&&(Te=H.uid),ae[Te]&&ae[Te].abort&&ae[Te].abort(),delete ae[Te]}else Object.keys(ae).forEach(function(We){ae[We]&&ae[We].abort&&ae[We].abort(),delete ae[We]})}},{key:"render",value:function(){var H,ae=this.props,Te=ae.component,We=ae.prefixCls,Re=ae.className,Pe=ae.disabled,ne=ae.id,_=ae.style,X=ae.multiple,N=ae.accept,I=ae.children,x=ae.directory,k=ae.openFileDialogOnClick,D=ae.onMouseEnter,$=ae.onMouseLeave,L=W(ae,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),A=De()((H={},O(H,We,!0),O(H,We+"-disabled",Pe),O(H,Re,Re),H)),ie=Pe?{}:{onClick:k?this.onClick:function(){},onKeyDown:k?this.onKeyDown:function(){},onMouseEnter:D,onMouseLeave:$,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return ke.a.createElement(Te,P({},ie,{className:A,role:"button",style:_}),ke.a.createElement("input",P({},xe(L),{id:ne,type:"file",ref:this.saveFileInput,onClick:function(Me){return Me.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:N,directory:x?"directory":null,webkitdirectory:x?"webkitdirectory":null,multiple:X,onChange:this.onChange})),I)}}]),m}(q.Component),Q=ye,we=Object.assign||function(V){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var H in p)Object.prototype.hasOwnProperty.call(p,H)&&(V[H]=p[H])}return V},Z=function(){function V(m,p){for(var H=0;H<p.length;H++){var ae=p[H];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(m,ae.key,ae)}}return function(m,p,H){return p&&V(m.prototype,p),H&&V(m,H),m}}();function j(V,m){if(!(V instanceof m))throw new TypeError("Cannot call a class as a function")}function Ae(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 oe(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)}function K(){}var z=function(V){oe(m,V);function m(){var p,H,ae,Te;j(this,m);for(var We=arguments.length,Re=Array(We),Pe=0;Pe<We;Pe++)Re[Pe]=arguments[Pe];return Te=(H=(ae=Ae(this,(p=m.__proto__||Object.getPrototypeOf(m)).call.apply(p,[this].concat(Re))),ae),ae.saveUploader=function(ne){ae.uploader=ne},H),Ae(ae,Te)}return Z(m,[{key:"abort",value:function(H){this.uploader.abort(H)}},{key:"render",value:function(){return ke.a.createElement(Q,we({},this.props,{ref:this.saveUploader}))}}]),m}(q.Component);z.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:K,onError:K,onSuccess:K,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var te=z,G=Ce.a=te},Gytx:function(mt,Ce){mt.exports=function(q,ke,Ee,De){var ge=Ee?Ee.call(De,q,ke):void 0;if(ge!==void 0)return!!ge;if(q===ke)return!0;if(typeof q!="object"||!q||typeof ke!="object"||!ke)return!1;var ue=Object.keys(q),Y=Object.keys(ke);if(ue.length!==Y.length)return!1;for(var J=Object.prototype.hasOwnProperty.bind(ke),F=0;F<ue.length;F++){var B=ue[F];if(!J(B))return!1;var C=q[B],E=ke[B];if(ge=Ee?Ee.call(De,C,E,B):void 0,ge===!1||ge===void 0&&C!==E)return!1}return!0}},HmJG:function(mt,Ce,h){},JYp7:function(mt,Ce,h){"use strict";h.d(Ce,"c",function(){return ke}),h.d(Ce,"d",function(){return Ee}),h.d(Ce,"f",function(){return ge}),h.d(Ce,"a",function(){return ue}),h.d(Ce,"b",function(){return Y}),h.d(Ce,"e",function(){return J});var q=function(){var F=function(B,C){return F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,M){E.__proto__=M}||function(E,M){for(var S in M)M.hasOwnProperty(S)&&(E[S]=M[S])},F(B,C)};return function(B,C){F(B,C);function E(){this.constructor=B}B.prototype=C===null?Object.create(C):(E.prototype=C.prototype,new E)}}(),ke={done:!0,value:void 0},Ee;(function(F){var B={next:function(){return ke}};function C(){return B}F.empty=C;function E(pe){var re=!1;return{next:function(){return re?ke:(re=!0,{done:!1,value:pe})}}}F.single=E;function M(pe,re,xe){return re===void 0&&(re=0),xe===void 0&&(xe=pe.length),{next:function(){return re>=xe?ke:{done:!1,value:pe[re++]}}}}F.fromArray=M;function S(pe){return{next:function(){var re=pe.next();return re.done?ke:{done:!1,value:re.value}}}}F.fromNativeIterator=S;function w(pe){return pe?Array.isArray(pe)?F.fromArray(pe):pe:F.empty()}F.from=w;function P(pe,re){return{next:function(){var xe=pe.next();return xe.done?ke:{done:!1,value:re(xe.value)}}}}F.map=P;function g(pe,re){return{next:function(){for(;;){var xe=pe.next();if(xe.done)return ke;if(re(xe.value))return{done:!1,value:xe.value}}}}}F.filter=g;function y(pe,re){for(var xe=pe.next();!xe.done;xe=pe.next())re(xe.value)}F.forEach=y;function O(pe,re){re===void 0&&(re=Number.POSITIVE_INFINITY);var xe=[];if(re===0)return xe;for(var ye=0,Q=pe.next();!Q.done&&!(xe.push(Q.value),++ye>=re);Q=pe.next());return xe}F.collect=O;function W(){for(var pe=[],re=0;re<arguments.length;re++)pe[re]=arguments[re];var xe=0;return{next:function(){if(xe>=pe.length)return ke;var ye=pe[xe],Q=ye.next();return Q.done?(xe++,this.next()):Q}}}F.concat=W;function de(pe){return new De(pe)}F.chain=de})(Ee||(Ee={}));var De=function(){function F(B){this.it=B}return F.prototype.next=function(){return this.it.next()},F}();function ge(F){return Array.isArray(F)?Ee.fromArray(F):F||Ee.empty()}var ue=function(){function F(B,C,E,M){C===void 0&&(C=0),E===void 0&&(E=B.length),M===void 0&&(M=C-1),this.items=B,this.start=C,this.end=E,this.index=M}return F.prototype.first=function(){return this.index=this.start,this.current()},F.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},F.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},F}(),Y=function(F){q(B,F);function B(C,E,M,S){return E===void 0&&(E=0),M===void 0&&(M=C.length),S===void 0&&(S=E-1),F.call(this,C,E,M,S)||this}return B.prototype.current=function(){return F.prototype.current.call(this)},B.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},B.prototype.first=function(){return this.index=this.start,this.current()},B.prototype.last=function(){return this.index=this.end-1,this.current()},B.prototype.parent=function(){return null},B}(ue),J=function(){function F(B,C){this.iterator=B,this.fn=C}return F.prototype.next=function(){return this.fn(this.iterator.next())},F}()},LdHM:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return W}),h.d(Ce,"a",function(){return pe});var q=h("1OyB"),ke=h("vuIU"),Ee=h("Ji7U"),De=h("LK+K"),ge=h("q1tI"),ue=h("rePB"),Y=h("Ff2n"),J=h("ODXe"),F=h("4IlW"),B=h("bX4T"),C=h("YrtM"),E=h("TSYQ"),M=h.n(E),S=h("+nKL"),w=h("8OUc"),P=function(H,ae){var Te=H.prefixCls,We=H.id,Re=H.flattenOptions,Pe=H.childrenAsData,ne=H.values,_=H.searchValue,X=H.multiple,N=H.defaultActiveFirstOption,I=H.height,x=H.itemHeight,k=H.notFoundContent,D=H.open,$=H.menuItemSelectedIcon,L=H.virtual,A=H.onSelect,ie=H.onToggleOpen,be=H.onActiveValue,Me=H.onScroll,Ue=H.onMouseEnter,ze="".concat(Te,"-item"),He=Object(C.a)(function(){return Re},[D,Re],function(Ke,me){return me[0]&&Ke[1]!==me[1]}),nt=ge.useRef(null),Oe=function(me){me.preventDefault()},Fe=function(me){nt.current&&nt.current.scrollTo({index:me})},Be=function(me){for(var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ve=He.length,R=0;R<ve;R+=1){var U=(me+R*se+ve)%ve,ee=He[U],ce=ee.group,je=ee.data;if(!ce&&!je.disabled)return U}return-1},Ge=ge.useState(function(){return Be(0)}),Ye=Object(J.a)(Ge,2),Xe=Ye[0],Le=Ye[1],Ve=function(me){Le(me);var se=He[me];if(!se){be(null,-1);return}be(se.data.value,me)};ge.useEffect(function(){Ve(N!==!1?Be(0):-1)},[He.length,_]),ge.useEffect(function(){var Ke=setTimeout(function(){if(!X&&D&&ne.size===1){var me=Array.from(ne)[0],se=He.findIndex(function(ve){var R=ve.data;return R.value===me});Ve(se),Fe(se)}});return function(){return clearTimeout(Ke)}},[D]);var et=function(me){me!==void 0&&A(me,{selected:!ne.has(me)}),X||ie(!1)};if(ge.useImperativeHandle(ae,function(){return{onKeyDown:function(me){var se=me.which;switch(se){case F.a.UP:case F.a.DOWN:{var ve=0;if(se===F.a.UP?ve=-1:se===F.a.DOWN&&(ve=1),ve!==0){var R=Be(Xe+ve,ve);Fe(R),Ve(R)}break}case F.a.ENTER:{var U=He[Xe];U&&!U.data.disabled?et(U.data.value):et(void 0),D&&me.preventDefault();break}case F.a.ESC:ie(!1)}},onKeyUp:function(){},scrollTo:function(me){Fe(me)}}}),He.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(We,"_list"),className:"".concat(ze,"-empty"),onMouseDown:Oe},k);function _e(Ke){var me=He[Ke];if(!me)return null;var se=me.data||{},ve=se.value,R=se.label,U=se.children,ee=Object(B.a)(se,!0),ce=Pe?U:R;return me?ge.createElement("div",Object.assign({"aria-label":typeof ce=="string"?ce:null},ee,{key:Ke,role:"option",id:"".concat(We,"_list_").concat(Ke),"aria-selected":ne.has(ve)}),ve):null}return ge.createElement(ge.Fragment,null,ge.createElement("div",{role:"listbox",id:"".concat(We,"_list"),style:{height:0,width:0,overflow:"hidden"}},_e(Xe-1),_e(Xe),_e(Xe+1)),ge.createElement(S.a,{itemKey:"key",ref:nt,data:He,height:I,itemHeight:x,fullHeight:!1,onMouseDown:Oe,onScroll:Me,virtual:L,onMouseEnter:Ue},function(Ke,me){var se,ve=Ke.group,R=Ke.groupOption,U=Ke.data,ee=U.label,ce=U.key;if(ve)return ge.createElement("div",{className:M()(ze,"".concat(ze,"-group"))},ee!==void 0?ee:ce);var je=U.disabled,Se=U.value,qe=U.title,at=U.children,st=U.style,lt=U.className,St=Object(Y.a)(U,["disabled","value","title","children","style","className"]),Ot=ne.has(Se),dt="".concat(ze,"-option"),Ht=M()(ze,dt,lt,(se={},Object(ue.a)(se,"".concat(dt,"-grouped"),R),Object(ue.a)(se,"".concat(dt,"-active"),Xe===me&&!je),Object(ue.a)(se,"".concat(dt,"-disabled"),je),Object(ue.a)(se,"".concat(dt,"-selected"),Ot),se)),Nt=Pe?at:ee,At=!$||typeof $=="function"||Ot;return ge.createElement("div",Object.assign({},St,{"aria-selected":Ot,className:Ht,title:qe,onMouseMove:function(){if(Xe===me||je)return;Ve(me)},onClick:function(){je||et(Se)},style:st}),ge.createElement("div",{className:"".concat(dt,"-content")},Nt||Se),ge.isValidElement($)||Ot,At&&ge.createElement(w.a,{className:"".concat(ze,"-option-state"),customizeIcon:$,customizeIconProps:{isSelected:Ot}},Ot?"\u2713":null))}))},g=ge.forwardRef(P);g.displayName="OptionList";var y=g,O=function(){return null};O.isSelectOption=!0;var W=O,de=function(){return null};de.isSelectOptGroup=!0;var pe=de,re=h("VTBJ"),xe=h("Zm9Q");function ye(p){var H=p.key,ae=p.props,Te=ae.children,We=ae.value,Re=Object(Y.a)(ae,["children","value"]);return Object(re.a)({key:H,value:We!==void 0?We:H,children:Te},Re)}function Q(p){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(xe.a)(p).map(function(ae,Te){if(!ge.isValidElement(ae)||!ae.type)return null;var We=ae.type.isSelectOptGroup,Re=ae.key,Pe=ae.props,ne=Pe.children,_=Object(Y.a)(Pe,["children"]);return H||!We?ye(ae):Object(re.a)(Object(re.a)({key:"__RC_SELECT_GRP__".concat(Re===null?Te:Re,"__"),label:Re},_),{},{options:Q(ne)})}).filter(function(ae){return ae})}var we=h("2Qr1"),Z=h("qNPg"),j=h("U8pU"),Ae=h("Kwbf"),oe=h("WKfj");function K(p){var H=p.mode,ae=p.options,Te=p.children,We=p.backfill,Re=p.allowClear,Pe=p.placeholder,ne=p.getInputElement,_=p.showSearch,X=p.onSearch,N=p.defaultOpen,I=p.autoFocus,x=p.labelInValue,k=p.value,D=p.inputValue,$=p.optionLabelProp,L=H==="multiple"||H==="tags",A=_!==void 0?_:L||H==="combobox",ie=ae||Q(Te);if(Object(Ae.a)(H!=="tags"||ie.every(function(ze){return!ze.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var be=ie.some(function(ze){return ze.options?ze.options.some(function(He){return typeof("value"in He?He.value:He.key)=="number"}):typeof("value"in ze?ze.value:ze.key)=="number"});Object(Ae.a)(!be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Ae.a)(H!=="combobox"||!$,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Ae.a)(H==="combobox"||!We,"`backfill` only works with `combobox` mode."),Object(Ae.a)(H==="combobox"||!ne,"`getInputElement` only work with `combobox` mode."),Object(Ae.b)(H!=="combobox"||!ne||!Re||!Pe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),X&&!A&&H!=="combobox"&&H!=="tags"&&Object(Ae.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Ae.b)(!N||I,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),k!=null){var Me=Object(oe.d)(k);Object(Ae.a)(!x||Me.every(function(ze){return Object(j.a)(ze)==="object"&&("key"in ze||"value"in ze)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Ae.a)(!L||Array.isArray(k),"`value` should be array when `mode` is `multiple` or `tags`")}if(Te){var Ue=null;Object(xe.a)(Te).some(function(ze){if(!ge.isValidElement(ze)||!ze.type)return!1;var He=ze.type;if(He.isSelectOption)return!1;if(He.isSelectOptGroup){var nt=Object(xe.a)(ze.props.children).every(function(Oe){return!ge.isValidElement(Oe)||!ze.type||Oe.type.isSelectOption?!0:(Ue=Oe.type,!1)});return!nt}return Ue=He,!0}),Ue&&Object(Ae.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ue.displayName||Ue.name||Ue,"`.")),Object(Ae.a)(D===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=K,te=Object(Z.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:Q,flattenOptions:we.d,getLabeledValue:we.e,filterOptions:we.b,isValueDisabled:we.g,findValueOption:we.c,warningProps:z,fillOptionsWithMissingValue:we.a}),G=function(p){Object(Ee.a)(ae,p);var H=Object(De.a)(ae);function ae(){var Te;return Object(q.a)(this,ae),Te=H.apply(this,arguments),Te.selectRef=ge.createRef(),Te.focus=function(){Te.selectRef.current.focus()},Te.blur=function(){Te.selectRef.current.blur()},Te}return Object(ke.a)(ae,[{key:"render",value:function(){return ge.createElement(te,Object.assign({ref:this.selectRef},this.props))}}]),ae}(ge.Component);G.Option=W,G.OptGroup=pe;var V=G,m=Ce.c=V},M8RZ:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return F});var q=h("fWQN"),ke=h("mtLc"),Ee=h("yKVA"),De=h("879j"),ge=h("q1tI"),ue=h.n(ge),Y=h("i8i4"),J=h.n(Y),F=function(B){Object(Ee.a)(E,B);var C=Object(De.a)(E);function E(M){var S;Object(q.a)(this,E),S=C.call(this,M);var w=window.document;return S.node=w.createElement("div"),w.body.appendChild(S.node),S}return Object(ke.a)(E,[{key:"render",value:function(){var S=this.props.children;return Object(Y.createPortal)(S,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),E}(ue.a.Component)},MI8n:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return ue}),h.d(Ce,"a",function(){return F}),h.d(Ce,"e",function(){return B}),h.d(Ce,"d",function(){return C}),h.d(Ce,"c",function(){return E}),h.d(Ce,"f",function(){return M});var q=h("/cxE"),ke=h("C/vA"),Ee=h("pmY6"),De=h("24hK"),ge=function(){var S=function(w,P){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var O in y)y.hasOwnProperty(O)&&(g[O]=y[O])},S(w,P)};return function(w,P){S(w,P);function g(){this.constructor=w}w.prototype=P===null?Object.create(P):(g.prototype=P.prototype,new g)}}(),ue;(function(S){S.None=function(){return Ee.a.None};function w(z){return function(te,G,V){G===void 0&&(G=null);var m=!1,p;return p=z(function(H){return m?void 0:(p?p.dispose():m=!0,te.call(G,H))},null,V),m&&p.dispose(),p}}S.once=w;function P(z,te){return pe(function(G,V,m){return V===void 0&&(V=null),z(function(p){return G.call(V,te(p))},null,m)})}S.map=P;function g(z,te){return pe(function(G,V,m){return V===void 0&&(V=null),z(function(p){te(p),G.call(V,p)},null,m)})}S.forEach=g;function y(z,te){return pe(function(G,V,m){return V===void 0&&(V=null),z(function(p){return te(p)&&G.call(V,p)},null,m)})}S.filter=y;function O(z){return z}S.signal=O;function W(){for(var z=[],te=0;te<arguments.length;te++)z[te]=arguments[te];return function(G,V,m){return V===void 0&&(V=null),Ee.e.apply(void 0,z.map(function(p){return p(function(H){return G.call(V,H)},null,m)}))}}S.any=W;function de(z,te,G){var V=G;return P(z,function(m){return V=te(V,m),V})}S.reduce=de;function pe(z){var te,G=new F({onFirstListenerAdd:function(){te=z(G.fire,G)},onLastListenerRemove:function(){te.dispose()}});return G.event}S.snapshot=pe;function re(z,te,G,V,m){G===void 0&&(G=100),V===void 0&&(V=!1);var p,H=void 0,ae=void 0,Te=0,We=new F({leakWarningThreshold:m,onFirstListenerAdd:function(){p=z(function(Re){Te++,H=te(H,Re),V&&!ae&&(We.fire(H),H=void 0),clearTimeout(ae),ae=setTimeout(function(){var Pe=H;H=void 0,ae=void 0,(!V||Te>1)&&We.fire(Pe),Te=0},G)})},onLastListenerRemove:function(){p.dispose()}});return We.event}S.debounce=re;function xe(z){var te=new Date().getTime();return P(w(z),function(G){return new Date().getTime()-te})}S.stopwatch=xe;function ye(z){var te=!0,G;return y(z,function(V){var m=te||V!==G;return te=!1,G=V,m})}S.latch=ye;function Q(z,te,G){te===void 0&&(te=!1),G===void 0&&(G=[]);var V=G.slice(),m=z(function(ae){V?V.push(ae):H.fire(ae)}),p=function(){V&&V.forEach(function(ae){return H.fire(ae)}),V=null},H=new F({onFirstListenerAdd:function(){m||(m=z(function(ae){return H.fire(ae)}))},onFirstListenerDidAdd:function(){V&&(te?setTimeout(p):p())},onLastListenerRemove:function(){m&&m.dispose(),m=null}});return H.event}S.buffer=Q;var we=function(){function z(te){this.event=te}return z.prototype.map=function(te){return new z(P(this.event,te))},z.prototype.forEach=function(te){return new z(g(this.event,te))},z.prototype.filter=function(te){return new z(y(this.event,te))},z.prototype.reduce=function(te,G){return new z(de(this.event,te,G))},z.prototype.latch=function(){return new z(ye(this.event))},z.prototype.debounce=function(te,G,V,m){return G===void 0&&(G=100),V===void 0&&(V=!1),new z(re(this.event,te,G,V,m))},z.prototype.on=function(te,G,V){return this.event(te,G,V)},z.prototype.once=function(te,G,V){return w(this.event)(te,G,V)},z}();function Z(z){return new we(z)}S.chain=Z;function j(z,te,G){G===void 0&&(G=function(ae){return ae});var V=function(){for(var ae=[],Te=0;Te<arguments.length;Te++)ae[Te]=arguments[Te];return H.fire(G.apply(void 0,ae))},m=function(){return z.on(te,V)},p=function(){return z.removeListener(te,V)},H=new F({onFirstListenerAdd:m,onLastListenerRemove:p});return H.event}S.fromNodeEventEmitter=j;function Ae(z,te,G){G===void 0&&(G=function(ae){return ae});var V=function(){for(var ae=[],Te=0;Te<arguments.length;Te++)ae[Te]=arguments[Te];return H.fire(G.apply(void 0,ae))},m=function(){return z.addEventListener(te,V)},p=function(){return z.removeEventListener(te,V)},H=new F({onFirstListenerAdd:m,onLastListenerRemove:p});return H.event}S.fromDOMEventEmitter=Ae;function oe(z){var te=new F,G=!1;return z.then(void 0,function(){return null}).then(function(){G?te.fire(void 0):setTimeout(function(){return te.fire(void 0)},0)}),G=!0,te.event}S.fromPromise=oe;function K(z){return new Promise(function(te){return w(z)(te)})}S.toPromise=K})(ue||(ue={}));var Y=-1,J=function(){function S(w,P){P===void 0&&(P=Math.random().toString(18).slice(2,5)),this.customThreshold=w,this.name=P,this._warnCountdown=0}return S.prototype.dispose=function(){this._stacks&&this._stacks.clear()},S.prototype.check=function(w){var P=this,g=Y;if(typeof this.customThreshold=="number"&&(g=this.customThreshold),g<=0||w<g)return;this._stacks||(this._stacks=new Map);var y=new Error().stack.split(`
`).slice(3).join(`
`),O=this._stacks.get(y)||0;if(this._stacks.set(y,O+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=g*.5;var W,de=0;this._stacks.forEach(function(pe,re){(!W||de<pe)&&(W=re,de=pe)}),console.warn("["+this.name+"] potential listener LEAK detected, having "+w+" listeners already. MOST frequent listener ("+de+"):"),console.warn(W)}return function(){var pe=P._stacks.get(y)||0;P._stacks.set(y,pe-1)}},S}(),F=function(){function S(w){this._disposed=!1,this._options=w,this._leakageMon=Y>0?new J(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(S.prototype,"event",{get:function(){var w=this;return this._event||(this._event=function(P,g,y){w._listeners||(w._listeners=new De.a);var O=w._listeners.isEmpty();O&&w._options&&w._options.onFirstListenerAdd&&w._options.onFirstListenerAdd(w);var W=w._listeners.push(g?[P,g]:P);O&&w._options&&w._options.onFirstListenerDidAdd&&w._options.onFirstListenerDidAdd(w),w._options&&w._options.onListenerDidAdd&&w._options.onListenerDidAdd(w,P,g);var de;w._leakageMon&&(de=w._leakageMon.check(w._listeners.size));var pe;return pe={dispose:function(){if(de&&de(),pe.dispose=S._noop,!w._disposed&&(W(),w._options&&w._options.onLastListenerRemove)){var re=w._listeners&&!w._listeners.isEmpty();re||w._options.onLastListenerRemove(w)}}},y instanceof Ee.b?y.add(pe):Array.isArray(y)&&y.push(pe),pe}),this._event},enumerable:!0,configurable:!0}),S.prototype.fire=function(w){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new De.a);for(var P=this._listeners.iterator(),g=P.next();!g.done;g=P.next())this._deliveryQueue.push([g.value,w]);for(;this._deliveryQueue.size>0;){var y=this._deliveryQueue.shift(),O=y[0],W=y[1];try{typeof O=="function"?O.call(void 0,W):O[0].call(O[1],W)}catch(de){Object(q.e)(de)}}}},S.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},S._noop=function(){},S}(),B=function(S){ge(w,S);function w(P){var g=S.call(this,P)||this;return g._isPaused=0,g._eventQueue=new De.a,g._mergeFn=P&&P.merge,g}return w.prototype.pause=function(){this._isPaused++},w.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var P=this._eventQueue.toArray();this._eventQueue.clear(),S.prototype.fire.call(this,this._mergeFn(P))}else for(;!this._isPaused&&this._eventQueue.size!==0;)S.prototype.fire.call(this,this._eventQueue.shift())},w.prototype.fire=function(P){this._listeners&&(this._isPaused!==0?this._eventQueue.push(P):S.prototype.fire.call(this,P))},w}(F),C=function(){function S(){var w=this;this.hasListeners=!1,this.events=[],this.emitter=new F({onFirstListenerAdd:function(){return w.onFirstListenerAdd()},onLastListenerRemove:function(){return w.onLastListenerRemove()}})}return Object.defineProperty(S.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),S.prototype.add=function(w){var P=this,g={event:w,listener:null};this.events.push(g),this.hasListeners&&this.hook(g);var y=function(){P.hasListeners&&P.unhook(g);var O=P.events.indexOf(g);P.events.splice(O,1)};return Object(Ee.h)(Object(ke.a)(y))},S.prototype.onFirstListenerAdd=function(){var w=this;this.hasListeners=!0,this.events.forEach(function(P){return w.hook(P)})},S.prototype.onLastListenerRemove=function(){var w=this;this.hasListeners=!1,this.events.forEach(function(P){return w.unhook(P)})},S.prototype.hook=function(w){var P=this;w.listener=w.event(function(g){return P.emitter.fire(g)})},S.prototype.unhook=function(w){w.listener&&w.listener.dispose(),w.listener=null},S.prototype.dispose=function(){this.emitter.dispose()},S}(),E=function(){function S(){this.buffers=[]}return S.prototype.wrapEvent=function(w){var P=this;return function(g,y,O){return w(function(W){var de=P.buffers[P.buffers.length-1];de?de.push(function(){return g.call(y,W)}):g.call(y,W)},void 0,O)}},S.prototype.bufferEvents=function(w){var P=[];this.buffers.push(P);var g=w();return this.buffers.pop(),P.forEach(function(y){return y()}),g},S}(),M=function(){function S(){var w=this;this.listening=!1,this.inputEvent=ue.None,this.inputEventListener=Ee.a.None,this.emitter=new F({onFirstListenerDidAdd:function(){w.listening=!0,w.inputEventListener=w.inputEvent(w.emitter.fire,w.emitter)},onLastListenerRemove:function(){w.listening=!1,w.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(S.prototype,"input",{set:function(w){this.inputEvent=w,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=w(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),S.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},S}()},N0LK:function(mt,Ce,h){"use strict";h.d(Ce,"x",function(){return q}),h.d(Ce,"F",function(){return ke}),h.d(Ce,"r",function(){return De}),h.d(Ce,"o",function(){return ge}),h.d(Ce,"p",function(){return ue}),h.d(Ce,"Q",function(){return Y}),h.d(Ce,"K",function(){return F}),h.d(Ce,"k",function(){return B}),h.d(Ce,"N",function(){return C}),h.d(Ce,"m",function(){return E}),h.d(Ce,"l",function(){return M}),h.d(Ce,"I",function(){return S}),h.d(Ce,"H",function(){return w}),h.d(Ce,"q",function(){return P}),h.d(Ce,"t",function(){return g}),h.d(Ce,"D",function(){return y}),h.d(Ce,"e",function(){return O}),h.d(Ce,"f",function(){return W}),h.d(Ce,"B",function(){return de}),h.d(Ce,"C",function(){return pe}),h.d(Ce,"n",function(){return xe}),h.d(Ce,"O",function(){return Q}),h.d(Ce,"c",function(){return we}),h.d(Ce,"d",function(){return Z}),h.d(Ce,"z",function(){return j}),h.d(Ce,"A",function(){return Ae}),h.d(Ce,"u",function(){return oe}),h.d(Ce,"E",function(){return z}),h.d(Ce,"G",function(){return te}),h.d(Ce,"i",function(){return V}),h.d(Ce,"g",function(){return p}),h.d(Ce,"v",function(){return ae}),h.d(Ce,"h",function(){return Te}),h.d(Ce,"y",function(){return We}),h.d(Ce,"w",function(){return Re}),h.d(Ce,"a",function(){return Pe}),h.d(Ce,"P",function(){return ne}),h.d(Ce,"L",function(){return _}),h.d(Ce,"J",function(){return X}),h.d(Ce,"j",function(){return N}),h.d(Ce,"M",function(){return I}),h.d(Ce,"s",function(){return x}),h.d(Ce,"b",function(){return k});function q(L){return!L||typeof L!="string"?!0:L.trim().length===0}function ke(L,A,ie){ie===void 0&&(ie="0");for(var be=""+L,Me=[be],Ue=be.length;Ue<A;Ue++)Me.push(ie);return Me.reverse().join("")}var Ee=/{(\d+)}/g;function De(L){for(var A=[],ie=1;ie<arguments.length;ie++)A[ie-1]=arguments[ie];return A.length===0?L:L.replace(Ee,function(be,Me){var Ue=parseInt(Me,10);return isNaN(Ue)||Ue<0||Ue>=A.length?be:A[Ue]})}function ge(L){return L.replace(/[<>&]/g,function(A){switch(A){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return A}})}function ue(L){return L.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Y(L,A){A===void 0&&(A=" ");var ie=J(L,A);return F(ie,A)}function J(L,A){if(!L||!A)return L;var ie=A.length;if(ie===0||L.length===0)return L;for(var be=0;L.indexOf(A,be)===be;)be=be+ie;return L.substring(be)}function F(L,A){if(!L||!A)return L;var ie=A.length,be=L.length;if(ie===0||be===0)return L;for(var Me=be,Ue=-1;!(Ue=L.lastIndexOf(A,Me-1),Ue===-1||Ue+ie!==Me);){if(Ue===0)return"";Me=Ue}return L.substring(0,Me)}function B(L){return L.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C(L,A){if(L.length<A.length)return!1;if(L===A)return!0;for(var ie=0;ie<A.length;ie++)if(L[ie]!==A[ie])return!1;return!0}function E(L,A){var ie=L.length-A.length;return ie>0?L.indexOf(A,ie)===ie:ie===0?L===A:!1}function M(L,A,ie){if(ie===void 0&&(ie={}),!L)throw new Error("Cannot create regex from empty string");A||(L=ue(L)),ie.wholeWord&&(/\B/.test(L.charAt(0))||(L="\\b"+L),/\B/.test(L.charAt(L.length-1))||(L=L+"\\b"));var be="";return ie.global&&(be+="g"),ie.matchCase||(be+="i"),ie.multiline&&(be+="m"),ie.unicode&&(be+="u"),new RegExp(L,be)}function S(L){if(L.source==="^"||L.source==="^$"||L.source==="$"||L.source==="^\\s*$")return!1;var A=L.exec("");return!!(A&&L.lastIndex===0)}function w(L){return(L.global?"g":"")+(L.ignoreCase?"i":"")+(L.multiline?"m":"")+(L.unicode?"u":"")}function P(L){for(var A=0,ie=L.length;A<ie;A++){var be=L.charCodeAt(A);if(be!==32&&be!==9)return A}return-1}function g(L,A,ie){A===void 0&&(A=0),ie===void 0&&(ie=L.length);for(var be=A;be<ie;be++){var Me=L.charCodeAt(be);if(Me!==32&&Me!==9)return L.substring(A,be)}return L.substring(A,ie)}function y(L,A){A===void 0&&(A=L.length-1);for(var ie=A;ie>=0;ie--){var be=L.charCodeAt(ie);if(be!==32&&be!==9)return ie}return-1}function O(L,A){return L<A?-1:L>A?1:0}function W(L,A){for(var ie=Math.min(L.length,A.length),be=0;be<ie;be++){var Me=L.charCodeAt(be),Ue=A.charCodeAt(be);if(Me===Ue)continue;pe(Me)&&(Me+=32),pe(Ue)&&(Ue+=32);var ze=Me-Ue;if(ze===0)continue;return de(Me)&&de(Ue)?ze:O(L.toLowerCase(),A.toLowerCase())}return L.length<A.length?-1:L.length>A.length?1:0}function de(L){return L>=97&&L<=122}function pe(L){return L>=65&&L<=90}function re(L){return de(L)||pe(L)}function xe(L,A){return L.length===A.length&&ye(L,A)}function ye(L,A,ie){ie===void 0&&(ie=L.length);for(var be=0;be<ie;be++){var Me=L.charCodeAt(be),Ue=A.charCodeAt(be);if(Me===Ue)continue;if(re(Me)&&re(Ue)){var ze=Math.abs(Me-Ue);if(ze!==0&&ze!==32)return!1}else if(String.fromCharCode(Me).toLowerCase()!==String.fromCharCode(Ue).toLowerCase())return!1}return!0}function Q(L,A){var ie=A.length;return A.length>L.length?!1:ye(L,A,ie)}function we(L,A){var ie,be=Math.min(L.length,A.length);for(ie=0;ie<be;ie++)if(L.charCodeAt(ie)!==A.charCodeAt(ie))return ie;return be}function Z(L,A){var ie,be=Math.min(L.length,A.length),Me=L.length-1,Ue=A.length-1;for(ie=0;ie<be;ie++)if(L.charCodeAt(Me-ie)!==A.charCodeAt(Ue-ie))return ie;return be}function j(L){return 55296<=L&&L<=56319}function Ae(L){return 56320<=L&&L<=57343}function oe(L,A,ie){var be=L.charCodeAt(ie);if(j(be)&&ie+1<A){var Me=L.charCodeAt(ie+1);if(Ae(Me))return(be-55296<<10)+(Me-56320)+65536}return be}function K(L,A){var ie=L.charCodeAt(A-1);if(Ae(ie)&&A>1){var be=L.charCodeAt(A-2);if(j(be))return(be-55296<<10)+(ie-56320)+65536}return ie}function z(L,A){var ie=D.getInstance(),be=A,Me=L.length,Ue=oe(L,Me,A);A+=Ue>=65536?2:1;for(var ze=ie.getGraphemeBreakType(Ue);A<Me;){var He=oe(L,Me,A),nt=ie.getGraphemeBreakType(He);if(k(ze,nt))break;A+=He>=65536?2:1,ze=nt}return A-be}function te(L,A){var ie=D.getInstance(),be=A,Me=K(L,A);A-=Me>=65536?2:1;for(var Ue=ie.getGraphemeBreakType(Me);A>0;){var ze=K(L,A),He=ie.getGraphemeBreakType(ze);if(k(He,Ue))break;A-=ze>=65536?2:1,Ue=He}return be-A}var G=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function V(L){return G.test(L)}var m=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function p(L){return m.test(L)}var H=/^[\t\n\r\x20-\x7E]*$/;function ae(L){return H.test(L)}function Te(L){for(var A=0,ie=L.length;A<ie;A++)if(We(L.charCodeAt(A)))return!0;return!1}function We(L){return L=+L,L>=11904&&L<=55215||L>=63744&&L<=64255||L>=65281&&L<=65374}function Re(L){return L>=127462&&L<=127487||L>=9728&&L<=10175||L>=127744&&L<=128591||L>=128640&&L<=128764||L>=128992&&L<=129003||L>=129280&&L<=129535||L>=129648&&L<=129651||L>=129656&&L<=129666||L>=129680&&L<=129685}var Pe=String.fromCharCode(65279);function ne(L){return!!(L&&L.length>0&&L.charCodeAt(0)===65279)}function _(L){return btoa(encodeURIComponent(L))}function X(L,A){for(var ie="",be=0;be<A;be++)ie+=L;return ie}function N(L,A){return A===void 0&&(A=!1),L?(A&&(L=L.replace(/\\./g,"")),L.toLowerCase()!==L):!1}function I(L){var A=90-65+1;return L=L%(2*A),L<A?String.fromCharCode(97+L):String.fromCharCode(65+L-A)}function x(L){var A=D.getInstance();return A.getGraphemeBreakType(L)}function k(L,A){return L===0?A!==5&&A!==7:L===2&&A===3?!1:L===4||L===2||L===3||(A===4||A===2||A===3)?!0:L===8&&(A===8||A===9||A===11||A===12)||((L===11||L===9)&&(A===9||A===10)||((L===12||L===10)&&A===10||(A===5||A===13||(A===7||(L===1||L===13&&A===14)))))?!1:!(L===6&&A===6)}var D=function(){function L(){this._data=$()}return L.getInstance=function(){return L._INSTANCE||(L._INSTANCE=new L),L._INSTANCE},L.prototype.getGraphemeBreakType=function(A){if(A<32)return A===10?3:A===13?2:4;if(A<127)return 0;for(var ie=this._data,be=ie.length/3,Me=1;Me<=be;)if(A<ie[3*Me])Me=2*Me;else if(A>ie[3*Me+1])Me=2*Me+1;else return ie[3*Me+2];return 0},L._INSTANCE=null,L}();function $(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}},NvD2:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return ue});var q=h("Kwbf");function ke(Y,J){var F=new Set;return Y.forEach(function(B){J.has(B)||F.add(B)}),F}function Ee(Y){var J=Y||{},F=J.disabled,B=J.disableCheckbox,C=J.checkable;return!!(F||B)||C===!1}function De(Y,J,F,B){for(var C=new Set(Y),E=new Set,M=0;M<=F;M+=1){var S=J.get(M)||new Set;S.forEach(function(y){var O=y.key,W=y.node,de=y.children,pe=de===void 0?[]:de;C.has(O)&&!B(W)&&pe.filter(function(re){return!B(re.node)}).forEach(function(re){C.add(re.key)})})}for(var w=new Set,P=F;P>=0;P-=1){var g=J.get(P)||new Set;g.forEach(function(y){var O=y.parent,W=y.node;if(B(W)||!y.parent||w.has(y.parent.key))return;if(B(y.parent.node)){w.add(O.key);return}var de=!0,pe=!1;(O.children||[]).filter(function(re){return!B(re.node)}).forEach(function(re){var xe=re.key,ye=C.has(xe);de&&!ye&&(de=!1),!pe&&(ye||E.has(xe))&&(pe=!0)}),de&&C.add(O.key),pe&&E.add(O.key),w.add(O.key)})}return{checkedKeys:Array.from(C),halfCheckedKeys:Array.from(ke(E,C))}}function ge(Y,J,F,B,C){for(var E=new Set(Y),M=new Set(J),S=0;S<=B;S+=1){var w=F.get(S)||new Set;w.forEach(function(O){var W=O.key,de=O.node,pe=O.children,re=pe===void 0?[]:pe;!E.has(W)&&!M.has(W)&&!C(de)&&re.filter(function(xe){return!C(xe.node)}).forEach(function(xe){E.delete(xe.key)})})}M=new Set;for(var P=new Set,g=B;g>=0;g-=1){var y=F.get(g)||new Set;y.forEach(function(O){var W=O.parent,de=O.node;if(C(de)||!O.parent||P.has(O.parent.key))return;if(C(O.parent.node)){P.add(W.key);return}var pe=!0,re=!1;(W.children||[]).filter(function(xe){return!C(xe.node)}).forEach(function(xe){var ye=xe.key,Q=E.has(ye);pe&&!Q&&(pe=!1),!re&&(Q||M.has(ye))&&(re=!0)}),pe||E.delete(W.key),re&&M.add(W.key),P.add(W.key)})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(ke(M,E))}}function ue(Y,J,F,B){var C=[],E;B?E=B:E=Ee;var M=new Set(Y.filter(function(g){var y=!!F[g];return y||C.push(g),y})),S=new Map,w=0;Object.keys(F).forEach(function(g){var y=F[g],O=y.level,W=S.get(O);W||(W=new Set,S.set(O,W)),W.add(y),w=Math.max(w,O)}),Object(q.a)(!C.length,"Tree missing follow keys: ".concat(C.slice(0,100).map(function(g){return"'".concat(g,"'")}).join(", ")));var P;return J===!0?P=De(M,S,w,E):P=ge(M,J.halfCheckedKeys,S,w,E),P}},OLES:function(mt,Ce,h){"use strict";var q=h("U8pU"),ke=h("VTBJ"),Ee=h("Ff2n"),De=h("q1tI"),ge=h("uciX"),ue=h("7ixt"),Y=function(M){var S=M.overlay,w=M.prefixCls,P=M.id,g=M.overlayInnerStyle;return De.createElement("div",{className:"".concat(w,"-inner"),id:P,role:"tooltip",style:g},typeof S=="function"?S():S)},J=Y,F=function(M,S){var w=M.overlayClassName,P=M.trigger,g=P===void 0?["hover"]:P,y=M.mouseEnterDelay,O=y===void 0?0:y,W=M.mouseLeaveDelay,de=W===void 0?.1:W,pe=M.overlayStyle,re=M.prefixCls,xe=re===void 0?"rc-tooltip":re,ye=M.children,Q=M.onVisibleChange,we=M.afterVisibleChange,Z=M.transitionName,j=M.animation,Ae=M.placement,oe=Ae===void 0?"right":Ae,K=M.align,z=K===void 0?{}:K,te=M.destroyTooltipOnHide,G=te===void 0?!1:te,V=M.defaultVisible,m=M.getTooltipContainer,p=M.overlayInnerStyle,H=Object(Ee.a)(M,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),ae=Object(De.useRef)(null);Object(De.useImperativeHandle)(S,function(){return ae.current});var Te=Object(ke.a)({},H);"visible"in M&&(Te.popupVisible=M.visible);var We=function(){var X=M.arrowContent,N=X===void 0?null:X,I=M.overlay,x=M.id;return[De.createElement("div",{className:"".concat(xe,"-arrow"),key:"arrow"},N),De.createElement(J,{key:"content",prefixCls:xe,id:x,overlay:I,overlayInnerStyle:p})]},Re=!1,Pe=!1;if(typeof G=="boolean")Re=G;else if(G&&Object(q.a)(G)==="object"){var ne=G.keepParent;Re=ne===!0,Pe=ne===!1}return De.createElement(ge.a,Object.assign({popupClassName:w,prefixCls:xe,popup:We,action:g,builtinPlacements:ue.a,popupPlacement:oe,ref:ae,popupAlign:z,getPopupContainer:m,onPopupVisibleChange:Q,afterPopupVisibleChange:we,popupTransitionName:Z,popupAnimation:j,defaultPopupVisible:V,destroyPopupOnHide:Re,autoDestroy:Pe,mouseLeaveDelay:de,popupStyle:pe,mouseEnterDelay:O},Te),ye)},B=Object(De.forwardRef)(F),C=Ce.a=B},OZM5:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return B}),h.d(Ce,"a",function(){return C}),h.d(Ce,"k",function(){return E}),h.d(Ce,"h",function(){return M}),h.d(Ce,"i",function(){return S}),h.d(Ce,"g",function(){return w}),h.d(Ce,"c",function(){return P}),h.d(Ce,"d",function(){return g}),h.d(Ce,"j",function(){return W}),h.d(Ce,"e",function(){return de}),h.d(Ce,"f",function(){return pe});var q=h("KQm4"),ke=h("U8pU"),Ee=h("Ff2n"),De=h("q1tI"),ge=h.n(De),ue=h("Kwbf"),Y=h("WaYH"),J=.25,F=2;function B(re,xe){var ye=re.slice(),Q=ye.indexOf(xe);return Q>=0&&ye.splice(Q,1),ye}function C(re,xe){var ye=re.slice();return ye.indexOf(xe)===-1&&ye.push(xe),ye}function E(re){return re.split("-")}function M(re,xe){return"".concat(re,"-").concat(xe)}function S(re){return re&&re.type&&re.type.isTreeNode}function w(re,xe){var ye=[re],Q=xe[re];function we(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Z.forEach(function(j){var Ae=j.key,oe=j.children;ye.push(Ae),we(oe)})}return we(Q.children),ye}function P(re,xe){var ye=re.clientY,Q=xe.selectHandle.getBoundingClientRect(),we=Q.top,Z=Q.bottom,j=Q.height,Ae=Math.max(j*J,F);return ye<=we+Ae?-1:ye>=Z-Ae?1:0}function g(re,xe){if(!re)return;var ye=xe.multiple;return ye?re.slice():re.length?[re[0]]:re}var y=function(xe){return xe};function O(re,xe){if(!re)return[];var ye=xe||{},Q=ye.processProps,we=Q===void 0?y:Q,Z=Array.isArray(re)?re:[re];return Z.map(function(j){var Ae=j.children,oe=Object(Ee.a)(j,["children"]),K=O(Ae,xe);return ge.a.createElement(Y.a,Object.assign({},we(oe)),K)})}function W(re){if(!re)return null;var xe;if(Array.isArray(re))xe={checkedKeys:re,halfCheckedKeys:void 0};else if(Object(ke.a)(re)==="object")xe={checkedKeys:re.checked||void 0,halfCheckedKeys:re.halfChecked||void 0};else return Object(ue.a)(!1,"`checkedKeys` is not an array or an object"),null;return xe}function de(re,xe){var ye=new Set;function Q(we){if(ye.has(we))return;var Z=xe[we];if(!Z)return;ye.add(we);var j=Z.parent,Ae=Z.node;if(Ae.disabled)return;j&&Q(j.key)}return(re||[]).forEach(function(we){Q(we)}),Object(q.a)(ye)}function pe(re){var xe={};return Object.keys(re).forEach(function(ye){(ye.startsWith("data-")||ye.startsWith("aria-"))&&(xe[ye]=re[ye])}),xe}},Ot1p:function(mt,Ce,h){"use strict";var q=h("2qtc"),ke=h("kLXV"),Ee=h("rAM+"),De=h("miYZ"),ge=h("tsqr"),ue=h("9og8"),Y=h("tJVT"),J=h("jrin"),F=h("WmNS"),B=h.n(F),C=h("q1tI"),E=h.n(C),M=h("VrN/"),S=h.n(M),w=h("bdgK"),P=h("p77/"),g=h("Bd2K"),y=h("ELLl"),O=h("19Vz"),W=h("lZu9"),de=h("+NIl"),pe=h("kSUc"),re=h("9Bee"),xe=function(Se){var qe=Se.value,at=qe===void 0?"":qe,st=Se.className,lt=Se.showTextOnly,St=Se.showLines,Ot=Se.style,dt=Ot===void 0?{}:Ot,Ht=Object(C.useMemo)(function(){return""},[at]);return E.a.createElement(E.a.Fragment,null,E.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ht}}))},ye=h("0Owb"),Q=h("dejd"),we=h("C+DQ"),Z=h("1vsH"),j=h("m3rI"),Ae=[{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 oe(Se){var qe=Se.onActionCallback,at=Se.title,st=Se.icon,lt=Se.actionName,St=Se.className,Ot=St===void 0?"":St,dt=Se.children;function Ht(){qe(lt)}return E.a.createElement("a",{title:at,className:Ot,onClick:Ht},E.a.createElement("i",{className:"md-iconfont ".concat(st)}),dt)}var K=function(Se){var qe=Se.watch,at=Se.showNullButton,st=Se.onActionCallback,lt=Se.fullScreen,St=Se.insertTemp,Ot=Se.hidetoolBar,dt=Se.uuid,Ht=Se.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(Z.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(Z.D)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(j.a.PROXY_SERVER)));var Nt=[].concat(Ae,[{title:"".concat(qe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(qe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return E.a.createElement("ul",{className:"markdown-toolbar-container"},!Ot&&Nt.map(function(At,kt){return E.a.createElement("li",{key:kt},At.actionName?E.a.createElement(oe,Object(ye.a)({},At,{onActionCallback:st})):E.a.createElement("span",{className:"v-line"}))}),at?E.a.createElement("li",null,E.a.createElement(oe,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:st},E.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,St&&E.a.createElement("li",null,E.a.createElement(oe,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(St),onActionCallback:st},E.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),E.a.createElement("li",{className:"btn-full-screen"},E.a.createElement(oe,{icon:"".concat(lt?"icon-shrink":"icon-enlarge"),title:lt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:st})))},z=h("M8RZ"),te=h("+L6B"),G=h("2/Rp"),V=h("y8nQ"),m=h("Vl3Y"),p=h("5NDa"),H=h("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},Te=function(Se){var qe=Se.callback,at=Se.onCancel;function st(lt){qe(lt)}return E.a.createElement(m.a,Object(ye.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:st}),E.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},E.a.createElement(H.a,null)),E.a.createElement(m.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},E.a.createElement(H.a,null)),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(G.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))},We=h("7ahc"),Re=h("k1fw"),Pe=h("HmJG"),ne=h("BjJ7"),_=m.a.useForm,X={width:280,marginRight:10},N={labelCol:{span:5},wrapperCol:{span:19}},I=function(Se){var qe=Se.callback,at=Se.onCancel,st=_(),lt=Object(Y.a)(st,1),St=lt[0],Ot=Object(C.useRef)();function dt(At){qe(Object(Re.a)(Object(Re.a)({},At),{},{name:Ot.current}))}function Ht(At,kt){St.setFieldsValue({src:"/api/attachments/".concat(At.id,"?type=").concat(At.content_type),type:kt.type})}function Nt(At){var kt=At.target.files[0];Ot.current=kt.name,k(kt,Ht)}return E.a.createElement(m.a,Object(ye.a)({form:St},N,{className:"upload-image-panel",onFinish:dt}),E.a.createElement(m.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},E.a.createElement("div",{className:"flex-container"},E.a.createElement(m.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},E.a.createElement(H.a,{style:X})),E.a.createElement(x,{onFileChange:Nt}))),E.a.createElement(m.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},E.a.createElement(H.a,{style:{width:264}})),E.a.createElement(m.a.Item,{style:{textAlign:"right"}},E.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(G.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))};function x(Se){var qe=Se.onFileChange;return E.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",E.a.createElement("input",{type:"file",onChange:qe}))}function k(Se,qe){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");var at=new FormData;at.append("editormd-image-file",Se),at.append("file_param_name","editormd-image-file"),at.append("byxhr","true");var st=new window.XMLHttpRequest;st.withCredentials=!0,st.addEventListener("load",function(lt){qe(JSON.parse(lt.target.responseText),Se)},!1),st.addEventListener("error",function(lt){console.error(lt)},!1),st.open("POST","".concat(ne.a,"/api/attachments.json")),st.send(at)}var D=h("giR+"),$=h("fyUT"),L=h("7Kak"),A=h("9yH6"),ie=A.a.Group,be={margin:"0 8px"},Me=function(Se){var qe=Se.callback,at=Se.onCancel;function st(lt){qe(lt)}return E.a.createElement(m.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:st},E.a.createElement("div",{className:"flex-container"},E.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),E.a.createElement("span",{style:be},"\u884C\u6570"),E.a.createElement(m.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},E.a.createElement($.a,null)),E.a.createElement("span",{style:be},"\u5217\u6570"),E.a.createElement(m.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},E.a.createElement($.a,null))),E.a.createElement("div",{className:"flex-container",style:{marginTop:12}},E.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),E.a.createElement(m.a.Item,{name:"align"},E.a.createElement(ie,null,E.a.createElement(A.a,{value:"default"},E.a.createElement("i",{className:"fa fa-align-justify"})),E.a.createElement(A.a,{value:"left"},E.a.createElement("i",{className:"fa fa-align-left"})),E.a.createElement(A.a,{value:"center"},E.a.createElement("i",{className:"fa fa-align-center"})),E.a.createElement(A.a,{value:"right"},E.a.createElement("i",{className:"fa fa-align-right"}))))),E.a.createElement("div",{className:"flex-container flex-end"},E.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.a.createElement(G.a,{type:"ghost",onClick:at},"\u53D6\u6D88")))},Ue=h("ErOA"),ze=h("7Cbv"),He="link",nt="upload-image",Oe="code-block",Fe="add-table",Be="------------",Ge={default:Be,left:":".concat(Be),center:":".concat(Be,":"),right:"".concat(Be,":")},Ye=h("9VGf"),Xe,Le;function Ve(){}var et=0,_e=1e4,Ke="\u2581",me=`
**\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 se(Se){return/^\d+$/.test(Se)?"".concat(Se,"px"):Se}var ve=navigator.platform.toUpperCase().indexOf("MAC")>=0,R=ve?"Cmd":"Ctrl",U=["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"],ee=(Xe={},Object(J.a)(Xe,R+"-B","bold"),Object(J.a)(Xe,R+"-I","italic"),Xe),ce=(Le={},Object(J.a)(Le,He,"\u6DFB\u52A0\u94FE\u63A5"),Object(J.a)(Le,Oe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(J.a)(Le,nt,"\u6DFB\u52A0\u6587\u4EF6"),Object(J.a)(Le,Fe,"\u6DFB\u52A0\u8868\u683C"),Le),je=Ce.a=function(Se){var qe=Se.defaultValue,at=qe===void 0?"":qe,st=Se.onChange,lt=Se.width,St=lt===void 0?"100%":lt,Ot=Se.height,dt=Ot===void 0?400:Ot,Ht=Se.miniToolbar,Nt=Ht===void 0?!1:Ht,At=Se.isFocus,kt=At===void 0?!1:At,Lt=Se.watch,zt=Se.insertTemp,rn=Se.mode,bt=rn===void 0?"markdown":rn,Et=Se.id,it=Et===void 0?"markdown-editor-id":Et,xt=Se.showResizeBar,Wt=xt===void 0?!1:xt,Ut=Se.noStorage,Xt=Ut===void 0?!1:Ut,_t=Se.showNullButton,vt=_t===void 0?!1:_t,ln=Se.hidetoolBar,An=ln===void 0?!1:ln,En=Se.fullScreen,jt=En===void 0?!1:En,gn=Se.onBlur,fn=Se.onCMBeforeChange,Vn=Se.onFullScreen,Je=Se.className,ht=Je===void 0?"":Je,It=Se.disablePaste,Kt=It===void 0?!1:It,Jt=Se.placeholder,qt=Jt===void 0?"":Jt,c=Se.values,o=c===void 0?"":c,a=Object(C.useState)(null),l=Object(Y.a)(a,2),f=l[0],d=l[1],he=Object(C.useState)(at),Ze=Object(Y.a)(he,2),rt=Ze[0],ut=Ze[1],$e=Object(C.useState)(Lt),Ct=Object(Y.a)($e,2),gt=Ct[0],Bt=Ct[1],yn=Object(C.useState)(jt),cn=Object(Y.a)(yn,2),on=cn[0],kn=cn[1],Xn=Object(C.useState)(""),wn=Object(Y.a)(Xn,2),en=wn[0],bn=wn[1],Qn=Object(C.useState)(0),Sn=Object(Y.a)(Qn,2),ci=Sn[0],Tn=Sn[1],Bn=Object(C.useState)(dt),tn=Object(Y.a)(Bn,2),Tt=tn[0],ct=tn[1],Nn=Object(C.useState)(!1),dn=Object(Y.a)(Nn,2),$n=dn[0],pn=dn[1],$t=Object(C.useRef)(Object(ze.a)()),Ln=Object(C.useRef)(!1),Gt=Object(C.useRef)(),Cn=Object(C.useRef)(),Zt=Object(C.useRef)(),Yn=Object(C.useRef)(),vn=Object(C.useRef)(),Mn=function(){var Dt=Object(ue.a)(B.a.mark(function Ft(){var Rt,Yt;return B.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(Ue.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:$t.current}});case 2:Yt=hn.sent,Yt!=null&&(Rt=Yt.attachments)!==null&&Rt!==void 0&&Rt.length&&(console.log("cm:",f,Cn),Yt.attachments.map(function(nn){nn.content_type.indexOf("image")>-1?f.replaceSelection("![,](/api/attachments/".concat(nn.id,"?type=").concat(nn.content_type,")")):nn.content_type.indexOf("video")>-1?f.replaceSelection('<video width="100%" controls src="'.concat(j.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):nn.content_type.indexOf("pdf")>-1?f.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(nn.content_type,'&disposition=inline" target="_blank">').concat(nn.name,"</a>")):f.replaceSelection("[".concat(nn.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(nn.id,"?type=").concat(nn.content_type,")"))}));case 4:case"end":return hn.stop()}},Ft)}));return function(){return Dt.apply(this,arguments)}}();Object(C.useEffect)(function(){ut(o),f==null||f.setValue(o)},[o]),Object(C.useEffect)(function(){Vn==null||Vn(on)},[on]),Object(C.useEffect)(function(){if(Cn.current){var Dt=S.a.fromTextArea(Cn.current,{mode:bt,lineNumbers:!Nt,lineWrapping:!0,value:at,autoCloseTags:!0,autoCloseBrackets:!0});kt&&Dt.focus();function Ft(Rt,Yt){if(Kt){Yt.preventDefault();return}var an=Yt.clipboardData;if(an){var hn=an.types.toString(),nn=an.items;if(hn==="Files"||an.types.indexOf("Files")>-1){if(Yt.preventDefault(),bt=="stex")return;try{var jn,ri=nn[1];((jn=nn[0])===null||jn===void 0?void 0:jn.kind)==="file"&&(ri=nn[0]);var Qt=ri.getAsFile(),Di=Qt.name.split(".").pop();k(Qt,function(sn){if(sn.id){var Wn,vi,gi;(Qt==null||((Wn=Qt.type)===null||Wn===void 0)?void 0:Wn.indexOf("image"))>-1?Dt.replaceSelection("![,](/api/attachments/".concat(sn.id,"?type=").concat(sn.content_type,")")):(Qt==null||((vi=Qt.type)===null||vi===void 0)?void 0:vi.indexOf("video"))>-1?Dt.replaceSelection('<video width="100%" controls src="'.concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,'"></video>')):(Qt==null||((gi=Qt.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?Dt.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(Qt.type,'&disposition=inline" target="_blank">').concat(Qt.name,"</a>")):U.includes(Di)?Dt.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,'?type=office&disposition=inline" target="_blank">').concat(Qt.name,"</a>")):Dt.replaceSelection("[".concat(Qt.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(sn.content_type,")"))}else(sn==null?void 0:sn.status)===401&&(document.location.href="/user/login")})}catch(sn){ge.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Dt.on("paste",Ft),Dt.on("dragleave",function(Rt,Yt){Zt.current.classList.remove("mouse-hover-md")}),Dt.on("dragover",function(Rt,Yt){Zt.current.classList.add("mouse-hover-md")}),Dt.on("drop",function(Rt,Yt){Zt.current.classList.add("mouse-hover-md");var an;if(an=Yt.dataTransfer.files,an.length>0){Yt.preventDefault(),Yt.stopPropagation();for(var hn=function(ri){var Qt=an[ri],Di=Qt.name.split(".").pop();k(Qt,function(sn){if(sn.id){var Wn,vi,gi;(Qt==null||((Wn=Qt.type)===null||Wn===void 0)?void 0:Wn.indexOf("image"))>-1?Dt.replaceSelection("![,](/api/attachments/".concat(sn.id,"?type=").concat(sn.content_type,")")):(Qt==null||((vi=Qt.type)===null||vi===void 0)?void 0:vi.indexOf("video"))>-1?Dt.replaceSelection('<video width="100%" controls src="'.concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,'"></video>')):(Qt==null||((gi=Qt.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?Dt.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(Qt.type,'&disposition=inline" target="_blank">').concat(Qt.name,"</a>")):U.includes(Di)?Dt.replaceSelection('<a href="'.concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,'?type=office&disposition=inline" target="_blank">').concat(Qt.name,"</a>")):Dt.replaceSelection("[".concat(Qt.name,"](").concat(j.a.API_SERVER,"/api/attachments/").concat(sn.id,"?type=").concat(sn.content_type,")"))}else(sn==null?void 0:sn.status)===401&&(document.location.href="/user/login")})},nn=0;nn<an.length;nn++)hn(nn)}}),d(Dt),function(){Dt.off("paste",Ft)}}},[]);var yi=Object(C.useCallback)(function(){if(Zt.current)try{}catch(Dt){console.log(Dt,"---- to set md editor body height")}},[Tt,Zt,on]);Object(C.useEffect)(function(){function Dt(){var Rt=new w.default(function(Yt){var an=Object(Ee.a)(Yt),hn;try{for(an.s();!(hn=an.n()).done;){var nn=hn.value;(nn.target.offsetHeight>0||nn.target.offsetWidth>0)&&(yi(),f.setSize("100%","100%"),f.refresh())}}catch(jn){an.e(jn)}finally{an.f()}});return Rt.observe(Cn.current.parentElement),Rt}if(f){var Ft=Dt();return function(){Ft.unobserve(Cn.current.parentElement)}}},[f,yi]),Object(C.useEffect)(function(){if(f){for(var Dt=[],Ft=function(){var nn=Yt[Rt];an=Object(Y.a)(nn,2);var jn=an[0],ri=an[1],Qt=Object(J.a)({},jn,function(){ii(ri)});Dt.push(Qt),f.addKeyMap(Qt)},Rt=0,Yt=Object.entries(ee);Rt<Yt.length;Rt++){var an;Ft()}return Gt.current=setInterval(function(){Ln.current&&Mn()},4e3),function(){clearInterval(Gt.current);var hn=Object(Ee.a)(Dt),nn;try{for(hn.s();!(nn=hn.n()).done;){var jn=nn.value;f.removeKeyMap(jn)}}catch(ri){hn.e(ri)}finally{hn.f()}}}},[f]),Object(C.useEffect)(function(){jt!==on&&kn(jt)},[jt]),Object(Ye.a)(function(){if(!Xt&&ci>0){var Dt=new Date().getTime(),Ft=window.sessionStorage.getItem(it);Dt>=ci+_e&&(!Ft||Ft!==rt)&&(window.sessionStorage.setItem(it,rt),pn(!0))}},_e),Object(C.useEffect)(function(){Bt(Lt)},[f,Lt]),Object(C.useEffect)(function(){f&&(kt&&f.focus())},[f,kt]),Object(C.useEffect)(function(){if(gt&&f){var Dt=f.getScrollerElement();function Ft(Rt){var Yt=Rt.target;if(vn.current){var an=Yt.scrollTop/Yt.scrollHeight;vn.current.scrollTop=vn.current.scrollHeight*an}}return Dt.addEventListener("scroll",Ft),function(){Dt.removeEventListener("scroll",Ft)}}},[f,gt]),Object(C.useEffect)(function(){if(f&&fn){function Dt(Ft,Rt){fn(Ft,Rt)}return f.on("beforeChange",Dt),function(){f.off("beforeChange",Dt)}}},[f,fn]),Object(C.useEffect)(function(){if(f&&gn){function Dt(){gn(f.getValue())}return f.on("blur",Dt),function(){f.off("blur",Dt)}}},[f,gn]),Object(C.useEffect)(function(){if(f){function Dt(Ft){var Rt=Ft.getValue();ut(Rt),Tn(new Date().getTime()),Ft.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),st&&st(Rt)}return f.on("change",Dt),function(){f.off("change",Dt)}}},[f,st]),Object(C.useEffect)(function(){f&&(at==null?(f.setValue(""),ut("")):at!==f.getValue()&&(f.setValue(at),ut(at),f.setCursor(f.lineCount(),0)))},[f,at]);var ii=Object(C.useCallback)(function(Dt){var Ft=f.getCursor(),Rt=f.getSelection(),Yt=Rt.split(`
`);switch(Dt){case"bold":return f.replaceSelection("**"+Rt+"**"),Rt===""&&f.setCursor(Ft.line,Ft.ch+2),f.focus();case"italic":return f.replaceSelection("*"+Rt+"*"),Rt===""&&f.setCursor(Ft.line,Ft.ch+1),f.focus();case"code":return f.replaceSelection("`"+Rt+"`"),Rt===""&&f.setCursor(Ft.line,Ft.ch+1),f.focus();case"inline-latex":return f.replaceSelection("`$$"+Rt+"$$`"),Rt===""&&f.setCursor(Ft.line,Ft.ch+3),f.focus();case"latex":return f.replaceSelection("```latex\n"+Rt+"\n```"),f.setCursor(Ft.line+1,Rt.length+1),f.focus();case"line-break":return f.replaceSelection(`<br/>
`),f.focus();case"list-ul":return Rt===""?f.replaceSelection("- "+Rt):f.replaceSelection(Yt.map(function(an){return an===""?"":"- ".concat(an)}).join(`
`)),f.focus();case"list-ol":return Rt===""?f.replaceSelection("1. "+Rt):f.replaceSelection(Yt.map(function(an,hn){return an===""?"":"".concat(hn+1,". ").concat(an)}).join(`
`)),f.focus();case"add-null-ch":return Rt===""&&f.setCursor(Ft.line,Ft.ch+1),f.replaceSelection(Ke),f.focus();case"inster-template-1":return Rt===""&&f.setCursor(Ft.line,Ft.ch),f.replaceSelection(me),f.focus();case"eraser":return f.setValue(""),f.focus();case"trigger-watch":return Bt(!gt),f.focus();case"trigger-full-screen":return kn(!on),f.focus();case He:bn(He);return;case Oe:bn(Oe);return;case nt:bn(nt);return;case Fe:bn(Fe);return;default:throw new Error}},[f,gt,on]),di=Object(C.useCallback)(function(Dt){bn("");switch(en){case He:var Ft=Dt.title,Rt=Dt.link;return f.replaceSelection("[".concat(Ft,"](").concat(Rt,")")),f.focus();case Oe:var Yt=Dt.language,an=Dt.content;return f.replaceSelection(["```"+Yt,an,"```"].join(`
`)),f.focus();case nt:var hn=Dt.src,nn=Dt.alt,jn=Dt.name;return hn.indexOf("type=image")>-1?f.replaceSelection("![ ".concat(nn||""," ]( ").concat(hn,' "').concat(nn||"",'" )')):hn.indexOf("type=application/pdf")>-1?f.replaceSelection('<a href="'.concat(hn,'&disposition=inline" target="_blank">').concat(jn,"</a>")):f.replaceSelection('<a href="'.concat(hn,'" target="_blank">').concat(jn,"</a>")),f.focus();case Fe:for(var ri=Dt.row,Qt=Dt.col,Di=Dt.align,sn=`
`,Wn=0;Wn<ri;Wn++){for(var vi=[],gi=[],Wr=0;Wr<Qt;Wr++)Wn===1&&gi.push(Ge[Di]),vi.push(" ");Wn===1&&(sn+="| ".concat(gi.join(" | "),` |
`)),sn+="| ".concat(vi.join(Qt===1?"":" | "),` |
`)}return f.replaceSelection(sn+`
`),f.focus();default:throw new Error}},[f,en]),pr=Object(C.useMemo)(function(){switch(en){case He:return E.a.createElement(Te,{callback:di,onCancel:_n});case Oe:return E.a.createElement(We.b,{callback:di,onCancel:_n});case nt:return E.a.createElement(I,{callback:di,onCancel:_n});case Fe:return E.a.createElement(Me,{callback:di,onCancel:_n});default:return null}},[en]);function _n(){bn("")}Object(C.useEffect)(function(){if(Yn.current){var Dt=Yn.current,Ft=!1,Rt=0;function Yt(nn){Ft=!0,Rt=nn.pageY}function an(){Ft=!1}function hn(nn){if(Ft){var jn=nn.pageY-Rt;jn<0&&(jn=0),jn>300&&(jn=300);var ri=dt+jn+"px";ct(ri)}}return Dt.addEventListener("mousedown",Yt),document.addEventListener("mousemove",hn),document.addEventListener("mouseup",an),function(){Dt.removeEventListener("mousedown",Yt),document.removeEventListener("mousemove",hn),document.removeEventListener("mouseup",an)}}},[f,Yn]),Object(C.useEffect)(function(){ct(dt)},[dt]);var Li=se(St),bi=se(Tt),Ji={width:Li,height:bi},Br=Object(C.useMemo)(function(){if(ci){var Dt=new Date(ci),Ft=Dt.getHours(),Rt=Dt.getMinutes(),Yt=Dt.getSeconds();return Ft=Ft<10?"0"+Ft:Ft,Rt=Rt<10?"0"+Rt:Rt,Yt=Yt<10?"0"+Yt:Yt,"".concat(Ft,":").concat(Rt,":").concat(Yt)}return 0},[ci]);function Ui(){window.sessionStorage.removeItem(it),pn(!1),Tn(0)}function Jo(){pn(!1),Tn(0),f.setValue(window.sessionStorage.getItem(it))}function co(Dt,Ft){var Rt=f.getValue();Rt=Rt.replace(Dt,Ft),ut(Rt),f==null||f.setValue(Rt)}return E.a.createElement(C.Fragment,null,E.a.createElement("div",{className:"markdown-editor-wrapper",ref:Zt},E.a.createElement("div",{className:"markdown-editor-container ".concat(ht," ").concat(gt?"on-preview":""," ").concat(Nt?"mini":""," ").concat(on?"full-screen":""),style:Ji},E.a.createElement(K,{insertTemp:zt,watch:gt,fullScreen:on,showNullButton:vt,onActionCallback:ii,hidetoolBar:An,uuid:$t.current,setOpenPhones:function(){Ln.current=!0}}),E.a.createElement("div",{className:"markdown-editor-body"},E.a.createElement("div",{className:"codemirror-container"},E.a.createElement("textarea",{ref:Cn,placeholder:qt})),gt?E.a.createElement("div",{ref:vn,className:"preview-container"},bt==="stex"&&E.a.createElement(xe,{value:rt}),bt!=="stex"&&E.a.createElement(re.a,{edit:!0,value:rt,replaces:co})):null))),Wt?E.a.createElement("a",{ref:Yn,className:"editor-resize"}):null,E.a.createElement(z.a,null,ce[en]?E.a.createElement(ke.a,{centered:!0,title:ce[en],visible:!0,onCancel:_n,footer:null},pr):null))}},QDVR:function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return ke}),h.d(Ce,"d",function(){return Ee}),h.d(Ce,"c",function(){return Y}),h.d(Ce,"b",function(){return J}),h.d(Ce,"a",function(){return B});var q=function(){var C=function(E,M){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var P in w)w.hasOwnProperty(P)&&(S[P]=w[P])},C(E,M)};return function(E,M){C(E,M);function S(){this.constructor=E}E.prototype=M===null?Object.create(M):(S.prototype=M.prototype,new S)}}();function ke(C){var E=[];return C.forEach(function(M){return E.push(M)}),E}function Ee(C){var E=[];return C.forEach(function(M,S){return E.push(S)}),E}var De=function(){function C(){this._value="",this._pos=0}return C.prototype.reset=function(E){return this._value=E,this._pos=0,this},C.prototype.next=function(){return this._pos+=1,this},C.prototype.hasNext=function(){return this._pos<this._value.length-1},C.prototype.cmp=function(E){var M=E.charCodeAt(0),S=this._value.charCodeAt(this._pos);return M-S},C.prototype.value=function(){return this._value[this._pos]},C}(),ge=function(){function C(E){E===void 0&&(E=!0),this._splitOnBackslash=E}return C.prototype.reset=function(E){return this._value=E.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},C.prototype.hasNext=function(){return this._to<this._value.length},C.prototype.next=function(){this._from=this._to;for(var E=!0;this._to<this._value.length;this._to++){var M=this._value.charCodeAt(this._to);if(M===47||this._splitOnBackslash&&M===92)if(E)this._from++;else break;else E=!1}return this},C.prototype.cmp=function(E){for(var M=0,S=E.length,w=this._from;M<S&&w<this._to;){var P=E.charCodeAt(M)-this._value.charCodeAt(w);if(P!==0)return P;M+=1,w+=1}return S===this._to-this._from?0:M<S?-1:1},C.prototype.value=function(){return this._value.substring(this._from,this._to)},C}(),ue=function(){function C(){}return C}(),Y=function(){function C(E){this._iter=E}return C.forPaths=function(){return new C(new ge)},C.forStrings=function(){return new C(new De)},C.prototype.clear=function(){this._root=void 0},C.prototype.set=function(E,M){var S=this._iter.reset(E),w;for(this._root||(this._root=new ue,this._root.segment=S.value()),w=this._root;;){var P=S.cmp(w.segment);if(P>0)w.left||(w.left=new ue,w.left.segment=S.value()),w=w.left;else if(P<0)w.right||(w.right=new ue,w.right.segment=S.value()),w=w.right;else if(S.hasNext())S.next(),w.mid||(w.mid=new ue,w.mid.segment=S.value()),w=w.mid;else break}var g=w.value;return w.value=M,w.key=E,g},C.prototype.get=function(E){for(var M=this._iter.reset(E),S=this._root;S;){var w=M.cmp(S.segment);if(w>0)S=S.left;else if(w<0)S=S.right;else if(M.hasNext())M.next(),S=S.mid;else break}return S?S.value:void 0},C.prototype.findSubstr=function(E){for(var M=this._iter.reset(E),S=this._root,w=void 0;S;){var P=M.cmp(S.segment);if(P>0)S=S.left;else if(P<0)S=S.right;else if(M.hasNext())M.next(),w=S.value||w,S=S.mid;else break}return S&&S.value||w},C.prototype.forEach=function(E){this._forEach(this._root,E)},C.prototype._forEach=function(E,M){E&&(this._forEach(E.left,M),E.value&&M(E.value,E.key),this._forEach(E.mid,M),this._forEach(E.right,M))},C}(),J=function(){function C(){this.map=new Map,this.ignoreCase=!1}return C.prototype.set=function(E,M){this.map.set(this.toKey(E),M)},C.prototype.get=function(E){return this.map.get(this.toKey(E))},C.prototype.toKey=function(E){var M=E.toString();return this.ignoreCase&&(M=M.toLowerCase()),M},C}(),F=function(){function C(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return C.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(C.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),C.prototype.get=function(E,M){M===void 0&&(M=0);var S=this._map.get(E);return S?(M!==0&&this.touch(S,M),S.value):void 0},C.prototype.set=function(E,M,S){S===void 0&&(S=0);var w=this._map.get(E);if(w)w.value=M,S!==0&&this.touch(w,S);else{w={key:E,value:M,next:void 0,previous:void 0};switch(S){case 0:this.addItemLast(w);break;case 1:this.addItemFirst(w);break;case 2:this.addItemLast(w);break;default:this.addItemLast(w);break}this._map.set(E,w),this._size++}},C.prototype.delete=function(E){return!!this.remove(E)},C.prototype.remove=function(E){var M=this._map.get(E);return M?(this._map.delete(E),this.removeItem(M),this._size--,M.value):void 0},C.prototype.forEach=function(E,M){for(var S=this._head;S;)M?E.bind(M)(S.value,S.key,this):E(S.value,S.key,this),S=S.next},C.prototype.trimOld=function(E){if(E>=this.size)return;if(E===0){this.clear();return}for(var M=this._head,S=this.size;M&&S>E;)this._map.delete(M.key),M=M.next,S--;this._head=M,this._size=S,M&&(M.previous=void 0)},C.prototype.addItemFirst=function(E){if(!this._head&&!this._tail)this._tail=E;else if(this._head)E.next=this._head,this._head.previous=E;else throw new Error("Invalid list");this._head=E},C.prototype.addItemLast=function(E){if(!this._head&&!this._tail)this._head=E;else if(this._tail)E.previous=this._tail,this._tail.next=E;else throw new Error("Invalid list");this._tail=E},C.prototype.removeItem=function(E){if(E===this._head&&E===this._tail)this._head=void 0,this._tail=void 0;else if(E===this._head){if(!E.next)throw new Error("Invalid list");E.next.previous=void 0,this._head=E.next}else if(E===this._tail){if(!E.previous)throw new Error("Invalid list");E.previous.next=void 0,this._tail=E.previous}else{var M=E.next,S=E.previous;if(!M||!S)throw new Error("Invalid list");M.previous=S,S.next=M}E.next=void 0,E.previous=void 0},C.prototype.touch=function(E,M){if(!this._head||!this._tail)throw new Error("Invalid list");if(M!==1&&M!==2)return;if(M===1){if(E===this._head)return;var S=E.next,w=E.previous;E===this._tail?(w.next=void 0,this._tail=w):(S.previous=w,w.next=S),E.previous=void 0,E.next=this._head,this._head.previous=E,this._head=E}else if(M===2){if(E===this._tail)return;var S=E.next,w=E.previous;E===this._head?(S.previous=void 0,this._head=S):(S.previous=w,w.next=S),E.next=void 0,E.previous=this._tail,this._tail.next=E,this._tail=E}},C.prototype.toJSON=function(){var E=[];return this.forEach(function(M,S){E.push([S,M])}),E},C}(),B=function(C){q(E,C);function E(M,S){S===void 0&&(S=1);var w=C.call(this)||this;return w._limit=M,w._ratio=Math.min(Math.max(0,S),1),w}return E.prototype.get=function(M){return C.prototype.get.call(this,M,2)},E.prototype.peek=function(M){return C.prototype.get.call(this,M,0)},E.prototype.set=function(M,S){C.prototype.set.call(this,M,S,2),this.checkTrim()},E.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},E}(F)},RxwV:function(mt,Ce,h){"use strict";var q=h("q1tI"),ke=h("uciX"),Ee=h("2W6z"),De=h.n(Ee),ge=h("4IlW"),ue=h("uK0f"),Y=h.n(ue);function J(_,X){if(_===X)return!0;if(!_||!X)return!1;var N=_.length;if(X.length!==N)return!1;for(var I=0;I<N;I++)if(_[I]!==X[I])return!1;return!0}function F(_){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F=function(N){return typeof N}:F=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},F(_)}function B(_,X){if(!(_ instanceof X))throw new TypeError("Cannot call a class as a function")}function C(_,X){for(var N=0;N<X.length;N++){var I=X[N];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,I.key,I)}}function E(_,X,N){return X&&C(_.prototype,X),N&&C(_,N),_}function M(_,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(X&&X.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),X&&S(_,X)}function S(_,X){return S=Object.setPrototypeOf||function(I,x){return I.__proto__=x,I},S(_,X)}function w(_){var X=y();return function(){var N=O(_),I;if(X){var x=O(this).constructor;I=Reflect.construct(N,arguments,x)}else I=N.apply(this,arguments);return P(this,I)}}function P(_,X){return X&&(F(X)==="object"||typeof X=="function")?X:g(_)}function g(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(_){return!1}}function O(_){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},O(_)}var W=function(){var _=function(X){M(I,X);var N=w(I);function I(){var x;return B(this,I),x=N.apply(this,arguments),x.menuItems={},x.saveMenuItem=function(k){return function(D){x.menuItems[k]=D}},x}return E(I,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(k){!k.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(k){var D=this.props,$=D.fieldNames,L=D.defaultFieldNames;return $[k]||L[k]}},{key:"getOption",value:function(k,D){var $=this.props,L=$.prefixCls,A=$.expandTrigger,ie=$.expandIcon,be=$.loadingIcon,Me=this.props.onSelect.bind(this,k,D),Ue=this.props.onItemDoubleClick.bind(this,k,D),ze={onClick:Me,onDoubleClick:Ue},He="".concat(L,"-menu-item"),nt=null,Oe=k[this.getFieldName("children")]&&k[this.getFieldName("children")].length>0;(Oe||k.isLeaf===!1)&&(He+=" ".concat(L,"-menu-item-expand"),k.loading||(nt=q.createElement("span",{className:"".concat(L,"-menu-item-expand-icon")},ie))),A==="hover"&&(Oe||k.isLeaf===!1)&&(ze={onMouseEnter:this.delayOnSelect.bind(this,Me),onMouseLeave:this.delayOnSelect.bind(this),onClick:Me}),this.isActiveOption(k,D)&&(He+=" ".concat(L,"-menu-item-active"),ze.ref=this.saveMenuItem(D)),k.disabled&&(He+=" ".concat(L,"-menu-item-disabled"));var Fe=null;k.loading&&(He+=" ".concat(L,"-menu-item-loading"),Fe=be||null);var Be="";return"title"in k?Be=k.title:typeof k[this.getFieldName("label")]=="string"&&(Be=k[this.getFieldName("label")]),q.createElement("li",Object.assign({key:k[this.getFieldName("value")],className:He,title:Be},ze,{role:"menuitem",onMouseDown:function(Ye){return Ye.preventDefault()}}),k[this.getFieldName("label")],nt,Fe)}},{key:"getActiveOptions",value:function(k){var D=this,$=this.props.options,L=k||this.props.activeValue;return Y()($,function(A,ie){return A[D.getFieldName("value")]===L[ie]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var k=this,D=this.props.options,$=this.getActiveOptions().map(function(L){return L[k.getFieldName("children")]}).filter(function(L){return!!L});return $.unshift(D),$}},{key:"delayOnSelect",value:function(k){for(var D=this,$=arguments.length,L=new Array($>1?$-1:0),A=1;A<$;A++)L[A-1]=arguments[A];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof k=="function"&&(this.delayTimer=window.setTimeout(function(){k(L),D.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var k=this.getShowOptions().length,D=0;D<k;D++){var $=this.menuItems[D];$&&$.parentElement&&($.parentElement.scrollTop=$.offsetTop)}}},{key:"isActiveOption",value:function(k,D){var $=this.props.activeValue,L=$===void 0?[]:$;return L[D]===k[this.getFieldName("value")]}},{key:"render",value:function(){var k=this,D=this.props,$=D.prefixCls,L=D.dropdownMenuColumnStyle;return q.createElement("div",null,this.getShowOptions().map(function(A,ie){return q.createElement("ul",{className:"".concat($,"-menu"),key:ie,style:L},A.map(function(be){return k.getOption(be,ie)}))}))}}]),I}(q.Component);return _.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},_}(),de=W,pe={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},re=pe;function xe(_){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(N){return typeof N}:xe=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},xe(_)}function ye(_,X){if(_==null)return{};var N=Q(_,X),I,x;if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(_);for(x=0;x<k.length;x++){if(I=k[x],X.indexOf(I)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(_,I))continue;N[I]=_[I]}}return N}function Q(_,X){if(_==null)return{};var N={},I=Object.keys(_),x,k;for(k=0;k<I.length;k++){if(x=I[k],X.indexOf(x)>=0)continue;N[x]=_[x]}return N}function we(_){return oe(_)||Ae(_)||j(_)||Z()}function Z(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j(_,X){if(!_)return;if(typeof _=="string")return K(_,X);var N=Object.prototype.toString.call(_).slice(8,-1);if(N==="Object"&&_.constructor&&(N=_.constructor.name),N==="Map"||N==="Set")return Array.from(_);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return K(_,X)}function Ae(_){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(_))return Array.from(_)}function oe(_){if(Array.isArray(_))return K(_)}function K(_,X){(X==null||X>_.length)&&(X=_.length);for(var N=0,I=new Array(X);N<X;N++)I[N]=_[N];return I}function z(_,X){if(!(_ instanceof X))throw new TypeError("Cannot call a class as a function")}function te(_,X){for(var N=0;N<X.length;N++){var I=X[N];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,I.key,I)}}function G(_,X,N){return X&&te(_.prototype,X),N&&te(_,N),_}function V(_,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(X&&X.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),X&&m(_,X)}function m(_,X){return m=Object.setPrototypeOf||function(I,x){return I.__proto__=x,I},m(_,X)}function p(_){var X=Te();return function(){var N=We(_),I;if(X){var x=We(this).constructor;I=Reflect.construct(N,arguments,x)}else I=N.apply(this,arguments);return H(this,I)}}function H(_,X){return X&&(xe(X)==="object"||typeof X=="function")?X:ae(_)}function ae(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function Te(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(_){return!1}}function We(_){return We=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},We(_)}var Re=function(){var _=function(X){V(I,X);var N=p(I);function I(x){var k;z(this,I),k=N.call(this,x),k.setPopupVisible=function($){var L=k.state.value;"popupVisible"in k.props||k.setState({popupVisible:$}),$&&!k.state.popupVisible&&k.setState({activeValue:L}),k.props.onPopupVisibleChange($)},k.handleChange=function($,L,A){var ie=L.visible;(A.type!=="keydown"||A.keyCode===ge.a.ENTER)&&(k.props.onChange($.map(function(be){return be[k.getFieldName("value")]}),$),k.setPopupVisible(ie))},k.handlePopupVisibleChange=function($){k.setPopupVisible($)},k.handleMenuSelect=function($,L,A){var ie=k.trigger.getRootDomNode();ie&&ie.focus&&ie.focus();var be=k.props,Me=be.changeOnSelect,Ue=be.loadData,ze=be.expandTrigger;if(!$||$.disabled)return;var He=k.state.activeValue;He=He.slice(0,L+1),He[L]=$[k.getFieldName("value")];var nt=k.getActiveOptions(He);if($.isLeaf===!1&&!$[k.getFieldName("children")]&&Ue){Me&&k.handleChange(nt,{visible:!0},A),k.setState({activeValue:He}),Ue(nt);return}var Oe={};!$[k.getFieldName("children")]||!$[k.getFieldName("children")].length?(k.handleChange(nt,{visible:!1},A),Oe.value=He):Me&&(A.type==="click"||A.type==="keydown")&&(ze==="hover"?k.handleChange(nt,{visible:!1},A):k.handleChange(nt,{visible:!0},A),Oe.value=He),Oe.activeValue=He,("value"in k.props||A.type==="keydown"&&A.keyCode!==ge.a.ENTER)&&delete Oe.value,k.setState(Oe)},k.handleItemDoubleClick=function(){var $=k.props.changeOnSelect;$&&k.setPopupVisible(!1)},k.handleKeyDown=function($){var L=k.props.children;if(L&&L.props.onKeyDown){L.props.onKeyDown($);return}var A=we(k.state.activeValue),ie=A.length-1<0?0:A.length-1,be=k.getCurrentLevelOptions(),Me=be.map(function(nt){return nt[k.getFieldName("value")]}).indexOf(A[ie]);if($.keyCode!==ge.a.DOWN&&$.keyCode!==ge.a.UP&&$.keyCode!==ge.a.LEFT&&$.keyCode!==ge.a.RIGHT&&$.keyCode!==ge.a.ENTER&&$.keyCode!==ge.a.SPACE&&$.keyCode!==ge.a.BACKSPACE&&$.keyCode!==ge.a.ESC&&$.keyCode!==ge.a.TAB)return;if(!k.state.popupVisible&&$.keyCode!==ge.a.BACKSPACE&&$.keyCode!==ge.a.LEFT&&$.keyCode!==ge.a.RIGHT&&$.keyCode!==ge.a.ESC&&$.keyCode!==ge.a.TAB){k.setPopupVisible(!0);return}if($.keyCode===ge.a.DOWN||$.keyCode===ge.a.UP){$.preventDefault();var Ue=Me;Ue!==-1?$.keyCode===ge.a.DOWN?(Ue+=1,Ue=Ue>=be.length?0:Ue):(Ue-=1,Ue=Ue<0?be.length-1:Ue):Ue=0,A[ie]=be[Ue][k.getFieldName("value")]}else if($.keyCode===ge.a.LEFT||$.keyCode===ge.a.BACKSPACE)$.preventDefault(),A.splice(A.length-1,1);else if($.keyCode===ge.a.RIGHT)$.preventDefault(),be[Me]&&be[Me][k.getFieldName("children")]&&A.push(be[Me][k.getFieldName("children")][0][k.getFieldName("value")]);else if($.keyCode===ge.a.ESC||$.keyCode===ge.a.TAB){k.setPopupVisible(!1);return}(!A||A.length===0)&&k.setPopupVisible(!1);var ze=k.getActiveOptions(A),He=ze[ze.length-1];k.handleMenuSelect(He,ze.length-1,$),k.props.onKeyDown&&k.props.onKeyDown($)},k.saveTrigger=function($){k.trigger=$};var D=[];return"value"in x?D=x.value||[]:"defaultValue"in x&&(D=x.defaultValue||[]),De()(!("filedNames"in x),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),k.state={popupVisible:x.popupVisible,activeValue:D,value:D,prevProps:x},k.defaultFieldNames={label:"label",value:"value",children:"children"},k}return G(I,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(k){var D=this.defaultFieldNames,$=this.props,L=$.fieldNames,A=$.filedNames;return"filedNames"in this.props?A[k]||D[k]:L[k]||D[k]}},{key:"getFieldNames",value:function(){var k=this.props,D=k.fieldNames,$=k.filedNames;return"filedNames"in this.props?$:D}},{key:"getCurrentLevelOptions",value:function(){var k=this,D=this.props.options,$=D===void 0?[]:D,L=this.state.activeValue,A=L===void 0?[]:L,ie=Y()($,function(be,Me){return be[k.getFieldName("value")]===A[Me]},{childrenKeyName:this.getFieldName("children")});return ie[ie.length-2]?ie[ie.length-2][this.getFieldName("children")]:we($).filter(function(be){return!be.disabled})}},{key:"getActiveOptions",value:function(k){var D=this;return Y()(this.props.options||[],function($,L){return $[D.getFieldName("value")]===k[L]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var k=this.props,D=k.prefixCls,$=k.transitionName,L=k.popupClassName,A=k.options,ie=A===void 0?[]:A,be=k.disabled,Me=k.builtinPlacements,Ue=k.popupPlacement,ze=k.children,He=k.dropdownRender,nt=ye(k,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Oe=q.createElement("div",null),Fe="";ie&&ie.length>0?Oe=q.createElement(de,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Fe=" ".concat(D,"-menus-empty");var Be=Oe;return He&&(Be=He(Oe)),q.createElement(ke.a,Object.assign({ref:this.saveTrigger},nt,{popupPlacement:Ue,builtinPlacements:Me,popupTransitionName:$,action:be?[]:["click"],popupVisible:be?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(D,"-menus"),popupClassName:L+Fe,popup:Be}),q.cloneElement(ze,{onKeyDown:this.handleKeyDown,tabIndex:be?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(k,D){var $=D.prevProps,L=$===void 0?{}:$,A={prevProps:k};return"value"in k&&!J(L.value,k.value)&&(A.value=k.value||[],"loadData"in k||(A.activeValue=k.value||[])),"popupVisible"in k&&(A.popupVisible=k.popupVisible),A}}]),I}(q.Component);return _.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:re,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},_}(),Pe=Re,ne=Ce.a=Pe},SJMd:function(mt,Ce){/**
* @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 h,q,ke,Ee=!1,De,ge;window.PR_SHOULD_USE_CONTINUATION=!0;var ue,Y;(function(){var J=window,F=["break,continue,do,else,for,if,return,while"],B=[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"],C=[B,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],E=[C,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],M=[C,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],S=[C,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],w="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",P=[C,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],g="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",y=[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"],O=[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"],W=[F,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],de=[E,S,M,P,g,y,O,W],pe=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,re="str",xe="kwd",ye="com",Q="typ",we="lit",Z="pun",j="pln",Ae="tag",oe="dec",K="src",z="atn",te="atv",G="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function m(A){for(var ie=0,be=!1,Me=!1,Ue=0,ze=A.length;Ue<ze;++Ue){var He=A[Ue];if(He.ignoreCase)Me=!0;else if(/[a-z]/i.test(He.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){be=!0,Me=!1;break}}var nt={b:8,t:9,n:10,v:11,f:12,r:13};function Oe(Xe){var Le=Xe.charCodeAt(0);if(Le!==92)return Le;var Ve=Xe.charAt(1);return Le=nt[Ve],Le||("0"<=Ve&&Ve<="7"?parseInt(Xe.substring(1),8):Ve==="u"||Ve==="x"?parseInt(Xe.substring(2),16):Xe.charCodeAt(1))}function Fe(Xe){if(Xe<32)return(Xe<16?"\\x0":"\\x")+Xe.toString(16);var Le=String.fromCharCode(Xe);return Le==="\\"||Le==="-"||Le==="]"||Le==="^"?"\\"+Le:Le}function Be(Xe){var Le=Xe.substring(1,Xe.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")),Ve=[],et=Le[0]==="^",_e=["["];et&&_e.push("^");for(var Ke=et?1:0,me=Le.length;Ke<me;++Ke){var se=Le[Ke];if(/\\[bdsw]/i.test(se))_e.push(se);else{var ve=Oe(se),R;Ke+2<me&&Le[Ke+1]==="-"?(R=Oe(Le[Ke+2]),Ke+=2):R=ve,Ve.push([ve,R]),R<65||ve>122||(R<65||ve>90||Ve.push([Math.max(65,ve)|32,Math.min(R,90)|32]),R<97||ve>122||Ve.push([Math.max(97,ve)&~32,Math.min(R,122)&~32]))}}Ve.sort(function(je,Se){return je[0]-Se[0]||Se[1]-je[1]});for(var U=[],ee=[],Ke=0;Ke<Ve.length;++Ke){var ce=Ve[Ke];ce[0]<=ee[1]+1?ee[1]=Math.max(ee[1],ce[1]):U.push(ee=ce)}for(var Ke=0;Ke<U.length;++Ke){var ce=U[Ke];_e.push(Fe(ce[0])),ce[1]>ce[0]&&(ce[1]+1>ce[0]&&_e.push("-"),_e.push(Fe(ce[1])))}return _e.push("]"),_e.join("")}function Ge(Xe){for(var Le=Xe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ve=Le.length,et=[],_e=0,Ke=0;_e<Ve;++_e){var me=Le[_e];if(me==="(")++Ke;else if(me.charAt(0)==="\\"){var se=+me.substring(1);se&&(se<=Ke?et[se]=-1:Le[_e]=Fe(se))}}for(var _e=1;_e<et.length;++_e)et[_e]===-1&&(et[_e]=++ie);for(var _e=0,Ke=0;_e<Ve;++_e){var me=Le[_e];if(me==="(")++Ke,et[Ke]||(Le[_e]="(?:");else if(me.charAt(0)==="\\"){var se=+me.substring(1);se&&se<=Ke&&(Le[_e]="\\"+et[se])}}for(var _e=0;_e<Ve;++_e)Le[_e]==="^"&&Le[_e+1]!=="^"&&(Le[_e]="");if(Xe.ignoreCase&&be)for(var _e=0;_e<Ve;++_e){var me=Le[_e],ve=me.charAt(0);me.length>=2&&ve==="["?Le[_e]=Be(me):ve!=="\\"&&(Le[_e]=me.replace(/[a-zA-Z]/g,function(ee){var ce=ee.charCodeAt(0);return"["+String.fromCharCode(ce&~32,ce|32)+"]"}))}return Le.join("")}for(var Ye=[],Ue=0,ze=A.length;Ue<ze;++Ue){var He=A[Ue];if(He.global||He.multiline)throw new Error(""+He);Ye.push("(?:"+Ge(He)+")")}return new RegExp(Ye.join("|"),Me?"gi":"g")}function p(A,ie){var be=/(?:^|\s)nocode(?:\s|$)/,Me=[],Ue=0,ze=[],He=0;function nt(Oe){var Fe=Oe.nodeType;if(Fe==1){if(be.test(Oe.className))return;for(var Be=Oe.firstChild;Be;Be=Be.nextSibling)nt(Be);var Ge=Oe.nodeName.toLowerCase();(Ge==="br"||Ge==="li")&&(Me[He]=`
`,ze[He<<1]=Ue++,ze[He++<<1|1]=Oe)}else if(Fe==3||Fe==4){var Ye=Oe.nodeValue;Ye.length&&(ie?Ye=Ye.replace(/\r\n?/g,`
`):Ye=Ye.replace(/[ \t\r\n]+/g," "),Me[He]=Ye,ze[He<<1]=Ue,Ue+=Ye.length,ze[He++<<1|1]=Oe)}}return nt(A),{sourceCode:Me.join("").replace(/\n$/,""),spans:ze}}function H(A,ie,be,Me,Ue){if(!be)return;var ze={sourceNode:A,pre:1,langExtension:null,numberLines:null,sourceCode:be,spans:null,basePos:ie,decorations:null};Me(ze),Ue.push.apply(Ue,ze.decorations)}var ae=/\S/;function Te(A){for(var ie=void 0,be=A.firstChild;be;be=be.nextSibling){var Me=be.nodeType;ie=Me===1?ie?A:be:Me===3&&ae.test(be.nodeValue)?A:ie}return ie===A?void 0:ie}function We(A,ie){var be={},Me;(function(){for(var He=A.concat(ie),nt=[],Oe={},Fe=0,Be=He.length;Fe<Be;++Fe){var Ge=He[Fe],Ye=Ge[3];if(Ye)for(var Xe=Ye.length;--Xe>=0;)be[Ye.charAt(Xe)]=Ge;var Le=Ge[1],Ve=""+Le;Oe.hasOwnProperty(Ve)||(nt.push(Le),Oe[Ve]=null)}nt.push(/[\0-\uffff]/),Me=m(nt)})();var Ue=ie.length,ze=function(He){for(var nt=He.sourceCode,Oe=He.basePos,Fe=He.sourceNode,Be=[Oe,j],Ge=0,Ye=nt.match(Me)||[],Xe={},Le=0,Ve=Ye.length;Le<Ve;++Le){var et=Ye[Le],_e=Xe[et],Ke=void 0,me;if(typeof _e=="string")me=!1;else{var se=be[et.charAt(0)];if(se)Ke=et.match(se[1]),_e=se[0];else{for(var ve=0;ve<Ue;++ve)if(se=ie[ve],Ke=et.match(se[1]),Ke){_e=se[0];break}Ke||(_e=j)}me=_e.length>=5&&_e.substring(0,5)==="lang-",me&&!(Ke&&typeof Ke[1]=="string")&&(me=!1,_e=K),me||(Xe[et]=_e)}var R=Ge;if(Ge+=et.length,!me)Be.push(Oe+R,_e);else{var U=Ke[1],ee=et.indexOf(U),ce=ee+U.length;Ke[2]&&(ce=et.length-Ke[2].length,ee=ce-U.length);var je=_e.substring(5);H(Fe,Oe+R,et.substring(0,ee),ze,Be),H(Fe,Oe+R+ee,U,I(je,U),Be),H(Fe,Oe+R+ce,et.substring(ce),ze,Be)}}He.decorations=Be};return ze}function Re(A){var ie=[],be=[];A.tripleQuotedStrings?ie.push([re,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):A.multiLineStrings?ie.push([re,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ie.push([re,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),A.verbatimStrings&&be.push([re,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Me=A.hashComments;Me&&(A.cStyleComments?(Me>1?ie.push([ye,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ie.push([ye,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),be.push([re,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ie.push([ye,/^#[^\r\n]*/,null,"#"])),A.cStyleComments&&(be.push([ye,/^\/\/[^\r\n]*/,null]),be.push([ye,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ue=A.regexLiterals;if(Ue){var ze=Ue>1?"":`
\r`,He=ze?".":"[\\S\\s]",nt="/(?=[^/*"+ze+"])(?:[^/\\x5B\\x5C"+ze+"]|\\x5C"+He+"|\\x5B(?:[^\\x5C\\x5D"+ze+"]|\\x5C"+He+")*(?:\\x5D|$))+/";be.push(["lang-regex",RegExp("^"+V+"("+nt+")")])}var Oe=A.types;Oe&&be.push([Q,Oe]);var Fe=(""+A.keywords).replace(/^ | $/g,"");Fe.length&&be.push([xe,new RegExp("^(?:"+Fe.replace(/[\s,]+/g,"|")+")\\b"),null]),ie.push([j,/^\s+/,null,` \r
\xA0`]);var Be="^.[^\\s\\w.$@'\"`/\\\\]*";return A.regexLiterals&&(Be+="(?!s*/)"),be.push([we,/^@[a-z_$][a-z_$@0-9]*/i,null],[Q,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[j,/^[a-z_$][a-z_$@0-9]*/i,null],[we,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[j,/^\\[\s\S]?/,null],[Z,new RegExp(Be),null]),We(ie,be)}var Pe=Re({keywords:de,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(A,ie,be){for(var Me=/(?:^|\s)nocode(?:\s|$)/,Ue=/\r\n?|\n/,ze=A.ownerDocument,He=ze.createElement("li");A.firstChild;)He.appendChild(A.firstChild);var nt=[He];function Oe(Le){var Ve=Le.nodeType;if(Ve==1&&!Me.test(Le.className))if(Le.nodeName==="br")Fe(Le),Le.parentNode&&Le.parentNode.removeChild(Le);else for(var et=Le.firstChild;et;et=et.nextSibling)Oe(et);else if((Ve==3||Ve==4)&&be){var _e=Le.nodeValue,Ke=_e.match(Ue);if(Ke){var me=_e.substring(0,Ke.index);Le.nodeValue=me;var se=_e.substring(Ke.index+Ke[0].length);if(se){var ve=Le.parentNode;ve.insertBefore(ze.createTextNode(se),Le.nextSibling)}Fe(Le),me||Le.parentNode.removeChild(Le)}}}function Fe(Le){for(;!Le.nextSibling;)if(Le=Le.parentNode,!Le)return;function Ve(Ke,me){var se=me?Ke.cloneNode(!1):Ke,ve=Ke.parentNode;if(ve){var R=Ve(ve,1),U=Ke.nextSibling;R.appendChild(se);for(var ee=U;ee;ee=U)U=ee.nextSibling,R.appendChild(ee)}return se}for(var et=Ve(Le.nextSibling,0),_e;(_e=et.parentNode)&&_e.nodeType===1;)et=_e;nt.push(et)}for(var Be=0;Be<nt.length;++Be)Oe(nt[Be]);ie===(ie|0)&&nt[0].setAttribute("value",ie);var Ge=ze.createElement("ol");Ge.className="linenums";for(var Ye=Math.max(0,ie-1|0)||0,Be=0,Xe=nt.length;Be<Xe;++Be)He=nt[Be],He.className="L"+(Be+Ye)%10,He.firstChild||He.appendChild(ze.createTextNode("\xA0")),Ge.appendChild(He);A.appendChild(Ge)}function _(A){var ie=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ie=ie&&+ie[1]<=8;var be=/\n/g,Me=A.sourceCode,Ue=Me.length,ze=0,He=A.spans,nt=He.length,Oe=0,Fe=A.decorations,Be=Fe.length,Ge=0;Fe[Be]=Ue;var Ye,Xe;for(Xe=Ye=0;Xe<Be;)Fe[Xe]!==Fe[Xe+2]?(Fe[Ye++]=Fe[Xe++],Fe[Ye++]=Fe[Xe++]):Xe+=2;for(Be=Ye,Xe=Ye=0;Xe<Be;){for(var Le=Fe[Xe],Ve=Fe[Xe+1],et=Xe+2;et+2<=Be&&Fe[et+1]===Ve;)et+=2;Fe[Ye++]=Le,Fe[Ye++]=Ve,Xe=et}Be=Fe.length=Ye;var _e=A.sourceNode,Ke="";_e&&(Ke=_e.style.display,_e.style.display="none");try{for(var me=null;Oe<nt;){var se=He[Oe],ve=He[Oe+2]||Ue,R=Fe[Ge+2]||Ue,et=Math.min(ve,R),U=He[Oe+1],ee;if(U.nodeType!==1&&(ee=Me.substring(ze,et))){ie&&(ee=ee.replace(be,"\r")),U.nodeValue=ee;var ce=U.ownerDocument,je=ce.createElement("span");je.className=Fe[Ge+1];var Se=U.parentNode;Se.replaceChild(je,U),je.appendChild(U),ze<ve&&(He[Oe+1]=U=ce.createTextNode(Me.substring(et,ve)),Se.insertBefore(U,je.nextSibling))}ze=et,ze>=ve&&(Oe+=2),ze>=R&&(Ge+=2)}}finally{_e&&(_e.style.display=Ke)}}var X={};function N(A,ie){for(var be=ie.length;--be>=0;){var Me=ie[be];X.hasOwnProperty(Me)?J.console&&console.warn("cannot override language handler %s",Me):X[Me]=A}}function I(A,ie){return A&&X.hasOwnProperty(A)||(A=/^\s*</.test(ie)?"default-markup":"default-code"),X[A]}N(Pe,["default-code"]),N(We([],[[j,/^[^<?]+/],[oe,/^<!\w[^>]*(?:>|$)/],[ye,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Z,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),N(We([[j,/^[\s]+/,null,` \r
`],[te,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Ae,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Z,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),N(We([],[[te,/^[\s\S]+/]]),["uq.val"]),N(Re({keywords:E,hashComments:!0,cStyleComments:!0,types:pe}),["c","cc","cpp","cxx","cyc","m"]),N(Re({keywords:"null,true,false"}),["json"]),N(Re({keywords:S,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:pe}),["cs"]),N(Re({keywords:M,cStyleComments:!0}),["java"]),N(Re({keywords:W,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),N(Re({keywords:y,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),N(Re({keywords:g,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),N(Re({keywords:O,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),N(Re({keywords:P,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),N(Re({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),N(We([],[[re,/^[\s\S]+/]]),["regex"]);function x(A){var ie=A.langExtension;try{var be=p(A.sourceNode,A.pre),Me=be.sourceCode;A.sourceCode=Me,A.spans=be.spans,A.basePos=0,I(ie,Me)(A),_(A)}catch(Ue){J.console&&console.log(Ue&&Ue.stack||Ue)}}function k(A,ie,be){var Me=be||!1,Ue=ie||null,ze=document.createElement("div");ze.innerHTML="<pre>"+A+"</pre>",ze=ze.firstChild,Me&&ne(ze,Me,!0);var He={langExtension:Ue,numberLines:Me,sourceNode:ze,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return x(He),ze.innerHTML}function D(A,ie){var be=ie||document.body,Me=be.ownerDocument||document;function Ue(se){return be.getElementsByTagName(se)}for(var ze=[Ue("pre"),Ue("code"),Ue("xmp")],He=[],nt=0;nt<ze.length;++nt)for(var Oe=0,Fe=ze[nt].length;Oe<Fe;++Oe)He.push(ze[nt][Oe]);ze=null;var Be=Date;Be.now||(Be={now:function(){return+new Date}});var Ge=0,Ye=/\blang(?:uage)?-([\w.]+)(?!\S)/,Xe=/\bprettyprint\b/,Le=/\bprettyprinted\b/,Ve=/pre|xmp/i,et=/^code$/i,_e=/^(?:pre|code|xmp)$/i,Ke={};function me(){for(var se=J.PR_SHOULD_USE_CONTINUATION?Be.now()+250:Infinity;Ge<He.length&&Be.now()<se;Ge++){for(var ve=He[Ge],R=Ke,U=ve;U=U.previousSibling;){var ee=U.nodeType,ce=(ee===7||ee===8)&&U.nodeValue;if(ce?!/^\??prettify\b/.test(ce):ee!==3||/\S/.test(U.nodeValue))break;if(ce){R={},ce.replace(/\b(\w+)=([\w:.%+-]+)/g,function(kt,Lt,zt){R[Lt]=zt});break}}var je=ve.className;if((R!==Ke||Xe.test(je))&&!Le.test(je)){for(var Se=!1,qe=ve.parentNode;qe;qe=qe.parentNode){var at=qe.tagName;if(_e.test(at)&&qe.className&&Xe.test(qe.className)){Se=!0;break}}if(!Se){ve.className+=" prettyprinted";var st=R.lang;if(!st){st=je.match(Ye);var lt;!st&&(lt=Te(ve))&&et.test(lt.tagName)&&(st=lt.className.match(Ye)),st&&(st=st[1])}var St;if(Ve.test(ve.tagName))St=1;else{var Ot=ve.currentStyle,dt=Me.defaultView,Ht=Ot?Ot.whiteSpace:dt&&dt.getComputedStyle?dt.getComputedStyle(ve,null).getPropertyValue("white-space"):0;St=Ht&&Ht.substring(0,3)==="pre"}var Nt=R.linenums;(Nt=Nt==="true"||+Nt)||(Nt=je.match(/\blinenums\b(?::(\d+))?/),Nt=Nt?Nt[1]&&Nt[1].length?+Nt[1]:!0:!1),Nt&&ne(ve,Nt,St);var At={langExtension:st,sourceNode:ve,numberLines:Nt,pre:St,sourceCode:null,basePos:null,spans:null,decorations:null};x(At)}}}Ge<He.length?J.setTimeout(me,250):typeof A=="function"&&A()}me()}var $=J.PR={createSimpleLexer:We,registerLangHandler:N,sourceDecorator:Re,PR_ATTRIB_NAME:z,PR_ATTRIB_VALUE:te,PR_COMMENT:ye,PR_DECLARATION:oe,PR_KEYWORD:xe,PR_LITERAL:we,PR_NOCODE:G,PR_PLAIN:j,PR_PUNCTUATION:Z,PR_SOURCE:K,PR_STRING:re,PR_TAG:Ae,PR_TYPE:Q,prettyPrintOne:Ee?J.prettyPrintOne=k:ue=k,prettyPrint:Y=Ee?J.prettyPrint=D:Y=D},L=J.define;typeof L=="function"&&L.amd&&L("google-code-prettify",[],function(){return $})})()},T8No:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return De}),h.d(Ce,"b",function(){return M}),h.d(Ce,"d",function(){return S}),h.d(Ce,"c",function(){return w}),h.d(Ce,"e",function(){return P});var q=h("N0LK"),ke=h("Cg/j"),Ee=function(){var g=function(y,O){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(W,de){W.__proto__=de}||function(W,de){for(var pe in de)de.hasOwnProperty(pe)&&(W[pe]=de[pe])},g(y,O)};return function(y,O){g(y,O);function W(){this.constructor=y}y.prototype=O===null?Object.create(O):(W.prototype=O.prototype,new W)}}(),De=function(){function g(){}return g.has=function(y){return ue.create(y)},g.equals=function(y,O){return Y.create(y,O)},g.regex=function(y,O){return B.create(y,O)},g.not=function(y){return F.create(y)},g.and=function(){for(var y=[],O=0;O<arguments.length;O++)y[O]=arguments[O];return E.create(y)},g.or=function(){for(var y=[],O=0;O<arguments.length;O++)y[O]=arguments[O];return M.create(y)},g.deserialize=function(y,O){return O===void 0&&(O=!1),y?this._deserializeOrExpression(y,O):void 0},g._deserializeOrExpression=function(y,O){var W=this,de=y.split("||");return M.create(de.map(function(pe){return W._deserializeAndExpression(pe,O)}))},g._deserializeAndExpression=function(y,O){var W=this,de=y.split("&&");return E.create(de.map(function(pe){return W._deserializeOne(pe,O)}))},g._deserializeOne=function(y,O){if(y=y.trim(),y.indexOf("!=")>=0){var W=y.split("!=");return J.create(W[0].trim(),this._deserializeValue(W[1],O))}if(y.indexOf("==")>=0){var W=y.split("==");return Y.create(W[0].trim(),this._deserializeValue(W[1],O))}if(y.indexOf("=~")>=0){var W=y.split("=~");return B.create(W[0].trim(),this._deserializeRegexValue(W[1],O))}return/^\!\s*/.test(y)?F.create(y.substr(1).trim()):ue.create(y)},g._deserializeValue=function(y,O){if(y=y.trim(),y==="true")return!0;if(y==="false")return!1;var W=/^'([^']*)'$/.exec(y);return W?W[1].trim():y},g._deserializeRegexValue=function(y,O){if(Object(q.x)(y)){if(O)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var W=y.indexOf("/"),de=y.lastIndexOf("/");if(W===de||W<0){if(O)throw new Error("bad regexp-value '"+y+"', missing /-enclosure");return console.warn("bad regexp-value '"+y+"', missing /-enclosure"),null}var pe=y.slice(W+1,de),re=y[de+1]==="i"?"i":"";try{return new RegExp(pe,re)}catch(xe){if(O)throw new Error("bad regexp-value '"+y+"', parse error: "+xe);return console.warn("bad regexp-value '"+y+"', parse error: "+xe),null}},g}();function ge(g,y){var O=g.getType(),W=y.getType();if(O!==W)return O-W;switch(O){case 1:return g.cmp(y);case 2:return g.cmp(y);case 3:return g.cmp(y);case 4:return g.cmp(y);case 6:return g.cmp(y);case 7:return g.cmp(y);case 5:return g.cmp(y);default:throw new Error("Unknown ContextKeyExpr!")}}var ue=function(){function g(y){this.key=y}return g.create=function(y){return new g(y)},g.prototype.getType=function(){return 1},g.prototype.cmp=function(y){return this.key<y.key?-1:this.key>y.key?1:0},g.prototype.equals=function(y){return y instanceof g?this.key===y.key:!1},g.prototype.evaluate=function(y){return!!y.getValue(this.key)},g.prototype.keys=function(){return[this.key]},g.prototype.negate=function(){return F.create(this.key)},g}(),Y=function(){function g(y,O){this.key=y,this.value=O}return g.create=function(y,O){return typeof O=="boolean"?O?ue.create(y):F.create(y):new g(y,O)},g.prototype.getType=function(){return 3},g.prototype.cmp=function(y){return this.key<y.key?-1:this.key>y.key?1:this.value<y.value?-1:this.value>y.value?1:0},g.prototype.equals=function(y){return y instanceof g?this.key===y.key&&this.value===y.value:!1},g.prototype.evaluate=function(y){return y.getValue(this.key)==this.value},g.prototype.keys=function(){return[this.key]},g.prototype.negate=function(){return J.create(this.key,this.value)},g}(),J=function(){function g(y,O){this.key=y,this.value=O}return g.create=function(y,O){return typeof O=="boolean"?O?F.create(y):ue.create(y):new g(y,O)},g.prototype.getType=function(){return 4},g.prototype.cmp=function(y){return this.key<y.key?-1:this.key>y.key?1:this.value<y.value?-1:this.value>y.value?1:0},g.prototype.equals=function(y){return y instanceof g?this.key===y.key&&this.value===y.value:!1},g.prototype.evaluate=function(y){return y.getValue(this.key)!=this.value},g.prototype.keys=function(){return[this.key]},g.prototype.negate=function(){return Y.create(this.key,this.value)},g}(),F=function(){function g(y){this.key=y}return g.create=function(y){return new g(y)},g.prototype.getType=function(){return 2},g.prototype.cmp=function(y){return this.key<y.key?-1:this.key>y.key?1:0},g.prototype.equals=function(y){return y instanceof g?this.key===y.key:!1},g.prototype.evaluate=function(y){return!y.getValue(this.key)},g.prototype.keys=function(){return[this.key]},g.prototype.negate=function(){return ue.create(this.key)},g}(),B=function(){function g(y,O){this.key=y,this.regexp=O}return g.create=function(y,O){return new g(y,O)},g.prototype.getType=function(){return 6},g.prototype.cmp=function(y){if(this.key<y.key)return-1;if(this.key>y.key)return 1;var O=this.regexp?this.regexp.source:"",W=y.regexp?y.regexp.source:"";return O<W?-1:O>W?1:0},g.prototype.equals=function(y){if(y instanceof g){var O=this.regexp?this.regexp.source:"",W=y.regexp?y.regexp.source:"";return this.key===y.key&&O===W}return!1},g.prototype.evaluate=function(y){var O=y.getValue(this.key);return this.regexp?this.regexp.test(O):!1},g.prototype.keys=function(){return[this.key]},g.prototype.negate=function(){return C.create(this)},g}(),C=function(){function g(y){this._actual=y}return g.create=function(y){return new g(y)},g.prototype.getType=function(){return 7},g.prototype.cmp=function(y){return this._actual.cmp(y._actual)},g.prototype.equals=function(y){return y instanceof g?this._actual.equals(y._actual):!1},g.prototype.evaluate=function(y){return!this._actual.evaluate(y)},g.prototype.keys=function(){return this._actual.keys()},g.prototype.negate=function(){return this._actual},g}(),E=function(){function g(y){this.expr=y}return g.create=function(y){var O=g._normalizeArr(y);return O.length===0?void 0:O.length===1?O[0]:new g(O)},g.prototype.getType=function(){return 5},g.prototype.cmp=function(y){if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(var O=0,W=this.expr.length;O<W;O++){var de=ge(this.expr[O],y.expr[O]);if(de!==0)return de}return 0},g.prototype.equals=function(y){if(y instanceof g){if(this.expr.length!==y.expr.length)return!1;for(var O=0,W=this.expr.length;O<W;O++)if(!this.expr[O].equals(y.expr[O]))return!1;return!0}return!1},g.prototype.evaluate=function(y){for(var O=0,W=this.expr.length;O<W;O++)if(!this.expr[O].evaluate(y))return!1;return!0},g._normalizeArr=function(y){var O=[];if(y){for(var W=0,de=y.length;W<de;W++){var pe=y[W];if(!pe)continue;if(pe instanceof g){O=O.concat(pe.expr);continue}if(pe instanceof M)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');O.push(pe)}O.sort(ge)}return O},g.prototype.keys=function(){for(var y=[],O=0,W=this.expr;O<W.length;O++){var de=W[O];y.push.apply(y,de.keys())}return y},g.prototype.negate=function(){for(var y=[],O=0,W=this.expr;O<W.length;O++){var de=W[O];y.push(de.negate())}return M.create(y)},g}(),M=function(){function g(y){this.expr=y}return g.create=function(y){var O=g._normalizeArr(y);return O.length===0?void 0:O.length===1?O[0]:new g(O)},g.prototype.getType=function(){return 8},g.prototype.equals=function(y){if(y instanceof g){if(this.expr.length!==y.expr.length)return!1;for(var O=0,W=this.expr.length;O<W;O++)if(!this.expr[O].equals(y.expr[O]))return!1;return!0}return!1},g.prototype.evaluate=function(y){for(var O=0,W=this.expr.length;O<W;O++)if(this.expr[O].evaluate(y))return!0;return!1},g._normalizeArr=function(y){var O=[];if(y){for(var W=0,de=y.length;W<de;W++){var pe=y[W];if(!pe)continue;if(pe instanceof g){O=O.concat(pe.expr);continue}O.push(pe)}O.sort(ge)}return O},g.prototype.keys=function(){for(var y=[],O=0,W=this.expr;O<W.length;O++){var de=W[O];y.push.apply(y,de.keys())}return y},g.prototype.negate=function(){for(var y=[],O=0,W=this.expr;O<W.length;O++){var de=W[O];y.push(de.negate())}for(var pe=function(K){return K instanceof g?K.expr:[K]};y.length>1;){for(var re=y.shift(),xe=y.shift(),ye=[],Q=0,we=pe(re);Q<we.length;Q++)for(var Z=we[Q],j=0,Ae=pe(xe);j<Ae.length;j++){var oe=Ae[j];ye.push(De.and(Z,oe))}y.unshift(De.or.apply(De,ye))}return y[0]},g}(),S=function(g){Ee(y,g);function y(O,W){var de=g.call(this,O)||this;return de._defaultValue=W,de}return y.prototype.bindTo=function(O){return O.createKey(this.key,this._defaultValue)},y.prototype.getValue=function(O){return O.getContextKeyValue(this.key)},y.prototype.toNegated=function(){return De.not(this.key)},y}(ue),w=Object(ke.c)("contextKeyService"),P="setContext"},"VrN/":function(mt,Ce,h){(function(q,ke){mt.exports=ke()})(this,function(){"use strict";var q=navigator.userAgent,ke=navigator.platform,Ee=/gecko\/\d/i.test(q),De=/MSIE \d/.test(q),ge=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(q),ue=/Edge\/(\d+)/.exec(q),Y=De||ge||ue,J=Y&&(De?document.documentMode||6:+(ue||ge)[1]),F=!ue&&/WebKit\//.test(q),B=F&&/Qt\/\d+\.\d+/.test(q),C=!ue&&/Chrome\//.test(q),E=/Opera\//.test(q),M=/Apple Computer/.test(navigator.vendor),S=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(q),w=/PhantomJS/.test(q),P=!ue&&/AppleWebKit/.test(q)&&/Mobile\/\w+/.test(q),g=/Android/.test(q),y=P||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(q),O=P||/Mac/.test(ke),W=/\bCrOS\b/.test(q),de=/win/i.test(ke),pe=E&&q.match(/Version\/(\d*\.\d*)/);pe&&(pe=Number(pe[1])),pe&&pe>=15&&(E=!1,F=!0);var re=O&&(B||E&&(pe==null||pe<12.11)),xe=Ee||Y&&J>=9;function ye(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Q=function(e,t){var i=e.className,n=ye(t).exec(i);if(n){var r=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function we(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Z(e,t){return we(e).appendChild(t)}function j(e,t,i,n){var r=document.createElement(e);if(i&&(r.className=i),n&&(r.style.cssText=n),typeof t=="string")r.appendChild(document.createTextNode(t));else if(t)for(var s=0;s<t.length;++s)r.appendChild(t[s]);return r}function Ae(e,t,i,n){var r=j(e,t,i,n);return r.setAttribute("role","presentation"),r}var oe;document.createRange?oe=function(e,t,i,n){var r=document.createRange();return r.setEnd(n||e,i),r.setStart(e,t),r}:oe=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(r){return n}return n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",t),n};function K(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function z(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function te(e,t){var i=e.className;ye(t).test(i)||(e.className+=(i?" ":"")+t)}function G(e,t){for(var i=e.split(" "),n=0;n<i.length;n++)i[n]&&!ye(i[n]).test(t)&&(t+=" "+i[n]);return t}var V=function(e){e.select()};P?V=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Y&&(V=function(e){try{e.select()}catch(t){}});function m(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function p(e,t,i){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(i!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function H(e,t,i,n,r){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=n||0,u=r||0;;){var v=e.indexOf(" ",s);if(v<0||v>=t)return u+(t-s);u+=v-s,u+=i-u%i,s=v+1}}var ae=function(){this.id=null,this.f=null,this.time=0,this.handler=m(this.onTimeout,this)};ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ae.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function Te(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var We=50,Re={toString:function(){return"CodeMirror.Pass"}},Pe={scroll:!1},ne={origin:"*mouse"},_={origin:"+move"};function X(e,t,i){for(var n=0,r=0;;){var s=e.indexOf(" ",n);s==-1&&(s=e.length);var u=s-n;if(s==e.length||r+u>=t)return n+Math.min(u,t-r);if(r+=s-n,r+=i-r%i,n=s+1,r>=t)return n}}var N=[""];function I(e){for(;N.length<=e;)N.push(x(N)+" ");return N[e]}function x(e){return e[e.length-1]}function k(e,t){for(var i=[],n=0;n<e.length;n++)i[n]=t(e[n],n);return i}function D(e,t,i){for(var n=0,r=i(t);n<e.length&&i(e[n])<=r;)n++;e.splice(n,0,t)}function $(){}function L(e,t){var i;return Object.create?i=Object.create(e):($.prototype=e,i=new $),t&&p(t,i),i}var A=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||A.test(e))}function be(e,t){return t?t.source.indexOf("\\w")>-1&&ie(e)?!0:t.test(e):ie(e)}function Me(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ue=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ze(e){return e.charCodeAt(0)>=768&&Ue.test(e)}function He(e,t,i){for(;(i<0?t>0:t<e.length)&&ze(e.charAt(t));)t+=i;return t}function nt(e,t,i){for(var n=t>i?-1:1;;){if(t==i)return t;var r=(t+i)/2,s=n<0?Math.ceil(r):Math.floor(r);if(s==t)return e(s)?t:i;e(s)?i=s:t=s+n}}function Oe(e,t,i,n){if(!e)return n(t,i,"ltr",0);for(var r=!1,s=0;s<e.length;++s){var u=e[s];(u.from<i&&u.to>t||t==i&&u.to==t)&&(n(Math.max(u.from,t),Math.min(u.to,i),u.level==1?"rtl":"ltr",s),r=!0)}r||n(t,i,"ltr")}var Fe=null;function Be(e,t,i){var n;Fe=null;for(var r=0;r<e.length;++r){var s=e[r];if(s.from<t&&s.to>t)return r;s.to==t&&(s.from!=s.to&&i=="before"?n=r:Fe=r),s.from==t&&(s.from!=s.to&&i!="before"?n=r:Fe=r)}return n!=null?n:Fe}var Ge=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(T){return T<=247?e.charAt(T):1424<=T&&T<=1524?"R":1536<=T&&T<=1785?t.charAt(T-1536):1774<=T&&T<=2220?"r":8192<=T&&T<=8203?"w":T==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,s=/[LRr]/,u=/[Lb1n]/,v=/[1n]/;function b(T,le,fe){this.level=T,this.from=le,this.to=fe}return function(T,le){var fe=le=="ltr"?"L":"R";if(T.length==0||le=="ltr"&&!n.test(T))return!1;for(var Ie=T.length,Ne=[],Qe=0;Qe<Ie;++Qe)Ne.push(i(T.charCodeAt(Qe)));for(var tt=0,ot=fe;tt<Ie;++tt){var ft=Ne[tt];ft=="m"?Ne[tt]=ot:ot=ft}for(var yt=0,pt=fe;yt<Ie;++yt){var wt=Ne[yt];wt=="1"&&pt=="r"?Ne[yt]="n":s.test(wt)&&(pt=wt,wt=="r"&&(Ne[yt]="R"))}for(var Pt=1,Mt=Ne[0];Pt<Ie-1;++Pt){var Vt=Ne[Pt];Vt=="+"&&Mt=="1"&&Ne[Pt+1]=="1"?Ne[Pt]="1":Vt==","&&Mt==Ne[Pt+1]&&(Mt=="1"||Mt=="n")&&(Ne[Pt]=Mt),Mt=Vt}for(var xn=0;xn<Ie;++xn){var Kn=Ne[xn];if(Kn==",")Ne[xn]="N";else if(Kn=="%"){var Dn=void 0;for(Dn=xn+1;Dn<Ie&&Ne[Dn]=="%";++Dn);for(var fi=xn&&Ne[xn-1]=="!"||Dn<Ie&&Ne[Dn]=="1"?"1":"N",si=xn;si<Dn;++si)Ne[si]=fi;xn=Dn-1}}for(var In=0,li=fe;In<Ie;++In){var Zn=Ne[In];li=="L"&&Zn=="1"?Ne[In]="L":s.test(Zn)&&(li=Zn)}for(var Un=0;Un<Ie;++Un)if(r.test(Ne[Un])){var Fn=void 0;for(Fn=Un+1;Fn<Ie&&r.test(Ne[Fn]);++Fn);for(var Rn=(Un?Ne[Un-1]:fe)=="L",ui=(Fn<Ie?Ne[Fn]:fe)=="L",hr=Rn==ui?Rn?"L":"R":fe,Fi=Un;Fi<Fn;++Fi)Ne[Fi]=hr;Un=Fn-1}for(var ei=[],ki,Gn=0;Gn<Ie;)if(u.test(Ne[Gn])){var $o=Gn;for(++Gn;Gn<Ie&&u.test(Ne[Gn]);++Gn);ei.push(new b(0,$o,Gn))}else{var Ai=Gn,$i=ei.length,Yi=le=="rtl"?1:0;for(++Gn;Gn<Ie&&Ne[Gn]!="L";++Gn);for(var ni=Ai;ni<Gn;)if(v.test(Ne[ni])){Ai<ni&&(ei.splice($i,0,new b(1,Ai,ni)),$i+=Yi);var fr=ni;for(++ni;ni<Gn&&v.test(Ne[ni]);++ni);ei.splice($i,0,new b(2,fr,ni)),$i+=Yi,Ai=ni}else++ni;Ai<Gn&&ei.splice($i,0,new b(1,Ai,Gn))}return le=="ltr"&&(ei[0].level==1&&(ki=T.match(/^\s+/))&&(ei[0].from=ki[0].length,ei.unshift(new b(0,0,ki[0].length))),x(ei).level==1&&(ki=T.match(/\s+$/))&&(x(ei).to-=ki[0].length,ei.push(new b(0,Ie-ki[0].length,Ie)))),le=="rtl"?ei.reverse():ei}}();function Ye(e,t){var i=e.order;return i==null&&(i=e.order=Ge(e.text,t)),i}var Xe=[],Le=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Xe).concat(i)}};function Ve(e,t){return e._handlers&&e._handlers[t]||Xe}function et(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var n=e._handlers,r=n&&n[t];if(r){var s=Te(r,i);s>-1&&(n[t]=r.slice(0,s).concat(r.slice(s+1)))}}}function _e(e,t){var i=Ve(e,t);if(!i.length)return;for(var n=Array.prototype.slice.call(arguments,2),r=0;r<i.length;++r)i[r].apply(null,n)}function Ke(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),_e(e,i||t.type,e,t),ee(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Te(i,t[n])==-1&&i.push(t[n])}function se(e,t){return Ve(e,t).length>0}function ve(e){e.prototype.on=function(t,i){Le(this,t,i)},e.prototype.off=function(t,i){et(this,t,i)}}function R(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function U(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ce(e){R(e),U(e)}function je(e){return e.target||e.srcElement}function Se(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),O&&e.ctrlKey&&t==1&&(t=3),t}var qe=function(){if(Y&&J<9)return!1;var e=j("div");return"draggable"in e||"dragDrop"in e}(),at;function st(e){if(at==null){var t=j("span","\u200B");Z(e,j("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(at=t.offsetWidth<=1&&t.offsetHeight>2&&!(Y&&J<8))}var i=at?j("span","\u200B"):j("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var lt;function St(e){if(lt!=null)return lt;var t=Z(e,document.createTextNode("A\u062EA")),i=oe(t,0,1).getBoundingClientRect(),n=oe(t,1,2).getBoundingClientRect();return we(e),!i||i.left==i.right?!1:lt=n.right-i.right<3}var Ot=`
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],n=e.length;t<=n;){var r=e.indexOf(`
`,t);r==-1&&(r=e.length);var s=e.slice(t,e.charAt(r-1)=="\r"?r-1:r),u=s.indexOf("\r");u!=-1?(i.push(s.slice(0,u)),t+=u+1):(i.push(s),t=r+1)}return i}:function(e){return e.split(/\r\n?|\n/)},dt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ht=function(){var e=j("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Nt=null;function At(e){if(Nt!=null)return Nt;var t=Z(e,j("span","x")),i=t.getBoundingClientRect(),n=oe(t,0,1).getBoundingClientRect();return Nt=Math.abs(i.left-n.left)>1}var kt={},Lt={};function zt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),kt[e]=t}function rn(e,t){Lt[e]=t}function bt(e){if(typeof e=="string"&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&typeof e.name=="string"&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];typeof t=="string"&&(t={name:t}),e=L(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return bt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return bt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Et(e,t){t=bt(t);var i=kt[t.name];if(!i)return Et(e,"text/plain");var n=i(e,t);if(it.hasOwnProperty(t.name)){var r=it[t.name];for(var s in r){if(!r.hasOwnProperty(s))continue;n.hasOwnProperty(s)&&(n["_"+s]=n[s]),n[s]=r[s]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var u in t.modeProps)n[u]=t.modeProps[u];return n}var it={};function xt(e,t){var i=it.hasOwnProperty(e)?it[e]:it[e]={};p(t,i)}function Wt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var n in t){var r=t[n];r instanceof Array&&(r=r.concat([])),i[n]=r}return i}function Ut(e,t){for(var i;e.innerMode&&!(i=e.innerMode(t),!i||i.mode==e);)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Xt(e,t,i){return e.startState?e.startState(t,i):!0}var _t=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};_t.prototype.eol=function(){return this.pos>=this.string.length},_t.prototype.sol=function(){return this.pos==this.lineStart},_t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_t.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},_t.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},_t.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},_t.prototype.skipToEnd=function(){this.pos=this.string.length},_t.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},_t.prototype.backUp=function(e){this.pos-=e},_t.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=H(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},_t.prototype.indentation=function(){return H(this.string,null,this.tabSize)-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},_t.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(u){return i?u.toLowerCase():u},r=this.string.substr(this.pos,e.length);if(n(r)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}},_t.prototype.current=function(){return this.string.slice(this.start,this.pos)},_t.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},_t.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},_t.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function vt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var n=0;;++n){var r=i.children[n],s=r.chunkSize();if(t<s){i=r;break}t-=s}return i.lines[t]}function ln(e,t,i){var n=[],r=t.line;return e.iter(t.line,i.line+1,function(s){var u=s.text;r==i.line&&(u=u.slice(0,i.ch)),r==t.line&&(u=u.slice(t.ch)),n.push(u),++r}),n}function An(e,t,i){var n=[];return e.iter(t,i,function(r){n.push(r.text)}),n}function En(e,t){var i=t-e.height;if(i)for(var n=e;n;n=n.parent)n.height+=i}function jt(e){if(e.parent==null)return null;for(var t=e.parent,i=Te(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var r=0;!(n.children[r]==t);++r)i+=n.children[r].chunkSize();return i+t.first}function gn(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],s=r.height;if(t<s){e=r;continue e}t-=s,i+=r.chunkSize()}return i}while(!e.lines);for(var u=0;u<e.lines.length;++u){var v=e.lines[u],b=v.height;if(t<b)break;t-=b}return i+u}function fn(e,t){return t>=e.first&&t<e.first+e.size}function Vn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Je(e,t,i){if(i===void 0&&(i=null),!(this instanceof Je))return new Je(e,t,i);this.line=e,this.ch=t,this.sticky=i}function ht(e,t){return e.line-t.line||e.ch-t.ch}function It(e,t){return e.sticky==t.sticky&&ht(e,t)==0}function Kt(e){return Je(e.line,e.ch)}function Jt(e,t){return ht(e,t)<0?t:e}function qt(e,t){return ht(e,t)<0?e:t}function c(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function o(e,t){if(t.line<e.first)return Je(e.first,0);var i=e.first+e.size-1;return t.line>i?Je(i,vt(e,i).text.length):a(t,vt(e,t.line).text.length)}function a(e,t){var i=e.ch;return i==null||i>t?Je(e.line,t):i<0?Je(e.line,0):e}function l(e,t){for(var i=[],n=0;n<t.length;n++)i[n]=o(e,t[n]);return i}var f=function(e,t){this.state=e,this.lookAhead=t},d=function(e,t,i,n){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};d.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},d.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},d.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},d.fromSaved=function(e,t,i){return t instanceof f?new d(e,Wt(e.mode,t.state),i,t.lookAhead):new d(e,Wt(e.mode,t),i)},d.prototype.save=function(e){var t=e!==!1?Wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new f(t,this.maxLookAhead):t};function he(e,t,i,n){var r=[e.state.modeGen],s={};cn(e,t.text,e.doc.mode,i,function(T,le){return r.push(T,le)},s,n);for(var u=i.state,v=function(T){i.baseTokens=r;var le=e.state.overlays[T],fe=1,Ie=0;i.state=!0,cn(e,t.text,le.mode,i,function(Ne,Qe){for(var tt=fe;Ie<Ne;){var ot=r[fe];ot>Ne&&r.splice(fe,1,Ne,r[fe+1],ot),fe+=2,Ie=Math.min(Ne,ot)}if(!Qe)return;if(le.opaque)r.splice(tt,fe-tt,Ne,"overlay "+Qe),fe=tt+2;else for(;tt<fe;tt+=2){var ft=r[tt+1];r[tt+1]=(ft?ft+" ":"")+"overlay "+Qe}},s),i.state=u,i.baseTokens=null,i.baseTokenPos=1},b=0;b<e.state.overlays.length;++b)v(b);return{styles:r,classes:s.bgClass||s.textClass?s:null}}function Ze(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=rt(e,jt(t)),r=t.text.length>e.options.maxHighlightLength&&Wt(e.doc.mode,n.state),s=he(e,t,n);r&&(n.state=r),t.stateAfter=n.save(!r),t.styles=s.styles,s.classes?t.styleClasses=s.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function rt(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState)return new d(n,!0,t);var s=on(e,t,i),u=s>n.first&&vt(n,s-1).stateAfter,v=u?d.fromSaved(n,u,s):new d(n,Xt(n.mode),s);return n.iter(s,t,function(b){ut(e,b.text,v);var T=v.line;b.stateAfter=T==t-1||T%5==0||T>=r.viewFrom&&T<r.viewTo?v.save():null,v.nextLine()}),i&&(n.modeFrontier=v.line),v}function ut(e,t,i,n){var r=e.doc.mode,s=new _t(t,e.options.tabSize,i);for(s.start=s.pos=n||0,t==""&&$e(r,i.state);!s.eol();)Ct(r,s,i.state),s.start=s.pos}function $e(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var i=Ut(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}function Ct(e,t,i,n){for(var r=0;r<10;r++){n&&(n[0]=Ut(e,i).mode);var s=e.token(t,i);if(t.pos>t.start)return s}throw new Error("Mode "+e.name+" failed to advance stream.")}var gt=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Bt(e,t,i,n){var r=e.doc,s=r.mode,u;t=o(r,t);var v=vt(r,t.line),b=rt(e,t.line,i),T=new _t(v.text,e.options.tabSize,b),le;for(n&&(le=[]);(n||T.pos<t.ch)&&!T.eol();)T.start=T.pos,u=Ct(s,T,b.state),n&&le.push(new gt(T,u,Wt(r.mode,b.state)));return n?le:new gt(T,u,b.state)}function yn(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";t[n]==null?t[n]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+i[2])}return e}function cn(e,t,i,n,r,s,u){var v=i.flattenSpans;v==null&&(v=e.options.flattenSpans);var b=0,T=null,le=new _t(t,e.options.tabSize,n),fe,Ie=e.options.addModeClass&&[null];for(t==""&&yn($e(i,n.state),s);!le.eol();){if(le.pos>e.options.maxHighlightLength?(v=!1,u&&ut(e,t,n,le.pos),le.pos=t.length,fe=null):fe=yn(Ct(i,le,n.state,Ie),s),Ie){var Ne=Ie[0].name;Ne&&(fe="m-"+(fe?Ne+" "+fe:Ne))}if(!v||T!=fe){for(;b<le.start;)b=Math.min(le.start,b+5e3),r(b,T);T=fe}le.start=le.pos}for(;b<le.pos;){var Qe=Math.min(le.pos,b+5e3);r(Qe,T),b=Qe}}function on(e,t,i){for(var n,r,s=e.doc,u=i?-1:t-(e.doc.mode.innerMode?1e3:100),v=t;v>u;--v){if(v<=s.first)return s.first;var b=vt(s,v-1),T=b.stateAfter;if(T&&(!i||v+(T instanceof f?T.lookAhead:0)<=s.modeFrontier))return v;var le=H(b.text,null,e.options.tabSize);(r==null||n>le)&&(r=v-1,n=le)}return r}function kn(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var i=e.first,n=t-1;n>i;n--){var r=vt(e,n).stateAfter;if(r&&(!(r instanceof f)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var Xn=!1,wn=!1;function en(){Xn=!0}function bn(){wn=!0}function Qn(e,t,i){this.marker=e,this.from=t,this.to=i}function Sn(e,t){if(e)for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t)return n}}function ci(e,t){for(var i,n=0;n<e.length;++n)e[n]!=t&&(i||(i=[])).push(e[n]);return i}function Tn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Bn(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],u=s.marker,v=s.from==null||(u.inclusiveLeft?s.from<=t:s.from<t);if(v||s.from==t&&u.type=="bookmark"&&(!i||!s.marker.insertLeft)){var b=s.to==null||(u.inclusiveRight?s.to>=t:s.to>t);(n||(n=[])).push(new Qn(u,s.from,b?null:s.to))}}return n}function tn(e,t,i){var n;if(e)for(var r=0;r<e.length;++r){var s=e[r],u=s.marker,v=s.to==null||(u.inclusiveRight?s.to>=t:s.to>t);if(v||s.from==t&&u.type=="bookmark"&&(!i||s.marker.insertLeft)){var b=s.from==null||(u.inclusiveLeft?s.from<=t:s.from<t);(n||(n=[])).push(new Qn(u,b?null:s.from-t,s.to==null?null:s.to-t))}}return n}function Tt(e,t){if(t.full)return null;var i=fn(e,t.from.line)&&vt(e,t.from.line).markedSpans,n=fn(e,t.to.line)&&vt(e,t.to.line).markedSpans;if(!i&&!n)return null;var r=t.from.ch,s=t.to.ch,u=ht(t.from,t.to)==0,v=Bn(i,r,u),b=tn(n,s,u),T=t.text.length==1,le=x(t.text).length+(T?r:0);if(v)for(var fe=0;fe<v.length;++fe){var Ie=v[fe];if(Ie.to==null){var Ne=Sn(b,Ie.marker);Ne?T&&(Ie.to=Ne.to==null?null:Ne.to+le):Ie.to=r}}if(b)for(var Qe=0;Qe<b.length;++Qe){var tt=b[Qe];if(tt.to!=null&&(tt.to+=le),tt.from==null){var ot=Sn(v,tt.marker);ot||(tt.from=le,T&&(v||(v=[])).push(tt))}else tt.from+=le,T&&(v||(v=[])).push(tt)}v&&(v=ct(v)),b&&b!=v&&(b=ct(b));var ft=[v];if(!T){var yt=t.text.length-2,pt;if(yt>0&&v)for(var wt=0;wt<v.length;++wt)v[wt].to==null&&(pt||(pt=[])).push(new Qn(v[wt].marker,null,null));for(var Pt=0;Pt<yt;++Pt)ft.push(pt);ft.push(b)}return ft}function ct(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Nn(e,t,i){var n=null;if(e.iter(t.line,i.line+1,function(Ne){if(Ne.markedSpans)for(var Qe=0;Qe<Ne.markedSpans.length;++Qe){var tt=Ne.markedSpans[Qe].marker;tt.readOnly&&(!n||Te(n,tt)==-1)&&(n||(n=[])).push(tt)}}),!n)return null;for(var r=[{from:t,to:i}],s=0;s<n.length;++s)for(var u=n[s],v=u.find(0),b=0;b<r.length;++b){var T=r[b];if(ht(T.to,v.from)<0||ht(T.from,v.to)>0)continue;var le=[b,1],fe=ht(T.from,v.from),Ie=ht(T.to,v.to);(fe<0||!u.inclusiveLeft&&!fe)&&le.push({from:T.from,to:v.from}),(Ie>0||!u.inclusiveRight&&!Ie)&&le.push({from:v.to,to:T.to}),r.splice.apply(r,le),b+=le.length-3}return r}function dn(e){var t=e.markedSpans;if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}function $n(e,t){if(!t)return;for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}function pn(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function Ln(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var n=e.find(),r=t.find(),s=ht(n.from,r.from)||pn(e)-pn(t);if(s)return-s;var u=ht(n.to,r.to)||$t(e)-$t(t);return u||t.id-e.id}function Gt(e,t){var i=wn&&e.markedSpans,n;if(i)for(var r=void 0,s=0;s<i.length;++s)r=i[s],r.marker.collapsed&&(t?r.from:r.to)==null&&(!n||Ln(n,r.marker)<0)&&(n=r.marker);return n}function Cn(e){return Gt(e,!0)}function Zt(e){return Gt(e,!1)}function Yn(e,t){var i=wn&&e.markedSpans,n;if(i)for(var r=0;r<i.length;++r){var s=i[r];s.marker.collapsed&&(s.from==null||s.from<t)&&(s.to==null||s.to>t)&&(!n||Ln(n,s.marker)<0)&&(n=s.marker)}return n}function vn(e,t,i,n,r){var s=vt(e,t),u=wn&&s.markedSpans;if(u)for(var v=0;v<u.length;++v){var b=u[v];if(!b.marker.collapsed)continue;var T=b.marker.find(0),le=ht(T.from,i)||pn(b.marker)-pn(r),fe=ht(T.to,n)||$t(b.marker)-$t(r);if(le>=0&&fe<=0||le<=0&&fe>=0)continue;if(le<=0&&(b.marker.inclusiveRight&&r.inclusiveLeft?ht(T.to,i)>=0:ht(T.to,i)>0)||le>=0&&(b.marker.inclusiveRight&&r.inclusiveLeft?ht(T.from,n)<=0:ht(T.from,n)<0))return!0}}function Mn(e){for(var t;t=Cn(e);)e=t.find(-1,!0).line;return e}function yi(e){for(var t;t=Zt(e);)e=t.find(1,!0).line;return e}function ii(e){for(var t,i;t=Zt(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function di(e,t){var i=vt(e,t),n=Mn(i);return i==n?t:jt(n)}function pr(e,t){if(t>e.lastLine())return t;var i=vt(e,t),n;if(!_n(e,i))return t;for(;n=Zt(i);)i=n.find(1,!0).line;return jt(i)+1}function _n(e,t){var i=wn&&t.markedSpans;if(i)for(var n=void 0,r=0;r<i.length;++r){if(n=i[r],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Li(e,t,n))return!0}}function Li(e,t,i){if(i.to==null){var n=i.marker.find(1,!0);return Li(e,n.line,Sn(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var r=void 0,s=0;s<t.markedSpans.length;++s)if(r=t.markedSpans[s],r.marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(r.to==null||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&Li(e,t,r))return!0}function bi(e){e=Mn(e);for(var t=0,i=e.parent,n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==e)break;t+=r.height}for(var s=i.parent;s;i=s,s=i.parent)for(var u=0;u<s.children.length;++u){var v=s.children[u];if(v==i)break;t+=v.height}return t}function Ji(e){if(e.height==0)return 0;for(var t=e.text.length,i,n=e;i=Cn(n);){var r=i.find(0,!0);n=r.from.line,t+=r.from.ch-r.to.ch}for(n=e;i=Zt(n);){var s=i.find(0,!0);t-=n.text.length-s.from.ch,n=s.to.line,t+=n.text.length-s.to.ch}return t}function Br(e){var t=e.display,i=e.doc;t.maxLine=vt(i,i.first),t.maxLineLength=Ji(t.maxLine),t.maxLineChanged=!0,i.iter(function(n){var r=Ji(n);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=n)})}var Ui=function(e,t,i){this.text=e,$n(this,t),this.height=i?i(this):1};Ui.prototype.lineNo=function(){return jt(this)},ve(Ui);function Jo(e,t,i,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dn(e),$n(e,i);var r=n?n(e):1;r!=e.height&&En(e,r)}function co(e){e.parent=null,dn(e)}var Dt={},Ft={};function Rt(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Ft:Dt;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var i=Ae("span",null,null,F?"padding-right: .1px":null),n={pre:Ae("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var s=r?t.rest[r-1]:t.line,u=void 0;n.pos=0,n.addToken=hn,St(e.display.measure)&&(u=Ye(s,e.doc.direction))&&(n.addToken=jn(n.addToken,u)),n.map=[];var v=t!=e.display.externalMeasured&&jt(s);Qt(s,n,Ze(e,s,v)),s.styleClasses&&(s.styleClasses.bgClass&&(n.bgClass=G(s.styleClasses.bgClass,n.bgClass||"")),s.styleClasses.textClass&&(n.textClass=G(s.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(st(e.display.measure))),r==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(F){var b=n.content.lastChild;(/\bcm-tab\b/.test(b.className)||b.querySelector&&b.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return _e(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=G(n.pre.className,n.textClass||"")),n}function an(e){var t=j("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function hn(e,t,i,n,r,s,u){if(!t)return;var v=e.splitSpaces?nn(t,e.trailingSpace):t,b=e.cm.state.specialChars,T=!1,le;if(!b.test(t))e.col+=t.length,le=document.createTextNode(v),e.map.push(e.pos,e.pos+t.length,le),Y&&J<9&&(T=!0),e.pos+=t.length;else{le=document.createDocumentFragment();for(var fe=0;;){b.lastIndex=fe;var Ie=b.exec(t),Ne=Ie?Ie.index-fe:t.length-fe;if(Ne){var Qe=document.createTextNode(v.slice(fe,fe+Ne));Y&&J<9?le.appendChild(j("span",[Qe])):le.appendChild(Qe),e.map.push(e.pos,e.pos+Ne,Qe),e.col+=Ne,e.pos+=Ne}if(!Ie)break;fe+=Ne+1;var tt=void 0;if(Ie[0]==" "){var ot=e.cm.options.tabSize,ft=ot-e.col%ot;tt=le.appendChild(j("span",I(ft),"cm-tab")),tt.setAttribute("role","presentation"),tt.setAttribute("cm-text"," "),e.col+=ft}else Ie[0]=="\r"||Ie[0]==`
`?(tt=le.appendChild(j("span",Ie[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),tt.setAttribute("cm-text",Ie[0]),e.col+=1):(tt=e.cm.options.specialCharPlaceholder(Ie[0]),tt.setAttribute("cm-text",Ie[0]),Y&&J<9?le.appendChild(j("span",[tt])):le.appendChild(tt),e.col+=1);e.map.push(e.pos,e.pos+1,tt),e.pos++}}if(e.trailingSpace=v.charCodeAt(t.length-1)==32,i||n||r||T||s||u){var yt=i||"";n&&(yt+=n),r&&(yt+=r);var pt=j("span",[le],yt,s);if(u)for(var wt in u)u.hasOwnProperty(wt)&&wt!="style"&&wt!="class"&&pt.setAttribute(wt,u[wt]);return e.content.appendChild(pt)}e.content.appendChild(le)}function nn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,n="",r=0;r<e.length;r++){var s=e.charAt(r);s==" "&&i&&(r==e.length-1||e.charCodeAt(r+1)==32)&&(s="\xA0"),n+=s,i=s==" "}return n}function jn(e,t){return function(i,n,r,s,u,v,b){r=r?r+" cm-force-border":"cm-force-border";for(var T=i.pos,le=T+n.length;;){for(var fe=void 0,Ie=0;Ie<t.length&&!(fe=t[Ie],fe.to>T&&fe.from<=T);Ie++);if(fe.to>=le)return e(i,n,r,s,u,v,b);e(i,n.slice(0,fe.to-T),r,s,null,v,b),s=null,n=n.slice(fe.to-T),T=fe.to}}}function ri(e,t,i,n){var r=!n&&i.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!n&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",i.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function Qt(e,t,i){var n=e.markedSpans,r=e.text,s=0;if(!n){for(var u=1;u<i.length;u+=2)t.addToken(t,r.slice(s,s=i[u]),Rt(i[u+1],t.cm.options));return}for(var v=r.length,b=0,T=1,le="",fe,Ie,Ne=0,Qe,tt,ot,ft,yt;;){if(Ne==b){Qe=tt=ot=Ie="",yt=null,ft=null,Ne=Infinity;for(var pt=[],wt=void 0,Pt=0;Pt<n.length;++Pt){var Mt=n[Pt],Vt=Mt.marker;if(Vt.type=="bookmark"&&Mt.from==b&&Vt.widgetNode)pt.push(Vt);else if(Mt.from<=b&&(Mt.to==null||Mt.to>b||Vt.collapsed&&Mt.to==b&&Mt.from==b)){if(Mt.to!=null&&Mt.to!=b&&Ne>Mt.to&&(Ne=Mt.to,tt=""),Vt.className&&(Qe+=" "+Vt.className),Vt.css&&(Ie=(Ie?Ie+";":"")+Vt.css),Vt.startStyle&&Mt.from==b&&(ot+=" "+Vt.startStyle),Vt.endStyle&&Mt.to==Ne&&(wt||(wt=[])).push(Vt.endStyle,Mt.to),Vt.title&&((yt||(yt={})).title=Vt.title),Vt.attributes)for(var xn in Vt.attributes)(yt||(yt={}))[xn]=Vt.attributes[xn];Vt.collapsed&&(!ft||Ln(ft.marker,Vt)<0)&&(ft=Mt)}else Mt.from>b&&Ne>Mt.from&&(Ne=Mt.from)}if(wt)for(var Kn=0;Kn<wt.length;Kn+=2)wt[Kn+1]==Ne&&(tt+=" "+wt[Kn]);if(!ft||ft.from==b)for(var Dn=0;Dn<pt.length;++Dn)ri(t,0,pt[Dn]);if(ft&&(ft.from||0)==b){if(ri(t,(ft.to==null?v+1:ft.to)-b,ft.marker,ft.from==null),ft.to==null)return;ft.to==b&&(ft=!1)}}if(b>=v)break;for(var fi=Math.min(v,Ne);;){if(le){var si=b+le.length;if(!ft){var In=si>fi?le.slice(0,fi-b):le;t.addToken(t,In,fe?fe+Qe:Qe,ot,b+In.length==Ne?tt:"",Ie,yt)}if(si>=fi){le=le.slice(fi-b),b=fi;break}b=si,ot=""}le=r.slice(s,s=i[T++]),fe=Rt(i[T++],t.cm.options)}}}function Di(e,t,i){this.line=t,this.rest=ii(t),this.size=this.rest?jt(x(this.rest))-i+1:1,this.node=this.text=null,this.hidden=_n(e,t)}function sn(e,t,i){for(var n=[],r,s=t;s<i;s=r){var u=new Di(e.doc,vt(e.doc,s),s);r=s+u.size,n.push(u)}return n}var Wn=null;function vi(e){Wn?Wn.ops.push(e):e.ownsGroup=Wn={ops:[e],delayedCallbacks:[]}}function gi(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(i<t.length)}function Wr(e,t){var i=e.ownsGroup;if(!i)return;try{gi(i)}finally{Wn=null,t(i)}}var mr=null;function Jn(e,t){var i=Ve(e,t);if(!i.length)return;var n=Array.prototype.slice.call(arguments,2),r;Wn?r=Wn.delayedCallbacks:mr?r=mr:(r=mr=[],setTimeout(Rs,0));for(var s=function(v){r.push(function(){return i[v].apply(null,n)})},u=0;u<i.length;++u)s(u)}function Rs(){var e=mr;mr=null;for(var t=0;t<e.length;++t)e[t]()}function Zo(e,t,i,n){for(var r=0;r<t.changes.length;r++){var s=t.changes[r];s=="text"?_s(e,t):s=="gutter"?qo(e,t,i,n):s=="class"?ho(e,t):s=="widget"&&Ps(e,t,n)}t.changes=null}function vr(e){return e.node==e.text&&(e.node=j("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Y&&J<8&&(e.node.style.zIndex=2)),e.node}function Ns(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var n=vr(t);t.background=n.insertBefore(j("div",null,i),n.firstChild),e.display.input.setUneditable(t.background)}}function Qo(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Yt(e,t)}function _s(e,t){var i=t.text.className,n=Qo(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,ho(e,t)):i&&(t.text.className=i)}function ho(e,t){Ns(e,t),t.line.wrapClass?vr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function qo(e,t,i,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=vr(t);t.gutterBackground=j("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var s=t.line.gutterMarkers;if(e.options.lineNumbers||s){var u=vr(t),v=t.gutter=j("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(v),u.insertBefore(v,t.text),t.line.gutterClass&&(v.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!s||!s["CodeMirror-linenumbers"])&&(t.lineNumber=v.appendChild(j("div",Vn(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),s)for(var b=0;b<e.display.gutterSpecs.length;++b){var T=e.display.gutterSpecs[b].className,le=s.hasOwnProperty(T)&&s[T];le&&v.appendChild(j("div",[le],"CodeMirror-gutter-elt","left: "+n.gutterLeft[T]+"px; width: "+n.gutterWidth[T]+"px"))}}}function Ps(e,t,i){t.alignable&&(t.alignable=null);for(var n=ye("CodeMirror-linewidget"),r=t.node.firstChild,s=void 0;r;r=s)s=r.nextSibling,n.test(r.className)&&t.node.removeChild(r);ea(e,t,i)}function js(e,t,i,n){var r=Qo(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),ho(e,t),qo(e,t,i,n),ea(e,t,n),t.node}function ea(e,t,i){if(ta(e,t.line,t,i,!0),t.rest)for(var n=0;n<t.rest.length;n++)ta(e,t.rest[n],t,i,!1)}function ta(e,t,i,n,r){if(!t.widgets)return;for(var s=vr(i),u=0,v=t.widgets;u<v.length;++u){var b=v[u],T=j("div",[b.node],"CodeMirror-linewidget"+(b.className?" "+b.className:""));b.handleMouseEvents||T.setAttribute("cm-ignore-events","true"),Is(b,T,i,n),e.display.input.setUneditable(T),r&&b.above?s.insertBefore(T,i.gutter||i.text):s.appendChild(T),Jn(b,"redraw")}}function Is(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(r-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function gr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!K(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),Z(t.display.measure,j("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Ti(e,t){for(var i=je(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Hr(e){return e.lineSpace.offsetTop}function fo(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function na(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Z(e.measure,j("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function wi(e){return We-e.display.nativeBarWidth}function Bi(e){return e.display.scroller.clientWidth-wi(e)-e.display.barWidth}function po(e){return e.display.scroller.clientHeight-wi(e)-e.display.barHeight}function Fs(e,t,i){var n=e.options.lineWrapping,r=n&&Bi(e);if(!t.measure.heights||n&&t.measure.width!=r){var s=t.measure.heights=[];if(n){t.measure.width=r;for(var u=t.text.firstChild.getClientRects(),v=0;v<u.length-1;v++){var b=u[v],T=u[v+1];Math.abs(b.bottom-T.bottom)>2&&s.push((b.bottom+T.top)/2-i.top)}}s.push(i.bottom-i.top)}}function ia(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var r=0;r<e.rest.length;r++)if(jt(e.rest[r])>i)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Us(e,t){t=Mn(t);var i=jt(t),n=e.display.externalMeasured=new Di(e.doc,t,i);n.lineN=i;var r=n.built=Yt(e,n);return n.text=r.pre,Z(e.display.lineMeasure,r.pre),n}function ra(e,t,i,n){return Si(e,Zi(e,t),i,n)}function mo(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[zi(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function Zi(e,t){var i=jt(t),n=mo(e,i);n&&!n.text?n=null:n&&n.changes&&(Zo(e,n,i,xo(e)),e.curOp.forceUpdate=!0),n||(n=Us(e,t));var r=ia(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Si(e,t,i,n,r){t.before&&(i=-1);var s=i+(n||""),u;return t.cache.hasOwnProperty(s)?u=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Fs(e,t.view,t.rect),t.hasHeights=!0),u=Ws(e,t,i,n),u.bogus||(t.cache[s]=u)),{left:u.left,right:u.right,top:r?u.rtop:u.top,bottom:r?u.rbottom:u.bottom}}var oa={left:0,right:0,top:0,bottom:0};function aa(e,t,i){for(var n,r,s,u,v,b,T=0;T<e.length;T+=3)if(v=e[T],b=e[T+1],t<v?(r=0,s=1,u="left"):t<b?(r=t-v,s=r+1):(T==e.length-3||t==b&&e[T+3]>t)&&(s=b-v,r=s-1,t>=b&&(u="right")),r!=null){if(n=e[T+2],v==b&&i==(n.insertLeft?"left":"right")&&(u=i),i=="left"&&r==0)for(;T&&e[T-2]==e[T-3]&&e[T-1].insertLeft;)n=e[(T-=3)+2],u="left";if(i=="right"&&r==b-v)for(;T<e.length-3&&e[T+3]==e[T+4]&&!e[T+5].insertLeft;)n=e[(T+=3)+2],u="right";break}return{node:n,start:r,end:s,collapse:u,coverStart:v,coverEnd:b}}function Bs(e,t){var i=oa;if(t=="left")for(var n=0;n<e.length&&!((i=e[n]).left!=i.right);n++);else for(var r=e.length-1;r>=0&&!((i=e[r]).left!=i.right);r--);return i}function Ws(e,t,i,n){var r=aa(t.map,i,n),s=r.node,u=r.start,v=r.end,b=r.collapse,T;if(s.nodeType==3){for(var le=0;le<4;le++){for(;u&&ze(t.line.text.charAt(r.coverStart+u));)--u;for(;r.coverStart+v<r.coverEnd&&ze(t.line.text.charAt(r.coverStart+v));)++v;if(Y&&J<9&&u==0&&v==r.coverEnd-r.coverStart?T=s.parentNode.getBoundingClientRect():T=Bs(oe(s,u,v).getClientRects(),n),T.left||T.right||u==0)break;v=u,u=u-1,b="right"}Y&&J<11&&(T=Hs(e.display.measure,T))}else{u>0&&(b=n="right");var fe;e.options.lineWrapping&&(fe=s.getClientRects()).length>1?T=fe[n=="right"?fe.length-1:0]:T=s.getBoundingClientRect()}if(Y&&J<9&&!u&&(!T||!T.left&&!T.right)){var Ie=s.parentNode.getClientRects()[0];Ie?T={left:Ie.left,right:Ie.left+qi(e.display),top:Ie.top,bottom:Ie.bottom}:T=oa}for(var Ne=T.top-t.rect.top,Qe=T.bottom-t.rect.top,tt=(Ne+Qe)/2,ot=t.view.measure.heights,ft=0;ft<ot.length-1&&!(tt<ot[ft]);ft++);var yt=ft?ot[ft-1]:0,pt=ot[ft],wt={left:(b=="right"?T.right:T.left)-t.rect.left,right:(b=="left"?T.left:T.right)-t.rect.left,top:yt,bottom:pt};return!T.left&&!T.right&&(wt.bogus=!0),e.options.singleCursorHeightPerLine||(wt.rtop=Ne,wt.rbottom=Qe),wt}function Hs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!At(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function sa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function la(e){e.display.externalMeasure=null,we(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)sa(e.display.view[t])}function yr(e){la(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ua(){return C&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ca(){return C&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function vo(e){var t=0;if(e.widgets)for(var i=0;i<e.widgets.length;++i)e.widgets[i].above&&(t+=gr(e.widgets[i]));return t}function zr(e,t,i,n,r){if(!r){var s=vo(t);i.top+=s,i.bottom+=s}if(n=="line")return i;n||(n="local");var u=bi(t);if(n=="local"?u+=Hr(e.display):u-=e.display.viewOffset,n=="page"||n=="window"){var v=e.display.lineSpace.getBoundingClientRect();u+=v.top+(n=="window"?0:ca());var b=v.left+(n=="window"?0:ua());i.left+=b,i.right+=b}return i.top+=u,i.bottom+=u,i}function da(e,t,i){if(i=="div")return t;var n=t.left,r=t.top;if(i=="page")n-=ua(),r-=ca();else if(i=="local"||!i){var s=e.display.sizer.getBoundingClientRect();n+=s.left,r+=s.top}var u=e.display.lineSpace.getBoundingClientRect();return{left:n-u.left,top:r-u.top}}function go(e,t,i,n,r){return n||(n=vt(e.doc,t.line)),zr(e,n,ra(e,n,t.ch,r),i)}function Ci(e,t,i,n,r,s){n=n||vt(e.doc,t.line),r||(r=Zi(e,n));function u(Qe,tt){var ot=Si(e,r,Qe,tt?"right":"left",s);return tt?ot.left=ot.right:ot.right=ot.left,zr(e,n,ot,i)}var v=Ye(n,e.doc.direction),b=t.ch,T=t.sticky;if(b>=n.text.length?(b=n.text.length,T="before"):b<=0&&(b=0,T="after"),!v)return u(T=="before"?b-1:b,T=="before");function le(Qe,tt,ot){var ft=v[tt],yt=ft.level==1;return u(ot?Qe-1:Qe,yt!=ot)}var fe=Be(v,b,T),Ie=Fe,Ne=le(b,fe,T=="before");return Ie!=null&&(Ne.other=le(b,Ie,T!="before")),Ne}function ha(e,t){var i=0;t=o(e.doc,t),e.options.lineWrapping||(i=qi(e.display)*t.ch);var n=vt(e.doc,t.line),r=bi(n)+Hr(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function yo(e,t,i,n,r){var s=Je(e,t,i);return s.xRel=r,n&&(s.outside=n),s}function bo(e,t,i){var n=e.doc;if(i+=e.display.viewOffset,i<0)return yo(n.first,0,null,-1,-1);var r=gn(n,i),s=n.first+n.size-1;if(r>s)return yo(n.first+n.size-1,vt(n,s).text.length,null,1,1);t<0&&(t=0);for(var u=vt(n,r);;){var v=zs(e,u,r,t,i),b=Yn(u,v.ch+(v.xRel>0||v.outside>0?1:0));if(!b)return v;var T=b.find(1);if(T.line==r)return T;u=vt(n,r=T.line)}}function fa(e,t,i,n){n-=vo(t);var r=t.text.length,s=nt(function(u){return Si(e,i,u-1).bottom<=n},r,0);return r=nt(function(u){return Si(e,i,u).top>n},s,r),{begin:s,end:r}}function pa(e,t,i,n){i||(i=Zi(e,t));var r=zr(e,t,Si(e,i,n),"line").top;return fa(e,t,i,r)}function Co(e,t,i,n){return e.bottom<=i?!1:e.top>i?!0:(n?e.left:e.right)>t}function zs(e,t,i,n,r){r-=bi(t);var s=Zi(e,t),u=vo(t),v=0,b=t.text.length,T=!0,le=Ye(t,e.doc.direction);if(le){var fe=(e.options.lineWrapping?Gs:Ks)(e,t,i,s,le,n,r);T=fe.level!=1,v=T?fe.from:fe.to-1,b=T?fe.to:fe.from-1}var Ie=null,Ne=null,Qe=nt(function(Pt){var Mt=Si(e,s,Pt);return Mt.top+=u,Mt.bottom+=u,Co(Mt,n,r,!1)?(Mt.top<=r&&Mt.left<=n&&(Ie=Pt,Ne=Mt),!0):!1},v,b),tt,ot,ft=!1;if(Ne){var yt=n-Ne.left<Ne.right-n,pt=yt==T;Qe=Ie+(pt?0:1),ot=pt?"after":"before",tt=yt?Ne.left:Ne.right}else{!T&&(Qe==b||Qe==v)&&Qe++,ot=Qe==0?"after":Qe==t.text.length?"before":Si(e,s,Qe-(T?1:0)).bottom+u<=r==T?"after":"before";var wt=Ci(e,Je(i,Qe,ot),"line",t,s);tt=wt.left,ft=r<wt.top?-1:r>=wt.bottom?1:0}return Qe=He(t.text,Qe,1),yo(i,Qe,ot,ft,n-tt)}function Ks(e,t,i,n,r,s,u){var v=nt(function(fe){var Ie=r[fe],Ne=Ie.level!=1;return Co(Ci(e,Je(i,Ne?Ie.to:Ie.from,Ne?"before":"after"),"line",t,n),s,u,!0)},0,r.length-1),b=r[v];if(v>0){var T=b.level!=1,le=Ci(e,Je(i,T?b.from:b.to,T?"after":"before"),"line",t,n);Co(le,s,u,!0)&&le.top>u&&(b=r[v-1])}return b}function Gs(e,t,i,n,r,s,u){var v=fa(e,t,n,u),b=v.begin,T=v.end;/\s/.test(t.text.charAt(T-1))&&T--;for(var le=null,fe=null,Ie=0;Ie<r.length;Ie++){var Ne=r[Ie];if(Ne.from>=T||Ne.to<=b)continue;var Qe=Ne.level!=1,tt=Si(e,n,Qe?Math.min(T,Ne.to)-1:Math.max(b,Ne.from)).right,ot=tt<s?s-tt+1e9:tt-s;(!le||fe>ot)&&(le=Ne,fe=ot)}return le||(le=r[r.length-1]),le.from<b&&(le={from:b,to:le.to,level:le.level}),le.to>T&&(le={from:le.from,to:T,level:le.level}),le}var Wi;function Qi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Wi==null){Wi=j("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Wi.appendChild(document.createTextNode("x")),Wi.appendChild(j("br"));Wi.appendChild(document.createTextNode("x"))}Z(e.measure,Wi);var i=Wi.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),we(e.measure),i||1}function qi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=j("span","xxxxxxxxxx"),i=j("pre",[t],"CodeMirror-line-like");Z(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function xo(e){for(var t=e.display,i={},n={},r=t.gutters.clientLeft,s=t.gutters.firstChild,u=0;s;s=s.nextSibling,++u){var v=e.display.gutterSpecs[u].className;i[v]=s.offsetLeft+s.clientLeft+r,n[v]=s.clientWidth}return{fixedPos:Eo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Eo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ma(e){var t=Qi(e.display),i=e.options.lineWrapping,n=i&&Math.max(5,e.display.scroller.clientWidth/qi(e.display)-3);return function(r){if(_n(e.doc,r))return 0;var s=0;if(r.widgets)for(var u=0;u<r.widgets.length;u++)r.widgets[u].height&&(s+=r.widgets[u].height);return i?s+(Math.ceil(r.text.length/n)||1)*t:s+t}}function wo(e){var t=e.doc,i=ma(e);t.iter(function(n){var r=i(n);r!=n.height&&En(n,r)})}function Hi(e,t,i,n){var r=e.display;if(!i&&je(t).getAttribute("cm-not-content")=="true")return null;var s,u,v=r.lineSpace.getBoundingClientRect();try{s=t.clientX-v.left,u=t.clientY-v.top}catch(fe){return null}var b=bo(e,s,u),T;if(n&&b.xRel>0&&(T=vt(e.doc,b.line).text).length==b.ch){var le=H(T,T.length,e.options.tabSize)-T.length;b=Je(b.line,Math.max(0,Math.round((s-na(e.display).left)/qi(e.display))-le))}return b}function zi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var i=e.display.view,n=0;n<i.length;n++)if(t-=i[n].size,t<0)return n}function oi(e,t,i,n){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),n||(n=0);var r=e.display;if(n&&i<r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)wn&&di(e.doc,t)<r.viewTo&&Ri(e);else if(i<=r.viewFrom)wn&&pr(e.doc,i+n)>r.viewFrom?Ri(e):(r.viewFrom+=n,r.viewTo+=n);else if(t<=r.viewFrom&&i>=r.viewTo)Ri(e);else if(t<=r.viewFrom){var s=Kr(e,i,i+n,1);s?(r.view=r.view.slice(s.index),r.viewFrom=s.lineN,r.viewTo+=n):Ri(e)}else if(i>=r.viewTo){var u=Kr(e,t,t,-1);u?(r.view=r.view.slice(0,u.index),r.viewTo=u.lineN):Ri(e)}else{var v=Kr(e,t,t,-1),b=Kr(e,i,i+n,1);v&&b?(r.view=r.view.slice(0,v.index).concat(sn(e,v.lineN,b.lineN)).concat(r.view.slice(b.index)),r.viewTo+=n):Ri(e)}var T=r.externalMeasured;T&&(i<T.lineN?T.lineN+=n:t<T.lineN+T.size&&(r.externalMeasured=null))}function Mi(e,t,i){e.curOp.viewChanged=!0;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var s=n.view[zi(e,t)];if(s.node==null)return;var u=s.changes||(s.changes=[]);Te(u,i)==-1&&u.push(i)}function Ri(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Kr(e,t,i,n){var r=zi(e,t),s,u=e.display.view;if(!wn||i==e.doc.first+e.doc.size)return{index:r,lineN:i};for(var v=e.display.viewFrom,b=0;b<r;b++)v+=u[b].size;if(v!=t){if(n>0){if(r==u.length-1)return null;s=v+u[r].size-t,r++}else s=v-t;t+=s,i+=s}for(;di(e.doc,i)!=i;){if(r==(n<0?0:u.length-1))return null;i+=n*u[r-(n<0?1:0)].size,r+=n}return{index:r,lineN:i}}function Vs(e,t,i){var n=e.display,r=n.view;r.length==0||t>=n.viewTo||i<=n.viewFrom?(n.view=sn(e,t,i),n.viewFrom=t):(n.viewFrom>t?n.view=sn(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(zi(e,t))),n.viewFrom=t,n.viewTo<i?n.view=n.view.concat(sn(e,n.viewTo,i)):n.viewTo>i&&(n.view=n.view.slice(0,zi(e,i)))),n.viewTo=i}function va(e){for(var t=e.display.view,i=0,n=0;n<t.length;n++){var r=t[n];!r.hidden&&(!r.node||r.changes)&&++i}return i}function br(e){e.display.input.showSelection(e.display.input.prepareSelection())}function ga(e,t){t===void 0&&(t=!0);for(var i=e.doc,n={},r=n.cursors=document.createDocumentFragment(),s=n.selection=document.createDocumentFragment(),u=0;u<i.sel.ranges.length;u++){if(!t&&u==i.sel.primIndex)continue;var v=i.sel.ranges[u];if(v.from().line>=e.display.viewTo||v.to().line<e.display.viewFrom)continue;var b=v.empty();(b||e.options.showCursorWhenSelecting)&&ya(e,v.head,r),b||Xs(e,v,s)}return n}function ya(e,t,i){var n=Ci(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=i.appendChild(j("div","\xA0","CodeMirror-cursor"));if(r.style.left=n.left+"px",r.style.top=n.top+"px",r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var s=i.appendChild(j("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Gr(e,t){return e.top-t.top||e.left-t.left}function Xs(e,t,i){var n=e.display,r=e.doc,s=document.createDocumentFragment(),u=na(e.display),v=u.left,b=Math.max(n.sizerWidth,Bi(e)-n.sizer.offsetLeft)-u.right,T=r.direction=="ltr";function le(pt,wt,Pt,Mt){wt<0&&(wt=0),wt=Math.round(wt),Mt=Math.round(Mt),s.appendChild(j("div",null,"CodeMirror-selected","position: absolute; left: "+pt+`px;
top: `+wt+"px; width: "+(Pt==null?b-pt:Pt)+`px;
height: `+(Mt-wt)+"px"))}function fe(pt,wt,Pt){var Mt=vt(r,pt),Vt=Mt.text.length,xn,Kn;function Dn(In,li){return go(e,Je(pt,In),"div",Mt,li)}function fi(In,li,Zn){var Un=pa(e,Mt,null,In),Fn=li=="ltr"==(Zn=="after")?"left":"right",Rn=Zn=="after"?Un.begin:Un.end-(/\s/.test(Mt.text.charAt(Un.end-1))?2:1);return Dn(Rn,Fn)[Fn]}var si=Ye(Mt,r.direction);return Oe(si,wt||0,Pt==null?Vt:Pt,function(In,li,Zn,Un){var Fn=Zn=="ltr",Rn=Dn(In,Fn?"left":"right"),ui=Dn(li-1,Fn?"right":"left"),hr=wt==null&&In==0,Fi=Pt==null&&li==Vt,ei=Un==0,ki=!si||Un==si.length-1;if(ui.top-Rn.top<=3){var Gn=(T?hr:Fi)&&ei,$o=(T?Fi:hr)&&ki,Ai=Gn?v:(Fn?Rn:ui).left,$i=$o?b:(Fn?ui:Rn).right;le(Ai,Rn.top,$i-Ai,Rn.bottom)}else{var Yi,ni,fr,Yo;Fn?(Yi=T&&hr&&ei?v:Rn.left,ni=T?b:fi(In,Zn,"before"),fr=T?v:fi(li,Zn,"after"),Yo=T&&Fi&&ki?b:ui.right):(Yi=T?fi(In,Zn,"before"):v,ni=!T&&hr&&ei?b:Rn.right,fr=!T&&Fi&&ki?v:ui.left,Yo=T?fi(li,Zn,"after"):b),le(Yi,Rn.top,ni-Yi,Rn.bottom),Rn.bottom<ui.top&&le(v,Rn.bottom,null,ui.top),le(fr,ui.top,Yo-fr,ui.bottom)}(!xn||Gr(Rn,xn)<0)&&(xn=Rn),Gr(ui,xn)<0&&(xn=ui),(!Kn||Gr(Rn,Kn)<0)&&(Kn=Rn),Gr(ui,Kn)<0&&(Kn=ui)}),{start:xn,end:Kn}}var Ie=t.from(),Ne=t.to();if(Ie.line==Ne.line)fe(Ie.line,Ie.ch,Ne.ch);else{var Qe=vt(r,Ie.line),tt=vt(r,Ne.line),ot=Mn(Qe)==Mn(tt),ft=fe(Ie.line,Ie.ch,ot?Qe.text.length+1:null).end,yt=fe(Ne.line,ot?0:null,Ne.ch).start;ot&&(ft.top<yt.top-2?(le(ft.right,ft.top,null,ft.bottom),le(v,yt.top,yt.left,yt.bottom)):le(ft.right,ft.top,yt.left-ft.right,ft.bottom)),ft.bottom<yt.top&&le(v,ft.bottom,null,yt.top)}i.appendChild(s)}function So(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||er(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function ba(e){e.state.focused||(e.display.input.focus(),ko(e))}function Ca(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,er(e))},100)}function ko(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(_e(e,"focus",e,t),e.state.focused=!0,te(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),F&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),So(e)}function er(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(_e(e,"blur",e,t),e.state.focused=!1,Q(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Vr(e){for(var t=e.display,i=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var r=t.view[n],s=e.options.lineWrapping,u=void 0,v=0;if(r.hidden)continue;if(Y&&J<8){var b=r.node.offsetTop+r.node.offsetHeight;u=b-i,i=b}else{var T=r.node.getBoundingClientRect();u=T.bottom-T.top,!s&&r.text.firstChild&&(v=r.text.firstChild.getBoundingClientRect().right-T.left-1)}var le=r.line.height-u;if((le>.005||le<-.005)&&(En(r.line,u),xa(r.line),r.rest))for(var fe=0;fe<r.rest.length;fe++)xa(r.rest[fe]);if(v>e.display.sizerWidth){var Ie=Math.ceil(v/qi(e.display));Ie>e.display.maxLineLength&&(e.display.maxLineLength=Ie,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}function xa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;n&&(i.height=n.offsetHeight)}}function Xr(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Hr(e));var r=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight,s=gn(t,n),u=gn(t,r);if(i&&i.ensure){var v=i.ensure.from.line,b=i.ensure.to.line;v<s?(s=v,u=gn(t,bi(vt(t,v))+e.wrapper.clientHeight)):Math.min(b,t.lastLine())>=u&&(s=gn(t,bi(vt(t,b))-e.wrapper.clientHeight),u=b)}return{from:s,to:Math.max(u,s+1)}}function $s(e,t){if(Ke(e,"scrollCursorIntoView"))return;var i=e.display,n=i.sizer.getBoundingClientRect(),r=null;if(t.top+n.top<0?r=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),r!=null&&!w){var s=j("div","\u200B",null,`position: absolute;
top: `+(t.top-i.viewOffset-Hr(e.display))+`px;
height: `+(t.bottom-t.top+wi(e)+i.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(r),e.display.lineSpace.removeChild(s)}}function Ys(e,t,i,n){n==null&&(n=0);var r;!e.options.lineWrapping&&t==i&&(t=t.ch?Je(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,i=t.sticky=="before"?Je(t.line,t.ch+1,"before"):t);for(var s=0;s<5;s++){var u=!1,v=Ci(e,t),b=!i||i==t?v:Ci(e,i);r={left:Math.min(v.left,b.left),top:Math.min(v.top,b.top)-n,right:Math.max(v.left,b.left),bottom:Math.max(v.bottom,b.bottom)+n};var T=To(e,r),le=e.doc.scrollTop,fe=e.doc.scrollLeft;if(T.scrollTop!=null&&(xr(e,T.scrollTop),Math.abs(e.doc.scrollTop-le)>1&&(u=!0)),T.scrollLeft!=null&&(Ki(e,T.scrollLeft),Math.abs(e.doc.scrollLeft-fe)>1&&(u=!0)),!u)break}return r}function Js(e,t){var i=To(e,t);i.scrollTop!=null&&xr(e,i.scrollTop),i.scrollLeft!=null&&Ki(e,i.scrollLeft)}function To(e,t){var i=e.display,n=Qi(e.display);t.top<0&&(t.top=0);var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,s=po(e),u={};t.bottom-t.top>s&&(t.bottom=t.top+s);var v=e.doc.height+fo(i),b=t.top<n,T=t.bottom>v-n;if(t.top<r)u.scrollTop=b?0:t.top;else if(t.bottom>r+s){var le=Math.min(t.top,(T?v:t.bottom)-s);le!=r&&(u.scrollTop=le)}var fe=e.options.fixedGutter?0:i.gutters.offsetWidth,Ie=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-fe,Ne=Bi(e)-i.gutters.offsetWidth,Qe=t.right-t.left>Ne;return Qe&&(t.right=t.left+Ne),t.left<10?u.scrollLeft=0:t.left<Ie?u.scrollLeft=Math.max(0,t.left+fe-(Qe?0:10)):t.right>Ne+Ie-3&&(u.scrollLeft=t.right+(Qe?0:10)-Ne),u}function Oo(e,t){if(t==null)return;$r(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function tr(e){$r(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Cr(e,t,i){(t!=null||i!=null)&&$r(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function Zs(e,t){$r(e),e.curOp.scrollToPos=t}function $r(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=ha(e,t.from),n=ha(e,t.to);Ea(e,i,n,t.margin)}}function Ea(e,t,i,n){var r=To(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});Cr(e,r.scrollLeft,r.scrollTop)}function xr(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;Ee||Lo(e,{top:t}),wa(e,t,!0),Ee&&Lo(e),Sr(e,100)}function wa(e,t,i){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!i)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Ki(e,t,i,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Aa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Er(e){var t=e.display,i=t.gutters.offsetWidth,n=Math.round(e.doc.height+fo(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+wi(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Gi=function(e,t,i){this.cm=i;var n=this.vert=j("div",[j("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=j("div",[j("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1,e(n),e(r),Le(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Le(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Y&&J<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Gi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var s=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+s)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?n:0,bottom:t?n:0}},Gi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Gi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Gi.prototype.zeroWidthHack=function(){var e=O&&!S?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ae,this.disableVert=new ae},Gi.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function n(){var r=e.getBoundingClientRect(),s=i=="vert"?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);s!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},Gi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wr=function(){};wr.prototype.update=function(){return{bottom:0,right:0}},wr.prototype.setScrollLeft=function(){},wr.prototype.setScrollTop=function(){},wr.prototype.clear=function(){};function nr(e,t){t||(t=Er(e));var i=e.display.barWidth,n=e.display.barHeight;Sa(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++)i!=e.display.barWidth&&e.options.lineWrapping&&Vr(e),Sa(e,Er(e)),i=e.display.barWidth,n=e.display.barHeight}function Sa(e,t){var i=e.display,n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px",i.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=n.bottom+"px",i.scrollbarFiller.style.width=n.right+"px"):i.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=n.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var ka={native:Gi,null:wr};function Ta(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Q(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ka[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Le(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Ki(e,t):xr(e,t)},e),e.display.scrollbars.addClass&&te(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function Vi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qs},vi(e.curOp)}function Xi(e){var t=e.curOp;t&&Wr(t,function(i){for(var n=0;n<i.ops.length;n++)i.ops[n].cm.curOp=null;qs(i)})}function qs(e){for(var t=e.ops,i=0;i<t.length;i++)el(t[i]);for(var n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)nl(t[r]);for(var s=0;s<t.length;s++)il(t[s]);for(var u=0;u<t.length;u++)rl(t[u])}function el(e){var t=e.cm,i=t.display;al(t),e.updateMaxLine&&Br(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Yr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ao(e.cm,e.update)}function nl(e){var t=e.cm,i=t.display;e.updatedDisplay&&Vr(t),e.barMeasure=Er(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ra(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+wi(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Bi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function il(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ki(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==z();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&nr(t,e.barMeasure),e.updatedDisplay&&Mo(t,e.barMeasure),e.selectionChanged&&So(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&ba(e.cm)}function rl(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay&&Oa(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&wa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ki(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=Ys(t,o(n,e.scrollToPos.from),o(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,r)}var s=e.maybeHiddenMarkers,u=e.maybeUnhiddenMarkers;if(s)for(var v=0;v<s.length;++v)s[v].lines.length||_e(s[v],"hide");if(u)for(var b=0;b<u.length;++b)u[b].lines.length&&_e(u[b],"unhide");i.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&_e(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function hi(e,t){if(e.curOp)return t();Vi(e);try{return t()}finally{Xi(e)}}function Hn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Vi(e);try{return t.apply(e,arguments)}finally{Xi(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Vi(this);try{return e.apply(this,arguments)}finally{Xi(this)}}}function zn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Vi(t);try{return e.apply(this,arguments)}finally{Xi(t)}}}function Sr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,m(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var i=+new Date+e.options.workTime,n=rt(e,t.highlightFrontier),r=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(s){if(n.line>=e.display.viewFrom){var u=s.styles,v=s.text.length>e.options.maxHighlightLength?Wt(t.mode,n.state):null,b=he(e,s,n,!0);v&&(n.state=v),s.styles=b.styles;var T=s.styleClasses,le=b.classes;le?s.styleClasses=le:T&&(s.styleClasses=null);for(var fe=!u||u.length!=s.styles.length||T!=le&&(!T||!le||T.bgClass!=le.bgClass||T.textClass!=le.textClass),Ie=0;!fe&&Ie<u.length;++Ie)fe=u[Ie]!=s.styles[Ie];fe&&r.push(n.line),s.stateAfter=n.save(),n.nextLine()}else s.text.length<=e.options.maxHighlightLength&&ut(e,s.text,n),s.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>i)return Sr(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),r.length&&hi(e,function(){for(var s=0;s<r.length;s++)Mi(e,r[s],"text")})}var Yr=function(e,t,i){var n=e.display;this.viewport=t,this.visible=Xr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Bi(e),this.force=i,this.dims=xo(e),this.events=[]};Yr.prototype.signal=function(e,t){se(e,t)&&this.events.push(arguments)},Yr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)_e.apply(null,this.events[e])};function al(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=wi(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=wi(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=z();if(!t||!K(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&K(e.display.lineDiv,n.anchorNode)&&(i.anchorNode=n.anchorNode,i.anchorOffset=n.anchorOffset,i.focusNode=n.focusNode,i.focusOffset=n.focusOffset)}return i}function ll(e){if(!e||!e.activeElt||e.activeElt==z())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&K(document.body,e.anchorNode)&&K(document.body,e.focusNode)){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}function Ao(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden)return Ri(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&va(e)==0)return!1;La(e)&&(Ri(e),t.dims=xo(e));var r=n.first+n.size,s=Math.max(t.visible.from-e.options.viewportMargin,n.first),u=Math.min(r,t.visible.to+e.options.viewportMargin);i.viewFrom<s&&s-i.viewFrom<20&&(s=Math.max(n.first,i.viewFrom)),i.viewTo>u&&i.viewTo-u<20&&(u=Math.min(r,i.viewTo)),wn&&(s=di(e.doc,s),u=pr(e.doc,u));var v=s!=i.viewFrom||u!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Vs(e,s,u),i.viewOffset=bi(vt(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var b=va(e);if(!v&&b==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var T=sl(e);return b>4&&(i.lineDiv.style.display="none"),ul(e,i.updateLineNumbers,t.dims),b>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,ll(T),we(i.cursorDiv),we(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,v&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,Sr(e,400)),i.updateLineNumbers=null,!0}function Oa(e,t){for(var i=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Bi(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+fo(e.display)-po(e),i.top)}),t.visible=Xr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Xr(e.display,e.doc,i));if(!Ao(e,t))break;Vr(e);var r=Er(e);br(e),nr(e,r),Mo(e,r),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Lo(e,t){var i=new Yr(e,t);if(Ao(e,i)){Vr(e),Oa(e,i);var n=Er(e);br(e),nr(e,n),Mo(e,n),i.finish()}}function ul(e,t,i){var n=e.display,r=e.options.lineNumbers,s=n.lineDiv,u=s.firstChild;function v(Qe){var tt=Qe.nextSibling;return F&&O&&e.display.currentWheelTarget==Qe?Qe.style.display="none":Qe.parentNode.removeChild(Qe),tt}for(var b=n.view,T=n.viewFrom,le=0;le<b.length;le++){var fe=b[le];if(!fe.hidden)if(!fe.node||fe.node.parentNode!=s){var Ie=js(e,fe,T,i);s.insertBefore(Ie,u)}else{for(;u!=fe.node;)u=v(u);var Ne=r&&t!=null&&t<=T&&fe.lineNumber;fe.changes&&(Te(fe.changes,"gutter")>-1&&(Ne=!1),Zo(e,fe,T,i)),Ne&&(we(fe.lineNumber),fe.lineNumber.appendChild(document.createTextNode(Vn(e.options,T)))),u=fe.node.nextSibling}T+=fe.size}for(;u;)u=v(u)}function Do(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Mo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+wi(e)+"px"}function Aa(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=Eo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,s=n+"px",u=0;u<i.length;u++)if(!i[u].hidden){e.options.fixedGutter&&(i[u].gutter&&(i[u].gutter.style.left=s),i[u].gutterBackground&&(i[u].gutterBackground.style.left=s));var v=i[u].alignable;if(v)for(var b=0;b<v.length;b++)v[b].style.left=s}e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function La(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=Vn(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(j("div",[j("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=r.firstChild.offsetWidth,u=r.offsetWidth-s;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(s,n.lineGutter.offsetWidth-u)+1,n.lineNumWidth=n.lineNumInnerWidth+u,n.lineNumChars=n.lineNumInnerWidth?i.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Do(e.display),!0}return!1}function Ro(e,t){for(var i=[],n=!1,r=0;r<e.length;r++){var s=e[r],u=null;if(typeof s!="string"&&(u=s.style,s=s.className),s=="CodeMirror-linenumbers")if(t)n=!0;else continue;i.push({className:s,style:u})}return t&&!n&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function Da(e){var t=e.gutters,i=e.gutterSpecs;we(t),e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n],s=r.className,u=r.style,v=t.appendChild(j("div",null,"CodeMirror-gutter "+s));u&&(v.style.cssText=u),s=="CodeMirror-linenumbers"&&(e.lineGutter=v,v.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Do(e)}function kr(e){Da(e.display),oi(e),Aa(e)}function cl(e,t,i,n){var r=this;this.input=i,r.scrollbarFiller=j("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=j("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=Ae("div",null,"CodeMirror-code"),r.selectionDiv=j("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=j("div",null,"CodeMirror-cursors"),r.measure=j("div",null,"CodeMirror-measure"),r.lineMeasure=j("div",null,"CodeMirror-measure"),r.lineSpace=Ae("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var s=Ae("div",[r.lineSpace],"CodeMirror-lines");r.mover=j("div",[s],null,"position: relative"),r.sizer=j("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=j("div",null,null,"position: absolute; height: "+We+"px; width: 1px;"),r.gutters=j("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=j("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=j("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),Y&&J<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),!F&&!(Ee&&y)&&(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=Ro(n.gutters,n.lineNumbers),Da(r),i.init(r)}var Jr=0,pi=null;Y?pi=-.53:Ee?pi=15:C?pi=-.7:M&&(pi=-1/3);function Ma(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function dl(e){var t=Ma(e);return t.x*=pi,t.y*=pi,t}function Ra(e,t){var i=Ma(t),n=i.x,r=i.y,s=e.display,u=s.scroller,v=u.scrollWidth>u.clientWidth,b=u.scrollHeight>u.clientHeight;if(!(n&&v||r&&b))return;if(r&&O&&F){e:for(var T=t.target,le=s.view;T!=u;T=T.parentNode)for(var fe=0;fe<le.length;fe++)if(le[fe].node==T){e.display.currentWheelTarget=T;break e}}if(n&&!Ee&&!E&&pi!=null){r&&b&&xr(e,Math.max(0,u.scrollTop+r*pi)),Ki(e,Math.max(0,u.scrollLeft+n*pi)),(!r||r&&b)&&R(t),s.wheelStartX=null;return}if(r&&pi!=null){var Ie=r*pi,Ne=e.doc.scrollTop,Qe=Ne+s.wrapper.clientHeight;Ie<0?Ne=Math.max(0,Ne+Ie-50):Qe=Math.min(e.doc.height,Qe+Ie+50),Lo(e,{top:Ne,bottom:Qe})}Jr<20&&(s.wheelStartX==null?(s.wheelStartX=u.scrollLeft,s.wheelStartY=u.scrollTop,s.wheelDX=n,s.wheelDY=r,setTimeout(function(){if(s.wheelStartX==null)return;var tt=u.scrollLeft-s.wheelStartX,ot=u.scrollTop-s.wheelStartY,ft=ot&&s.wheelDY&&ot/s.wheelDY||tt&&s.wheelDX&&tt/s.wheelDX;if(s.wheelStartX=s.wheelStartY=null,!ft)return;pi=(pi*Jr+ft)/(Jr+1),++Jr},200)):(s.wheelDX+=n,s.wheelDY+=r))}var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!It(i.anchor,n.anchor)||!It(i.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new un(Kt(this.ranges[t].anchor),Kt(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(ht(t,n.from())>=0&&ht(e,n.to())<=0)return i}return-1};var un=function(e,t){this.anchor=e,this.head=t};un.prototype.from=function(){return qt(this.anchor,this.head)},un.prototype.to=function(){return Jt(this.anchor,this.head)},un.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function xi(e,t,i){var n=e&&e.options.selectionsMayTouch,r=t[i];t.sort(function(Ie,Ne){return ht(Ie.from(),Ne.from())}),i=Te(t,r);for(var s=1;s<t.length;s++){var u=t[s],v=t[s-1],b=ht(v.to(),u.from());if(n&&!u.empty()?b>0:b>=0){var T=qt(v.from(),u.from()),le=Jt(v.to(),u.to()),fe=v.empty()?u.from()==u.head:v.from()==v.head;s<=i&&--i,t.splice(--s,2,new un(fe?le:T,fe?T:le))}}return new mi(t,i)}function Ni(e,t){return new mi([new un(e,t||e)],0)}function _i(e){return e.text?Je(e.from.line+e.text.length-1,x(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Na(e,t){if(ht(e,t.from)<0)return e;if(ht(e,t.to)<=0)return _i(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=_i(t).ch-t.to.ch),Je(i,n)}function No(e,t){for(var i=[],n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new un(Na(r.anchor,t),Na(r.head,t)))}return xi(e.cm,i,e.sel.primIndex)}function _a(e,t,i){return e.line==t.line?Je(i.line,e.ch-t.ch+i.ch):Je(i.line+(e.line-t.line),e.ch)}function hl(e,t,i){for(var n=[],r=Je(e.first,0),s=r,u=0;u<t.length;u++){var v=t[u],b=_a(v.from,r,s),T=_a(_i(v),r,s);if(r=v.to,s=T,i=="around"){var le=e.sel.ranges[u],fe=ht(le.head,le.anchor)<0;n[u]=new un(fe?T:b,fe?b:T)}else n[u]=new un(b,b)}return new mi(n,e.sel.primIndex)}function _o(e){e.doc.mode=Et(e.options,e.doc.modeOption),Tr(e)}function Tr(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Sr(e,100),e.state.modeGen++,e.curOp&&oi(e)}function Pa(e,t){return t.from.ch==0&&t.to.ch==0&&x(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Po(e,t,i,n){function r(yt){return i?i[yt]:null}function s(yt,pt,wt){Jo(yt,pt,wt,n),Jn(yt,"change",yt,t)}function u(yt,pt){for(var wt=[],Pt=yt;Pt<pt;++Pt)wt.push(new Ui(T[Pt],r(Pt),n));return wt}var v=t.from,b=t.to,T=t.text,le=vt(e,v.line),fe=vt(e,b.line),Ie=x(T),Ne=r(T.length-1),Qe=b.line-v.line;if(t.full)e.insert(0,u(0,T.length)),e.remove(T.length,e.size-T.length);else if(Pa(e,t)){var tt=u(0,T.length-1);s(fe,fe.text,Ne),Qe&&e.remove(v.line,Qe),tt.length&&e.insert(v.line,tt)}else if(le==fe)if(T.length==1)s(le,le.text.slice(0,v.ch)+Ie+le.text.slice(b.ch),Ne);else{var ot=u(1,T.length-1);ot.push(new Ui(Ie+le.text.slice(b.ch),Ne,n)),s(le,le.text.slice(0,v.ch)+T[0],r(0)),e.insert(v.line+1,ot)}else if(T.length==1)s(le,le.text.slice(0,v.ch)+T[0]+fe.text.slice(b.ch),r(0)),e.remove(v.line+1,Qe);else{s(le,le.text.slice(0,v.ch)+T[0],r(0)),s(fe,Ie+fe.text.slice(b.ch),Ne);var ft=u(1,T.length-1);Qe>1&&e.remove(v.line+1,Qe-1),e.insert(v.line+1,ft)}Jn(e,"change",e,t)}function Pi(e,t,i){function n(r,s,u){if(r.linked)for(var v=0;v<r.linked.length;++v){var b=r.linked[v];if(b.doc==s)continue;var T=u&&b.sharedHist;if(i&&!T)continue;t(b.doc,T),n(b.doc,r,T)}}n(e,null,!0)}function ja(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,wo(e),_o(e),Ia(e),e.options.lineWrapping||Br(e),e.options.mode=t.modeOption,oi(e)}function Ia(e){(e.doc.direction=="rtl"?te:Q)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){hi(e,function(){Ia(e),oi(e)})}function Zr(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function jo(e,t){var i={from:Kt(t.from),to:_i(t),text:ln(e,t.from,t.to)};return Ba(e,i,t.from.line,t.to.line+1),Pi(e,function(n){return Ba(n,i,t.from.line,t.to.line+1)},!0),i}function Fa(e){for(;e.length;){var t=x(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Fa(e.done),x(e.done);if(e.done.length&&!x(e.done).ranges)return x(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),x(e.done)}function Ua(e,t,i,n){var r=e.history;r.undone.length=0;var s=+new Date,u,v;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&r.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(u=pl(r,r.lastOp==n)))v=x(u.changes),ht(t.from,t.to)==0&&ht(t.from,v.to)==0?v.to=_i(t):u.changes.push(jo(e,t));else{var b=x(r.done);for((!b||!b.ranges)&&Qr(e.sel,r.done),u={changes:[jo(e,t)],generation:r.generation},r.done.push(u);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(i),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=n,r.lastOrigin=r.lastSelOrigin=t.origin,v||_e(e,"historyAdded")}function ml(e,t,i,n){var r=t.charAt(0);return r=="*"||r=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,i,n){var r=e.history,s=n&&n.origin;i==r.lastSelOp||s&&r.lastSelOrigin==s&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==s||ml(e,s,x(r.done),t))?r.done[r.done.length-1]=t:Qr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=s,r.lastSelOp=i,n&&n.clearRedo!==!1&&Fa(r.undone)}function Qr(e,t){var i=x(t);i&&i.ranges&&i.equals(e)||t.push(e)}function Ba(e,t,i,n){var r=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(u){u.markedSpans&&((r||(r=t["spans_"+e.id]={}))[s]=u.markedSpans),++s})}function gl(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function yl(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var n=[],r=0;r<t.text.length;++r)n.push(gl(i[r]));return n}function Wa(e,t){var i=yl(e,t),n=Tt(e,t);if(!i)return n;if(!n)return i;for(var r=0;r<i.length;++r){var s=i[r],u=n[r];if(s&&u){e:for(var v=0;v<u.length;++v){for(var b=u[v],T=0;T<s.length;++T)if(s[T].marker==b.marker)continue e;s.push(b)}}else u&&(i[r]=u)}return i}function ir(e,t,i){for(var n=[],r=0;r<e.length;++r){var s=e[r];if(s.ranges){n.push(i?mi.prototype.deepCopy.call(s):s);continue}var u=s.changes,v=[];n.push({changes:v});for(var b=0;b<u.length;++b){var T=u[b],le=void 0;if(v.push({from:T.from,to:T.to,text:T.text}),t)for(var fe in T)(le=fe.match(/^spans_(\d+)$/))&&(Te(t,Number(le[1]))>-1&&(x(v)[fe]=T[fe],delete T[fe]))}}return n}function Io(e,t,i,n){if(n){var r=e.anchor;if(i){var s=ht(t,r)<0;s!=ht(i,r)<0?(r=t,t=i):s!=ht(t,i)<0&&(t=i)}return new un(r,t)}else return new un(i||t,t)}function qr(e,t,i,n,r){r==null&&(r=e.cm&&(e.cm.display.shift||e.extend)),qn(e,new mi([Io(e.sel.primary(),t,i,r)],0),n)}function Ha(e,t,i){for(var n=[],r=e.cm&&(e.cm.display.shift||e.extend),s=0;s<e.sel.ranges.length;s++)n[s]=Io(e.sel.ranges[s],t[s],null,r);var u=xi(e.cm,n,e.sel.primIndex);qn(e,u,i)}function Fo(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i,qn(e,xi(e.cm,r,e.sel.primIndex),n)}function za(e,t,i,n){qn(e,Ni(t,i),n)}function bl(e,t,i){var n={ranges:t.ranges,update:function(r){this.ranges=[];for(var s=0;s<r.length;s++)this.ranges[s]=new un(o(e,r[s].anchor),o(e,r[s].head))},origin:i&&i.origin};return _e(e,"beforeSelectionChange",e,n),e.cm&&_e(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?xi(e.cm,n.ranges,n.ranges.length-1):t}function Ka(e,t,i){var n=e.history.done,r=x(n);r&&r.ranges?(n[n.length-1]=t,eo(e,t,i)):qn(e,t,i)}function qn(e,t,i){eo(e,t,i),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function eo(e,t,i){(se(e,"beforeSelectionChange")||e.cm&&se(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,i));var n=i&&i.bias||(ht(t.primary().head,e.sel.primary().head)<0?-1:1);Ga(e,Xa(e,t,n,!0)),!(i&&i.scroll===!1)&&e.cm&&tr(e.cm)}function Ga(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,me(e.cm)),Jn(e,"cursorActivity",e)}function Va(e){Ga(e,Xa(e,e.sel,null,!1))}function Xa(e,t,i,n){for(var r,s=0;s<t.ranges.length;s++){var u=t.ranges[s],v=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[s],b=to(e,u.anchor,v&&v.anchor,i,n),T=to(e,u.head,v&&v.head,i,n);(r||b!=u.anchor||T!=u.head)&&(r||(r=t.ranges.slice(0,s)),r[s]=new un(b,T))}return r?xi(e.cm,r,t.primIndex):t}function rr(e,t,i,n,r){var s=vt(e,t.line);if(s.markedSpans)for(var u=0;u<s.markedSpans.length;++u){var v=s.markedSpans[u],b=v.marker,T="selectLeft"in b?!b.selectLeft:b.inclusiveLeft,le="selectRight"in b?!b.selectRight:b.inclusiveRight;if((v.from==null||(T?v.from<=t.ch:v.from<t.ch))&&(v.to==null||(le?v.to>=t.ch:v.to>t.ch))){if(r&&(_e(b,"beforeCursorEnter"),b.explicitlyCleared))if(s.markedSpans){--u;continue}else break;if(!b.atomic)continue;if(i){var fe=b.find(n<0?1:-1),Ie=void 0;if((n<0?le:T)&&(fe=$a(e,fe,-n,fe&&fe.line==t.line?s:null)),fe&&fe.line==t.line&&(Ie=ht(fe,i))&&(n<0?Ie<0:Ie>0))return rr(e,fe,t,n,r)}var Ne=b.find(n<0?-1:1);return(n<0?T:le)&&(Ne=$a(e,Ne,n,Ne.line==t.line?s:null)),Ne?rr(e,Ne,t,n,r):null}}return t}function to(e,t,i,n,r){var s=n||1,u=rr(e,t,i,s,r)||!r&&rr(e,t,i,s,!0)||rr(e,t,i,-s,r)||!r&&rr(e,t,i,-s,!0);return u||(e.cantEdit=!0,Je(e.first,0))}function $a(e,t,i,n){return i<0&&t.ch==0?t.line>e.first?o(e,Je(t.line-1)):null:i>0&&t.ch==(n||vt(e,t.line)).text.length?t.line<e.first+e.size-1?Je(t.line+1,0):null:new Je(t.line,t.ch+i)}function Ya(e){e.setSelection(Je(e.firstLine(),0),Je(e.lastLine()),Pe)}function Ja(e,t,i){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return i&&(n.update=function(r,s,u,v){r&&(n.from=o(e,r)),s&&(n.to=o(e,s)),u&&(n.text=u),v!==void 0&&(n.origin=v)}),_e(e,"beforeChange",e,n),e.cm&&_e(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function or(e,t,i){if(e.cm){if(!e.cm.curOp)return Hn(e.cm,or)(e,t,i);if(e.cm.state.suppressEdits)return}if((se(e,"beforeChange")||e.cm&&se(e.cm,"beforeChange"))&&(t=Ja(e,t,!0),!t))return;var n=Xn&&!i&&Nn(e,t.from,t.to);if(n)for(var r=n.length-1;r>=0;--r)Za(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else Za(e,t)}function Za(e,t){if(t.text.length==1&&t.text[0]==""&&ht(t.from,t.to)==0)return;var i=No(e,t);Ua(e,t,i,e.cm?e.cm.curOp.id:NaN),Or(e,t,i,Tt(e,t));var n=[];Pi(e,function(r,s){!s&&Te(n,r.history)==-1&&(ts(r.history,t),n.push(r.history)),Or(r,t,null,Tt(r,t))})}function no(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i)return;for(var r=e.history,s,u=e.sel,v=t=="undo"?r.done:r.undone,b=t=="undo"?r.undone:r.done,T=0;T<v.length&&!(s=v[T],i?s.ranges&&!s.equals(e.sel):!s.ranges);T++);if(T==v.length)return;for(r.lastOrigin=r.lastSelOrigin=null;;)if(s=v.pop(),s.ranges){if(Qr(s,b),i&&!s.equals(e.sel)){qn(e,s,{clearRedo:!1});return}u=s}else if(n){v.push(s);return}else break;var le=[];Qr(u,b),b.push({changes:le,generation:r.generation}),r.generation=s.generation||++r.maxGeneration;for(var fe=se(e,"beforeChange")||e.cm&&se(e.cm,"beforeChange"),Ie=function(tt){var ot=s.changes[tt];if(ot.origin=t,fe&&!Ja(e,ot,!1))return v.length=0,{};le.push(jo(e,ot));var ft=tt?No(e,ot):x(v);Or(e,ot,ft,Wa(e,ot)),!tt&&e.cm&&e.cm.scrollIntoView({from:ot.from,to:_i(ot)});var yt=[];Pi(e,function(pt,wt){!wt&&Te(yt,pt.history)==-1&&(ts(pt.history,ot),yt.push(pt.history)),Or(pt,ot,null,Wa(pt,ot))})},Ne=s.changes.length-1;Ne>=0;--Ne){var Qe=Ie(Ne);if(Qe)return Qe.v}}function Qa(e,t){if(t==0)return;if(e.first+=t,e.sel=new mi(k(e.sel.ranges,function(r){return new un(Je(r.anchor.line+t,r.anchor.ch),Je(r.head.line+t,r.head.ch))}),e.sel.primIndex),e.cm){oi(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++)Mi(e.cm,n,"gutter")}}function Or(e,t,i,n){if(e.cm&&!e.cm.curOp)return Hn(e.cm,Or)(e,t,i,n);if(t.to.line<e.first){Qa(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);Qa(e,r),t={from:Je(e.first,0),to:Je(t.to.line+r,t.to.ch),text:[x(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:Je(s,vt(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ln(e,t.from,t.to),i||(i=No(e,t)),e.cm?Cl(e.cm,t,n):Po(e,t,n),eo(e,i,Pe),e.cantEdit&&to(e,Je(e.firstLine(),0))&&(e.cantEdit=!1)}function Cl(e,t,i){var n=e.doc,r=e.display,s=t.from,u=t.to,v=!1,b=s.line;e.options.lineWrapping||(b=jt(Mn(vt(n,s.line))),n.iter(b,u.line+1,function(Ne){if(Ne==r.maxLine)return v=!0,!0})),n.sel.contains(t.from,t.to)>-1&&me(e),Po(n,t,i,ma(e)),e.options.lineWrapping||(n.iter(b,s.line+t.text.length,function(Ne){var Qe=Ji(Ne);Qe>r.maxLineLength&&(r.maxLine=Ne,r.maxLineLength=Qe,r.maxLineChanged=!0,v=!1)}),v&&(e.curOp.updateMaxLine=!0)),kn(n,s.line),Sr(e,400);var T=t.text.length-(u.line-s.line)-1;t.full?oi(e):s.line==u.line&&t.text.length==1&&!Pa(e.doc,t)?Mi(e,s.line,"text"):oi(e,s.line,u.line+1,T);var le=se(e,"changes"),fe=se(e,"change");if(fe||le){var Ie={from:s,to:u,text:t.text,removed:t.removed,origin:t.origin};fe&&Jn(e,"change",e,Ie),le&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ie)}e.display.selForContextMenu=null}function ar(e,t,i,n,r){var s;n||(n=i),ht(n,i)<0&&(s=[n,i],i=s[0],n=s[1]),typeof t=="string"&&(t=e.splitLines(t)),or(e,{from:i,to:n,text:t,origin:r})}function qa(e,t,i,n){i<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function es(e,t,i,n){for(var r=0;r<e.length;++r){var s=e[r],u=!0;if(s.ranges){s.copied||(s=e[r]=s.deepCopy(),s.copied=!0);for(var v=0;v<s.ranges.length;v++)qa(s.ranges[v].anchor,t,i,n),qa(s.ranges[v].head,t,i,n);continue}for(var b=0;b<s.changes.length;++b){var T=s.changes[b];if(i<T.from.line)T.from=Je(T.from.line+n,T.from.ch),T.to=Je(T.to.line+n,T.to.ch);else if(t<=T.to.line){u=!1;break}}u||(e.splice(0,r+1),r=0)}}function ts(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;es(e.done,i,n,r),es(e.undone,i,n,r)}function Ar(e,t,i,n){var r=t,s=t;return typeof t=="number"?s=vt(e,c(e,t)):r=jt(t),r==null?null:(n(s,r)&&e.cm&&Mi(e.cm,r,i),s)}function Lr(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}Lr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var r=this.lines[i];this.height-=r.height,co(r),Jn(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,i){for(var n=e+t;e<n;++e)if(i(this.lines[e]))return!0}};function Dr(e){this.children=e;for(var t=0,i=0,n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize(),i+=r.height,r.parent=this}this.size=t,this.height=i,this.parent=null}Dr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(e<r){var s=Math.min(t,r-e),u=n.height;if(n.removeInner(e,s),this.height-=u-n.height,r==s&&(this.children.splice(i--,1),n.parent=null),(t-=s)==0)break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Lr))){var v=[];this.collapse(v),this.children=[new Lr(v)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<=s){if(r.insertInner(e,t,i),r.lines&&r.lines.length>50){for(var u=r.lines.length%25+25,v=u;v<r.lines.length;){var b=new Lr(r.lines.slice(v,v+=25));r.height-=b.height,this.children.splice(++n,0,b),b.parent=this}r.lines=r.lines.slice(0,u),this.maybeSpill()}break}e-=s}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new Dr(t);if(e.parent){e.size-=i.size,e.height-=i.height;var r=Te(e.parent.children,e);e.parent.children.splice(r+1,0,i)}else{var n=new Dr(e.children);n.parent=e,e.children=[n,i],e=n}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],s=r.chunkSize();if(e<s){var u=Math.min(t,s-e);if(r.iterN(e,u,i))return!0;if((t-=u)==0)break;e=0}else e-=s}}};var Mr=function(e,t,i){if(i)for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n]);this.doc=e,this.node=t};Mr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=jt(i);if(n==null||!t)return;for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(i.widgets=null);var s=gr(this);En(i,Math.max(0,i.height-s)),e&&(hi(e,function(){ns(e,i,-s),Mi(e,n,"widget")}),Jn(e,"lineWidgetCleared",e,this,n))},Mr.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=gr(this)-t;if(!r)return;_n(this.doc,n)||En(n,n.height+r),i&&hi(i,function(){i.curOp.forceUpdate=!0,ns(i,n,r),Jn(i,"lineWidgetChanged",i,e,jt(n))})},ve(Mr);function ns(e,t,i){bi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Oo(e,i)}function xl(e,t,i,n){var r=new Mr(e,i,n),s=e.cm;return s&&r.noHScroll&&(s.display.alignWidgets=!0),Ar(e,t,"widget",function(u){var v=u.widgets||(u.widgets=[]);if(r.insertAt==null?v.push(r):v.splice(Math.min(v.length-1,Math.max(0,r.insertAt)),0,r),r.line=u,s&&!_n(e,u)){var b=bi(u)<e.scrollTop;En(u,u.height+gr(r)),b&&Oo(s,r.height),s.curOp.forceUpdate=!0}return!0}),s&&Jn(s,"lineWidgetAdded",s,r,typeof t=="number"?t:jt(t)),r}var is=0,ji=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++is};ji.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Vi(e),se(this,"clear")){var i=this.find();i&&Jn(this,"clear",i.from,i.to)}for(var n=null,r=null,s=0;s<this.lines.length;++s){var u=this.lines[s],v=Sn(u.markedSpans,this);e&&!this.collapsed?Mi(e,jt(u),"text"):e&&(v.to!=null&&(r=jt(u)),v.from!=null&&(n=jt(u))),u.markedSpans=ci(u.markedSpans,v),v.from==null&&this.collapsed&&!_n(this.doc,u)&&e&&En(u,Qi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var b=0;b<this.lines.length;++b){var T=Mn(this.lines[b]),le=Ji(T);le>e.display.maxLineLength&&(e.display.maxLine=T,e.display.maxLineLength=le,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&oi(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Va(e.doc)),e&&Jn(e,"markerCleared",e,this,n,r),t&&Xi(e),this.parent&&this.parent.clear()},ji.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,n,r=0;r<this.lines.length;++r){var s=this.lines[r],u=Sn(s.markedSpans,this);if(u.from!=null&&(i=Je(t?s:jt(s),u.from),e==-1))return i;if(u.to!=null&&(n=Je(t?s:jt(s),u.to),e==1))return n}return i&&{from:i,to:n}},ji.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,n=this.doc.cm;if(!t||!n)return;hi(n,function(){var r=t.line,s=jt(t.line),u=mo(n,s);if(u&&(sa(u),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!_n(i.doc,r)&&i.height!=null){var v=i.height;i.height=null;var b=gr(i)-v;b&&En(r,r.height+b)}Jn(n,"markerChanged",n,e)})},ji.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Te(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ji.prototype.detachLine=function(e){if(this.lines.splice(Te(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ve(ji);function sr(e,t,i,n,r){if(n&&n.shared)return El(e,t,i,n,r);if(e.cm&&!e.cm.curOp)return Hn(e.cm,sr)(e,t,i,n,r);var s=new ji(e,r),u=ht(t,i);if(n&&p(n,s,!1),u>0||u==0&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=Ae("span",[s.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(vn(e,t.line,t,i,s)||t.line!=i.line&&vn(e,i.line,t,i,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");bn()}s.addToHistory&&Ua(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var v=t.line,b=e.cm,T;if(e.iter(v,i.line+1,function(fe){b&&s.collapsed&&!b.options.lineWrapping&&Mn(fe)==b.display.maxLine&&(T=!0),s.collapsed&&v!=t.line&&En(fe,0),Tn(fe,new Qn(s,v==t.line?t.ch:null,v==i.line?i.ch:null)),++v}),s.collapsed&&e.iter(t.line,i.line+1,function(fe){_n(e,fe)&&En(fe,0)}),s.clearOnEnter&&Le(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(en(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++is,s.atomic=!0),b){if(T&&(b.curOp.updateMaxLine=!0),s.collapsed)oi(b,t.line,i.line+1);else if(s.className||s.startStyle||s.endStyle||s.css||s.attributes||s.title)for(var le=t.line;le<=i.line;le++)Mi(b,le,"text");s.atomic&&Va(b.doc),Jn(b,"markerAdded",b,s)}return s}var Rr=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Rr.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Jn(this,"clear")},Rr.prototype.find=function(e,t){return this.primary.find(e,t)},ve(Rr);function El(e,t,i,n,r){n=p(n),n.shared=!1;var s=[sr(e,t,i,n,r)],u=s[0],v=n.widgetNode;return Pi(e,function(b){v&&(n.widgetNode=v.cloneNode(!0)),s.push(sr(b,o(b,t),o(b,i),n,r));for(var T=0;T<b.linked.length;++T)if(b.linked[T].isParent)return;u=x(s)}),new Rr(s,u)}function rs(e){return e.findMarks(Je(e.first,0),e.clipPos(Je(e.lastLine())),function(t){return t.parent})}function wl(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n.find(),s=e.clipPos(r.from),u=e.clipPos(r.to);if(ht(s,u)){var v=sr(e,s,u,n.primary,n.primary.type);n.markers.push(v),v.parent=n}}}function Sl(e){for(var t=function(n){var r=e[n],s=[r.primary.doc];Pi(r.primary.doc,function(b){return s.push(b)});for(var u=0;u<r.markers.length;u++){var v=r.markers[u];Te(s,v.doc)==-1&&(v.parent=null,r.markers.splice(u--,1))}},i=0;i<e.length;i++)t(i)}var kl=0,ai=function(e,t,i,n,r){if(!(this instanceof ai))return new ai(e,t,i,n,r);i==null&&(i=0),Dr.call(this,[new Lr([new Ui("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var s=Je(i,0);this.sel=Ni(s),this.history=new Zr(null),this.id=++kl,this.modeOption=t,this.lineSep=n,this.direction=r=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Po(this,{from:s,to:s,text:e}),qn(this,Ni(s),Pe)};ai.prototype=L(Dr.prototype,{constructor:ai,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,n=0;n<t.length;++n)i+=t[n].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=An(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:zn(function(e){var t=Je(this.first,0),i=this.first+this.size-1;or(this,{from:t,to:Je(i,vt(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Cr(this.cm,0,0),qn(this,Ni(t),Pe)}),replaceRange:function(e,t,i,n){t=o(this,t),i=i?o(this,i):t,ar(this,e,t,i,n)},getRange:function(e,t,i){var n=ln(this,o(this,e),o(this,t));return i===!1?n:n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(fn(this,e))return vt(this,e)},getLineNumber:function(e){return jt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=vt(this,e)),Mn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return o(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zn(function(e,t,i){za(this,o(this,typeof e=="number"?Je(e,t||0):e),null,i)}),setSelection:zn(function(e,t,i){za(this,o(this,e),o(this,t||e),i)}),extendSelection:zn(function(e,t,i){qr(this,o(this,e),t&&o(this,t),i)}),extendSelections:zn(function(e,t){Ha(this,l(this,e),t)}),extendSelectionsBy:zn(function(e,t){var i=k(this.sel.ranges,e);Ha(this,l(this,i),t)}),setSelections:zn(function(e,t,i){if(!e.length)return;for(var n=[],r=0;r<e.length;r++)n[r]=new un(o(this,e[r].anchor),o(this,e[r].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),qn(this,xi(this.cm,n,t),i)}),addSelection:zn(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new un(o(this,e),o(this,t||e))),qn(this,xi(this.cm,n,n.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,n=0;n<t.length;n++){var r=ln(this,t[n].from(),t[n].to());i=i?i.concat(r):r}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,n=0;n<i.length;n++){var r=ln(this,i[n].from(),i[n].to());e!==!1&&(r=r.join(e||this.lineSeparator())),t[n]=r}return t},replaceSelection:function(e,t,i){for(var n=[],r=0;r<this.sel.ranges.length;r++)n[r]=e;this.replaceSelections(n,t,i||"+input")},replaceSelections:zn(function(e,t,i){for(var n=[],r=this.sel,s=0;s<r.ranges.length;s++){var u=r.ranges[s];n[s]={from:u.from(),to:u.to(),text:this.splitLines(e[s]),origin:i}}for(var v=t&&t!="end"&&hl(this,n,t),b=n.length-1;b>=0;b--)or(this,n[b]);v?Ka(this,v):this.cm&&tr(this.cm)}),undo:zn(function(){no(this,"undo")}),redo:zn(function(){no(this,"redo")}),undoSelection:zn(function(){no(this,"undo",!0)}),redoSelection:zn(function(){no(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Zr(this.history.maxGeneration),Pi(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ir(this.history.done),undone:ir(this.history.undone)}},setHistory:function(e){var t=this.history=new Zr(this.history.maxGeneration);t.done=ir(e.done.slice(0),null,!0),t.undone=ir(e.undone.slice(0),null,!0)},setGutterMarker:zn(function(e,t,i){return Ar(this,e,"gutter",function(n){var r=n.gutterMarkers||(n.gutterMarkers={});return r[t]=i,!i&&Me(r)&&(n.gutterMarkers=null),!0})}),clearGutter:zn(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&Ar(t,i,"gutter",function(){return i.gutterMarkers[e]=null,Me(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!fn(this,e))return null;if(t=e,e=vt(this,e),!e)return null}else if(t=jt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:zn(function(e,t,i){return Ar(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[r])n[r]=i;else{if(ye(i).test(n[r]))return!1;n[r]+=" "+i}return!0})}),removeLineClass:zn(function(e,t,i){return Ar(this,e,t=="gutter"?"gutter":"class",function(n){var r=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",s=n[r];if(s)if(i==null)n[r]=null;else{var u=s.match(ye(i));if(!u)return!1;var v=u.index+u[0].length;n[r]=s.slice(0,u.index)+(!u.index||v==s.length?"":" ")+s.slice(v)||null}else return!1;return!0})}),addLineWidget:zn(function(e,t,i){return xl(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return sr(this,o(this,e),o(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=o(this,e),sr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=o(this,e);var t=[],i=vt(this,e.line).markedSpans;if(i)for(var n=0;n<i.length;++n){var r=i[n];(r.from==null||r.from<=e.ch)&&(r.to==null||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,i){e=o(this,e),t=o(this,t);var n=[],r=e.line;return this.iter(e.line,t.line+1,function(s){var u=s.markedSpans;if(u)for(var v=0;v<u.length;v++){var b=u[v];!(b.to!=null&&r==e.line&&e.ch>=b.to||b.from==null&&r!=e.line||b.from!=null&&r==t.line&&b.from>=t.ch)&&(!i||i(b.marker))&&n.push(b.marker.parent||b.marker)}++r}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var n=0;n<i.length;++n)i[n].from!=null&&e.push(i[n].marker)}),e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;return this.iter(function(r){var s=r.text.length+n;if(s>e)return t=e,!0;e-=s,++i}),o(this,Je(i,t))},indexFromPos:function(e){e=o(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+i}),t},copy:function(e){var t=new ai(An(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var n=new ai(An(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(n,rs(this)),n},unlinkDoc:function(e){if(e instanceof On&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(rs(this));break}if(e.history==this.history){var n=[e.id];Pi(e,function(r){return n.push(r.id)},!0),e.history=new Zr(null),e.history.done=ir(this.history.done,n),e.history.undone=ir(this.history.undone,n)}},iterLinkedDocs:function(e){Pi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ot(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:zn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),ai.prototype.eachLine=ai.prototype.iter;var os=0;function Tl(e){var t=this;if(as(t),Ke(t,e)||Ti(t.display,e))return;R(e),Y&&(os=+new Date);var i=Hi(t,e,!0),n=e.dataTransfer.files;if(!i||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var r=n.length,s=Array(r),u=0,v=function(){++u==r&&Hn(t,function(){i=o(t.doc,i);var Ne={from:i,to:i,text:t.doc.splitLines(s.filter(function(Qe){return Qe!=null}).join(t.doc.lineSeparator())),origin:"paste"};or(t.doc,Ne),Ka(t.doc,Ni(o(t.doc,i),o(t.doc,_i(Ne))))})()},b=function(Ne,Qe){if(t.options.allowDropFileTypes&&Te(t.options.allowDropFileTypes,Ne.type)==-1){v();return}var tt=new FileReader;tt.onerror=function(){return v()},tt.onload=function(){var ot=tt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ot)){v();return}s[Qe]=ot,v()},tt.readAsText(Ne)},T=0;T<n.length;T++)b(n[T],T);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var le=e.dataTransfer.getData("Text");if(le){var fe;if(t.state.draggingText&&!t.state.draggingText.copy&&(fe=t.listSelections()),eo(t.doc,Ni(i,i)),fe)for(var Ie=0;Ie<fe.length;++Ie)ar(t.doc,"",fe[Ie].anchor,fe[Ie].head,"drag");t.replaceSelection(le,"around","paste"),t.display.input.focus()}}catch(Ne){}}}function Ol(e,t){if(Y&&(!e.state.draggingText||+new Date-os<100)){ce(t);return}if(Ke(e,t)||Ti(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!M){var i=j("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",E&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),E&&i.parentNode.removeChild(i)}}function Al(e,t){var i=Hi(e,t);if(!i)return;var n=document.createDocumentFragment();ya(e,i,n),e.display.dragCursor||(e.display.dragCursor=j("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Z(e.display.dragCursor,n)}function as(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ss(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),i=[],n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&i.push(r)}i.length&&i[0].operation(function(){for(var s=0;s<i.length;s++)e(i[s])})}var ls=!1;function Ll(){if(ls)return;Dl(),ls=!0}function Dl(){var e;Le(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ss(Ml)},100))}),Le(window,"blur",function(){return ss(er)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ii={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Nr=0;Nr<10;Nr++)Ii[Nr+48]=Ii[Nr+96]=String(Nr);for(var io=65;io<=90;io++)Ii[io]=String.fromCharCode(io);for(var _r=1;_r<=12;_r++)Ii[_r+111]=Ii[_r+63235]="F"+_r;var Oi={};Oi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Oi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Oi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Oi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Oi.default=O?Oi.macDefault:Oi.pcDefault;function Rl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,n,r,s,u=0;u<t.length-1;u++){var v=t[u];if(/^(cmd|meta|m)$/i.test(v))s=!0;else if(/^a(lt)?$/i.test(v))i=!0;else if(/^(c|ctrl|control)$/i.test(v))n=!0;else if(/^s(hift)?$/i.test(v))r=!0;else throw new Error("Unrecognized modifier name: "+v)}return i&&(e="Alt-"+e),n&&(e="Ctrl-"+e),s&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Nl(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(n=="..."){delete e[i];continue}for(var r=k(i.split(" "),Rl),s=0;s<r.length;s++){var u=void 0,v=void 0;s==r.length-1?(v=r.join(" "),u=n):(v=r.slice(0,s+1).join(" "),u="...");var b=t[v];if(!b)t[v]=u;else if(b!=u)throw new Error("Inconsistent bindings for "+v)}delete e[i]}for(var T in t)e[T]=t[T];return e}function lr(e,t,i,n){t=ro(t);var r=t.call?t.call(e,n):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&i(r))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return lr(e,t.fallthrough,i,n);for(var s=0;s<t.fallthrough.length;s++){var u=lr(e,t.fallthrough[s],i,n);if(u)return u}}}function us(e){var t=typeof e=="string"?e:Ii[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function cs(e,t,i){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(re?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(re?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function ds(e,t){if(E&&e.keyCode==34&&e.char)return!1;var i=Ii[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),cs(i,e,t))}function ro(e){return typeof e=="string"?Oi[e]:e}function ur(e,t){for(var i=e.doc.sel.ranges,n=[],r=0;r<i.length;r++){for(var s=t(i[r]);n.length&&ht(s.from,x(n).to)<=0;){var u=n.pop();if(ht(u.from,s.from)<0){s.from=u.from;break}}n.push(s)}hi(e,function(){for(var v=n.length-1;v>=0;v--)ar(e.doc,"",n[v].from,n[v].to,"+delete");tr(e)})}function Uo(e,t,i){var n=He(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Bo(e,t,i){var n=Uo(e,t.ch,i);return n==null?null:new Je(t.line,n,i<0?"after":"before")}function Wo(e,t,i,n,r){if(e){t.doc.direction=="rtl"&&(r=-r);var s=Ye(i,t.doc.direction);if(s){var u=r<0?x(s):s[0],v=r<0==(u.level==1),b=v?"after":"before",T;if(u.level>0||t.doc.direction=="rtl"){var le=Zi(t,i);T=r<0?i.text.length-1:0;var fe=Si(t,le,T).top;T=nt(function(Ie){return Si(t,le,Ie).top==fe},r<0==(u.level==1)?u.from:u.to-1,T),b=="before"&&(T=Uo(i,T,1))}else T=r<0?u.to:u.from;return new Je(n,T,b)}}return new Je(n,r<0?i.text.length:0,r<0?"before":"after")}function _l(e,t,i,n){var r=Ye(t,e.doc.direction);if(!r)return Bo(t,i,n);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var s=Be(r,i.ch,i.sticky),u=r[s];if(e.doc.direction=="ltr"&&u.level%2==0&&(n>0?u.to>i.ch:u.from<i.ch))return Bo(t,i,n);var v=function(ft,yt){return Uo(t,ft instanceof Je?ft.ch:ft,yt)},b,T=function(ft){return e.options.lineWrapping?(b=b||Zi(e,t),pa(e,t,b,ft)):{begin:0,end:t.text.length}},le=T(i.sticky=="before"?v(i,-1):i.ch);if(e.doc.direction=="rtl"||u.level==1){var fe=u.level==1==n<0,Ie=v(i,fe?1:-1);if(Ie!=null&&(fe?Ie<=u.to&&Ie<=le.end:Ie>=u.from&&Ie>=le.begin)){var Ne=fe?"before":"after";return new Je(i.line,Ie,Ne)}}var Qe=function(ft,yt,pt){for(var wt=function(xn,Kn){return Kn?new Je(i.line,v(xn,1),"before"):new Je(i.line,xn,"after")};ft>=0&&ft<r.length;ft+=yt){var Pt=r[ft],Mt=yt>0==(Pt.level!=1),Vt=Mt?pt.begin:v(pt.end,-1);if(Pt.from<=Vt&&Vt<Pt.to)return wt(Vt,Mt);if(Vt=Mt?Pt.from:v(Pt.to,-1),pt.begin<=Vt&&Vt<pt.end)return wt(Vt,Mt)}},tt=Qe(s+n,n,le);if(tt)return tt;var ot=n>0?le.end:v(le.begin,-1);return ot!=null&&!(n>0&&ot==t.text.length)&&(tt=Qe(n>0?0:r.length-1,n,T(ot)),tt)?tt:null}var Pr={selectAll:Ya,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Pe)},killLine:function(e){return ur(e,function(t){if(t.empty()){var i=vt(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:Je(t.head.line+1,0)}:{from:t.head,to:Je(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ur(e,function(t){return{from:Je(t.from().line,0),to:o(e.doc,Je(t.to().line+1,0))}})},delLineLeft:function(e){return ur(e,function(t){return{from:Je(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ur(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ur(e,function(t){var i=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Je(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Je(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return hs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return fs(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},_)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},_)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:i},"div");return n.ch<e.getLine(n.line).search(/\S/)?fs(e,t.head):n},_)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),n=e.options.tabSize,r=0;r<i.length;r++){var s=i[r].from(),u=H(e.getLine(s.line),s.ch,n);t.push(I(n-u%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hi(e,function(){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var r=t[n].head,s=vt(e.doc,r.line).text;if(s){if(r.ch==s.length&&(r=new Je(r.line,r.ch-1)),r.ch>0)r=new Je(r.line,r.ch+1),e.replaceRange(s.charAt(r.ch-1)+s.charAt(r.ch-2),Je(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var u=vt(e.doc,r.line-1).text;u&&(r=new Je(r.line,1),e.replaceRange(s.charAt(0)+e.doc.lineSeparator()+u.charAt(u.length-1),Je(r.line-1,u.length-1),r,"+transpose"))}}i.push(new un(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return hi(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);tr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function hs(e,t){var i=vt(e.doc,t),n=Mn(i);return n!=i&&(t=jt(n)),Wo(!0,e,n,t,1)}function Pl(e,t){var i=vt(e.doc,t),n=yi(i);return n!=i&&(t=jt(n)),Wo(!0,e,i,t,-1)}function fs(e,t){var i=hs(e,t.line),n=vt(e.doc,i.line),r=Ye(n,e.doc.direction);if(!r||r[0].level==0){var s=Math.max(i.ch,n.text.search(/\S/)),u=t.line==i.line&&t.ch<=s&&t.ch;return Je(i.line,u?0:s,i.sticky)}return i}function oo(e,t,i){if(typeof t=="string"&&(t=Pr[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),r=t(e)!=Re}finally{e.display.shift=n,e.state.suppressEdits=!1}return r}function jl(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var r=lr(t,e.state.keyMaps[n],i,e);if(r)return r}return e.options.extraKeys&&lr(t,e.options.extraKeys,i,e)||lr(t,e.options.keyMap,i,e)}var Il=new ae;function jr(e,t,i,n){var r=e.state.keySeq;if(r){if(us(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())}),ps(e,r+" "+t,i,n))return!0}return ps(e,t,i,n)}function ps(e,t,i,n){var r=jl(e,t,n);return r=="multi"&&(e.state.keySeq=t),r=="handled"&&Jn(e,"keyHandled",e,t,i),(r=="handled"||r=="multi")&&(R(i),So(e)),!!r}function ms(e,t){var i=ds(t,!0);return i?t.shiftKey&&!e.state.keySeq?jr(e,"Shift-"+i,t,function(n){return oo(e,n,!0)})||jr(e,i,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return oo(e,n)}):jr(e,i,t,function(n){return oo(e,n)}):!1}function Fl(e,t,i){return jr(e,"'"+i+"'",t,function(n){return oo(e,n,!0)})}var Ho=null;function vs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=z(),Ke(t,e))return;Y&&J<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var n=ms(t,e);E&&(Ho=n?i:null,!n&&i==88&&!Ht&&(O?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),Ee&&!O&&!n&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;te(t,"CodeMirror-crosshair");function i(n){(n.keyCode==18||!n.altKey)&&(Q(t,"CodeMirror-crosshair"),et(document,"keyup",i),et(document,"mouseover",i))}Le(document,"keyup",i),Le(document,"mouseover",i)}function gs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,e)}function ys(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Ti(t.display,e)||Ke(t,e)||e.ctrlKey&&!e.altKey||O&&e.metaKey)return;var i=e.keyCode,n=e.charCode;if(E&&i==Ho){Ho=null,R(e);return}if(E&&(!e.which||e.which<10)&&ms(t,e))return;var r=String.fromCharCode(n==null?i:n);if(r=="\b")return;if(Fl(t,e,r))return;t.display.input.onKeyPress(e)}var Bl=400,zo=function(e,t,i){this.time=e,this.pos=t,this.button=i};zo.prototype.compare=function(e,t,i){return this.time+Bl>e&&ht(t,this.pos)==0&&i==this.button};var Ir,Fr;function Wl(e,t){var i=+new Date;return Fr&&Fr.compare(i,e,t)?(Ir=Fr=null,"triple"):Ir&&Ir.compare(i,e,t)?(Fr=new zo(i,e,t),Ir=null,"double"):(Ir=new zo(i,e,t),Fr=null,"single")}function bs(e){var t=this,i=t.display;if(Ke(t,e)||i.activeTouch&&i.input.supportsTouch())return;if(i.input.ensurePolled(),i.shift=e.shiftKey,Ti(i,e)){F||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(Ko(t,e))return;var n=Hi(t,e),r=Se(e),s=n?Wl(n,r):"single";if(window.focus(),r==1&&t.state.selectingText&&t.state.selectingText(e),n&&Hl(t,r,n,s,e))return;r==1?n?Kl(t,n,s,e):je(e)==i.scroller&&R(e):r==2?(n&&qr(t.doc,n),setTimeout(function(){return i.input.focus()},20)):r==3&&(xe?t.display.input.onContextMenu(e):Ca(t))}function Hl(e,t,i,n,r){var s="Click";return n=="double"?s="Double"+s:n=="triple"&&(s="Triple"+s),s=(t==1?"Left":t==2?"Middle":"Right")+s,jr(e,cs(s,r),r,function(u){if(typeof u=="string"&&(u=Pr[u]),!u)return!1;var v=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),v=u(e,i)!=Re}finally{e.state.suppressEdits=!1}return v})}function zl(e,t,i){var n=e.getOption("configureMouse"),r=n?n(e,t,i):{};if(r.unit==null){var s=W?i.shiftKey&&i.metaKey:i.altKey;r.unit=s?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(r.extend==null||e.doc.extend)&&(r.extend=e.doc.extend||i.shiftKey),r.addNew==null&&(r.addNew=O?i.metaKey:i.ctrlKey),r.moveOnDrag==null&&(r.moveOnDrag=!(O?i.altKey:i.ctrlKey)),r}function Kl(e,t,i,n){Y?setTimeout(m(ba,e),0):e.curOp.focus=z();var r=zl(e,i,n),s=e.doc.sel,u;e.options.dragDrop&&qe&&!e.isReadOnly()&&i=="single"&&(u=s.contains(t))>-1&&(ht((u=s.ranges[u]).from(),t)<0||t.xRel>0)&&(ht(u.to(),t)>0||t.xRel<0)?Gl(e,n,t,r):Vl(e,n,t,r)}function Gl(e,t,i,n){var r=e.display,s=!1,u=Hn(e,function(T){F&&(r.scroller.draggable=!1),e.state.draggingText=!1,et(r.wrapper.ownerDocument,"mouseup",u),et(r.wrapper.ownerDocument,"mousemove",v),et(r.scroller,"dragstart",b),et(r.scroller,"drop",u),s||(R(T),n.addNew||qr(e.doc,i,null,null,n.extend),F&&!M||Y&&J==9?setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()},20):r.input.focus())}),v=function(T){s=s||Math.abs(t.clientX-T.clientX)+Math.abs(t.clientY-T.clientY)>=10},b=function(){return s=!0};F&&(r.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Le(r.wrapper.ownerDocument,"mouseup",u),Le(r.wrapper.ownerDocument,"mousemove",v),Le(r.scroller,"dragstart",b),Le(r.scroller,"drop",u),Ca(e),setTimeout(function(){return r.input.focus()},20)}function Cs(e,t,i){if(i=="char")return new un(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new un(Je(t.line,0),o(e.doc,Je(t.line+1,0)));var n=i(e,t);return new un(n.from,n.to)}function Vl(e,t,i,n){var r=e.display,s=e.doc;R(t);var u,v,b=s.sel,T=b.ranges;if(n.addNew&&!n.extend?(v=s.sel.contains(i),v>-1?u=T[v]:u=new un(i,i)):(u=s.sel.primary(),v=s.sel.primIndex),n.unit=="rectangle")n.addNew||(u=new un(i,i)),i=Hi(e,t,!0,!0),v=-1;else{var le=Cs(e,i,n.unit);n.extend?u=Io(u,le.anchor,le.head,n.extend):u=le}n.addNew?v==-1?(v=T.length,qn(s,xi(e,T.concat([u]),v),{scroll:!1,origin:"*mouse"})):T.length>1&&T[v].empty()&&n.unit=="char"&&!n.extend?(qn(s,xi(e,T.slice(0,v).concat(T.slice(v+1)),0),{scroll:!1,origin:"*mouse"}),b=s.sel):Fo(s,v,u,ne):(v=0,qn(s,new mi([u],0),ne),b=s.sel);var fe=i;function Ie(pt){if(ht(fe,pt)==0)return;if(fe=pt,n.unit=="rectangle"){for(var wt=[],Pt=e.options.tabSize,Mt=H(vt(s,i.line).text,i.ch,Pt),Vt=H(vt(s,pt.line).text,pt.ch,Pt),xn=Math.min(Mt,Vt),Kn=Math.max(Mt,Vt),Dn=Math.min(i.line,pt.line),fi=Math.min(e.lastLine(),Math.max(i.line,pt.line));Dn<=fi;Dn++){var si=vt(s,Dn).text,In=X(si,xn,Pt);xn==Kn?wt.push(new un(Je(Dn,In),Je(Dn,In))):si.length>In&&wt.push(new un(Je(Dn,In),Je(Dn,X(si,Kn,Pt))))}wt.length||wt.push(new un(i,i)),qn(s,xi(e,b.ranges.slice(0,v).concat(wt),v),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pt)}else{var li=u,Zn=Cs(e,pt,n.unit),Un=li.anchor,Fn;ht(Zn.anchor,Un)>0?(Fn=Zn.head,Un=qt(li.from(),Zn.anchor)):(Fn=Zn.anchor,Un=Jt(li.to(),Zn.head));var Rn=b.ranges.slice(0);Rn[v]=Xl(e,new un(o(s,Un),Fn)),qn(s,xi(e,Rn,v),ne)}}var Ne=r.wrapper.getBoundingClientRect(),Qe=0;function tt(pt){var wt=++Qe,Pt=Hi(e,pt,!0,n.unit=="rectangle");if(!Pt)return;if(ht(Pt,fe)!=0){e.curOp.focus=z(),Ie(Pt);var Mt=Xr(r,s);(Pt.line>=Mt.to||Pt.line<Mt.from)&&setTimeout(Hn(e,function(){Qe==wt&&tt(pt)}),150)}else{var Vt=pt.clientY<Ne.top?-20:pt.clientY>Ne.bottom?20:0;Vt&&setTimeout(Hn(e,function(){if(Qe!=wt)return;r.scroller.scrollTop+=Vt,tt(pt)}),50)}}function ot(pt){e.state.selectingText=!1,Qe=Infinity,pt&&(R(pt),r.input.focus()),et(r.wrapper.ownerDocument,"mousemove",ft),et(r.wrapper.ownerDocument,"mouseup",yt),s.history.lastSelOrigin=null}var ft=Hn(e,function(pt){pt.buttons===0||!Se(pt)?ot(pt):tt(pt)}),yt=Hn(e,ot);e.state.selectingText=yt,Le(r.wrapper.ownerDocument,"mousemove",ft),Le(r.wrapper.ownerDocument,"mouseup",yt)}function Xl(e,t){var i=t.anchor,n=t.head,r=vt(e.doc,i.line);if(ht(i,n)==0&&i.sticky==n.sticky)return t;var s=Ye(r);if(!s)return t;var u=Be(s,i.ch,i.sticky),v=s[u];if(v.from!=i.ch&&v.to!=i.ch)return t;var b=u+(v.from==i.ch==(v.level!=1)?0:1);if(b==0||b==s.length)return t;var T;if(n.line!=i.line)T=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var le=Be(s,n.ch,n.sticky),fe=le-u||(n.ch-i.ch)*(v.level==1?-1:1);le==b-1||le==b?T=fe<0:T=fe>0}var Ie=s[b+(T?-1:0)],Ne=T==(Ie.level==1),Qe=Ne?Ie.from:Ie.to,tt=Ne?"after":"before";return i.ch==Qe&&i.sticky==tt?t:new un(new Je(i.line,Qe,tt),n)}function xs(e,t,i,n){var r,s;if(t.touches)r=t.touches[0].clientX,s=t.touches[0].clientY;else try{r=t.clientX,s=t.clientY}catch(Ie){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&R(t);var u=e.display,v=u.lineDiv.getBoundingClientRect();if(s>v.bottom||!se(e,i))return ee(t);s-=v.top-u.viewOffset;for(var b=0;b<e.display.gutterSpecs.length;++b){var T=u.gutters.childNodes[b];if(T&&T.getBoundingClientRect().right>=r){var le=gn(e.doc,s),fe=e.display.gutterSpecs[b];return _e(e,i,e,le,fe.className,t),ee(t)}}}function Ko(e,t){return xs(e,t,"gutterClick",!0)}function Es(e,t){if(Ti(e.display,t)||$l(e,t))return;if(Ke(e,t,"contextmenu"))return;xe||e.display.input.onContextMenu(t)}function $l(e,t){return se(e,"gutterContextMenu")?xs(e,t,"gutterContextMenu",!1):!1}function ws(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yr(e)}var cr={toString:function(){return"CodeMirror.Init"}},Ss={},ao={};function Yl(e){var t=e.optionHandlers;function i(n,r,s,u){e.defaults[n]=r,s&&(t[n]=u?function(v,b,T){T!=cr&&s(v,b,T)}:s)}e.defineOption=i,e.Init=cr,i("value","",function(n,r){return n.setValue(r)},!0),i("mode",null,function(n,r){n.doc.modeOption=r,_o(n)},!0),i("indentUnit",2,_o,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(n){Tr(n),yr(n),oi(n)},!0),i("lineSeparator",null,function(n,r){if(n.doc.lineSep=r,!r)return;var s=[],u=n.doc.first;n.doc.iter(function(b){for(var T=0;;){var le=b.text.indexOf(r,T);if(le==-1)break;T=le+r.length,s.push(Je(u,le))}u++});for(var v=s.length-1;v>=0;v--)ar(n.doc,r,s[v],Je(s[v].line,s[v].ch+r.length))}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,r,s){n.state.specialChars=new RegExp(r.source+(r.test(" ")?"":"| "),"g"),s!=cr&&n.refresh()}),i("specialCharPlaceholder",an,function(n){return n.refresh()},!0),i("electricChars",!0),i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(n,r){return n.getInputField().spellcheck=r},!0),i("autocorrect",!1,function(n,r){return n.getInputField().autocorrect=r},!0),i("autocapitalize",!1,function(n,r){return n.getInputField().autocapitalize=r},!0),i("rtlMoveVisually",!de),i("wholeLineUpdateBefore",!0),i("theme","default",function(n){ws(n),kr(n)},!0),i("keyMap","default",function(n,r,s){var u=ro(r),v=s!=cr&&ro(s);v&&v.detach&&v.detach(n,u),u.attach&&u.attach(n,v||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Zl,!0),i("gutters",[],function(n,r){n.display.gutterSpecs=Ro(r,n.options.lineNumbers),kr(n)},!0),i("fixedGutter",!0,function(n,r){n.display.gutters.style.left=r?Eo(n.display)+"px":"0",n.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(n){return nr(n)},!0),i("scrollbarStyle","native",function(n){Ta(n),nr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),i("lineNumbers",!1,function(n,r){n.display.gutterSpecs=Ro(n.options.gutters,r),kr(n)},!0),i("firstLineNumber",1,kr,!0),i("lineNumberFormatter",function(n){return n},kr,!0),i("showCursorWhenSelecting",!1,br,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(n,r){r=="nocursor"&&(er(n),n.display.input.blur()),n.display.input.readOnlyChanged(r)}),i("screenReaderLabel",null,function(n,r){r=r===""?null:r,n.display.input.screenReaderLabelChanged(r)}),i("disableInput",!1,function(n,r){r||n.display.input.reset()},!0),i("dragDrop",!0,Jl),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,br,!0),i("singleCursorHeightPerLine",!0,br,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,Tr,!0),i("addModeClass",!1,Tr,!0),i("pollInterval",100),i("undoDepth",200,function(n,r){return n.doc.history.undoDepth=r}),i("historyEventDelay",1250),i("viewportMargin",10,function(n){return n.refresh()},!0),i("maxHighlightLength",1e4,Tr,!0),i("moveInputWithCursor",!0,function(n,r){r||n.display.input.resetPosition()}),i("tabindex",null,function(n,r){return n.display.input.getField().tabIndex=r||""}),i("autofocus",null),i("direction","ltr",function(n,r){return n.doc.setDirection(r)},!0),i("phrases",null)}function Jl(e,t,i){var n=i&&i!=cr;if(!t!=!n){var r=e.display.dragFunctions,s=t?Le:et;s(e.display.scroller,"dragstart",r.start),s(e.display.scroller,"dragenter",r.enter),s(e.display.scroller,"dragover",r.over),s(e.display.scroller,"dragleave",r.leave),s(e.display.scroller,"drop",r.drop)}}function Zl(e){e.options.lineWrapping?(te(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Q(e.display.wrapper,"CodeMirror-wrap"),Br(e)),wo(e),oi(e),yr(e),setTimeout(function(){return nr(e)},100)}function On(e,t){var i=this;if(!(this instanceof On))return new On(e,t);this.options=t=t?p(t):{},p(Ss,t,!1);var n=t.value;typeof n=="string"?n=new ai(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var r=new On.inputStyles[t.inputStyle](this),s=this.display=new cl(e,n,r,t);s.wrapper.CodeMirror=this,ws(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ta(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ae,keySeq:null,specialChars:null},t.autofocus&&!y&&s.input.focus(),Y&&J<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Ql(this),Ll(),Vi(this),this.curOp.forceUpdate=!0,ja(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&ko(i)},20):er(this);for(var u in ao)ao.hasOwnProperty(u)&&ao[u](this,t[u],cr);La(this),t.finishInit&&t.finishInit(this);for(var v=0;v<Go.length;++v)Go[v](this);Xi(this),F&&t.lineWrapping&&getComputedStyle(s.lineDiv).textRendering=="optimizelegibility"&&(s.lineDiv.style.textRendering="auto")}On.defaults=Ss,On.optionHandlers=ao;function Ql(e){var t=e.display;Le(t.scroller,"mousedown",Hn(e,bs)),Y&&J<11?Le(t.scroller,"dblclick",Hn(e,function(b){if(Ke(e,b))return;var T=Hi(e,b);if(!T||Ko(e,b)||Ti(e.display,b))return;R(b);var le=e.findWordAt(T);qr(e.doc,le.anchor,le.head)})):Le(t.scroller,"dblclick",function(b){return Ke(e,b)||R(b)}),Le(t.scroller,"contextmenu",function(b){return Es(e,b)}),Le(t.input.getField(),"contextmenu",function(b){t.scroller.contains(b.target)||Es(e,b)});var i,n={end:0};function r(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function s(b){if(b.touches.length!=1)return!1;var T=b.touches[0];return T.radiusX<=1&&T.radiusY<=1}function u(b,T){if(T.left==null)return!0;var le=T.left-b.left,fe=T.top-b.top;return le*le+fe*fe>20*20}Le(t.scroller,"touchstart",function(b){if(!Ke(e,b)&&!s(b)&&!Ko(e,b)){t.input.ensurePolled(),clearTimeout(i);var T=+new Date;t.activeTouch={start:T,moved:!1,prev:T-n.end<=300?n:null},b.touches.length==1&&(t.activeTouch.left=b.touches[0].pageX,t.activeTouch.top=b.touches[0].pageY)}}),Le(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Le(t.scroller,"touchend",function(b){var T=t.activeTouch;if(T&&!Ti(t,b)&&T.left!=null&&!T.moved&&new Date-T.start<300){var le=e.coordsChar(t.activeTouch,"page"),fe;!T.prev||u(T,T.prev)?fe=new un(le,le):!T.prev.prev||u(T,T.prev.prev)?fe=e.findWordAt(le):fe=new un(Je(le.line,0),o(e.doc,Je(le.line+1,0))),e.setSelection(fe.anchor,fe.head),e.focus(),R(b)}r()}),Le(t.scroller,"touchcancel",r),Le(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xr(e,t.scroller.scrollTop),Ki(e,t.scroller.scrollLeft,!0),_e(e,"scroll",e))}),Le(t.scroller,"mousewheel",function(b){return Ra(e,b)}),Le(t.scroller,"DOMMouseScroll",function(b){return Ra(e,b)}),Le(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(b){Ke(e,b)||ce(b)},over:function(b){Ke(e,b)||(Al(e,b),ce(b))},start:function(b){return Ol(e,b)},drop:Hn(e,Tl),leave:function(b){Ke(e,b)||as(e)}};var v=t.input.getField();Le(v,"keyup",function(b){return gs.call(e,b)}),Le(v,"keydown",Hn(e,vs)),Le(v,"keypress",Hn(e,ys)),Le(v,"focus",function(b){return ko(e,b)}),Le(v,"blur",function(b){return er(e,b)})}var Go=[];On.defineInitHook=function(e){return Go.push(e)};function Ur(e,t,i,n){var r=e.doc,s;i==null&&(i="add"),i=="smart"&&(r.mode.indent?s=rt(e,t).state:i="prev");var u=e.options.tabSize,v=vt(r,t),b=H(v.text,null,u);v.stateAfter&&(v.stateAfter=null);var T=v.text.match(/^\s*/)[0],le;if(!n&&!/\S/.test(v.text))le=0,i="not";else if(i=="smart"&&(le=r.mode.indent(s,v.text.slice(T.length),v.text),le==Re||le>150)){if(!n)return;i="prev"}i=="prev"?t>r.first?le=H(vt(r,t-1).text,null,u):le=0:i=="add"?le=b+e.options.indentUnit:i=="subtract"?le=b-e.options.indentUnit:typeof i=="number"&&(le=b+i),le=Math.max(0,le);var fe="",Ie=0;if(e.options.indentWithTabs)for(var Ne=Math.floor(le/u);Ne;--Ne)Ie+=u,fe+=" ";if(Ie<le&&(fe+=I(le-Ie)),fe!=T)return ar(r,fe,Je(t,0),Je(t,T.length),"+input"),v.stateAfter=null,!0;for(var Qe=0;Qe<r.sel.ranges.length;Qe++){var tt=r.sel.ranges[Qe];if(tt.head.line==t&&tt.head.ch<T.length){var ot=Je(t,T.length);Fo(r,Qe,new un(ot,ot));break}}}var Ei=null;function so(e){Ei=e}function Vo(e,t,i,n,r){var s=e.doc;e.display.shift=!1,n||(n=s.sel);var u=+new Date-200,v=r=="paste"||e.state.pasteIncoming>u,b=Ot(t),T=null;if(v&&n.ranges.length>1)if(Ei&&Ei.text.join(`
`)==t){if(n.ranges.length%Ei.text.length==0){T=[];for(var le=0;le<Ei.text.length;le++)T.push(s.splitLines(Ei.text[le]))}}else b.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(T=k(b,function(ft){return[ft]}));for(var fe=e.curOp.updateInput,Ie=n.ranges.length-1;Ie>=0;Ie--){var Ne=n.ranges[Ie],Qe=Ne.from(),tt=Ne.to();Ne.empty()&&(i&&i>0?Qe=Je(Qe.line,Qe.ch-i):e.state.overwrite&&!v?tt=Je(tt.line,Math.min(vt(s,tt.line).text.length,tt.ch+x(b).length)):v&&Ei&&Ei.lineWise&&Ei.text.join(`
`)==b.join(`
`)&&(Qe=tt=Je(Qe.line,0)));var ot={from:Qe,to:tt,text:T?T[Ie%T.length]:b,origin:r||(v?"paste":e.state.cutIncoming>u?"cut":"+input")};or(e.doc,ot),Jn(e,"inputRead",e,ot)}t&&!v&&Ts(e,t),tr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=fe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ks(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&hi(t,function(){return Vo(t,i,0,null,"paste")}),!0}function Ts(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var i=e.doc.sel,n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line)continue;var s=e.getModeAt(r.head),u=!1;if(s.electricChars){for(var v=0;v<s.electricChars.length;v++)if(t.indexOf(s.electricChars.charAt(v))>-1){u=Ur(e,r.head.line,"smart");break}}else s.electricInput&&(s.electricInput.test(vt(e.doc,r.head.line).text.slice(0,r.head.ch))&&(u=Ur(e,r.head.line,"smart")));u&&Jn(e,"electricInput",e,r.head.line)}}function Os(e){for(var t=[],i=[],n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line,s={anchor:Je(r,0),head:Je(r+1,0)};i.push(s),t.push(e.getRange(s.anchor,s.head))}return{text:t,ranges:i}}function As(e,t,i,n){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ls(){var e=j("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=j("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return F?e.style.width="1000px":e.setAttribute("wrap","off"),P&&(e.style.border="1px solid black"),As(e),t}function ql(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,r){var s=this.options,u=s[n];if(s[n]==r&&n!="mode")return;s[n]=r,t.hasOwnProperty(n)&&Hn(this,t[n])(this,r,u),_e(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,r){this.state.keyMaps[r?"push":"unshift"](ro(n))},removeKeyMap:function(n){for(var r=this.state.keyMaps,s=0;s<r.length;++s)if(r[s]==n||r[s].name==n)return r.splice(s,1),!0},addOverlay:ti(function(n,r){var s=n.token?n:e.getMode(this.options,n);if(s.startState)throw new Error("Overlays may not be stateful.");D(this.state.overlays,{mode:s,modeSpec:n,opaque:r&&r.opaque,priority:r&&r.priority||0},function(u){return u.priority}),this.state.modeGen++,oi(this)}),removeOverlay:ti(function(n){for(var r=this.state.overlays,s=0;s<r.length;++s){var u=r[s].modeSpec;if(u==n||typeof n=="string"&&u.name==n){r.splice(s,1),this.state.modeGen++,oi(this);return}}}),indentLine:ti(function(n,r,s){typeof r!="string"&&typeof r!="number"&&(r==null?r=this.options.smartIndent?"smart":"prev":r=r?"add":"subtract"),fn(this.doc,n)&&Ur(this,n,r,s)}),indentSelection:ti(function(n){for(var r=this.doc.sel.ranges,s=-1,u=0;u<r.length;u++){var v=r[u];if(v.empty())v.head.line>s&&(Ur(this,v.head.line,n,!0),s=v.head.line,u==this.doc.sel.primIndex&&tr(this));else{var b=v.from(),T=v.to(),le=Math.max(s,b.line);s=Math.min(this.lastLine(),T.line-(T.ch?0:1))+1;for(var fe=le;fe<s;++fe)Ur(this,fe,n);var Ie=this.doc.sel.ranges;b.ch==0&&r.length==Ie.length&&Ie[u].from().ch>0&&Fo(this.doc,u,new un(b,Ie[u].to()),Pe)}}}),getTokenAt:function(n,r){return Bt(this,n,r)},getLineTokens:function(n,r){return Bt(this,Je(n),r,!0)},getTokenTypeAt:function(n){n=o(this.doc,n);var r=Ze(this,vt(this.doc,n.line)),s=0,u=(r.length-1)/2,v=n.ch,b;if(v==0)b=r[2];else for(;;){var T=s+u>>1;if((T?r[T*2-1]:0)>=v)u=T;else if(r[T*2+1]<v)s=T+1;else{b=r[T*2+2];break}}var le=b?b.indexOf("overlay "):-1;return le<0?b:le==0?null:b.slice(0,le-1)},getModeAt:function(n){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(n).state).mode:r},getHelper:function(n,r){return this.getHelpers(n,r)[0]},getHelpers:function(n,r){var s=[];if(!i.hasOwnProperty(r))return s;var u=i[r],v=this.getModeAt(n);if(typeof v[r]=="string")u[v[r]]&&s.push(u[v[r]]);else if(v[r])for(var b=0;b<v[r].length;b++){var T=u[v[r][b]];T&&s.push(T)}else v.helperType&&u[v.helperType]?s.push(u[v.helperType]):u[v.name]&&s.push(u[v.name]);for(var le=0;le<u._global.length;le++){var fe=u._global[le];fe.pred(v,this)&&Te(s,fe.val)==-1&&s.push(fe.val)}return s},getStateAfter:function(n,r){var s=this.doc;return n=c(s,n==null?s.first+s.size-1:n),rt(this,n+1,r).state},cursorCoords:function(n,r){var s,u=this.doc.sel.primary();return n==null?s=u.head:typeof n=="object"?s=o(this.doc,n):s=n?u.from():u.to(),Ci(this,s,r||"page")},charCoords:function(n,r){return go(this,o(this.doc,n),r||"page")},coordsChar:function(n,r){return n=da(this,n,r||"page"),bo(this,n.left,n.top)},lineAtHeight:function(n,r){return n=da(this,{top:n,left:0},r||"page").top,gn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,r,s){var u=!1,v;if(typeof n=="number"){var b=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>b&&(n=b,u=!0),v=vt(this.doc,n)}else v=n;return zr(this,v,{top:0,left:0},r||"page",s||u).top+(u?this.doc.height-bi(v):0)},defaultTextHeight:function(){return Qi(this.display)},defaultCharWidth:function(){return qi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,r,s,u,v){var b=this.display;n=Ci(this,o(this.doc,n));var T=n.bottom,le=n.left;if(r.style.position="absolute",r.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(r),b.sizer.appendChild(r),u=="over")T=n.top;else if(u=="above"||u=="near"){var fe=Math.max(b.wrapper.clientHeight,this.doc.height),Ie=Math.max(b.sizer.clientWidth,b.lineSpace.clientWidth);(u=="above"||n.bottom+r.offsetHeight>fe)&&n.top>r.offsetHeight?T=n.top-r.offsetHeight:n.bottom+r.offsetHeight<=fe&&(T=n.bottom),le+r.offsetWidth>Ie&&(le=Ie-r.offsetWidth)}r.style.top=T+"px",r.style.left=r.style.right="",v=="right"?(le=b.sizer.clientWidth-r.offsetWidth,r.style.right="0px"):(v=="left"?le=0:v=="middle"&&(le=(b.sizer.clientWidth-r.offsetWidth)/2),r.style.left=le+"px"),s&&Js(this,{left:le,top:T,right:le+r.offsetWidth,bottom:T+r.offsetHeight})},triggerOnKeyDown:ti(vs),triggerOnKeyPress:ti(ys),triggerOnKeyUp:gs,triggerOnMouseDown:ti(bs),execCommand:function(n){if(Pr.hasOwnProperty(n))return Pr[n].call(null,this)},triggerElectric:ti(function(n){Ts(this,n)}),findPosH:function(n,r,s,u){var v=1;r<0&&(v=-1,r=-r);for(var b=o(this.doc,n),T=0;T<r&&!(b=Xo(this.doc,b,v,s,u),b.hitSide);++T);return b},moveH:ti(function(n,r){var s=this;this.extendSelectionsBy(function(u){return s.display.shift||s.doc.extend||u.empty()?Xo(s.doc,u.head,n,r,s.options.rtlMoveVisually):n<0?u.from():u.to()},_)}),deleteH:ti(function(n,r){var s=this.doc.sel,u=this.doc;s.somethingSelected()?u.replaceSelection("",null,"+delete"):ur(this,function(v){var b=Xo(u,v.head,n,r,!1);return n<0?{from:b,to:v.head}:{from:v.head,to:b}})}),findPosV:function(n,r,s,u){var v=1,b=u;r<0&&(v=-1,r=-r);for(var T=o(this.doc,n),le=0;le<r;++le){var fe=Ci(this,T,"div");if(b==null?b=fe.left:fe.left=b,T=Ds(this,fe,v,s),T.hitSide)break}return T},moveV:ti(function(n,r){var s=this,u=this.doc,v=[],b=!this.display.shift&&!u.extend&&u.sel.somethingSelected();if(u.extendSelectionsBy(function(le){if(b)return n<0?le.from():le.to();var fe=Ci(s,le.head,"div");le.goalColumn!=null&&(fe.left=le.goalColumn),v.push(fe.left);var Ie=Ds(s,fe,n,r);return r=="page"&&le==u.sel.primary()&&Oo(s,go(s,Ie,"div").top-fe.top),Ie},_),v.length)for(var T=0;T<u.sel.ranges.length;T++)u.sel.ranges[T].goalColumn=v[T]}),findWordAt:function(n){var r=this.doc,s=vt(r,n.line).text,u=n.ch,v=n.ch;if(s){var b=this.getHelper(n,"wordChars");(n.sticky=="before"||v==s.length)&&u?--u:++v;for(var T=s.charAt(u),le=be(T,b)?function(fe){return be(fe,b)}:/\s/.test(T)?function(fe){return/\s/.test(fe)}:function(fe){return!/\s/.test(fe)&&!be(fe)};u>0&&le(s.charAt(u-1));)--u;for(;v<s.length&&le(s.charAt(v));)++v}return new un(Je(n.line,u),Je(n.line,v))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?te(this.display.cursorDiv,"CodeMirror-overwrite"):Q(this.display.cursorDiv,"CodeMirror-overwrite"),_e(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ti(function(n,r){Cr(this,n,r)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-wi(this)-this.display.barHeight,width:n.scrollWidth-wi(this)-this.display.barWidth,clientHeight:po(this),clientWidth:Bi(this)}},scrollIntoView:ti(function(n,r){n==null?(n={from:this.doc.sel.primary().head,to:null},r==null&&(r=this.options.cursorScrollMargin)):typeof n=="number"?n={from:Je(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=r||0,n.from.line!=null?Zs(this,n):Ea(this,n.from,n.to,n.margin)}),setSize:ti(function(n,r){var s=this,u=function(b){return typeof b=="number"||/^\d+$/.test(String(b))?b+"px":b};n!=null&&(this.display.wrapper.style.width=u(n)),r!=null&&(this.display.wrapper.style.height=u(r)),this.options.lineWrapping&&la(this);var v=this.display.viewFrom;this.doc.iter(v,this.display.viewTo,function(b){if(b.widgets){for(var T=0;T<b.widgets.length;T++)if(b.widgets[T].noHScroll){Mi(s,v,"widget");break}}++v}),this.curOp.forceUpdate=!0,_e(this,"refresh",this)}),operation:function(n){return hi(this,n)},startOperation:function(){return Vi(this)},endOperation:function(){return Xi(this)},refresh:ti(function(){var n=this.display.cachedTextHeight;oi(this),this.curOp.forceUpdate=!0,yr(this),Cr(this,this.doc.scrollLeft,this.doc.scrollTop),Do(this.display),(n==null||Math.abs(n-Qi(this.display))>.5||this.options.lineWrapping)&&wo(this),_e(this,"refresh",this)}),swapDoc:ti(function(n){var r=this.doc;return r.cm=null,this.state.selectingText&&this.state.selectingText(),ja(this,n),yr(this),this.display.input.reset(),Cr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Jn(this,"swapDoc",this,r),r}),phrase:function(n){var r=this.options.phrases;return r&&Object.prototype.hasOwnProperty.call(r,n)?r[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ve(e),e.registerHelper=function(n,r,s){i.hasOwnProperty(n)||(i[n]=e[n]={_global:[]}),i[n][r]=s},e.registerGlobalHelper=function(n,r,s,u){e.registerHelper(n,r,u),i[n]._global.push({pred:s,val:u})}}function Xo(e,t,i,n,r){var s=t,u=i,v=vt(e,t.line),b=r&&e.direction=="rtl"?-i:i;function T(){var yt=t.line+b;return yt<e.first||yt>=e.first+e.size?!1:(t=new Je(yt,t.ch,t.sticky),v=vt(e,yt))}function le(yt){var pt;if(n=="codepoint"){var wt=v.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(wt)?pt=null:pt=new Je(t.line,Math.max(0,Math.min(v.text.length,t.ch+i*(wt>=55296&&wt<56320?2:1))),-i)}else r?pt=_l(e.cm,v,t,i):pt=Bo(v,t,i);if(pt==null)if(!yt&&T())t=Wo(r,e.cm,v,t.line,b);else return!1;else t=pt;return!0}if(n=="char"||n=="codepoint")le();else if(n=="column")le(!0);else if(n=="word"||n=="group")for(var fe=null,Ie=n=="group",Ne=e.cm&&e.cm.getHelper(t,"wordChars"),Qe=!0;!(i<0&&!le(!Qe));Qe=!1){var tt=v.text.charAt(t.ch)||`
`,ot=be(tt,Ne)?"w":Ie&&tt==`
`?"n":!Ie||/\s/.test(tt)?null:"p";if(Ie&&!Qe&&!ot&&(ot="s"),fe&&fe!=ot){i<0&&(i=1,le(),t.sticky="after");break}if(ot&&(fe=ot),i>0&&!le(!Qe))break}var ft=to(e,t,s,u,!0);return It(s,ft)&&(ft.hitSide=!0),ft}function Ds(e,t,i,n){var r=e.doc,s=t.left,u;if(n=="page"){var v=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),b=Math.max(v-.5*Qi(e.display),3);u=(i>0?t.bottom:t.top)+i*b}else n=="line"&&(u=i>0?t.bottom+3:t.top-3);for(var T;!(T=bo(e,s,u),!T.outside);){if(i<0?u<=0:u>=r.height){T.hitSide=!0;break}u+=i*5}return T}var mn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};mn.prototype.init=function(e){var t=this,i=this,n=i.cm,r=i.div=e.lineDiv;As(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function s(v){for(var b=v.target;b;b=b.parentNode){if(b==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(b.className))break}return!1}Le(r,"paste",function(v){if(!s(v)||Ke(n,v)||ks(v,n))return;J<=11&&setTimeout(Hn(n,function(){return t.updateFromDOM()}),20)}),Le(r,"compositionstart",function(v){t.composing={data:v.data,done:!1}}),Le(r,"compositionupdate",function(v){t.composing||(t.composing={data:v.data,done:!1})}),Le(r,"compositionend",function(v){t.composing&&(v.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Le(r,"touchstart",function(){return i.forceCompositionEnd()}),Le(r,"input",function(){t.composing||t.readFromDOMSoon()});function u(v){if(!s(v)||Ke(n,v))return;if(n.somethingSelected())so({lineWise:!1,text:n.getSelections()}),v.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var b=Os(n);so({lineWise:!0,text:b.text}),v.type=="cut"&&n.operation(function(){n.setSelections(b.ranges,0,Pe),n.replaceSelection("",null,"cut")})}else return;if(v.clipboardData){v.clipboardData.clearData();var T=Ei.text.join(`
`);if(v.clipboardData.setData("Text",T),v.clipboardData.getData("Text")==T){v.preventDefault();return}}var le=Ls(),fe=le.firstChild;n.display.lineSpace.insertBefore(le,n.display.lineSpace.firstChild),fe.value=Ei.text.join(`
`);var Ie=document.activeElement;V(fe),setTimeout(function(){n.display.lineSpace.removeChild(le),Ie.focus(),Ie==r&&i.showPrimarySelection()},50)}Le(r,"copy",u),Le(r,"cut",u)},mn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},mn.prototype.prepareSelection=function(){var e=ga(this.cm,!1);return e.focus=document.activeElement==this.div,e},mn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},mn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},mn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),n=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||r.line<t.display.viewFrom){e.removeAllRanges();return}var s=lo(t,e.anchorNode,e.anchorOffset),u=lo(t,e.focusNode,e.focusOffset);if(s&&!s.bad&&u&&!u.bad&&ht(qt(s,u),n)==0&&ht(Jt(s,u),r)==0)return;var v=t.display.view,b=n.line>=t.display.viewFrom&&Ms(t,n)||{node:v[0].measure.map[2],offset:0},T=r.line<t.display.viewTo&&Ms(t,r);if(!T){var le=v[v.length-1].measure,fe=le.maps?le.maps[le.maps.length-1]:le.map;T={node:fe[fe.length-1],offset:fe[fe.length-2]-fe[fe.length-3]}}if(!b||!T){e.removeAllRanges();return}var Ie=e.rangeCount&&e.getRangeAt(0),Ne;try{Ne=oe(b.node,b.offset,T.offset,T.node)}catch(Qe){}Ne&&(!Ee&&t.state.focused?(e.collapse(b.node,b.offset),Ne.collapsed||(e.removeAllRanges(),e.addRange(Ne))):(e.removeAllRanges(),e.addRange(Ne)),Ie&&e.anchorNode==null?e.addRange(Ie):Ee&&this.startGracePeriod()),this.rememberSelection()},mn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},mn.prototype.showMultipleSelections=function(e){Z(this.cm.display.cursorDiv,e.cursors),Z(this.cm.display.selectionDiv,e.selection)},mn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},mn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return K(this.div,t)},mn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},mn.prototype.blur=function(){this.div.blur()},mn.prototype.getField=function(){return this.div},mn.prototype.supportsTouch=function(){return!0},mn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},mn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},mn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(g&&C&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var i=lo(t,e.anchorNode,e.anchorOffset),n=lo(t,e.focusNode,e.focusOffset);i&&n&&hi(t,function(){qn(t.doc,Ni(i,n),Pe),(i.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},mn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),n=i.from(),r=i.to();if(n.ch==0&&n.line>e.firstLine()&&(n=Je(n.line-1,vt(e.doc,n.line-1).length)),r.ch==vt(e.doc,r.line).text.length&&r.line<e.lastLine()&&(r=Je(r.line+1,0)),n.line<t.viewFrom||r.line>t.viewTo-1)return!1;var s,u,v;n.line==t.viewFrom||(s=zi(e,n.line))==0?(u=jt(t.view[0].line),v=t.view[0].node):(u=jt(t.view[s].line),v=t.view[s-1].node.nextSibling);var b=zi(e,r.line),T,le;if(b==t.view.length-1?(T=t.viewTo-1,le=t.lineDiv.lastChild):(T=jt(t.view[b+1].line)-1,le=t.view[b+1].node.previousSibling),!v)return!1;for(var fe=e.doc.splitLines(tu(e,v,le,u,T)),Ie=ln(e.doc,Je(u,0),Je(T,vt(e.doc,T).text.length));fe.length>1&&Ie.length>1;)if(x(fe)==x(Ie))fe.pop(),Ie.pop(),T--;else if(fe[0]==Ie[0])fe.shift(),Ie.shift(),u++;else break;for(var Ne=0,Qe=0,tt=fe[0],ot=Ie[0],ft=Math.min(tt.length,ot.length);Ne<ft&&tt.charCodeAt(Ne)==ot.charCodeAt(Ne);)++Ne;for(var yt=x(fe),pt=x(Ie),wt=Math.min(yt.length-(fe.length==1?Ne:0),pt.length-(Ie.length==1?Ne:0));Qe<wt&&yt.charCodeAt(yt.length-Qe-1)==pt.charCodeAt(pt.length-Qe-1);)++Qe;if(fe.length==1&&Ie.length==1&&u==n.line)for(;Ne&&Ne>n.ch&&yt.charCodeAt(yt.length-Qe-1)==pt.charCodeAt(pt.length-Qe-1);)Ne--,Qe++;fe[fe.length-1]=yt.slice(0,yt.length-Qe).replace(/^\u200b+/,""),fe[0]=fe[0].slice(Ne).replace(/\u200b+$/,"");var Pt=Je(u,Ne),Mt=Je(T,Ie.length?x(Ie).length-Qe:0);if(fe.length>1||fe[0]||ht(Pt,Mt))return ar(e.doc,fe,Pt,Mt,"+input"),!0},mn.prototype.ensurePolled=function(){this.forceCompositionEnd()},mn.prototype.reset=function(){this.forceCompositionEnd()},mn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},mn.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},mn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&hi(this.cm,function(){return oi(e.cm)})},mn.prototype.setUneditable=function(e){e.contentEditable="false"},mn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Hn(this.cm,Vo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},mn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},mn.prototype.onContextMenu=function(){},mn.prototype.resetPosition=function(){},mn.prototype.needsContentAttribute=!0;function Ms(e,t){var i=mo(e,t.line);if(!i||i.hidden)return null;var n=vt(e.doc,t.line),r=ia(i,n,t.line),s=Ye(n,e.doc.direction),u="left";if(s){var v=Be(s,t.ch);u=v%2?"right":"left"}var b=aa(r.map,t.ch,u);return b.offset=b.collapse=="right"?b.end:b.start,b}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function dr(e,t){return t&&(e.bad=!0),e}function tu(e,t,i,n,r){var s="",u=!1,v=e.doc.lineSeparator(),b=!1;function T(Ne){return function(Qe){return Qe.id==Ne}}function le(){u&&(s+=v,b&&(s+=v),u=b=!1)}function fe(Ne){Ne&&(le(),s+=Ne)}function Ie(Ne){if(Ne.nodeType==1){var Qe=Ne.getAttribute("cm-text");if(Qe){fe(Qe);return}var tt=Ne.getAttribute("cm-marker"),ot;if(tt){var ft=e.findMarks(Je(n,0),Je(r+1,0),T(+tt));ft.length&&(ot=ft[0].find(0))&&fe(ln(e.doc,ot.from,ot.to).join(v));return}if(Ne.getAttribute("contenteditable")=="false")return;var yt=/^(pre|div|p|li|table|br)$/i.test(Ne.nodeName);if(!/^br$/i.test(Ne.nodeName)&&Ne.textContent.length==0)return;yt&&le();for(var pt=0;pt<Ne.childNodes.length;pt++)Ie(Ne.childNodes[pt]);/^(pre|p)$/i.test(Ne.nodeName)&&(b=!0),yt&&(u=!0)}else Ne.nodeType==3&&fe(Ne.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ie(t),t==i);)t=t.nextSibling,b=!1;return s}function lo(e,t,i){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[i],!n)return dr(e.clipPos(Je(e.display.viewTo-1)),!0);t=null,i=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var s=e.display.view[r];if(s.node==n)return nu(s,t,i)}}function nu(e,t,i){var n=e.text.firstChild,r=!1;if(!t||!K(n,t))return dr(Je(jt(e.line),0),!0);if(t==n&&(r=!0,t=n.childNodes[i],i=0,!t)){var s=e.rest?x(e.rest):e.line;return dr(Je(jt(s),s.text.length),r)}var u=t.nodeType==3?t:null,v=t;for(!u&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(u=t.firstChild,i&&(i=u.nodeValue.length));v.parentNode!=n;)v=v.parentNode;var b=e.measure,T=b.maps;function le(ot,ft,yt){for(var pt=-1;pt<(T?T.length:0);pt++)for(var wt=pt<0?b.map:T[pt],Pt=0;Pt<wt.length;Pt+=3){var Mt=wt[Pt+2];if(Mt==ot||Mt==ft){var Vt=jt(pt<0?e.line:e.rest[pt]),xn=wt[Pt]+yt;return(yt<0||Mt!=ot)&&(xn=wt[Pt+(yt?1:0)]),Je(Vt,xn)}}}var fe=le(u,v,i);if(fe)return dr(fe,r);for(var Ie=v.nextSibling,Ne=u?u.nodeValue.length-i:0;Ie;Ie=Ie.nextSibling){if(fe=le(Ie,Ie.firstChild,0),fe)return dr(Je(fe.line,fe.ch-Ne),r);Ne+=Ie.textContent.length}for(var Qe=v.previousSibling,tt=i;Qe;Qe=Qe.previousSibling){if(fe=le(Qe,Qe.firstChild,-1),fe)return dr(Je(fe.line,fe.ch+tt),r);tt+=Qe.textContent.length}}var Pn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ae,this.hasSelection=!1,this.composing=null};Pn.prototype.init=function(e){var t=this,i=this,n=this.cm;this.createField(e);var r=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),P&&(r.style.width="0px"),Le(r,"input",function(){Y&&J>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),Le(r,"paste",function(u){if(Ke(n,u)||ks(u,n))return;n.state.pasteIncoming=+new Date,i.fastPoll()});function s(u){if(Ke(n,u))return;if(n.somethingSelected())so({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var v=Os(n);so({lineWise:!0,text:v.text}),u.type=="cut"?n.setSelections(v.ranges,null,Pe):(i.prevInput="",r.value=v.text.join(`
`),V(r))}else return;u.type=="cut"&&(n.state.cutIncoming=+new Date)}Le(r,"cut",s),Le(r,"copy",s),Le(e.scroller,"paste",function(u){if(Ti(e,u)||Ke(n,u))return;if(!r.dispatchEvent){n.state.pasteIncoming=+new Date,i.focus();return}var v=new Event("paste");v.clipboardData=u.clipboardData,r.dispatchEvent(v)}),Le(e.lineSpace,"selectstart",function(u){Ti(e,u)||R(u)}),Le(r,"compositionstart",function(){var u=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:u,range:n.markText(u,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Le(r,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Pn.prototype.createField=function(e){this.wrapper=Ls(),this.textarea=this.wrapper.firstChild},Pn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Pn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,n=ga(e);if(e.options.moveInputWithCursor){var r=Ci(e,i.sel.primary().head,"div"),s=t.wrapper.getBoundingClientRect(),u=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+u.top-s.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+u.left-s.left))}return n},Pn.prototype.showSelection=function(e){var t=this.cm,i=t.display;Z(i.cursorDiv,e.cursors),Z(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Pn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&V(this.textarea),Y&&J>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",Y&&J>=9&&(this.hasSelection=null))},Pn.prototype.getField=function(){return this.textarea},Pn.prototype.supportsTouch=function(){return!1},Pn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!y||z()!=this.textarea))try{this.textarea.focus()}catch(e){}},Pn.prototype.blur=function(){this.textarea.blur()},Pn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Pn.prototype.receivedFocus=function(){this.slowPoll()},Pn.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Pn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},Pn.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||dt(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=i.value;if(r==n&&!t.somethingSelected())return!1;if(Y&&J>=9&&this.hasSelection===r||O&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var s=r.charCodeAt(0);if(s==8203&&!n&&(n="\u200B"),s==8666)return this.reset(),this.cm.execCommand("undo")}for(var u=0,v=Math.min(n.length,r.length);u<v&&n.charCodeAt(u)==r.charCodeAt(u);)++u;return hi(t,function(){Vo(t,r.slice(u),n.length-u,null,e.composing?"*compose":null),r.length>1e3||r.indexOf(`
`)>-1?i.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Pn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Pn.prototype.onKeyPress=function(){Y&&J>=9&&(this.hasSelection=null),this.fastPoll()},Pn.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var s=Hi(i,e),u=n.scroller.scrollTop;if(!s||E)return;var v=i.options.resetSelectionOnContextMenu;v&&i.doc.sel.contains(s)==-1&&Hn(i,qn)(i.doc,Ni(s),Pe);var b=r.style.cssText,T=t.wrapper.style.cssText,le=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",r.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-le.top-5)+"px; left: "+(e.clientX-le.left-5)+`px;
z-index: 1000; background: `+(Y?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var fe;F&&(fe=window.scrollY),n.input.focus(),F&&window.scrollTo(null,fe),n.input.reset(),i.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=Ne,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll);function Ie(){if(r.selectionStart!=null){var tt=i.somethingSelected(),ot="\u200B"+(tt?r.value:"");r.value="\u21DA",r.value=ot,t.prevInput=tt?"":"\u200B",r.selectionStart=1,r.selectionEnd=ot.length,n.selForContextMenu=i.doc.sel}}function Ne(){if(t.contextMenuPending!=Ne)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=T,r.style.cssText=b,Y&&J<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),r.selectionStart!=null){(!Y||Y&&J<9)&&Ie();var tt=0,ot=function(){n.selForContextMenu==i.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="\u200B"?Hn(i,Ya)(i):tt++<10?n.detectingSelectAll=setTimeout(ot,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ot,200)}}if(Y&&J>=9&&Ie(),xe){ce(e);var Qe=function(){et(window,"mouseup",Qe),setTimeout(Ne,20)};Le(window,"mouseup",Qe)}else setTimeout(Ne,50)},Pn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Pn.prototype.setUneditable=function(){},Pn.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?p(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=z();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=v.getValue()}var r;if(e.form&&(Le(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var s=e.form;r=s.submit;try{var u=s.submit=function(){n(),s.submit=r,s.submit(),s.submit=u}}catch(b){}}t.finishInit=function(b){b.save=n,b.getTextArea=function(){return e},b.toTextArea=function(){b.toTextArea=isNaN,n(),e.parentNode.removeChild(b.getWrapperElement()),e.style.display="",e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=r))}},e.style.display="none";var v=On(function(b){return e.parentNode.insertBefore(b,e.nextSibling)},t);return v}function ru(e){e.off=et,e.on=Le,e.wheelEventPixels=dl,e.Doc=ai,e.splitLines=Ot,e.countColumn=H,e.findColumn=X,e.isWordChar=ie,e.Pass=Re,e.signal=_e,e.Line=Ui,e.changeEnd=_i,e.scrollbarModel=ka,e.Pos=Je,e.cmpPos=ht,e.modes=kt,e.mimeModes=Lt,e.resolveMode=bt,e.getMode=Et,e.modeExtensions=it,e.extendMode=xt,e.copyState=Wt,e.startState=Xt,e.innerMode=Ut,e.commands=Pr,e.keyMap=Oi,e.keyName=ds,e.isModifierKey=us,e.lookupKey=lr,e.normalizeKeyMap=Nl,e.StringStream=_t,e.SharedTextMarker=Rr,e.TextMarker=ji,e.LineWidget=Mr,e.e_preventDefault=R,e.e_stopPropagation=U,e.e_stop=ce,e.addClass=te,e.contains=K,e.rmClass=Q,e.keyNames=Ii}Yl(On),ql(On);var ou="iter insert remove copy getEditor constructor".split(" ");for(var uo in ai.prototype)ai.prototype.hasOwnProperty(uo)&&Te(ou,uo)<0&&(On.prototype[uo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ai.prototype[uo]));return ve(ai),On.inputStyles={textarea:Pn,contenteditable:mn},On.defineMode=function(e){!On.defaults.mode&&e!="null"&&(On.defaults.mode=e),zt.apply(this,arguments)},On.defineMIME=rn,On.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),On.defineMIME("text/plain","null"),On.defineExtension=function(e,t){On.prototype[e]=t},On.defineDocExtension=function(e,t){ai.prototype[e]=t},On.fromTextArea=iu,ru(On),On.version="5.58.2",On})},WaYH:function(mt,Ce,h){"use strict";var q=h("rePB"),ke=h("Ff2n"),Ee=h("VTBJ"),De=h("1OyB"),ge=h("vuIU"),ue=h("JX7q"),Y=h("Ji7U"),J=h("LK+K"),F=h("q1tI"),B=h("TSYQ"),C=h.n(B),E=h("sboe"),M=h("OZM5"),S=function(xe){var ye=xe.prefixCls,Q=xe.level,we=xe.isStart,Z=xe.isEnd;if(!Q)return null;for(var j="".concat(ye,"-indent-unit"),Ae=[],oe=0;oe<Q;oe+=1){var K;Ae.push(F.createElement("span",{key:oe,className:C()(j,(K={},Object(q.a)(K,"".concat(j,"-start"),we[oe+1]),Object(q.a)(K,"".concat(j,"-end"),Z[oe+1]),Object(q.a)(K,"".concat(j,"-end-first-level"),!oe&&Z[0]),K))}))}return F.createElement("span",{"aria-hidden":"true",className:"".concat(ye,"-indent")},Ae)},w=S,P=h("815F"),g="open",y="close",O="---",W=function(re){Object(Y.a)(ye,re);var xe=Object(J.a)(ye);function ye(){var Q;return Object(De.a)(this,ye),Q=xe.apply(this,arguments),Q.state={dragNodeHighlight:!1},Q.onSelectorClick=function(we){var Z=Q.props.context.onNodeClick;Z(we,Object(P.b)(Q.props)),Q.isSelectable()?Q.onSelect(we):Q.onCheck(we)},Q.onSelectorDoubleClick=function(we){var Z=Q.props.context.onNodeDoubleClick;Z(we,Object(P.b)(Q.props))},Q.onSelect=function(we){if(Q.isDisabled())return;var Z=Q.props.context.onNodeSelect;we.preventDefault(),Z(we,Object(P.b)(Q.props))},Q.onCheck=function(we){if(Q.isDisabled())return;var Z=Q.props,j=Z.disableCheckbox,Ae=Z.checked,oe=Q.props.context.onNodeCheck;if(!Q.isCheckable()||j)return;we.preventDefault();var K=!Ae;oe(we,Object(P.b)(Q.props),K)},Q.onMouseEnter=function(we){var Z=Q.props.context.onNodeMouseEnter;Z(we,Object(P.b)(Q.props))},Q.onMouseLeave=function(we){var Z=Q.props.context.onNodeMouseLeave;Z(we,Object(P.b)(Q.props))},Q.onContextMenu=function(we){var Z=Q.props.context.onNodeContextMenu;Z(we,Object(P.b)(Q.props))},Q.onDragStart=function(we){var Z=Q.props.context.onNodeDragStart;we.stopPropagation(),Q.setState({dragNodeHighlight:!0}),Z(we,Object(ue.a)(Q));try{we.dataTransfer.setData("text/plain","")}catch(j){}},Q.onDragEnter=function(we){var Z=Q.props.context.onNodeDragEnter;we.preventDefault(),we.stopPropagation(),Z(we,Object(ue.a)(Q))},Q.onDragOver=function(we){var Z=Q.props.context.onNodeDragOver;we.preventDefault(),we.stopPropagation(),Z(we,Object(ue.a)(Q))},Q.onDragLeave=function(we){var Z=Q.props.context.onNodeDragLeave;we.stopPropagation(),Z(we,Object(ue.a)(Q))},Q.onDragEnd=function(we){var Z=Q.props.context.onNodeDragEnd;we.stopPropagation(),Q.setState({dragNodeHighlight:!1}),Z(we,Object(ue.a)(Q))},Q.onDrop=function(we){var Z=Q.props.context.onNodeDrop;we.preventDefault(),we.stopPropagation(),Q.setState({dragNodeHighlight:!1}),Z(we,Object(ue.a)(Q))},Q.onExpand=function(we){var Z=Q.props.context.onNodeExpand;Z(we,Object(P.b)(Q.props))},Q.setSelectHandle=function(we){Q.selectHandle=we},Q.getNodeState=function(){var we=Q.props.expanded;return Q.isLeaf()?null:we?g:y},Q.hasChildren=function(){var we=Q.props.eventKey,Z=Q.props.context.keyEntities,j=Z[we]||{},Ae=j.children;return!!(Ae||[]).length},Q.isLeaf=function(){var we=Q.props,Z=we.isLeaf,j=we.loaded,Ae=Q.props.context.loadData,oe=Q.hasChildren();return Z===!1?!1:Z||!Ae&&!oe||Ae&&j&&!oe},Q.isDisabled=function(){var we=Q.props.disabled,Z=Q.props.context.disabled;return!!(Z||we)},Q.isCheckable=function(){var we=Q.props.checkable,Z=Q.props.context.checkable;return!Z||we===!1?!1:Z},Q.syncLoadData=function(we){var Z=we.expanded,j=we.loading,Ae=we.loaded,oe=Q.props.context,K=oe.loadData,z=oe.onNodeLoad;if(j)return;K&&Z&&!Q.isLeaf()&&(!Q.hasChildren()&&!Ae&&z(Object(P.b)(Q.props)))},Q.renderSwitcher=function(){var we=Q.props,Z=we.expanded,j=we.switcherIcon,Ae=Q.props.context,oe=Ae.prefixCls,K=Ae.switcherIcon,z=j||K;if(Q.isLeaf())return F.createElement("span",{className:C()("".concat(oe,"-switcher"),"".concat(oe,"-switcher-noop"))},typeof z=="function"?z(Object(Ee.a)(Object(Ee.a)({},Q.props),{},{isLeaf:!0})):z);var te=C()("".concat(oe,"-switcher"),"".concat(oe,"-switcher_").concat(Z?g:y));return F.createElement("span",{onClick:Q.onExpand,className:te},typeof z=="function"?z(Object(Ee.a)(Object(Ee.a)({},Q.props),{},{isLeaf:!1})):z)},Q.renderCheckbox=function(){var we=Q.props,Z=we.checked,j=we.halfChecked,Ae=we.disableCheckbox,oe=Q.props.context.prefixCls,K=Q.isDisabled(),z=Q.isCheckable();if(!z)return null;var te=typeof z!="boolean"?z:null;return F.createElement("span",{className:C()("".concat(oe,"-checkbox"),Z&&"".concat(oe,"-checkbox-checked"),!Z&&j&&"".concat(oe,"-checkbox-indeterminate"),(K||Ae)&&"".concat(oe,"-checkbox-disabled")),onClick:Q.onCheck},te)},Q.renderIcon=function(){var we=Q.props.loading,Z=Q.props.context.prefixCls;return F.createElement("span",{className:C()("".concat(Z,"-iconEle"),"".concat(Z,"-icon__").concat(Q.getNodeState()||"docu"),we&&"".concat(Z,"-icon_loading"))})},Q.renderSelector=function(){var we=Q.state.dragNodeHighlight,Z=Q.props,j=Z.title,Ae=Z.selected,oe=Z.icon,K=Z.loading,z=Z.data,te=Q.props.context,G=te.prefixCls,V=te.showIcon,m=te.icon,p=te.draggable,H=te.loadData,ae=te.titleRender,Te=Q.isDisabled(),We="".concat(G,"-node-content-wrapper"),Re;if(V){var Pe=oe||m;Re=Pe?F.createElement("span",{className:C()("".concat(G,"-iconEle"),"".concat(G,"-icon__customize"))},typeof Pe=="function"?Pe(Q.props):Pe):Q.renderIcon()}else H&&K&&(Re=Q.renderIcon());var ne;typeof j=="function"?ne=j(z):ae?ne=ae(z):ne=j;var _=F.createElement("span",{className:"".concat(G,"-title")},ne);return F.createElement("span",{ref:Q.setSelectHandle,title:typeof j=="string"?j:"",className:C()("".concat(We),"".concat(We,"-").concat(Q.getNodeState()||"normal"),!Te&&(Ae||we)&&"".concat(G,"-node-selected"),!Te&&p&&"draggable"),draggable:!Te&&p||void 0,"aria-grabbed":!Te&&p||void 0,onMouseEnter:Q.onMouseEnter,onMouseLeave:Q.onMouseLeave,onContextMenu:Q.onContextMenu,onClick:Q.onSelectorClick,onDoubleClick:Q.onSelectorDoubleClick,onDragStart:p?Q.onDragStart:void 0},Re,_)},Q}return Object(ge.a)(ye,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var we=this.props.selectable,Z=this.props.context.selectable;return typeof we=="boolean"?we:Z}},{key:"render",value:function(){var we,Z=this.props,j=Z.eventKey,Ae=Z.className,oe=Z.style,K=Z.dragOver,z=Z.dragOverGapTop,te=Z.dragOverGapBottom,G=Z.isLeaf,V=Z.isStart,m=Z.isEnd,p=Z.expanded,H=Z.selected,ae=Z.checked,Te=Z.halfChecked,We=Z.loading,Re=Z.domRef,Pe=Z.active,ne=Z.onMouseMove,_=Object(ke.a)(Z,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),X=this.props.context,N=X.prefixCls,I=X.filterTreeNode,x=X.draggable,k=X.keyEntities,D=this.isDisabled(),$=Object(M.f)(_),L=k[j]||{},A=L.level,ie=m[m.length-1];return F.createElement("div",Object.assign({ref:Re,className:C()(Ae,"".concat(N,"-treenode"),(we={},Object(q.a)(we,"".concat(N,"-treenode-disabled"),D),Object(q.a)(we,"".concat(N,"-treenode-switcher-").concat(p?"open":"close"),!G),Object(q.a)(we,"".concat(N,"-treenode-checkbox-checked"),ae),Object(q.a)(we,"".concat(N,"-treenode-checkbox-indeterminate"),Te),Object(q.a)(we,"".concat(N,"-treenode-selected"),H),Object(q.a)(we,"".concat(N,"-treenode-loading"),We),Object(q.a)(we,"".concat(N,"-treenode-active"),Pe),Object(q.a)(we,"".concat(N,"-treenode-leaf-last"),ie),Object(q.a)(we,"drag-over",!D&&K),Object(q.a)(we,"drag-over-gap-top",!D&&z),Object(q.a)(we,"drag-over-gap-bottom",!D&&te),Object(q.a)(we,"filter-node",I&&I(Object(P.b)(this.props))),we)),style:oe,onDragEnter:x?this.onDragEnter:void 0,onDragOver:x?this.onDragOver:void 0,onDragLeave:x?this.onDragLeave:void 0,onDrop:x?this.onDrop:void 0,onDragEnd:x?this.onDragEnd:void 0,onMouseMove:ne},$),F.createElement(w,{prefixCls:N,level:A,isStart:V,isEnd:m}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),ye}(F.Component),de=function(xe){return F.createElement(E.a.Consumer,null,function(ye){return F.createElement(W,Object.assign({},xe,{context:ye}))})};de.displayName="TreeNode",de.defaultProps={title:O},de.isTreeNode=1;var pe=Ce.a=de},X8EC:function(mt,Ce,h){"use strict";h.r(Ce);var q=h("DZo9"),ke=h("8z0m"),Ee=h("+L6B"),De=h("2/Rp"),ge=h("oBTY"),ue=h("sRBo"),Y=h("kaz8"),J=h("7Kak"),F=h("9yH6"),B=h("BoS7"),C=h("Sdc0"),E=h("14J3"),M=h("BMrR"),S=h("jCWc"),w=h("kPKH"),P=h("O3gP"),g=h("lrIw"),y=h("k1fw"),O=h("miYZ"),W=h("tsqr"),de=h("9og8"),pe=h("y8nQ"),re=h("Vl3Y"),xe=h("tJVT"),ye=h("PpiC"),Q=h("nRaC"),we=h("5RzL"),Z=h("5NDa"),j=h("5rEg"),Ae=h("WmNS"),oe=h.n(Ae),K=h("q1tI"),z=h.n(K),te=h("9kvl"),G=h("Ot1p"),V=h("hxT0"),m=h.n(V),p=h("1vsH"),H=h("m3rI"),ae=h("ErOA"),Te=h("jrin"),We=h("R9oj"),Re=h("ECub"),Pe=h("YNHc"),ne=h.n(Pe),_=h("4i/N"),X=h("UESt"),N=Object(K.createRef)(),I=function(et){var _e=et.dataSource,Ke=et.placeholder,me=et.defaultValue,se=et.onChange,ve=Object(K.useState)(!1),R=Object(xe.a)(ve,2),U=R[0],ee=R[1],ce=Object(K.useState)({data:[],objData:{},ids:[]}),je=Object(xe.a)(ce,2),Se=je[0],qe=je[1],at=Object(K.useState)({}),st=Object(xe.a)(at,2),lt=st[0],St=st[1];Object(K.useEffect)(function(){window.addEventListener("click",function(){ee(!1),St({})})},[]),Object(K.useEffect)(function(){if(me){var At={},kt=[];me.forEach(function(Lt){var zt=Lt.sub_discipline,rn=Object(ye.a)(Lt,["sub_discipline"]);zt&&(At[zt.id]=Object(y.a)(Object(y.a)({},rn),{},{sub_disciplines:[zt]}),kt.push(zt.id))}),qe({ids:kt,data:Object.values(At),objData:At}),se(kt)}},[me]);var Ot=function(){return z.a.createElement("div",{className:ne.a.emptyWrap},z.a.createElement(Re.a,{image:Re.a.PRESENTED_IMAGE_SIMPLE}))},dt=function(kt){if(Se.ids.includes(kt.id))return!1;var Lt=lt.sub_disciplines,zt=Object(ye.a)(lt,["sub_disciplines"]),rn=Object(y.a)(Object(y.a)({},Se.objData),{},Object(Te.a)({},kt.id,Object(y.a)(Object(y.a)({},zt),{},{sub_disciplines:[kt]})));qe({ids:[].concat(Object(ge.a)(Se.ids),[kt.id]),data:Object.values(rn),objData:rn}),se([].concat(Object(ge.a)(Se.ids),[kt.id]))},Ht=function(kt){var Lt=Se.objData;delete Lt[kt];var zt=Se.ids.filter(function(rn){return rn!==kt});qe({data:Object.values(Lt),objData:Lt,ids:zt}),se(zt)},Nt=45;return N&&N.current&&N.current.clientHeight>45&&(Nt=N.current.clientHeight+5),z.a.createElement("div",{className:ne.a.cascaderContainer,onClick:function(kt){kt.stopPropagation()}},z.a.createElement("div",{ref:N,className:ne.a.valueWrap,onClick:function(){return ee(!U)}},Se.data.length===0&&z.a.createElement("span",{className:ne.a.placeholder},Ke||"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B"),Se.data.map(function(At){return z.a.createElement("div",{className:ne.a.valueItem,key:At.id},z.a.createElement("span",null,At.name),z.a.createElement("span",null,"/"),z.a.createElement("span",null,At.sub_disciplines[0].name),z.a.createElement("span",{onClick:function(Lt){Lt.stopPropagation(),Lt.preventDefault(),Ht(At.sub_disciplines[0].id)}},z.a.createElement(_.a,null)))})),U&&z.a.createElement("div",{className:ne.a.modalWrap,style:{top:Nt}},z.a.createElement("div",{className:ne.a.left},_e.length===0&&Ot(),_e.length>0&&_e.map(function(At){return z.a.createElement("div",{key:At.id,onClick:function(){return St(At)}},z.a.createElement("span",null,At.name),z.a.createElement("span",null,z.a.createElement(X.a,null)))})),lt.sub_disciplines&&z.a.createElement("div",{className:ne.a.right},lt.sub_disciplines.length===0&&Ot(),lt.sub_disciplines.length>0&&lt.sub_disciplines.map(function(At){var kt=Se.ids.includes(At.id);return z.a.createElement("div",{key:At.id,className:kt?ne.a.disabled:"",onClick:function(){return dt(At)}},At.name)}))))},x=I,k=h("2qtc"),D=h("kLXV"),$=h("6UJt"),L=h("DFOY"),A=h("wd/R"),ie=h.n(A),be=h("jO45"),Me=h("jN4g"),Ue=h("gJ3r"),ze=h("8pgt"),He=h.n(ze),nt=function(et,_e){return _e.some(function(Ke){return Ke.label.toLowerCase().indexOf(et.toLowerCase())>-1})},Oe=j.a.TextArea,Fe=function(et){var _e=et.newCourse,Ke=et.globalSetting,me=et.loading,se=et.dispatch,ve=et.schoolName,R=et.onSuccess,U=R===void 0?function(){}:R,ee=Object(ye.a)(et,["newCourse","globalSetting","loading","dispatch","schoolName","onSuccess"]),ce=re.a.useForm(),je=Object(xe.a)(ce,1),Se=je[0];Object(K.useEffect)(function(){Se.setFieldsValue({name:ve})},[ve]);var qe=function(){var at=Object(de.a)(oe.a.mark(function st(lt){var St,Ot,dt,Ht,Nt,At,kt;return oe.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return St=lt||{},Ot=St.name,dt=St.city,Ht=dt===void 0?[]:dt,Nt=St.address,At=St.remarks,zt.next=3,se({type:"newCourse/appplySchool",payload:{name:Ot,province:Ht[0],city:Ht[1],address:Nt,remarks:At}});case 3:kt=zt.sent,se({type:"newCourse/setActionTabs",payload:{}}),kt&&(W.b.success("\u65B0\u589E\u53D1\u5E03\u5355\u4F4D\u6210\u529F\uFF01"),U(Ot));case 6:case"end":return zt.stop()}},st)}));return function(lt){return at.apply(this,arguments)}}();return z.a.createElement(D.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:_e.actionTabs.key==="NewCourse-AppplySchool",title:"\u7533\u8BF7\u53D1\u5E03\u5355\u4F4D",width:"600px",footer:null},z.a.createElement(re.a,{className:He.a.formWrap,form:Se,labelCol:{span:4},wrapperCol:{span:20},onFinish:qe},z.a.createElement(re.a.Item,{label:"\u53D1\u5E03\u5355\u4F4D\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},z.a.createElement(j.a,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"})),z.a.createElement("div",{className:"".concat(He.a.flexRow," ").concat(He.a.example)},z.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),z.a.createElement("div",{className:He.a.flexColumn},z.a.createElement("div",null,z.a.createElement(be.a,{style:{color:"rgb(82, 196, 26)"}}),z.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),z.a.createElement("div",null,z.a.createElement(Me.a,{style:{color:"red"}}),z.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784",ie()().format("YYYY"),"\u6625")))),z.a.createElement(re.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},z.a.createElement(L.a,{allowClear:!0,size:"large",options:Ue.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:nt}})),z.a.createElement(re.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},z.a.createElement(j.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),z.a.createElement(re.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},z.a.createElement(Oe,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),z.a.createElement("div",{className:He.a.footerWrap},z.a.createElement(re.a.Item,null,z.a.createElement(De.a,{className:"mr5",size:"large",onClick:function(){se({type:"newCourse/setActionTabs",payload:{}})}},"\u53D6\u6D88"),z.a.createElement(De.a,{size:"large",type:"primary",htmlType:"submit",loading:me["newCourse/appplySchool"]},"\u4FDD\u5B58")))))},Be=Object(te.a)(function(Ve){var et=Ve.newCourse,_e=Ve.loading,Ke=Ve.globalSetting;return{newCourse:et,globalSetting:Ke,loading:_e.effects}})(Fe),Ge=j.a.TextArea,Ye=we.a.TreeNode,Xe=function(et){var _e,Ke,me=et.user,se=et.newCourse,ve=et.globalSetting,R=et.loading,U=et.dispatch,ee=Object(ye.a)(et,["user","newCourse","globalSetting","loading","dispatch"]),ce=re.a.useForm(),je=Object(xe.a)(ce,1),Se=je[0],qe=Object(K.useState)({}),at=Object(xe.a)(qe,2),st=at[0],lt=at[1],St=Object(K.useState)(),Ot=Object(xe.a)(St,2),dt=Ot[0],Ht=Ot[1],Nt=Object(K.useRef)(),At=Object(K.useState)(!0),kt=Object(xe.a)(At,2),Lt=kt[0],zt=kt[1],rn=Object(K.useState)(!1),bt=Object(xe.a)(rn,2),Et=bt[0],it=bt[1],xt=Object(K.useState)(),Wt=Object(xe.a)(xt,2),Ut=Wt[0],Xt=Wt[1],_t=Object(K.useState)(!0),vt=Object(xe.a)(_t,2),ln=vt[0],An=vt[1],En=Object(K.useState)(!1),jt=Object(xe.a)(En,2),gn=jt[0],fn=jt[1],Vn=Object(K.useState)(!1),Je=Object(xe.a)(Vn,2),ht=Je[0],It=Je[1],Kt=Object(K.useState)(-1),Jt=Object(xe.a)(Kt,2),qt=Jt[0],c=Jt[1],o=Object(K.useState)(!0),a=Object(xe.a)(o,2),l=a[0],f=a[1],d=Object(K.useState)([]),he=Object(xe.a)(d,2),Ze=he[0],rt=he[1],ut=Object(K.useState)([]),$e=Object(xe.a)(ut,2),Ct=$e[0],gt=$e[1],Bt=Object(K.useState)([]),yn=Object(xe.a)(Bt,2),cn=yn[0],on=yn[1],kn=Object(K.useState)([]),Xn=Object(xe.a)(kn,2),wn=Xn[0],en=Xn[1];Object(K.useEffect)(function(){var tn,Tt;bn(),Qn(),Nt.current=(tn=ee.match.params)===null||tn===void 0?void 0:tn.pathId,Ht(!!Nt.current),Object(p.T)(ve==null||((Tt=ve.setting)===null||Tt===void 0)?void 0:Tt.name),Se.setFieldsValue({learning_notes_title:"\u8BFE\u7A0B\u987B\u77E5"}),Nt.current&&Sn()},[]);var bn=function(){var tn=Object(de.a)(oe.a.mark(function Tt(){var ct;return oe.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(ae.a)("/api/disciplines.json",{method:"get",params:{source:"subject"}});case 2:ct=dn.sent,on(ct.disciplines);case 4:case"end":return dn.stop()}},Tt)}));return function(){return tn.apply(this,arguments)}}(),Qn=function(){var tn=Object(de.a)(oe.a.mark(function Tt(){var ct;return oe.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return f(!0),dn.next=3,U({type:"newCourse/getSchoolOption"});case 3:ct=dn.sent,f(!1),rt(ct==null?void 0:ct.schools),gt(ct==null?void 0:ct.schools);case 7:case"end":return dn.stop()}},Tt)}));return function(){return tn.apply(this,arguments)}}(),Sn=function(){var tn=Object(de.a)(oe.a.mark(function Tt(){var ct,Nn,dn,$n,pn,$t,Ln,Gt,Cn,Zt,Yn,vn,Mn;return oe.a.wrap(function(ii){for(;;)switch(ii.prev=ii.next){case 0:return ii.next=2,U({type:"newCourse/getEditCourseData",payload:{id:Nt.current}});case 2:ct=ii.sent,ct&&(Ln={name:ct.name,name_en:ct.name_en,intro:ct.description,content:ct==null||((Nn=ct.toast)===null||Nn===void 0)?void 0:Nn.content,notice:ct.learning_notes,school_id:ct==null?void 0:ct.school,learning_notes_title:ct.learning_notes_title||"\u8BFE\u7A0B\u987B\u77E5"},ct.disciplines&&ct.disciplines.length>0&&en(ct.disciplines),Se.setFieldsValue(Ln),It(ct==null||((dn=ct.toast)===null||dn===void 0)?void 0:dn.is_open),c(ct==null||(($n=ct.toast)===null||$n===void 0)?void 0:$n.open_num),zt(ct==null?void 0:ct.cust_seq),it(ct==null?void 0:ct.show_spoc),fn(ct==null?void 0:ct.show_history),An(ct==null?void 0:ct.show_tag),(ct==null||((pn=ct.attachments)===null||pn===void 0)?void 0:pn.length)>0&&Xt([{uid:ct==null||((Gt=ct.attachments)===null||Gt===void 0||((Cn=Gt[0])===null||Cn===void 0))?void 0:Cn.id,name:ct==null||((Zt=ct.attachments)===null||Zt===void 0||((Yn=Zt[0])===null||Yn===void 0))?void 0:Yn.title,response:{id:ct==null||((vn=ct.attachments)===null||vn===void 0||((Mn=vn[0])===null||Mn===void 0))?void 0:Mn.id}}]),lt({name:ct.name,intro:ct.description,notice:ct.learning_notes,content:ct==null||(($t=ct.toast)===null||$t===void 0)?void 0:$t.content}));case 4:case"end":return ii.stop()}},Tt)}));return function(){return tn.apply(this,arguments)}}(),ci=function(){var tn=Object(de.a)(oe.a.mark(function Tt(ct){var Nn,dn,$n,pn,$t,Ln,Gt,Cn,Zt,Yn,vn,Mn,yi,ii,di;return oe.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if($n=ct||{},pn=$n.name,$t=$n.intro,Ln=$n.notice,Gt=$n.name_en,Cn=$n.learning_notes_title,Zt=$n.sub_discipline_ids,Yn=$n.school_id,vn=dt?"newCourse/editCourse":"newCourse/submitCourse",Mn=!1,yi=null,Ze.map(function(Li){Yn===Li.name&&(Mn=!0,yi=Li.id)}),Mn){_n.next=7;break}return _n.abrupt("return",W.b.error("\u672A\u627E\u5230\u5305\u542B'".concat(Yn,"'\u7684\u53D1\u5E03\u5355\u4F4D")));case 7:return ii={id:Nt.current,name:pn,name_en:Gt,description:$t,learning_notes:Ln,cust_seq:Lt,show_spoc:Et,school_id:yi,show_tag:ln,show_history:gn,learning_notes_title:Cn,attachment_ids:[Ut==null||((Nn=Ut[0])===null||Nn===void 0||((dn=Nn.response)===null||dn===void 0))?void 0:dn.id],sub_discipline_ids:Zt,subject_toast_attributes:{is_open:ht,open_num:qt,content:ct.content}},_n.next=10,U({type:vn,payload:Object(y.a)({},ii)});case 10:di=_n.sent,(di==null?void 0:di.subject_id)&&te.d.push("/paths/".concat(di.subject_id));case 12:case"end":return _n.stop()}},Tt)}));return function(ct){return tn.apply(this,arguments)}}(),Tn=function(){U({type:"newCourse/setActionTabs",payload:{key:"NewCourse-AppplySchool"}})},Bn=function(Tt){Qn(),lt(Object(y.a)({},Se.getFieldsValue()))};return z.a.createElement("section",{className:m.a.bg},z.a.createElement("div",{className:m.a.titleWrap},z.a.createElement("span",null,dt?"\u7F16\u8F91":"\u521B\u5EFA","\u5B9E\u8DF5\u8BFE\u7A0B")),z.a.createElement(re.a,{form:Se,className:m.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){var Tt=Se.getFieldsValue();"school_id"in Tt&&gt(Ze.filter(function(ct){return ct.name.includes(Tt.school_id)})),lt(Object(y.a)({},Tt))},onFinish:ci},z.a.createElement("div",{className:m.a.fieldWrap},z.a.createElement(re.a.Item,{extra:z.a.createElement("div",{className:"tr c-grey-333 font12 mt3"},"".concat(((_e=st.name)===null||_e===void 0?void 0:_e.length)||0,"/60")),name:"name",label:"\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0"}]},z.a.createElement(Ge,{maxLength:60,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"})),z.a.createElement(re.a.Item,{name:"name_en",label:"\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0:",rules:[{message:"\u8BF7\u8F93\u5165\u82F1\u6587\u8BFE\u7A0B\u540D\u79F0"}]},z.a.createElement(j.a,{maxLength:200,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A",addonAfter:"".concat(((Ke=st.name_en)===null||Ke===void 0?void 0:Ke.length)||0,"/200")})),z.a.createElement(re.a.Item,{name:"sub_discipline_ids",label:"\u65B9\u5411&\u8BFE\u7A0B:"},z.a.createElement(x,{defaultValue:wn,dataSource:cn,onChange:function(Tt){return Se.setFieldsValue({sub_discipline_ids:Tt})}})),z.a.createElement(re.a.Item,{label:"\u53D1\u5E03\u5355\u4F4D",name:"school_id",wrapperCol:{span:24},extra:!l&&st.school_id&&!(Ze!=null&&Ze.find(function(tn){return tn.name===st.school_id}))&&z.a.createElement("div",{className:m.a.schoolHintWrap},z.a.createElement("span",{className:m.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",st.school_id,"\u201D\u7684\u53D1\u5E03\u5355\u4F4D\uFF0C"),z.a.createElement("span",{className:"".concat(m.a.color0152d9),onClick:Tn},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D"}]},z.a.createElement(g.a,{placeholder:"\u8BF7\u8F93\u5165\u53D1\u5E03\u5355\u4F4D",showSearch:!0,options:Ct==null?void 0:Ct.map(function(tn){return{value:tn.name}})}))),z.a.createElement("div",{className:m.a.mdWrap},z.a.createElement(re.a.Item,{name:"intro",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB"},{max:8e3,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u7B80\u4ECB\u6700\u5927\u9650\u52368000\u4E2A\u5B57\u7B26"}]},z.a.createElement(G.a,{watch:!0,defaultValue:st.intro}))),z.a.createElement("div",{className:m.a.mdWrap},z.a.createElement(M.a,{align:"middle",className:"mb10 mt10"},z.a.createElement(w.a,null,z.a.createElement("span",{className:"c-red mr10"},"*")),z.a.createElement(w.a,{flex:"1"},z.a.createElement(re.a.Item,{name:"learning_notes_title",label:"",style:{marginBottom:0},rules:[{required:!0,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898"},{max:15,message:"\u8BF7\u8F93\u8BFE\u7A0B\u987B\u77E5\u6807\u9898\u6700\u5927\u9650\u523615\u4E2A\u5B57\u7B26"}]},z.a.createElement(j.a,{placeholder:"\u8BF7\u8F93\u5165"})))),z.a.createElement(re.a.Item,{name:"notice",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u987B\u77E5\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},z.a.createElement(G.a,{insertTemp:"1",watch:!0,defaultValue:st.notice}))),z.a.createElement("div",{className:m.a.mdWrap},z.a.createElement("div",{style:{display:"flex",alignItems:"center"}},z.a.createElement(C.a,{checked:ht,style:{marginRight:11},onChange:function(Tt){It(Tt)}}),"\u8BFE\u7A0B\u63D0\u793A\uFF08\u8FDB\u5165\u8BFE\u7A0B\u8BE6\u60C5\u9875\uFF0C\u63D0\u793A\u5185\u5BB9\u4EE5\u5F39\u7A97\u7684\u5F62\u5F0F\u8FDB\u884C\u5C55\u793A\uFF09"),ht&&z.a.createElement(re.a.Item,{style:{marginTop:10},name:"content",label:"",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A"},{max:1e4,message:"\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u8BFE\u7A0B\u63D0\u793A\u6700\u5927\u9650\u523610000\u4E2A\u5B57\u7B26"}]},z.a.createElement(G.a,{insertTemp:"1",watch:!0,defaultValue:st.content})),ht&&z.a.createElement("div",{style:{marginTop:20}},z.a.createElement("label",null,"\u63D0\u793A\u6B21\u6570\uFF1A"),z.a.createElement(F.a.Group,{value:qt,onChange:function(Tt){c(Tt.target.value)}},z.a.createElement(F.a,{value:-1},"\u6BCF\u6B21"),z.a.createElement(F.a,{value:1},"\u4E00\u6B21")))),z.a.createElement("div",{className:m.a.mdWrap},z.a.createElement(Y.a,{checked:Lt,onChange:function(Tt){zt(Tt==null?void 0:Tt.target.checked)}},"\u5C55\u793A\u9ED8\u8BA4\u7AE0\u8282\u5E8F\u53F7\uFF08\u9009\u4E2D\u5219\u6309\u5E8F\u5C55\u793A\u6240\u7AE0\u8282\u5E8F\u53F7\uFF0C\u4E0D\u9009\u4E2D\u5219\u9690\u85CF\u9ED8\u8BA4\u6392\u5E8F\uFF09"),z.a.createElement("br",null),z.a.createElement(Y.a,{style:{marginTop:"10px"},checked:Et,onChange:function(Tt){return it(Tt==null?void 0:Tt.target.checked)}},"\u81EA\u9009\u5E76\u5C55\u793ASPOC\u8BFE\u5802\uFF08\u9009\u4E2D\u5219\u7ED9\u51FASPOC\u8BFE\u5802\u5C55\u793A\u533A\u57DF\uFF0C\u8BFE\u7A0B\u521B\u5EFA\u8005/\u5408\u4F5C\u8005\u53EF\u4EE5\u81EA\u4E3B\u6DFB\u52A0\u9700\u8981\u5C55\u793A\u7684\u8BFE\u5802\uFF09"),z.a.createElement("br",null),z.a.createElement(Y.a,{style:{marginTop:"10px"},checked:ln,onChange:function(Tt){return An(Tt==null?void 0:Tt.target.checked)}},"\u5C55\u793A\u6280\u672F\u6807\u7B7E\u6A21\u5757\uFF08\u9009\u4E2D\u540E\uFF0C\u5C55\u793A\u8BFE\u7A0B\u7684\u6280\u80FD\u6807\u7B7E\uFF0C\u4E0D\u9009\u4E2D\u5219\u4E0D\u5C55\u793A\u8BE5\u6A21\u5757\uFF09"),z.a.createElement("br",null),z.a.createElement(Y.a,{style:{marginTop:"10px"},checked:gn,onChange:function(Tt){return fn(Tt==null?void 0:Tt.target.checked)}},"\u5C55\u793A\u5386\u53F2\u8BFE\u5802\u6A21\u5757\uFF08\u9009\u4E2D\u540E\uFF0C\u5C55\u793A\u8BFE\u7A0B\u7684\u5386\u53F2\u8BFE\u5802\uFF0C\u4E0D\u9009\u4E2D\u5219\u4E0D\u5C55\u793A\u8BE5\u6A21\u5757\uFF09"),z.a.createElement("br",null),z.a.createElement("div",{style:{display:"flex",marginTop:"10px"}},"\u81EA\u5B9A\u4E49\u9876\u90E8\u80CC\u666F\u56FE\uFF1A",z.a.createElement(ke.a,{action:H.a.API_SERVER+"/api/attachments.json",withCredentials:!0,fileList:Ut,onChange:function(Tt){var ct,Nn=(Tt==null?void 0:Tt.file.size)/1024/1024<2;if(!((ct=Tt.fileList)!==null&&ct!==void 0&&ct.length))return!1;if(!Nn)Xt(Object(ge.a)(Ut));else{var dn;Xt(Tt==null||((dn=Tt.fileList)===null||dn===void 0)?void 0:dn.slice(-1))}},beforeUpload:function(Tt){var ct=Tt.type==="image/jpeg"||Tt.type==="image/png";if(!ct)return W.b.error("\u53EA\u80FD\u4E0A\u4F20jpg \u6216\u8005png\u56FE\u7247"),!1;var Nn=Tt.size/1024/1024<2;return Nn?ct&&Nn:(W.b.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u5927\u4E8E2m"),!1)},onRemove:function(Tt){Xt([])}},z.a.createElement(De.a,null,"\u4E0A\u4F20\u56FE\u7247"),"\uFF08 \u672C\u9879\u975E\u5FC5\u9700\u3002\u5982\u4E0D\u4E0A\u4F20\uFF0C\u5219\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u56FE\u7247\uFF1B\u5982\u4E0A\u4F20\uFF0C\u8BF7\u9009\u62E9jpg\u3001png\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC72M\uFF0C\u5EFA\u8BAE\u5C3A\u5BF81920*240\u50CF\u7D20\uFF09"))),z.a.createElement("div",{className:m.a.backgroundFa},z.a.createElement("div",{className:"pt40 mb30"},z.a.createElement(re.a.Item,null,z.a.createElement(De.a,{size:"large",type:"primary",className:"".concat(m.a.button," mr20"),htmlType:"submit",loading:R["newCourse/editCourse"]||R["newCourse/submitCourse"]},"\u63D0\u4EA4"),z.a.createElement(De.a,{size:"large",type:"primary",ghost:!0,className:m.a.button,onClick:function(){return te.d.push(dt?"/paths/".concat(Nt.current):"/paths")}},"\u53D6\u6D88"))))),z.a.createElement(Be,{schoolName:st.school_id,onSuccess:Bn}))},Le=Ce.default=Object(te.a)(function(Ve){var et=Ve.user,_e=Ve.newCourse,Ke=Ve.loading,me=Ve.globalSetting;return{user:et,newCourse:_e,globalSetting:me,loading:Ke.effects}})(Xe)},XIdC:function(mt,Ce,h){"use strict";var q=h("rePB"),ke=h("ODXe"),Ee=h("Ff2n"),De=h("q1tI"),ge=h.n(De),ue=h("TSYQ"),Y=h.n(ue),J=h("6cGi"),F=h("4IlW"),B=De.forwardRef(function(C,E){var M,S=C.prefixCls,w=S===void 0?"rc-switch":S,P=C.className,g=C.checked,y=C.defaultChecked,O=C.disabled,W=C.loadingIcon,de=C.checkedChildren,pe=C.unCheckedChildren,re=C.onClick,xe=C.onChange,ye=C.onKeyDown,Q=Object(Ee.a)(C,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),we=Object(J.a)(!1,{value:g,defaultValue:y}),Z=Object(ke.a)(we,2),j=Z[0],Ae=Z[1];function oe(G,V){var m=j;return O||(m=G,Ae(m),xe==null||xe(m,V)),m}function K(G){G.which===F.a.LEFT?oe(!1,G):G.which===F.a.RIGHT&&oe(!0,G),ye==null||ye(G)}function z(G){var V=oe(!j,G);re==null||re(V,G)}var te=Y()(w,P,(M={},Object(q.a)(M,"".concat(w,"-checked"),j),Object(q.a)(M,"".concat(w,"-disabled"),O),M));return De.createElement("button",Object.assign({},Q,{type:"button",role:"switch","aria-checked":j,disabled:O,className:te,ref:E,onKeyDown:K,onClick:z}),W,De.createElement("span",{className:"".concat(w,"-inner")},j?de:pe))});B.displayName="Switch",Ce.a=B},Y1PL:function(mt,Ce,h){"use strict";h.r(Ce),h.d(Ce,"ResizableTextArea",function(){return Te});var q=h("wx14"),ke=h("1OyB"),Ee=h("vuIU"),De=h("Ji7U"),ge=h("LK+K"),ue=h("q1tI"),Y=h("VTBJ"),J=h("rePB"),F=h("Zm9Q"),B=h("Kwbf"),C=h("c+Xe"),E=h("m+aA"),M=h("bdgK"),S=new Map;function w(Pe){Pe.forEach(function(ne){var _,X=ne.target;(_=S.get(X))===null||_===void 0||_.forEach(function(N){return N(X)})})}var P=new M.default(w),g=null,y=null;function O(Pe,ne){S.has(Pe)||(S.set(Pe,new Set),P.observe(Pe)),S.get(Pe).add(ne)}function W(Pe,ne){S.has(Pe)&&(S.get(Pe).delete(ne),S.get(Pe).size||(P.unobserve(Pe),S.delete(Pe)))}var de=function(Pe){Object(De.a)(_,Pe);var ne=Object(ge.a)(_);function _(){return Object(ke.a)(this,_),ne.apply(this,arguments)}return Object(Ee.a)(_,[{key:"render",value:function(){return this.props.children}}]),_}(ue.Component),pe=ue.createContext(null);function re(Pe){var ne=Pe.children,_=Pe.onBatchResize,X=ue.useRef(0),N=ue.useRef([]),I=ue.useContext(pe),x=ue.useCallback(function(k,D,$){X.current+=1;var L=X.current;N.current.push({size:k,element:D,data:$}),Promise.resolve().then(function(){L===X.current&&(_==null||_(N.current),N.current=[])}),I==null||I(k,D,$)},[_,I]);return ue.createElement(pe.Provider,{value:x},ne)}function xe(Pe){var ne=Pe.children,_=Pe.disabled,X=ue.useRef(null),N=ue.useRef(null),I=ue.useContext(pe),x=ue.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),k=ue.isValidElement(ne)&&Object(C.c)(ne),D=k?ne.ref:null,$=ue.useMemo(function(){return Object(C.a)(D,X)},[D,X]),L=ue.useRef(Pe);L.current=Pe;var A=ue.useCallback(function(ie){var be=L.current,Me=be.onResize,Ue=be.data,ze=ie.getBoundingClientRect(),He=ze.width,nt=ze.height,Oe=ie.offsetWidth,Fe=ie.offsetHeight,Be=Math.floor(He),Ge=Math.floor(nt);if(x.current.width!==Be||x.current.height!==Ge||x.current.offsetWidth!==Oe||x.current.offsetHeight!==Fe){var Ye={width:Be,height:Ge,offsetWidth:Oe,offsetHeight:Fe};x.current=Ye;var Xe=Oe===Math.round(He)?He:Oe,Le=Fe===Math.round(nt)?nt:Fe,Ve=Object(Y.a)(Object(Y.a)({},Ye),{},{offsetWidth:Xe,offsetHeight:Le});I==null||I(Ve,ie,Ue),Me&&Promise.resolve().then(function(){Me(Ve,ie)})}},[]);return ue.useEffect(function(){var ie=Object(E.a)(X.current)||Object(E.a)(N.current);return ie&&!_&&O(ie,A),function(){return W(ie,A)}},[X.current,_]),ue.createElement(de,{ref:N},k?ue.cloneElement(ne,{ref:$}):ne)}var ye="rc-observer-key";function Q(Pe){var ne=Pe.children,_=Object(F.a)(ne);return _.map(function(X,N){var I=(X==null?void 0:X.key)||"".concat(ye,"-").concat(N);return ue.createElement(xe,Object(q.a)({},Pe,{key:I}),X)})}Q.Collection=re;var we=Q,Z=h("bT9E"),j=h("TSYQ"),Ae=h.n(j),oe=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,K=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],z={},te;function G(Pe){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=Pe.getAttribute("id")||Pe.getAttribute("data-reactid")||Pe.getAttribute("name");if(ne&&z[_])return z[_];var X=window.getComputedStyle(Pe),N=X.getPropertyValue("box-sizing")||X.getPropertyValue("-moz-box-sizing")||X.getPropertyValue("-webkit-box-sizing"),I=parseFloat(X.getPropertyValue("padding-bottom"))+parseFloat(X.getPropertyValue("padding-top")),x=parseFloat(X.getPropertyValue("border-bottom-width"))+parseFloat(X.getPropertyValue("border-top-width")),k=K.map(function($){return"".concat($,":").concat(X.getPropertyValue($))}).join(";"),D={sizingStyle:k,paddingSize:I,borderSize:x,boxSizing:N};return ne&&_&&(z[_]=D),D}function V(Pe){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;te||(te=document.createElement("textarea"),te.setAttribute("tab-index","-1"),te.setAttribute("aria-hidden","true"),document.body.appendChild(te)),Pe.getAttribute("wrap")?te.setAttribute("wrap",Pe.getAttribute("wrap")):te.removeAttribute("wrap");var N=G(Pe,ne),I=N.paddingSize,x=N.borderSize,k=N.boxSizing,D=N.sizingStyle;te.setAttribute("style","".concat(D,";").concat(oe)),te.value=Pe.value||Pe.placeholder||"";var $=Number.MIN_SAFE_INTEGER,L=Number.MAX_SAFE_INTEGER,A=te.scrollHeight,ie;if(k==="border-box"?A+=x:k==="content-box"&&(A-=I),_!==null||X!==null){te.value=" ";var be=te.scrollHeight-I;_!==null&&($=be*_,k==="border-box"&&($=$+I+x),A=Math.max($,A)),X!==null&&(L=be*X,k==="border-box"&&(L=L+I+x),ie=A>L?"":"hidden",A=Math.min(L,A))}return{height:A,minHeight:$,maxHeight:L,overflowY:ie,resize:"none"}}var m=h("Gytx"),p=h.n(m),H;(function(Pe){Pe[Pe.NONE=0]="NONE",Pe[Pe.RESIZING=1]="RESIZING",Pe[Pe.RESIZED=2]="RESIZED"})(H||(H={}));var ae=function(Pe){Object(De.a)(_,Pe);var ne=Object(ge.a)(_);function _(X){var N;return Object(ke.a)(this,_),N=ne.call(this,X),N.nextFrameActionId=void 0,N.resizeFrameId=void 0,N.textArea=void 0,N.saveTextArea=function(I){N.textArea=I},N.handleResize=function(I){var x=N.state.resizeStatus,k=N.props,D=k.autoSize,$=k.onResize;if(x!==H.NONE)return;typeof $=="function"&&$(I),D&&N.resizeOnNextFrame()},N.resizeOnNextFrame=function(){cancelAnimationFrame(N.nextFrameActionId),N.nextFrameActionId=requestAnimationFrame(N.resizeTextarea)},N.resizeTextarea=function(){var I=N.props.autoSize;if(!I||!N.textArea)return;var x=I.minRows,k=I.maxRows,D=V(N.textArea,!1,x,k);N.setState({textareaStyles:D,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(N.resizeFrameId),N.resizeFrameId=requestAnimationFrame(function(){N.setState({resizeStatus:H.RESIZED},function(){N.resizeFrameId=requestAnimationFrame(function(){N.setState({resizeStatus:H.NONE}),N.fixFirefoxAutoScroll()})})})})},N.renderTextArea=function(){var I=N.props,x=I.prefixCls,k=x===void 0?"rc-textarea":x,D=I.autoSize,$=I.onResize,L=I.className,A=I.disabled,ie=N.state,be=ie.textareaStyles,Me=ie.resizeStatus,Ue=Object(Z.a)(N.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ze=Ae()(k,L,Object(J.a)({},"".concat(k,"-disabled"),A));"value"in Ue&&(Ue.value=Ue.value||"");var He=Object(Y.a)(Object(Y.a)(Object(Y.a)({},N.props.style),be),Me===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ue.createElement(we,{onResize:N.handleResize,disabled:!(D||$)},ue.createElement("textarea",Object(q.a)({},Ue,{className:ze,style:He,ref:N.saveTextArea})))},N.state={textareaStyles:{},resizeStatus:H.NONE},N}return Object(Ee.a)(_,[{key:"componentDidUpdate",value:function(N){(N.value!==this.props.value||!p()(N.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var N=this.textArea.selectionStart,I=this.textArea.selectionEnd;this.textArea.setSelectionRange(N,I)}}catch(x){}}},{key:"render",value:function(){return this.renderTextArea()}}]),_}(ue.Component),Te=ae,We=function(Pe){Object(De.a)(_,Pe);var ne=Object(ge.a)(_);function _(X){var N;Object(ke.a)(this,_),N=ne.call(this,X),N.resizableTextArea=void 0,N.focus=function(){N.resizableTextArea.textArea.focus()},N.saveTextArea=function(x){N.resizableTextArea=x},N.handleChange=function(x){var k=N.props.onChange;N.setValue(x.target.value,function(){N.resizableTextArea.resizeTextarea()}),k&&k(x)},N.handleKeyDown=function(x){var k=N.props,D=k.onPressEnter,$=k.onKeyDown;x.keyCode===13&&D&&D(x),$&&$(x)};var I=typeof X.value=="undefined"||X.value===null?X.defaultValue:X.value;return N.state={value:I},N}return Object(Ee.a)(_,[{key:"setValue",value:function(N,I){"value"in this.props||this.setState({value:N},I)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ue.createElement(Te,Object(q.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(N){return"value"in N?{value:N.value}:null}}]),_}(ue.Component),Re=Ce.default=We},YNHc:function(mt,Ce,h){mt.exports={cascaderContainer:"cascaderContainer___3XtEo",valueWrap:"valueWrap___3ID8a",valueItem:"valueItem___yKIZs",placeholder:"placeholder___MxiA7",modalWrap:"modalWrap___1ge9B",left:"left___10iyZ",right:"right___KVnmg",disabled:"disabled___2c8qt",emptyWrap:"emptyWrap___dYSJ0"}},ZW9T:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return we});var q=h("k1fw"),ke=h("oBTY"),Ee=h("9og8"),De=h("miYZ"),ge=h("tsqr"),ue=h("rAM+"),Y=h("tJVT"),J=h("PpiC"),F=h("WmNS"),B=h.n(F),C=h("q1tI"),E=h.n(C),M=h("bdgK");function S(Z,j,Ae,oe,K){var z=j.getWordUntilPosition(Ae),te={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:z.startColumn,endColumn:z.endColumn},G=oe.map(function(V){return{label:V,kind:Z.languages.CompletionItemKind.Keyword,insertText:V,insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:te}});return K.map(function(V){G.push(Object(q.a)(Object(q.a)({},V),{},{range:te}))}),G}var w=function(Z){var j={label:"ifelse",kind:Z.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet},Ae=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];Z.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(te,G){var V=S(Z,te,G,Ae,[j]);return{suggestions:V}}});var oe=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];Z.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(te,G){var V=[{label:"print",kind:Z.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet}],m=S(Z,te,G,oe,V);return{suggestions:m}}});var K=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];Z.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(te,G){var V=[j,{label:"main",kind:Z.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:Z.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:Z.languages.CompletionItemInsertTextRule.InsertAsSnippet}],m=S(Z,te,G,K,V);return{suggestions:m}}})},P="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",g=h("fjLI"),y=h("LvDl"),O=h("+ua5");function W(Z){return/^\d+$/.test(Z)?"".concat(Z,"px"):Z}function de(){}var pe=!1,re={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale"};function xe(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],j=Z;if(Array.isArray(Z)){for(var Ae=0;Ae<Z.length;Ae++){var oe=re[Z[Ae]];if(oe)return oe}return j[0]}return re[j]||j}var ye=null,Q=Ce.b=function(Z){var j=Z.width,Ae=j===void 0?"100%":j,oe=Z.height,K=oe===void 0?"100%":oe,z=Z.value,te=Z.language,G=te===void 0?"javascript":te,V=Z.style,m=V===void 0?{}:V,p=Z.options,H=p===void 0?{}:p,ae=Z.overrideServices,Te=ae===void 0?{}:ae,We=Z.theme,Re=We===void 0?"vs-dark":We,Pe=Z.onEditBlur,ne=Z.onSave,_=Z.autoHeight,X=_===void 0?!1:_,N=Z.forbidCopy,I=N===void 0?!1:N,x=Z.onChange,k=x===void 0?de:x,D=Z.editorDidMount,$=D===void 0?de:D,L=Z.onFocus,A=L===void 0?de:L,ie=Z.onBreakPoint,be=ie===void 0?de:ie,Me=Z.breakPointValue,Ue=Me===void 0?[]:Me,ze=Z.filename,He=ze===void 0?"educoder.txt":ze,nt=Z.errorLine,Oe=Z.errorContent,Fe=Oe===void 0?"":Oe,Be=Z.highlightLine,Ge=Z.openBreakPoint,Ye=Ge===void 0?!1:Ge,Xe=Object(J.a)(Z,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint"]),Le=Object(C.useRef)(),Ve=Object(C.useRef)({}),et=Object(C.useRef)(),_e=Object(C.useRef)(),Ke=Object(C.useRef)([]),me=Object(C.useRef)(!1),se=Object(C.useRef)(),ve=Object(C.useState)(!1),R=Object(Y.a)(ve,2),U=R[0],ee=R[1];function ce(){var Et;return Le.current&&(Et=new M.default(function(it){var xt=Object(ue.a)(it),Wt;try{for(xt.s();!(Wt=xt.n()).done;){var Ut=Wt.value;(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&Ve.current.instance.layout()}}catch(Xt){xt.e(Xt)}finally{xt.f()}}),Et.observe(Le.current)),Et}function je(){ge.b.warn({content:decodeURIComponent(P),key:"monaco-editor-tip"})}var Se=function(){var it=Ve.current.instance;if(z!=null&&it&&U){var xt=it.getModel();xt&&z!==xt.getValue()&&(pe=!0,xt.setValue(z),it.layout(),pe=!1)}};Object(C.useEffect)(function(){try{var Et,it=Ve.current.instance;_e.current&&clearTimeout(_e.current),_e.current=setTimeout(function(){Se()},500),it==null||((Et=it.updateOptions)===null||Et===void 0)||Et.call(it,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(z.split(/\r\n|\r|\n/g).length))+3,5)})}catch(xt){debugger}},[z,U,Ve.current]),Object(C.useEffect)(function(){try{if(nt&&Ve.current&&Ve.current.instance){var Et=Ve.current.instance;Et.changeViewZones(function(xt){var Wt=document.createElement("div");Wt.style.padding="10px 20px",Wt.style.width="calc(100% - 20px)",Wt.className="my-error-line-wrp",Wt.innerHTML=Fe,xt.addZone({afterLineNumber:nt||11,heightInLines:3,domNode:Wt})});var it={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Et.addOverlayWidget(it),Et.revealPositionInCenter({lineNumber:20,column:1})}}catch(xt){debugger}},[nt,Ve.current,U]),Object(C.useEffect)(function(){var Et;if((Et=Ve.current)!==null&&Et!==void 0&&Et.instance&&U&&Ye){var it=Ve.current.instance,xt=it.getModel();if(!xt)return;var Wt=function(){var ht=[],It=[],Kt=xt.getAllDecorations(),Jt=Object(ue.a)(Kt),qt;try{for(Jt.s();!(qt=Jt.n()).done;){var c=qt.value;if(c.options.className==="highlighted-line"){var o;ht.push(c==null||((o=c.range)===null||o===void 0)?void 0:o.startLineNumber),It.push(c==null?void 0:c.id)}}}catch(l){Jt.e(l)}finally{Jt.f()}xt.deltaDecorations(It,[]);var a=xt.getLineCount();!!Be&&Be<=a&&(it.deltaDecorations([],[{range:new ye.Range(Be,1,Be,xt.getLineMaxColumn(Be)),options:{isWholeLine:!0,className:"highlighted-line"}}]),it.revealLineInCenter(Be))};Wt();var Ut=function(){var ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,It=[],Kt=[],Jt=xt.getAllDecorations(),qt=Object(ue.a)(Jt),c;try{for(qt.s();!(c=qt.n()).done;){var o=c.value;if(o.options.linesDecorationsClassName==="breakpoints"){var a;It.push(o==null||((a=o.range)===null||a===void 0)?void 0:a.startLineNumber),Kt.push(o==null?void 0:o.id)}}}catch(l){qt.e(l)}finally{qt.f()}if(ht)return{lines:It,ids:Kt};be(It)},Xt=function(){var Je=Object(Ee.a)(B.a.mark(function ht(It){var Kt;return B.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return Kt={range:new ye.Range(It,1,It,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},qt.next=3,xt.deltaDecorations([],[Kt]);case 3:Ut();case 4:case"end":return qt.stop()}},ht)}));return function(It){return Je.apply(this,arguments)}}(),_t=function(){var Je=Object(Ee.a)(B.a.mark(function ht(It){var Kt,Jt,qt,c,o;return B.a.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:Kt=[],Jt=it.getLineDecorations(It),qt=Object(ue.a)(Jt);try{for(qt.s();!(c=qt.n()).done;)o=c.value,o.options.linesDecorationsClassName==="breakpoints"&&Kt.push(o.id)}catch(f){qt.e(f)}finally{qt.f()}return l.next=6,xt.deltaDecorations(Kt,[]);case 6:Ut();case 7:case"end":return l.stop()}},ht)}));return function(It){return Je.apply(this,arguments)}}(),vt=function(ht){var It=it.getLineDecorations(ht),Kt=Object(ue.a)(It),Jt;try{for(Kt.s();!(Jt=Kt.n()).done;){var qt=Jt.value;if(qt.options.linesDecorationsClassName==="breakpoints")return!0}}catch(c){Kt.e(c)}finally{Kt.f()}return!1};if(!Object(y.isEqual)(Ue,Ut(!0).lines)){xt.deltaDecorations(Ut(!0).ids,[]);var ln=Ue.map(function(Je){return{range:new ye.Range(Je,1,Je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}});xt.deltaDecorations([],ln)}var An=it.onDidChangeModelContent(function(Je){var ht=it.getPosition();if(ht){var It=ht.lineNumber;xt.getLineContent(It).trim()===""?_t(It):vt(It)&&(_t(It),Xt(It))}}),En=it.onMouseDown(function(Je){var ht,It,Kt;if(Je.target.detail&&(ht=Je.target)!==null&&ht!==void 0&&(It=ht.element)!==null&&It!==void 0&&(Kt=It.className)!==null&&Kt!==void 0&&Kt.includes("line-numbers")){var Jt=Je.target.position.lineNumber;if(xt.getLineContent(Jt).trim()==="")return;vt(Jt)?_t(Jt):Xt(Jt)}}),jt=function(ht){var It={range:new ye.Range(ht,1,ht,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ke.current=it.deltaDecorations(Ke.current,[It])},gn=function(){Ke.current=it.deltaDecorations(Ke.current,[])},fn=it.onMouseMove(function(Je){var ht,It,Kt;if(gn(),Je.target.detail&&(ht=Je.target)!==null&&ht!==void 0&&(It=ht.element)!==null&&It!==void 0&&(Kt=It.className)!==null&&Kt!==void 0&&Kt.includes("line-numbers")){var Jt=Je.target.position.lineNumber;if(xt.getLineContent(Jt).trim()==="")return;jt(Jt)}}),Vn=it.onMouseLeave(function(){gn()});return function(){An.dispose(),En.dispose(),fn.dispose(),Vn.dispose()}}},[Ve.current,U,Ue,Be,Ye]);function qe(){var Et=Ve.current.instance;if(Et){var it=Et.getSelection(),xt=Ve.current.pastePos||{},Wt=new ye.Range(xt.startLineNumber||it.endLineNumber,xt.startColumn||it.endColumn,xt.endLineNumber||it.endLineNumber,xt.endColumn||it.endColumn);setTimeout(function(){Et.executeEdits("",[{range:Wt,text:""}])},300)}}function at(Et){(window.navigator.platform.match("Mac")?Et.metaKey:Et.ctrlKey)&&Et.keyCode==83&&(Et.preventDefault(),ne())}var st=function(){if(X&&Ve.current.instance){var it=Ve.current.instance.getContentHeight();rn(it<K?K:it)}else rn(K)};function lt(Et){var it=document.createEvent("MouseEvents");it.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Et.dispatchEvent(it)}var St=function(it){var xt=it.keyCode,Wt=it.ctrlKey,Ut=it.metaKey,Xt=it.target,_t=it.type;return(_t==="paste"||(xt===67||xt===86)&&(Ut||Wt))&&Xt.nodeName==="TEXTAREA"&&(je(),it.preventDefault()),!1};function Ot(Et,it){var xt=window.URL||window.webkitURL||window,Wt=new Blob([it]),Ut=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ut.href=xt.createObjectURL(Wt),Ut.download=Et,lt(Ut)}Object(C.useEffect)(function(){st()},[st]),Object(C.useEffect)(function(){Le.current&&!U&&h.e(27).then(h.t.bind(null,"M/lh",7)).then(function(Et){try{ye=Et,Ve.current.instance=ye.editor.create(Le.current,{value:z,language:xe(G),theme:Re,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Te);var it=Ve.current.instance,xt=g.c._menuItems,Wt=Object(ke.a)(xt).find(function(Xt){return Xt[0]._debugName=="EditorContext"});if($(it,ye),setTimeout(function(){st(),Ve.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ot(He||"educoder.txt",it.getValue())}}),it.getDomNode().addEventListener("input",function(){et.current.autoFormat&&it.getAction("editor.action.formatDocument").run()})},500),Ve.current.subscription=it.onDidChangeModelContent(function(Xt){debugger;me.current?clearTimeout(se.current):(st(),k(it.getValue(),Xt)),se.current=setTimeout(function(){me.current=!1},500)}),window.Monaco||w(ye,xe(G)),I&&(Le.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",St),window.removeEventListener("paste",St),window.addEventListener("keydown",St),window.addEventListener("paste",St)),window.Monaco=ye,Pe&&it.onDidBlurEditorWidget(function(){Pe(it.getValue())}),A&&it.onDidFocusEditorText(function(){A(it.getValue())}),I)try{window.addEventListener("paste",qe)}catch(Xt){}var Ut=ce();return ee(!0),function(){var Xt=Ve.current.instance;Xt.dispose();var _t=Xt.getModel();_t&&_t.dispose(),Ve.current.subscription&&Ve.current.subscription.dispose(),I&&window.removeEventListener("paste",qe),Ut.unobserve(Le.current)}}catch(Xt){debugger}})},[]),Object(C.useEffect)(function(){var Et=Ve.current.instance;if(Et&&U)return document.addEventListener("keydown",at,!1),function(){document.removeEventListener("keydown",at)}},[ne,U]),Object(C.useEffect)(function(){var Et=Ve.current.instance;if(Et&&U){var it=xe(G);ye.editor.setModelLanguage(Et.getModel(),it)}},[G,U]),Object(C.useEffect)(function(){var Et=Ve.current.instance;Et&&U&&ye.editor.setTheme(Re)},[Re,U]),Object(C.useEffect)(function(){var Et=Ve.current.instance;et.current=H,Et&&U&&(Et.updateOptions(Object(q.a)({},H)),setTimeout(function(){Et.getModel().updateOptions(Object(q.a)({},H))},200))},[JSON.stringify(H),U]),Object(C.useEffect)(function(){var Et=Ve.current.instance;Et&&U&&Et.layout()},[Ae,K,U]);var dt=Object(C.useState)(W(Ae)),Ht=Object(Y.a)(dt,2),Nt=Ht[0],At=Ht[1],kt=Object(C.useState)(W(K)),Lt=Object(Y.a)(kt,2),zt=Lt[0],rn=Lt[1],bt=Object(q.a)(Object(q.a)({},m),{},{width:Nt,height:zt});return E.a.createElement("div",{className:"my-monaco-editor",ref:Le,style:bt})};function we(Z){var j=Z.width,Ae=j===void 0?"100%":j,oe=Z.height,K=oe===void 0?"100%":oe,z=Z.original,te=Z.modified,G=Z.language,V=Z.options,m=V===void 0?{}:V,p=Object(C.useRef)(),H=Object(C.useState)(null),ae=Object(Y.a)(H,2),Te=ae[0],We=ae[1];function Re(X){var N;return p.current&&(N=new M.default(function(I){var x=Object(ue.a)(I),k;try{for(x.s();!(k=x.n()).done;){var D=k.value;(D.target.offsetHeight>0||D.target.offsetWidth>0)&&X.layout()}}catch($){x.e($)}finally{x.f()}}),N.observe(p.current)),N}Object(C.useEffect)(function(){return p.current&&h.e(27).then(h.t.bind(null,"M/lh",7)).then(function(X){ye=X;var N=ye.editor.createDiffEditor(p.current,Object(q.a)(Object(q.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},m),{},{wordWrap:!0}));We(N);var I=Re(N);return function(){N.dispose();var x=N.getModel();x&&x.dispose(),I.unobserve(p.current)}}),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}},[]),Object(C.useEffect)(function(){Te&&Te.setModel({original:ye.editor.createModel(z,G),modified:ye.editor.createModel(te,G)})},[z,te,G,Te]);var Pe=W(Ae),ne=W(K),_={width:Pe,height:ne};return E.a.createElement("div",{className:"my-diff-editor",ref:p,style:_})}},ZpRC:function(mt,Ce,h){"use strict";function q(C){return typeof C=="object"&&C!=null&&C.nodeType===1}function ke(C,E){return(!E||C!=="hidden")&&C!=="visible"&&C!=="clip"}function Ee(C,E){if(C.clientHeight<C.scrollHeight||C.clientWidth<C.scrollWidth){var M=getComputedStyle(C,null);return ke(M.overflowY,E)||ke(M.overflowX,E)||function(S){var w=function(P){if(!P.ownerDocument||!P.ownerDocument.defaultView)return null;try{return P.ownerDocument.defaultView.frameElement}catch(g){return null}}(S);return!!w&&(w.clientHeight<S.scrollHeight||w.clientWidth<S.scrollWidth)}(C)}return!1}function De(C,E,M,S,w,P,g,y){return P<C&&g>E||P>C&&g<E?0:P<=C&&y<=M||g>=E&&y>=M?P-C-S:g>E&&y<M||P<C&&y>M?g-E+w:0}var ge=function(C,E){var M=window,S=E.scrollMode,w=E.block,P=E.inline,g=E.boundary,y=E.skipOverflowHiddenElements,O=typeof g=="function"?g:function(be){return be!==g};if(!q(C))throw new TypeError("Invalid target");for(var W=document.scrollingElement||document.documentElement,de=[],pe=C;q(pe)&&O(pe);){if((pe=pe.parentElement)===W){de.push(pe);break}pe!=null&&pe===document.body&&Ee(pe)&&!Ee(document.documentElement)||pe!=null&&Ee(pe,y)&&de.push(pe)}for(var re=M.visualViewport?M.visualViewport.width:innerWidth,xe=M.visualViewport?M.visualViewport.height:innerHeight,ye=window.scrollX||pageXOffset,Q=window.scrollY||pageYOffset,we=C.getBoundingClientRect(),Z=we.height,j=we.width,Ae=we.top,oe=we.right,K=we.bottom,z=we.left,te=w==="start"||w==="nearest"?Ae:w==="end"?K:Ae+Z/2,G=P==="center"?z+j/2:P==="end"?oe:z,V=[],m=0;m<de.length;m++){var p=de[m],H=p.getBoundingClientRect(),ae=H.height,Te=H.width,We=H.top,Re=H.right,Pe=H.bottom,ne=H.left;if(S==="if-needed"&&Ae>=0&&z>=0&&K<=xe&&oe<=re&&Ae>=We&&K<=Pe&&z>=ne&&oe<=Re)return V;var _=getComputedStyle(p),X=parseInt(_.borderLeftWidth,10),N=parseInt(_.borderTopWidth,10),I=parseInt(_.borderRightWidth,10),x=parseInt(_.borderBottomWidth,10),k=0,D=0,$="offsetWidth"in p?p.offsetWidth-p.clientWidth-X-I:0,L="offsetHeight"in p?p.offsetHeight-p.clientHeight-N-x:0;if(W===p)k=w==="start"?te:w==="end"?te-xe:w==="nearest"?De(Q,Q+xe,xe,N,x,Q+te,Q+te+Z,Z):te-xe/2,D=P==="start"?G:P==="center"?G-re/2:P==="end"?G-re:De(ye,ye+re,re,X,I,ye+G,ye+G+j,j),k=Math.max(0,k+Q),D=Math.max(0,D+ye);else{k=w==="start"?te-We-N:w==="end"?te-Pe+x+L:w==="nearest"?De(We,Pe,ae,N,x+L,te,te+Z,Z):te-(We+ae/2)+L/2,D=P==="start"?G-ne-X:P==="center"?G-(ne+Te/2)+$/2:P==="end"?G-Re+I+$:De(ne,Re,Te,X,I+$,G,G+j,j);var A=p.scrollLeft,ie=p.scrollTop;te+=ie-(k=Math.max(0,Math.min(ie+k,p.scrollHeight-ae+L))),G+=A-(D=Math.max(0,Math.min(A+D,p.scrollWidth-Te+$)))}V.push({el:p,top:k,left:D})}return V};function ue(C){return C===Object(C)&&Object.keys(C).length!==0}function Y(C,E){E===void 0&&(E="auto");var M="scrollBehavior"in document.body.style;C.forEach(function(S){var w=S.el,P=S.top,g=S.left;w.scroll&&M?w.scroll({top:P,left:g,behavior:E}):(w.scrollTop=P,w.scrollLeft=g)})}function J(C){return C===!1?{block:"end",inline:"nearest"}:ue(C)?C:{block:"start",inline:"nearest"}}function F(C,E){var M=!C.ownerDocument.documentElement.contains(C);if(ue(E)&&typeof E.behavior=="function")return E.behavior(M?[]:ge(C,E));if(M)return;var S=J(E);return Y(ge(C,S),S.behavior)}var B=Ce.a=F},Zss7:function(mt,Ce,h){var q;(function(ke){var Ee=/^\s+/,De=/\s+$/,ge=0,ue=ke.round,Y=ke.min,J=ke.max,F=ke.random;function B(x,k){if(x=x||"",k=k||{},x instanceof B)return x;if(!(this instanceof B))return new B(x,k);var D=C(x);this._originalInput=x,this._r=D.r,this._g=D.g,this._b=D.b,this._a=D.a,this._roundA=ue(100*this._a)/100,this._format=k.format||D.format,this._gradientType=k.gradientType,this._r<1&&(this._r=ue(this._r)),this._g<1&&(this._g=ue(this._g)),this._b<1&&(this._b=ue(this._b)),this._ok=D.ok,this._tc_id=ge++}B.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var x=this.toRgb();return(x.r*299+x.g*587+x.b*114)/1e3},getLuminance:function(){var x=this.toRgb(),k,D,$,L,A,ie;return k=x.r/255,D=x.g/255,$=x.b/255,k<=.03928?L=k/12.92:L=ke.pow((k+.055)/1.055,2.4),D<=.03928?A=D/12.92:A=ke.pow((D+.055)/1.055,2.4),$<=.03928?ie=$/12.92:ie=ke.pow(($+.055)/1.055,2.4),.2126*L+.7152*A+.0722*ie},setAlpha:function(x){return this._a=V(x),this._roundA=ue(100*this._a)/100,this},toHsv:function(){var x=w(this._r,this._g,this._b);return{h:x.h*360,s:x.s,v:x.v,a:this._a}},toHsvString:function(){var x=w(this._r,this._g,this._b),k=ue(x.h*360),D=ue(x.s*100),$=ue(x.v*100);return this._a==1?"hsv("+k+", "+D+"%, "+$+"%)":"hsva("+k+", "+D+"%, "+$+"%, "+this._roundA+")"},toHsl:function(){var x=M(this._r,this._g,this._b);return{h:x.h*360,s:x.s,l:x.l,a:this._a}},toHslString:function(){var x=M(this._r,this._g,this._b),k=ue(x.h*360),D=ue(x.s*100),$=ue(x.l*100);return this._a==1?"hsl("+k+", "+D+"%, "+$+"%)":"hsla("+k+", "+D+"%, "+$+"%, "+this._roundA+")"},toHex:function(x){return g(this._r,this._g,this._b,x)},toHexString:function(x){return"#"+this.toHex(x)},toHex8:function(x){return y(this._r,this._g,this._b,this._a,x)},toHex8String:function(x){return"#"+this.toHex8(x)},toRgb:function(){return{r:ue(this._r),g:ue(this._g),b:ue(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+ue(this._r)+", "+ue(this._g)+", "+ue(this._b)+")":"rgba("+ue(this._r)+", "+ue(this._g)+", "+ue(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:ue(m(this._r,255)*100)+"%",g:ue(m(this._g,255)*100)+"%",b:ue(m(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+ue(m(this._r,255)*100)+"%, "+ue(m(this._g,255)*100)+"%, "+ue(m(this._b,255)*100)+"%)":"rgba("+ue(m(this._r,255)*100)+"%, "+ue(m(this._g,255)*100)+"%, "+ue(m(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:te[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(x){var k="#"+O(this._r,this._g,this._b,this._a),D=k,$=this._gradientType?"GradientType = 1, ":"";if(x){var L=B(x);D="#"+O(L._r,L._g,L._b,L._a)}return"progid:DXImageTransform.Microsoft.gradient("+$+"startColorstr="+k+",endColorstr="+D+")"},toString:function(x){var k=!!x;x=x||this._format;var D=!1,$=this._a<1&&this._a>=0,L=!k&&$&&(x==="hex"||x==="hex6"||x==="hex3"||x==="hex4"||x==="hex8"||x==="name");return L?x==="name"&&this._a===0?this.toName():this.toRgbString():(x==="rgb"&&(D=this.toRgbString()),x==="prgb"&&(D=this.toPercentageRgbString()),(x==="hex"||x==="hex6")&&(D=this.toHexString()),x==="hex3"&&(D=this.toHexString(!0)),x==="hex4"&&(D=this.toHex8String(!0)),x==="hex8"&&(D=this.toHex8String()),x==="name"&&(D=this.toName()),x==="hsl"&&(D=this.toHslString()),x==="hsv"&&(D=this.toHsvString()),D||this.toHexString())},clone:function(){return B(this.toString())},_applyModification:function(x,k){var D=x.apply(null,[this].concat([].slice.call(k)));return this._r=D._r,this._g=D._g,this._b=D._b,this.setAlpha(D._a),this},lighten:function(){return this._applyModification(re,arguments)},brighten:function(){return this._applyModification(xe,arguments)},darken:function(){return this._applyModification(ye,arguments)},desaturate:function(){return this._applyModification(W,arguments)},saturate:function(){return this._applyModification(de,arguments)},greyscale:function(){return this._applyModification(pe,arguments)},spin:function(){return this._applyModification(Q,arguments)},_applyCombination:function(x,k){return x.apply(null,[this].concat([].slice.call(k)))},analogous:function(){return this._applyCombination(oe,arguments)},complement:function(){return this._applyCombination(we,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(Ae,arguments)},triad:function(){return this._applyCombination(Z,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},B.fromRatio=function(x,k){if(typeof x=="object"){var D={};for(var $ in x)x.hasOwnProperty($)&&($==="a"?D[$]=x[$]:D[$]=Re(x[$]));x=D}return B(x,k)};function C(x){var k={r:0,g:0,b:0},D=1,$=null,L=null,A=null,ie=!1,be=!1;return typeof x=="string"&&(x=N(x)),typeof x=="object"&&(X(x.r)&&X(x.g)&&X(x.b)?(k=E(x.r,x.g,x.b),ie=!0,be=String(x.r).substr(-1)==="%"?"prgb":"rgb"):X(x.h)&&X(x.s)&&X(x.v)?($=Re(x.s),L=Re(x.v),k=P(x.h,$,L),ie=!0,be="hsv"):X(x.h)&&X(x.s)&&X(x.l)&&($=Re(x.s),A=Re(x.l),k=S(x.h,$,A),ie=!0,be="hsl"),x.hasOwnProperty("a")&&(D=x.a)),D=V(D),{ok:ie,format:x.format||be,r:Y(255,J(k.r,0)),g:Y(255,J(k.g,0)),b:Y(255,J(k.b,0)),a:D}}function E(x,k,D){return{r:m(x,255)*255,g:m(k,255)*255,b:m(D,255)*255}}function M(x,k,D){x=m(x,255),k=m(k,255),D=m(D,255);var $=J(x,k,D),L=Y(x,k,D),A,ie,be=($+L)/2;if($==L)A=ie=0;else{var Me=$-L;ie=be>.5?Me/(2-$-L):Me/($+L);switch($){case x:A=(k-D)/Me+(k<D?6:0);break;case k:A=(D-x)/Me+2;break;case D:A=(x-k)/Me+4;break}A/=6}return{h:A,s:ie,l:be}}function S(x,k,D){var $,L,A;x=m(x,360),k=m(k,100),D=m(D,100);function ie(Ue,ze,He){return He<0&&(He+=1),He>1&&(He-=1),He<1/6?Ue+(ze-Ue)*6*He:He<1/2?ze:He<2/3?Ue+(ze-Ue)*(2/3-He)*6:Ue}if(k===0)$=L=A=D;else{var be=D<.5?D*(1+k):D+k-D*k,Me=2*D-be;$=ie(Me,be,x+1/3),L=ie(Me,be,x),A=ie(Me,be,x-1/3)}return{r:$*255,g:L*255,b:A*255}}function w(x,k,D){x=m(x,255),k=m(k,255),D=m(D,255);var $=J(x,k,D),L=Y(x,k,D),A,ie,be=$,Me=$-L;if(ie=$===0?0:Me/$,$==L)A=0;else{switch($){case x:A=(k-D)/Me+(k<D?6:0);break;case k:A=(D-x)/Me+2;break;case D:A=(x-k)/Me+4;break}A/=6}return{h:A,s:ie,v:be}}function P(x,k,D){x=m(x,360)*6,k=m(k,100),D=m(D,100);var $=ke.floor(x),L=x-$,A=D*(1-k),ie=D*(1-L*k),be=D*(1-(1-L)*k),Me=$%6,Ue=[D,ie,A,A,be,D][Me],ze=[be,D,D,ie,A,A][Me],He=[A,A,be,D,D,ie][Me];return{r:Ue*255,g:ze*255,b:He*255}}function g(x,k,D,$){var L=[We(ue(x).toString(16)),We(ue(k).toString(16)),We(ue(D).toString(16))];return $&&L[0].charAt(0)==L[0].charAt(1)&&L[1].charAt(0)==L[1].charAt(1)&&L[2].charAt(0)==L[2].charAt(1)?L[0].charAt(0)+L[1].charAt(0)+L[2].charAt(0):L.join("")}function y(x,k,D,$,L){var A=[We(ue(x).toString(16)),We(ue(k).toString(16)),We(ue(D).toString(16)),We(Pe($))];return L&&A[0].charAt(0)==A[0].charAt(1)&&A[1].charAt(0)==A[1].charAt(1)&&A[2].charAt(0)==A[2].charAt(1)&&A[3].charAt(0)==A[3].charAt(1)?A[0].charAt(0)+A[1].charAt(0)+A[2].charAt(0)+A[3].charAt(0):A.join("")}function O(x,k,D,$){var L=[We(Pe($)),We(ue(x).toString(16)),We(ue(k).toString(16)),We(ue(D).toString(16))];return L.join("")}B.equals=function(x,k){return!x||!k?!1:B(x).toRgbString()==B(k).toRgbString()},B.random=function(){return B.fromRatio({r:F(),g:F(),b:F()})};function W(x,k){k=k===0?0:k||10;var D=B(x).toHsl();return D.s-=k/100,D.s=p(D.s),B(D)}function de(x,k){k=k===0?0:k||10;var D=B(x).toHsl();return D.s+=k/100,D.s=p(D.s),B(D)}function pe(x){return B(x).desaturate(100)}function re(x,k){k=k===0?0:k||10;var D=B(x).toHsl();return D.l+=k/100,D.l=p(D.l),B(D)}function xe(x,k){k=k===0?0:k||10;var D=B(x).toRgb();return D.r=J(0,Y(255,D.r-ue(255*-(k/100)))),D.g=J(0,Y(255,D.g-ue(255*-(k/100)))),D.b=J(0,Y(255,D.b-ue(255*-(k/100)))),B(D)}function ye(x,k){k=k===0?0:k||10;var D=B(x).toHsl();return D.l-=k/100,D.l=p(D.l),B(D)}function Q(x,k){var D=B(x).toHsl(),$=(D.h+k)%360;return D.h=$<0?360+$:$,B(D)}function we(x){var k=B(x).toHsl();return k.h=(k.h+180)%360,B(k)}function Z(x){var k=B(x).toHsl(),D=k.h;return[B(x),B({h:(D+120)%360,s:k.s,l:k.l}),B({h:(D+240)%360,s:k.s,l:k.l})]}function j(x){var k=B(x).toHsl(),D=k.h;return[B(x),B({h:(D+90)%360,s:k.s,l:k.l}),B({h:(D+180)%360,s:k.s,l:k.l}),B({h:(D+270)%360,s:k.s,l:k.l})]}function Ae(x){var k=B(x).toHsl(),D=k.h;return[B(x),B({h:(D+72)%360,s:k.s,l:k.l}),B({h:(D+216)%360,s:k.s,l:k.l})]}function oe(x,k,D){k=k||6,D=D||30;var $=B(x).toHsl(),L=360/D,A=[B(x)];for($.h=($.h-(L*k>>1)+720)%360;--k;)$.h=($.h+L)%360,A.push(B($));return A}function K(x,k){k=k||6;for(var D=B(x).toHsv(),$=D.h,L=D.s,A=D.v,ie=[],be=1/k;k--;)ie.push(B({h:$,s:L,v:A})),A=(A+be)%1;return ie}B.mix=function(x,k,D){D=D===0?0:D||50;var $=B(x).toRgb(),L=B(k).toRgb(),A=D/100,ie={r:(L.r-$.r)*A+$.r,g:(L.g-$.g)*A+$.g,b:(L.b-$.b)*A+$.b,a:(L.a-$.a)*A+$.a};return B(ie)},B.readability=function(x,k){var D=B(x),$=B(k);return(ke.max(D.getLuminance(),$.getLuminance())+.05)/(ke.min(D.getLuminance(),$.getLuminance())+.05)},B.isReadable=function(x,k,D){var $=B.readability(x,k),L,A;A=!1,L=I(D);switch(L.level+L.size){case"AAsmall":case"AAAlarge":A=$>=4.5;break;case"AAlarge":A=$>=3;break;case"AAAsmall":A=$>=7;break}return A},B.mostReadable=function(x,k,D){var $=null,L=0,A,ie,be,Me;D=D||{},ie=D.includeFallbackColors,be=D.level,Me=D.size;for(var Ue=0;Ue<k.length;Ue++)A=B.readability(x,k[Ue]),A>L&&(L=A,$=B(k[Ue]));return B.isReadable(x,$,{level:be,size:Me})||!ie?$:(D.includeFallbackColors=!1,B.mostReadable(x,["#fff","#000"],D))};var z=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},te=B.hexNames=G(z);function G(x){var k={};for(var D in x)x.hasOwnProperty(D)&&(k[x[D]]=D);return k}function V(x){return x=parseFloat(x),(isNaN(x)||x<0||x>1)&&(x=1),x}function m(x,k){ae(x)&&(x="100%");var D=Te(x);return x=Y(k,J(0,parseFloat(x))),D&&(x=parseInt(x*k,10)/100),ke.abs(x-k)<1e-6?1:x%k/parseFloat(k)}function p(x){return Y(1,J(0,x))}function H(x){return parseInt(x,16)}function ae(x){return typeof x=="string"&&x.indexOf(".")!=-1&&parseFloat(x)===1}function Te(x){return typeof x=="string"&&x.indexOf("%")!=-1}function We(x){return x.length==1?"0"+x:""+x}function Re(x){return x<=1&&(x=x*100+"%"),x}function Pe(x){return ke.round(parseFloat(x)*255).toString(16)}function ne(x){return H(x)/255}var _=function(){var x="[-\\+]?\\d+%?",k="[-\\+]?\\d*\\.\\d+%?",D="(?:"+k+")|(?:"+x+")",$="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",L="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?";return{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+$),rgba:new RegExp("rgba"+L),hsl:new RegExp("hsl"+$),hsla:new RegExp("hsla"+L),hsv:new RegExp("hsv"+$),hsva:new RegExp("hsva"+L),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function X(x){return!!_.CSS_UNIT.exec(x)}function N(x){x=x.replace(Ee,"").replace(De,"").toLowerCase();var k=!1;if(z[x])x=z[x],k=!0;else if(x=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var D;return(D=_.rgb.exec(x))?{r:D[1],g:D[2],b:D[3]}:(D=_.rgba.exec(x))?{r:D[1],g:D[2],b:D[3],a:D[4]}:(D=_.hsl.exec(x))?{h:D[1],s:D[2],l:D[3]}:(D=_.hsla.exec(x))?{h:D[1],s:D[2],l:D[3],a:D[4]}:(D=_.hsv.exec(x))?{h:D[1],s:D[2],v:D[3]}:(D=_.hsva.exec(x))?{h:D[1],s:D[2],v:D[3],a:D[4]}:(D=_.hex8.exec(x))?{r:H(D[1]),g:H(D[2]),b:H(D[3]),a:ne(D[4]),format:k?"name":"hex8"}:(D=_.hex6.exec(x))?{r:H(D[1]),g:H(D[2]),b:H(D[3]),format:k?"name":"hex"}:(D=_.hex4.exec(x))?{r:H(D[1]+""+D[1]),g:H(D[2]+""+D[2]),b:H(D[3]+""+D[3]),a:ne(D[4]+""+D[4]),format:k?"name":"hex8"}:(D=_.hex3.exec(x))?{r:H(D[1]+""+D[1]),g:H(D[2]+""+D[2]),b:H(D[3]+""+D[3]),format:k?"name":"hex"}:!1}function I(x){var k,D;return x=x||{level:"AA",size:"small"},k=(x.level||"AA").toUpperCase(),D=(x.size||"small").toLowerCase(),k!=="AA"&&k!=="AAA"&&(k="AA"),D!=="small"&&D!=="large"&&(D="small"),{level:k,size:D}}mt.exports?mt.exports=B:!(q=function(){return B}.call(Ce,h,Ce,mt),q!==void 0&&(mt.exports=q))})(Math)},bT9E:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return ke});var q=h("VTBJ");function ke(Ee,De){var ge=Object(q.a)({},Ee);return Array.isArray(De)&&De.forEach(function(ue){delete ge[ue]}),ge}},c5Ni:function(mt,Ce,h){},dejd:function(mt,Ce,h){},dmUQ:function(mt,Ce,h){"use strict";var q=h("Ff2n"),ke=h("rePB"),Ee=h("1OyB"),De=h("vuIU"),ge=h("Ji7U"),ue=h("md7G"),Y=h("foSv"),J=h("q1tI"),F=h.n(J),B=h("TSYQ"),C=h.n(B),E=h("4IlW");function M(Z,j){var Ae=Object.keys(Z);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(Z);j&&(oe=oe.filter(function(K){return Object.getOwnPropertyDescriptor(Z,K).enumerable})),Ae.push.apply(Ae,oe)}return Ae}function S(Z){for(var j=1;j<arguments.length;j++){var Ae=arguments[j]!=null?arguments[j]:{};j%2?M(Object(Ae),!0).forEach(function(oe){Object(ke.a)(Z,oe,Ae[oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(Ae)):M(Object(Ae)).forEach(function(oe){Object.defineProperty(Z,oe,Object.getOwnPropertyDescriptor(Ae,oe))})}return Z}function w(Z){var j=P();return function(){var oe=Object(Y.a)(Z),K;if(j){var z=Object(Y.a)(this).constructor;K=Reflect.construct(oe,arguments,z)}else K=oe.apply(this,arguments);return Object(ue.a)(this,K)}}function P(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Z){return!1}}function g(){}function y(Z){Z.preventDefault()}var O=function(j){return j.replace(/[^\w.-]+/g,"")},W=200,de=600,pe=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,re=function(j){return j!=null},xe=function(j,Ae){return Ae===j||typeof Ae=="number"&&typeof j=="number"&&isNaN(Ae)&&isNaN(j)},ye=function(Z){Object(ge.a)(Ae,Z);var j=w(Ae);function Ae(oe){var K;Object(Ee.a)(this,Ae),K=j.call(this,oe),K.onKeyDown=function(G){var V=K.props,m=V.onKeyDown,p=V.onPressEnter;if(G.keyCode===E.a.UP){var H=K.getRatio(G);K.up(G,H,null),K.stop()}else if(G.keyCode===E.a.DOWN){var ae=K.getRatio(G);K.down(G,ae,null),K.stop()}else G.keyCode===E.a.ENTER&&p&&p(G);if(K.recordCursorPosition(),K.lastKeyCode=G.keyCode,m){for(var Te=arguments.length,We=new Array(Te>1?Te-1:0),Re=1;Re<Te;Re++)We[Re-1]=arguments[Re];m.apply(void 0,[G].concat(We))}},K.onKeyUp=function(G){var V=K.props.onKeyUp;if(K.stop(),K.recordCursorPosition(),V){for(var m=arguments.length,p=new Array(m>1?m-1:0),H=1;H<m;H++)p[H-1]=arguments[H];V.apply(void 0,[G].concat(p))}},K.onChange=function(G){var V=K.props.onChange;K.state.focused&&(K.inputting=!0),K.rawInput=K.props.parser(K.getValueFromEvent(G)),K.setState({inputValue:K.rawInput}),V(K.toNumber(K.rawInput))},K.onMouseUp=function(){var G=K.props.onMouseUp;K.recordCursorPosition(),G&&G.apply(void 0,arguments)},K.onFocus=function(){var G;K.setState({focused:!0}),(G=K.props).onFocus.apply(G,arguments)},K.onBlur=function(){var G=K.props.onBlur;K.inputting=!1,K.setState({focused:!1});var V=K.getCurrentValidValue(K.state.inputValue),m=K.setValue(V,g);if(G){var p=K.input.value,H=K.getInputDisplayValue({focus:!1,value:m});K.input.value=H&&Number(H),G.apply(void 0,arguments),K.input.value=p}},K.getRatio=function(G){var V=1;return G.metaKey||G.ctrlKey?V=.1:G.shiftKey&&(V=10),V},K.getFullNum=function(G){return isNaN(G)?G:/e/i.test(String(G))?Number(G).toFixed(18).replace(/\.?0+$/,""):G},K.getPrecision=function(G){if(re(K.props.precision))return K.props.precision;var V=String(G);if(V.indexOf("e-")>=0)return parseInt(V.slice(V.indexOf("e-")+2),10);var m=0;return V.indexOf(".")>=0&&(m=V.length-V.indexOf(".")-1),m},K.getInputDisplayValue=function(G){var V=G||K.state,m=V.focused,p=V.inputValue,H=V.value,ae;m?ae=p:ae=K.toPrecisionAsStep(H),ae==null&&(ae="");var Te=K.formatWrapper(ae);return re(K.props.decimalSeparator)&&(Te=Te.toString().replace(".",K.props.decimalSeparator)),Te},K.recordCursorPosition=function(){try{K.cursorStart=K.input.selectionStart,K.cursorEnd=K.input.selectionEnd,K.currentValue=K.input.value,K.cursorBefore=K.input.value.substring(0,K.cursorStart),K.cursorAfter=K.input.value.substring(K.cursorEnd)}catch(G){}},K.restoreByAfter=function(G){if(G===void 0)return!1;var V=K.input.value,m=V.lastIndexOf(G);if(m===-1)return!1;var p=K.cursorBefore.length;return K.lastKeyCode===E.a.DELETE&&K.cursorBefore.charAt(p-1)===G[0]?(K.fixCaret(p,p),!0):m+G.length===V.length?(K.fixCaret(m,m),!0):!1},K.partRestoreByAfter=function(G){return G===void 0?!1:Array.prototype.some.call(G,function(V,m){var p=G.substring(m);return K.restoreByAfter(p)})},K.isNotCompleteNumber=function(G){return isNaN(G)||G===""||G===null||G&&G.toString().indexOf(".")===G.toString().length-1},K.stop=function(){K.autoStepTimer&&clearTimeout(K.autoStepTimer)},K.down=function(G,V,m){K.pressingUpOrDown=!0,K.step("down",G,V,m)},K.up=function(G,V,m){K.pressingUpOrDown=!0,K.step("up",G,V,m)},K.saveInput=function(G){K.input=G};var z=oe.value;z===void 0&&(z=oe.defaultValue),K.state={focused:oe.autoFocus};var te=K.getValidValue(K.toNumber(z));return K.state=S(S({},K.state),{},{inputValue:K.toPrecisionAsStep(te),value:te}),K}return Object(De.a)(Ae,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(K){var z=this.props,te=z.value,G=z.onChange,V=z.max,m=z.min,p=this.state.focused;if(K){if(!xe(K.value,te)||!xe(K.max,V)||!xe(K.min,m)){var H=p?te:this.getValidValue(te),ae;this.pressingUpOrDown?ae=H:this.inputting?ae=this.rawInput:ae=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:ae})}var Te="value"in this.props?te:this.state.value;"max"in this.props&&K.max!==V&&typeof Te=="number"&&Te>V&&G&&G(V),"min"in this.props&&K.min!==m&&typeof Te=="number"&&Te<m&&G&&G(m)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var We=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===E.a.BACKSPACE?We=this.cursorStart-1:this.lastKeyCode===E.a.DELETE&&(We=this.cursorStart):We=this.input.value.length,this.fixCaret(We,We)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case E.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case E.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Re){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(K){var z=K;return z===""?z="":this.isNotCompleteNumber(parseFloat(z))?z=this.state.value:z=this.getValidValue(z),this.toNumber(z)}},{key:"getValueFromEvent",value:function(K){var z=K.target.value.trim().replace(/。/g,".");return re(this.props.decimalSeparator)&&(z=z.replace(this.props.decimalSeparator,".")),z}},{key:"getValidValue",value:function(K){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,G=parseFloat(K);return isNaN(G)?K:(G<z&&(G=z),G>te&&(G=te),G)}},{key:"setValue",value:function(K,z){var te=this.props.precision,G=this.isNotCompleteNumber(parseFloat(K))?null:parseFloat(K),V=this.state.value,m=V===void 0?null:V,p=this.state.inputValue,H=p===void 0?null:p,ae=typeof G=="number"?G.toFixed(te):"".concat(G),Te=G!==m||ae!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},z)):this.setState({value:G,inputValue:this.toPrecisionAsStep(K)},z),Te&&this.props.onChange(G),G}},{key:"getMaxPrecision",value:function(K){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=this.props,G=te.precision,V=te.step;if(re(G))return G;var m=this.getPrecision(z),p=this.getPrecision(V),H=this.getPrecision(K);return K?Math.max(H,m+p):m+p}},{key:"getPrecisionFactor",value:function(K){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=this.getMaxPrecision(K,z);return Math.pow(10,te)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(K){return this.props.formatter?this.props.formatter(K):K}},{key:"toPrecisionAsStep",value:function(K){if(this.isNotCompleteNumber(K)||K==="")return K;var z=Math.abs(this.getMaxPrecision(K));return isNaN(z)?K.toString():Number(K).toFixed(z)}},{key:"toNumber",value:function(K){var z=this.props.precision,te=this.state.focused,G=K&&K.length>16&&te;return this.isNotCompleteNumber(K)||G?K:re(z)?Math.round(K*Math.pow(10,z))/Math.pow(10,z):Number(K)}},{key:"upStep",value:function(K,z){var te=this.props.step,G=this.getPrecisionFactor(K,z),V=Math.abs(this.getMaxPrecision(K,z)),m=((G*K+G*te*z)/G).toFixed(V);return this.toNumber(m)}},{key:"downStep",value:function(K,z){var te=this.props.step,G=this.getPrecisionFactor(K,z),V=Math.abs(this.getMaxPrecision(K,z)),m=((G*K-G*te*z)/G).toFixed(V);return this.toNumber(m)}},{key:"step",value:function(K,z){var te=this,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,V=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var m=this.props;if(m.disabled)return;var p=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(p))return;var H=this["".concat(K,"Step")](p,G),ae=H>m.max||H<m.min;if(H>m.max?H=m.max:H<m.min&&(H=m.min),this.setValue(H,null),this.setState({focused:!0},function(){te.pressingUpOrDown=!1}),ae)return;this.autoStepTimer=setTimeout(function(){te[K](z,G,!0)},V?W:de)}},{key:"fixCaret",value:function(K,z){if(K===void 0||z===void 0||!this.input||!this.input.value)return;try{var te=this.input.selectionStart,G=this.input.selectionEnd;(K!==te||z!==G)&&this.input.setSelectionRange(K,z)}catch(V){}}},{key:"render",value:function(){var K,z=this.props,te=z.prefixCls,G=z.disabled,V=z.readOnly,m=z.useTouch,p=z.autoComplete,H=z.upHandler,ae=z.downHandler,Te=z.className,We=z.max,Re=z.min,Pe=z.style,ne=z.title,_=z.onMouseEnter,X=z.onMouseLeave,N=z.onMouseOver,I=z.onMouseOut,x=z.required,k=z.onClick,D=z.tabIndex,$=z.type,L=z.placeholder,A=z.id,ie=z.inputMode,be=z.pattern,Me=z.step,Ue=z.maxLength,ze=z.autoFocus,He=z.name,nt=z.onPaste,Oe=z.onInput,Fe=Object(q.a)(z,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Be=this.state,Ge=Be.value,Ye=Be.focused,Xe=C()(te,(K={},Object(ke.a)(K,Te,!!Te),Object(ke.a)(K,"".concat(te,"-disabled"),G),Object(ke.a)(K,"".concat(te,"-focused"),Ye),K)),Le={};Object.keys(Fe).forEach(function(ce){(ce.substr(0,5)==="data-"||ce.substr(0,5)==="aria-"||ce==="role")&&(Le[ce]=Fe[ce])});var Ve=!V&&!G,et=this.getInputDisplayValue(null),_e=(Ge||Ge===0)&&(isNaN(Ge)||Number(Ge)>=We),Ke=(Ge||Ge===0)&&(isNaN(Ge)||Number(Ge)<=Re),me=_e||G||V,se=Ke||G||V,ve=C()("".concat(te,"-handler"),"".concat(te,"-handler-up"),Object(ke.a)({},"".concat(te,"-handler-up-disabled"),me)),R=C()("".concat(te,"-handler"),"".concat(te,"-handler-down"),Object(ke.a)({},"".concat(te,"-handler-down-disabled"),se)),U=m?{onTouchStart:me?g:this.up,onTouchEnd:this.stop}:{onMouseDown:me?g:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ee=m?{onTouchStart:se?g:this.down,onTouchEnd:this.stop}:{onMouseDown:se?g:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return F.a.createElement("div",{className:Xe,style:Pe,title:ne,onMouseEnter:_,onMouseLeave:X,onMouseOver:N,onMouseOut:I,onFocus:function(){return null},onBlur:function(){return null}},F.a.createElement("div",{className:"".concat(te,"-handler-wrap")},F.a.createElement("span",Object.assign({unselectable:"on"},U,{role:"button","aria-label":"Increase Value","aria-disabled":me,className:ve}),H||F.a.createElement("span",{unselectable:"on",className:"".concat(te,"-handler-up-inner"),onClick:y})),F.a.createElement("span",Object.assign({unselectable:"on"},ee,{role:"button","aria-label":"Decrease Value","aria-disabled":se,className:R}),ae||F.a.createElement("span",{unselectable:"on",className:"".concat(te,"-handler-down-inner"),onClick:y}))),F.a.createElement("div",{className:"".concat(te,"-input-wrap")},F.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Re,"aria-valuemax":We,"aria-valuenow":Ge,required:x,type:$,placeholder:L,onPaste:nt,onClick:k,onMouseUp:this.onMouseUp,className:"".concat(te,"-input"),tabIndex:D,autoComplete:p,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:g,onKeyUp:Ve?this.onKeyUp:g,autoFocus:ze,maxLength:Ue,readOnly:V,disabled:G,max:We,min:Re,step:Me,name:He,title:ne,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(et),pattern:be,inputMode:ie,onInput:Oe},Le))))}}]),Ae}(F.a.Component);ye.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:pe,min:-pe,step:1,style:{},onChange:g,onKeyDown:g,onPressEnter:g,onFocus:g,onBlur:g,parser:O,required:!1,autoComplete:"off"};var Q=ye,we=Ce.a=Q},fAei:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return W.a});var q=h("rePB"),ke=h("VTBJ"),Ee=h("KQm4"),De=h("1OyB"),ge=h("vuIU"),ue=h("Ji7U"),Y=h("LK+K"),J=h("q1tI"),F=h("4IlW"),B=h("Kwbf"),C=h("TSYQ"),E=h.n(C),M=h("sboe"),S=h("OZM5"),w=h("815F"),P=h("ODXe"),g=h("Ff2n"),y=h("+nKL"),O=h("8XRh"),W=h("WaYH"),de=function(Re,Pe){var ne=Re.className,_=Re.style,X=Re.motion,N=Re.motionNodes,I=Re.motionType,x=Re.onMotionStart,k=Re.onMotionEnd,D=Re.active,$=Re.treeNodeRequiredProps,L=Object(g.a)(Re,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),A=J.useState(!0),ie=Object(P.a)(A,2),be=ie[0],Me=ie[1],Ue=J.useContext(M.a),ze=Ue.prefixCls,He=J.useRef(!1),nt=function(){He.current||k(),He.current=!0};return Object(J.useEffect)(function(){N&&I==="hide"&&be&&Me(!1)},[N]),Object(J.useEffect)(function(){return N&&x(),function(){N&&nt()}},[]),N?J.createElement(O.default,Object.assign({ref:Pe,visible:be},X,{motionAppear:I==="show",onAppearEnd:nt,onLeaveEnd:nt}),function(Oe,Fe){var Be=Oe.className,Ge=Oe.style;return J.createElement("div",{ref:Fe,className:E()("".concat(ze,"-treenode-motion"),Be),style:Ge},N.map(function(Ye){var Xe=Ye.data,Le=Xe.key,Ve=Object(g.a)(Xe,["key"]),et=Ye.isStart,_e=Ye.isEnd;delete Ve.children;var Ke=Object(w.f)(Le,$);return J.createElement(W.a,Object.assign({},Ve,Ke,{active:D,data:Ye.data,key:Le,isStart:et,isEnd:_e}))}))}):J.createElement(W.a,Object.assign({domRef:Pe,className:ne,style:_},L,{active:D}))};de.displayName="MotionTreeNode";var pe=J.forwardRef(de),re=pe;function xe(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Pe=We.length,ne=Re.length;if(Math.abs(Pe-ne)!==1)return{add:!1,key:null};function _(X,N){var I=new Map;X.forEach(function(k){I.set(k,!0)});var x=N.filter(function(k){return!I.has(k)});return x.length===1?x[0]:null}return Pe<ne?{add:!0,key:_(We,Re)}:{add:!1,key:_(Re,We)}}function ye(We,Re,Pe){var ne=We.findIndex(function(I){var x=I.data;return x.key===Pe}),_=We[ne+1],X=Re.findIndex(function(I){var x=I.data;return x.key===Pe});if(_){var N=Re.findIndex(function(I){var x=I.data;return x.key===_.data.key});return Re.slice(X+1,N)}return Re.slice(X+1)}var Q={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},we=function(){},Z="RC_TREE_MOTION_".concat(Math.random()),j={key:Z},Ae={key:Z,level:0,index:0,pos:"0",node:j},oe={parent:null,children:[],pos:Ae.pos,data:j,isStart:[],isEnd:[]};function K(We,Re,Pe,ne){return Re===!1||!Pe?We:We.slice(0,Math.ceil(Pe/ne)+1)}function z(We){var Re=We.data.key,Pe=We.pos;return Object(w.e)(Re,Pe)}function te(We){for(var Re=String(We.data.key),Pe=We;Pe.parent;)Pe=Pe.parent,Re="".concat(Pe.data.key," > ").concat(Re);return Re}var G=function(Re,Pe){var ne=Re.prefixCls,_=Re.data,X=Re.selectable,N=Re.checkable,I=Re.expandedKeys,x=Re.selectedKeys,k=Re.checkedKeys,D=Re.loadedKeys,$=Re.loadingKeys,L=Re.halfCheckedKeys,A=Re.keyEntities,ie=Re.disabled,be=Re.dragging,Me=Re.dragOverNodeKey,Ue=Re.dropPosition,ze=Re.motion,He=Re.height,nt=Re.itemHeight,Oe=Re.virtual,Fe=Re.focusable,Be=Re.activeItem,Ge=Re.focused,Ye=Re.tabIndex,Xe=Re.onKeyDown,Le=Re.onFocus,Ve=Re.onBlur,et=Re.onActiveChange,_e=Re.onListChangeStart,Ke=Re.onListChangeEnd,me=Object(g.a)(Re,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),se=J.useRef(null);J.useImperativeHandle(Pe,function(){return{scrollTo:function(xt){se.current.scrollTo(xt)}}});var ve=J.useState(I),R=Object(P.a)(ve,2),U=R[0],ee=R[1],ce=J.useState(_),je=Object(P.a)(ce,2),Se=je[0],qe=je[1],at=J.useState(_),st=Object(P.a)(at,2),lt=st[0],St=st[1],Ot=J.useState([]),dt=Object(P.a)(Ot,2),Ht=dt[0],Nt=dt[1],At=J.useState(null),kt=Object(P.a)(At,2),Lt=kt[0],zt=kt[1];function rn(){qe(_),St(_),Nt([]),zt(null),Ke()}J.useEffect(function(){ee(I);var it=xe(U,I);if(it.key!==null)if(it.add){var xt=Se.findIndex(function(ln){var An=ln.data.key;return An===it.key}),Wt=K(ye(Se,_,it.key),Oe,He,nt),Ut=Se.slice();Ut.splice(xt+1,0,oe),St(Ut),Nt(Wt),zt("show")}else{var Xt=_.findIndex(function(ln){var An=ln.data.key;return An===it.key}),_t=K(ye(_,Se,it.key),Oe,He,nt),vt=_.slice();vt.splice(Xt+1,0,oe),St(vt),Nt(_t),zt("hide")}else Se!==_&&(qe(_),St(_))},[I,_]),J.useEffect(function(){be||rn()},[be]);var bt=ze?lt:_,Et={expandedKeys:I,selectedKeys:x,loadedKeys:D,loadingKeys:$,checkedKeys:k,halfCheckedKeys:L,dragOverNodeKey:Me,dropPosition:Ue,keyEntities:A};return J.createElement(J.Fragment,null,Ge&&Be&&J.createElement("span",{style:Q,"aria-live":"assertive"},te(Be)),J.createElement("div",{role:"tree"},J.createElement("input",{style:Q,disabled:Fe===!1||ie,tabIndex:Fe!==!1?Ye:null,onKeyDown:Xe,onFocus:Le,onBlur:Ve,value:"",onChange:we})),J.createElement(y.a,Object.assign({},me,{data:bt,itemKey:z,height:He,fullHeight:!1,virtual:Oe,itemHeight:nt,prefixCls:"".concat(ne,"-list"),ref:se}),function(it){var xt=it.pos,Wt=it.data,Ut=Wt.key,Xt=Object(g.a)(Wt,["key"]),_t=it.isStart,vt=it.isEnd,ln=Object(w.e)(Ut,xt);delete Xt.children;var An=Object(w.f)(ln,Et);return J.createElement(re,Object.assign({},Xt,An,{active:Be&&Ut===Be.data.key,pos:xt,data:it.data,isStart:_t,isEnd:vt,motion:ze,motionNodes:Ut===Z?Ht:null,motionType:Lt,onMotionStart:_e,onMotionEnd:rn,treeNodeRequiredProps:Et,onMouseMove:function(){et(null)}}))}))},V=J.forwardRef(G);V.displayName="NodeList";var m=V,p=h("NvD2"),H=function(We){Object(ue.a)(Pe,We);var Re=Object(Y.a)(Pe);function Pe(){var ne;return Object(De.a)(this,Pe),ne=Re.apply(this,arguments),ne.destroyed=!1,ne.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ne.listRef=J.createRef(),ne.onNodeDragStart=function(_,X){var N=ne.state,I=N.expandedKeys,x=N.keyEntities,k=ne.props.onDragStart,D=X.props.eventKey;ne.dragNode=X;var $=Object(S.b)(I,D);ne.setState({dragging:!0,dragNodesKeys:Object(S.g)(D,x)}),ne.setExpandedKeys($),k&&k({event:_,node:Object(w.b)(X.props)})},ne.onNodeDragEnter=function(_,X){var N=ne.state,I=N.expandedKeys,x=N.keyEntities,k=N.dragNodesKeys,D=ne.props.onDragEnter,$=X.props,L=$.pos,A=$.eventKey;if(!ne.dragNode||k.indexOf(A)!==-1)return;var ie=Object(S.c)(_,X);if(ne.dragNode.props.eventKey===A&&ie===0){ne.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ne.setState({dragOverNodeKey:A,dropPosition:ie}),ne.delayedDragEnterLogic||(ne.delayedDragEnterLogic={}),Object.keys(ne.delayedDragEnterLogic).forEach(function(be){clearTimeout(ne.delayedDragEnterLogic[be])}),ne.delayedDragEnterLogic[L]=window.setTimeout(function(){if(!ne.state.dragging)return;var be=Object(Ee.a)(I),Me=x[A];Me&&(Me.children||[]).length&&(be=Object(S.a)(I,A)),"expandedKeys"in ne.props||ne.setExpandedKeys(be),D&&D({event:_,node:Object(w.b)(X.props),expandedKeys:be})},400)},0)},ne.onNodeDragOver=function(_,X){var N=ne.state.dragNodesKeys,I=ne.props.onDragOver,x=X.props.eventKey;if(N.indexOf(x)!==-1)return;if(ne.dragNode&&x===ne.state.dragOverNodeKey){var k=Object(S.c)(_,X);if(k===ne.state.dropPosition)return;ne.setState({dropPosition:k})}I&&I({event:_,node:Object(w.b)(X.props)})},ne.onNodeDragLeave=function(_,X){var N=ne.props.onDragLeave;ne.setState({dragOverNodeKey:""}),N&&N({event:_,node:Object(w.b)(X.props)})},ne.onNodeDragEnd=function(_,X){var N=ne.props.onDragEnd;ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),N&&N({event:_,node:Object(w.b)(X.props)}),ne.dragNode=null},ne.onNodeDrop=function(_,X){var N=ne.state,I=N.dragNodesKeys,x=I===void 0?[]:I,k=N.dropPosition,D=ne.props.onDrop,$=X.props,L=$.eventKey,A=$.pos;if(ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),x.indexOf(L)!==-1){Object(B.a)(!1,"Can not drop to dragNode(include it's children node)");return}var ie=Object(S.k)(A),be={event:_,node:Object(w.b)(X.props),dragNode:ne.dragNode?Object(w.b)(ne.dragNode.props):null,dragNodesKeys:x.slice(),dropPosition:k+Number(ie[ie.length-1]),dropToGap:!1};k!==0&&(be.dropToGap=!0),D&&D(be),ne.dragNode=null},ne.cleanDragState=function(){var _=ne.state.dragging;_&&ne.setState({dragging:!1})},ne.onNodeClick=function(_,X){var N=ne.props.onClick;N&&N(_,X)},ne.onNodeDoubleClick=function(_,X){var N=ne.props.onDoubleClick;N&&N(_,X)},ne.onNodeSelect=function(_,X){var N=ne.state.selectedKeys,I=ne.state.keyEntities,x=ne.props,k=x.onSelect,D=x.multiple,$=X.selected,L=X.key,A=!$;A?D?N=Object(S.a)(N,L):N=[L]:N=Object(S.b)(N,L);var ie=N.map(function(be){var Me=I[be];return Me?Me.node:null}).filter(function(be){return be});ne.setUncontrolledState({selectedKeys:N}),k&&k(N,{event:"select",selected:A,node:X,selectedNodes:ie,nativeEvent:_.nativeEvent})},ne.onNodeCheck=function(_,X,N){var I=ne.state,x=I.keyEntities,k=I.checkedKeys,D=I.halfCheckedKeys,$=ne.props,L=$.checkStrictly,A=$.onCheck,ie=X.key,be,Me={event:"check",node:X,checked:N,nativeEvent:_.nativeEvent};if(L){var Ue=N?Object(S.a)(k,ie):Object(S.b)(k,ie),ze=Object(S.b)(D,ie);be={checked:Ue,halfChecked:ze},Me.checkedNodes=Ue.map(function(Ge){return x[Ge]}).filter(function(Ge){return Ge}).map(function(Ge){return Ge.node}),ne.setUncontrolledState({checkedKeys:Ue})}else{var He=Object(p.a)([].concat(Object(Ee.a)(k),[ie]),!0,x),nt=He.checkedKeys,Oe=He.halfCheckedKeys;if(!N){var Fe=new Set(nt);Fe.delete(ie);var Be=Object(p.a)(Array.from(Fe),{checked:!1,halfCheckedKeys:Oe},x);nt=Be.checkedKeys,Oe=Be.halfCheckedKeys}be=nt,Me.checkedNodes=[],Me.checkedNodesPositions=[],Me.halfCheckedKeys=Oe,nt.forEach(function(Ge){var Ye=x[Ge];if(!Ye)return;var Xe=Ye.node,Le=Ye.pos;Me.checkedNodes.push(Xe),Me.checkedNodesPositions.push({node:Xe,pos:Le})}),ne.setUncontrolledState({checkedKeys:nt},!1,{halfCheckedKeys:Oe})}A&&A(be,Me)},ne.onNodeLoad=function(_){return new Promise(function(X){ne.setState(function(N){var I=N.loadedKeys,x=I===void 0?[]:I,k=N.loadingKeys,D=k===void 0?[]:k,$=ne.props,L=$.loadData,A=$.onLoad,ie=_.key;if(!L||x.indexOf(ie)!==-1||D.indexOf(ie)!==-1)return{};var be=L(_);return be.then(function(){var Me=ne.state,Ue=Me.loadedKeys,ze=Me.loadingKeys,He=Object(S.a)(Ue,ie),nt=Object(S.b)(ze,ie);A&&A(He,{event:"load",node:_}),ne.setUncontrolledState({loadedKeys:He}),ne.setState({loadingKeys:nt}),X()}),{loadingKeys:Object(S.a)(D,ie)}})})},ne.onNodeMouseEnter=function(_,X){var N=ne.props.onMouseEnter;N&&N({event:_,node:X})},ne.onNodeMouseLeave=function(_,X){var N=ne.props.onMouseLeave;N&&N({event:_,node:X})},ne.onNodeContextMenu=function(_,X){var N=ne.props.onRightClick;N&&(_.preventDefault(),N({event:_,node:X}))},ne.onFocus=function(){var _=ne.props.onFocus;ne.setState({focused:!0}),_&&_.apply(void 0,arguments)},ne.onBlur=function(){var _=ne.props.onBlur;ne.setState({focused:!1}),ne.onActiveChange(null),_&&_.apply(void 0,arguments)},ne.getTreeNodeRequiredProps=function(){var _=ne.state,X=_.expandedKeys,N=_.selectedKeys,I=_.loadedKeys,x=_.loadingKeys,k=_.checkedKeys,D=_.halfCheckedKeys,$=_.dragOverNodeKey,L=_.dropPosition,A=_.keyEntities;return{expandedKeys:X||[],selectedKeys:N||[],loadedKeys:I||[],loadingKeys:x||[],checkedKeys:k||[],halfCheckedKeys:D||[],dragOverNodeKey:$,dropPosition:L,keyEntities:A}},ne.setExpandedKeys=function(_){var X=ne.state.treeData,N=Object(w.d)(X,_);ne.setUncontrolledState({expandedKeys:_,flattenNodes:N},!0)},ne.onNodeExpand=function(_,X){var N=ne.state.expandedKeys,I=ne.state.listChanging,x=ne.props,k=x.onExpand,D=x.loadData,$=X.key,L=X.expanded;if(I)return;var A=N.indexOf($),ie=!L;if(Object(B.a)(L&&A!==-1||!L&&A===-1,"Expand state not sync with index check"),ie?N=Object(S.a)(N,$):N=Object(S.b)(N,$),ne.setExpandedKeys(N),k&&k(N,{node:X,expanded:ie,nativeEvent:_.nativeEvent}),ie&&D){var be=ne.onNodeLoad(X);be&&be.then(function(){var Me=Object(w.d)(ne.state.treeData,N);ne.setUncontrolledState({flattenNodes:Me})})}},ne.onListChangeStart=function(){ne.setUncontrolledState({listChanging:!0})},ne.onListChangeEnd=function(){setTimeout(function(){ne.setUncontrolledState({listChanging:!1})})},ne.onActiveChange=function(_){var X=ne.state.activeKey,N=ne.props.onActiveChange;if(X===_)return;ne.setState({activeKey:_}),_!==null&&ne.scrollTo({key:_}),N&&N(_)},ne.getActiveItem=function(){var _=ne.state,X=_.activeKey,N=_.flattenNodes;return X===null?null:N.find(function(I){var x=I.data.key;return x===X})||null},ne.offsetActiveKey=function(_){var X=ne.state,N=X.flattenNodes,I=X.activeKey,x=N.findIndex(function($){var L=$.data.key;return L===I});x===-1&&_<0&&(x=N.length),x=(x+_+N.length)%N.length;var k=N[x];if(k){var D=k.data.key;ne.onActiveChange(D)}else ne.onActiveChange(null)},ne.onKeyDown=function(_){var X=ne.state,N=X.activeKey,I=X.expandedKeys,x=X.checkedKeys,k=ne.props,D=k.onKeyDown,$=k.checkable,L=k.selectable;switch(_.which){case F.a.UP:{ne.offsetActiveKey(-1),_.preventDefault();break}case F.a.DOWN:{ne.offsetActiveKey(1),_.preventDefault();break}}var A=ne.getActiveItem();if(A&&A.data){var ie=ne.getTreeNodeRequiredProps(),be=A.data.isLeaf===!1||!!(A.data.children||[]).length,Me=Object(w.b)(Object(ke.a)(Object(ke.a)({},Object(w.f)(N,ie)),{},{data:A.data,active:!0}));switch(_.which){case F.a.LEFT:{be&&I.includes(N)?ne.onNodeExpand({},Me):A.parent&&ne.onActiveChange(A.parent.data.key),_.preventDefault();break}case F.a.RIGHT:{be&&!I.includes(N)?ne.onNodeExpand({},Me):A.children&&A.children.length&&ne.onActiveChange(A.children[0].data.key),_.preventDefault();break}case F.a.ENTER:case F.a.SPACE:{$&&!Me.disabled&&Me.checkable!==!1&&!Me.disableCheckbox?ne.onNodeCheck({},Me,!x.includes(N)):!$&&L&&!Me.disabled&&Me.selectable!==!1&&ne.onNodeSelect({},Me);break}}}D&&D(_)},ne.setUncontrolledState=function(_){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ne.destroyed)return;var I=!1,x=!0,k={};Object.keys(_).forEach(function(D){if(D in ne.props){x=!1;return}I=!0,k[D]=_[D]}),I&&(!X||x)&&ne.setState(Object(ke.a)(Object(ke.a)({},k),N))},ne.scrollTo=function(_){ne.listRef.current.scrollTo(_)},ne}return Object(ge.a)(Pe,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var _,X=this.state,N=X.focused,I=X.flattenNodes,x=X.keyEntities,k=X.dragging,D=X.activeKey,$=this.props,L=$.prefixCls,A=$.className,ie=$.style,be=$.showLine,Me=$.focusable,Ue=$.tabIndex,ze=Ue===void 0?0:Ue,He=$.selectable,nt=$.showIcon,Oe=$.icon,Fe=$.switcherIcon,Be=$.draggable,Ge=$.checkable,Ye=$.checkStrictly,Xe=$.disabled,Le=$.motion,Ve=$.loadData,et=$.filterTreeNode,_e=$.height,Ke=$.itemHeight,me=$.virtual,se=$.titleRender,ve=$.onContextMenu,R=Object(S.f)(this.props);return J.createElement(M.a.Provider,{value:{prefixCls:L,selectable:He,showIcon:nt,icon:Oe,switcherIcon:Fe,draggable:Be,checkable:Ge,checkStrictly:Ye,disabled:Xe,keyEntities:x,loadData:Ve,filterTreeNode:et,titleRender:se,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},J.createElement("div",{className:E()(L,A,(_={},Object(q.a)(_,"".concat(L,"-show-line"),be),Object(q.a)(_,"".concat(L,"-focused"),N),Object(q.a)(_,"".concat(L,"-active-focused"),D!==null),_))},J.createElement(m,Object.assign({ref:this.listRef,prefixCls:L,style:ie,data:I,disabled:Xe,selectable:He,checkable:!!Ge,motion:Le,dragging:k,height:_e,itemHeight:Ke,virtual:me,focusable:Me,focused:N,tabIndex:ze,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ve},this.getTreeNodeRequiredProps(),R))))}}],[{key:"getDerivedStateFromProps",value:function(_,X){var N=X.prevProps,I={prevProps:_};function x(Oe){return!N&&Oe in _||N&&N[Oe]!==_[Oe]}var k;if(x("treeData")?k=_.treeData:x("children")&&(Object(B.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),k=Object(w.c)(_.children)),k){I.treeData=k;var D=Object(w.a)(k);I.keyEntities=Object(ke.a)(Object(q.a)({},Z,Ae),D.keyEntities)}var $=I.keyEntities||X.keyEntities;if(x("expandedKeys")||N&&x("autoExpandParent"))I.expandedKeys=_.autoExpandParent||!N&&_.defaultExpandParent?Object(S.e)(_.expandedKeys,$):_.expandedKeys;else if(!N&&_.defaultExpandAll){var L=Object(ke.a)({},$);delete L[Z],I.expandedKeys=Object.keys(L).map(function(Oe){return L[Oe].key})}else!N&&_.defaultExpandedKeys&&(I.expandedKeys=_.autoExpandParent||_.defaultExpandParent?Object(S.e)(_.defaultExpandedKeys,$):_.defaultExpandedKeys);if(I.expandedKeys||delete I.expandedKeys,k||I.expandedKeys){var A=Object(w.d)(k||X.treeData,I.expandedKeys||X.expandedKeys);I.flattenNodes=A}if(_.selectable&&(x("selectedKeys")?I.selectedKeys=Object(S.d)(_.selectedKeys,_):!N&&_.defaultSelectedKeys&&(I.selectedKeys=Object(S.d)(_.defaultSelectedKeys,_))),_.checkable){var ie;if(x("checkedKeys")?ie=Object(S.j)(_.checkedKeys)||{}:!N&&_.defaultCheckedKeys?ie=Object(S.j)(_.defaultCheckedKeys)||{}:k&&(ie=Object(S.j)(_.checkedKeys)||{checkedKeys:X.checkedKeys,halfCheckedKeys:X.halfCheckedKeys}),ie){var be=ie,Me=be.checkedKeys,Ue=Me===void 0?[]:Me,ze=be.halfCheckedKeys,He=ze===void 0?[]:ze;if(!_.checkStrictly){var nt=Object(p.a)(Ue,!0,$);Ue=nt.checkedKeys,He=nt.halfCheckedKeys}I.checkedKeys=Ue,I.halfCheckedKeys=He}}return x("loadedKeys")&&(I.loadedKeys=_.loadedKeys),I}}]),Pe}(J.Component);H.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},H.TreeNode=W.a;var ae=H,Te=Ce.b=ae},fjLI:function(mt,Ce,h){"use strict";h.d(Ce,"e",function(){return B}),h.d(Ce,"a",function(){return C}),h.d(Ce,"c",function(){return E}),h.d(Ce,"d",function(){return S}),h.d(Ce,"b",function(){return w});var q=h("8HAY"),ke=h("Cg/j"),Ee=h("T8No"),De=h("nnTU"),ge=h("MI8n"),ue=function(){var P=function(g,y){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,W){O.__proto__=W}||function(O,W){for(var de in W)W.hasOwnProperty(de)&&(O[de]=W[de])},P(g,y)};return function(g,y){P(g,y);function O(){this.constructor=g}g.prototype=y===null?Object.create(y):(O.prototype=y.prototype,new O)}}(),Y=function(P,g,y,O){var W=arguments.length,de=W<3?g:O===null?O=Object.getOwnPropertyDescriptor(g,y):O,pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")de=Reflect.decorate(P,g,y,O);else for(var re=P.length-1;re>=0;re--)(pe=P[re])&&(de=(W<3?pe(de):W>3?pe(g,y,de):pe(g,y))||de);return W>3&&de&&Object.defineProperty(g,y,de),de},J=function(P,g){return function(y,O){g(y,O,P)}},F=function(){for(var P=0,g=0,y=arguments.length;g<y;g++)P+=arguments[g].length;for(var O=Array(P),W=0,g=0;g<y;g++)for(var de=arguments[g],pe=0,re=de.length;pe<re;pe++,W++)O[W]=de[pe];return O};function B(P){return P.command!==void 0}var C=Object(ke.c)("menuService"),E=new(function(){function P(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ge.a,this.onDidChangeMenu=this._onDidChangeMenu.event}return P.prototype.addCommand=function(g){var y=this;return this._commands.set(g.id,g),this._onDidChangeMenu.fire(0),{dispose:function(){y._commands.delete(g.id)&&y._onDidChangeMenu.fire(0)}}},P.prototype.getCommand=function(g){return this._commands.get(g)},P.prototype.getCommands=function(){var g=new Map;return this._commands.forEach(function(y,O){return g.set(O,y)}),g},P.prototype.appendMenuItem=function(g,y){var O=this,W=this._menuItems.get(g);return W?W.push(y):(W=[y],this._menuItems.set(g,W)),this._onDidChangeMenu.fire(g),{dispose:function(){var de=W.indexOf(y);de>=0&&(W.splice(de,1),O._onDidChangeMenu.fire(g))}}},P.prototype.getMenuItems=function(g){var y=(this._menuItems.get(g)||[]).slice(0);return g===0&&this._appendImplicitItems(y),y},P.prototype._appendImplicitItems=function(g){for(var y=new Set,O=g.filter(function(ye){return B(ye)}),W=0,de=O;W<de.length;W++){var pe=de[W],re=pe.command,xe=pe.alt;y.add(re.id),xe&&y.add(xe.id)}this._commands.forEach(function(ye,Q){y.has(Q)||g.push({command:ye})})},P}()),M=function(P){ue(g,P);function g(y,O,W){var de=P.call(this,y,O)||this;return de._commandService=W,de}return g.prototype.run=function(){for(var y,O=[],W=0;W<arguments.length;W++)O[W]=arguments[W];return(y=this._commandService).executeCommand.apply(y,F([this.id],O))},g=Y([J(2,De.b)],g),g}(q.a),S=function(P){ue(g,P);function g(y){var O=this;return typeof y.title=="string"?O=P.call(this,"",y.title,"submenu")||this:O=P.call(this,"",y.title.value,"submenu")||this,O.item=y,O}return g}(q.a),w=function(P){ue(g,P);function g(y,O,W,de,pe){var re=this;return typeof y.title=="string"?re=P.call(this,y.id,y.title,pe)||this:re=P.call(this,y.id,y.title.value,pe)||this,re._cssClass=void 0,re._enabled=!y.precondition||de.contextMatchesRules(y.precondition),re._checked=Boolean(y.toggled&&de.contextMatchesRules(y.toggled)),re._options=W||{},re.item=y,re.alt=O?new g(O,void 0,re._options,de,pe):void 0,re}return g.prototype.dispose=function(){this.alt&&this.alt.dispose(),P.prototype.dispose.call(this)},g.prototype.run=function(){for(var y=[],O=0;O<arguments.length;O++)y[O]=arguments[O];var W=[];return this._options.arg&&(W=F(W,[this._options.arg])),this._options.shouldForwardArgs&&(W=F(W,y)),P.prototype.run.apply(this,W)},g=Y([J(3,Ee.c),J(4,De.b)],g),g}(M)},gJ3r:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return q});var q=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},h78n:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return K});var q=h("q1tI"),ke=h.n(q),Ee=h("TSYQ"),De=h.n(Ee),ge={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},ue=function(G){var V=G.map(function(){return Object(q.useRef)()}),m=Object(q.useRef)();return Object(q.useEffect)(function(){var p=Date.now(),H=!1;Object.keys(V).forEach(function(ae){var Te=V[ae].current;if(!Te)return;H=!0;var We=Te.style;We.transitionDuration=".3s, .3s, .3s, .06s",m.current&&p-m.current<100&&(We.transitionDuration="0s, 0s")}),H&&(m.current=Date.now())}),[V]};function Y(){return Y=Object.assign||function(te){for(var G=1;G<arguments.length;G++){var V=arguments[G];for(var m in V)Object.prototype.hasOwnProperty.call(V,m)&&(te[m]=V[m])}return te},Y.apply(this,arguments)}function J(te,G){return M(te)||E(te,G)||B(te,G)||F()}function F(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(te,G){if(!te)return;if(typeof te=="string")return C(te,G);var V=Object.prototype.toString.call(te).slice(8,-1);if(V==="Object"&&te.constructor&&(V=te.constructor.name),V==="Map"||V==="Set")return Array.from(te);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return C(te,G)}function C(te,G){(G==null||G>te.length)&&(G=te.length);for(var V=0,m=new Array(G);V<G;V++)m[V]=te[V];return m}function E(te,G){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(te)))return;var V=[],m=!0,p=!1,H=void 0;try{for(var ae=te[Symbol.iterator](),Te;!(m=(Te=ae.next()).done)&&!(V.push(Te.value),G&&V.length===G);m=!0);}catch(We){p=!0,H=We}finally{try{!m&&ae.return!=null&&ae.return()}finally{if(p)throw H}}return V}function M(te){if(Array.isArray(te))return te}function S(te,G){if(te==null)return{};var V=w(te,G),m,p;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(te);for(p=0;p<H.length;p++){if(m=H[p],G.indexOf(m)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(te,m))continue;V[m]=te[m]}}return V}function w(te,G){if(te==null)return{};var V={},m=Object.keys(te),p,H;for(H=0;H<m.length;H++){if(p=m[H],G.indexOf(p)>=0)continue;V[p]=te[p]}return V}var P=function(G){var V=G.className,m=G.percent,p=G.prefixCls,H=G.strokeColor,ae=G.strokeLinecap,Te=G.strokeWidth,We=G.style,Re=G.trailColor,Pe=G.trailWidth,ne=G.transition,_=S(G,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete _.gapPosition;var X=Array.isArray(m)?m:[m],N=Array.isArray(H)?H:[H],I=ue(X),x=J(I,1),k=x[0],D=Te/2,$=100-Te/2,L="M ".concat(ae==="round"?D:0,",").concat(D,`
L `).concat(ae==="round"?$:100,",").concat(D),A="0 0 100 ".concat(Te),ie=0;return ke.a.createElement("svg",Y({className:De()("".concat(p,"-line"),V),viewBox:A,preserveAspectRatio:"none",style:We},_),ke.a.createElement("path",{className:"".concat(p,"-line-trail"),d:L,strokeLinecap:ae,stroke:Re,strokeWidth:Pe||Te,fillOpacity:"0"}),X.map(function(be,Me){var Ue={strokeDasharray:"".concat(be,"px, 100px"),strokeDashoffset:"-".concat(ie,"px"),transition:ne||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ze=N[Me]||N[N.length-1];return ie+=be,ke.a.createElement("path",{key:Me,className:"".concat(p,"-line-path"),d:L,strokeLinecap:ae,stroke:ze,strokeWidth:Te,fillOpacity:"0",ref:k[Me],style:Ue})}))};P.defaultProps=ge;var g=P;function y(){return y=Object.assign||function(te){for(var G=1;G<arguments.length;G++){var V=arguments[G];for(var m in V)Object.prototype.hasOwnProperty.call(V,m)&&(te[m]=V[m])}return te},y.apply(this,arguments)}function O(te,G){return xe(te)||re(te,G)||de(te,G)||W()}function W(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function de(te,G){if(!te)return;if(typeof te=="string")return pe(te,G);var V=Object.prototype.toString.call(te).slice(8,-1);if(V==="Object"&&te.constructor&&(V=te.constructor.name),V==="Map"||V==="Set")return Array.from(te);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return pe(te,G)}function pe(te,G){(G==null||G>te.length)&&(G=te.length);for(var V=0,m=new Array(G);V<G;V++)m[V]=te[V];return m}function re(te,G){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(te)))return;var V=[],m=!0,p=!1,H=void 0;try{for(var ae=te[Symbol.iterator](),Te;!(m=(Te=ae.next()).done)&&!(V.push(Te.value),G&&V.length===G);m=!0);}catch(We){p=!0,H=We}finally{try{!m&&ae.return!=null&&ae.return()}finally{if(p)throw H}}return V}function xe(te){if(Array.isArray(te))return te}function ye(te,G){if(te==null)return{};var V=Q(te,G),m,p;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(te);for(p=0;p<H.length;p++){if(m=H[p],G.indexOf(m)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(te,m))continue;V[m]=te[m]}}return V}function Q(te,G){if(te==null)return{};var V={},m=Object.keys(te),p,H;for(H=0;H<m.length;H++){if(p=m[H],G.indexOf(p)>=0)continue;V[p]=te[p]}return V}var we=0;function Z(te){return+te.replace("%","")}function j(te){return Array.isArray(te)?te:[te]}function Ae(te,G,V,m){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,ae=50-m/2,Te=0,We=-ae,Re=0,Pe=-2*ae;switch(H){case"left":Te=-ae,We=0,Re=2*ae,Pe=0;break;case"right":Te=ae,We=0,Re=-2*ae,Pe=0;break;case"bottom":We=ae,Pe=2*ae;break;default:}var ne="M 50,50 m ".concat(Te,",").concat(We,`
a `).concat(ae,",").concat(ae," 0 1 1 ").concat(Re,",").concat(-Pe,`
a `).concat(ae,",").concat(ae," 0 1 1 ").concat(-Re,",").concat(Pe),_=Math.PI*2*ae,X={stroke:V,strokeDasharray:"".concat(G/100*(_-p),"px ").concat(_,"px"),strokeDashoffset:"-".concat(p/2+te/100*(_-p),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ne,pathStyle:X}}var oe=function(G){var V=G.prefixCls,m=G.strokeWidth,p=G.trailWidth,H=G.gapDegree,ae=G.gapPosition,Te=G.trailColor,We=G.strokeLinecap,Re=G.style,Pe=G.className,ne=G.strokeColor,_=G.percent,X=ye(G,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),N=Object(q.useMemo)(function(){return we+=1,we},[]),I=Ae(0,100,Te,m,H,ae),x=I.pathString,k=I.pathStyle,D=j(_),$=j(ne),L=$.find(function(Ue){return Object.prototype.toString.call(Ue)==="[object Object]"}),A=ue(D),ie=O(A,1),be=ie[0],Me=function(){var ze=0;return D.map(function(He,nt){var Oe=$[nt]||$[$.length-1],Fe=Object.prototype.toString.call(Oe)==="[object Object]"?"url(#".concat(V,"-gradient-").concat(N,")"):"",Be=Ae(ze,He,Oe,m,H,ae);return ze+=He,ke.a.createElement("path",{key:nt,className:"".concat(V,"-circle-path"),d:Be.pathString,stroke:Fe,strokeLinecap:We,strokeWidth:m,opacity:He===0?0:1,fillOpacity:"0",style:Be.pathStyle,ref:be[nt]})})};return ke.a.createElement("svg",y({className:De()("".concat(V,"-circle"),Pe),viewBox:"0 0 100 100",style:Re},X),L&&ke.a.createElement("defs",null,ke.a.createElement("linearGradient",{id:"".concat(V,"-gradient-").concat(N),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(L).sort(function(Ue,ze){return Z(Ue)-Z(ze)}).map(function(Ue,ze){return ke.a.createElement("stop",{key:ze,offset:Ue,stopColor:L[Ue]})}))),ke.a.createElement("path",{className:"".concat(V,"-circle-trail"),d:x,stroke:Te,strokeLinecap:We,strokeWidth:p||m,fillOpacity:"0",style:k}),Me().reverse())};oe.defaultProps=ge;var K=oe,z={Line:g,Circle:K}},hxT0:function(mt,Ce,h){mt.exports={bg:"bg___2samk",flexRow:"flexRow___2Ocys",flexJustifyCenter:"flexJustifyCenter___14s6l",flexAlignEnd:"flexAlignEnd___1lHt8",flexAlignCenter:"flexAlignCenter___2PtCV",flexColumn:"flexColumn___2Ssa4",formWrap:"formWrap___3Fcg8",titleWrap:"titleWrap___3U2TN",fieldWrap:"fieldWrap___3K6pg",mdWrap:"mdWrap___3o_rf",backgroundFa:"backgroundFa___3dwFi",button:"button___1vOOT",cascaderWrap:"cascaderWrap___ETHsj",listItem:"listItem___C62yl",right:"right___1iif8",one:"one___2Qd4F",schoolHintWrap:"schoolHintWrap___34WkA",colorCDCDCD:"colorCDCDCD___HqcpR",color0152d9:"color0152d9___cQ4G4"}},kSUc:function(mt,Ce,h){},lZu9:function(mt,Ce,h){(function(q){q(h("VrN/"),h("1eCo"),h("8EBN"))})(function(q){"use strict";q.defineMode("markdown",function(ke,Ee){var De=q.getMode(ke,"text/html"),ge=De.name=="null";function ue(m){if(q.findModeByName){var p=q.findModeByName(m);p&&(m=p.mime||p.mimes[0])}var H=q.getMode(ke,m);return H.name=="null"?null:H}Ee.highlightFormatting===void 0&&(Ee.highlightFormatting=!1),Ee.maxBlockquoteDepth===void 0&&(Ee.maxBlockquoteDepth=0),Ee.taskLists===void 0&&(Ee.taskLists=!1),Ee.strikethrough===void 0&&(Ee.strikethrough=!1),Ee.emoji===void 0&&(Ee.emoji=!1),Ee.fencedCodeBlockHighlighting===void 0&&(Ee.fencedCodeBlockHighlighting=!0),Ee.fencedCodeBlockDefaultMode===void 0&&(Ee.fencedCodeBlockDefaultMode="text/plain"),Ee.xml===void 0&&(Ee.xml=!0),Ee.tokenTypeOverrides===void 0&&(Ee.tokenTypeOverrides={});var Y={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var J in Y)Y.hasOwnProperty(J)&&Ee.tokenTypeOverrides[J]&&(Y[J]=Ee.tokenTypeOverrides[J]);var F=/^([*\-_])(?:\s*\1){2,}\s*$/,B=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,C=/^\[(x| )\](?=\s)/i,E=Ee.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,M=/^ {0,3}(?:\={1,}|-{2,})\s*$/,S=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,P=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,y=" ";function O(m,p,H){return p.f=p.inline=H,H(m,p)}function W(m,p,H){return p.f=p.block=H,H(m,p)}function de(m){return!m||!/\S/.test(m.string)}function pe(m){if(m.linkTitle=!1,m.linkHref=!1,m.linkText=!1,m.em=!1,m.strong=!1,m.strikethrough=!1,m.quote=0,m.indentedCode=!1,m.f==xe){var p=ge;if(!p){var H=q.innerMode(De,m.htmlState);p=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}p&&(m.f=Z,m.block=re,m.htmlState=null)}return m.trailingSpace=0,m.trailingSpaceNewLine=!1,m.prevLine=m.thisLine,m.thisLine={stream:null},null}function re(m,p){var H=m.column()===p.indentation,ae=de(p.prevLine.stream),Te=p.indentedCode,We=p.prevLine.hr,Re=p.list!==!1,Pe=(p.listStack[p.listStack.length-1]||0)+3;p.indentedCode=!1;var ne=p.indentation;if(p.indentationDiff===null&&(p.indentationDiff=p.indentation,Re)){for(p.list=null;ne<p.listStack[p.listStack.length-1];)p.listStack.pop(),p.listStack.length?p.indentation=p.listStack[p.listStack.length-1]:p.list=!1;p.list!==!1&&(p.indentationDiff=ne-p.listStack[p.listStack.length-1])}var _=!ae&&!We&&!p.prevLine.header&&(!Re||!Te)&&!p.prevLine.fencedCodeEnd,X=(p.list===!1||We||ae)&&p.indentation<=Pe&&m.match(F),N=null;if(p.indentationDiff>=4&&(Te||p.prevLine.fencedCodeEnd||p.prevLine.header||ae))return m.skipToEnd(),p.indentedCode=!0,Y.code;if(m.eatSpace())return null;if(H&&p.indentation<=Pe&&(N=m.match(E))&&N[1].length<=6)return p.quote=0,p.header=N[1].length,p.thisLine.header=!0,Ee.highlightFormatting&&(p.formatting="header"),p.f=p.inline,Q(p);if(p.indentation<=Pe&&m.eat(">"))return p.quote=H?1:p.quote+1,Ee.highlightFormatting&&(p.formatting="quote"),m.eatSpace(),Q(p);if(!X&&!p.setext&&H&&p.indentation<=Pe&&(N=m.match(B))){var I=N[1]?"ol":"ul";return p.indentation=ne+m.current().length,p.list=!0,p.quote=0,p.listStack.push(p.indentation),p.em=!1,p.strong=!1,p.code=!1,p.strikethrough=!1,Ee.taskLists&&m.match(C,!1)&&(p.taskList=!0),p.f=p.inline,Ee.highlightFormatting&&(p.formatting=["list","list-"+I]),Q(p)}else{if(H&&p.indentation<=Pe&&(N=m.match(w,!0)))return p.quote=0,p.fencedEndRE=new RegExp(N[1]+"+ *$"),p.localMode=Ee.fencedCodeBlockHighlighting&&ue(N[2]||Ee.fencedCodeBlockDefaultMode),p.localMode&&(p.localState=q.startState(p.localMode)),p.f=p.block=ye,Ee.highlightFormatting&&(p.formatting="code-block"),p.code=-1,Q(p);if(p.setext||(!_||!Re)&&!p.quote&&p.list===!1&&!p.code&&!X&&!P.test(m.string)&&(N=m.lookAhead(1))&&(N=N.match(M)))return p.setext?(p.header=p.setext,p.setext=0,m.skipToEnd(),Ee.highlightFormatting&&(p.formatting="header")):(p.header=N[0].charAt(0)=="="?1:2,p.setext=p.header),p.thisLine.header=!0,p.f=p.inline,Q(p);if(X)return m.skipToEnd(),p.hr=!0,p.thisLine.hr=!0,Y.hr;if(m.peek()==="[")return O(m,p,z)}return O(m,p,p.inline)}function xe(m,p){var H=De.token(m,p.htmlState);if(!ge){var ae=q.innerMode(De,p.htmlState);(ae.mode.name=="xml"&&ae.state.tagStart===null&&!ae.state.context&&ae.state.tokenize.isInText||p.md_inside&&m.current().indexOf(">")>-1)&&(p.f=Z,p.block=re,p.htmlState=null)}return H}function ye(m,p){var H=p.listStack[p.listStack.length-1]||0,ae=p.indentation<H,Te=H+3;if(p.fencedEndRE&&p.indentation<=Te&&(ae||m.match(p.fencedEndRE))){Ee.highlightFormatting&&(p.formatting="code-block");var We;return ae||(We=Q(p)),p.localMode=p.localState=null,p.block=re,p.f=Z,p.fencedEndRE=null,p.code=0,p.thisLine.fencedCodeEnd=!0,ae?W(m,p,p.block):We}else return p.localMode?p.localMode.token(m,p.localState):(m.skipToEnd(),Y.code)}function Q(m){var p=[];if(m.formatting){p.push(Y.formatting),typeof m.formatting=="string"&&(m.formatting=[m.formatting]);for(var H=0;H<m.formatting.length;H++)p.push(Y.formatting+"-"+m.formatting[H]),m.formatting[H]==="header"&&p.push(Y.formatting+"-"+m.formatting[H]+"-"+m.header),m.formatting[H]==="quote"&&(!Ee.maxBlockquoteDepth||Ee.maxBlockquoteDepth>=m.quote?p.push(Y.formatting+"-"+m.formatting[H]+"-"+m.quote):p.push("error"))}if(m.taskOpen)return p.push("meta"),p.length?p.join(" "):null;if(m.taskClosed)return p.push("property"),p.length?p.join(" "):null;if(m.linkHref?p.push(Y.linkHref,"url"):(m.strong&&p.push(Y.strong),m.em&&p.push(Y.em),m.strikethrough&&p.push(Y.strikethrough),m.emoji&&p.push(Y.emoji),m.linkText&&p.push(Y.linkText),m.code&&p.push(Y.code),m.image&&p.push(Y.image),m.imageAltText&&p.push(Y.imageAltText,"link"),m.imageMarker&&p.push(Y.imageMarker)),m.header&&p.push(Y.header,Y.header+"-"+m.header),m.quote&&(p.push(Y.quote),!Ee.maxBlockquoteDepth||Ee.maxBlockquoteDepth>=m.quote?p.push(Y.quote+"-"+m.quote):p.push(Y.quote+"-"+Ee.maxBlockquoteDepth)),m.list!==!1){var ae=(m.listStack.length-1)%3;ae?ae===1?p.push(Y.list2):p.push(Y.list3):p.push(Y.list1)}return m.trailingSpaceNewLine?p.push("trailing-space-new-line"):m.trailingSpace&&p.push("trailing-space-"+(m.trailingSpace%2?"a":"b")),p.length?p.join(" "):null}function we(m,p){return m.match(S,!0)?Q(p):void 0}function Z(m,p){var H=p.text(m,p);if(typeof H!="undefined")return H;if(p.list)return p.list=null,Q(p);if(p.taskList){var ae=m.match(C,!0)[1]===" ";return ae?p.taskOpen=!0:p.taskClosed=!0,Ee.highlightFormatting&&(p.formatting="task"),p.taskList=!1,Q(p)}if(p.taskOpen=!1,p.taskClosed=!1,p.header&&m.match(/^#+$/,!0))return Ee.highlightFormatting&&(p.formatting="header"),Q(p);var Te=m.next();if(p.linkTitle){p.linkTitle=!1;var We=Te;Te==="("&&(We=")"),We=(We+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Re="^\\s*(?:[^"+We+"\\\\]+|\\\\\\\\|\\\\.)"+We;if(m.match(new RegExp(Re),!0))return Y.linkHref}if(Te==="`"){var Pe=p.formatting;Ee.highlightFormatting&&(p.formatting="code"),m.eatWhile("`");var ne=m.current().length;if(p.code==0&&(!p.quote||ne==1))return p.code=ne,Q(p);if(ne==p.code){var _=Q(p);return p.code=0,_}else return p.formatting=Pe,Q(p)}else if(p.code)return Q(p);if(Te==="\\"&&(m.next(),Ee.highlightFormatting)){var X=Q(p),N=Y.formatting+"-escape";return X?X+" "+N:N}if(Te==="!"&&m.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return p.imageMarker=!0,p.image=!0,Ee.highlightFormatting&&(p.formatting="image"),Q(p);if(Te==="["&&p.imageMarker&&m.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return p.imageMarker=!1,p.imageAltText=!0,Ee.highlightFormatting&&(p.formatting="image"),Q(p);if(Te==="]"&&p.imageAltText){Ee.highlightFormatting&&(p.formatting="image");var X=Q(p);return p.imageAltText=!1,p.image=!1,p.inline=p.f=Ae,X}if(Te==="["&&!p.image)return p.linkText&&m.match(/^.*?\]/)||(p.linkText=!0,Ee.highlightFormatting&&(p.formatting="link")),Q(p);if(Te==="]"&&p.linkText){Ee.highlightFormatting&&(p.formatting="link");var X=Q(p);return p.linkText=!1,p.inline=p.f=m.match(/\(.*?\)| ?\[.*?\]/,!1)?Ae:Z,X}if(Te==="<"&&m.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){p.f=p.inline=j,Ee.highlightFormatting&&(p.formatting="link");var X=Q(p);return X?X+=" ":X="",X+Y.linkInline}if(Te==="<"&&m.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){p.f=p.inline=j,Ee.highlightFormatting&&(p.formatting="link");var X=Q(p);return X?X+=" ":X="",X+Y.linkEmail}if(Ee.xml&&Te==="<"&&m.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var I=m.string.indexOf(">",m.pos);if(I!=-1){var x=m.string.substring(m.start,I);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(x)&&(p.md_inside=!0)}return m.backUp(1),p.htmlState=q.startState(De),W(m,p,xe)}if(Ee.xml&&Te==="<"&&m.match(/^\/\w*?>/))return p.md_inside=!1,"tag";if(Te==="*"||Te==="_"){for(var k=1,D=m.pos==1?" ":m.string.charAt(m.pos-2);k<3&&m.eat(Te);)k++;var $=m.peek()||" ",L=!/\s/.test($)&&(!g.test($)||/\s/.test(D)||g.test(D)),A=!/\s/.test(D)&&(!g.test(D)||/\s/.test($)||g.test($)),ie=null,be=null;if(k%2&&(!p.em&&L&&(Te==="*"||!A||g.test(D))?ie=!0:p.em==Te&&A&&(Te==="*"||!L||g.test($))&&(ie=!1)),k>1&&(!p.strong&&L&&(Te==="*"||!A||g.test(D))?be=!0:p.strong==Te&&A&&(Te==="*"||!L||g.test($))&&(be=!1)),be!=null||ie!=null){Ee.highlightFormatting&&(p.formatting=ie==null?"strong":be==null?"em":"strong em"),ie===!0&&(p.em=Te),be===!0&&(p.strong=Te);var _=Q(p);return ie===!1&&(p.em=!1),be===!1&&(p.strong=!1),_}}else if(Te===" "&&(m.eat("*")||m.eat("_"))){if(m.peek()===" ")return Q(p);m.backUp(1)}if(Ee.strikethrough){if(Te==="~"&&m.eatWhile(Te)){if(p.strikethrough){Ee.highlightFormatting&&(p.formatting="strikethrough");var _=Q(p);return p.strikethrough=!1,_}else if(m.match(/^[^\s]/,!1))return p.strikethrough=!0,Ee.highlightFormatting&&(p.formatting="strikethrough"),Q(p)}else if(Te===" "&&m.match(/^~~/,!0)){if(m.peek()===" ")return Q(p);m.backUp(2)}}if(Ee.emoji&&Te===":"&&m.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){p.emoji=!0,Ee.highlightFormatting&&(p.formatting="emoji");var Me=Q(p);return p.emoji=!1,Me}return Te===" "&&(m.match(/^ +$/,!1)?p.trailingSpace++:p.trailingSpace&&(p.trailingSpaceNewLine=!0)),Q(p)}function j(m,p){var H=m.next();if(H===">"){p.f=p.inline=Z,Ee.highlightFormatting&&(p.formatting="link");var ae=Q(p);return ae?ae+=" ":ae="",ae+Y.linkInline}return m.match(/^[^>]+/,!0),Y.linkInline}function Ae(m,p){if(m.eatSpace())return null;var H=m.next();return H==="("||H==="["?(p.f=p.inline=K(H==="("?")":"]"),Ee.highlightFormatting&&(p.formatting="link-string"),p.linkHref=!0,Q(p)):"error"}var oe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function K(m){return function(p,H){var ae=p.next();if(ae===m){H.f=H.inline=Z,Ee.highlightFormatting&&(H.formatting="link-string");var Te=Q(H);return H.linkHref=!1,Te}return p.match(oe[m]),H.linkHref=!0,Q(H)}}function z(m,p){return m.match(/^([^\]\\]|\\.)*\]:/,!1)?(p.f=te,m.next(),Ee.highlightFormatting&&(p.formatting="link"),p.linkText=!0,Q(p)):O(m,p,Z)}function te(m,p){if(m.match(/^\]:/,!0)){p.f=p.inline=G,Ee.highlightFormatting&&(p.formatting="link");var H=Q(p);return p.linkText=!1,H}return m.match(/^([^\]\\]|\\.)+/,!0),Y.linkText}function G(m,p){return m.eatSpace()?null:(m.match(/^[^\s]+/,!0),m.peek()===void 0?p.linkTitle=!0:m.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),p.f=p.inline=Z,Y.linkHref+" url")}var V={startState:function(){return{f:re,prevLine:{stream:null},thisLine:{stream:null},block:re,htmlState:null,indentation:0,inline:Z,text:we,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(m){return{f:m.f,prevLine:m.prevLine,thisLine:m.thisLine,block:m.block,htmlState:m.htmlState&&q.copyState(De,m.htmlState),indentation:m.indentation,localMode:m.localMode,localState:m.localMode?q.copyState(m.localMode,m.localState):null,inline:m.inline,text:m.text,formatting:!1,linkText:m.linkText,linkTitle:m.linkTitle,linkHref:m.linkHref,code:m.code,em:m.em,strong:m.strong,strikethrough:m.strikethrough,emoji:m.emoji,header:m.header,setext:m.setext,hr:m.hr,taskList:m.taskList,list:m.list,listStack:m.listStack.slice(0),quote:m.quote,indentedCode:m.indentedCode,trailingSpace:m.trailingSpace,trailingSpaceNewLine:m.trailingSpaceNewLine,md_inside:m.md_inside,fencedEndRE:m.fencedEndRE}},token:function(m,p){if(p.formatting=!1,m!=p.thisLine.stream){if(p.header=0,p.hr=!1,m.match(/^\s*$/,!0))return pe(p),null;if(p.prevLine=p.thisLine,p.thisLine={stream:m},p.taskList=!1,p.trailingSpace=0,p.trailingSpaceNewLine=!1,!p.localState&&(p.f=p.block,p.f!=xe)){var H=m.match(/^\s*/,!0)[0].replace(/\t/g,y).length;if(p.indentation=H,p.indentationDiff=null,H>0)return null}}return p.f(m,p)},innerMode:function(m){return m.block==xe?{state:m.htmlState,mode:De}:m.localState?{state:m.localState,mode:m.localMode}:{state:m,mode:V}},indent:function(m,p,H){return m.block==xe&&De.indent?De.indent(m.htmlState,p,H):m.localState&&m.localMode.indent?m.localMode.indent(m.localState,p,H):q.Pass},blankLine:pe,getType:Q,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return V},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},nnTU:function(mt,Ce,h){"use strict";h.d(Ce,"b",function(){return J}),h.d(Ce,"a",function(){return F});var q=h("pmY6"),ke=h("746U"),Ee=h("Cg/j"),De=h("MI8n"),ge=h("24hK"),ue=h("QDVR"),Y=function(){for(var B=0,C=0,E=arguments.length;C<E;C++)B+=arguments[C].length;for(var M=Array(B),S=0,C=0;C<E;C++)for(var w=arguments[C],P=0,g=w.length;P<g;P++,S++)M[S]=w[P];return M},J=Object(Ee.c)("commandService"),F=new(function(){function B(){this._commands=new Map,this._onDidRegisterCommand=new De.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return B.prototype.registerCommand=function(C,E){var M=this;if(!C)throw new Error("invalid command");if(typeof C=="string"){if(!E)throw new Error("invalid command");return this.registerCommand({id:C,handler:E})}if(C.description){for(var S=[],w=0,P=C.description.args;w<P.length;w++){var g=P[w];S.push(g.constraint)}var y=C.handler;C.handler=function(re){for(var xe=[],ye=1;ye<arguments.length;ye++)xe[ye-1]=arguments[ye];return Object(ke.m)(xe,S),y.apply(void 0,Y([re],xe))}}var O=C.id,W=this._commands.get(O);W||(W=new ge.a,this._commands.set(O,W));var de=W.unshift(C),pe=Object(q.h)(function(){de();var re=M._commands.get(O);(re==null?void 0:re.isEmpty())&&M._commands.delete(O)});return this._onDidRegisterCommand.fire(O),pe},B.prototype.registerCommandAlias=function(C,E){return F.registerCommand(C,function(M){for(var S,w=[],P=1;P<arguments.length;P++)w[P-1]=arguments[P];return(S=M.get(J)).executeCommand.apply(S,Y([E],w))})},B.prototype.getCommand=function(C){var E=this._commands.get(C);return!E||E.isEmpty()?void 0:E.iterator().next().value},B.prototype.getCommands=function(){for(var C=new Map,E=0,M=Object(ue.d)(this._commands);E<M.length;E++){var S=M[E],w=this.getCommand(S);w&&C.set(S,w)}return C},B}())},osHv:function(mt,Ce,h){(function(q){q(h("VrN/"))})(function(q){"use strict";var ke=q.Pos;function Ee(g,y){return g.line-y.line||g.ch-y.ch}var De="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ge=De+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ue=new RegExp("<(/?)(["+De+"]["+ge+"]*)","g");function Y(g,y,O,W){this.line=y,this.ch=O,this.cm=g,this.text=g.getLine(y),this.min=W?Math.max(W.from,g.firstLine()):g.firstLine(),this.max=W?Math.min(W.to-1,g.lastLine()):g.lastLine()}function J(g,y){var O=g.cm.getTokenTypeAt(ke(g.line,y));return O&&/\btag\b/.test(O)}function F(g){return g.line>=g.max?void 0:(g.ch=0,g.text=g.cm.getLine(++g.line),!0)}function B(g){return g.line<=g.min?void 0:(g.text=g.cm.getLine(--g.line),g.ch=g.text.length,!0)}function C(g){for(;;){var y=g.text.indexOf(">",g.ch);if(y==-1){if(F(g))continue;return}if(!J(g,y+1)){g.ch=y+1;continue}var O=g.text.lastIndexOf("/",y),W=O>-1&&!/\S/.test(g.text.slice(O+1,y));return g.ch=y+1,W?"selfClose":"regular"}}function E(g){for(;;){var y=g.ch?g.text.lastIndexOf("<",g.ch-1):-1;if(y==-1){if(B(g))continue;return}if(!J(g,y+1)){g.ch=y;continue}ue.lastIndex=y,g.ch=y;var O=ue.exec(g.text);if(O&&O.index==y)return O}}function M(g){for(;;){ue.lastIndex=g.ch;var y=ue.exec(g.text);if(!y){if(F(g))continue;return}if(!J(g,y.index+1)){g.ch=y.index+1;continue}return g.ch=y.index+y[0].length,y}}function S(g){for(;;){var y=g.ch?g.text.lastIndexOf(">",g.ch-1):-1;if(y==-1){if(B(g))continue;return}if(!J(g,y+1)){g.ch=y;continue}var O=g.text.lastIndexOf("/",y),W=O>-1&&!/\S/.test(g.text.slice(O+1,y));return g.ch=y+1,W?"selfClose":"regular"}}function w(g,y){for(var O=[];;){var W=M(g),de,pe=g.line,re=g.ch-(W?W[0].length:0);if(!W||!(de=C(g)))return;if(de=="selfClose")continue;if(W[1]){for(var xe=O.length-1;xe>=0;--xe)if(O[xe]==W[2]){O.length=xe;break}if(xe<0&&(!y||y==W[2]))return{tag:W[2],from:ke(pe,re),to:ke(g.line,g.ch)}}else O.push(W[2])}}function P(g,y){for(var O=[];;){var W=S(g);if(!W)return;if(W=="selfClose"){E(g);continue}var de=g.line,pe=g.ch,re=E(g);if(!re)return;if(re[1])O.push(re[2]);else{for(var xe=O.length-1;xe>=0;--xe)if(O[xe]==re[2]){O.length=xe;break}if(xe<0&&(!y||y==re[2]))return{tag:re[2],from:ke(g.line,g.ch),to:ke(de,pe)}}}}q.registerHelper("fold","xml",function(g,y){for(var O=new Y(g,y.line,0);;){var W=M(O);if(!W||O.line!=y.line)return;var de=C(O);if(!de)return;if(!W[1]&&de!="selfClose"){var pe=ke(O.line,O.ch),re=w(O,W[2]);return re&&Ee(re.from,pe)>0?{from:pe,to:re.from}:null}}}),q.findMatchingTag=function(g,y,O){var W=new Y(g,y.line,y.ch,O);if(W.text.indexOf(">")==-1&&W.text.indexOf("<")==-1)return;var de=C(W),pe=de&&ke(W.line,W.ch),re=de&&E(W);if(!de||!re||Ee(W,y)>0)return;var xe={from:ke(W.line,W.ch),to:pe,tag:re[2]};return de=="selfClose"?{open:xe,close:null,at:"open"}:re[1]?{open:P(W,re[2]),close:xe,at:"close"}:(W=new Y(g,pe.line,pe.ch,O),{open:xe,close:w(W,re[2]),at:"open"})},q.findEnclosingTag=function(g,y,O,W){for(var de=new Y(g,y.line,y.ch,O);;){var pe=P(de,W);if(!pe)break;var re=new Y(g,y.line,y.ch,O),xe=w(re,pe.tag);if(xe)return{open:pe,close:xe}}},q.scanForClosingTag=function(g,y,O,W){var de=new Y(g,y.line,y.ch,W?{from:0,to:W}:null);return w(de,O)}})},p5ED:function(mt,Ce,h){"use strict";var q=h("+L6B"),ke=h("2/Rp"),Ee=h("5Dmo"),De=h("3S7+"),ge=h("k1fw"),ue=h("9og8"),Y=h("tJVT"),J=h("WmNS"),F=h.n(J),B=h("q1tI"),C=h.n(B),E=h("vHTk"),M=h.n(E),S=h("yEEn"),w=h("ZW9T"),P=h("1vsH"),g=h("V0Rq"),y=h("m3rI");Ce.a=function(O){var W,de,pe,re,xe,ye,Q=O.editOffice,we=Q===void 0?"view":Q,Z=O.name,j=O.data,Ae=O.theme,oe=O.type,K=O.filename,z=O.monacoEditor,te=O.className,G=O.style,V=O.close,m=O.onClose,p=O.hasMask,H=O.disabledDownload,ae=O.onImgDimensions,Te=O.otherData,We=Object(B.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Re=Object(Y.a)(We,2),Pe=Re[0],ne=Re[1],_=Object(B.useState)(""),X=Object(Y.a)(_,2),N=X[0],I=X[1],x=Object(B.useState)(),k=Object(Y.a)(x,2),D=k[0],$=k[1],L=window.ENV==="build"?"/react/build":"",A=location.host.startsWith("localhost")?y.a.PROXY_SERVER:y.a.API_SERVER,ie,be=1024*1024,Me=10*be,Ue=Object(B.useRef)();(W=j)!==null&&W!==void 0&&W.startsWith("/api")&&oe!=="txt"&&(j=y.a.API_SERVER+j),oe==="office"&&(ie=Object(P.P)(j).filesize,ie>Me&&(oe="other")),K&&(z.filename=K),Object(B.useEffect)(function(){var Oe,Fe,Be=(Oe=document.cookie)===null||Oe===void 0||((Fe=Oe.replace(/\s/g,""))===null||Fe===void 0)?void 0:Fe.split(";");Be==null||Be.map(function(Ge){var Ye=Ge.split("=");Ye[0]==="_educoder_session"&&I(Ye[1])})},[]),Object(B.useEffect)(function(){oe==="office"&&ze()},[oe,j]);var ze=function(){var Oe=Object(ue.a)(F.a.mark(function Fe(){var Be,Ge,Ye;return F.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return console.log("data:",j),Be=j,j.startsWith("http")||(Be=location.origin+Be),Ge=new URL(Be).pathname.split("/").pop(),Le.next=6,Object(g.U)({attachment_id:Ge});case 6:Ye=Le.sent,$(Ye);case 8:case"end":return Le.stop()}},Fe)}));return function(){return Oe.apply(this,arguments)}}(),He=function(){if(j.startsWith("http")||j.startsWith("blob:")){nt();return}Object(P.x)(K||"educoder",j,K)},nt=function(){Object(P.v)(K||"educoder",decodeURIComponent(j))};return C.a.createElement("div",{style:Object(ge.a)({},G||{}),className:"".concat(p&&M.a.bgBlack," ").concat(oe?M.a.wrp:"hide")},V&&C.a.createElement("div",{className:M.a.close,ref:Ue},!!ae&&C.a.createElement(De.a,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:function(){return Ue.current}},C.a.createElement("span",{onClick:function(){m(),ae()}},C.a.createElement("i",{className:"icon-yulanpizhu"}))),!H&&C.a.createElement(De.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ue.current}},C.a.createElement("span",{onClick:nt},C.a.createElement("i",{className:"icon-quxiaozhiding"}))),C.a.createElement(De.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ue.current}},C.a.createElement("span",{className:"",onClick:m},C.a.createElement("i",{className:"icon-guanbi1"})))),C.a.createElement("div",{className:"".concat(M.a[te]," ").concat(te," ").concat(M.a.monaco," ").concat(oe==="txt"?"show":"hide")},oe==="txt"&&C.a.createElement(w.b,z)),oe==="audio"&&C.a.createElement("audio",{src:"".concat(((de=j)===null||de===void 0?void 0:de.indexOf("http://"))>-1||((pe=j)===null||pe===void 0?void 0:pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(j),autoPlay:!0}),oe==="video"&&C.a.createElement(C.a.Fragment,null,((re=j)===null||re===void 0?void 0:re.indexOf("http"))>-1?C.a.createElement("video",{controls:!0,src:"".concat(j),autoPlay:!0}):C.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(j),autoPlay:!0})),oe==="office"&&D&&C.a.createElement("iframe",{src:"".concat(L,"/office.html?key=").concat(D.key,"&url=").concat(A+D.url,"&callbackUrl=").concat(A+D.callbackUrl,"&fileType=").concat(D.fileType,"&title=").concat(D.title,"&model=").concat(we,"&officeServer=").concat(y.a.OFFICE_SERVER,"&disabledDownload=").concat(!!H)}),(oe==="xlsx"||oe==="doc"||oe==="pptx"||oe==="docx")&&C.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(Te.key,"&url=").concat(y.a.API_SERVER+Te.url,"&callbackUrl=").concat(y.a.API_SERVER+Te.callbackUrl,"&fileType=").concat(Te.fileType,"&title=").concat(Te.title,"&model=").concat(Te.model)}),oe==="html"&&C.a.createElement("iframe",{src:j+"&disposition=inline"}),oe==="pdf"&&C.a.createElement("embed",{className:M.a.embed,src:j}),oe==="image"&&C.a.createElement("img",{src:"".concat(((xe=j)===null||xe===void 0?void 0:xe.indexOf("http://"))>-1||((ye=j)===null||ye===void 0?void 0:ye.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(j)}),oe==="other"&&C.a.createElement("div",null,C.a.createElement(ke.a,{type:"primary",size:"large",onClick:He},C.a.createElement(S.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),oe==="download"&&C.a.createElement(ke.a,{type:"primary",size:"large",onClick:He},C.a.createElement(S.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(mt,Ce,h){},pmY6:function(mt,Ce,h){"use strict";h.d(Ce,"g",function(){return ge}),h.d(Ce,"f",function(){return ue}),h.d(Ce,"e",function(){return Y}),h.d(Ce,"h",function(){return J}),h.d(Ce,"b",function(){return F}),h.d(Ce,"a",function(){return B}),h.d(Ce,"d",function(){return C}),h.d(Ce,"c",function(){return E});var q=!1,ke="__is_disposable_tracked__";function Ee(M){if(!q)return;if(M&&M!==B.None)try{M[ke]=!0}catch(S){}}function De(M){if(!q)return M;var S=new Error("Potentially leaked disposable").stack;return setTimeout(function(){M[ke]||console.log(S)},3e3),M}function ge(M){return typeof M.dispose=="function"&&M.dispose.length===0}function ue(M){return Array.isArray(M)?(M.forEach(function(S){S&&(Ee(S),S.dispose())}),[]):M?(Ee(M),M.dispose(),M):void 0}function Y(){for(var M=[],S=0;S<arguments.length;S++)M[S]=arguments[S];return M.forEach(Ee),De({dispose:function(){return ue(M)}})}function J(M){var S=De({dispose:function(){Ee(S),M()}});return S}var F=function(){function M(){this._toDispose=new Set,this._isDisposed=!1}return M.prototype.dispose=function(){if(this._isDisposed)return;Ee(this),this._isDisposed=!0,this.clear()},M.prototype.clear=function(){this._toDispose.forEach(function(S){return S.dispose()}),this._toDispose.clear()},M.prototype.add=function(S){if(!S)return S;if(S===this)throw new Error("Cannot register a disposable on itself!");return Ee(S),this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(S),S},M}(),B=function(){function M(){this._store=new F,De(this)}return M.prototype.dispose=function(){Ee(this),this._store.dispose()},M.prototype._register=function(S){if(S===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(S)},M.None=Object.freeze({dispose:function(){}}),M}(),C=function(){function M(){this._isDisposed=!1,De(this)}return Object.defineProperty(M.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(S){if(this._isDisposed||S===this._value)return;this._value&&this._value.dispose(),S&&Ee(S),this._value=S},enumerable:!0,configurable:!0}),M.prototype.clear=function(){this.value=void 0},M.prototype.dispose=function(){this._isDisposed=!0,Ee(this),this._value&&this._value.dispose(),this._value=void 0},M}(),E=function(){function M(S){this.object=S}return M.prototype.dispose=function(){},M}()},"rAM+":function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return ke});var q=h("Qw5x");function ke(Ee,De){var ge;if(typeof Symbol=="undefined"||Ee[Symbol.iterator]==null){if(Array.isArray(Ee)||(ge=Object(q.a)(Ee))||De&&Ee&&typeof Ee.length=="number"){ge&&(Ee=ge);var ue=0,Y=function(){};return{s:Y,n:function(){return ue>=Ee.length?{done:!0}:{done:!1,value:Ee[ue++]}},e:function(E){throw E},f:Y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var J=!0,F=!1,B;return{s:function(){ge=Ee[Symbol.iterator]()},n:function(){var E=ge.next();return J=E.done,E},e:function(E){F=!0,B=E},f:function(){try{!J&&ge.return!=null&&ge.return()}finally{if(F)throw B}}}}},rUJ1:function(mt,Ce){const h=/[&<>"']/,q=/[&<>"']/g,ke=/[<>"']|&(?!#?\w+;)/,Ee=/[<>"']|&(?!#?\w+;)/g,De={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ge=ye=>De[ye];function ue(ye,Q){if(Q){if(h.test(ye))return ye.replace(q,ge)}else if(ke.test(ye))return ye.replace(Ee,ge);return ye}const Y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function J(ye){return ye.replace(Y,(Q,we)=>(we=we.toLowerCase(),we==="colon"?":":we.charAt(0)==="#"?we.charAt(1)==="x"?String.fromCharCode(parseInt(we.substring(2),16)):String.fromCharCode(+we.substring(1)):""))}const F=/(^|[^\[])\^/g;function B(ye,Q){ye=ye.source||ye,Q=Q||"";const we={replace:(Z,j)=>(j=j.source||j,j=j.replace(F,"$1"),ye=ye.replace(Z,j),we),getRegex:()=>new RegExp(ye,Q)};return we}const C=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function M(ye,Q,we){if(ye){let Z;try{Z=decodeURIComponent(J(we)).replace(C,"").toLowerCase()}catch(j){return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}Q&&!E.test(we)&&(we=y(Q,we));try{we=encodeURI(we).replace(/%25/g,"%")}catch(Z){return null}return we}const S={},w=/^[^:]+:\/*[^/]*$/,P=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(ye,Q){S[" "+ye]||(w.test(ye)?S[" "+ye]=ye+"/":S[" "+ye]=pe(ye,"/",!0)),ye=S[" "+ye];const we=ye.indexOf(":")===-1;return Q.substring(0,2)==="//"?we?Q:ye.replace(P,"$1")+Q:Q.charAt(0)==="/"?we?Q:ye.replace(g,"$1")+Q:ye+Q}const O={exec:function(){}};function W(ye){let Q=1,we,Z;for(;Q<arguments.length;Q++){we=arguments[Q];for(Z in we)Object.prototype.hasOwnProperty.call(we,Z)&&(ye[Z]=we[Z])}return ye}function de(ye,Q){const we=ye.replace(/\|/g,(Ae,oe,K)=>{let z=!1,te=oe;for(;--te>=0&&K[te]==="\\";)z=!z;return z?"|":" |"}),Z=we.split(/ \|/);let j=0;if(Z.length>Q)Z.splice(Q);else for(;Z.length<Q;)Z.push("");for(;j<Z.length;j++)Z[j]=Z[j].trim().replace(/\\\|/g,"|");return Z}function pe(ye,Q,we){const Z=ye.length;if(Z===0)return"";let j=0;for(;j<Z;){const Ae=ye.charAt(Z-j-1);if(Ae===Q&&!we)j++;else if(Ae!==Q&&we)j++;else break}return ye.substr(0,Z-j)}function re(ye,Q){if(ye.indexOf(Q[1])===-1)return-1;const we=ye.length;let Z=0,j=0;for(;j<we;j++)if(ye[j]==="\\")j++;else if(ye[j]===Q[0])Z++;else if(ye[j]===Q[1]&&(Z--,Z<0))return j;return-1}function xe(ye){ye&&ye.sanitize&&!ye.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}mt.exports={escape:ue,unescape:J,edit:B,cleanUrl:M,resolveUrl:y,noopTest:O,merge:W,splitCells:de,rtrim:pe,findClosingBracket:re,checkSanitizeDeprecation:xe}},sboe:function(mt,Ce,h){"use strict";h.d(Ce,"a",function(){return Ee});var q=h("q1tI"),ke=h.n(q),Ee=q.createContext(null)},uK0f:function(mt,Ce,h){(function(q,ke){mt.exports=ke()})(this,function(){"use strict";function q(ke,Ee,De){De=De||{},De.childrenKeyName=De.childrenKeyName||"children";var ge=ke||[],ue=[],Y=0;do{var J=ge.filter(function(F){return Ee(F,Y)})[0];if(!J)break;ue.push(J),ge=J[De.childrenKeyName]||[],Y+=1}while(ge.length>0);return ue}return q})},vHTk:function(mt,Ce,h){mt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);