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.
116 lines
417 KiB
116 lines
417 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[54,4,7,13],{"+NIl":function(kt,dt,y){(function(F){F(y("VrN/"))})(function(F){"use strict";F.defineMode("stex",function(Oe,ce){"use strict";function Re(J,H){J.cmdState.push(H)}function Ae(J){return J.cmdState.length>0?J.cmdState[J.cmdState.length-1]:null}function ee(J){var H=J.cmdState.pop();H&&H.closeBracket()}function k(J){for(var H=J.cmdState,E=H.length-1;E>=0;E--){var A=H[E];if(A.name=="DEFAULT")continue;return A}return{styleIdentifier:function(){return null}}}function X(J,H,E){return function(){this.name=J,this.bracketNo=0,this.style=H,this.styles=E,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var oe={};oe.importmodule=X("importmodule","tag",["string","builtin"]),oe.documentclass=X("documentclass","tag",["","atom"]),oe.usepackage=X("usepackage","tag",["atom"]),oe.begin=X("begin","tag",["atom"]),oe.end=X("end","tag",["atom"]),oe.label=X("label","tag",["atom"]),oe.ref=X("ref","tag",["atom"]),oe.eqref=X("eqref","tag",["atom"]),oe.cite=X("cite","tag",["atom"]),oe.bibitem=X("bibitem","tag",["atom"]),oe.Bibitem=X("Bibitem","tag",["atom"]),oe.RBibitem=X("RBibitem","tag",["atom"]),oe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function V(J,H){J.f=H}function z(J,H){var E;if(J.match(/^\\[a-zA-Z@]+/)){var A=J.current().slice(1);return E=oe.hasOwnProperty(A)?oe[A]:oe.DEFAULT,E=new E,Re(H,E),V(H,_e),E.style}if(J.match(/^\\[$&%#{}_]/))return"tag";if(J.match(/^\\[,;!\/\\]/))return"tag";if(J.match("\\["))return V(H,function(ie,ye){return j(ie,ye,"\\]")}),"keyword";if(J.match("\\("))return V(H,function(ie,ye){return j(ie,ye,"\\)")}),"keyword";if(J.match("$$"))return V(H,function(ie,ye){return j(ie,ye,"$$")}),"keyword";if(J.match("$"))return V(H,function(ie,ye){return j(ie,ye,"$")}),"keyword";var re=J.next();if(re=="%")return J.skipToEnd(),"comment";if(re=="}"||re=="]"){if(E=Ae(H),E)E.closeBracket(re),V(H,_e);else return"error";return"bracket"}else return re=="{"||re=="["?(E=oe.DEFAULT,E=new E,Re(H,E),"bracket"):/\d/.test(re)?(J.eatWhile(/[\w.%]/),"atom"):(J.eatWhile(/[\w\-_]/),E=k(H),E.name=="begin"&&(E.argument=J.current()),E.styleIdentifier())}function j(J,H,E){if(J.eatSpace())return null;if(E&&J.match(E))return V(H,z),"keyword";if(J.match(/^\\[a-zA-Z@]+/))return"tag";if(J.match(/^[a-zA-Z]+/))return"variable-2";if(J.match(/^\\[$&%#{}_]/))return"tag";if(J.match(/^\\[,;!\/]/))return"tag";if(J.match(/^[\^_&]/))return"tag";if(J.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(J.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var A=J.next();return A=="{"||A=="}"||A=="["||A=="]"||A=="("||A==")"?"bracket":A=="%"?(J.skipToEnd(),"comment"):"error"}function _e(J,H){var E=J.peek(),A;return E=="{"||E=="["?(A=Ae(H),A.openBracket(E),J.eat(E),V(H,z),"bracket"):/[ \t\r]/.test(E)?(J.eat(E),null):(V(H,z),ee(H),z(J,H))}return{startState:function(){var J=ce.inMathMode?function(H,E){return j(H,E)}:z;return{cmdState:[],f:J}},copyState:function(J){return{cmdState:J.cmdState.slice(),f:J.f}},token:function(J,H){return H.f(J,H)},blankLine:function(J){J.f=z,J.cmdState.length=0},lineComment:"%"}}),F.defineMIME("text/x-stex","stex"),F.defineMIME("text/x-latex","stex")})},"19Vz":function(kt,dt,y){(function(F){F(y("VrN/"))})(function(F){F.defineOption("placeholder","",function(X,oe,V){var z=V&&V!=F.Init;if(oe&&!z)X.on("blur",Ae),X.on("change",ee),X.on("swapDoc",ee),F.on(X.getInputField(),"compositionupdate",X.state.placeholderCompose=function(){Re(X)}),ee(X);else if(!oe&&z){X.off("blur",Ae),X.off("change",ee),X.off("swapDoc",ee),F.off(X.getInputField(),"compositionupdate",X.state.placeholderCompose),Oe(X);var j=X.getWrapperElement();j.className=j.className.replace(" CodeMirror-empty","")}oe&&!X.hasFocus()&&Ae(X)});function Oe(X){X.state.placeholder&&(X.state.placeholder.parentNode.removeChild(X.state.placeholder),X.state.placeholder=null)}function ce(X){Oe(X);var oe=X.state.placeholder=document.createElement("pre");oe.style.cssText="height: 0; overflow: visible",oe.style.direction=X.getOption("direction"),oe.className="CodeMirror-placeholder CodeMirror-line-like";var V=X.getOption("placeholder");typeof V=="string"&&(V=document.createTextNode(V)),oe.appendChild(V),X.display.lineSpace.insertBefore(oe,X.display.lineSpace.firstChild)}function Re(X){setTimeout(function(){var oe=!1,V=X.getInputField();V.nodeName=="TEXTAREA"?oe=!V.value:X.lineCount()==1&&(oe=!/[^\u200b]/.test(V.querySelector(".CodeMirror-line").textContent)),oe?ce(X):Oe(X)},20)}function Ae(X){k(X)&&ce(X)}function ee(X){var oe=X.getWrapperElement(),V=k(X);oe.className=oe.className.replace(" CodeMirror-empty","")+(V?" CodeMirror-empty":""),V?ce(X):Oe(X)}function k(X){return X.lineCount()===1&&X.getLine(0)===""}})},"1eCo":function(kt,dt,y){(function(F){F(y("VrN/"))})(function(F){"use strict";var Oe={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},ce={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};F.defineMode("xml",function(Re,Ae){var ee=Re.indentUnit,k={},X=Ae.htmlMode?Oe:ce;for(var oe in X)k[oe]=X[oe];for(var oe in Ae)k[oe]=Ae[oe];var V,z;function j(w,fe){function Z(L){return fe.tokenize=L,L(w,fe)}var M=w.next();if(M=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?Z(H("atom","]]>")):null:w.match("--")?Z(H("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),Z(E(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),fe.tokenize=H("meta","?>"),"meta"):(V=w.eat("/")?"closeTag":"openTag",fe.tokenize=_e,"tag bracket");if(M=="&"){var le;return w.eat("#")?w.eat("x")?le=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):le=w.eatWhile(/[\d]/)&&w.eat(";"):le=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),le?"atom":"error"}else return w.eatWhile(/[^&<]/),null}j.isInText=!0;function _e(w,fe){var Z=w.next();if(Z==">"||Z=="/"&&w.eat(">"))return fe.tokenize=j,V=Z==">"?"endTag":"selfcloseTag","tag bracket";if(Z=="=")return V="equals",null;if(Z=="<"){fe.tokenize=j,fe.state=ye,fe.tagName=fe.tagStart=null;var M=fe.tokenize(w,fe);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(Z)?(fe.tokenize=J(Z),fe.stringStartCol=w.column(),fe.tokenize(w,fe)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function J(w){var fe=function(Z,M){for(;!Z.eol();)if(Z.next()==w){M.tokenize=_e;break}return"string"};return fe.isInAttribute=!0,fe}function H(w,fe){return function(Z,M){for(;!Z.eol();){if(Z.match(fe)){M.tokenize=j;break}Z.next()}return w}}function E(w){return function(fe,Z){for(var M;(M=fe.next())!=null;){if(M=="<")return Z.tokenize=E(w+1),Z.tokenize(fe,Z);if(M==">")if(w==1){Z.tokenize=j;break}else return Z.tokenize=E(w-1),Z.tokenize(fe,Z)}return"meta"}}function A(w,fe,Z){this.prev=w.context,this.tagName=fe,this.indent=w.indented,this.startOfLine=Z,(k.doNotIndent.hasOwnProperty(fe)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function re(w){w.context&&(w.context=w.context.prev)}function ie(w,fe){for(var Z;;){if(!w.context)return;if(Z=w.context.tagName,!k.contextGrabbers.hasOwnProperty(Z)||!k.contextGrabbers[Z].hasOwnProperty(fe))return;re(w)}}function ye(w,fe,Z){return w=="openTag"?(Z.tagStart=fe.column(),Ve):w=="closeTag"?Be:ye}function Ve(w,fe,Z){return w=="word"?(Z.tagName=fe.current(),z="tag",ve):k.allowMissingTagName&&w=="endTag"?(z="tag bracket",ve(w,fe,Z)):(z="error",Ve)}function Be(w,fe,Z){if(w=="word"){var M=fe.current();return Z.context&&Z.context.tagName!=M&&k.implicitlyClosed.hasOwnProperty(Z.context.tagName)&&re(Z),Z.context&&Z.context.tagName==M||k.matchClosing===!1?(z="tag",Ue):(z="tag error",Ye)}else return k.allowMissingTagName&&w=="endTag"?(z="tag bracket",Ue(w,fe,Z)):(z="error",Ye)}function Ue(w,fe,Z){return w!="endTag"?(z="error",Ue):(re(Z),ye)}function Ye(w,fe,Z){return z="error",Ue(w,fe,Z)}function ve(w,fe,Z){if(w=="word")return z="attribute",be;if(w=="endTag"||w=="selfcloseTag"){var M=Z.tagName,le=Z.tagStart;return Z.tagName=Z.tagStart=null,w=="selfcloseTag"||k.autoSelfClosers.hasOwnProperty(M)?ie(Z,M):(ie(Z,M),Z.context=new A(Z,M,le==Z.indented)),ye}return z="error",ve}function be(w,fe,Z){return w=="equals"?Ie:(k.allowMissing||(z="error"),ve(w,fe,Z))}function Ie(w,fe,Z){return w=="string"?pe:w=="word"&&k.allowUnquoted?(z="string",ve):(z="error",ve(w,fe,Z))}function pe(w,fe,Z){return w=="string"?pe:ve(w,fe,Z)}return{startState:function(w){var fe={tokenize:j,state:ye,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(fe.baseIndent=w),fe},token:function(w,fe){if(!fe.tagName&&w.sol()&&(fe.indented=w.indentation()),w.eatSpace())return null;V=null;var Z=fe.tokenize(w,fe);return(Z||V)&&Z!="comment"&&(z=null,fe.state=fe.state(V||Z,w,fe),z&&(Z=z=="error"?Z+" error":z)),Z},indent:function(w,fe,Z){var M=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+ee;if(M&&M.noIndent)return F.Pass;if(w.tokenize!=_e&&w.tokenize!=j)return Z?Z.match(/^(\s*)/)[0].length:0;if(w.tagName)return k.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+ee*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/<!\[CDATA\[/.test(fe))return 0;var le=fe&&/^<(\/)?([\w_:\.-]*)/.exec(fe);if(le&&le[1])for(;M;)if(M.tagName==le[2]){M=M.prev;break}else if(k.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(le)for(;M;){var L=k.contextGrabbers[M.tagName];if(L&&L.hasOwnProperty(le[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+ee:w.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(w){w.state==Ie&&(w.state=ve)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var fe=[],Z=w.context;Z;Z=Z.prev)Z.tagName&&fe.push(Z.tagName);return fe.reverse()}}}),F.defineMIME("text/xml","xml"),F.defineMIME("application/xml","xml"),F.mimeModes.hasOwnProperty("text/html")||F.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(kt,dt,y){"use strict";y.d(dt,"d",function(){return at}),y.d(dt,"b",function(){return U}),y.d(dt,"c",function(){return Ne}),y.d(dt,"a",function(){return gt});var F=y("VTBJ"),Oe=y("1OyB"),ce=y("vuIU"),Re=y("JX7q"),Ae=y("Ji7U"),ee=y("LK+K"),k=y("cDcd"),X=y("I8Z2"),oe=y("BGR+"),V=y("wx14"),z=y("rePB"),j=y("4IlW"),_e=y("2GS6"),J=y("Gytx"),H=y.n(J),E=y("TSYQ"),A=y.n(E),re=y("U8pU"),ie=y("ODXe"),ye=/iPhone/i,Ve=/iPod/i,Be=/iPad/i,Ue=/\bAndroid(?:.+)Mobile\b/i,Ye=/Android/i,ve=/\bAndroid(?:.+)SD4930UR\b/i,be=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Ie=/Windows Phone/i,pe=/\bWindows(?:.+)ARM\b/i,w=/BlackBerry/i,fe=/BB10/i,Z=/Opera Mini/i,M=/\b(CriOS|Chrome)(?:.+)Mobile/i,le=/Mobile(?:.+)Firefox\b/i;function L(Je,ge){return Je.test(ge)}function P(Je){var ge=Je||(typeof navigator!="undefined"?navigator.userAgent:""),Ee=ge.split("[FBAN");if(typeof Ee[1]!="undefined"){var ae=Ee,p=Object(ie.a)(ae,1);ge=p[0]}if(Ee=ge.split("Twitter"),typeof Ee[1]!="undefined"){var S=Ee,he=Object(ie.a)(S,1);ge=he[0]}var B={apple:{phone:L(ye,ge)&&!L(Ie,ge),ipod:L(Ve,ge),tablet:!L(ye,ge)&&L(Be,ge)&&!L(Ie,ge),device:(L(ye,ge)||L(Ve,ge)||L(Be,ge))&&!L(Ie,ge)},amazon:{phone:L(ve,ge),tablet:!L(ve,ge)&&L(be,ge),device:L(ve,ge)||L(be,ge)},android:{phone:!L(Ie,ge)&&L(ve,ge)||!L(Ie,ge)&&L(Ue,ge),tablet:!L(Ie,ge)&&!L(ve,ge)&&!L(Ue,ge)&&(L(be,ge)||L(Ye,ge)),device:!L(Ie,ge)&&(L(ve,ge)||L(be,ge)||L(Ue,ge)||L(Ye,ge))||L(/\bokhttp\b/i,ge)},windows:{phone:L(Ie,ge),tablet:L(pe,ge),device:L(Ie,ge)||L(pe,ge)},other:{blackberry:L(w,ge),blackberry10:L(fe,ge),opera:L(Z,ge),firefox:L(le,ge),chrome:L(M,ge),device:L(w,ge)||L(fe,ge)||L(Z,ge)||L(le,ge)||L(M,ge)},any:null,phone:null,tablet:null};return B.any=B.apple.device||B.android.device||B.windows.device||B.other.device,B.phone=B.apple.phone||B.android.phone||B.windows.phone,B.tablet=B.apple.tablet||B.android.tablet||B.windows.tablet,B}var _=Object(F.a)(Object(F.a)({},P()),{},{isMobile:P}),c=_;function l(){}function v(Je,ge,Ee){var ae=ge||"";return Je.key||"".concat(ae,"item_").concat(Ee)}function N(Je){return"".concat(Je,"-menu-")}function Y(Je,ge){var Ee=-1;k.Children.forEach(Je,function(ae){Ee+=1,ae&&ae.type&&ae.type.isMenuItemGroup?k.Children.forEach(ae.props.children,function(p){Ee+=1,ge(p,Ee)}):ge(ae,Ee)})}function Me(Je,ge,Ee){if(!Je||Ee.find)return;k.Children.forEach(Je,function(ae){if(ae){var p=ae.type;if(!p||!(p.isSubMenu||p.isMenuItem||p.isMenuItemGroup))return;ge.indexOf(ae.key)!==-1?Ee.find=!0:ae.props.children&&Me(ae.props.children,ge,Ee)}})}var Fe=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],xe=function(ge){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=ge&&typeof ge.getBoundingClientRect=="function"&&ge.getBoundingClientRect().width;if(ae){if(Ee){var p=getComputedStyle(ge),S=p.marginLeft,he=p.marginRight;ae+=+S.replace("px","")+ +he.replace("px","")}ae=+ae.toFixed(6)}return ae||0},de=function(ge,Ee,ae){ge&&Object(re.a)(ge.style)==="object"&&(ge.style[Ee]=ae)},te=function(){return c.any},K=y("KQm4"),D=y("Ff2n"),$=y("faye"),h=y("bdgK"),C=y("uciX"),g=y("8XRh"),q={adjustX:1,adjustY:1},Ce={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:q,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:q,offset:[4,0]}},ne={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:q,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:q,offset:[4,0]}},me=Ce,Te=0,He={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ze=function(ge,Ee,ae){var p=N(Ee),S=ge.getState();ge.setState({defaultActiveFirst:Object(F.a)(Object(F.a)({},S.defaultActiveFirst),{},Object(z.a)({},p,ae))})},Le=function(Je){Object(Ae.a)(Ee,Je);var ge=Object(ee.a)(Ee);function Ee(ae){var p;Object(Oe.a)(this,Ee),p=ge.call(this,ae),p.onDestroy=function(ke){p.props.onDestroy(ke)},p.onKeyDown=function(ke){var je=ke.keyCode,it=p.menuInstance,Ot=p.props,Et=Ot.isOpen,Rt=Ot.store;if(je===j.a.ENTER)return p.onTitleClick(ke),ze(Rt,p.props.eventKey,!0),!0;if(je===j.a.RIGHT)return Et?it.onKeyDown(ke):(p.triggerOpenChange(!0),ze(Rt,p.props.eventKey,!0)),!0;if(je===j.a.LEFT){var zt;if(Et)zt=it.onKeyDown(ke);else return;return zt||(p.triggerOpenChange(!1),zt=!0),zt}return Et&&(je===j.a.UP||je===j.a.DOWN)?it.onKeyDown(ke):void 0},p.onOpenChange=function(ke){p.props.onOpenChange(ke)},p.onPopupVisibleChange=function(ke){p.triggerOpenChange(ke,ke?"mouseenter":"mouseleave")},p.onMouseEnter=function(ke){var je=p.props,it=je.eventKey,Ot=je.onMouseEnter,Et=je.store;ze(Et,p.props.eventKey,!1),Ot({key:it,domEvent:ke})},p.onMouseLeave=function(ke){var je=p.props,it=je.parentMenu,Ot=je.eventKey,Et=je.onMouseLeave;it.subMenuInstance=Object(Re.a)(p),Et({key:Ot,domEvent:ke})},p.onTitleMouseEnter=function(ke){var je=p.props,it=je.eventKey,Ot=je.onItemHover,Et=je.onTitleMouseEnter;Ot({key:it,hover:!0}),Et({key:it,domEvent:ke})},p.onTitleMouseLeave=function(ke){var je=p.props,it=je.parentMenu,Ot=je.eventKey,Et=je.onItemHover,Rt=je.onTitleMouseLeave;it.subMenuInstance=Object(Re.a)(p),Et({key:Ot,hover:!1}),Rt({key:Ot,domEvent:ke})},p.onTitleClick=function(ke){var je=Object(Re.a)(p),it=je.props;if(it.onTitleClick({key:it.eventKey,domEvent:ke}),it.triggerSubMenuAction==="hover")return;p.triggerOpenChange(!it.isOpen,"click"),ze(it.store,p.props.eventKey,!1)},p.onSubMenuClick=function(ke){typeof p.props.onClick=="function"&&p.props.onClick(p.addKeyPath(ke))},p.onSelect=function(ke){p.props.onSelect(ke)},p.onDeselect=function(ke){p.props.onDeselect(ke)},p.getPrefixCls=function(){return"".concat(p.props.rootPrefixCls,"-submenu")},p.getActiveClassName=function(){return"".concat(p.getPrefixCls(),"-active")},p.getDisabledClassName=function(){return"".concat(p.getPrefixCls(),"-disabled")},p.getSelectedClassName=function(){return"".concat(p.getPrefixCls(),"-selected")},p.getOpenClassName=function(){return"".concat(p.props.rootPrefixCls,"-submenu-open")},p.saveMenuInstance=function(ke){p.menuInstance=ke},p.addKeyPath=function(ke){return Object(F.a)(Object(F.a)({},ke),{},{keyPath:(ke.keyPath||[]).concat(p.props.eventKey)})},p.triggerOpenChange=function(ke,je){var it=p.props.eventKey,Ot=function(){p.onOpenChange({key:it,item:Object(Re.a)(p),trigger:je,open:ke})};je==="mouseenter"?p.mouseenterTimeout=setTimeout(function(){Ot()},0):Ot()},p.isChildrenSelected=function(){var ke={find:!1};return Me(p.props.children,p.props.selectedKeys,ke),ke.find},p.isOpen=function(){return p.props.openKeys.indexOf(p.props.eventKey)!==-1},p.adjustWidth=function(){if(!p.subMenuTitle||!p.menuInstance)return;var ke=$.findDOMNode(p.menuInstance);if(ke.offsetWidth>=p.subMenuTitle.offsetWidth)return;ke.style.minWidth="".concat(p.subMenuTitle.offsetWidth,"px")},p.saveSubMenuTitle=function(ke){p.subMenuTitle=ke},p.getBaseProps=function(){var ke=Object(Re.a)(p),je=ke.props;return{mode:je.mode==="horizontal"?"vertical":je.mode,visible:p.props.isOpen,level:je.level+1,inlineIndent:je.inlineIndent,focusable:!1,onClick:p.onSubMenuClick,onSelect:p.onSelect,onDeselect:p.onDeselect,onDestroy:p.onDestroy,selectedKeys:je.selectedKeys,eventKey:"".concat(je.eventKey,"-menu-"),openKeys:je.openKeys,motion:je.motion,onOpenChange:p.onOpenChange,subMenuOpenDelay:je.subMenuOpenDelay,parentMenu:Object(Re.a)(p),subMenuCloseDelay:je.subMenuCloseDelay,forceSubMenuRender:je.forceSubMenuRender,triggerSubMenuAction:je.triggerSubMenuAction,builtinPlacements:je.builtinPlacements,defaultActiveFirst:je.store.getState().defaultActiveFirst[N(je.eventKey)],multiple:je.multiple,prefixCls:je.rootPrefixCls,id:p.internalMenuId,manualRef:p.saveMenuInstance,itemIcon:je.itemIcon,expandIcon:je.expandIcon,direction:je.direction}},p.getMotion=function(ke,je){var it=Object(Re.a)(p),Ot=it.haveRendered,Et=p.props,Rt=Et.motion,zt=Et.rootPrefixCls,Pt=Object(F.a)(Object(F.a)({},Rt),{},{leavedClassName:"".concat(zt,"-hidden"),removeOnLeave:!1,motionAppear:Ot||!je||ke!=="inline"});return Pt};var S=ae.store,he=ae.eventKey,B=S.getState(),Ze=B.defaultActiveFirst;p.isRootMenu=!1;var qe=!1;return Ze&&(qe=Ze[he]),ze(S,he,qe),p}return Object(ce.a)(Ee,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var p=this,S=this.props,he=S.mode,B=S.parentMenu,Ze=S.manualRef;if(Ze&&Ze(this),he!=="horizontal"||!B.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return p.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var p=this.props,S=p.onDestroy,he=p.eventKey;S&&S(he),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(p){var S=this,he=this.getBaseProps(),B=this.getMotion(he.mode,he.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||he.visible||he.forceSubMenuRender,!this.haveOpened)return k.createElement("div",null);var Ze=he.direction;return k.createElement(g.b,Object.assign({visible:he.visible},B),function(qe){var ke=qe.className,je=qe.style,it=A()("".concat(he.prefixCls,"-sub"),ke,Object(z.a)({},"".concat(he.prefixCls,"-rtl"),Ze==="rtl"));return k.createElement(W,Object.assign({},he,{id:S.internalMenuId,className:it,style:je}),p)})}},{key:"render",value:function(){var p,S=Object(F.a)({},this.props),he=S.isOpen,B=this.getPrefixCls(),Ze=S.mode==="inline",qe=A()(B,"".concat(B,"-").concat(S.mode),(p={},Object(z.a)(p,S.className,!!S.className),Object(z.a)(p,this.getOpenClassName(),he),Object(z.a)(p,this.getActiveClassName(),S.active||he&&!Ze),Object(z.a)(p,this.getDisabledClassName(),S.disabled),Object(z.a)(p,this.getSelectedClassName(),this.isChildrenSelected()),p));this.internalMenuId||(S.eventKey?this.internalMenuId="".concat(S.eventKey,"$Menu"):(Te+=1,this.internalMenuId="$__$".concat(Te,"$Menu")));var ke={},je={},it={};S.disabled||(ke={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},je={onClick:this.onTitleClick},it={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ot={},Et=S.direction;Ze&&(Et==="rtl"?Ot.paddingRight=S.inlineIndent*S.level:Ot.paddingLeft=S.inlineIndent*S.level);var Rt={};this.props.isOpen&&(Rt={"aria-owns":this.internalMenuId});var zt=null;S.mode!=="horizontal"&&(zt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(zt=k.createElement(this.props.expandIcon,Object(F.a)({},this.props))));var Pt=k.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Ot,className:"".concat(B,"-title"),role:"button"},it,je,{"aria-expanded":he},Rt,{"aria-haspopup":"true",title:typeof S.title=="string"?S.title:void 0}),S.title,zt||k.createElement("i",{className:"".concat(B,"-arrow")})),ht=this.renderChildren(S.children),nn=S.parentMenu.isRootMenu?S.parentMenu.props.getPopupContainer:function(jn){return jn.parentNode},Sn=He[S.mode],Xt=S.popupOffset?{offset:S.popupOffset}:{},At=S.mode==="inline"?"":S.popupClassName;At+=Et==="rtl"?" ".concat(B,"-rtl"):"";var sn=S.disabled,dn=S.triggerSubMenuAction,Vn=S.subMenuOpenDelay,We=S.forceSubMenuRender,wt=S.subMenuCloseDelay,$n=S.builtinPlacements;Fe.forEach(function(jn){return delete S[jn]}),delete S.onClick;var Yn=Et==="rtl"?Object.assign({},ne,$n):Object.assign({},Ce,$n);return delete S.direction,k.createElement("li",Object.assign({},S,ke,{className:qe,role:"menuitem"}),Ze&&Pt,Ze&&ht,!Ze&&k.createElement(C.a,{prefixCls:B,popupClassName:A()("".concat(B,"-popup"),At),getPopupContainer:nn,builtinPlacements:Yn,popupPlacement:Sn,popupVisible:he,popupAlign:Xt,popup:ht,action:sn?[]:[dn],mouseEnterDelay:Vn,mouseLeaveDelay:wt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:We},Pt))}}]),Ee}(k.Component);Le.defaultProps={onMouseEnter:l,onMouseLeave:l,onTitleMouseEnter:l,onTitleMouseLeave:l,onTitleClick:l,manualRef:l,mode:"vertical",title:""};var De=Object(X.b)(function(Je,ge){var Ee=Je.openKeys,ae=Je.activeKey,p=Je.selectedKeys,S=ge.eventKey,he=ge.subMenuKey;return{isOpen:Ee.indexOf(S)>-1,active:ae[he]===S,selectedKeys:p}})(Le);De.isSubMenu=!0;var at=De,ut="menuitem-overflowed",ot=.5,rt=function(Je){Object(Ae.a)(Ee,Je);var ge=Object(ee.a)(Ee);function Ee(){var ae;return Object(Oe.a)(this,Ee),ae=ge.apply(this,arguments),ae.resizeObserver=null,ae.mutationObserver=null,ae.originalTotalWidth=0,ae.overflowedItems=[],ae.menuItemSizes=[],ae.cancelFrameId=null,ae.state={lastVisibleIndex:void 0},ae.getMenuItemNodes=function(){var p=ae.props.prefixCls,S=$.findDOMNode(Object(Re.a)(ae));return S?[].slice.call(S.children).filter(function(he){return he.className.split(" ").indexOf("".concat(p,"-overflowed-submenu"))<0}):[]},ae.getOverflowedSubMenuItem=function(p,S,he){var B=ae.props,Ze=B.overflowedIndicator,qe=B.level,ke=B.mode,je=B.prefixCls,it=B.theme;if(qe!==1||ke!=="horizontal")return null;var Ot=ae.props.children[0],Et=Ot.props,Rt=Et.children,zt=Et.title,Pt=Et.style,ht=Object(D.a)(Et,["children","title","style"]),nn=Object(F.a)({},Pt),Sn="".concat(p,"-overflowed-indicator"),Xt="".concat(p,"-overflowed-indicator");S.length===0&&he!==!0?nn=Object(F.a)(Object(F.a)({},nn),{},{display:"none"}):he&&(nn=Object(F.a)(Object(F.a)({},nn),{},{visibility:"hidden",position:"absolute"}),Sn="".concat(Sn,"-placeholder"),Xt="".concat(Xt,"-placeholder"));var At=it?"".concat(je,"-").concat(it):"",sn={};return Fe.forEach(function(dn){ht[dn]!==void 0&&(sn[dn]=ht[dn])}),k.createElement(at,Object.assign({title:Ze,className:"".concat(je,"-overflowed-submenu"),popupClassName:At},sn,{key:Sn,eventKey:Xt,disabled:!1,style:nn}),S)},ae.setChildrenWidthAndResize=function(){if(ae.props.mode!=="horizontal")return;var p=$.findDOMNode(Object(Re.a)(ae));if(!p)return;var S=p.children;if(!S||S.length===0)return;var he=p.children[S.length-1];de(he,"display","inline-block");var B=ae.getMenuItemNodes(),Ze=B.filter(function(qe){return qe.className.split(" ").indexOf(ut)>=0});Ze.forEach(function(qe){de(qe,"display","inline-block")}),ae.menuItemSizes=B.map(function(qe){return xe(qe,!0)}),Ze.forEach(function(qe){de(qe,"display","none")}),ae.overflowedIndicatorWidth=xe(p.children[p.children.length-1],!0),ae.originalTotalWidth=ae.menuItemSizes.reduce(function(qe,ke){return qe+ke},0),ae.handleResize(),de(he,"display","none")},ae.handleResize=function(){if(ae.props.mode!=="horizontal")return;var p=$.findDOMNode(Object(Re.a)(ae));if(!p)return;var S=xe(p);ae.overflowedItems=[];var he=0,B;ae.originalTotalWidth>S+ot&&(B=-1,ae.menuItemSizes.forEach(function(Ze){he+=Ze,he+ae.overflowedIndicatorWidth<=S&&(B+=1)})),ae.setState({lastVisibleIndex:B})},ae}return Object(ce.a)(Ee,[{key:"componentDidMount",value:function(){var p=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var S=$.findDOMNode(this);if(!S)return;this.resizeObserver=new h.default(function(he){he.forEach(function(){var B=p.cancelFrameId;cancelAnimationFrame(B),p.cancelFrameId=requestAnimationFrame(p.setChildrenWidthAndResize)})}),[].slice.call(S.children).concat(S).forEach(function(he){p.resizeObserver.observe(he)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){p.resizeObserver.disconnect(),[].slice.call(S.children).concat(S).forEach(function(he){p.resizeObserver.observe(he)}),p.setChildrenWidthAndResize()}),this.mutationObserver.observe(S,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(p){var S=this,he=this.state.lastVisibleIndex;return(p||[]).reduce(function(B,Ze,qe){var ke=Ze;if(S.props.mode==="horizontal"){var je=S.getOverflowedSubMenuItem(Ze.props.eventKey,[]);he!==void 0&&S.props.className.indexOf("".concat(S.props.prefixCls,"-root"))!==-1&&(qe>he&&(ke=k.cloneElement(Ze,{style:{display:"none"},eventKey:"".concat(Ze.props.eventKey,"-hidden"),className:"".concat(ut)})),qe===he+1&&(S.overflowedItems=p.slice(he+1).map(function(Ot){return k.cloneElement(Ot,{key:Ot.props.eventKey,mode:"vertical-left"})}),je=S.getOverflowedSubMenuItem(Ze.props.eventKey,S.overflowedItems)));var it=[].concat(Object(K.a)(B),[je,ke]);return qe===p.length-1&&it.push(S.getOverflowedSubMenuItem(Ze.props.eventKey,[],!0)),it}return[].concat(Object(K.a)(B),[ke])},[])}},{key:"render",value:function(){var p=this.props,S=p.visible,he=p.prefixCls,B=p.overflowedIndicator,Ze=p.mode,qe=p.level,ke=p.tag,je=p.children,it=p.theme,Ot=Object(D.a)(p,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Et=ke;return k.createElement(Et,Object.assign({},Ot),this.renderChildren(je))}}]),Ee}(k.Component);rt.defaultProps={tag:"div",className:""};var mt=rt;function nt(Je){return Je.length?Je.every(function(ge){return!!ge.props.disabled}):!0}function $e(Je,ge,Ee){var ae=Je.getState();Je.setState({activeKey:Object(F.a)(Object(F.a)({},ae.activeKey),{},Object(z.a)({},ge,Ee))})}function ue(Je){return Je.eventKey||"0-menu-"}function ct(Je,ge){var Ee=ge,ae=Je.children,p=Je.eventKey;if(Ee){var S;if(Y(ae,function(he,B){he&&he.props&&!he.props.disabled&&Ee===v(he,p,B)&&(S=!0)}),S)return Ee}return Ee=null,Je.defaultActiveFirst&&Y(ae,function(he,B){!Ee&&he&&!he.props.disabled&&(Ee=v(he,p,B))}),Ee}function lt(Je){if(Je){var ge=this.instanceArray.indexOf(Je);ge!==-1?this.instanceArray[ge]=Je:this.instanceArray.push(Je)}}var we=function(Je){Object(Ae.a)(Ee,Je);var ge=Object(ee.a)(Ee);function Ee(ae){var p;return Object(Oe.a)(this,Ee),p=ge.call(this,ae),p.onKeyDown=function(S,he){var B=S.keyCode,Ze;if(p.getFlatInstanceArray().forEach(function(ke){ke&&ke.props.active&&ke.onKeyDown&&(Ze=ke.onKeyDown(S))}),Ze)return 1;var qe=null;return(B===j.a.UP||B===j.a.DOWN)&&(qe=p.step(B===j.a.UP?-1:1)),qe?(S.preventDefault(),$e(p.props.store,ue(p.props),qe.props.eventKey),typeof he=="function"&&he(qe),1):void 0},p.onItemHover=function(S){var he=S.key,B=S.hover;$e(p.props.store,ue(p.props),B?he:null)},p.onDeselect=function(S){p.props.onDeselect(S)},p.onSelect=function(S){p.props.onSelect(S)},p.onClick=function(S){p.props.onClick(S)},p.onOpenChange=function(S){p.props.onOpenChange(S)},p.onDestroy=function(S){p.props.onDestroy(S)},p.getFlatInstanceArray=function(){return p.instanceArray},p.step=function(S){var he=p.getFlatInstanceArray(),B=p.props.store.getState().activeKey[ue(p.props)],Ze=he.length;if(!Ze)return null;S<0&&(he=he.concat().reverse());var qe=-1;if(he.every(function(Ot,Et){return Ot&&Ot.props.eventKey===B?(qe=Et,!1):!0}),!p.props.defaultActiveFirst&&qe!==-1&&nt(he.slice(qe,Ze-1)))return;var ke=(qe+1)%Ze,je=ke;do{var it=he[je];if(!it||it.props.disabled)je=(je+1)%Ze;else return it}while(je!==ke);return null},p.renderCommonMenuItem=function(S,he,B){var Ze=p.props.store.getState(),qe=Object(Re.a)(p),ke=qe.props,je=v(S,ke.eventKey,he),it=S.props;if(!it||typeof S.type=="string")return S;var Ot=je===Ze.activeKey,Et=Object(F.a)(Object(F.a)({mode:it.mode||ke.mode,level:ke.level,inlineIndent:ke.inlineIndent,renderMenuItem:p.renderMenuItem,rootPrefixCls:ke.prefixCls,index:he,parentMenu:ke.parentMenu,manualRef:it.disabled?void 0:Object(_e.a)(S.ref,lt.bind(Object(Re.a)(p))),eventKey:je,active:!it.disabled&&Ot,multiple:ke.multiple,onClick:function(zt){(it.onClick||l)(zt),p.onClick(zt)},onItemHover:p.onItemHover,motion:ke.motion,subMenuOpenDelay:ke.subMenuOpenDelay,subMenuCloseDelay:ke.subMenuCloseDelay,forceSubMenuRender:ke.forceSubMenuRender,onOpenChange:p.onOpenChange,onDeselect:p.onDeselect,onSelect:p.onSelect,builtinPlacements:ke.builtinPlacements,itemIcon:it.itemIcon||p.props.itemIcon,expandIcon:it.expandIcon||p.props.expandIcon},B),{},{direction:ke.direction});return(ke.mode==="inline"||te())&&(Et.triggerSubMenuAction="click"),k.cloneElement(S,Et)},p.renderMenuItem=function(S,he,B){if(!S)return null;var Ze=p.props.store.getState(),qe={openKeys:Ze.openKeys,selectedKeys:Ze.selectedKeys,triggerSubMenuAction:p.props.triggerSubMenuAction,subMenuKey:B};return p.renderCommonMenuItem(S,he,qe)},ae.store.setState({activeKey:Object(F.a)(Object(F.a)({},ae.store.getState().activeKey),{},Object(z.a)({},ae.eventKey,ct(ae,ae.activeKey)))}),p.instanceArray=[],p}return Object(ce.a)(Ee,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(p){return this.props.visible||p.visible||this.props.className!==p.className||!H()(this.props.style,p.style)}},{key:"componentDidUpdate",value:function(p){var S=this.props,he="activeKey"in S?S.activeKey:S.store.getState().activeKey[ue(S)],B=ct(S,he);if(B!==he)$e(S.store,ue(S),B);else if("activeKey"in p){var Ze=ct(p,p.activeKey);B!==Ze&&$e(S.store,ue(S),B)}}},{key:"render",value:function(){var p=this,S=Object(V.a)({},this.props);this.instanceArray=[];var he=A()(S.prefixCls,S.className,"".concat(S.prefixCls,"-").concat(S.mode)),B={className:he,role:S.role||"menu"};S.id&&(B.id=S.id),S.focusable&&(B.tabIndex=0,B.onKeyDown=this.onKeyDown);var Ze=S.prefixCls,qe=S.eventKey,ke=S.visible,je=S.level,it=S.mode,Ot=S.overflowedIndicator,Et=S.theme;return Fe.forEach(function(Rt){return delete S[Rt]}),delete S.onClick,k.createElement(mt,Object.assign({},S,{prefixCls:Ze,mode:it,tag:"ul",level:je,theme:Et,visible:ke,overflowedIndicator:Ot},B),k.Children.map(S.children,function(Rt,zt){return p.renderMenuItem(Rt,zt,qe||"0-menu-")}))}}]),Ee}(k.Component);we.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:l};var Ke=Object(X.b)()(we),W=Ke,R=y("Kwbf");function I(Je,ge,Ee){var ae=Je.prefixCls,p=Je.motion,S=Je.defaultMotions,he=S===void 0?{}:S,B=Je.openAnimation,Ze=Je.openTransitionName,qe=ge.switchingModeFromInline;if(p)return p;if(Object(re.a)(B)==="object"&&B)Object(R.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof B=="string")return{motionName:"".concat(ae,"-open-").concat(B)};if(Ze)return{motionName:Ze};var ke=he[Ee];return ke||(qe?null:he.other)}var f=function(Je){Object(Ae.a)(Ee,Je);var ge=Object(ee.a)(Ee);function Ee(ae){var p;Object(Oe.a)(this,Ee),p=ge.call(this,ae),p.inlineOpenKeys=[],p.onSelect=function(B){var Ze=Object(Re.a)(p),qe=Ze.props;if(qe.selectable){var ke=p.store.getState(),je=ke.selectedKeys,it=B.key;qe.multiple?je=je.concat([it]):je=[it],"selectedKeys"in qe||p.store.setState({selectedKeys:je}),qe.onSelect(Object(F.a)(Object(F.a)({},B),{},{selectedKeys:je}))}},p.onClick=function(B){var Ze=p.getRealMenuMode(),qe=Object(Re.a)(p),ke=qe.store,je=qe.props.onOpenChange;Ze!=="inline"&&!("openKeys"in p.props)&&(ke.setState({openKeys:[]}),je([])),p.props.onClick(B)},p.onKeyDown=function(B,Ze){p.innerMenu.getWrappedInstance().onKeyDown(B,Ze)},p.onOpenChange=function(B){var Ze=Object(Re.a)(p),qe=Ze.props,ke=p.store.getState().openKeys.concat(),je=!1,it=function(Et){var Rt=!1;if(Et.open)Rt=ke.indexOf(Et.key)===-1,Rt&&ke.push(Et.key);else{var zt=ke.indexOf(Et.key);Rt=zt!==-1,Rt&&ke.splice(zt,1)}je=je||Rt};Array.isArray(B)?B.forEach(it):it(B),je&&("openKeys"in p.props||p.store.setState({openKeys:ke}),qe.onOpenChange(ke))},p.onDeselect=function(B){var Ze=Object(Re.a)(p),qe=Ze.props;if(qe.selectable){var ke=p.store.getState().selectedKeys.concat(),je=B.key,it=ke.indexOf(je);it!==-1&&ke.splice(it,1),"selectedKeys"in qe||p.store.setState({selectedKeys:ke}),qe.onDeselect(Object(F.a)(Object(F.a)({},B),{},{selectedKeys:ke}))}},p.onMouseEnter=function(B){p.restoreModeVerticalFromInline();var Ze=p.props.onMouseEnter;Ze&&Ze(B)},p.onTransitionEnd=function(B){var Ze=B.propertyName==="width"&&B.target===B.currentTarget,qe=B.target.className,ke=Object.prototype.toString.call(qe)==="[object SVGAnimatedString]"?qe.animVal:qe,je=B.propertyName==="font-size"&&ke.indexOf("anticon")>=0;(Ze||je)&&p.restoreModeVerticalFromInline()},p.setInnerMenu=function(B){p.innerMenu=B},p.isRootMenu=!0;var S=ae.defaultSelectedKeys,he=ae.defaultOpenKeys;return"selectedKeys"in ae&&(S=ae.selectedKeys||[]),"openKeys"in ae&&(he=ae.openKeys||[]),p.store=Object(X.c)({selectedKeys:S,openKeys:he,activeKey:{"0-menu-":ct(ae,ae.activeKey)}}),p.state={switchingModeFromInline:!1},p}return Object(ce.a)(Ee,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(p){this.updateOpentKeysWhenSwitchMode(p),this.updateMiniStore();var S=this.props,he=S.siderCollapsed,B=S.inlineCollapsed,Ze=S.onOpenChange;(!p.inlineCollapsed&&B||!p.siderCollapsed&&he)&&Ze([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(p){var S=this.props,he=this.store,B=this.inlineOpenKeys,Ze=he.getState(),qe={};p.mode==="inline"&&S.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in S||((S.inlineCollapsed&&!p.inlineCollapsed||S.siderCollapsed&&!p.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Ze.openKeys.concat(),qe.openKeys=[]),(!S.inlineCollapsed&&p.inlineCollapsed||!S.siderCollapsed&&p.siderCollapsed)&&(qe.openKeys=B,this.inlineOpenKeys=[])),Object.keys(qe).length&&he.setState(qe)}},{key:"updateMenuDisplay",value:function(){var p=this.props.collapsedWidth,S=this.store,he=this.prevOpenKeys,B=this.getInlineCollapsed()&&(p===0||p==="0"||p==="0px");B?(this.prevOpenKeys=S.getState().openKeys.concat(),this.store.setState({openKeys:[]})):he&&(this.store.setState({openKeys:he}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var p=this.props.mode,S=this.state.switchingModeFromInline,he=this.getInlineCollapsed();return S&&he?"inline":he?"vertical":p}},{key:"getInlineCollapsed",value:function(){var p=this.props,S=p.inlineCollapsed,he=p.siderCollapsed;return he!==void 0?he:S}},{key:"restoreModeVerticalFromInline",value:function(){var p=this.state.switchingModeFromInline;p&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var p=Object(F.a)({},Object(oe.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),S=this.getRealMenuMode();return p.className+=" ".concat(p.prefixCls,"-root"),p.direction==="rtl"&&(p.className+=" ".concat(p.prefixCls,"-rtl")),p=Object(F.a)(Object(F.a)({},p),{},{mode:S,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:I(this.props,this.state,S)}),delete p.openAnimation,delete p.openTransitionName,k.createElement(X.a,{store:this.store},k.createElement(W,Object.assign({},p,{ref:this.setInnerMenu}),this.props.children))}}]),Ee}(k.Component);f.defaultProps={selectable:!0,onClick:l,onSelect:l,onOpenChange:l,onDeselect:l,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:k.createElement("span",null,"\xB7\xB7\xB7")};var m=f,b=function(Je){Object(Ae.a)(Ee,Je);var ge=Object(ee.a)(Ee);function Ee(){var ae;return Object(Oe.a)(this,Ee),ae=ge.apply(this,arguments),ae.onKeyDown=function(p){var S=p.keyCode;return S===j.a.ENTER?(ae.onClick(p),!0):void 0},ae.onMouseLeave=function(p){var S=ae.props,he=S.eventKey,B=S.onItemHover,Ze=S.onMouseLeave;B({key:he,hover:!1}),Ze({key:he,domEvent:p})},ae.onMouseEnter=function(p){var S=ae.props,he=S.eventKey,B=S.onItemHover,Ze=S.onMouseEnter;B({key:he,hover:!0}),Ze({key:he,domEvent:p})},ae.onClick=function(p){var S=ae.props,he=S.eventKey,B=S.multiple,Ze=S.onClick,qe=S.onSelect,ke=S.onDeselect,je=S.isSelected,it={key:he,keyPath:[he],item:Object(Re.a)(ae),domEvent:p};Ze(it),B?je?ke(it):qe(it):je||qe(it)},ae.saveNode=function(p){ae.node=p},ae}return Object(ce.a)(Ee,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var p=this.props;p.onDestroy&&p.onDestroy(p.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var p,S=Object(F.a)({},this.props),he=A()(this.getPrefixCls(),S.className,(p={},Object(z.a)(p,this.getActiveClassName(),!S.disabled&&S.active),Object(z.a)(p,this.getSelectedClassName(),S.isSelected),Object(z.a)(p,this.getDisabledClassName(),S.disabled),p)),B=Object(F.a)(Object(F.a)({},S.attribute),{},{title:typeof S.title=="string"?S.title:void 0,className:he,role:S.role||"menuitem","aria-disabled":S.disabled});S.role==="option"?B=Object(F.a)(Object(F.a)({},B),{},{role:"option","aria-selected":S.isSelected}):(S.role===null||S.role==="none")&&(B.role="none");var Ze={onClick:S.disabled?null:this.onClick,onMouseLeave:S.disabled?null:this.onMouseLeave,onMouseEnter:S.disabled?null:this.onMouseEnter},qe=Object(F.a)({},S.style);S.mode==="inline"&&(S.direction==="rtl"?qe.paddingRight=S.inlineIndent*S.level:qe.paddingLeft=S.inlineIndent*S.level),Fe.forEach(function(je){return delete S[je]}),delete S.direction;var ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ke=k.createElement(this.props.itemIcon,this.props)),k.createElement("li",Object.assign({},Object(oe.a)(S,["onClick","onMouseEnter","onMouseLeave","onSelect"]),B,Ze,{style:qe,ref:this.saveNode}),S.children,ke)}}]),Ee}(k.Component);b.isMenuItem=!0,b.defaultProps={onSelect:l,onMouseEnter:l,onMouseLeave:l,manualRef:l};var O=Object(X.b)(function(Je,ge){var Ee=Je.activeKey,ae=Je.selectedKeys,p=ge.eventKey,S=ge.subMenuKey;return{active:Ee[S]===p,isSelected:ae.indexOf(p)!==-1}})(b),U=O,se=function(Je){Object(Ae.a)(Ee,Je);var ge=Object(ee.a)(Ee);function Ee(){var ae;return Object(Oe.a)(this,Ee),ae=ge.apply(this,arguments),ae.renderInnerMenuItem=function(p){var S=ae.props,he=S.renderMenuItem,B=S.index;return he(p,B,ae.props.subMenuKey)},ae}return Object(ce.a)(Ee,[{key:"render",value:function(){var p=Object(V.a)({},this.props),S=p.className,he=S===void 0?"":S,B=p.rootPrefixCls,Ze="".concat(B,"-item-group-title"),qe="".concat(B,"-item-group-list"),ke=p.title,je=p.children;return Fe.forEach(function(it){return delete p[it]}),delete p.onClick,delete p.direction,k.createElement("li",Object.assign({},p,{className:"".concat(he," ").concat(B,"-item-group")}),k.createElement("div",{className:Ze,title:typeof ke=="string"?ke:void 0},ke),k.createElement("ul",{className:qe},k.Children.map(je,this.renderInnerMenuItem)))}}]),Ee}(k.Component);se.isMenuItemGroup=!0,se.defaultProps={disabled:!0};var Ne=se,Qe=function(ge){var Ee=ge.className,ae=ge.rootPrefixCls,p=ge.style;return k.createElement("li",{className:"".concat(Ee," ").concat(ae,"-item-divider"),style:p})};Qe.defaultProps={disabled:!0,className:"",style:{}};var gt=Qe,pt=dt.e=m},"7Cbv":function(kt,dt,y){"use strict";var F=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Oe=new Uint8Array(16);function ce(){if(!F)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F(Oe)}var Re=/^(?:[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 Ae(_e){return typeof _e=="string"&&Re.test(_e)}for(var ee=Ae,k=[],X=0;X<256;++X)k.push((X+256).toString(16).substr(1));function oe(_e){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,H=(k[_e[J+0]]+k[_e[J+1]]+k[_e[J+2]]+k[_e[J+3]]+"-"+k[_e[J+4]]+k[_e[J+5]]+"-"+k[_e[J+6]]+k[_e[J+7]]+"-"+k[_e[J+8]]+k[_e[J+9]]+"-"+k[_e[J+10]]+k[_e[J+11]]+k[_e[J+12]]+k[_e[J+13]]+k[_e[J+14]]+k[_e[J+15]]).toLowerCase();if(!ee(H))throw TypeError("Stringified UUID is invalid");return H}var V=oe;function z(_e,J,H){_e=_e||{};var E=_e.random||(_e.rng||ce)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,J){H=H||0;for(var A=0;A<16;++A)J[H+A]=E[A];return J}return V(E)}var j=dt.a=z},"7ahc":function(kt,dt,y){"use strict";y.d(dt,"a",function(){return Ve});var F=y("k1fw"),Oe=y("0Owb"),ce=y("+L6B"),Re=y("2/Rp"),Ae=y("y8nQ"),ee=y("Vl3Y"),k=y("tJVT"),X=y("OaEy"),oe=y("2fM7"),V=y("cDcd"),z=y.n(V),j=y("VrN/"),_e=y.n(j),J=y("p77/"),H=y.n(J),E=y("c5Ni"),A=y.n(E),re=oe.a.Option,ie={labelCol:{span:4},wrapperCol:{span:20}},ye={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"]};dt.b=function(Be){var Ue=Be.callback,Ye=Be.onCancel,ve=Object(V.useState)("python"),be=Object(k.a)(ve,2),Ie=be[0],pe=be[1];function w(Z){pe(ye[Z][1])}function fe(Z){Ue(Z)}return z.a.createElement(ee.a,Object(Oe.a)({},ie,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:fe}),z.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},z.a.createElement(oe.a,{onChange:w},Object.keys(ye).map(function(Z){return z.a.createElement(re,{key:Z,value:Z},ye[Z][0])}))),z.a.createElement(ee.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},z.a.createElement(Ve,{mode:Ie})),z.a.createElement("div",{className:"flex-container flex-end"},z.a.createElement(Re.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),z.a.createElement(Re.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))};function Ve(Be){var Ue=Be.value,Ye=Be.onChange,ve=Be.mode,be=Be.options,Ie=be===void 0?{}:be,pe=Object(V.useRef)(),w=Object(V.useState)(),fe=Object(k.a)(w,2),Z=fe[0],M=fe[1];return Object(V.useEffect)(function(){if(Z){function le(L){var P=L.getValue();Ye&&Ye(P)}return Z.on("change",le),function(){Z.off("change",le)}}},[Z,Ye]),Object(V.useEffect)(function(){Z&&Z.setOption("mode",ve)},[Z,ve]),Object(V.useEffect)(function(){Z&&((Ue!==Z.getValue()||Ue==="")&&setTimeout(function(){Z.setValue(Ue||" ")},300))},[Z,Ue]),Object(V.useEffect)(function(){if(pe.current&&!Z){var le=_e.a.fromTextArea(pe.current,Object(F.a)({mode:ve,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ie));M(le)}},[pe.current,Z]),z.a.createElement("div",{className:"my-codemirror-container"},z.a.createElement("textarea",{ref:pe}))}},"8EBN":function(kt,dt,y){(function(F){F(y("VrN/"))})(function(F){"use strict";F.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 Oe=0;Oe<F.modeInfo.length;Oe++){var ce=F.modeInfo[Oe];ce.mimes&&(ce.mime=ce.mimes[0])}F.findModeByMIME=function(Re){Re=Re.toLowerCase();for(var Ae=0;Ae<F.modeInfo.length;Ae++){var ee=F.modeInfo[Ae];if(ee.mime==Re)return ee;if(ee.mimes){for(var k=0;k<ee.mimes.length;k++)if(ee.mimes[k]==Re)return ee}}if(/\+xml$/.test(Re))return F.findModeByMIME("application/xml");if(/\+json$/.test(Re))return F.findModeByMIME("application/json")},F.findModeByExtension=function(Re){Re=Re.toLowerCase();for(var Ae=0;Ae<F.modeInfo.length;Ae++){var ee=F.modeInfo[Ae];if(ee.ext){for(var k=0;k<ee.ext.length;k++)if(ee.ext[k]==Re)return ee}}},F.findModeByFileName=function(Re){for(var Ae=0;Ae<F.modeInfo.length;Ae++){var ee=F.modeInfo[Ae];if(ee.file&&ee.file.test(Re))return ee}var k=Re.lastIndexOf("."),X=k>-1&&Re.substring(k+1,Re.length);if(X)return F.findModeByExtension(X)},F.findModeByName=function(Re){Re=Re.toLowerCase();for(var Ae=0;Ae<F.modeInfo.length;Ae++){var ee=F.modeInfo[Ae];if(ee.name.toLowerCase()==Re)return ee;if(ee.alias){for(var k=0;k<ee.alias.length;k++)if(ee.alias[k].toLowerCase()==Re)return ee}}}})},"8hTe":function(kt,dt,y){kt.exports={button:"button___1wy9m"}},"9Bee":function(kt,dt,y){"use strict";var F=y("DYRE"),Oe=y("zeV3"),ce=y("+L6B"),Re=y("2/Rp"),Ae=y("k1fw"),ee=y("tJVT"),k=y("cDcd"),X=y.n(k),oe=y("vg9a"),V=y("DlQD"),z=y.n(V),j=y("rUJ1");function _e(de,te){var K=de.match(/^(\s+)(?:```)/);if(K===null)return te;var D=K[1];return te.split(`
|
|
`).map(function($){var h=$.match(/^\s+/);if(h===null)return $;var C=Object(ee.a)(h,1),g=C[0];return g.length>=D.length?$.slice(D.length):$}).join(`
|
|
`)}var J=[],H=["<ul>"],E=new z.a.Renderer,A=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function re(){J.length=0,H=["<ul>"]}var ie={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ye(de,te,K,D){if(te>=de.length||de[te].level<=K)return te;var $=de[te];D.push("<li><a href='#"+$.anchor+"'>"+$.text+"</a>"),te++;var h=[];return te=ye(de,te,$.level,h),h.length>0&&(D.push("<ul>"),h.forEach(function(C){D.push(C)}),D.push("</ul>")),D.push("</li>"),te=ye(de,te,K,D),te}function Ve(){return ye(J,0,0,H),H.push("</ul>"),H.join("")}var Be={heading:function(te){var K=A.exec(te);if(K)return{type:"heading",raw:K[0],depth:K[1].length,text:K[2]}},fences:function(te){var K=this.rules.block.fences.exec(te);if(K){var D=K[0],$=_e(D,K[3]||""),h=K[2]?K[2].trim():K[2];if(["latex","katex","math"].indexOf(h)>=0){var C=ve(),g=$;$=C,be[C]={type:"block",expression:g}}return{type:"code",raw:D,lang:h,text:$}}}},Ue=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Ye=0,ve=function(){return"__special_katext_id_".concat(Ye++,"__")},be={};function Ie(){return be}function pe(){Ye=0,be={}}function w(de){return de=de.replace(Ue,function(te,K){var D=ve();return be[D]={type:"inline",expression:K},D}),de}var fe=E.listitem;E.listitem=function(de){return fe(w(de))};var Z=E.paragraph;E.paragraph=function(de){return Z(w(de))};var M=E.tablecell;E.tablecell=function(de,te){return M(w(de),te)},E.code=function(de,te,K){var D=(te||"").match(/\S*/)[0];return D?["latex","katex","math"].indexOf(D)>=0?"<p class='editormd-tex'>".concat(de,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(te,'">').concat(K?de:Object(j.escape)(de,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(K?de:Object(j.escape)(de,!0))+"</code></pre>"},E.heading=function(de,te,K){var D=this.options.headerPrefix+K.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return J.push({anchor:D,level:te,text:de}),"<h"+te+' id="'+D+'">'+de+"</h"+te+">"},z.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),z.a.use({tokenizer:Be,renderer:E});var le=z.a,L=y("SJMd"),P=y("ulZh"),_=y.n(P),c=y("m3rI"),l=y("Oy/b"),v=y("p5ED"),N=y("8hTe"),Y=y.n(N),Me=/<pre[^>]*>/g;function Fe(de){var te=document.createElement("div");return te.innerHTML=de,te.childNodes.length===0?"":te.childNodes[0].nodeValue}var xe=dt.a=function(de){var te=de.value,K=te===void 0?"":te,D=de.edit,$=D===void 0?!1:D,h=de.className,C=de.showTextOnly,g=de.showLines,q=de.replaces,Ce=de.zoomImg,ne=de.hasMask,me=de.style,Te=me===void 0?{}:me,He=de.stylesPrev,ze=He===void 0?{}:He,Le=String(K),De=Object(k.useRef)(),at=Object(k.useRef)(),ut=Object(k.useState)(""),ot=Object(ee.a)(ut,2),rt=ot[0],mt=ot[1],nt=Object(k.useState)("office"),$e=Object(ee.a)(nt,2),ue=$e[0],ct=$e[1],lt=Object(k.useMemo)(function(){try{var I=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,f=/\"\/api\/attachments\/|\"\/attachments\/download\//g,m=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Le=Le.replace(I,"("+c.a.API_SERVER+"/api/attachments/").replace(f,'"'+c.a.API_SERVER+"/api/attachments/").replace(m,'"'+c.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(se){}var b=le(Le),O=Ie();if(Le.match(/\[TOC\]/)&&(b=b.replace("<p>[TOC]</p>",Ve()),re()),b=b.replace(/(__special_katext_id_\d+__)/g,function(se,Ne){var Qe=O[Ne],gt=Qe.type,pt=Qe.expression;return Object(l.renderToString)(Fe(pt)||"",{displayMode:gt==="block",throwOnError:!1,output:"html"})}),b=b.replace(/▁/g,"\u2581\u2581\u2581"),pe(),C){var U=document.createElement("div");return U.innerHTML=b,U.innerText}return setTimeout(function(){return W()},500),b},[Le]),we=Object(k.useRef)();ie.WebkitLineClamp=g,g&&(Te=Object(Ae.a)(Object(Ae.a)({},Te),ie));function Ke(I){var f=I.target;if(f.tagName.toUpperCase()==="IMG"){if(Ce){var m=f.getAttribute("src");mt(m),ct("image")}}else if(f.tagName.toUpperCase()==="A"){var b=f.getAttribute("href");if(b.indexOf("office")>-1)I.preventDefault(),mt(b),ct("office");else if(b.indexOf("application/pdf")>-1)I.preventDefault(),mt(b),ct("pdf");else if(b.indexOf("text/html")>-1)I.preventDefault(),mt(b),ct("html");else if(b.startsWith("#")){I.preventDefault();var O=document.getElementById(b.replace("#",""));O&&O.scrollIntoView(!0)}}}var W=function(){var f,m=(f=we.current)===null||f===void 0?void 0:f.querySelectorAll("video");m==null||m.forEach(function(b){if(b.oncontextmenu=function(){return!1},b.src.indexOf(".m3u8")>-1&&!b.canPlayType("application/vnd.apple.mpegurl")){if(_.a.isSupported()){var O=new _.a;O.loadSource(b.src),O.attachMedia(b)}}})};Object(k.useEffect)(function(){if(we.current&<&&(lt.match(Me)&&window.PR.prettyPrint()),we.current)return we.current.addEventListener("click",Ke),function(){we.current.removeEventListener("click",Ke),pe(),re()}},[lt,we.current,Ke]);var R=function(f){if(!$)return;f.target.nodeName==="IMG"?(De.current.style.display="flex",De.current.style.width=f.target.clientWidth+"px",De.current.style.height=f.target.clientHeight+"px",De.current.style.top=f.target.offsetTop+"px",De.current.style.left=f.target.offsetLeft+"px",at.current.src=f.target.getAttribute("src")):De.current.style.display="none"};return X.a.createElement("div",{style:{position:"relative"}},X.a.createElement("div",{ref:we,style:Object(Ae.a)({},Te),className:"".concat(h||""," markdown-body ").concat(Y.a.mdBody),onMouseOver:R,dangerouslySetInnerHTML:{__html:lt}}),X.a.createElement("div",{ref:De,className:Y.a.button},X.a.createElement(Oe.a,null,X.a.createElement(Re.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),X.a.createElement(Re.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),X.a.createElement("img",{ref:at,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),X.a.createElement(v.a,{close:!0,data:rt,type:rt!=null&&rt.length?ue:"",style:Object(Ae.a)({},ze),onClose:function(){return mt("")}}))}},"9VGf":function(kt,dt,y){"use strict";y.d(dt,"a",function(){return ce});var F=y("cDcd"),Oe=y.n(F);function ce(Re,Ae){var ee=Object(F.useRef)();Object(F.useEffect)(function(){ee.current=Re}),Object(F.useEffect)(function(){function k(){ee.current()}if(Ae!==null){var X=setInterval(k,Ae);return function(){return clearInterval(X)}}},[Ae])}},Bd2K:function(kt,dt,y){(function(F){F(y("VrN/"),y("osHv"))})(function(F){F.defineOption("autoCloseTags",!1,function(oe,V,z){if(z!=F.Init&&z&&oe.removeKeyMap("autoCloseTags"),!V)return;var j={name:"autoCloseTags"};(typeof V!="object"||V.whenClosing!==!1)&&(j["'/'"]=function(_e){return ee(_e)}),(typeof V!="object"||V.whenOpening!==!1)&&(j["'>'"]=function(_e){return Re(_e)}),oe.addKeyMap(j)});var Oe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ce=["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 Re(oe){if(oe.getOption("disableInput"))return F.Pass;for(var V=oe.listSelections(),z=[],j=oe.getOption("autoCloseTags"),_e=0;_e<V.length;_e++){if(!V[_e].empty())return F.Pass;var J=V[_e].head,H=oe.getTokenAt(J),E=F.innerMode(oe.getMode(),H.state),A=E.state,re=E.mode.xmlCurrentTag&&E.mode.xmlCurrentTag(A),ie=re&&re.name;if(!ie)return F.Pass;var ye=E.mode.configuration=="html",Ve=typeof j=="object"&&j.dontCloseTags||ye&&Oe,Be=typeof j=="object"&&j.indentTags||ye&&ce;H.end>J.ch&&(ie=ie.slice(0,ie.length-H.end+J.ch));var Ue=ie.toLowerCase();if(!ie||H.type=="string"&&(H.end!=J.ch||!/[\"\']/.test(H.string.charAt(H.string.length-1))||H.string.length==1)||H.type=="tag"&&re.close||H.string.indexOf("/")==J.ch-H.start-1||Ve&&k(Ve,Ue)>-1||X(oe,E.mode.xmlCurrentContext&&E.mode.xmlCurrentContext(A)||[],ie,J,!0))return F.Pass;var Ye=typeof j=="object"&&j.emptyTags;if(Ye&&k(Ye,ie)>-1){z[_e]={text:"/>",newPos:F.Pos(J.line,J.ch+2)};continue}var ve=Be&&k(Be,Ue)>-1;z[_e]={indent:ve,text:">"+(ve?`
|
|
|
|
`:"")+"</"+ie+">",newPos:ve?F.Pos(J.line+1,0):F.Pos(J.line,J.ch+1)}}for(var be=typeof j=="object"&&j.dontIndentOnAutoClose,_e=V.length-1;_e>=0;_e--){var Ie=z[_e];oe.replaceRange(Ie.text,V[_e].head,V[_e].anchor,"+insert");var pe=oe.listSelections().slice(0);pe[_e]={head:Ie.newPos,anchor:Ie.newPos},oe.setSelections(pe),!be&&Ie.indent&&(oe.indentLine(Ie.newPos.line,null,!0),oe.indentLine(Ie.newPos.line+1,null,!0))}}function Ae(oe,V){for(var z=oe.listSelections(),j=[],_e=V?"/":"</",J=oe.getOption("autoCloseTags"),H=typeof J=="object"&&J.dontIndentOnSlash,E=0;E<z.length;E++){if(!z[E].empty())return F.Pass;var A=z[E].head,re=oe.getTokenAt(A),ie=F.innerMode(oe.getMode(),re.state),ye=ie.state;if(V&&(re.type=="string"||re.string.charAt(0)!="<"||re.start!=A.ch-1))return F.Pass;var Ve,Be=ie.mode.name!="xml"&&oe.getMode().name=="htmlmixed";if(Be&&ie.mode.name=="javascript")Ve=_e+"script";else if(Be&&ie.mode.name=="css")Ve=_e+"style";else{var Ue=ie.mode.xmlCurrentContext&&ie.mode.xmlCurrentContext(ye);if(!Ue||Ue.length&&X(oe,Ue,Ue[Ue.length-1],A))return F.Pass;Ve=_e+Ue[Ue.length-1]}oe.getLine(A.line).charAt(re.end)!=">"&&(Ve+=">"),j[E]=Ve}if(oe.replaceSelections(j),z=oe.listSelections(),!H)for(var E=0;E<z.length;E++)(E==z.length-1||z[E].head.line<z[E+1].head.line)&&oe.indentLine(z[E].head.line)}function ee(oe){return oe.getOption("disableInput")?F.Pass:Ae(oe,!0)}F.commands.closeTag=function(oe){return Ae(oe)};function k(oe,V){if(oe.indexOf)return oe.indexOf(V);for(var z=0,j=oe.length;z<j;++z)if(oe[z]==V)return z;return-1}function X(oe,V,z,j,_e){if(!F.scanForClosingTag)return!1;var J=Math.min(oe.lastLine()+1,j.line+500),H=F.scanForClosingTag(oe,j,null,J);if(!H||H.tag!=z)return!1;for(var E=_e?1:0,A=V.length-1;A>=0&&V[A]==z;A--)++E;j=H.to;for(var A=1;A<E;A++){var re=F.scanForClosingTag(oe,j,null,J);if(!re||re.tag!=z)return!1;j=re.to}return!0}})},BjJ7:function(kt,dt,y){"use strict";y.d(dt,"d",function(){return Oe}),y.d(dt,"c",function(){return ce}),y.d(dt,"e",function(){return Re}),y.d(dt,"b",function(){return Ae}),y.d(dt,"a",function(){return k});var F=y("m3rI");function Oe(X){var oe=!0;if(X.length>0){for(var V=0;V<X.length;V++)if(X[V].compile_success==0||!X[V].compile_success){oe=!1;break}}else oe=!1;return oe}function ce(X){for(var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",V=[],z=0;z<X.length;z++){var j=X[z],_e=oe?"".concat(oe,"/").concat(j.name):"".concat(j.name);V.push({title:j.name,isLeaf:!(j.type==="tree"),key:_e})}return V}function Re(X,oe,V){for(var z=0;z<X.length;z++){var j=X[z];if(j.key===oe){j.children=V;break}j.children&&Re(j.children,oe,V)}return X}function Ae(X,oe,V){var z;return function(){var j=this,_e=arguments,J=function(){z=null,V||X.apply(j,_e)},H=V&&!z;clearTimeout(z),z=setTimeout(J,oe),H&&X.apply(j,_e)}}var ee=!0,k=F.a.API_SERVER},"C+DQ":function(kt,dt,y){},DlQD:function(kt,dt,y){(function(F,Oe){kt.exports=Oe()})(this,function(){"use strict";function F(W,R){for(var I=0;I<R.length;I++){var f=R[I];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(W,f.key,f)}}function Oe(W,R,I){return R&&F(W.prototype,R),I&&F(W,I),W}function ce(W,R){if(!W)return;if(typeof W=="string")return Re(W,R);var I=Object.prototype.toString.call(W).slice(8,-1);if(I==="Object"&&W.constructor&&(I=W.constructor.name),I==="Map"||I==="Set")return Array.from(W);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return Re(W,R)}function Re(W,R){(R==null||R>W.length)&&(R=W.length);for(var I=0,f=new Array(R);I<R;I++)f[I]=W[I];return f}function Ae(W,R){var I;if(typeof Symbol=="undefined"||W[Symbol.iterator]==null){if(Array.isArray(W)||(I=ce(W))||R&&W&&typeof W.length=="number"){I&&(W=I);var f=0;return function(){return f>=W.length?{done:!0}:{done:!1,value:W[f++]}}}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 I=W[Symbol.iterator](),I.next.bind(I)}function ee(W,R){return R={exports:{}},W(R,R.exports),R.exports}var k=ee(function(W){function R(){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 I(f){W.exports.defaults=f}W.exports={defaults:R(),getDefaults:R,changeDefaults:I}}),X=k.defaults,oe=k.getDefaults,V=k.changeDefaults,z=/[&<>"']/,j=/[&<>"']/g,_e=/[<>"']|&(?!#?\w+;)/,J=/[<>"']|&(?!#?\w+;)/g,H={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(R){return H[R]};function A(W,R){if(R){if(z.test(W))return W.replace(j,E)}else if(_e.test(W))return W.replace(J,E);return W}var re=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ie(W){return W.replace(re,function(R,I){return I=I.toLowerCase(),I==="colon"?":":I.charAt(0)==="#"?I.charAt(1)==="x"?String.fromCharCode(parseInt(I.substring(2),16)):String.fromCharCode(+I.substring(1)):""})}var ye=/(^|[^\[])\^/g;function Ve(W,R){W=W.source||W,R=R||"";var I={replace:function(m,b){return b=b.source||b,b=b.replace(ye,"$1"),W=W.replace(m,b),I},getRegex:function(){return new RegExp(W,R)}};return I}var Be=/[^\w:]/g,Ue=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ye(W,R,I){if(W){var f;try{f=decodeURIComponent(ie(I)).replace(Be,"").toLowerCase()}catch(m){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}R&&!Ue.test(I)&&(I=w(R,I));try{I=encodeURI(I).replace(/%25/g,"%")}catch(m){return null}return I}var ve={},be=/^[^:]+:\/*[^/]*$/,Ie=/^([^:]+:)[\s\S]*$/,pe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(W,R){ve[" "+W]||(be.test(W)?ve[" "+W]=W+"/":ve[" "+W]=le(W,"/",!0)),W=ve[" "+W];var I=W.indexOf(":")===-1;return R.substring(0,2)==="//"?I?R:W.replace(Ie,"$1")+R:R.charAt(0)==="/"?I?R:W.replace(pe,"$1")+R:W+R}var fe={exec:function(){}};function Z(W){for(var R=1,I,f;R<arguments.length;R++){I=arguments[R];for(f in I)Object.prototype.hasOwnProperty.call(I,f)&&(W[f]=I[f])}return W}function M(W,R){var I=W.replace(/\|/g,function(b,O,U){for(var se=!1,Ne=O;--Ne>=0&&U[Ne]==="\\";)se=!se;return se?"|":" |"}),f=I.split(/ \|/),m=0;if(f.length>R)f.splice(R);else for(;f.length<R;)f.push("");for(;m<f.length;m++)f[m]=f[m].trim().replace(/\\\|/g,"|");return f}function le(W,R,I){var f=W.length;if(f===0)return"";for(var m=0;m<f;){var b=W.charAt(f-m-1);if(b===R&&!I)m++;else if(b!==R&&I)m++;else break}return W.substr(0,f-m)}function L(W,R){if(W.indexOf(R[1])===-1)return-1;for(var I=W.length,f=0,m=0;m<I;m++)if(W[m]==="\\")m++;else if(W[m]===R[0])f++;else if(W[m]===R[1]&&(f--,f<0))return m;return-1}function P(W){W&&W.sanitize&&!W.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 _={escape:A,unescape:ie,edit:Ve,cleanUrl:Ye,resolveUrl:w,noopTest:fe,merge:Z,splitCells:M,rtrim:le,findClosingBracket:L,checkSanitizeDeprecation:P},c=k.defaults,l=_.rtrim,v=_.splitCells,N=_.escape,Y=_.findClosingBracket;function Me(W,R,I){var f=R.href,m=R.title?N(R.title):null,b=W[1].replace(/\\([\[\]])/g,"$1");return W[0].charAt(0)!=="!"?{type:"link",raw:I,href:f,title:m,text:b}:{type:"image",raw:I,href:f,title:m,text:N(b)}}function Fe(W,R){var I=W.match(/^(\s+)(?:```)/);if(I===null)return R;var f=I[1];return R.split(`
|
|
`).map(function(m){var b=m.match(/^\s+/);if(b===null)return m;var O=b[0];return O.length>=f.length?m.slice(f.length):m}).join(`
|
|
`)}var xe=function(){function W(I){this.options=I||c}var R=W.prototype;return R.space=function(f){var m=this.rules.block.newline.exec(f);if(m)return m[0].length>1?{type:"space",raw:m[0]}:{raw:`
|
|
`}},R.code=function(f,m){var b=this.rules.block.code.exec(f);if(b){var O=m[m.length-1];if(O&&O.type==="paragraph")return{raw:b[0],text:b[0].trimRight()};var U=b[0].replace(/^ {4}/gm,"");return{type:"code",raw:b[0],codeBlockStyle:"indented",text:this.options.pedantic?U:l(U,`
|
|
`)}}},R.fences=function(f){var m=this.rules.block.fences.exec(f);if(m){var b=m[0],O=Fe(b,m[3]||"");return{type:"code",raw:b,lang:m[2]?m[2].trim():m[2],text:O}}},R.heading=function(f){var m=this.rules.block.heading.exec(f);if(m)return{type:"heading",raw:m[0],depth:m[1].length,text:m[2]}},R.nptable=function(f){var m=this.rules.block.nptable.exec(f);if(m){var b={type:"table",header:v(m[1].replace(/^ *| *\| *$/g,"")),align:m[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:m[3]?m[3].replace(/\n$/,"").split(`
|
|
`):[],raw:m[0]};if(b.header.length===b.align.length){var O=b.align.length,U;for(U=0;U<O;U++)/^ *-+: *$/.test(b.align[U])?b.align[U]="right":/^ *:-+: *$/.test(b.align[U])?b.align[U]="center":/^ *:-+ *$/.test(b.align[U])?b.align[U]="left":b.align[U]=null;for(O=b.cells.length,U=0;U<O;U++)b.cells[U]=v(b.cells[U],b.header.length);return b}}},R.hr=function(f){var m=this.rules.block.hr.exec(f);if(m)return{type:"hr",raw:m[0]}},R.blockquote=function(f){var m=this.rules.block.blockquote.exec(f);if(m){var b=m[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:m[0],text:b}}},R.list=function(f){var m=this.rules.block.list.exec(f);if(m){for(var b=m[0],O=m[2],U=O.length>1,se=O[O.length-1]===")",Ne={type:"list",raw:b,ordered:U,start:U?+O.slice(0,-1):"",loose:!1,items:[]},Qe=m[0].match(this.rules.block.item),gt=!1,pt,Je,ge,Ee,ae,p,S,he=Qe.length,B=0;B<he;B++)pt=Qe[B],b=pt,Je=pt.length,pt=pt.replace(/^ *([*+-]|\d+[.)]) */,""),~pt.indexOf(`
|
|
`)&&(Je-=pt.length,pt=this.options.pedantic?pt.replace(/^ {1,4}/gm,""):pt.replace(new RegExp("^ {1,"+Je+"}","gm"),"")),B!==he-1&&(ge=this.rules.block.bullet.exec(Qe[B+1])[0],(U?ge.length===1||!se&&ge[ge.length-1]===")":ge.length>1||this.options.smartLists&&ge!==O)&&(Ee=Qe.slice(B+1).join(`
|
|
`),Ne.raw=Ne.raw.substring(0,Ne.raw.length-Ee.length),B=he-1)),ae=gt||/\n\n(?!\s*$)/.test(pt),B!==he-1&&(gt=pt.charAt(pt.length-1)===`
|
|
`,ae||(ae=gt)),ae&&(Ne.loose=!0),p=/^\[[ xX]\] /.test(pt),S=void 0,p&&(S=pt[1]!==" ",pt=pt.replace(/^\[[ xX]\] +/,"")),Ne.items.push({type:"list_item",raw:b,task:p,checked:S,loose:ae,text:pt});return Ne}},R.html=function(f){var m=this.rules.block.html.exec(f);if(m)return{type:this.options.sanitize?"paragraph":"html",raw:m[0],pre:!this.options.sanitizer&&(m[1]==="pre"||m[1]==="script"||m[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):N(m[0]):m[0]}},R.def=function(f){var m=this.rules.block.def.exec(f);if(m){m[3]&&(m[3]=m[3].substring(1,m[3].length-1));var b=m[1].toLowerCase().replace(/\s+/g," ");return{tag:b,raw:m[0],href:m[2],title:m[3]}}},R.table=function(f){var m=this.rules.block.table.exec(f);if(m){var b={type:"table",header:v(m[1].replace(/^ *| *\| *$/g,"")),align:m[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:m[3]?m[3].replace(/\n$/,"").split(`
|
|
`):[]};if(b.header.length===b.align.length){b.raw=m[0];var O=b.align.length,U;for(U=0;U<O;U++)/^ *-+: *$/.test(b.align[U])?b.align[U]="right":/^ *:-+: *$/.test(b.align[U])?b.align[U]="center":/^ *:-+ *$/.test(b.align[U])?b.align[U]="left":b.align[U]=null;for(O=b.cells.length,U=0;U<O;U++)b.cells[U]=v(b.cells[U].replace(/^ *\| *| *\| *$/g,""),b.header.length);return b}}},R.lheading=function(f){var m=this.rules.block.lheading.exec(f);if(m)return{type:"heading",raw:m[0],depth:m[2].charAt(0)==="="?1:2,text:m[1]}},R.paragraph=function(f){var m=this.rules.block.paragraph.exec(f);if(m)return{type:"paragraph",raw:m[0],text:m[1].charAt(m[1].length-1)===`
|
|
`?m[1].slice(0,-1):m[1]}},R.text=function(f,m){var b=this.rules.block.text.exec(f);if(b){var O=m[m.length-1];return O&&O.type==="text"?{raw:b[0],text:b[0]}:{type:"text",raw:b[0],text:b[0]}}},R.escape=function(f){var m=this.rules.inline.escape.exec(f);if(m)return{type:"escape",raw:m[0],text:N(m[1])}},R.tag=function(f,m,b){var O=this.rules.inline.tag.exec(f);if(O)return!m&&/^<a /i.test(O[0])?m=!0:m&&/^<\/a>/i.test(O[0])&&(m=!1),!b&&/^<(pre|code|kbd|script)(\s|>)/i.test(O[0])?b=!0:b&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(O[0])&&(b=!1),{type:this.options.sanitize?"text":"html",raw:O[0],inLink:m,inRawBlock:b,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(O[0]):N(O[0]):O[0]}},R.link=function(f){var m=this.rules.inline.link.exec(f);if(m){var b=Y(m[2],"()");if(b>-1){var O=m[0].indexOf("!")===0?5:4,U=O+m[1].length+b;m[2]=m[2].substring(0,b),m[0]=m[0].substring(0,U).trim(),m[3]=""}var se=m[2],Ne="";if(this.options.pedantic){var Qe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(se);Qe?(se=Qe[1],Ne=Qe[3]):Ne=""}else Ne=m[3]?m[3].slice(1,-1):"";se=se.trim().replace(/^<([\s\S]*)>$/,"$1");var gt=Me(m,{href:se&&se.replace(this.rules.inline._escapes,"$1"),title:Ne&&Ne.replace(this.rules.inline._escapes,"$1")},m[0]);return gt}},R.reflink=function(f,m){var b;if((b=this.rules.inline.reflink.exec(f))||(b=this.rules.inline.nolink.exec(f))){var O=(b[2]||b[1]).replace(/\s+/g," ");if(O=m[O.toLowerCase()],!O||!O.href){var U=b[0].charAt(0);return{type:"text",raw:U,text:U}}var se=Me(b,O,b[0]);return se}},R.strong=function(f,m,b){b===void 0&&(b="");var O=this.rules.inline.strong.start.exec(f);if(O&&(!O[1]||O[1]&&(b===""||this.rules.inline.punctuation.exec(b)))){m=m.slice(-1*f.length);var U=O[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;U.lastIndex=0;for(var se;(O=U.exec(m))!=null;)if(se=this.rules.inline.strong.middle.exec(m.slice(0,O.index+3)),se)return{type:"strong",raw:f.slice(0,se[0].length),text:f.slice(2,se[0].length-2)}}},R.em=function(f,m,b){b===void 0&&(b="");var O=this.rules.inline.em.start.exec(f);if(O&&(!O[1]||O[1]&&(b===""||this.rules.inline.punctuation.exec(b)))){m=m.slice(-1*f.length);var U=O[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;U.lastIndex=0;for(var se;(O=U.exec(m))!=null;)if(se=this.rules.inline.em.middle.exec(m.slice(0,O.index+2)),se)return{type:"em",raw:f.slice(0,se[0].length),text:f.slice(1,se[0].length-1)}}},R.codespan=function(f){var m=this.rules.inline.code.exec(f);if(m){var b=m[2].replace(/\n/g," "),O=/[^ ]/.test(b),U=b.startsWith(" ")&&b.endsWith(" ");return O&&U&&(b=b.substring(1,b.length-1)),b=N(b,!0),{type:"codespan",raw:m[0],text:b}}},R.br=function(f){var m=this.rules.inline.br.exec(f);if(m)return{type:"br",raw:m[0]}},R.del=function(f){var m=this.rules.inline.del.exec(f);if(m)return{type:"del",raw:m[0],text:m[1]}},R.autolink=function(f,m){var b=this.rules.inline.autolink.exec(f);if(b){var O,U;return b[2]==="@"?(O=N(this.options.mangle?m(b[1]):b[1]),U="mailto:"+O):(O=N(b[1]),U=O),{type:"link",raw:b[0],text:O,href:U,tokens:[{type:"text",raw:O,text:O}]}}},R.url=function(f,m){var b;if(b=this.rules.inline.url.exec(f)){var O,U;if(b[2]==="@")O=N(this.options.mangle?m(b[0]):b[0]),U="mailto:"+O;else{var se;do se=b[0],b[0]=this.rules.inline._backpedal.exec(b[0])[0];while(se!==b[0]);O=N(b[0]),b[1]==="www."?U="http://"+O:U=O}return{type:"link",raw:b[0],text:O,href:U,tokens:[{type:"text",raw:O,text:O}]}}},R.inlineText=function(f,m,b){var O=this.rules.inline.text.exec(f);if(O){var U;return m?U=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(O[0]):N(O[0]):O[0]:U=N(this.options.smartypants?b(O[0]):O[0]),{type:"text",raw:O[0],text:U}}},W}(),de=_.noopTest,te=_.edit,K=_.merge,D={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:de,table:de,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};D._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,D._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,D.def=te(D.def).replace("label",D._label).replace("title",D._title).getRegex(),D.bullet=/(?:[*+-]|\d{1,9}[.)])/,D.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,D.item=te(D.item,"gm").replace(/bull/g,D.bullet).getRegex(),D.list=te(D.list).replace(/bull/g,D.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+D.def.source+")").getRegex(),D._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",D._comment=/<!--(?!-?>)[\s\S]*?-->/,D.html=te(D.html,"i").replace("comment",D._comment).replace("tag",D._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D.paragraph=te(D._paragraph).replace("hr",D.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",D._tag).getRegex(),D.blockquote=te(D.blockquote).replace("paragraph",D.paragraph).getRegex(),D.normal=K({},D),D.gfm=K({},D.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*|$)"}),D.gfm.nptable=te(D.gfm.nptable).replace("hr",D.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",D._tag).getRegex(),D.gfm.table=te(D.gfm.table).replace("hr",D.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",D._tag).getRegex(),D.pedantic=K({},D.normal,{html:te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",D._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:de,paragraph:te(D.normal._paragraph).replace("hr",D.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",D.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:de,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:de,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};$._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",$.punctuation=te($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",$._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",$.em.start=te($.em.start).replace(/punctuation/g,$._punctuation).getRegex(),$.em.middle=te($.em.middle).replace(/punctuation/g,$._punctuation).replace(/overlapSkip/g,$._overlapSkip).getRegex(),$.em.endAst=te($.em.endAst,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.em.endUnd=te($.em.endUnd,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.strong.start=te($.strong.start).replace(/punctuation/g,$._punctuation).getRegex(),$.strong.middle=te($.strong.middle).replace(/punctuation/g,$._punctuation).replace(/blockSkip/g,$._blockSkip).getRegex(),$.strong.endAst=te($.strong.endAst,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.strong.endUnd=te($.strong.endUnd,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=te($._blockSkip,"g").getRegex(),$.overlapSkip=te($._overlapSkip,"g").getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._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])?)+(?![-_])/,$.autolink=te($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=te($.tag).replace("comment",D._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=te($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=te($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=te($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=K({},$),$.pedantic=K({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:te(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=K({},$.normal,{escape:te($.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),$.gfm.url=te($.gfm.url,"i").replace("email",$.gfm._extended_email).getRegex(),$.breaks=K({},$.gfm,{br:te($.br).replace("{2,}","*").getRegex(),text:te($.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var h={block:D,inline:$},C=k.defaults,g=h.block,q=h.inline;function Ce(W){return W.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 ne(W){var R="",I,f,m=W.length;for(I=0;I<m;I++)f=W.charCodeAt(I),Math.random()>.5&&(f="x"+f.toString(16)),R+="&#"+f+";";return R}var me=function(){function W(I){this.tokens=[],this.tokens.links=Object.create(null),this.options=I||C,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:g.normal,inline:q.normal};this.options.pedantic?(f.block=g.pedantic,f.inline=q.pedantic):this.options.gfm&&(f.block=g.gfm,this.options.breaks?f.inline=q.breaks:f.inline=q.gfm),this.tokenizer.rules=f}W.lex=function(f,m){var b=new W(m);return b.lex(f)};var R=W.prototype;return R.lex=function(f){return f=f.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},R.blockTokens=function(f,m,b){m===void 0&&(m=[]),b===void 0&&(b=!0),f=f.replace(/^ +$/gm,"");for(var O,U,se,Ne;f;){if(O=this.tokenizer.space(f)){f=f.substring(O.raw.length),O.type&&m.push(O);continue}if(O=this.tokenizer.code(f,m)){f=f.substring(O.raw.length),O.type?m.push(O):(Ne=m[m.length-1],Ne.raw+=`
|
|
`+O.raw,Ne.text+=`
|
|
`+O.text);continue}if(O=this.tokenizer.fences(f)){f=f.substring(O.raw.length),m.push(O);continue}if(O=this.tokenizer.heading(f)){f=f.substring(O.raw.length),m.push(O);continue}if(O=this.tokenizer.nptable(f)){f=f.substring(O.raw.length),m.push(O);continue}if(O=this.tokenizer.hr(f)){f=f.substring(O.raw.length),m.push(O);continue}if(O=this.tokenizer.blockquote(f)){f=f.substring(O.raw.length),O.tokens=this.blockTokens(O.text,[],b),m.push(O);continue}if(O=this.tokenizer.list(f)){for(f=f.substring(O.raw.length),se=O.items.length,U=0;U<se;U++)O.items[U].tokens=this.blockTokens(O.items[U].text,[],!1);m.push(O);continue}if(O=this.tokenizer.html(f)){f=f.substring(O.raw.length),m.push(O);continue}if(b&&(O=this.tokenizer.def(f))){f=f.substring(O.raw.length),this.tokens.links[O.tag]||(this.tokens.links[O.tag]={href:O.href,title:O.title});continue}if(O=this.tokenizer.table(f)){f=f.substring(O.raw.length),m.push(O);continue}if(O=this.tokenizer.lheading(f)){f=f.substring(O.raw.length),m.push(O);continue}if(b&&(O=this.tokenizer.paragraph(f))){f=f.substring(O.raw.length),m.push(O);continue}if(O=this.tokenizer.text(f,m)){f=f.substring(O.raw.length),O.type?m.push(O):(Ne=m[m.length-1],Ne.raw+=`
|
|
`+O.raw,Ne.text+=`
|
|
`+O.text);continue}if(f){var Qe="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Qe);break}else throw new Error(Qe)}}return m},R.inline=function(f){var m,b,O,U,se,Ne,Qe=f.length;for(m=0;m<Qe;m++){Ne=f[m];switch(Ne.type){case"paragraph":case"text":case"heading":{Ne.tokens=[],this.inlineTokens(Ne.text,Ne.tokens);break}case"table":{for(Ne.tokens={header:[],cells:[]},U=Ne.header.length,b=0;b<U;b++)Ne.tokens.header[b]=[],this.inlineTokens(Ne.header[b],Ne.tokens.header[b]);for(U=Ne.cells.length,b=0;b<U;b++)for(se=Ne.cells[b],Ne.tokens.cells[b]=[],O=0;O<se.length;O++)Ne.tokens.cells[b][O]=[],this.inlineTokens(se[O],Ne.tokens.cells[b][O]);break}case"blockquote":{this.inline(Ne.tokens);break}case"list":{for(U=Ne.items.length,b=0;b<U;b++)this.inline(Ne.items[b].tokens);break}}}return f},R.inlineTokens=function(f,m,b,O,U){m===void 0&&(m=[]),b===void 0&&(b=!1),O===void 0&&(O=!1),U===void 0&&(U="");var se,Ne=f,Qe;if(this.tokens.links){var gt=Object.keys(this.tokens.links);if(gt.length>0)for(;(Qe=this.tokenizer.rules.inline.reflinkSearch.exec(Ne))!=null;)gt.includes(Qe[0].slice(Qe[0].lastIndexOf("[")+1,-1))&&(Ne=Ne.slice(0,Qe.index)+"["+"a".repeat(Qe[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Qe=this.tokenizer.rules.inline.blockSkip.exec(Ne))!=null;)Ne=Ne.slice(0,Qe.index)+"["+"a".repeat(Qe[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(se=this.tokenizer.escape(f)){f=f.substring(se.raw.length),m.push(se);continue}if(se=this.tokenizer.tag(f,b,O)){f=f.substring(se.raw.length),b=se.inLink,O=se.inRawBlock,m.push(se);continue}if(se=this.tokenizer.link(f)){f=f.substring(se.raw.length),se.type==="link"&&(se.tokens=this.inlineTokens(se.text,[],!0,O)),m.push(se);continue}if(se=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(se.raw.length),se.type==="link"&&(se.tokens=this.inlineTokens(se.text,[],!0,O)),m.push(se);continue}if(se=this.tokenizer.strong(f,Ne,U)){f=f.substring(se.raw.length),se.tokens=this.inlineTokens(se.text,[],b,O),m.push(se);continue}if(se=this.tokenizer.em(f,Ne,U)){f=f.substring(se.raw.length),se.tokens=this.inlineTokens(se.text,[],b,O),m.push(se);continue}if(se=this.tokenizer.codespan(f)){f=f.substring(se.raw.length),m.push(se);continue}if(se=this.tokenizer.br(f)){f=f.substring(se.raw.length),m.push(se);continue}if(se=this.tokenizer.del(f)){f=f.substring(se.raw.length),se.tokens=this.inlineTokens(se.text,[],b,O),m.push(se);continue}if(se=this.tokenizer.autolink(f,ne)){f=f.substring(se.raw.length),m.push(se);continue}if(!b&&(se=this.tokenizer.url(f,ne))){f=f.substring(se.raw.length),m.push(se);continue}if(se=this.tokenizer.inlineText(f,O,Ce)){f=f.substring(se.raw.length),U=se.raw.slice(-1),m.push(se);continue}if(f){var pt="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(pt);break}else throw new Error(pt)}}return m},Oe(W,null,[{key:"rules",get:function(){return{block:g,inline:q}}}]),W}(),Te=k.defaults,He=_.cleanUrl,ze=_.escape,Le=function(){function W(I){this.options=I||Te}var R=W.prototype;return R.code=function(f,m,b){var O=(m||"").match(/\S*/)[0];if(this.options.highlight){var U=this.options.highlight(f,O);U!=null&&U!==f&&(b=!0,f=U)}return O?'<pre><code class="'+this.options.langPrefix+ze(O,!0)+'">'+(b?f:ze(f,!0))+`</code></pre>
|
|
`:"<pre><code>"+(b?f:ze(f,!0))+`</code></pre>
|
|
`},R.blockquote=function(f){return`<blockquote>
|
|
`+f+`</blockquote>
|
|
`},R.html=function(f){return f},R.heading=function(f,m,b,O){return this.options.headerIds?"<h"+m+' id="'+this.options.headerPrefix+O.slug(b)+'">'+f+"</h"+m+`>
|
|
`:"<h"+m+">"+f+"</h"+m+`>
|
|
`},R.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},R.list=function(f,m,b){var O=m?"ol":"ul",U=m&&b!==1?' start="'+b+'"':"";return"<"+O+U+`>
|
|
`+f+"</"+O+`>
|
|
`},R.listitem=function(f){return"<li>"+f+`</li>
|
|
`},R.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},R.paragraph=function(f){return"<p>"+f+`</p>
|
|
`},R.table=function(f,m){return m&&(m="<tbody>"+m+"</tbody>"),`<table>
|
|
<thead>
|
|
`+f+`</thead>
|
|
`+m+`</table>
|
|
`},R.tablerow=function(f){return`<tr>
|
|
`+f+`</tr>
|
|
`},R.tablecell=function(f,m){var b=m.header?"th":"td",O=m.align?"<"+b+' align="'+m.align+'">':"<"+b+">";return O+f+"</"+b+`>
|
|
`},R.strong=function(f){return"<strong>"+f+"</strong>"},R.em=function(f){return"<em>"+f+"</em>"},R.codespan=function(f){return"<code>"+f+"</code>"},R.br=function(){return this.options.xhtml?"<br/>":"<br>"},R.del=function(f){return"<del>"+f+"</del>"},R.link=function(f,m,b){if(f=He(this.options.sanitize,this.options.baseUrl,f),f===null)return b;var O='<a href="'+ze(f)+'"';return m&&(O+=' title="'+m+'"'),O+=">"+b+"</a>",O},R.image=function(f,m,b){if(f=He(this.options.sanitize,this.options.baseUrl,f),f===null)return b;var O='<img src="'+f+'" alt="'+b+'"';return m&&(O+=' title="'+m+'"'),O+=this.options.xhtml?"/>":">",O},R.text=function(f){return f},W}(),De=function(){function W(){}var R=W.prototype;return R.strong=function(f){return f},R.em=function(f){return f},R.codespan=function(f){return f},R.del=function(f){return f},R.html=function(f){return f},R.text=function(f){return f},R.link=function(f,m,b){return""+b},R.image=function(f,m,b){return""+b},R.br=function(){return""},W}(),at=function(){function W(){this.seen={}}var R=W.prototype;return R.slug=function(f){var m=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(m)){var b=m;do this.seen[b]++,m=b+"-"+this.seen[b];while(this.seen.hasOwnProperty(m))}return this.seen[m]=0,m},W}(),ut=k.defaults,ot=_.unescape,rt=function(){function W(I){this.options=I||ut,this.options.renderer=this.options.renderer||new Le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new at}W.parse=function(f,m){var b=new W(m);return b.parse(f)};var R=W.prototype;return R.parse=function(f,m){m===void 0&&(m=!0);var b="",O,U,se,Ne,Qe,gt,pt,Je,ge,Ee,ae,p,S,he,B,Ze,qe,ke,je=f.length;for(O=0;O<je;O++){Ee=f[O];switch(Ee.type){case"space":continue;case"hr":{b+=this.renderer.hr();continue}case"heading":{b+=this.renderer.heading(this.parseInline(Ee.tokens),Ee.depth,ot(this.parseInline(Ee.tokens,this.textRenderer)),this.slugger);continue}case"code":{b+=this.renderer.code(Ee.text,Ee.lang,Ee.escaped);continue}case"table":{for(Je="",pt="",Ne=Ee.header.length,U=0;U<Ne;U++)pt+=this.renderer.tablecell(this.parseInline(Ee.tokens.header[U]),{header:!0,align:Ee.align[U]});for(Je+=this.renderer.tablerow(pt),ge="",Ne=Ee.cells.length,U=0;U<Ne;U++){for(gt=Ee.tokens.cells[U],pt="",Qe=gt.length,se=0;se<Qe;se++)pt+=this.renderer.tablecell(this.parseInline(gt[se]),{header:!1,align:Ee.align[se]});ge+=this.renderer.tablerow(pt)}b+=this.renderer.table(Je,ge);continue}case"blockquote":{ge=this.parse(Ee.tokens),b+=this.renderer.blockquote(ge);continue}case"list":{for(ae=Ee.ordered,p=Ee.start,S=Ee.loose,Ne=Ee.items.length,ge="",U=0;U<Ne;U++)B=Ee.items[U],Ze=B.checked,qe=B.task,he="",B.task&&(ke=this.renderer.checkbox(Ze),S?B.tokens.length>0&&B.tokens[0].type==="text"?(B.tokens[0].text=ke+" "+B.tokens[0].text,B.tokens[0].tokens&&B.tokens[0].tokens.length>0&&B.tokens[0].tokens[0].type==="text"&&(B.tokens[0].tokens[0].text=ke+" "+B.tokens[0].tokens[0].text)):B.tokens.unshift({type:"text",text:ke}):he+=ke),he+=this.parse(B.tokens,S),ge+=this.renderer.listitem(he,qe,Ze);b+=this.renderer.list(ge,ae,p);continue}case"html":{b+=this.renderer.html(Ee.text);continue}case"paragraph":{b+=this.renderer.paragraph(this.parseInline(Ee.tokens));continue}case"text":{for(ge=Ee.tokens?this.parseInline(Ee.tokens):Ee.text;O+1<je&&f[O+1].type==="text";)Ee=f[++O],ge+=`
|
|
`+(Ee.tokens?this.parseInline(Ee.tokens):Ee.text);b+=m?this.renderer.paragraph(ge):ge;continue}default:{var it='Token with "'+Ee.type+'" type was not found.';if(this.options.silent){console.error(it);return}else throw new Error(it)}}}return b},R.parseInline=function(f,m){m=m||this.renderer;var b="",O,U,se=f.length;for(O=0;O<se;O++){U=f[O];switch(U.type){case"escape":{b+=m.text(U.text);break}case"html":{b+=m.html(U.text);break}case"link":{b+=m.link(U.href,U.title,this.parseInline(U.tokens,m));break}case"image":{b+=m.image(U.href,U.title,U.text);break}case"strong":{b+=m.strong(this.parseInline(U.tokens,m));break}case"em":{b+=m.em(this.parseInline(U.tokens,m));break}case"codespan":{b+=m.codespan(U.text);break}case"br":{b+=m.br();break}case"del":{b+=m.del(this.parseInline(U.tokens,m));break}case"text":{b+=m.text(U.text);break}default:{var Ne='Token with "'+U.type+'" type was not found.';if(this.options.silent){console.error(Ne);return}else throw new Error(Ne)}}}return b},W}(),mt=_.merge,nt=_.checkSanitizeDeprecation,$e=_.escape,ue=k.getDefaults,ct=k.changeDefaults,lt=k.defaults;function we(W,R,I){if(typeof W=="undefined"||W===null)throw new Error("marked(): input parameter is undefined or null");if(typeof W!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(W)+", string expected");if(typeof R=="function"&&(I=R,R=null),R=mt({},we.defaults,R||{}),nt(R),I){var f=R.highlight,m;try{m=me.lex(W,R)}catch(se){return I(se)}var b=function(Ne){var Qe;if(!Ne)try{Qe=rt.parse(m,R)}catch(gt){Ne=gt}return R.highlight=f,Ne?I(Ne):I(null,Qe)};if(!f||f.length<3)return b();if(delete R.highlight,!m.length)return b();var O=0;we.walkTokens(m,function(se){se.type==="code"&&(O++,setTimeout(function(){f(se.text,se.lang,function(Ne,Qe){if(Ne)return b(Ne);Qe!=null&&Qe!==se.text&&(se.text=Qe,se.escaped=!0),O--,O===0&&b()})},0))}),O===0&&b();return}try{var U=me.lex(W,R);return R.walkTokens&&we.walkTokens(U,R.walkTokens),rt.parse(U,R)}catch(se){if(se.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,R.silent)return"<p>An error occurred:</p><pre>"+$e(se.message+"",!0)+"</pre>";throw se}}we.options=we.setOptions=function(W){return mt(we.defaults,W),ct(we.defaults),we},we.getDefaults=ue,we.defaults=lt,we.use=function(W){var R=mt({},W);if(W.renderer&&function(){var f=we.defaults.renderer||new Le,m=function(U){var se=f[U];f[U]=function(){for(var Ne=arguments.length,Qe=new Array(Ne),gt=0;gt<Ne;gt++)Qe[gt]=arguments[gt];var pt=W.renderer[U].apply(f,Qe);return pt===!1&&(pt=se.apply(f,Qe)),pt}};for(var b in W.renderer)m(b);R.renderer=f}(),W.tokenizer&&function(){var f=we.defaults.tokenizer||new xe,m=function(U){var se=f[U];f[U]=function(){for(var Ne=arguments.length,Qe=new Array(Ne),gt=0;gt<Ne;gt++)Qe[gt]=arguments[gt];var pt=W.tokenizer[U].apply(f,Qe);return pt===!1&&(pt=se.apply(f,Qe)),pt}};for(var b in W.tokenizer)m(b);R.tokenizer=f}(),W.walkTokens){var I=we.defaults.walkTokens;R.walkTokens=function(f){W.walkTokens(f),I&&I(f)}}we.setOptions(R)},we.walkTokens=function(W,R){for(var I=Ae(W),f;!(f=I()).done;){var m=f.value;R(m);switch(m.type){case"table":{for(var b=Ae(m.tokens.header),O;!(O=b()).done;){var U=O.value;we.walkTokens(U,R)}for(var se=Ae(m.tokens.cells),Ne;!(Ne=se()).done;)for(var Qe=Ne.value,gt=Ae(Qe),pt;!(pt=gt()).done;){var Je=pt.value;we.walkTokens(Je,R)}break}case"list":{we.walkTokens(m.items,R);break}default:m.tokens&&we.walkTokens(m.tokens,R)}}},we.Parser=rt,we.parser=rt.parse,we.Renderer=Le,we.TextRenderer=De,we.Lexer=me,we.lexer=me.lex,we.Tokenizer=xe,we.Slugger=at,we.parse=we;var Ke=we;return Ke})},ELLl:function(kt,dt,y){(function(F){F(y("VrN/"))})(function(F){var Oe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ce=F.Pos;F.defineOption("autoCloseBrackets",!1,function(H,E,A){A&&A!=F.Init&&(H.removeKeyMap(Ae),H.state.closeBrackets=null),E&&(ee(Re(E,"pairs")),H.state.closeBrackets=E,H.addKeyMap(Ae))});function Re(H,E){return E=="pairs"&&typeof H=="string"?H:typeof H=="object"&&H[E]!=null?H[E]:Oe[E]}var Ae={Backspace:oe,Enter:V};function ee(H){for(var E=0;E<H.length;E++){var A=H.charAt(E),re="'"+A+"'";Ae[re]||(Ae[re]=k(A))}}ee(Oe.pairs+"`");function k(H){return function(E){return j(E,H)}}function X(H){var E=H.state.closeBrackets;if(!E||E.override)return E;var A=H.getModeAt(H.getCursor());return A.closeBrackets||E}function oe(H){var E=X(H);if(!E||H.getOption("disableInput"))return F.Pass;for(var A=Re(E,"pairs"),re=H.listSelections(),ie=0;ie<re.length;ie++){if(!re[ie].empty())return F.Pass;var ye=_e(H,re[ie].head);if(!ye||A.indexOf(ye)%2!=0)return F.Pass}for(var ie=re.length-1;ie>=0;ie--){var Ve=re[ie].head;H.replaceRange("",ce(Ve.line,Ve.ch-1),ce(Ve.line,Ve.ch+1),"+delete")}}function V(H){var E=X(H),A=E&&Re(E,"explode");if(!A||H.getOption("disableInput"))return F.Pass;for(var re=H.listSelections(),ie=0;ie<re.length;ie++){if(!re[ie].empty())return F.Pass;var ye=_e(H,re[ie].head);if(!ye||A.indexOf(ye)%2!=0)return F.Pass}H.operation(function(){var Ve=H.lineSeparator()||`
|
|
`;H.replaceSelection(Ve+Ve,null),H.execCommand("goCharLeft"),re=H.listSelections();for(var Be=0;Be<re.length;Be++){var Ue=re[Be].head.line;H.indentLine(Ue,null,!0),H.indentLine(Ue+1,null,!0)}})}function z(H){var E=F.cmpPos(H.anchor,H.head)>0;return{anchor:new ce(H.anchor.line,H.anchor.ch+(E?-1:1)),head:new ce(H.head.line,H.head.ch+(E?1:-1))}}function j(H,E){var A=X(H);if(!A||H.getOption("disableInput"))return F.Pass;var re=Re(A,"pairs"),ie=re.indexOf(E);if(ie==-1)return F.Pass;for(var ye=Re(A,"closeBefore"),Ve=Re(A,"triples"),Be=re.charAt(ie+1)==E,Ue=H.listSelections(),Ye=ie%2==0,ve,be=0;be<Ue.length;be++){var Ie=Ue[be],pe=Ie.head,w,fe=H.getRange(pe,ce(pe.line,pe.ch+1));if(Ye&&!Ie.empty())w="surround";else if((Be||!Ye)&&fe==E)Be&&J(H,pe)?w="both":Ve.indexOf(E)>=0&&H.getRange(pe,ce(pe.line,pe.ch+3))==E+E+E?w="skipThree":w="skip";else if(Be&&pe.ch>1&&Ve.indexOf(E)>=0&&H.getRange(ce(pe.line,pe.ch-2),pe)==E+E){if(pe.ch>2&&/\bstring/.test(H.getTokenTypeAt(ce(pe.line,pe.ch-2))))return F.Pass;w="addFour"}else if(Be){var Z=pe.ch==0?" ":H.getRange(ce(pe.line,pe.ch-1),pe);if(!F.isWordChar(fe)&&Z!=E&&!F.isWordChar(Z))w="both";else return F.Pass}else if(Ye&&(fe.length===0||/\s/.test(fe)||ye.indexOf(fe)>-1))w="both";else return F.Pass;if(!ve)ve=w;else if(ve!=w)return F.Pass}var M=ie%2?re.charAt(ie-1):E,le=ie%2?E:re.charAt(ie+1);H.operation(function(){if(ve=="skip")H.execCommand("goCharRight");else if(ve=="skipThree")for(var L=0;L<3;L++)H.execCommand("goCharRight");else if(ve=="surround"){for(var P=H.getSelections(),L=0;L<P.length;L++)P[L]=M+P[L]+le;H.replaceSelections(P,"around"),P=H.listSelections().slice();for(var L=0;L<P.length;L++)P[L]=z(P[L]);H.setSelections(P)}else ve=="both"?(H.replaceSelection(M+le,null),H.triggerElectric(M+le),H.execCommand("goCharLeft")):ve=="addFour"&&(H.replaceSelection(M+M+M+M,"before"),H.execCommand("goCharRight"))})}function _e(H,E){var A=H.getRange(ce(E.line,E.ch-1),ce(E.line,E.ch+1));return A.length==2?A:null}function J(H,E){var A=H.getTokenAt(ce(E.line,E.ch+1));return/\bstring/.test(A.type)&&A.start==E.ch&&(E.ch==0||!/\bstring/.test(H.getTokenTypeAt(E)))}})},GfqC:function(kt,dt,y){"use strict";var F=y("cDcd"),Oe=y.n(F),ce=y("TSYQ"),Re=y.n(ce);function Ae(_,c){var l="cannot "+_.method+" "+_.action+" "+c.status+"'",v=new Error(l);return v.status=c.status,v.method=_.method,v.url=_.action,v}function ee(_){var c=_.responseText||_.response;if(!c)return c;try{return JSON.parse(c)}catch(l){return c}}function k(_){var c=new XMLHttpRequest;_.onProgress&&c.upload&&(c.upload.onprogress=function(Y){Y.total>0&&(Y.percent=Y.loaded/Y.total*100),_.onProgress(Y)});var l=new FormData;_.data&&Object.keys(_.data).forEach(function(N){var Y=_.data[N];if(Array.isArray(Y)){Y.forEach(function(Me){l.append(N+"[]",Me)});return}l.append(N,_.data[N])}),_.file instanceof Blob?l.append(_.filename,_.file,_.file.name):l.append(_.filename,_.file),c.onerror=function(Y){_.onError(Y)},c.onload=function(){return c.status<200||c.status>=300?_.onError(Ae(_,c),ee(c)):_.onSuccess(ee(c),c)},c.open(_.method,_.action,!0),_.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var v=_.headers||{};return v["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(v).forEach(function(N){v[N]!==null&&c.setRequestHeader(N,v[N])}),c.send(l),{abort:function(){c.abort()}}}var X=+new Date,oe=0;function V(){return"rc-upload-"+X+"-"+ ++oe}function z(_,c){return _.indexOf(c,_.length-c.length)!==-1}var j=function(_,c){if(_&&c){var l=Array.isArray(c)?c:c.split(","),v=_.name||"",N=_.type||"",Y=N.replace(/\/.*$/,"");return l.some(function(Me){var Fe=Me.trim();return Fe.charAt(0)==="."?z(v.toLowerCase(),Fe.toLowerCase()):/\/\*$/.test(Fe)?Y===Fe.replace(/\/.*$/,""):N===Fe})}return!0};function _e(_,c){var l=_.createReader(),v=[];function N(){l.readEntries(function(Y){var Me=Array.prototype.slice.apply(Y);v=v.concat(Me);var Fe=!Me.length;Fe?c(v):N()})}N()}var J=function(c,l,v){var N=function Y(Me,Fe){Fe=Fe||"",Me.isFile?Me.file(function(xe){v(xe)&&(Me.fullPath&&!xe.webkitRelativePath&&(Object.defineProperties(xe,{webkitRelativePath:{writable:!0}}),xe.webkitRelativePath=Me.fullPath.replace(/^\//,""),Object.defineProperties(xe,{webkitRelativePath:{writable:!1}})),l([xe]))}):Me.isDirectory&&_e(Me,function(xe){xe.forEach(function(de){Y(de,""+Fe+Me.name+"/")})})};c.forEach(function(Y){N(Y.webkitGetAsEntry())})},H=J,E=Object.assign||function(_){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(_[v]=l[v])}return _},A=function(){function _(c,l){var v=[],N=!0,Y=!1,Me=void 0;try{for(var Fe=c[Symbol.iterator](),xe;!(N=(xe=Fe.next()).done)&&!(v.push(xe.value),l&&v.length===l);N=!0);}catch(de){Y=!0,Me=de}finally{try{!N&&Fe.return&&Fe.return()}finally{if(Y)throw Me}}return v}return function(c,l){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return _(c,l);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),re=function(){function _(c,l){for(var v=0;v<l.length;v++){var N=l[v];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(c,N.key,N)}}return function(c,l,v){return l&&_(c.prototype,l),v&&_(c,v),c}}();function ie(_,c,l){return c in _?Object.defineProperty(_,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):_[c]=l,_}function ye(_,c){var l={};for(var v in _){if(c.indexOf(v)>=0)continue;if(!Object.prototype.hasOwnProperty.call(_,v))continue;l[v]=_[v]}return l}function Ve(_,c){if(!(_ instanceof c))throw new TypeError("Cannot call a class as a function")}function Be(_,c){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:_}function Ue(_,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);_.prototype=Object.create(c&&c.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(_,c):_.__proto__=c)}var Ye=function(c){return Object.keys(c).reduce(function(l,v){return(v.substr(0,5)==="data-"||v.substr(0,5)==="aria-"||v==="role")&&(l[v]=c[v]),l},{})},ve=function(_){Ue(c,_);function c(){var l,v,N,Y;Ve(this,c);for(var Me=arguments.length,Fe=Array(Me),xe=0;xe<Me;xe++)Fe[xe]=arguments[xe];return Y=(v=(N=Be(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(Fe))),N),N.state={uid:V()},N.reqs={},N.onChange=function(de){var te=de.target.files;N.uploadFiles(te),N.reset()},N.onClick=function(de){var te=N.fileInput;if(!te)return;var K=N.props,D=K.children,$=K.onClick;D&&D.type==="button"&&(te.parentNode.focus(),te.parentNode.querySelector("button").blur()),te.click(),$&&$(de)},N.onKeyDown=function(de){de.key==="Enter"&&N.onClick()},N.onFileDrop=function(de){var te=N.props.multiple;if(de.preventDefault(),de.type==="dragover")return;if(N.props.directory)H(Array.prototype.slice.call(de.dataTransfer.items),N.uploadFiles,function(D){return j(D,N.props.accept)});else{var K=Array.prototype.slice.call(de.dataTransfer.files).filter(function(D){return j(D,N.props.accept)});te===!1&&(K=K.slice(0,1)),N.uploadFiles(K)}},N.uploadFiles=function(de){var te=Array.prototype.slice.call(de);te.map(function(K){return K.uid=V(),K}).forEach(function(K){N.upload(K,te)})},N.saveFileInput=function(de){N.fileInput=de},v),Be(N,Y)}return re(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(v,N){var Y=this,Me=this.props;if(!Me.beforeUpload)return setTimeout(function(){return Y.post(v)},0);var Fe=Me.beforeUpload(v,N);Fe&&Fe.then?Fe.then(function(xe){var de=Object.prototype.toString.call(xe);return de==="[object File]"||de==="[object Blob]"?Y.post(xe):Y.post(v)}).catch(function(xe){console.log(xe)}):Fe!==!1&&setTimeout(function(){return Y.post(v)},0);return}},{key:"post",value:function(v){var N=this;if(!this._isMounted)return;var Y=this.props,Me=Y.onStart,Fe=Y.onProgress,xe=Y.transformFile,de=xe===void 0?function(te){return te}:xe;new Promise(function(te){var K=Y.action;return typeof K=="function"&&(K=K(v)),te(K)}).then(function(te){var K=v.uid,D=Y.customRequest||k,$=Promise.resolve(de(v)).then(function(h){var C=Y.data;return typeof C=="function"&&(C=C(h)),Promise.all([h,C])}).catch(function(h){console.error(h)});$.then(function(h){var C=A(h,2),g=C[0],q=C[1],Ce={action:te,filename:Y.name,data:q,file:g,headers:Y.headers,withCredentials:Y.withCredentials,method:Y.method||"post",onProgress:Fe?function(ne){Fe(ne,v)}:null,onSuccess:function(me,Te){delete N.reqs[K],Y.onSuccess(me,v,Te)},onError:function(me,Te){delete N.reqs[K],Y.onError(me,Te,v)}};Me(v),N.reqs[K]=D(Ce)})})}},{key:"reset",value:function(){this.setState({uid:V()})}},{key:"abort",value:function(v){var N=this.reqs;if(v){var Y=v;v&&v.uid&&(Y=v.uid),N[Y]&&N[Y].abort&&N[Y].abort(),delete N[Y]}else Object.keys(N).forEach(function(Me){N[Me]&&N[Me].abort&&N[Me].abort(),delete N[Me]})}},{key:"render",value:function(){var v,N=this.props,Y=N.component,Me=N.prefixCls,Fe=N.className,xe=N.disabled,de=N.id,te=N.style,K=N.multiple,D=N.accept,$=N.children,h=N.directory,C=N.openFileDialogOnClick,g=N.onMouseEnter,q=N.onMouseLeave,Ce=ye(N,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ne=Re()((v={},ie(v,Me,!0),ie(v,Me+"-disabled",xe),ie(v,Fe,Fe),v)),me=xe?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:g,onMouseLeave:q,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return Oe.a.createElement(Y,E({},me,{className:ne,role:"button",style:te}),Oe.a.createElement("input",E({},Ye(Ce),{id:de,type:"file",ref:this.saveFileInput,onClick:function(He){return He.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:D,directory:h?"directory":null,webkitdirectory:h?"webkitdirectory":null,multiple:K,onChange:this.onChange})),$)}}]),c}(F.Component),be=ve,Ie=Object.assign||function(_){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(_[v]=l[v])}return _},pe=function(){function _(c,l){for(var v=0;v<l.length;v++){var N=l[v];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(c,N.key,N)}}return function(c,l,v){return l&&_(c.prototype,l),v&&_(c,v),c}}();function w(_,c){if(!(_ instanceof c))throw new TypeError("Cannot call a class as a function")}function fe(_,c){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:_}function Z(_,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);_.prototype=Object.create(c&&c.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(_,c):_.__proto__=c)}function M(){}var le=function(_){Z(c,_);function c(){var l,v,N,Y;w(this,c);for(var Me=arguments.length,Fe=Array(Me),xe=0;xe<Me;xe++)Fe[xe]=arguments[xe];return Y=(v=(N=fe(this,(l=c.__proto__||Object.getPrototypeOf(c)).call.apply(l,[this].concat(Fe))),N),N.saveUploader=function(de){N.uploader=de},v),fe(N,Y)}return pe(c,[{key:"abort",value:function(v){this.uploader.abort(v)}},{key:"render",value:function(){return Oe.a.createElement(be,Ie({},this.props,{ref:this.saveUploader}))}}]),c}(F.Component);le.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var L=le,P=dt.a=L},Gytx:function(kt,dt){kt.exports=function(F,Oe,ce,Re){var Ae=ce?ce.call(Re,F,Oe):void 0;if(Ae!==void 0)return!!Ae;if(F===Oe)return!0;if(typeof F!="object"||!F||typeof Oe!="object"||!Oe)return!1;var ee=Object.keys(F),k=Object.keys(Oe);if(ee.length!==k.length)return!1;for(var X=Object.prototype.hasOwnProperty.bind(Oe),oe=0;oe<ee.length;oe++){var V=ee[oe];if(!X(V))return!1;var z=F[V],j=Oe[V];if(Ae=ce?ce.call(Re,z,j,V):void 0,Ae===!1||Ae===void 0&&z!==j)return!1}return!0}},HmJG:function(kt,dt,y){},I8Z2:function(kt,dt,y){"use strict";y.d(dt,"a",function(){return Re}),y.d(dt,"b",function(){return _e}),y.d(dt,"c",function(){return H});var F=y("cDcd"),Oe=function(){var E=function(A,re){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,ye){ie.__proto__=ye}||function(ie,ye){for(var Ve in ye)ye.hasOwnProperty(Ve)&&(ie[Ve]=ye[Ve])},E(A,re)};return function(A,re){E(A,re);function ie(){this.constructor=A}A.prototype=re===null?Object.create(re):(ie.prototype=re.prototype,new ie)}}(),ce=F.createContext(null),Re=function(E){Oe(A,E);function A(){return E!==null&&E.apply(this,arguments)||this}return A.prototype.render=function(){return F.createElement(ce.Provider,{value:this.props.store},this.props.children)},A}(F.Component),Ae=y("Gytx"),ee=y.n(Ae),k=y("2mql"),X=y.n(k),oe=function(){var E=function(A,re){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,ye){ie.__proto__=ye}||function(ie,ye){for(var Ve in ye)ye.hasOwnProperty(Ve)&&(ie[Ve]=ye[Ve])},E(A,re)};return function(A,re){E(A,re);function ie(){this.constructor=A}A.prototype=re===null?Object.create(re):(ie.prototype=re.prototype,new ie)}}(),V=function(){return V=Object.assign||function(E){for(var A,re=1,ie=arguments.length;re<ie;re++){A=arguments[re];for(var ye in A)Object.prototype.hasOwnProperty.call(A,ye)&&(E[ye]=A[ye])}return E},V.apply(this,arguments)};function z(E){return E.displayName||E.name||"Component"}var j=function(){return{}};function _e(E,A){A===void 0&&(A={});var re=!!E,ie=E||j;return function(Ve){var Be=function(Ye){oe(ve,Ye);function ve(be,Ie){var pe=Ye.call(this,be,Ie)||this;return pe.unsubscribe=null,pe.handleChange=function(){if(!pe.unsubscribe)return;var w=ie(pe.store.getState(),pe.props);pe.setState({subscribed:w})},pe.store=pe.context,pe.state={subscribed:ie(pe.store.getState(),be),store:pe.store,props:be},pe}return ve.getDerivedStateFromProps=function(be,Ie){return E&&E.length===2&&be!==Ie.props?{subscribed:ie(Ie.store.getState(),be),props:be}:{props:be}},ve.prototype.componentDidMount=function(){this.trySubscribe()},ve.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},ve.prototype.shouldComponentUpdate=function(be,Ie){return!ee()(this.props,be)||!ee()(this.state.subscribed,Ie.subscribed)},ve.prototype.trySubscribe=function(){re&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},ve.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},ve.prototype.render=function(){var be=V(V(V({},this.props),this.state.subscribed),{store:this.store});return F.createElement(Ve,V({},be,{ref:this.props.miniStoreForwardedRef}))},ve.displayName="Connect("+z(Ve)+")",ve.contextType=ce,ve}(F.Component);if(A.forwardRef){var Ue=F.forwardRef(function(Ye,ve){return F.createElement(Be,V({},Ye,{miniStoreForwardedRef:ve}))});return X()(Ue,Ve)}return X()(Be,Ve)}}var J=function(){return J=Object.assign||function(E){for(var A,re=1,ie=arguments.length;re<ie;re++){A=arguments[re];for(var ye in A)Object.prototype.hasOwnProperty.call(A,ye)&&(E[ye]=A[ye])}return E},J.apply(this,arguments)};function H(E){var A=E,re=[];function ie(Be){A=J(J({},A),Be);for(var Ue=0;Ue<re.length;Ue++)re[Ue]()}function ye(){return A}function Ve(Be){return re.push(Be),function(){var Ye=re.indexOf(Be);re.splice(Ye,1)}}return{setState:ie,getState:ye,subscribe:Ve}}},LdHM:function(kt,dt,y){"use strict";y.d(dt,"b",function(){return ye}),y.d(dt,"a",function(){return Be});var F=y("1OyB"),Oe=y("vuIU"),ce=y("Ji7U"),Re=y("LK+K"),Ae=y("cDcd"),ee=y("rePB"),k=y("Ff2n"),X=y("ODXe"),oe=y("4IlW"),V=y("bX4T"),z=y("YrtM"),j=y("TSYQ"),_e=y.n(j),J=y("+nKL"),H=y("8OUc"),E=function(v,N){var Y=v.prefixCls,Me=v.id,Fe=v.flattenOptions,xe=v.childrenAsData,de=v.values,te=v.searchValue,K=v.multiple,D=v.defaultActiveFirstOption,$=v.height,h=v.itemHeight,C=v.notFoundContent,g=v.open,q=v.menuItemSelectedIcon,Ce=v.virtual,ne=v.onSelect,me=v.onToggleOpen,Te=v.onActiveValue,He=v.onScroll,ze=v.onMouseEnter,Le="".concat(Y,"-item"),De=Object(z.a)(function(){return Fe},[g,Fe],function(Ke,W){return W[0]&&Ke[1]!==W[1]}),at=Ae.useRef(null),ut=function(W){W.preventDefault()},ot=function(W){at.current&&at.current.scrollTo({index:W})},rt=function(W){for(var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,I=De.length,f=0;f<I;f+=1){var m=(W+f*R+I)%I,b=De[m],O=b.group,U=b.data;if(!O&&!U.disabled)return m}return-1},mt=Ae.useState(function(){return rt(0)}),nt=Object(X.a)(mt,2),$e=nt[0],ue=nt[1],ct=function(W){ue(W);var R=De[W];if(!R){Te(null,-1);return}Te(R.data.value,W)};Ae.useEffect(function(){ct(D!==!1?rt(0):-1)},[De.length,te]),Ae.useEffect(function(){var Ke=setTimeout(function(){if(!K&&g&&de.size===1){var W=Array.from(de)[0],R=De.findIndex(function(I){var f=I.data;return f.value===W});ct(R),ot(R)}});return function(){return clearTimeout(Ke)}},[g]);var lt=function(W){W!==void 0&&ne(W,{selected:!de.has(W)}),K||me(!1)};if(Ae.useImperativeHandle(N,function(){return{onKeyDown:function(W){var R=W.which;switch(R){case oe.a.UP:case oe.a.DOWN:{var I=0;if(R===oe.a.UP?I=-1:R===oe.a.DOWN&&(I=1),I!==0){var f=rt($e+I,I);ot(f),ct(f)}break}case oe.a.ENTER:{var m=De[$e];m&&!m.data.disabled?lt(m.data.value):lt(void 0),g&&W.preventDefault();break}case oe.a.ESC:me(!1)}},onKeyUp:function(){},scrollTo:function(W){ot(W)}}}),De.length===0)return Ae.createElement("div",{role:"listbox",id:"".concat(Me,"_list"),className:"".concat(Le,"-empty"),onMouseDown:ut},C);function we(Ke){var W=De[Ke];if(!W)return null;var R=W.data||{},I=R.value,f=R.label,m=R.children,b=Object(V.a)(R,!0),O=xe?m:f;return W?Ae.createElement("div",Object.assign({"aria-label":typeof O=="string"?O:null},b,{key:Ke,role:"option",id:"".concat(Me,"_list_").concat(Ke),"aria-selected":de.has(I)}),I):null}return Ae.createElement(Ae.Fragment,null,Ae.createElement("div",{role:"listbox",id:"".concat(Me,"_list"),style:{height:0,width:0,overflow:"hidden"}},we($e-1),we($e),we($e+1)),Ae.createElement(J.a,{itemKey:"key",ref:at,data:De,height:$,itemHeight:h,fullHeight:!1,onMouseDown:ut,onScroll:He,virtual:Ce,onMouseEnter:ze},function(Ke,W){var R,I=Ke.group,f=Ke.groupOption,m=Ke.data,b=m.label,O=m.key;if(I)return Ae.createElement("div",{className:_e()(Le,"".concat(Le,"-group"))},b!==void 0?b:O);var U=m.disabled,se=m.value,Ne=m.title,Qe=m.children,gt=m.style,pt=m.className,Je=Object(k.a)(m,["disabled","value","title","children","style","className"]),ge=de.has(se),Ee="".concat(Le,"-option"),ae=_e()(Le,Ee,pt,(R={},Object(ee.a)(R,"".concat(Ee,"-grouped"),f),Object(ee.a)(R,"".concat(Ee,"-active"),$e===W&&!U),Object(ee.a)(R,"".concat(Ee,"-disabled"),U),Object(ee.a)(R,"".concat(Ee,"-selected"),ge),R)),p=xe?Qe:b,S=!q||typeof q=="function"||ge;return Ae.createElement("div",Object.assign({},Je,{"aria-selected":ge,className:ae,title:Ne,onMouseMove:function(){if($e===W||U)return;ct(W)},onClick:function(){U||lt(se)},style:gt}),Ae.createElement("div",{className:"".concat(Ee,"-content")},p||se),Ae.isValidElement(q)||ge,S&&Ae.createElement(H.a,{className:"".concat(Le,"-option-state"),customizeIcon:q,customizeIconProps:{isSelected:ge}},ge?"\u2713":null))}))},A=Ae.forwardRef(E);A.displayName="OptionList";var re=A,ie=function(){return null};ie.isSelectOption=!0;var ye=ie,Ve=function(){return null};Ve.isSelectOptGroup=!0;var Be=Ve,Ue=y("VTBJ"),Ye=y("Zm9Q");function ve(l){var v=l.key,N=l.props,Y=N.children,Me=N.value,Fe=Object(k.a)(N,["children","value"]);return Object(Ue.a)({key:v,value:Me!==void 0?Me:v,children:Y},Fe)}function be(l){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Ye.a)(l).map(function(N,Y){if(!Ae.isValidElement(N)||!N.type)return null;var Me=N.type.isSelectOptGroup,Fe=N.key,xe=N.props,de=xe.children,te=Object(k.a)(xe,["children"]);return v||!Me?ve(N):Object(Ue.a)(Object(Ue.a)({key:"__RC_SELECT_GRP__".concat(Fe===null?Y:Fe,"__"),label:Fe},te),{},{options:be(de)})}).filter(function(N){return N})}var Ie=y("2Qr1"),pe=y("qNPg"),w=y("U8pU"),fe=y("Kwbf"),Z=y("WKfj");function M(l){var v=l.mode,N=l.options,Y=l.children,Me=l.backfill,Fe=l.allowClear,xe=l.placeholder,de=l.getInputElement,te=l.showSearch,K=l.onSearch,D=l.defaultOpen,$=l.autoFocus,h=l.labelInValue,C=l.value,g=l.inputValue,q=l.optionLabelProp,Ce=v==="multiple"||v==="tags",ne=te!==void 0?te:Ce||v==="combobox",me=N||be(Y);if(Object(fe.a)(v!=="tags"||me.every(function(Le){return!Le.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),v==="tags"||v==="combobox"){var Te=me.some(function(Le){return Le.options?Le.options.some(function(De){return typeof("value"in De?De.value:De.key)=="number"}):typeof("value"in Le?Le.value:Le.key)=="number"});Object(fe.a)(!Te,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(fe.a)(v!=="combobox"||!q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(fe.a)(v==="combobox"||!Me,"`backfill` only works with `combobox` mode."),Object(fe.a)(v==="combobox"||!de,"`getInputElement` only work with `combobox` mode."),Object(fe.b)(v!=="combobox"||!de||!Fe||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),K&&!ne&&v!=="combobox"&&v!=="tags"&&Object(fe.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(fe.b)(!D||$,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),C!=null){var He=Object(Z.d)(C);Object(fe.a)(!h||He.every(function(Le){return Object(w.a)(Le)==="object"&&("key"in Le||"value"in Le)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(fe.a)(!Ce||Array.isArray(C),"`value` should be array when `mode` is `multiple` or `tags`")}if(Y){var ze=null;Object(Ye.a)(Y).some(function(Le){if(!Ae.isValidElement(Le)||!Le.type)return!1;var De=Le.type;if(De.isSelectOption)return!1;if(De.isSelectOptGroup){var at=Object(Ye.a)(Le.props.children).every(function(ut){return!Ae.isValidElement(ut)||!Le.type||ut.type.isSelectOption?!0:(ze=ut.type,!1)});return!at}return ze=De,!0}),ze&&Object(fe.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ze.displayName||ze.name||ze,"`.")),Object(fe.a)(g===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var le=M,L=Object(pe.a)({prefixCls:"rc-select",components:{optionList:re},convertChildrenToData:be,flattenOptions:Ie.d,getLabeledValue:Ie.e,filterOptions:Ie.b,isValueDisabled:Ie.g,findValueOption:Ie.c,warningProps:le,fillOptionsWithMissingValue:Ie.a}),P=function(l){Object(ce.a)(N,l);var v=Object(Re.a)(N);function N(){var Y;return Object(F.a)(this,N),Y=v.apply(this,arguments),Y.selectRef=Ae.createRef(),Y.focus=function(){Y.selectRef.current.focus()},Y.blur=function(){Y.selectRef.current.blur()},Y}return Object(Oe.a)(N,[{key:"render",value:function(){return Ae.createElement(L,Object.assign({ref:this.selectRef},this.props))}}]),N}(Ae.Component);P.Option=ye,P.OptGroup=Be;var _=P,c=dt.c=_},M8RZ:function(kt,dt,y){"use strict";y.d(dt,"a",function(){return oe});var F=y("fWQN"),Oe=y("mtLc"),ce=y("yKVA"),Re=y("879j"),Ae=y("cDcd"),ee=y.n(Ae),k=y("faye"),X=y.n(k),oe=function(V){Object(ce.a)(j,V);var z=Object(Re.a)(j);function j(_e){var J;Object(F.a)(this,j),J=z.call(this,_e);var H=window.document;return J.node=H.createElement("div"),H.body.appendChild(J.node),J}return Object(Oe.a)(j,[{key:"render",value:function(){var J=this.props.children;return Object(k.createPortal)(J,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),j}(ee.a.Component)},Ot1p:function(kt,dt,y){"use strict";var F=y("2qtc"),Oe=y("kLXV"),ce=y("rAM+"),Re=y("miYZ"),Ae=y("tsqr"),ee=y("9og8"),k=y("tJVT"),X=y("jrin"),oe=y("WmNS"),V=y.n(oe),z=y("cDcd"),j=y.n(z),_e=y("VrN/"),J=y.n(_e),H=y("bdgK"),E=y("p77/"),A=y("Bd2K"),re=y("ELLl"),ie=y("19Vz"),ye=y("lZu9"),Ve=y("+NIl"),Be=y("kSUc"),Ue=y("9Bee"),Ye=function(U){var se=U.value,Ne=se===void 0?"":se,Qe=U.className,gt=U.showTextOnly,pt=U.showLines,Je=U.style,ge=Je===void 0?{}:Je,Ee=Object(z.useMemo)(function(){return""},[Ne]);return j.a.createElement(j.a.Fragment,null,j.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ee}}))},ve=y("0Owb"),be=y("dejd"),Ie=y("C+DQ"),pe=y("1vsH"),w=y("m3rI"),fe=[{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 Z(U){var se=U.onActionCallback,Ne=U.title,Qe=U.icon,gt=U.actionName,pt=U.className,Je=pt===void 0?"":pt,ge=U.children;function Ee(){se(gt)}return j.a.createElement("a",{title:Ne,className:Je,onClick:Ee},j.a.createElement("i",{className:"md-iconfont ".concat(Qe)}),ge)}var M=function(U){var se=U.watch,Ne=U.showNullButton,Qe=U.onActionCallback,gt=U.fullScreen,pt=U.insertTemp,Je=U.hidetoolBar,ge=U.uuid,Ee=U.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(pe.n)("_educoder_session_login"),"&_educoder_session=").concat(Object(pe.n)("_educoder_session"),"&key=").concat(ge,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var ae=[].concat(fe,[{title:"".concat(se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(se?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return j.a.createElement("ul",{className:"markdown-toolbar-container"},!Je&&ae.map(function(p,S){return j.a.createElement("li",{key:S},p.actionName?j.a.createElement(Z,Object(ve.a)({},p,{onActionCallback:Qe})):j.a.createElement("span",{className:"v-line"}))}),Ne?j.a.createElement("li",null,j.a.createElement(Z,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Qe},j.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,pt&&j.a.createElement("li",null,j.a.createElement(Z,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(pt),onActionCallback:Qe},j.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),j.a.createElement("li",{className:"btn-full-screen"},j.a.createElement(Z,{icon:"".concat(gt?"icon-shrink":"icon-enlarge"),title:gt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Qe})))},le=y("M8RZ"),L=y("+L6B"),P=y("2/Rp"),_=y("y8nQ"),c=y("Vl3Y"),l=y("5NDa"),v=y("5rEg"),N={labelCol:{span:4},wrapperCol:{span:20}},Y=function(U){var se=U.callback,Ne=U.onCancel;function Qe(gt){se(gt)}return j.a.createElement(c.a,Object(ve.a)({},N,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Qe}),j.a.createElement(c.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},j.a.createElement(v.a,null)),j.a.createElement(c.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},j.a.createElement(v.a,null)),j.a.createElement("div",{className:"flex-container flex-end"},j.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),j.a.createElement(P.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))},Me=y("7ahc"),Fe=y("HmJG"),xe=y("BjJ7"),de=c.a.useForm,te={width:280,marginRight:10},K={labelCol:{span:5},wrapperCol:{span:19}},D=function(U){var se=U.callback,Ne=U.onCancel,Qe=de(),gt=Object(k.a)(Qe,1),pt=gt[0];function Je(ae){se(ae)}function ge(ae,p){if(ae.status===-1){Ae.b.error(ae.message);return}pt.setFieldsValue({src:"/api/attachments/".concat(ae.id),type:p.type})}function Ee(ae){var p=ae.target.files[0];h(p,ge)}return j.a.createElement(c.a,Object(ve.a)({form:pt},K,{className:"upload-image-panel",onFinish:Je}),j.a.createElement(c.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},j.a.createElement("div",{className:"flex-container"},j.a.createElement(c.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},j.a.createElement(v.a,{style:te})),j.a.createElement($,{onFileChange:Ee}))),j.a.createElement(c.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},j.a.createElement(v.a,{style:{width:264}})),j.a.createElement(c.a.Item,{style:{textAlign:"right"}},j.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),j.a.createElement(P.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))};function $(U){var se=U.onFileChange;return j.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",j.a.createElement("input",{type:"file",onChange:se}))}function h(U,se){if(!U)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ne=new FormData;Ne.append("editormd-image-file",U),Ne.append("file_param_name","editormd-image-file"),Ne.append("byxhr","true");var Qe=new window.XMLHttpRequest;Qe.withCredentials=!0,Qe.addEventListener("load",function(gt){se(JSON.parse(gt.target.responseText),U)},!1),Qe.addEventListener("error",function(gt){console.error(gt)},!1),Qe.open("POST","".concat(xe.a,"/api/attachments.json")),Qe.send(Ne)}var C=y("giR+"),g=y("fyUT"),q=y("7Kak"),Ce=y("9yH6"),ne=Ce.a.Group,me={margin:"0 8px"},Te=function(U){var se=U.callback,Ne=U.onCancel;function Qe(gt){se(gt)}return j.a.createElement(c.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Qe},j.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},j.a.createElement("span",{style:me},"\u5355\u5143\u683C\u6570\uFF1A"),j.a.createElement("span",{style:me},"\u884C\u6570"),j.a.createElement(c.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},j.a.createElement(g.a,null)),j.a.createElement("span",{style:me},"\u5217\u6570"),j.a.createElement(c.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},j.a.createElement(g.a,null))),j.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},j.a.createElement("span",{style:me},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),j.a.createElement(c.a.Item,{name:"align"},j.a.createElement(ne,null,j.a.createElement(Ce.a,{value:"default"},j.a.createElement("i",{className:"fa fa-align-justify"})),j.a.createElement(Ce.a,{value:"left"},j.a.createElement("i",{className:"fa fa-align-left"})),j.a.createElement(Ce.a,{value:"center"},j.a.createElement("i",{className:"fa fa-align-center"})),j.a.createElement(Ce.a,{value:"right"},j.a.createElement("i",{className:"fa fa-align-right"}))))),j.a.createElement("div",{className:"flex-container flex-end"},j.a.createElement(P.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),j.a.createElement(P.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))},He=y("ErOA"),ze=y("7Cbv"),Le="link",De="upload-image",at="code-block",ut="add-table",ot="------------",rt={default:ot,left:":".concat(ot),center:":".concat(ot,":"),right:"".concat(ot,":")},mt=y("9VGf"),nt,$e;function ue(){}var ct=0,lt=1e4,we="\u2581",Ke=`
|
|
**\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 W(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}var R=navigator.platform.toUpperCase().indexOf("MAC")>=0,I=R?"Cmd":"Ctrl",f=["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"],m=(nt={},Object(X.a)(nt,I+"-B","bold"),Object(X.a)(nt,I+"-I","italic"),nt),b=($e={},Object(X.a)($e,Le,"\u6DFB\u52A0\u94FE\u63A5"),Object(X.a)($e,at,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(X.a)($e,De,"\u6DFB\u52A0\u6587\u4EF6"),Object(X.a)($e,ut,"\u6DFB\u52A0\u8868\u683C"),$e),O=dt.a=function(U){var se=U.defaultValue,Ne=se===void 0?"":se,Qe=U.onChange,gt=U.width,pt=gt===void 0?"100%":gt,Je=U.height,ge=Je===void 0?400:Je,Ee=U.miniToolbar,ae=Ee===void 0?!1:Ee,p=U.isFocus,S=p===void 0?!1:p,he=U.watch,B=U.insertTemp,Ze=U.mode,qe=Ze===void 0?"markdown":Ze,ke=U.id,je=ke===void 0?"markdown-editor-id":ke,it=U.showResizeBar,Ot=it===void 0?!1:it,Et=U.noStorage,Rt=Et===void 0?!1:Et,zt=U.showNullButton,Pt=zt===void 0?!1:zt,ht=U.hidetoolBar,nn=ht===void 0?!1:ht,Sn=U.fullScreen,Xt=Sn===void 0?!1:Sn,At=U.onBlur,sn=U.onCMBeforeChange,dn=U.onFullScreen,Vn=U.className,We=Vn===void 0?"":Vn,wt=U.disablePaste,$n=wt===void 0?!1:wt,Yn=U.placeholder,jn=Yn===void 0?"":Yn,or=U.values,Er=or===void 0?"":or,St=Object(z.useState)(null),Mi=Object(k.a)(St,2),Xe=Mi[0],Cr=Mi[1],kn=Object(z.useState)(Ne),Gr=Object(k.a)(kn,2),sr=Gr[0],Mn=Gr[1],Vr=Object(z.useState)(he),$r=Object(k.a)(Vr,2),Tn=$r[0],Yr=$r[1],Ti=Object(z.useState)(Xt),Jr=Object(k.a)(Ti,2),An=Jr[0],Ai=Jr[1],aa=Object(z.useState)(""),Zr=Object(k.a)(aa,2),ln=Zr[0],Jn=Zr[1],oa=Object(z.useState)(0),lr=Object(k.a)(oa,2),_n=lr[0],qr=lr[1],sa=Object(z.useState)(ge),_i=Object(k.a)(sa,2),Li=_i[0],Sr=_i[1],Di=Object(z.useState)(!1),Ri=Object(k.a)(Di,2),la=Ri[0],kr=Ri[1],ur=Object(z.useRef)(Object(ze.a)()),cr=Object(z.useRef)(!1),Or=Object(z.useRef)(),zn=Object(z.useRef)(),Wn=Object(z.useRef)(),Hn=Object(z.useRef)(),Mr=Object(z.useRef)(),Ni=function(){var vt=Object(ee.a)(V.a.mark(function Ct(){var yt,Tt;return V.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,Object(He.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ur.current}});case 2:Tt=Ut.sent,Tt!=null&&(yt=Tt.attachments)!==null&&yt!==void 0&&yt.length&&(console.log("cm:",Xe,zn),Tt.attachments.map(function(Lt){Lt.content_type.indexOf("image")>-1?Xe.replaceSelection(".concat(Lt.content_type,")")):Lt.content_type.indexOf("video")>-1?Xe.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Lt.content_type.indexOf("pdf")>-1?Xe.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Lt.id,"?type=").concat(Lt.content_type,'&disposition=inline" target="_blank">').concat(Lt.name,"</a>")):Xe.replaceSelection("[".concat(Lt.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lt.id,"?type=").concat(Lt.content_type,")"))}));case 4:case"end":return Ut.stop()}},Ct)}));return function(){return vt.apply(this,arguments)}}();Object(z.useEffect)(function(){Mn(Er),Xe==null||Xe.setValue(Er)},[Er]),Object(z.useEffect)(function(){dn==null||dn(An)},[An]),Object(z.useEffect)(function(){if(zn.current){var vt=J.a.fromTextArea(zn.current,{mode:qe,lineNumbers:!ae,lineWrapping:!0,value:Ne,autoCloseTags:!0,autoCloseBrackets:!0});S&&vt.focus();function Ct(yt,Tt){if($n){Tt.preventDefault();return}var Dt=Tt.clipboardData;if(Dt){var Ut=Dt.types.toString(),Lt=Dt.items;if(Ut==="Files"||Dt.types.indexOf("Files")>-1){if(Tt.preventDefault(),qe=="stex")return;try{var $t,fn=Lt[1];(($t=Lt[0])===null||$t===void 0?void 0:$t.kind)==="file"&&(fn=Lt[0]);var _t=fn.getAsFile(),Bn=_t.name.split(".").pop();h(_t,function(Nt){if(Nt.id){var hn,rn,On;(_t==null||((hn=_t.type)===null||hn===void 0)?void 0:hn.indexOf("image"))>-1?vt.replaceSelection(".concat(Nt.content_type,")")):(_t==null||((rn=_t.type)===null||rn===void 0)?void 0:rn.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(_t==null||((On=_t.type)===null||On===void 0)?void 0:On.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(_t.type,'&disposition=inline" target="_blank">').concat(_t.name,"</a>")):f.includes(Bn)?vt.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(_t.name,"</a>")):vt.replaceSelection("[".concat(_t.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})}catch(Nt){Ae.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return vt.on("paste",Ct),vt.on("dragleave",function(yt,Tt){Wn.current.classList.remove("mouse-hover-md")}),vt.on("dragover",function(yt,Tt){Wn.current.classList.add("mouse-hover-md")}),vt.on("drop",function(yt,Tt){Wn.current.classList.add("mouse-hover-md");var Dt;if(Dt=Tt.dataTransfer.files,Dt.length>0){Tt.preventDefault(),Tt.stopPropagation();for(var Ut=function(fn){var _t=Dt[fn],Bn=_t.name.split(".").pop();h(_t,function(Nt){if(Nt.id){var hn,rn,On;(_t==null||((hn=_t.type)===null||hn===void 0)?void 0:hn.indexOf("image"))>-1?vt.replaceSelection(".concat(Nt.content_type,")")):(_t==null||((rn=_t.type)===null||rn===void 0)?void 0:rn.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,'"></video>')):(_t==null||((On=_t.type)===null||On===void 0)?void 0:On.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(_t.type,'&disposition=inline" target="_blank">').concat(_t.name,"</a>")):f.includes(Bn)?vt.replaceSelection('<a href="'.concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,'?type=office&disposition=inline" target="_blank">').concat(_t.name,"</a>")):vt.replaceSelection("[".concat(_t.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Nt.id,"?type=").concat(Nt.content_type,")"))}else(Nt==null?void 0:Nt.status)===401&&(document.location.href="/user/login")})},Lt=0;Lt<Dt.length;Lt++)Ut(Lt)}}),Cr(vt),function(){vt.off("paste",Ct)}}},[]);var wn=Object(z.useCallback)(function(){if(Wn.current)try{}catch(vt){console.log(vt,"---- to set md editor body height")}},[Li,Wn,An]);Object(z.useEffect)(function(){function vt(){var yt=new H.default(function(Tt){var Dt=Object(ce.a)(Tt),Ut;try{for(Dt.s();!(Ut=Dt.n()).done;){var Lt=Ut.value;(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&(wn(),Xe.setSize("100%","100%"),Xe.refresh())}}catch($t){Dt.e($t)}finally{Dt.f()}});return yt.observe(zn.current.parentElement),yt}if(Xe){var Ct=vt();return function(){Ct.unobserve(zn.current.parentElement)}}},[Xe,wn]),Object(z.useEffect)(function(){if(Xe){for(var vt=[],Ct=function(){var Lt=Tt[yt];Dt=Object(k.a)(Lt,2);var $t=Dt[0],fn=Dt[1],_t=Object(X.a)({},$t,function(){ji(fn)});vt.push(_t),Xe.addKeyMap(_t)},yt=0,Tt=Object.entries(m);yt<Tt.length;yt++){var Dt;Ct()}return Or.current=setInterval(function(){cr.current&&Ni()},4e3),function(){clearInterval(Or.current);var Ut=Object(ce.a)(vt),Lt;try{for(Ut.s();!(Lt=Ut.n()).done;){var $t=Lt.value;Xe.removeKeyMap($t)}}catch(fn){Ut.e(fn)}finally{Ut.f()}}}},[Xe]),Object(z.useEffect)(function(){Xt!==An&&Ai(Xt)},[Xt]),Object(mt.a)(function(){if(!Rt&&_n>0){var vt=new Date().getTime(),Ct=window.sessionStorage.getItem(je);vt>=_n+lt&&(!Ct||Ct!==sr)&&(window.sessionStorage.setItem(je,sr),kr(!0))}},lt),Object(z.useEffect)(function(){Yr(he)},[Xe,he]),Object(z.useEffect)(function(){Xe&&(S&&Xe.focus())},[Xe,S]),Object(z.useEffect)(function(){if(Tn&&Xe){var vt=Xe.getScrollerElement();function Ct(yt){var Tt=yt.target;if(Mr.current){var Dt=Tt.scrollTop/Tt.scrollHeight;Mr.current.scrollTop=Mr.current.scrollHeight*Dt}}return vt.addEventListener("scroll",Ct),function(){vt.removeEventListener("scroll",Ct)}}},[Xe,Tn]),Object(z.useEffect)(function(){if(Xe&&sn){function vt(Ct,yt){sn(Ct,yt)}return Xe.on("beforeChange",vt),function(){Xe.off("beforeChange",vt)}}},[Xe,sn]),Object(z.useEffect)(function(){if(Xe&&At){function vt(){At(Xe.getValue())}return Xe.on("blur",vt),function(){Xe.off("blur",vt)}}},[Xe,At]),Object(z.useEffect)(function(){if(Xe){function vt(Ct){var yt=Ct.getValue();Mn(yt),qr(new Date().getTime()),Ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Qe&&Qe(yt)}return Xe.on("change",vt),function(){Xe.off("change",vt)}}},[Xe,Qe]),Object(z.useEffect)(function(){Xe&&(Ne==null?(Xe.setValue(""),Mn("")):Ne!==Xe.getValue()&&(Xe.setValue(Ne),Mn(Ne),Xe.setCursor(Xe.lineCount(),0)))},[Xe,Ne]);var ji=Object(z.useCallback)(function(vt){var Ct=Xe.getCursor(),yt=Xe.getSelection(),Tt=yt.split(`
|
|
`);switch(vt){case"bold":return Xe.replaceSelection("**"+yt+"**"),yt===""&&Xe.setCursor(Ct.line,Ct.ch+2),Xe.focus();case"italic":return Xe.replaceSelection("*"+yt+"*"),yt===""&&Xe.setCursor(Ct.line,Ct.ch+1),Xe.focus();case"code":return Xe.replaceSelection("`"+yt+"`"),yt===""&&Xe.setCursor(Ct.line,Ct.ch+1),Xe.focus();case"inline-latex":return Xe.replaceSelection("`$$"+yt+"$$`"),yt===""&&Xe.setCursor(Ct.line,Ct.ch+3),Xe.focus();case"latex":return Xe.replaceSelection("```latex\n"+yt+"\n```"),Xe.setCursor(Ct.line+1,yt.length+1),Xe.focus();case"line-break":return Xe.replaceSelection(`<br/>
|
|
`),Xe.focus();case"list-ul":return yt===""?Xe.replaceSelection("- "+yt):Xe.replaceSelection(Tt.map(function(Dt){return Dt===""?"":"- ".concat(Dt)}).join(`
|
|
`)),Xe.focus();case"list-ol":return yt===""?Xe.replaceSelection("1. "+yt):Xe.replaceSelection(Tt.map(function(Dt,Ut){return Dt===""?"":"".concat(Ut+1,". ").concat(Dt)}).join(`
|
|
`)),Xe.focus();case"add-null-ch":return yt===""&&Xe.setCursor(Ct.line,Ct.ch+1),Xe.replaceSelection(we),Xe.focus();case"inster-template-1":return yt===""&&Xe.setCursor(Ct.line,Ct.ch),Xe.replaceSelection(Ke),Xe.focus();case"eraser":return Xe.setValue(""),Xe.focus();case"trigger-watch":return Yr(!Tn),Xe.focus();case"trigger-full-screen":return Ai(!An),Xe.focus();case Le:Jn(Le);return;case at:Jn(at);return;case De:Jn(De);return;case ut:Jn(ut);return;default:throw new Error}},[Xe,Tn,An]),Tr=Object(z.useCallback)(function(vt){Jn("");switch(ln){case Le:var Ct=vt.title,yt=vt.link;return Xe.replaceSelection("[".concat(Ct,"](").concat(yt,")")),Xe.focus();case at:var Tt=vt.language,Dt=vt.content;return Xe.replaceSelection(["```"+Tt,Dt,"```"].join(`
|
|
`)),Xe.focus();case De:var Ut=vt.src,Lt=vt.alt;return Lt?Xe.replaceSelection(".concat(Ut,' "').concat(Lt,'" )')):Xe.replaceSelection("")),Xe.focus();case ut:for(var $t=vt.row,fn=vt.col,_t=vt.align,Bn=`
|
|
`,Nt=0;Nt<$t;Nt++){for(var hn=[],rn=[],On=0;On<fn;On++)Nt===1&&rn.push(rt[_t]),hn.push(" ");Nt===1&&(Bn+="| ".concat(rn.join(" | "),` |
|
|
`)),Bn+="| ".concat(hn.join(fn===1?"":" | "),` |
|
|
`)}return Xe.replaceSelection(Bn+`
|
|
`),Xe.focus();default:throw new Error}},[Xe,ln]),Qr=Object(z.useMemo)(function(){switch(ln){case Le:return j.a.createElement(Y,{callback:Tr,onCancel:Zn});case at:return j.a.createElement(Me.b,{callback:Tr,onCancel:Zn});case De:return j.a.createElement(D,{callback:Tr,onCancel:Zn});case ut:return j.a.createElement(Te,{callback:Tr,onCancel:Zn});default:return null}},[ln]);function Zn(){Jn("")}Object(z.useEffect)(function(){if(Hn.current){var vt=Hn.current,Ct=!1,yt=0;function Tt(Lt){Ct=!0,yt=Lt.pageY}function Dt(){Ct=!1}function Ut(Lt){if(Ct){var $t=Lt.pageY-yt;$t<0&&($t=0),$t>300&&($t=300);var fn=ge+$t+"px";Sr(fn)}}return vt.addEventListener("mousedown",Tt),document.addEventListener("mousemove",Ut),document.addEventListener("mouseup",Dt),function(){vt.removeEventListener("mousedown",Tt),document.removeEventListener("mousemove",Ut),document.removeEventListener("mouseup",Dt)}}},[Xe,Hn]),Object(z.useEffect)(function(){Sr(ge)},[ge]);var Pn=W(pt),ei=W(Li),Ln={width:Pn,height:ei},ti=Object(z.useMemo)(function(){if(_n){var vt=new Date(_n),Ct=vt.getHours(),yt=vt.getMinutes(),Tt=vt.getSeconds();return Ct=Ct<10?"0"+Ct:Ct,yt=yt<10?"0"+yt:yt,Tt=Tt<10?"0"+Tt:Tt,"".concat(Ct,":").concat(yt,":").concat(Tt)}return 0},[_n]);function Pi(){window.sessionStorage.removeItem(je),kr(!1),qr(0)}function dr(){kr(!1),qr(0),Xe.setValue(window.sessionStorage.getItem(je))}function ua(vt,Ct){var yt=Xe.getValue();yt=yt.replace(vt,Ct),Mn(yt),Xe==null||Xe.setValue(yt)}return j.a.createElement(z.Fragment,null,j.a.createElement("div",{className:"markdown-editor-wrapper",ref:Wn},j.a.createElement("div",{className:"markdown-editor-container ".concat(We," ").concat(Tn?"on-preview":""," ").concat(ae?"mini":""," ").concat(An?"full-screen":""),style:Ln},j.a.createElement(M,{insertTemp:B,watch:Tn,fullScreen:An,showNullButton:Pt,onActionCallback:ji,hidetoolBar:nn,uuid:ur.current,setOpenPhones:function(){cr.current=!0}}),j.a.createElement("div",{className:"markdown-editor-body"},j.a.createElement("div",{className:"codemirror-container"},j.a.createElement("textarea",{ref:zn,placeholder:jn})),Tn?j.a.createElement("div",{ref:Mr,className:"preview-container"},qe==="stex"&&j.a.createElement(Ye,{value:sr}),qe!=="stex"&&j.a.createElement(Ue.a,{edit:!0,value:sr,replaces:ua})):null))),Ot?j.a.createElement("a",{ref:Hn,className:"editor-resize"}):null,j.a.createElement(le.a,null,b[ln]?j.a.createElement(Oe.a,{centered:!0,title:b[ln],visible:!0,onCancel:Zn,footer:null,className:"markdown-popup-form"},Qr):null))}},SJMd:function(kt,dt){/**
|
|
* @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 y,F,Oe,ce=!1,Re,Ae;window.PR_SHOULD_USE_CONTINUATION=!0;var ee,k;(function(){var X=window,oe=["break,continue,do,else,for,if,return,while"],V=[oe,"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"],z=[V,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],j=[z,"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"],_e=[z,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],J=[z,"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"],H="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",E=[z,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],A="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",re=[oe,"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"],ie=[oe,"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"],ye=[oe,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Ve=[j,J,_e,E,A,re,ie,ye],Be=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Ue="str",Ye="kwd",ve="com",be="typ",Ie="lit",pe="pun",w="pln",fe="tag",Z="dec",M="src",le="atn",L="atv",P="nocode",_="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(ne){for(var me=0,Te=!1,He=!1,ze=0,Le=ne.length;ze<Le;++ze){var De=ne[ze];if(De.ignoreCase)He=!0;else if(/[a-z]/i.test(De.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Te=!0,He=!1;break}}var at={b:8,t:9,n:10,v:11,f:12,r:13};function ut($e){var ue=$e.charCodeAt(0);if(ue!==92)return ue;var ct=$e.charAt(1);return ue=at[ct],ue||("0"<=ct&&ct<="7"?parseInt($e.substring(1),8):ct==="u"||ct==="x"?parseInt($e.substring(2),16):$e.charCodeAt(1))}function ot($e){if($e<32)return($e<16?"\\x0":"\\x")+$e.toString(16);var ue=String.fromCharCode($e);return ue==="\\"||ue==="-"||ue==="]"||ue==="^"?"\\"+ue:ue}function rt($e){var ue=$e.substring(1,$e.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")),ct=[],lt=ue[0]==="^",we=["["];lt&&we.push("^");for(var Ke=lt?1:0,W=ue.length;Ke<W;++Ke){var R=ue[Ke];if(/\\[bdsw]/i.test(R))we.push(R);else{var I=ut(R),f;Ke+2<W&&ue[Ke+1]==="-"?(f=ut(ue[Ke+2]),Ke+=2):f=I,ct.push([I,f]),f<65||I>122||(f<65||I>90||ct.push([Math.max(65,I)|32,Math.min(f,90)|32]),f<97||I>122||ct.push([Math.max(97,I)&~32,Math.min(f,122)&~32]))}}ct.sort(function(U,se){return U[0]-se[0]||se[1]-U[1]});for(var m=[],b=[],Ke=0;Ke<ct.length;++Ke){var O=ct[Ke];O[0]<=b[1]+1?b[1]=Math.max(b[1],O[1]):m.push(b=O)}for(var Ke=0;Ke<m.length;++Ke){var O=m[Ke];we.push(ot(O[0])),O[1]>O[0]&&(O[1]+1>O[0]&&we.push("-"),we.push(ot(O[1])))}return we.push("]"),we.join("")}function mt($e){for(var ue=$e.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")),ct=ue.length,lt=[],we=0,Ke=0;we<ct;++we){var W=ue[we];if(W==="(")++Ke;else if(W.charAt(0)==="\\"){var R=+W.substring(1);R&&(R<=Ke?lt[R]=-1:ue[we]=ot(R))}}for(var we=1;we<lt.length;++we)lt[we]===-1&&(lt[we]=++me);for(var we=0,Ke=0;we<ct;++we){var W=ue[we];if(W==="(")++Ke,lt[Ke]||(ue[we]="(?:");else if(W.charAt(0)==="\\"){var R=+W.substring(1);R&&R<=Ke&&(ue[we]="\\"+lt[R])}}for(var we=0;we<ct;++we)ue[we]==="^"&&ue[we+1]!=="^"&&(ue[we]="");if($e.ignoreCase&&Te)for(var we=0;we<ct;++we){var W=ue[we],I=W.charAt(0);W.length>=2&&I==="["?ue[we]=rt(W):I!=="\\"&&(ue[we]=W.replace(/[a-zA-Z]/g,function(b){var O=b.charCodeAt(0);return"["+String.fromCharCode(O&~32,O|32)+"]"}))}return ue.join("")}for(var nt=[],ze=0,Le=ne.length;ze<Le;++ze){var De=ne[ze];if(De.global||De.multiline)throw new Error(""+De);nt.push("(?:"+mt(De)+")")}return new RegExp(nt.join("|"),He?"gi":"g")}function l(ne,me){var Te=/(?:^|\s)nocode(?:\s|$)/,He=[],ze=0,Le=[],De=0;function at(ut){var ot=ut.nodeType;if(ot==1){if(Te.test(ut.className))return;for(var rt=ut.firstChild;rt;rt=rt.nextSibling)at(rt);var mt=ut.nodeName.toLowerCase();(mt==="br"||mt==="li")&&(He[De]=`
|
|
`,Le[De<<1]=ze++,Le[De++<<1|1]=ut)}else if(ot==3||ot==4){var nt=ut.nodeValue;nt.length&&(me?nt=nt.replace(/\r\n?/g,`
|
|
`):nt=nt.replace(/[ \t\r\n]+/g," "),He[De]=nt,Le[De<<1]=ze,ze+=nt.length,Le[De++<<1|1]=ut)}}return at(ne),{sourceCode:He.join("").replace(/\n$/,""),spans:Le}}function v(ne,me,Te,He,ze){if(!Te)return;var Le={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:Te,spans:null,basePos:me,decorations:null};He(Le),ze.push.apply(ze,Le.decorations)}var N=/\S/;function Y(ne){for(var me=void 0,Te=ne.firstChild;Te;Te=Te.nextSibling){var He=Te.nodeType;me=He===1?me?ne:Te:He===3&&N.test(Te.nodeValue)?ne:me}return me===ne?void 0:me}function Me(ne,me){var Te={},He;(function(){for(var De=ne.concat(me),at=[],ut={},ot=0,rt=De.length;ot<rt;++ot){var mt=De[ot],nt=mt[3];if(nt)for(var $e=nt.length;--$e>=0;)Te[nt.charAt($e)]=mt;var ue=mt[1],ct=""+ue;ut.hasOwnProperty(ct)||(at.push(ue),ut[ct]=null)}at.push(/[\0-\uffff]/),He=c(at)})();var ze=me.length,Le=function(De){for(var at=De.sourceCode,ut=De.basePos,ot=De.sourceNode,rt=[ut,w],mt=0,nt=at.match(He)||[],$e={},ue=0,ct=nt.length;ue<ct;++ue){var lt=nt[ue],we=$e[lt],Ke=void 0,W;if(typeof we=="string")W=!1;else{var R=Te[lt.charAt(0)];if(R)Ke=lt.match(R[1]),we=R[0];else{for(var I=0;I<ze;++I)if(R=me[I],Ke=lt.match(R[1]),Ke){we=R[0];break}Ke||(we=w)}W=we.length>=5&&we.substring(0,5)==="lang-",W&&!(Ke&&typeof Ke[1]=="string")&&(W=!1,we=M),W||($e[lt]=we)}var f=mt;if(mt+=lt.length,!W)rt.push(ut+f,we);else{var m=Ke[1],b=lt.indexOf(m),O=b+m.length;Ke[2]&&(O=lt.length-Ke[2].length,b=O-m.length);var U=we.substring(5);v(ot,ut+f,lt.substring(0,b),Le,rt),v(ot,ut+f+b,m,$(U,m),rt),v(ot,ut+f+O,lt.substring(O),Le,rt)}}De.decorations=rt};return Le}function Fe(ne){var me=[],Te=[];ne.tripleQuotedStrings?me.push([Ue,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?me.push([Ue,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):me.push([Ue,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&Te.push([Ue,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var He=ne.hashComments;He&&(ne.cStyleComments?(He>1?me.push([ve,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):me.push([ve,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Te.push([Ue,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):me.push([ve,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(Te.push([ve,/^\/\/[^\r\n]*/,null]),Te.push([ve,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ze=ne.regexLiterals;if(ze){var Le=ze>1?"":`
|
|
\r`,De=Le?".":"[\\S\\s]",at="/(?=[^/*"+Le+"])(?:[^/\\x5B\\x5C"+Le+"]|\\x5C"+De+"|\\x5B(?:[^\\x5C\\x5D"+Le+"]|\\x5C"+De+")*(?:\\x5D|$))+/";Te.push(["lang-regex",RegExp("^"+_+"("+at+")")])}var ut=ne.types;ut&&Te.push([be,ut]);var ot=(""+ne.keywords).replace(/^ | $/g,"");ot.length&&Te.push([Ye,new RegExp("^(?:"+ot.replace(/[\s,]+/g,"|")+")\\b"),null]),me.push([w,/^\s+/,null,` \r
|
|
\xA0`]);var rt="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(rt+="(?!s*/)"),Te.push([Ie,/^@[a-z_$][a-z_$@0-9]*/i,null],[be,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[Ie,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[pe,new RegExp(rt),null]),Me(me,Te)}var xe=Fe({keywords:Ve,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function de(ne,me,Te){for(var He=/(?:^|\s)nocode(?:\s|$)/,ze=/\r\n?|\n/,Le=ne.ownerDocument,De=Le.createElement("li");ne.firstChild;)De.appendChild(ne.firstChild);var at=[De];function ut(ue){var ct=ue.nodeType;if(ct==1&&!He.test(ue.className))if(ue.nodeName==="br")ot(ue),ue.parentNode&&ue.parentNode.removeChild(ue);else for(var lt=ue.firstChild;lt;lt=lt.nextSibling)ut(lt);else if((ct==3||ct==4)&&Te){var we=ue.nodeValue,Ke=we.match(ze);if(Ke){var W=we.substring(0,Ke.index);ue.nodeValue=W;var R=we.substring(Ke.index+Ke[0].length);if(R){var I=ue.parentNode;I.insertBefore(Le.createTextNode(R),ue.nextSibling)}ot(ue),W||ue.parentNode.removeChild(ue)}}}function ot(ue){for(;!ue.nextSibling;)if(ue=ue.parentNode,!ue)return;function ct(Ke,W){var R=W?Ke.cloneNode(!1):Ke,I=Ke.parentNode;if(I){var f=ct(I,1),m=Ke.nextSibling;f.appendChild(R);for(var b=m;b;b=m)m=b.nextSibling,f.appendChild(b)}return R}for(var lt=ct(ue.nextSibling,0),we;(we=lt.parentNode)&&we.nodeType===1;)lt=we;at.push(lt)}for(var rt=0;rt<at.length;++rt)ut(at[rt]);me===(me|0)&&at[0].setAttribute("value",me);var mt=Le.createElement("ol");mt.className="linenums";for(var nt=Math.max(0,me-1|0)||0,rt=0,$e=at.length;rt<$e;++rt)De=at[rt],De.className="L"+(rt+nt)%10,De.firstChild||De.appendChild(Le.createTextNode("\xA0")),mt.appendChild(De);ne.appendChild(mt)}function te(ne){var me=/\bMSIE\s(\d+)/.exec(navigator.userAgent);me=me&&+me[1]<=8;var Te=/\n/g,He=ne.sourceCode,ze=He.length,Le=0,De=ne.spans,at=De.length,ut=0,ot=ne.decorations,rt=ot.length,mt=0;ot[rt]=ze;var nt,$e;for($e=nt=0;$e<rt;)ot[$e]!==ot[$e+2]?(ot[nt++]=ot[$e++],ot[nt++]=ot[$e++]):$e+=2;for(rt=nt,$e=nt=0;$e<rt;){for(var ue=ot[$e],ct=ot[$e+1],lt=$e+2;lt+2<=rt&&ot[lt+1]===ct;)lt+=2;ot[nt++]=ue,ot[nt++]=ct,$e=lt}rt=ot.length=nt;var we=ne.sourceNode,Ke="";we&&(Ke=we.style.display,we.style.display="none");try{for(var W=null;ut<at;){var R=De[ut],I=De[ut+2]||ze,f=ot[mt+2]||ze,lt=Math.min(I,f),m=De[ut+1],b;if(m.nodeType!==1&&(b=He.substring(Le,lt))){me&&(b=b.replace(Te,"\r")),m.nodeValue=b;var O=m.ownerDocument,U=O.createElement("span");U.className=ot[mt+1];var se=m.parentNode;se.replaceChild(U,m),U.appendChild(m),Le<I&&(De[ut+1]=m=O.createTextNode(He.substring(lt,I)),se.insertBefore(m,U.nextSibling))}Le=lt,Le>=I&&(ut+=2),Le>=f&&(mt+=2)}}finally{we&&(we.style.display=Ke)}}var K={};function D(ne,me){for(var Te=me.length;--Te>=0;){var He=me[Te];K.hasOwnProperty(He)?X.console&&console.warn("cannot override language handler %s",He):K[He]=ne}}function $(ne,me){return ne&&K.hasOwnProperty(ne)||(ne=/^\s*</.test(me)?"default-markup":"default-code"),K[ne]}D(xe,["default-code"]),D(Me([],[[w,/^[^<?]+/],[Z,/^<!\w[^>]*(?:>|$)/],[ve,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[pe,/^(?:<[%?]|[%?]>)/],["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"]),D(Me([[w,/^[\s]+/,null,` \r
|
|
`],[L,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[fe,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[le,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[pe,/^[=<>\/]+/],["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"]),D(Me([],[[L,/^[\s\S]+/]]),["uq.val"]),D(Fe({keywords:j,hashComments:!0,cStyleComments:!0,types:Be}),["c","cc","cpp","cxx","cyc","m"]),D(Fe({keywords:"null,true,false"}),["json"]),D(Fe({keywords:J,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Be}),["cs"]),D(Fe({keywords:_e,cStyleComments:!0}),["java"]),D(Fe({keywords:ye,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),D(Fe({keywords:re,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),D(Fe({keywords:A,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),D(Fe({keywords:ie,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),D(Fe({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),D(Fe({keywords:H,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),D(Me([],[[Ue,/^[\s\S]+/]]),["regex"]);function h(ne){var me=ne.langExtension;try{var Te=l(ne.sourceNode,ne.pre),He=Te.sourceCode;ne.sourceCode=He,ne.spans=Te.spans,ne.basePos=0,$(me,He)(ne),te(ne)}catch(ze){X.console&&console.log(ze&&ze.stack||ze)}}function C(ne,me,Te){var He=Te||!1,ze=me||null,Le=document.createElement("div");Le.innerHTML="<pre>"+ne+"</pre>",Le=Le.firstChild,He&&de(Le,He,!0);var De={langExtension:ze,numberLines:He,sourceNode:Le,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(De),Le.innerHTML}function g(ne,me){var Te=me||document.body,He=Te.ownerDocument||document;function ze(R){return Te.getElementsByTagName(R)}for(var Le=[ze("pre"),ze("code"),ze("xmp")],De=[],at=0;at<Le.length;++at)for(var ut=0,ot=Le[at].length;ut<ot;++ut)De.push(Le[at][ut]);Le=null;var rt=Date;rt.now||(rt={now:function(){return+new Date}});var mt=0,nt=/\blang(?:uage)?-([\w.]+)(?!\S)/,$e=/\bprettyprint\b/,ue=/\bprettyprinted\b/,ct=/pre|xmp/i,lt=/^code$/i,we=/^(?:pre|code|xmp)$/i,Ke={};function W(){for(var R=X.PR_SHOULD_USE_CONTINUATION?rt.now()+250:Infinity;mt<De.length&&rt.now()<R;mt++){for(var I=De[mt],f=Ke,m=I;m=m.previousSibling;){var b=m.nodeType,O=(b===7||b===8)&&m.nodeValue;if(O?!/^\??prettify\b/.test(O):b!==3||/\S/.test(m.nodeValue))break;if(O){f={},O.replace(/\b(\w+)=([\w:.%+-]+)/g,function(he,B,Ze){f[B]=Ze});break}}var U=I.className;if((f!==Ke||$e.test(U))&&!ue.test(U)){for(var se=!1,Ne=I.parentNode;Ne;Ne=Ne.parentNode){var Qe=Ne.tagName;if(we.test(Qe)&&Ne.className&&$e.test(Ne.className)){se=!0;break}}if(!se){I.className+=" prettyprinted";var gt=f.lang;if(!gt){gt=U.match(nt);var pt;!gt&&(pt=Y(I))&<.test(pt.tagName)&&(gt=pt.className.match(nt)),gt&&(gt=gt[1])}var Je;if(ct.test(I.tagName))Je=1;else{var ge=I.currentStyle,Ee=He.defaultView,ae=ge?ge.whiteSpace:Ee&&Ee.getComputedStyle?Ee.getComputedStyle(I,null).getPropertyValue("white-space"):0;Je=ae&&ae.substring(0,3)==="pre"}var p=f.linenums;(p=p==="true"||+p)||(p=U.match(/\blinenums\b(?::(\d+))?/),p=p?p[1]&&p[1].length?+p[1]:!0:!1),p&&de(I,p,Je);var S={langExtension:gt,sourceNode:I,numberLines:p,pre:Je,sourceCode:null,basePos:null,spans:null,decorations:null};h(S)}}}mt<De.length?X.setTimeout(W,250):typeof ne=="function"&&ne()}W()}var q=X.PR={createSimpleLexer:Me,registerLangHandler:D,sourceDecorator:Fe,PR_ATTRIB_NAME:le,PR_ATTRIB_VALUE:L,PR_COMMENT:ve,PR_DECLARATION:Z,PR_KEYWORD:Ye,PR_LITERAL:Ie,PR_NOCODE:P,PR_PLAIN:w,PR_PUNCTUATION:pe,PR_SOURCE:M,PR_STRING:Ue,PR_TAG:fe,PR_TYPE:be,prettyPrintOne:ce?X.prettyPrintOne=C:ee=C,prettyPrint:k=ce?X.prettyPrint=g:k=g},Ce=X.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return q})})()},"T+//":function(kt,dt,y){"use strict";y.r(dt);var F=y("Q9mQ"),Oe=y("diRs"),ce=y("2qtc"),Re=y("kLXV"),Ae=y("miYZ"),ee=y("tsqr"),k=y("9og8"),X=y("tJVT"),oe=y("B9cy"),V=y("Ol7k"),z=y("lUTK"),j=y("BvKs"),_e=y("WmNS"),J=y.n(_e),H=y("cDcd"),E=y.n(H),A=y("m3rI"),re=y("p0QG"),ie=y.n(re),ye=y("ErOA"),Ve=y("9kvl"),Be=y("RCxd"),Ue=y("xGfz"),Ye=y("xKgJ"),ve=y("5NDa"),be=y("5rEg");function Ie(K){var D=K.user,$=K.CategoryId,h=K.IsShow,C=K.setIsShow,g=K.dispatch,q=K.init,Ce=Object(H.useState)(),ne=Object(X.a)(Ce,2),me=ne[0],Te=ne[1];return E.a.createElement(Re.a,{title:$?"\u65B0\u5EFA\u4E09\u7EA7\u7C7B\u76EE":"\u65B0\u5EFA\u4E8C\u7EA7\u7C7B\u76EE",width:424,onCancel:function(){C(!1)},onOk:Object(k.a)(J.a.mark(function He(){var ze;return J.a.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:if(me){De.next=3;break}return ee.b.error("\u680F\u76EE\u540D\u4E0D\u80FD\u4E3A\u7A7A"),De.abrupt("return");case 3:return De.next=5,Object(ye.a)("/api/programas.json",{method:"post",body:{name:me,parent_id:$}});case 5:ze=De.sent,ze.status===0&&(ee.b.info("\u521B\u5EFA\u6210\u529F"),C(!1),Te(""),q());case 7:case"end":return De.stop()}},He)})),visible:h},E.a.createElement(be.a,{value:me,onChange:function(ze){return Te(ze.target.value)},placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC710\u4E2A\u6C49\u5B57\u7684\u540D\u79F0",maxLength:10}))}var pe=Object(Ve.a)(function(K){var D=K.user;return{user:D}})(Ie);function w(K){var D=K.user,$=K.CategoryId,h=K.name,C=K.IsShow,g=K.setIsShow,q=K.dispatch,Ce=K.init,ne=Object(H.useState)(),me=Object(X.a)(ne,2),Te=me[0],He=me[1];return Object(H.useEffect)(function(){He(h)},[h]),E.a.createElement(Re.a,{title:"\u76EE\u5F55\u91CD\u547D\u540D",width:424,onCancel:function(){g(!1)},onOk:Object(k.a)(J.a.mark(function ze(){var Le;return J.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(Te){at.next=3;break}return ee.b.error("\u680F\u76EE\u540D\u4E0D\u80FD\u4E3A\u7A7A"),at.abrupt("return");case 3:return at.next=5,Object(ye.a)("/api/programas/".concat($,"/rename.json"),{method:"put",body:{name:Te,id:$}});case 5:Le=at.sent,Le.status===0&&(ee.b.info("\u4FEE\u6539\u6210\u529F"),g(!1),He(""),Ce());case 7:case"end":return at.stop()}},ze)})),visible:C},E.a.createElement(be.a,{value:Te,onChange:function(Le){return He(Le.target.value)},placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC710\u4E2A\u6C49\u5B57\u7684\u540D\u79F0",maxLength:10}))}var fe=Object(Ve.a)(function(K){var D=K.user;return{user:D}})(w),Z=y("+L6B"),M=y("2/Rp"),le=y("9Bee");function L(K){var D,$,h,C,g=K.user,q=K.ItemData,Ce=K.setIssee,ne=K.dispatch,me=K.init;return E.a.createElement("div",null,E.a.createElement("div",{style:{textAlign:"right"}},Object(Ye.g)()&&E.a.createElement(M.a,{onClick:function(){return Ce(!1)}},"\u7F16\u8F91")),E.a.createElement(le.a,{value:q.content}),(q==null||((D=q.attachment)===null||D===void 0)?void 0:D.id)&&E.a.createElement("div",null,E.a.createElement("a",{href:q==null||(($=q.attachment)===null||$===void 0)?void 0:$.url,target:"_self",download:q==null||((h=q.attachment)===null||h===void 0)?void 0:h.title},E.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),E.a.createElement("span",{style:{color:"#000000"}},q==null||((C=q.attachment)===null||C===void 0)?void 0:C.title))))}var P=Object(Ve.a)(function(K){var D=K.user;return{user:D}})(L),_=y("DZo9"),c=y("8z0m"),l=y("Ot1p"),v=y("hJwl");function N(K){var D=K.user,$=K.ItemData,h=K.setIssee,C=K.CategoryId,g=K.dispatch,q=K.init,Ce=Object(H.useState)([]),ne=Object(X.a)(Ce,2),me=ne[0],Te=ne[1],He=Object(H.useState)($.content),ze=Object(X.a)(He,2),Le=ze[0],De=ze[1];function at(){var nt,$e=[];return $==null||((nt=$.attachments)===null||nt===void 0)||nt.map(function(ue){var ct={uid:ue==null?void 0:ue.id,name:ue.title,response:{id:ue.id}};$e.push(ct)}),$e}var ut={name:"file",multiple:!0,action:A.a.API_SERVER+"/api/attachments.json",defaultFileList:at(),onRemove:function($e){Object(v.t)({id:$e.uid})},onChange:function($e){console.log("info",$e);var ue=$e.file.status;ue!=="uploading",ue==="removed"&&Te($e.fileList),ue==="done"?(Te($e.fileList),ee.b.success("".concat($e.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):ue==="error"&&ee.b.error("".concat($e.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function($e){var ue=$e.size/1024/1024<150;return ue||ee.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),ue}};function ot(){return rt.apply(this,arguments)}function rt(){return rt=Object(k.a)(J.a.mark(function nt(){var $e;return J.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.next=2,Object(ye.a)("/api/programas/".concat(C,"/update_content.json"),{method:"put",body:{id:C,content:Le,attachment_id:mt(me)}});case 2:$e=ct.sent,$e&&(ee.b.info("\u63D0\u4EA4\u6210\u529F"),h(!0));case 4:case"end":return ct.stop()}},nt)})),rt.apply(this,arguments)}function mt(nt){var $e;return nt&&nt.map(function(ue){$e=ue.response.id}),$e}return E.a.createElement("div",null,E.a.createElement(l.a,{defaultValue:Le,onChange:function($e){return De($e)}}),E.a.createElement(c.a,ut,E.a.createElement(M.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),E.a.createElement("p",{style:{marginTop:"10px"}},E.a.createElement(M.a,{style:{width:"90px"},onClick:function(){return ot()}},"\u63D0\u4EA4"),E.a.createElement(M.a,{style:{marginLeft:"30px",width:"90px"},type:"primary",onClick:function(){return h(!0)}},"\u53D6\u6D88")))}var Y=Object(Ve.a)(function(K){var D=K.user;return{user:D}})(N),Me=j.a.SubMenu,Fe=V.a.Content,xe=V.a.Sider;function de(K){var D,$=K.user,h=K.dispatch,C=K.globalSetting,g=Object(H.useState)(),q=Object(X.a)(g,2),Ce=q[0],ne=q[1],me=Object(H.useState)(!1),Te=Object(X.a)(me,2),He=Te[0],ze=Te[1],Le=Object(H.useState)(),De=Object(X.a)(Le,2),at=De[0],ut=De[1],ot=Object(H.useState)(),rt=Object(X.a)(ot,2),mt=rt[0],nt=rt[1],$e=Object(H.useState)(!1),ue=Object(X.a)($e,2),ct=ue[0],lt=ue[1],we=Object(H.useState)(""),Ke=Object(X.a)(we,2),W=Ke[0],R=Ke[1],I=Object(H.useState)(""),f=Object(X.a)(I,2),m=f[0],b=f[1],O=Object(H.useState)(!0),U=Object(X.a)(O,2),se=U[0],Ne=U[1];Object(H.useEffect)(function(){Qe()},[]),console.log("globalSetting",C);function Qe(){return gt.apply(this,arguments)}function gt(){return gt=Object(k.a)(J.a.mark(function p(){var S;return J.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,Object(ye.a)("/api/programas.json",{method:"get"});case 2:S=B.sent,S&&ut(S==null?void 0:S.programas);case 4:case"end":return B.stop()}},p)})),gt.apply(this,arguments)}var pt=function(){var p=Object(k.a)(J.a.mark(function S(he,B,Ze){var qe;return J.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:je.t0=he,je.next=je.t0===1?3:je.t0===2?6:je.t0===3?10:je.t0===4?15:17;break;case 3:return nt(B==null?void 0:B.id),ze(!0),je.abrupt("break",17);case 6:return nt(B==null?void 0:B.id),lt(!0),R(B==null?void 0:B.name),je.abrupt("break",17);case 10:return je.next=12,Object(ye.a)("/api/programas/".concat(B==null?void 0:B.id,"/top.json"),{method:"post",body:{id:B==null?void 0:B.id}});case 12:return qe=je.sent,qe.status===0&&Qe(),je.abrupt("break",17);case 15:return Je(E.a.createElement("p",null,"\u5220\u9664\u4E4B\u540E\u4E0D\u80FD\u6062\u590D,",E.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),Object(k.a)(J.a.mark(function it(){var Ot;return J.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,Object(ye.a)("/api/programas/".concat(B==null?void 0:B.id,".json"),{method:"delete",body:{id:B==null?void 0:B.id}});case 2:Ot=Rt.sent,Ot.status===0&&(ee.b.info("\u5220\u9664\u6210\u529F"),Qe());case 4:case"end":return Rt.stop()}},it)}))),je.abrupt("break",17);case 17:case"end":return je.stop()}},S)}));return function(he,B,Ze){return p.apply(this,arguments)}}(),Je=function(S,he){Re.a.confirm({centered:!0,title:"\u63D0\u793A",icon:E.a.createElement(Be.a,null),content:S,okText:"\u786E\u8BA4",onOk:function(){return he()},cancelText:"\u53D6\u6D88"})},ge=function(S,he){return E.a.createElement("div",{className:ie.a.leftMenuActions},he===1&&E.a.createElement("p",{className:"current",onClick:function(){return pt(1,S,he)}},"\u65B0\u5EFA"),E.a.createElement("p",{className:"current",onClick:function(){return pt(2,S,he)}},"\u91CD\u547D\u540D"),E.a.createElement("p",{className:"current",onClick:function(){return pt(3,S,he)}},"\u7F6E\u9876"),E.a.createElement("p",{className:"current",onClick:function(){return pt(4,S,he)}},"\u5220\u9664"))};function Ee(){return ae.apply(this,arguments)}function ae(){return ae=Object(k.a)(J.a.mark(function p(){var S;return J.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,Object(ye.a)("/api/programas/".concat(mt,"/content.json"),{method:"get",params:{id:mt}});case 2:S=B.sent,S&&b(S);case 4:case"end":return B.stop()}},p)})),ae.apply(this,arguments)}return E.a.createElement("div",{style:{marginBottom:"40px"}},E.a.createElement("img",{style:{width:"100%"},src:A.a.IMG_SERVER+"/".concat(C==null||((D=C.setting)===null||D===void 0)?void 0:D.shixun_banner_url)}),E.a.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},E.a.createElement(xe,{width:244,className:ie.a.leftMenus,style:{background:"none",marginTop:"20px",height:"auto"}},E.a.createElement(j.a,{mode:"inline"},at==null?void 0:at.map(function(p,S){if((p==null?void 0:p.children.length)>0){var he;return E.a.createElement(Me,{title:E.a.createElement("span",{className:"font16"},E.a.createElement("span",null,p.name),!Object(Ye.g)()&&E.a.createElement("span",null),Object(Ye.g)()&&E.a.createElement(Oe.a,{placement:"right",content:function(){return ge(p,1)},trigger:"hover"},E.a.createElement("span",{className:["iconfont icon-sandian",ie.a.actions].join(" ")})))},p==null||((he=p.children)===null||he===void 0)?void 0:he.map(function(B,Ze){return E.a.createElement(j.a.Item,{className:ie.a===null||ie.a===void 0?void 0:ie.a.SubMentItem,onClick:function(){nt(B==null?void 0:B.id),mt=B==null?void 0:B.id,Ee()}},E.a.createElement("span",{style:{flex:"1"}},B==null?void 0:B.name),Object(Ye.g)()&&E.a.createElement(Oe.a,{placement:"right",content:function(){return ge(B,2)},trigger:"hover"},E.a.createElement("span",{className:["iconfont icon-sandian",ie.a.actions].join(" ")})))}))}else return E.a.createElement(j.a.Item,{className:ie.a===null||ie.a===void 0?void 0:ie.a.SubMentItem,onClick:function(){nt(p==null?void 0:p.id),mt=p==null?void 0:p.id,Ee()}},E.a.createElement("span",{style:{flex:"1"}},p==null?void 0:p.name),Object(Ye.g)()&&E.a.createElement(Oe.a,{placement:"right",content:function(){return ge(p,1)},trigger:"hover"},E.a.createElement("span",{className:["iconfont icon-sandian",ie.a.actions].join(" ")})))}),E.a.createElement(j.a.Item,{onClick:function(){nt(""),mt="",ze(!0)},style:{color:"#0152d9",fontSize:"16px",height:"40px",display:"flex",alignItems:"center"},icon:E.a.createElement(Ue.a,{style:{color:"#0152d9",fontSize:"16px"}})},"\u65B0\u589E\u4E8C\u7EA7\u7C7B\u76EE"))),E.a.createElement("div",{style:{width:"937px",marginLeft:"17px",background:"#fff",padding:"20px"}},se&&E.a.createElement(P,{ItemData:m,setIssee:Ne}),se===!1&&E.a.createElement(Y,{ItemData:m,setIssee:Ne,CategoryId:mt}))),E.a.createElement(pe,{CategoryId:mt,IsShow:He,setIsShow:ze,init:Qe}),E.a.createElement(fe,{CategoryId:mt,name:W,IsShow:ct,setIsShow:lt,init:Qe}))}var te=dt.default=Object(Ve.a)(function(K){var D=K.user,$=K.globalSetting;return{user:D,globalSetting:$}})(de)},"VrN/":function(kt,dt,y){(function(F,Oe){kt.exports=Oe()})(this,function(){"use strict";var F=navigator.userAgent,Oe=navigator.platform,ce=/gecko\/\d/i.test(F),Re=/MSIE \d/.test(F),Ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F),ee=/Edge\/(\d+)/.exec(F),k=Re||Ae||ee,X=k&&(Re?document.documentMode||6:+(ee||Ae)[1]),oe=!ee&&/WebKit\//.test(F),V=oe&&/Qt\/\d+\.\d+/.test(F),z=!ee&&/Chrome\//.test(F),j=/Opera\//.test(F),_e=/Apple Computer/.test(navigator.vendor),J=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(F),H=/PhantomJS/.test(F),E=!ee&&/AppleWebKit/.test(F)&&/Mobile\/\w+/.test(F),A=/Android/.test(F),re=E||A||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(F),ie=E||/Mac/.test(Oe),ye=/\bCrOS\b/.test(F),Ve=/win/i.test(Oe),Be=j&&F.match(/Version\/(\d*\.\d*)/);Be&&(Be=Number(Be[1])),Be&&Be>=15&&(j=!1,oe=!0);var Ue=ie&&(V||j&&(Be==null||Be<12.11)),Ye=ce||k&&X>=9;function ve(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var be=function(e,t){var r=e.className,n=ve(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function Ie(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function pe(e,t){return Ie(e).appendChild(t)}function w(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function fe(e,t,r,n){var i=w(e,t,r,n);return i.setAttribute("role","presentation"),i}var Z;document.createRange?Z=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:Z=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function M(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 le(){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 L(e,t){var r=e.className;ve(t).test(r)||(e.className+=(r?" ":"")+t)}function P(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!ve(r[n]).test(t)&&(t+=" "+r[n]);return t}var _=function(e){e.select()};E?_=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:k&&(_=function(e){try{e.select()}catch(t){}});function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function l(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function v(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var s=e.indexOf(" ",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=r-o%r,a=s+1}}var N=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};N.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},N.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function Y(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Me=50,Fe={toString:function(){return"CodeMirror.Pass"}},xe={scroll:!1},de={origin:"*mouse"},te={origin:"+move"};function K(e,t,r){for(var n=0,i=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var o=a-n;if(a==e.length||i+o>=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var D=[""];function $(e){for(;D.length<=e;)D.push(h(D)+" ");return D[e]}function h(e){return e[e.length-1]}function C(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function g(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function q(){}function Ce(e,t){var r;return Object.create?r=Object.create(e):(q.prototype=e,r=new q),t&&l(t,r),r}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function me(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function Te(e,t){return t?t.source.indexOf("\\w")>-1&&me(e)?!0:t.test(e):me(e)}function He(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ze=/[\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 Le(e){return e.charCodeAt(0)>=768&&ze.test(e)}function De(e,t,r){for(;(r<0?t>0:t<e.length)&&Le(e.charAt(t));)t+=r;return t}function at(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function ut(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var ot=null;function rt(e,t,r){var n;ot=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:ot=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:ot=i)}return n!=null?n:ot}var mt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function u(d,x,T){this.level=d,this.from=x,this.to=T}return function(d,x){var T=x=="ltr"?"L":"R";if(d.length==0||x=="ltr"&&!n.test(d))return!1;for(var Q=d.length,G=[],Se=0;Se<Q;++Se)G.push(r(d.charCodeAt(Se)));for(var Pe=0,Ge=T;Pe<Q;++Pe){var et=G[Pe];et=="m"?G[Pe]=Ge:Ge=et}for(var st=0,tt=T;st<Q;++st){var ft=G[st];ft=="1"&&tt=="r"?G[st]="n":a.test(ft)&&(tt=ft,ft=="r"&&(G[st]="R"))}for(var xt=1,bt=G[0];xt<Q-1;++xt){var Mt=G[xt];Mt=="+"&&bt=="1"&&G[xt+1]=="1"?G[xt]="1":Mt==","&&bt==G[xt+1]&&(bt=="1"||bt=="n")&&(G[xt]=bt),bt=Mt}for(var Ft=0;Ft<Q;++Ft){var qt=G[Ft];if(qt==",")G[Ft]="N";else if(qt=="%"){var Ht=void 0;for(Ht=Ft+1;Ht<Q&&G[Ht]=="%";++Ht);for(var xn=Ft&&G[Ft-1]=="!"||Ht<Q&&G[Ht]=="1"?"1":"N",gn=Ft;gn<Ht;++gn)G[gn]=xn;Ft=Ht-1}}for(var Gt=0,vn=T;Gt<Q;++Gt){var tn=G[Gt];vn=="L"&&tn=="1"?G[Gt]="L":a.test(tn)&&(vn=tn)}for(var Yt=0;Yt<Q;++Yt)if(i.test(G[Yt])){var Vt=void 0;for(Vt=Yt+1;Vt<Q&&i.test(G[Vt]);++Vt);for(var Bt=(Yt?G[Yt-1]:T)=="L",bn=(Vt<Q?G[Vt]:T)=="L",Kr=Bt==bn?Bt?"L":"R":T,ar=Yt;ar<Vt;++ar)G[ar]=Kr;Yt=Vt-1}for(var on=[],Fn,Qt=0;Qt<Q;)if(o.test(G[Qt])){var Ga=Qt;for(++Qt;Qt<Q&&o.test(G[Qt]);++Qt);on.push(new u(0,Ga,Qt))}else{var Gn=Qt,xr=on.length,wr=x=="rtl"?1:0;for(++Qt;Qt<Q&&G[Qt]!="L";++Qt);for(var cn=Gn;cn<Qt;)if(s.test(G[cn])){Gn<cn&&(on.splice(xr,0,new u(1,Gn,cn)),xr+=wr);var Xr=cn;for(++cn;cn<Qt&&s.test(G[cn]);++cn);on.splice(xr,0,new u(2,Xr,cn)),xr+=wr,Gn=cn}else++cn;Gn<Qt&&on.splice(xr,0,new u(1,Gn,Qt))}return x=="ltr"&&(on[0].level==1&&(Fn=d.match(/^\s+/))&&(on[0].from=Fn[0].length,on.unshift(new u(0,0,Fn[0].length))),h(on).level==1&&(Fn=d.match(/\s+$/))&&(h(on).to-=Fn[0].length,on.push(new u(0,Q-Fn[0].length,Q)))),x=="rtl"?on.reverse():on}}();function nt(e,t){var r=e.order;return r==null&&(r=e.order=mt(e.text,t)),r}var $e=[],ue=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||$e).concat(r)}};function ct(e,t){return e._handlers&&e._handlers[t]||$e}function lt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=Y(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function we(e,t){var r=ct(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Ke(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),we(e,r||t.type,e,t),b(t)||t.codemirrorIgnore}function W(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)Y(r,t[n])==-1&&r.push(t[n])}function R(e,t){return ct(e,t).length>0}function I(e){e.prototype.on=function(t,r){ue(this,t,r)},e.prototype.off=function(t,r){lt(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function m(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function b(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function O(e){f(e),m(e)}function U(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)),ie&&e.ctrlKey&&t==1&&(t=3),t}var Ne=function(){if(k&&X<9)return!1;var e=w("div");return"draggable"in e||"dragDrop"in e}(),Qe;function gt(e){if(Qe==null){var t=w("span","\u200B");pe(e,w("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Qe=t.offsetWidth<=1&&t.offsetHeight>2&&!(k&&X<8))}var r=Qe?w("span","\u200B"):w("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var pt;function Je(e){if(pt!=null)return pt;var t=pe(e,document.createTextNode("A\u062EA")),r=Z(t,0,1).getBoundingClientRect(),n=Z(t,1,2).getBoundingClientRect();return Ie(e),!r||r.left==r.right?!1:pt=n.right-r.right<3}var ge=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ee=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(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},ae=function(){var e=w("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),p=null;function S(e){if(p!=null)return p;var t=pe(e,w("span","x")),r=t.getBoundingClientRect(),n=Z(t,0,1).getBoundingClientRect();return p=Math.abs(r.left-n.left)>1}var he={},B={};function Ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),he[e]=t}function qe(e,t){B[e]=t}function ke(e){if(typeof e=="string"&&B.hasOwnProperty(e))e=B[e];else if(e&&typeof e.name=="string"&&B.hasOwnProperty(e.name)){var t=B[e.name];typeof t=="string"&&(t={name:t}),e=Ce(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ke("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ke("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function je(e,t){t=ke(t);var r=he[t.name];if(!r)return je(e,"text/plain");var n=r(e,t);if(it.hasOwnProperty(t.name)){var i=it[t.name];for(var a in i){if(!i.hasOwnProperty(a))continue;n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=i[a]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var it={};function Ot(e,t){var r=it.hasOwnProperty(e)?it[e]:it[e]={};l(t,r)}function Et(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Rt(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function zt(e,t,r){return e.startState?e.startState(t,r):!0}var Pt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Pt.prototype.eol=function(){return this.pos>=this.string.length},Pt.prototype.sol=function(){return this.pos==this.lineStart},Pt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Pt.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Pt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Pt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Pt.prototype.skipToEnd=function(){this.pos=this.string.length},Pt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Pt.prototype.backUp=function(e){this.pos-=e},Pt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=v(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?v(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.indentation=function(){return v(this.string,null,this.tabSize)-(this.lineStart?v(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},Pt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Pt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Pt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ht(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function nn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(a){var o=a.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function Sn(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function Xt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function At(e){if(e.parent==null)return null;for(var t=e.parent,r=Y(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function sn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o],u=s.height;if(t<u)break;t-=u}return r+o}function dn(e,t){return t>=e.first&&t<e.first+e.size}function Vn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function We(e,t,r){if(r===void 0&&(r=null),!(this instanceof We))return new We(e,t,r);this.line=e,this.ch=t,this.sticky=r}function wt(e,t){return e.line-t.line||e.ch-t.ch}function $n(e,t){return e.sticky==t.sticky&&wt(e,t)==0}function Yn(e){return We(e.line,e.ch)}function jn(e,t){return wt(e,t)<0?t:e}function or(e,t){return wt(e,t)<0?e:t}function Er(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function St(e,t){if(t.line<e.first)return We(e.first,0);var r=e.first+e.size-1;return t.line>r?We(r,ht(e,r).text.length):Mi(t,ht(e,t.line).text.length)}function Mi(e,t){var r=e.ch;return r==null||r>t?We(e.line,t):r<0?We(e.line,0):e}function Xe(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=St(e,t[n]);return r}var Cr=function(e,t){this.state=e,this.lookAhead=t},kn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};kn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},kn.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}},kn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},kn.fromSaved=function(e,t,r){return t instanceof Cr?new kn(e,Et(e.mode,t.state),r,t.lookAhead):new kn(e,Et(e.mode,t),r)},kn.prototype.save=function(e){var t=e!==!1?Et(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Cr(t,this.maxLookAhead):t};function Gr(e,t,r,n){var i=[e.state.modeGen],a={};An(e,t.text,e.doc.mode,r,function(d,x){return i.push(d,x)},a,n);for(var o=r.state,s=function(d){r.baseTokens=i;var x=e.state.overlays[d],T=1,Q=0;r.state=!0,An(e,t.text,x.mode,r,function(G,Se){for(var Pe=T;Q<G;){var Ge=i[T];Ge>G&&i.splice(T,1,G,i[T+1],Ge),T+=2,Q=Math.min(G,Ge)}if(!Se)return;if(x.opaque)i.splice(Pe,T-Pe,G,"overlay "+Se),T=Pe+2;else for(;Pe<T;Pe+=2){var et=i[Pe+1];i[Pe+1]=(et?et+" ":"")+"overlay "+Se}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)s(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function sr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Mn(e,At(t)),i=t.text.length>e.options.maxHighlightLength&&Et(e.doc.mode,n.state),a=Gr(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Mn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new kn(n,!0,t);var a=Ai(e,t,r),o=a>n.first&&ht(n,a-1).stateAfter,s=o?kn.fromSaved(n,o,a):new kn(n,zt(n.mode),a);return n.iter(a,t,function(u){Vr(e,u.text,s);var d=s.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Vr(e,t,r,n){var i=e.doc.mode,a=new Pt(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&$r(i,r.state);!a.eol();)Tn(i,a,r.state),a.start=a.pos}function $r(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Rt(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function Tn(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Rt(e,r).mode);var a=e.token(t,r);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var Yr=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ti(e,t,r,n){var i=e.doc,a=i.mode,o;t=St(i,t);var s=ht(i,t.line),u=Mn(e,t.line,r),d=new Pt(s.text,e.options.tabSize,u),x;for(n&&(x=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=Tn(a,d,u.state),n&&x.push(new Yr(d,o,Et(i.mode,u.state)));return n?x:new Yr(d,o,u.state)}function Jr(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function An(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var u=0,d=null,x=new Pt(t,e.options.tabSize,n),T,Q=e.options.addModeClass&&[null];for(t==""&&Jr($r(r,n.state),a);!x.eol();){if(x.pos>e.options.maxHighlightLength?(s=!1,o&&Vr(e,t,n,x.pos),x.pos=t.length,T=null):T=Jr(Tn(r,x,n.state,Q),a),Q){var G=Q[0].name;G&&(T="m-"+(T?G+" "+T:G))}if(!s||d!=T){for(;u<x.start;)u=Math.min(x.start,u+5e3),i(u,d);d=T}x.start=x.pos}for(;u<x.pos;){var Se=Math.min(x.pos,u+5e3);i(Se,d),u=Se}}function Ai(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var u=ht(a,s-1),d=u.stateAfter;if(d&&(!r||s+(d instanceof Cr?d.lookAhead:0)<=a.modeFrontier))return s;var x=v(u.text,null,e.options.tabSize);(i==null||n>x)&&(i=s-1,n=x)}return i}function aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=ht(e,n).stateAfter;if(i&&(!(i instanceof Cr)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Zr=!1,ln=!1;function Jn(){Zr=!0}function oa(){ln=!0}function lr(e,t,r){this.marker=e,this.from=t,this.to=r}function _n(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function qr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function sa(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function _i(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(s||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new lr(o,a.from,u?null:a.to))}}return n}function Li(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(s||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new lr(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function Sr(e,t){if(t.full)return null;var r=dn(e,t.from.line)&&ht(e,t.from.line).markedSpans,n=dn(e,t.to.line)&&ht(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=wt(t.from,t.to)==0,s=_i(r,i,o),u=Li(n,a,o),d=t.text.length==1,x=h(t.text).length+(d?i:0);if(s)for(var T=0;T<s.length;++T){var Q=s[T];if(Q.to==null){var G=_n(u,Q.marker);G?d&&(Q.to=G.to==null?null:G.to+x):Q.to=i}}if(u)for(var Se=0;Se<u.length;++Se){var Pe=u[Se];if(Pe.to!=null&&(Pe.to+=x),Pe.from==null){var Ge=_n(s,Pe.marker);Ge||(Pe.from=x,d&&(s||(s=[])).push(Pe))}else Pe.from+=x,d&&(s||(s=[])).push(Pe)}s&&(s=Di(s)),u&&u!=s&&(u=Di(u));var et=[s];if(!d){var st=t.text.length-2,tt;if(st>0&&s)for(var ft=0;ft<s.length;++ft)s[ft].to==null&&(tt||(tt=[])).push(new lr(s[ft].marker,null,null));for(var xt=0;xt<st;++xt)et.push(tt);et.push(u)}return et}function Di(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ri(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(G){if(G.markedSpans)for(var Se=0;Se<G.markedSpans.length;++Se){var Pe=G.markedSpans[Se].marker;Pe.readOnly&&(!n||Y(n,Pe)==-1)&&(n||(n=[])).push(Pe)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],s=o.find(0),u=0;u<i.length;++u){var d=i[u];if(wt(d.to,s.from)<0||wt(d.from,s.to)>0)continue;var x=[u,1],T=wt(d.from,s.from),Q=wt(d.to,s.to);(T<0||!o.inclusiveLeft&&!T)&&x.push({from:d.from,to:s.from}),(Q>0||!o.inclusiveRight&&!Q)&&x.push({from:s.to,to:d.to}),i.splice.apply(i,x),u+=x.length-3}return i}function la(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function kr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function ur(e){return e.inclusiveLeft?-1:0}function cr(e){return e.inclusiveRight?1:0}function Or(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=wt(n.from,i.from)||ur(e)-ur(t);if(a)return-a;var o=wt(n.to,i.to)||cr(e)-cr(t);return o||t.id-e.id}function zn(e,t){var r=ln&&e.markedSpans,n;if(r)for(var i=void 0,a=0;a<r.length;++a)i=r[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Or(n,i.marker)<0)&&(n=i.marker);return n}function Wn(e){return zn(e,!0)}function Hn(e){return zn(e,!1)}function Mr(e,t){var r=ln&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Or(n,a.marker)<0)&&(n=a.marker)}return n}function Ni(e,t,r,n,i){var a=ht(e,t),o=ln&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var u=o[s];if(!u.marker.collapsed)continue;var d=u.marker.find(0),x=wt(d.from,r)||ur(u.marker)-ur(i),T=wt(d.to,n)||cr(u.marker)-cr(i);if(x>=0&&T<=0||x<=0&&T>=0)continue;if(x<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?wt(d.to,r)>=0:wt(d.to,r)>0)||x>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?wt(d.from,n)<=0:wt(d.from,n)<0))return!0}}function wn(e){for(var t;t=Wn(e);)e=t.find(-1,!0).line;return e}function ji(e){for(var t;t=Hn(e);)e=t.find(1,!0).line;return e}function Tr(e){for(var t,r;t=Hn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Qr(e,t){var r=ht(e,t),n=wn(r);return r==n?t:At(n)}function Zn(e,t){if(t>e.lastLine())return t;var r=ht(e,t),n;if(!Pn(e,r))return t;for(;n=Hn(r);)r=n.find(1,!0).line;return At(r)+1}function Pn(e,t){var r=ln&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&ei(e,t,n))return!0}}function ei(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return ei(e,n.line,_n(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ei(e,t,i))return!0}function Ln(e){e=wn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==r)break;t+=s.height}return t}function ti(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Wn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Hn(n);){var a=r.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function Pi(e){var t=e.display,r=e.doc;t.maxLine=ht(r,r.first),t.maxLineLength=ti(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=ti(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var dr=function(e,t,r){this.text=e,kr(this,t),this.height=r?r(this):1};dr.prototype.lineNo=function(){return At(this)},I(dr);function ua(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),la(e),kr(e,r);var i=n?n(e):1;i!=e.height&&Xt(e,i)}function vt(e){e.parent=null,la(e)}var Ct={},yt={};function Tt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?yt:Ct;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Dt(e,t){var r=fe("span",null,null,oe?"padding-right: .1px":null),n={pre:fe("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=Lt,Je(e.display.measure)&&(o=nt(a,e.doc.direction))&&(n.addToken=fn(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&At(a);Bn(a,n,sr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=P(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=P(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(gt(e.display.measure))),i==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(oe){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=P(n.pre.className,n.textClass||"")),n}function Ut(e){var t=w("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Lt(e,t,r,n,i,a,o){if(!t)return;var s=e.splitSpaces?$t(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,x;if(!u.test(t))e.col+=t.length,x=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,x),k&&X<9&&(d=!0),e.pos+=t.length;else{x=document.createDocumentFragment();for(var T=0;;){u.lastIndex=T;var Q=u.exec(t),G=Q?Q.index-T:t.length-T;if(G){var Se=document.createTextNode(s.slice(T,T+G));k&&X<9?x.appendChild(w("span",[Se])):x.appendChild(Se),e.map.push(e.pos,e.pos+G,Se),e.col+=G,e.pos+=G}if(!Q)break;T+=G+1;var Pe=void 0;if(Q[0]==" "){var Ge=e.cm.options.tabSize,et=Ge-e.col%Ge;Pe=x.appendChild(w("span",$(et),"cm-tab")),Pe.setAttribute("role","presentation"),Pe.setAttribute("cm-text"," "),e.col+=et}else Q[0]=="\r"||Q[0]==`
|
|
`?(Pe=x.appendChild(w("span",Q[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Pe.setAttribute("cm-text",Q[0]),e.col+=1):(Pe=e.cm.options.specialCharPlaceholder(Q[0]),Pe.setAttribute("cm-text",Q[0]),k&&X<9?x.appendChild(w("span",[Pe])):x.appendChild(Pe),e.col+=1);e.map.push(e.pos,e.pos+1,Pe),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var st=r||"";n&&(st+=n),i&&(st+=i);var tt=w("span",[x],st,a);if(o)for(var ft in o)o.hasOwnProperty(ft)&&ft!="style"&&ft!="class"&&tt.setAttribute(ft,o[ft]);return e.content.appendChild(tt)}e.content.appendChild(x)}function $t(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),n+=a,r=a==" "}return n}function fn(e,t){return function(r,n,i,a,o,s,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,x=d+n.length;;){for(var T=void 0,Q=0;Q<t.length&&!(T=t[Q],T.to>d&&T.from<=d);Q++);if(T.to>=x)return e(r,n,i,a,o,s,u);e(r,n.slice(0,T.to-d),i,a,null,s,u),a=null,n=n.slice(T.to-d),d=T.to}}}function _t(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Bn(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,i.slice(a,a=r[o]),Tt(r[o+1],t.cm.options));return}for(var s=i.length,u=0,d=1,x="",T,Q,G=0,Se,Pe,Ge,et,st;;){if(G==u){Se=Pe=Ge=Q="",st=null,et=null,G=Infinity;for(var tt=[],ft=void 0,xt=0;xt<n.length;++xt){var bt=n[xt],Mt=bt.marker;if(Mt.type=="bookmark"&&bt.from==u&&Mt.widgetNode)tt.push(Mt);else if(bt.from<=u&&(bt.to==null||bt.to>u||Mt.collapsed&&bt.to==u&&bt.from==u)){if(bt.to!=null&&bt.to!=u&&G>bt.to&&(G=bt.to,Pe=""),Mt.className&&(Se+=" "+Mt.className),Mt.css&&(Q=(Q?Q+";":"")+Mt.css),Mt.startStyle&&bt.from==u&&(Ge+=" "+Mt.startStyle),Mt.endStyle&&bt.to==G&&(ft||(ft=[])).push(Mt.endStyle,bt.to),Mt.title&&((st||(st={})).title=Mt.title),Mt.attributes)for(var Ft in Mt.attributes)(st||(st={}))[Ft]=Mt.attributes[Ft];Mt.collapsed&&(!et||Or(et.marker,Mt)<0)&&(et=bt)}else bt.from>u&&G>bt.from&&(G=bt.from)}if(ft)for(var qt=0;qt<ft.length;qt+=2)ft[qt+1]==G&&(Pe+=" "+ft[qt]);if(!et||et.from==u)for(var Ht=0;Ht<tt.length;++Ht)_t(t,0,tt[Ht]);if(et&&(et.from||0)==u){if(_t(t,(et.to==null?s+1:et.to)-u,et.marker,et.from==null),et.to==null)return;et.to==u&&(et=!1)}}if(u>=s)break;for(var xn=Math.min(s,G);;){if(x){var gn=u+x.length;if(!et){var Gt=gn>xn?x.slice(0,xn-u):x;t.addToken(t,Gt,T?T+Se:Se,Ge,u+Gt.length==G?Pe:"",Q,st)}if(gn>=xn){x=x.slice(xn-u),u=xn;break}u=gn,Ge=""}x=i.slice(a,a=r[d++]),T=Tt(r[d++],t.cm.options)}}}function Nt(e,t,r){this.line=t,this.rest=Tr(t),this.size=this.rest?At(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Pn(e,t)}function hn(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Nt(e.doc,ht(e.doc,a),a);i=a+o.size,n.push(o)}return n}var rn=null;function On(e){rn?rn.ops.push(e):e.ownsGroup=rn={ops:[e],delayedCallbacks:[]}}function _s(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ls(e,t){var r=e.ownsGroup;if(!r)return;try{_s(r)}finally{rn=null,t(r)}}var ni=null;function en(e,t){var r=ct(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;rn?i=rn.delayedCallbacks:ni?i=ni:(i=ni=[],setTimeout(Ds,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ds(){var e=ni;ni=null;for(var t=0;t<e.length;++t)e[t]()}function $a(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ns(e,t):a=="gutter"?Ja(e,t,r,n):a=="class"?ca(e,t):a=="widget"&&js(e,t,n)}t.changes=null}function ri(e){return e.node==e.text&&(e.node=w("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),k&&X<8&&(e.node.style.zIndex=2)),e.node}function Rs(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ri(t);t.background=n.insertBefore(w("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ya(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Dt(e,t)}function Ns(e,t){var r=t.text.className,n=Ya(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,ca(e,t)):r&&(t.text.className=r)}function ca(e,t){Rs(e,t),t.line.wrapClass?ri(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ja(e,t,r,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 i=ri(t);t.gutterBackground=w("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),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ri(t),s=t.gutter=w("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(w("div",Vn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var d=e.display.gutterSpecs[u].className,x=a.hasOwnProperty(d)&&a[d];x&&s.appendChild(w("div",[x],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function js(e,t,r){t.alignable&&(t.alignable=null);for(var n=ve("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Za(e,t,r)}function Ps(e,t,r,n){var i=Ya(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ca(e,t),Ja(e,t,r,n),Za(e,t,n),t.node}function Za(e,t,r){if(qa(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)qa(e,t.rest[n],t,r,!1)}function qa(e,t,r,n,i){if(!t.widgets)return;for(var a=ri(r),o=0,s=t.widgets;o<s.length;++o){var u=s[o],d=w("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(u,d,r,n),e.display.input.setUneditable(d),i&&u.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),en(u,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function ii(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),pe(t.display.measure,w("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Kn(e,t){for(var r=U(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ii(e){return e.lineSpace.offsetTop}function da(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Qa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=pe(e.measure,w("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function In(e){return Me-e.display.nativeBarWidth}function fr(e){return e.display.scroller.clientWidth-In(e)-e.display.barWidth}function fa(e){return e.display.scroller.clientHeight-In(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&fr(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var u=o[s],d=o[s+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function eo(e,t,r){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 i=0;i<e.rest.length;i++)if(At(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=wn(t);var r=At(t),n=e.display.externalMeasured=new Nt(e.doc,t,r);n.lineN=r;var i=n.built=Dt(e,n);return n.text=i.pre,pe(e.display.lineMeasure,i.pre),n}function to(e,t,r,n){return Un(e,Ar(e,t),r,n)}function ha(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[mr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Ar(e,t){var r=At(t),n=ha(e,r);n&&!n.text?n=null:n&&n.changes&&($a(e,n,r,ya(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=eo(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Un(e,t,r,n,i){t.before&&(r=-1);var a=r+(n||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),o=Ws(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var no={left:0,right:0,top:0,bottom:0};function ro(e,t,r){for(var n,i,a,o,s,u,d=0;d<e.length;d+=3)if(s=e[d],u=e[d+1],t<s?(i=0,a=1,o="left"):t<u?(i=t-s,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-s,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],s==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==u-s)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:s,coverEnd:u}}function zs(e,t){var r=no;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var i=e.length-1;i>=0&&!((r=e[i]).left!=r.right);i--);return r}function Ws(e,t,r,n){var i=ro(t.map,r,n),a=i.node,o=i.start,s=i.end,u=i.collapse,d;if(a.nodeType==3){for(var x=0;x<4;x++){for(;o&&Le(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&Le(t.line.text.charAt(i.coverStart+s));)++s;if(k&&X<9&&o==0&&s==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=zs(Z(a,o,s).getClientRects(),n),d.left||d.right||o==0)break;s=o,o=o-1,u="right"}k&&X<11&&(d=Hs(e.display.measure,d))}else{o>0&&(u=n="right");var T;e.options.lineWrapping&&(T=a.getClientRects()).length>1?d=T[n=="right"?T.length-1:0]:d=a.getBoundingClientRect()}if(k&&X<9&&!o&&(!d||!d.left&&!d.right)){var Q=a.parentNode.getClientRects()[0];Q?d={left:Q.left,right:Q.left+Lr(e.display),top:Q.top,bottom:Q.bottom}:d=no}for(var G=d.top-t.rect.top,Se=d.bottom-t.rect.top,Pe=(G+Se)/2,Ge=t.view.measure.heights,et=0;et<Ge.length-1&&!(Pe<Ge[et]);et++);var st=et?Ge[et-1]:0,tt=Ge[et],ft={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:st,bottom:tt};return!d.left&&!d.right&&(ft.bogus=!0),e.options.singleCursorHeightPerLine||(ft.rtop=G,ft.rbottom=Se),ft}function Hs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!S(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function io(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 ao(e){e.display.externalMeasure=null,Ie(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)io(e.display.view[t])}function ai(e){ao(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function oo(){return z&&A?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function so(){return z&&A?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pa(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ii(e.widgets[r]));return t}function Ui(e,t,r,n,i){if(!i){var a=pa(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Ln(t);if(n=="local"?o+=Ii(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:so());var u=s.left+(n=="window"?0:oo());r.left+=u,r.right+=u}return r.top+=o,r.bottom+=o,r}function lo(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=oo(),i-=so();else if(r=="local"||!r){var a=e.display.sizer.getBoundingClientRect();n+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:i-o.top}}function ma(e,t,r,n,i){return n||(n=ht(e.doc,t.line)),Ui(e,n,to(e,n,t.ch,i),r)}function Dn(e,t,r,n,i,a){n=n||ht(e.doc,t.line),i||(i=Ar(e,n));function o(Se,Pe){var Ge=Un(e,i,Se,Pe?"right":"left",a);return Pe?Ge.left=Ge.right:Ge.right=Ge.left,Ui(e,n,Ge,r)}var s=nt(n,e.doc.direction),u=t.ch,d=t.sticky;if(u>=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!s)return o(d=="before"?u-1:u,d=="before");function x(Se,Pe,Ge){var et=s[Pe],st=et.level==1;return o(Ge?Se-1:Se,st!=Ge)}var T=rt(s,u,d),Q=ot,G=x(u,T,d=="before");return Q!=null&&(G.other=x(u,Q,d!="before")),G}function uo(e,t){var r=0;t=St(e.doc,t),e.options.lineWrapping||(r=Lr(e.display)*t.ch);var n=ht(e.doc,t.line),i=Ln(n)+Ii(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function ga(e,t,r,n,i){var a=We(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function va(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return ga(n.first,0,null,-1,-1);var i=sn(n,r),a=n.first+n.size-1;if(i>a)return ga(n.first+n.size-1,ht(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=ht(n,i);;){var s=Bs(e,o,i,t,r),u=Mr(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var d=u.find(1);if(d.line==i)return d;o=ht(n,i=d.line)}}function co(e,t,r,n){n-=pa(t);var i=t.text.length,a=at(function(o){return Un(e,r,o-1).bottom<=n},i,0);return i=at(function(o){return Un(e,r,o).top>n},a,i),{begin:a,end:i}}function fo(e,t,r,n){r||(r=Ar(e,t));var i=Ui(e,t,Un(e,r,n),"line").top;return co(e,t,r,i)}function ba(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Bs(e,t,r,n,i){i-=Ln(t);var a=Ar(e,t),o=pa(t),s=0,u=t.text.length,d=!0,x=nt(t,e.doc.direction);if(x){var T=(e.options.lineWrapping?Xs:Ks)(e,t,r,a,x,n,i);d=T.level!=1,s=d?T.from:T.to-1,u=d?T.to:T.from-1}var Q=null,G=null,Se=at(function(xt){var bt=Un(e,a,xt);return bt.top+=o,bt.bottom+=o,ba(bt,n,i,!1)?(bt.top<=i&&bt.left<=n&&(Q=xt,G=bt),!0):!1},s,u),Pe,Ge,et=!1;if(G){var st=n-G.left<G.right-n,tt=st==d;Se=Q+(tt?0:1),Ge=tt?"after":"before",Pe=st?G.left:G.right}else{!d&&(Se==u||Se==s)&&Se++,Ge=Se==0?"after":Se==t.text.length?"before":Un(e,a,Se-(d?1:0)).bottom+o<=i==d?"after":"before";var ft=Dn(e,We(r,Se,Ge),"line",t,a);Pe=ft.left,et=i<ft.top?-1:i>=ft.bottom?1:0}return Se=De(t.text,Se,1),ga(r,Se,Ge,et,n-Pe)}function Ks(e,t,r,n,i,a,o){var s=at(function(T){var Q=i[T],G=Q.level!=1;return ba(Dn(e,We(r,G?Q.to:Q.from,G?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[s];if(s>0){var d=u.level!=1,x=Dn(e,We(r,d?u.from:u.to,d?"after":"before"),"line",t,n);ba(x,a,o,!0)&&x.top>o&&(u=i[s-1])}return u}function Xs(e,t,r,n,i,a,o){var s=co(e,t,n,o),u=s.begin,d=s.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var x=null,T=null,Q=0;Q<i.length;Q++){var G=i[Q];if(G.from>=d||G.to<=u)continue;var Se=G.level!=1,Pe=Un(e,n,Se?Math.min(d,G.to)-1:Math.max(u,G.from)).right,Ge=Pe<a?a-Pe+1e9:Pe-a;(!x||T>Ge)&&(x=G,T=Ge)}return x||(x=i[i.length-1]),x.from<u&&(x={from:u,to:x.to,level:x.level}),x.to>d&&(x={from:x.from,to:d,level:x.level}),x}var hr;function _r(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(hr==null){hr=w("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)hr.appendChild(document.createTextNode("x")),hr.appendChild(w("br"));hr.appendChild(document.createTextNode("x"))}pe(e.measure,hr);var r=hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Ie(e.measure),r||1}function Lr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=w("span","xxxxxxxxxx"),r=w("pre",[t],"CodeMirror-line-like");pe(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ya(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=a.offsetLeft+a.clientLeft+i,n[s]=a.clientWidth}return{fixedPos:xa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ho(e){var t=_r(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Lr(e.display)-3);return function(i){if(Pn(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return r?a+(Math.ceil(i.text.length/n)||1)*t:a+t}}function wa(e){var t=e.doc,r=ho(e);t.iter(function(n){var i=r(n);i!=n.height&&Xt(n,i)})}function pr(e,t,r,n){var i=e.display;if(!r&&U(t).getAttribute("cm-not-content")=="true")return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(T){return null}var u=va(e,a,o),d;if(n&&u.xRel>0&&(d=ht(e.doc,u.line).text).length==u.ch){var x=v(d,d.length,e.options.tabSize)-d.length;u=We(u.line,Math.max(0,Math.round((a-Qa(e.display).left)/Lr(e.display))-x))}return u}function mr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function pn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)ln&&Qr(e.doc,t)<i.viewTo&&Qn(e);else if(r<=i.viewFrom)ln&&Zn(e.doc,r+n)>i.viewFrom?Qn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Qn(e);else if(t<=i.viewFrom){var a=Fi(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Qn(e)}else if(r>=i.viewTo){var o=Fi(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Qn(e)}else{var s=Fi(e,t,t,-1),u=Fi(e,r,r+n,1);s&&u?(i.view=i.view.slice(0,s.index).concat(hn(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Qn(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function qn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var a=n.view[mr(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);Y(o,r)==-1&&o.push(r)}function Qn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fi(e,t,r,n){var i=mr(e,t),a,o=e.display.view;if(!ln||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,u=0;u<i;u++)s+=o[u].size;if(s!=t){if(n>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,r+=a}for(;Qr(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Gs(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=hn(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=hn(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(mr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(hn(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,mr(e,r)))),n.viewTo=r}function po(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function oi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function mo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var u=s.empty();(u||e.options.showCursorWhenSelecting)&&go(e,s.head,i),u||Vs(e,s,a)}return n}function go(e,t,r){var n=Dn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(w("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(w("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function zi(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=Qa(e.display),s=o.left,u=Math.max(n.sizerWidth,fr(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function x(tt,ft,xt,bt){ft<0&&(ft=0),ft=Math.round(ft),bt=Math.round(bt),a.appendChild(w("div",null,"CodeMirror-selected","position: absolute; left: "+tt+`px;
|
|
top: `+ft+"px; width: "+(xt==null?u-tt:xt)+`px;
|
|
height: `+(bt-ft)+"px"))}function T(tt,ft,xt){var bt=ht(i,tt),Mt=bt.text.length,Ft,qt;function Ht(Gt,vn){return ma(e,We(tt,Gt),"div",bt,vn)}function xn(Gt,vn,tn){var Yt=fo(e,bt,null,Gt),Vt=vn=="ltr"==(tn=="after")?"left":"right",Bt=tn=="after"?Yt.begin:Yt.end-(/\s/.test(bt.text.charAt(Yt.end-1))?2:1);return Ht(Bt,Vt)[Vt]}var gn=nt(bt,i.direction);return ut(gn,ft||0,xt==null?Mt:xt,function(Gt,vn,tn,Yt){var Vt=tn=="ltr",Bt=Ht(Gt,Vt?"left":"right"),bn=Ht(vn-1,Vt?"right":"left"),Kr=ft==null&&Gt==0,ar=xt==null&&vn==Mt,on=Yt==0,Fn=!gn||Yt==gn.length-1;if(bn.top-Bt.top<=3){var Qt=(d?Kr:ar)&&on,Ga=(d?ar:Kr)&&Fn,Gn=Qt?s:(Vt?Bt:bn).left,xr=Ga?u:(Vt?bn:Bt).right;x(Gn,Bt.top,xr-Gn,Bt.bottom)}else{var wr,cn,Xr,Va;Vt?(wr=d&&Kr&&on?s:Bt.left,cn=d?u:xn(Gt,tn,"before"),Xr=d?s:xn(vn,tn,"after"),Va=d&&ar&&Fn?u:bn.right):(wr=d?xn(Gt,tn,"before"):s,cn=!d&&Kr&&on?u:Bt.right,Xr=!d&&ar&&Fn?s:bn.left,Va=d?xn(vn,tn,"after"):u),x(wr,Bt.top,cn-wr,Bt.bottom),Bt.bottom<bn.top&&x(s,Bt.bottom,null,bn.top),x(Xr,bn.top,Va-Xr,bn.bottom)}(!Ft||zi(Bt,Ft)<0)&&(Ft=Bt),zi(bn,Ft)<0&&(Ft=bn),(!qt||zi(Bt,qt)<0)&&(qt=Bt),zi(bn,qt)<0&&(qt=bn)}),{start:Ft,end:qt}}var Q=t.from(),G=t.to();if(Q.line==G.line)T(Q.line,Q.ch,G.ch);else{var Se=ht(i,Q.line),Pe=ht(i,G.line),Ge=wn(Se)==wn(Pe),et=T(Q.line,Q.ch,Ge?Se.text.length+1:null).end,st=T(G.line,Ge?0:null,G.ch).start;Ge&&(et.top<st.top-2?(x(et.right,et.top,null,et.bottom),x(s,st.top,st.left,st.bottom)):x(et.right,et.top,st.left-et.right,et.bottom)),et.bottom<st.top&&x(s,et.bottom,null,st.top)}r.appendChild(a)}function Ea(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Dr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function vo(e){e.state.focused||(e.display.input.focus(),Ca(e))}function bo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Dr(e))},100)}function Ca(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),oe&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ea(e)}function Dr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,be(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Wi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,s=0;if(i.hidden)continue;if(k&&X<8){var u=i.node.offsetTop+i.node.offsetHeight;o=u-r,r=u}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var x=i.line.height-o;if((x>.005||x<-.005)&&(Xt(i.line,o),yo(i.line),i.rest))for(var T=0;T<i.rest.length;T++)yo(i.rest[T]);if(s>e.display.sizerWidth){var Q=Math.ceil(s/Lr(e.display));Q>e.display.maxLineLength&&(e.display.maxLineLength=Q,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function yo(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Hi(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ii(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=sn(t,n),o=sn(t,i);if(r&&r.ensure){var s=r.ensure.from.line,u=r.ensure.to.line;s<a?(a=s,o=sn(t,Ln(ht(t,s))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=sn(t,Ln(ht(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function $s(e,t){if(Ke(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!H){var a=w("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Ii(e.display))+`px;
|
|
height: `+(t.bottom-t.top+In(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}function Ys(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?We(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?We(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=Dn(e,t),u=!r||r==t?s:Dn(e,r);i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-n,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+n};var d=Sa(e,i),x=e.doc.scrollTop,T=e.doc.scrollLeft;if(d.scrollTop!=null&&(li(e,d.scrollTop),Math.abs(e.doc.scrollTop-x)>1&&(o=!0)),d.scrollLeft!=null&&(gr(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-T)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=Sa(e,t);r.scrollTop!=null&&li(e,r.scrollTop),r.scrollLeft!=null&&gr(e,r.scrollLeft)}function Sa(e,t){var r=e.display,n=_r(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=fa(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+da(r),u=t.top<n,d=t.bottom>s-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var x=Math.min(t.top,(d?s:t.bottom)-a);x!=i&&(o.scrollTop=x)}var T=e.options.fixedGutter?0:r.gutters.offsetWidth,Q=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-T,G=fr(e)-r.gutters.offsetWidth,Se=t.right-t.left>G;return Se&&(t.right=t.left+G),t.left<10?o.scrollLeft=0:t.left<Q?o.scrollLeft=Math.max(0,t.left+T-(Se?0:10)):t.right>G+Q-3&&(o.scrollLeft=t.right+(Se?0:10)-G),o}function ka(e,t){if(t==null)return;Bi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Rr(e){Bi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){(t!=null||r!=null)&&Bi(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zs(e,t){Bi(e),e.curOp.scrollToPos=t}function Bi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=uo(e,t.from),n=uo(e,t.to);xo(e,r,n,t.margin)}}function xo(e,t,r,n){var i=Sa(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function li(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;ce||Ma(e,{top:t}),wo(e,t,!0),ce&&Ma(e),di(e,100)}function wo(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function gr(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,Oo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ui(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+da(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?r:0,docHeight:n,scrollHeight:n+In(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var vr=function(e,t,r){this.cm=r;var n=this.vert=w("div",[w("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=w("div",[w("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),ue(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),ue(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,k&&X<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"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:r?n:0,bottom:t?n:0}},vr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vr.prototype.zeroWidthHack=function(){var e=ie&&!J?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new N,this.disableVert=new N},vr.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},vr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ci=function(){};ci.prototype.update=function(){return{bottom:0,right:0}},ci.prototype.setScrollLeft=function(){},ci.prototype.setScrollTop=function(){},ci.prototype.clear=function(){};function Nr(e,t){t||(t=ui(e));var r=e.display.barWidth,n=e.display.barHeight;Eo(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Wi(e),Eo(e,ui(e)),r=e.display.barWidth,n=e.display.barHeight}function Eo(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Co={native:vr,null:ci};function So(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&be(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Co[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ue(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?gr(e,t):li(e,t)},e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var qs=0;function br(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},On(e.curOp)}function yr(e){var t=e.curOp;t&&Ls(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Qs(r)})}function Qs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var i=0;i<t.length;i++)nl(t[i]);for(var a=0;a<t.length;a++)rl(t[a]);for(var o=0;o<t.length;o++)il(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&Pi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ki(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Oa(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Wi(t),e.barMeasure=ui(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=to(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+In(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-fr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&gr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==le();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Nr(t,e.barMeasure),e.updatedDisplay&&Aa(t,e.barMeasure),e.selectionChanged&&Ea(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&vo(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&ko(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&wo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&gr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,St(n,e.scrollToPos.from),St(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||we(a[s],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&we(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&we(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function yn(e,t){if(e.curOp)return t();br(e);try{return t()}finally{yr(e)}}function Jt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);br(e);try{return t.apply(e,arguments)}finally{yr(e)}}}function un(e){return function(){if(this.curOp)return e.apply(this,arguments);br(this);try{return e.apply(this,arguments)}finally{yr(this)}}}function Zt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);br(t);try{return e.apply(this,arguments)}finally{yr(t)}}}function di(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=Mn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?Et(t.mode,n.state):null,u=Gr(e,a,n,!0);s&&(n.state=s),a.styles=u.styles;var d=a.styleClasses,x=u.classes;x?a.styleClasses=x:d&&(a.styleClasses=null);for(var T=!o||o.length!=a.styles.length||d!=x&&(!d||!x||d.bgClass!=x.bgClass||d.textClass!=x.textClass),Q=0;!T&&Q<o.length;++Q)T=o[Q]!=a.styles[Q];T&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Vr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return di(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&yn(e,function(){for(var a=0;a<i.length;a++)qn(e,i[a],"text")})}var Ki=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Hi(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=fr(e),this.force=r,this.dims=ya(e),this.events=[]};Ki.prototype.signal=function(e,t){R(e,t)&&this.events.push(arguments)},Ki.prototype.finish=function(){for(var e=0;e<this.events.length;e++)we.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=In(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=In(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=le();if(!t||!M(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&M(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==le())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Oa(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Qn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&po(e)==0)return!1;Mo(e)&&(Qn(e),t.dims=ya(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),ln&&(a=Qr(e.doc,a),o=Zn(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gs(e,a,o),r.viewOffset=Ln(ht(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=po(e);if(!s&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return u>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),Ie(r.cursorDiv),Ie(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,di(e,400)),r.updateLineNumbers=null,!0}function ko(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==fr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+da(e.display)-fa(e),r.top)}),t.visible=Hi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Hi(e.display,e.doc,r));if(!Oa(e,t))break;Wi(e);var i=ui(e);oi(e),Nr(e,i),Aa(e,i),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 Ma(e,t){var r=new Ki(e,t);if(Oa(e,r)){Wi(e),ko(e,r);var n=ui(e);oi(e),Nr(e,n),Aa(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(Se){var Pe=Se.nextSibling;return oe&&ie&&e.display.currentWheelTarget==Se?Se.style.display="none":Se.parentNode.removeChild(Se),Pe}for(var u=n.view,d=n.viewFrom,x=0;x<u.length;x++){var T=u[x];if(!T.hidden)if(!T.node||T.node.parentNode!=a){var Q=Ps(e,T,d,r);a.insertBefore(Q,o)}else{for(;o!=T.node;)o=s(o);var G=i&&t!=null&&t<=d&&T.lineNumber;T.changes&&(Y(T.changes,"gutter")>-1&&(G=!1),$a(e,T,d,r)),G&&(Ie(T.lineNumber),T.lineNumber.appendChild(document.createTextNode(Vn(e.options,d)))),o=T.node.nextSibling}d+=T.size}for(;o;)o=s(o)}function Ta(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Aa(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+In(e)+"px"}function Oo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=xa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var s=r[o].alignable;if(s)for(var u=0;u<s.length;u++)s[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function Mo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Vn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(w("div",[w("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Ta(e.display),!0}return!1}function _a(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:a,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function To(e){var t=e.gutters,r=e.gutterSpecs;Ie(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,s=t.appendChild(w("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Ta(e)}function fi(e){To(e.display),pn(e),Oo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=w("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=w("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=fe("div",null,"CodeMirror-code"),i.selectionDiv=w("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=w("div",null,"CodeMirror-cursors"),i.measure=w("div",null,"CodeMirror-measure"),i.lineMeasure=w("div",null,"CodeMirror-measure"),i.lineSpace=fe("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=fe("div",[i.lineSpace],"CodeMirror-lines");i.mover=w("div",[a],null,"position: relative"),i.sizer=w("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=w("div",null,null,"position: absolute; height: "+Me+"px; width: 1px;"),i.gutters=w("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=w("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=w("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),k&&X<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!oe&&!(ce&&re)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=_a(n.gutters,n.lineNumbers),To(i),r.init(i)}var Xi=0,En=null;k?En=-.53:ce?En=15:z?En=-.7:_e&&(En=-1/3);function Ao(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Ao(e);return t.x*=En,t.y*=En,t}function _o(e,t){var r=Ao(t),n=r.x,i=r.y,a=e.display,o=a.scroller,s=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&u))return;if(i&&ie&&oe){e:for(var d=t.target,x=a.view;d!=o;d=d.parentNode)for(var T=0;T<x.length;T++)if(x[T].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!ce&&!j&&En!=null){i&&u&&li(e,Math.max(0,o.scrollTop+i*En)),gr(e,Math.max(0,o.scrollLeft+n*En)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&En!=null){var Q=i*En,G=e.doc.scrollTop,Se=G+a.wrapper.clientHeight;Q<0?G=Math.max(0,G+Q-50):Se=Math.min(e.doc.height,Se+Q+50),Ma(e,{top:G,bottom:Se})}Xi<20&&(a.wheelStartX==null?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=n,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX==null)return;var Pe=o.scrollLeft-a.wheelStartX,Ge=o.scrollTop-a.wheelStartY,et=Ge&&a.wheelDY&&Ge/a.wheelDY||Pe&&a.wheelDX&&Pe/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!et)return;En=(En*Xi+et)/(Xi+1),++Xi},200)):(a.wheelDX+=n,a.wheelDY+=i))}var Cn=function(e,t){this.ranges=e,this.primIndex=t};Cn.prototype.primary=function(){return this.ranges[this.primIndex]},Cn.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 r=this.ranges[t],n=e.ranges[t];if(!$n(r.anchor,n.anchor)||!$n(r.head,n.head))return!1}return!0},Cn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new jt(Yn(this.ranges[t].anchor),Yn(this.ranges[t].head));return new Cn(e,this.primIndex)},Cn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Cn.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(wt(t,n.from())>=0&&wt(e,n.to())<=0)return r}return-1};var jt=function(e,t){this.anchor=e,this.head=t};jt.prototype.from=function(){return or(this.anchor,this.head)},jt.prototype.to=function(){return jn(this.anchor,this.head)},jt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Rn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(Q,G){return wt(Q.from(),G.from())}),r=Y(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],u=wt(s.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=or(s.from(),o.from()),x=jn(s.to(),o.to()),T=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new jt(T?x:d,T?d:x))}}return new Cn(t,r)}function er(e,t){return new Cn([new jt(e,t||e)],0)}function tr(e){return e.text?We(e.from.line+e.text.length-1,h(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Lo(e,t){if(wt(e,t.from)<0)return e;if(wt(e,t.to)<=0)return tr(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=tr(t).ch-t.to.ch),We(r,n)}function La(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new jt(Lo(i.anchor,t),Lo(i.head,t)))}return Rn(e.cm,r,e.sel.primIndex)}function Do(e,t,r){return e.line==t.line?We(r.line,e.ch-t.ch+r.ch):We(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=We(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],u=Do(s.from,i,a),d=Do(tr(s),i,a);if(i=s.to,a=d,r=="around"){var x=e.sel.ranges[o],T=wt(x.head,x.anchor)<0;n[o]=new jt(T?d:u,T?u:d)}else n[o]=new jt(u,u)}return new Cn(n,e.sel.primIndex)}function Da(e){e.doc.mode=je(e.options,e.doc.modeOption),hi(e)}function hi(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,di(e,100),e.state.modeGen++,e.curOp&&pn(e)}function Ro(e,t){return t.from.ch==0&&t.to.ch==0&&h(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ra(e,t,r,n){function i(st){return r?r[st]:null}function a(st,tt,ft){ua(st,tt,ft,n),en(st,"change",st,t)}function o(st,tt){for(var ft=[],xt=st;xt<tt;++xt)ft.push(new dr(d[xt],i(xt),n));return ft}var s=t.from,u=t.to,d=t.text,x=ht(e,s.line),T=ht(e,u.line),Q=h(d),G=i(d.length-1),Se=u.line-s.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(Ro(e,t)){var Pe=o(0,d.length-1);a(T,T.text,G),Se&&e.remove(s.line,Se),Pe.length&&e.insert(s.line,Pe)}else if(x==T)if(d.length==1)a(x,x.text.slice(0,s.ch)+Q+x.text.slice(u.ch),G);else{var Ge=o(1,d.length-1);Ge.push(new dr(Q+x.text.slice(u.ch),G,n)),a(x,x.text.slice(0,s.ch)+d[0],i(0)),e.insert(s.line+1,Ge)}else if(d.length==1)a(x,x.text.slice(0,s.ch)+d[0]+T.text.slice(u.ch),i(0)),e.remove(s.line+1,Se);else{a(x,x.text.slice(0,s.ch)+d[0],i(0)),a(T,Q+T.text.slice(u.ch),G);var et=o(1,d.length-1);Se>1&&e.remove(s.line+1,Se-1),e.insert(s.line+1,et)}en(e,"change",e,t)}function nr(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var u=i.linked[s];if(u.doc==a)continue;var d=o&&u.sharedHist;if(r&&!d)continue;t(u.doc,d),n(u.doc,i,d)}}n(e,null,!0)}function No(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,wa(e),Da(e),jo(e),e.options.lineWrapping||Pi(e),e.options.mode=t.modeOption,pn(e)}function jo(e){(e.doc.direction=="rtl"?L:be)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){yn(e,function(){jo(e),pn(e)})}function Gi(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 Na(e,t){var r={from:Yn(t.from),to:tr(t),text:nn(e,t.from,t.to)};return Uo(e,r,t.from.line,t.to.line+1),nr(e,function(n){return Uo(n,r,t.from.line,t.to.line+1)},!0),r}function Po(e){for(;e.length;){var t=h(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Po(e.done),h(e.done);if(e.done.length&&!h(e.done).ranges)return h(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),h(e.done)}function Io(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))s=h(o.changes),wt(t.from,t.to)==0&&wt(t.from,s.to)==0?s.to=tr(t):o.changes.push(Na(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Vi(e.sel,i.done),o={changes:[Na(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||we(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,h(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Po(i.undone)}function Vi(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Uo(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Fo(e,t){var r=bl(e,t),n=Sr(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var s=0;s<o.length;++s){for(var u=o[s],d=0;d<a.length;++d)if(a[d].marker==u.marker)continue e;a.push(u)}}else o&&(r[i]=o)}return r}function jr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?Cn.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];n.push({changes:s});for(var u=0;u<o.length;++u){var d=o[u],x=void 0;if(s.push({from:d.from,to:d.to,text:d.text}),t)for(var T in d)(x=T.match(/^spans_(\d+)$/))&&(Y(t,Number(x[1]))>-1&&(h(s)[T]=d[T],delete d[T]))}}return n}function ja(e,t,r,n){if(n){var i=e.anchor;if(r){var a=wt(t,i)<0;a!=wt(r,i)<0?(i=t,t=r):a!=wt(t,r)<0&&(t=r)}return new jt(i,t)}else return new jt(r||t,t)}function $i(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),an(e,new Cn([ja(e.sel.primary(),t,r,i)],0),n)}function zo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=ja(e.sel.ranges[a],t[a],null,i);var o=Rn(e.cm,n,e.sel.primIndex);an(e,o,r)}function Pa(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,an(e,Rn(e.cm,i,e.sel.primIndex),n)}function Wo(e,t,r,n){an(e,er(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new jt(St(e,i[a].anchor),St(e,i[a].head))},origin:r&&r.origin};return we(e,"beforeSelectionChange",e,n),e.cm&&we(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Rn(e.cm,n.ranges,n.ranges.length-1):t}function Ho(e,t,r){var n=e.history.done,i=h(n);i&&i.ranges?(n[n.length-1]=t,Yi(e,t,r)):an(e,t,r)}function an(e,t,r){Yi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Yi(e,t,r){(R(e,"beforeSelectionChange")||e.cm&&R(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(wt(t.primary().head,e.sel.primary().head)<0?-1:1);Bo(e,Xo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Rr(e.cm)}function Bo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,W(e.cm)),en(e,"cursorActivity",e)}function Ko(e){Bo(e,Xo(e,e.sel,null,!1))}function Xo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=Ji(e,o.anchor,s&&s.anchor,r,n),d=Ji(e,o.head,s&&s.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new jt(u,d))}return i?Rn(e.cm,i,t.primIndex):t}function Pr(e,t,r,n,i){var a=ht(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],u=s.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,x="selectRight"in u?!u.selectRight:u.inclusiveRight;if((s.from==null||(d?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(x?s.to>=t.ch:s.to>t.ch))){if(i&&(we(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var T=u.find(n<0?1:-1),Q=void 0;if((n<0?x:d)&&(T=Go(e,T,-n,T&&T.line==t.line?a:null)),T&&T.line==t.line&&(Q=wt(T,r))&&(n<0?Q<0:Q>0))return Pr(e,T,t,n,i)}var G=u.find(n<0?-1:1);return(n<0?d:x)&&(G=Go(e,G,n,G.line==t.line?a:null)),G?Pr(e,G,t,n,i):null}}return t}function Ji(e,t,r,n,i){var a=n||1,o=Pr(e,t,r,a,i)||!i&&Pr(e,t,r,a,!0)||Pr(e,t,r,-a,i)||!i&&Pr(e,t,r,-a,!0);return o||(e.cantEdit=!0,We(e.first,0))}function Go(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?St(e,We(t.line-1)):null:r>0&&t.ch==(n||ht(e,t.line)).text.length?t.line<e.first+e.size-1?We(t.line+1,0):null:new We(t.line,t.ch+r)}function Vo(e){e.setSelection(We(e.firstLine(),0),We(e.lastLine()),xe)}function $o(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,s){i&&(n.from=St(e,i)),a&&(n.to=St(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),we(e,"beforeChange",e,n),e.cm&&we(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 Ir(e,t,r){if(e.cm){if(!e.cm.curOp)return Jt(e.cm,Ir)(e,t,r);if(e.cm.state.suppressEdits)return}if((R(e,"beforeChange")||e.cm&&R(e.cm,"beforeChange"))&&(t=$o(e,t,!0),!t))return;var n=Zr&&!r&&Ri(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Yo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Yo(e,t)}function Yo(e,t){if(t.text.length==1&&t.text[0]==""&&wt(t.from,t.to)==0)return;var r=La(e,t);Io(e,t,r,e.cm?e.cm.curOp.id:NaN),pi(e,t,r,Sr(e,t));var n=[];nr(e,function(i,a){!a&&Y(n,i.history)==-1&&(Qo(i.history,t),n.push(i.history)),pi(i,t,null,Sr(i,t))})}function Zi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,s=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d<s.length&&!(a=s[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==s.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Vi(a,u),r&&!a.equals(e.sel)){an(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var x=[];Vi(o,u),u.push({changes:x,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var T=R(e,"beforeChange")||e.cm&&R(e.cm,"beforeChange"),Q=function(Pe){var Ge=a.changes[Pe];if(Ge.origin=t,T&&!$o(e,Ge,!1))return s.length=0,{};x.push(Na(e,Ge));var et=Pe?La(e,Ge):h(s);pi(e,Ge,et,Fo(e,Ge)),!Pe&&e.cm&&e.cm.scrollIntoView({from:Ge.from,to:tr(Ge)});var st=[];nr(e,function(tt,ft){!ft&&Y(st,tt.history)==-1&&(Qo(tt.history,Ge),st.push(tt.history)),pi(tt,Ge,null,Fo(tt,Ge))})},G=a.changes.length-1;G>=0;--G){var Se=Q(G);if(Se)return Se.v}}function Jo(e,t){if(t==0)return;if(e.first+=t,e.sel=new Cn(C(e.sel.ranges,function(i){return new jt(We(i.anchor.line+t,i.anchor.ch),We(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qn(e.cm,n,"gutter")}}function pi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Jt(e.cm,pi)(e,t,r,n);if(t.to.line<e.first){Jo(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 i=t.text.length-1-(e.first-t.from.line);Jo(e,i),t={from:We(e.first,0),to:We(t.to.line+i,t.to.ch),text:[h(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:We(a,ht(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nn(e,t.from,t.to),r||(r=La(e,t)),e.cm?xl(e.cm,t,n):Ra(e,t,n),Yi(e,r,xe),e.cantEdit&&Ji(e,We(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,s=!1,u=a.line;e.options.lineWrapping||(u=At(wn(ht(n,a.line))),n.iter(u,o.line+1,function(G){if(G==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&W(e),Ra(n,t,r,ho(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(G){var Se=ti(G);Se>i.maxLineLength&&(i.maxLine=G,i.maxLineLength=Se,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),aa(n,a.line),di(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?pn(e):a.line==o.line&&t.text.length==1&&!Ro(e.doc,t)?qn(e,a.line,"text"):pn(e,a.line,o.line+1,d);var x=R(e,"changes"),T=R(e,"change");if(T||x){var Q={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};T&&en(e,"change",e,Q),x&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Q)}e.display.selForContextMenu=null}function Ur(e,t,r,n,i){var a;n||(n=r),wt(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Ir(e,{from:r,to:n,text:t,origin:i})}function Zo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function qo(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var s=0;s<a.ranges.length;s++)Zo(a.ranges[s].anchor,t,r,n),Zo(a.ranges[s].head,t,r,n);continue}for(var u=0;u<a.changes.length;++u){var d=a.changes[u];if(r<d.from.line)d.from=We(d.from.line+n,d.from.ch),d.to=We(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Qo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;qo(e.done,r,n,i),qo(e.undone,r,n,i)}function mi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=ht(e,Er(e,t)):i=At(t),i==null?null:(n(a,i)&&e.cm&&qn(e.cm,i,r),a)}function gi(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}gi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,vt(i),en(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,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,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function vi(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}vi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof gi))){var s=[];this.collapse(s),this.children=[new gi(s)],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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var u=new gi(i.lines.slice(s,s+=25));i.height-=u.height,this.children.splice(++n,0,u),u.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new vi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=Y(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new vi(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var bi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};bi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=At(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=ii(this);Xt(r,Math.max(0,r.height-a)),e&&(yn(e,function(){es(e,r,-a),qn(e,n,"widget")}),en(e,"lineWidgetCleared",e,this,n))},bi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=ii(this)-t;if(!i)return;Pn(this.doc,n)||Xt(n,n.height+i),r&&yn(r,function(){r.curOp.forceUpdate=!0,es(r,n,i),en(r,"lineWidgetChanged",r,e,At(n))})},I(bi);function es(e,t,r){Ln(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ka(e,r)}function wl(e,t,r,n){var i=new bi(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),mi(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(i.insertAt==null?s.push(i):s.splice(Math.min(s.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!Pn(e,o)){var u=Ln(o)<e.scrollTop;Xt(o,o.height+ii(i)),u&&ka(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&en(a,"lineWidgetAdded",a,i,typeof t=="number"?t:At(t)),i}var ts=0,rr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ts};rr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&br(e),R(this,"clear")){var r=this.find();r&&en(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=_n(o.markedSpans,this);e&&!this.collapsed?qn(e,At(o),"text"):e&&(s.to!=null&&(i=At(o)),s.from!=null&&(n=At(o))),o.markedSpans=qr(o.markedSpans,s),s.from==null&&this.collapsed&&!Pn(this.doc,o)&&e&&Xt(o,_r(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=wn(this.lines[u]),x=ti(d);x>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=x,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&pn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ko(e.doc)),e&&en(e,"markerCleared",e,this,n,i),t&&yr(e),this.parent&&this.parent.clear()},rr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var a=this.lines[i],o=_n(a.markedSpans,this);if(o.from!=null&&(r=We(t?a:At(a),o.from),e==-1))return r;if(o.to!=null&&(n=We(t?a:At(a),o.to),e==1))return n}return r&&{from:r,to:n}},rr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;yn(n,function(){var i=t.line,a=At(t.line),o=ha(n,a);if(o&&(io(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Pn(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var u=ii(r)-s;u&&Xt(i,i.height+u)}en(n,"markerChanged",n,e)})},rr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Y(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},rr.prototype.detachLine=function(e){if(this.lines.splice(Y(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},I(rr);function Fr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Jt(e.cm,Fr)(e,t,r,n,i);var a=new rr(e,i),o=wt(t,r);if(n&&l(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=fe("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Ni(e,t.line,t,r,a)||t.line!=r.line&&Ni(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");oa()}a.addToHistory&&Io(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,u=e.cm,d;if(e.iter(s,r.line+1,function(T){u&&a.collapsed&&!u.options.lineWrapping&&wn(T)==u.display.maxLine&&(d=!0),a.collapsed&&s!=t.line&&Xt(T,0),sa(T,new lr(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(T){Pn(e,T)&&Xt(T,0)}),a.clearOnEnter&&ue(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Jn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ts,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)pn(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var x=t.line;x<=r.line;x++)qn(u,x,"text");a.atomic&&Ko(u.doc),en(u,"markerAdded",u,a)}return a}var yi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};yi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();en(this,"clear")},yi.prototype.find=function(e,t){return this.primary.find(e,t)},I(yi);function El(e,t,r,n,i){n=l(n),n.shared=!1;var a=[Fr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return nr(e,function(u){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Fr(u,St(u,t),St(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=h(a)}),new yi(a,o)}function ns(e){return e.findMarks(We(e.first,0),e.clipPos(We(e.lastLine())),function(t){return t.parent})}function Cl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(wt(a,o)){var s=Fr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Sl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];nr(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];Y(a,s.doc)==-1&&(s.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var kl=0,mn=function(e,t,r,n,i){if(!(this instanceof mn))return new mn(e,t,r,n,i);r==null&&(r=0),vi.call(this,[new gi([new dr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=We(r,0);this.sel=er(a),this.history=new Gi(null),this.id=++kl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ra(this,{from:a,to:a,text:e}),an(this,er(a),xe)};mn.prototype=Ce(vi.prototype,{constructor:mn,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Sn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Zt(function(e){var t=We(this.first,0),r=this.first+this.size-1;Ir(this,{from:t,to:We(r,ht(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),an(this,er(t),xe)}),replaceRange:function(e,t,r,n){t=St(this,t),r=r?St(this,r):t,Ur(this,e,t,r,n)},getRange:function(e,t,r){var n=nn(this,St(this,e),St(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(dn(this,e))return ht(this,e)},getLineNumber:function(e){return At(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ht(this,e)),wn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return St(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Zt(function(e,t,r){Wo(this,St(this,typeof e=="number"?We(e,t||0):e),null,r)}),setSelection:Zt(function(e,t,r){Wo(this,St(this,e),St(this,t||e),r)}),extendSelection:Zt(function(e,t,r){$i(this,St(this,e),t&&St(this,t),r)}),extendSelections:Zt(function(e,t){zo(this,Xe(this,e),t)}),extendSelectionsBy:Zt(function(e,t){var r=C(this.sel.ranges,e);zo(this,Xe(this,r),t)}),setSelections:Zt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new jt(St(this,e[i].anchor),St(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),an(this,Rn(this.cm,n,t),r)}),addSelection:Zt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new jt(St(this,e),St(this,t||e))),an(this,Rn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=nn(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=nn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Zt(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var s=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)Ir(this,n[u]);s?Ho(this,s):this.cm&&Rr(this.cm)}),undo:Zt(function(){Zi(this,"undo")}),redo:Zt(function(){Zi(this,"redo")}),undoSelection:Zt(function(){Zi(this,"undo",!0)}),redoSelection:Zt(function(){Zi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Gi(this.history.maxGeneration),nr(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:jr(this.history.done),undone:jr(this.history.undone)}},setHistory:function(e){var t=this.history=new Gi(this.history.maxGeneration);t.done=jr(e.done.slice(0),null,!0),t.undone=jr(e.undone.slice(0),null,!0)},setGutterMarker:Zt(function(e,t,r){return mi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&He(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Zt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&mi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,He(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!dn(this,e))return null;if(t=e,e=ht(this,e),!e)return null}else if(t=At(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:Zt(function(e,t,r){return mi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(ve(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Zt(function(e,t,r){return mi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[i];if(a)if(r==null)n[i]=null;else{var o=a.match(ve(r));if(!o)return!1;var s=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||s==a.length?"":" ")+a.slice(s)||null}else return!1;return!0})}),addLineWidget:Zt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Fr(this,St(this,e),St(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=St(this,e),Fr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=St(this,e);var t=[],r=ht(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=St(this,e),t=St(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var u=o[s];!(u.to!=null&&i==e.line&&e.ch>=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!r||r(u.marker))&&n.push(u.marker.parent||u.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+n;if(a>e)return t=e,!0;e-=a,++r}),St(this,We(r,t))},indexFromPos:function(e){e=St(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new mn(Sn(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,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new mn(Sn(this,t,r),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}],Cl(n,ns(this)),n},unlinkDoc:function(e){if(e instanceof Wt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(ns(this));break}if(e.history==this.history){var n=[e.id];nr(e,function(i){return n.push(i.id)},!0),e.history=new Gi(null),e.history.done=jr(this.history.done,n),e.history.undone=jr(this.history.undone,n)}},iterLinkedDocs:function(e){nr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ge(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Zt(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),mn.prototype.eachLine=mn.prototype.iter;var rs=0;function Ol(e){var t=this;if(is(t),Ke(t,e)||Kn(t.display,e))return;f(e),k&&(rs=+new Date);var r=pr(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,s=function(){++o==i&&Jt(t,function(){r=St(t.doc,r);var G={from:r,to:r,text:t.doc.splitLines(a.filter(function(Se){return Se!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ir(t.doc,G),Ho(t.doc,er(St(t.doc,r),St(t.doc,tr(G))))})()},u=function(G,Se){if(t.options.allowDropFileTypes&&Y(t.options.allowDropFileTypes,G.type)==-1){s();return}var Pe=new FileReader;Pe.onerror=function(){return s()},Pe.onload=function(){var Ge=Pe.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ge)){s();return}a[Se]=Ge,s()},Pe.readAsText(G)},d=0;d<n.length;d++)u(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var x=e.dataTransfer.getData("Text");if(x){var T;if(t.state.draggingText&&!t.state.draggingText.copy&&(T=t.listSelections()),Yi(t.doc,er(r,r)),T)for(var Q=0;Q<T.length;++Q)Ur(t.doc,"",T[Q].anchor,T[Q].head,"drag");t.replaceSelection(x,"around","paste"),t.display.input.focus()}}catch(G){}}}function Ml(e,t){if(k&&(!e.state.draggingText||+new Date-rs<100)){O(t);return}if(Ke(e,t)||Kn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!_e){var r=w("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",j&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),j&&r.parentNode.removeChild(r)}}function Tl(e,t){var r=pr(e,t);if(!r)return;var n=document.createDocumentFragment();go(e,r,n),e.display.dragCursor||(e.display.dragCursor=w("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),pe(e.display.dragCursor,n)}function is(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function as(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var a=0;a<r.length;a++)e(r[a])})}var os=!1;function Al(){if(os)return;_l(),os=!0}function _l(){var e;ue(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,as(Ll)},100))}),ue(window,"blur",function(){return as(Dr)})}function Ll(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ir={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"},xi=0;xi<10;xi++)ir[xi+48]=ir[xi+96]=String(xi);for(var qi=65;qi<=90;qi++)ir[qi]=String.fromCharCode(qi);for(var wi=1;wi<=12;wi++)ir[wi+111]=ir[wi+63235]="F"+wi;var Xn={};Xn.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"},Xn.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"},Xn.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"},Xn.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"]},Xn.default=ie?Xn.macDefault:Xn.pcDefault;function Dl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=C(r.split(" "),Dl),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=n):(s=i.slice(0,a+1).join(" "),o="...");var u=t[s];if(!u)t[s]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var d in t)e[d]=t[d];return e}function zr(e,t,r,n){t=Qi(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return zr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=zr(e,t.fallthrough[a],r,n);if(o)return o}}}function ss(e){var t=typeof e=="string"?e:ir[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ls(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Ue?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Ue?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function us(e,t){if(j&&e.keyCode==34&&e.char)return!1;var r=ir[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ls(r,e,t))}function Qi(e){return typeof e=="string"?Xn[e]:e}function Wr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&wt(a.from,h(n).to)<=0;){var o=n.pop();if(wt(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}yn(e,function(){for(var s=n.length-1;s>=0;s--)Ur(e.doc,"",n[s].from,n[s].to,"+delete");Rr(e)})}function Ia(e,t,r){var n=De(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ua(e,t,r){var n=Ia(e,t.ch,r);return n==null?null:new We(t.line,n,r<0?"after":"before")}function Fa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=nt(r,t.doc.direction);if(a){var o=i<0?h(a):a[0],s=i<0==(o.level==1),u=s?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var x=Ar(t,r);d=i<0?r.text.length-1:0;var T=Un(t,x,d).top;d=at(function(Q){return Un(t,x,Q).top==T},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Ia(r,d,1))}else d=i<0?o.to:o.from;return new We(n,d,u)}}return new We(n,i<0?r.text.length:0,i<0?"before":"after")}function Nl(e,t,r,n){var i=nt(t,e.doc.direction);if(!i)return Ua(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=rt(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return Ua(t,r,n);var s=function(et,st){return Ia(t,et instanceof We?et.ch:et,st)},u,d=function(et){return e.options.lineWrapping?(u=u||Ar(e,t),fo(e,t,u,et)):{begin:0,end:t.text.length}},x=d(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var T=o.level==1==n<0,Q=s(r,T?1:-1);if(Q!=null&&(T?Q<=o.to&&Q<=x.end:Q>=o.from&&Q>=x.begin)){var G=T?"before":"after";return new We(r.line,Q,G)}}var Se=function(et,st,tt){for(var ft=function(Ft,qt){return qt?new We(r.line,s(Ft,1),"before"):new We(r.line,Ft,"after")};et>=0&&et<i.length;et+=st){var xt=i[et],bt=st>0==(xt.level!=1),Mt=bt?tt.begin:s(tt.end,-1);if(xt.from<=Mt&&Mt<xt.to)return ft(Mt,bt);if(Mt=bt?xt.from:s(xt.to,-1),tt.begin<=Mt&&Mt<tt.end)return ft(Mt,bt)}},Pe=Se(a+n,n,x);if(Pe)return Pe;var Ge=n>0?x.end:s(x.begin,-1);return Ge!=null&&!(n>0&&Ge==t.text.length)&&(Pe=Se(n>0?0:i.length-1,n,d(Ge)),Pe)?Pe:null}var Ei={selectAll:Vo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),xe)},killLine:function(e){return Wr(e,function(t){if(t.empty()){var r=ht(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:We(t.head.line+1,0)}:{from:t.head,to:We(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Wr(e,function(t){return{from:We(t.from().line,0),to:St(e.doc,We(t.to().line+1,0))}})},delLineLeft:function(e){return Wr(e,function(t){return{from:We(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Wr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Wr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"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(We(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(We(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return cs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ds(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return jl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},te)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},te)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?ds(e,t.head):n},te)},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=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var a=r[i].from(),o=v(e.getLine(a.line),a.ch,n);t.push($(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return yn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=ht(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new We(i.line,i.ch-1)),i.ch>0)i=new We(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),We(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=ht(e.doc,i.line-1).text;o&&(i=new We(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),We(i.line-1,o.length-1),i,"+transpose"))}}r.push(new jt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return yn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Rr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function cs(e,t){var r=ht(e.doc,t),n=wn(r);return n!=r&&(t=At(n)),Fa(!0,e,n,t,1)}function jl(e,t){var r=ht(e.doc,t),n=ji(r);return n!=r&&(t=At(n)),Fa(!0,e,r,t,-1)}function ds(e,t){var r=cs(e,t.line),n=ht(e.doc,r.line),i=nt(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return We(r.line,o?0:a,r.sticky)}return r}function ea(e,t,r){if(typeof t=="string"&&(t=Ei[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Fe}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function Pl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=zr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&zr(t,e.options.extraKeys,r,e)||zr(t,e.options.keyMap,r,e)}var Il=new N;function Ci(e,t,r,n){var i=e.state.keySeq;if(i){if(ss(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),fs(e,i+" "+t,r,n))return!0}return fs(e,t,r,n)}function fs(e,t,r,n){var i=Pl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&en(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),Ea(e)),!!i}function hs(e,t){var r=us(t,!0);return r?t.shiftKey&&!e.state.keySeq?Ci(e,"Shift-"+r,t,function(n){return ea(e,n,!0)})||Ci(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return ea(e,n)}):Ci(e,r,t,function(n){return ea(e,n)}):!1}function Ul(e,t,r){return Ci(e,"'"+r+"'",t,function(n){return ea(e,n,!0)})}var za=null;function ps(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=le(),Ke(t,e))return;k&&X<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=hs(t,e);j&&(za=n?r:null,!n&&r==88&&!ae&&(ie?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),ce&&!ie&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;L(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(be(t,"CodeMirror-crosshair"),lt(document,"keyup",r),lt(document,"mouseover",r))}ue(document,"keyup",r),ue(document,"mouseover",r)}function ms(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,e)}function gs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Kn(t.display,e)||Ke(t,e)||e.ctrlKey&&!e.altKey||ie&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(j&&r==za){za=null,f(e);return}if(j&&(!e.which||e.which<10)&&hs(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var zl=400,Wa=function(e,t,r){this.time=e,this.pos=t,this.button=r};Wa.prototype.compare=function(e,t,r){return this.time+zl>e&&wt(t,this.pos)==0&&r==this.button};var Si,ki;function Wl(e,t){var r=+new Date;return ki&&ki.compare(r,e,t)?(Si=ki=null,"triple"):Si&&Si.compare(r,e,t)?(ki=new Wa(r,e,t),Si=null,"double"):(Si=new Wa(r,e,t),ki=null,"single")}function vs(e){var t=this,r=t.display;if(Ke(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Kn(r,e)){oe||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Ha(t,e))return;var n=pr(t,e),i=se(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&Hl(t,i,n,a,e))return;i==1?n?Kl(t,n,a,e):U(e)==r.scroller&&f(e):i==2?(n&&$i(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(Ye?t.display.input.onContextMenu(e):bo(t))}function Hl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Ci(e,ls(a,i),i,function(o){if(typeof o=="string"&&(o=Ei[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=Fe}finally{e.state.suppressEdits=!1}return s})}function Bl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=ye?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ie?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ie?r.altKey:r.ctrlKey)),i}function Kl(e,t,r,n){k?setTimeout(c(vo,e),0):e.curOp.focus=le();var i=Bl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&Ne&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(wt((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(wt(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,i):Gl(e,n,t,i)}function Xl(e,t,r,n){var i=e.display,a=!1,o=Jt(e,function(d){oe&&(i.scroller.draggable=!1),e.state.draggingText=!1,lt(i.wrapper.ownerDocument,"mouseup",o),lt(i.wrapper.ownerDocument,"mousemove",s),lt(i.scroller,"dragstart",u),lt(i.scroller,"drop",o),a||(f(d),n.addNew||$i(e.doc,r,null,null,n.extend),oe&&!_e||k&&X==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};oe&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ue(i.wrapper.ownerDocument,"mouseup",o),ue(i.wrapper.ownerDocument,"mousemove",s),ue(i.scroller,"dragstart",u),ue(i.scroller,"drop",o),bo(e),setTimeout(function(){return i.input.focus()},20)}function bs(e,t,r){if(r=="char")return new jt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new jt(We(t.line,0),St(e.doc,We(t.line+1,0)));var n=r(e,t);return new jt(n.from,n.to)}function Gl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,s,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=d[s]:o=new jt(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new jt(r,r)),r=pr(e,t,!0,!0),s=-1;else{var x=bs(e,r,n.unit);n.extend?o=ja(o,x.anchor,x.head,n.extend):o=x}n.addNew?s==-1?(s=d.length,an(a,Rn(e,d.concat([o]),s),{scroll:!1,origin:"*mouse"})):d.length>1&&d[s].empty()&&n.unit=="char"&&!n.extend?(an(a,Rn(e,d.slice(0,s).concat(d.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Pa(a,s,o,de):(s=0,an(a,new Cn([o],0),de),u=a.sel);var T=r;function Q(tt){if(wt(T,tt)==0)return;if(T=tt,n.unit=="rectangle"){for(var ft=[],xt=e.options.tabSize,bt=v(ht(a,r.line).text,r.ch,xt),Mt=v(ht(a,tt.line).text,tt.ch,xt),Ft=Math.min(bt,Mt),qt=Math.max(bt,Mt),Ht=Math.min(r.line,tt.line),xn=Math.min(e.lastLine(),Math.max(r.line,tt.line));Ht<=xn;Ht++){var gn=ht(a,Ht).text,Gt=K(gn,Ft,xt);Ft==qt?ft.push(new jt(We(Ht,Gt),We(Ht,Gt))):gn.length>Gt&&ft.push(new jt(We(Ht,Gt),We(Ht,K(gn,qt,xt))))}ft.length||ft.push(new jt(r,r)),an(a,Rn(e,u.ranges.slice(0,s).concat(ft),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(tt)}else{var vn=o,tn=bs(e,tt,n.unit),Yt=vn.anchor,Vt;wt(tn.anchor,Yt)>0?(Vt=tn.head,Yt=or(vn.from(),tn.anchor)):(Vt=tn.anchor,Yt=jn(vn.to(),tn.head));var Bt=u.ranges.slice(0);Bt[s]=Vl(e,new jt(St(a,Yt),Vt)),an(a,Rn(e,Bt,s),de)}}var G=i.wrapper.getBoundingClientRect(),Se=0;function Pe(tt){var ft=++Se,xt=pr(e,tt,!0,n.unit=="rectangle");if(!xt)return;if(wt(xt,T)!=0){e.curOp.focus=le(),Q(xt);var bt=Hi(i,a);(xt.line>=bt.to||xt.line<bt.from)&&setTimeout(Jt(e,function(){Se==ft&&Pe(tt)}),150)}else{var Mt=tt.clientY<G.top?-20:tt.clientY>G.bottom?20:0;Mt&&setTimeout(Jt(e,function(){if(Se!=ft)return;i.scroller.scrollTop+=Mt,Pe(tt)}),50)}}function Ge(tt){e.state.selectingText=!1,Se=Infinity,tt&&(f(tt),i.input.focus()),lt(i.wrapper.ownerDocument,"mousemove",et),lt(i.wrapper.ownerDocument,"mouseup",st),a.history.lastSelOrigin=null}var et=Jt(e,function(tt){tt.buttons===0||!se(tt)?Ge(tt):Pe(tt)}),st=Jt(e,Ge);e.state.selectingText=st,ue(i.wrapper.ownerDocument,"mousemove",et),ue(i.wrapper.ownerDocument,"mouseup",st)}function Vl(e,t){var r=t.anchor,n=t.head,i=ht(e.doc,r.line);if(wt(r,n)==0&&r.sticky==n.sticky)return t;var a=nt(i);if(!a)return t;var o=rt(a,r.ch,r.sticky),s=a[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var u=o+(s.from==r.ch==(s.level!=1)?0:1);if(u==0||u==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var x=rt(a,n.ch,n.sticky),T=x-o||(n.ch-r.ch)*(s.level==1?-1:1);x==u-1||x==u?d=T<0:d=T>0}var Q=a[u+(d?-1:0)],G=d==(Q.level==1),Se=G?Q.from:Q.to,Pe=G?"after":"before";return r.ch==Se&&r.sticky==Pe?t:new jt(new We(r.line,Se,Pe),n)}function ys(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(Q){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!R(e,r))return b(t);a-=s.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var d=o.gutters.childNodes[u];if(d&&d.getBoundingClientRect().right>=i){var x=sn(e.doc,a),T=e.display.gutterSpecs[u];return we(e,r,e,x,T.className,t),b(t)}}}function Ha(e,t){return ys(e,t,"gutterClick",!0)}function xs(e,t){if(Kn(e.display,t)||$l(e,t))return;if(Ke(e,t,"contextmenu"))return;Ye||e.display.input.onContextMenu(t)}function $l(e,t){return R(e,"gutterContextMenu")?ys(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-"),ai(e)}var Hr={toString:function(){return"CodeMirror.Init"}},Es={},ta={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(s,u,d){d!=Hr&&a(s,u,d)}:a)}e.defineOption=r,e.Init=Hr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Da(n)},!0),r("indentUnit",2,Da,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){hi(n),ai(n),pn(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(u){for(var d=0;;){var x=u.text.indexOf(i,d);if(x==-1)break;d=x+i.length,a.push(We(o,x))}o++});for(var s=a.length-1;s>=0;s--)Ur(n.doc,i,a[s],We(a[s].line,a[s].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Hr&&n.refresh()}),r("specialCharPlaceholder",Ut,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",re?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Ve),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ws(n),fi(n)},!0),r("keyMap","default",function(n,i,a){var o=Qi(i),s=a!=Hr&&Qi(a);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=_a(i,n.options.lineNumbers),fi(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?xa(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Nr(n)},!0),r("scrollbarStyle","native",function(n){So(n),Nr(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=_a(n.options.gutters,i),fi(n)},!0),r("firstLineNumber",1,fi,!0),r("lineNumberFormatter",function(n){return n},fi,!0),r("showCursorWhenSelecting",!1,oi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Dr(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,oi,!0),r("singleCursorHeightPerLine",!0,oi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,hi,!0),r("addModeClass",!1,hi,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,hi,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Jl(e,t,r){var n=r&&r!=Hr;if(!t!=!n){var i=e.display.dragFunctions,a=t?ue:lt;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Zl(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(be(e.display.wrapper,"CodeMirror-wrap"),Pi(e)),wa(e),pn(e),ai(e),setTimeout(function(){return Nr(e)},100)}function Wt(e,t){var r=this;if(!(this instanceof Wt))return new Wt(e,t);this.options=t=t?l(t):{},l(Es,t,!1);var n=t.value;typeof n=="string"?n=new mn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Wt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ws(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),So(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 N,keySeq:null,specialChars:null},t.autofocus&&!re&&a.input.focus(),k&&X<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Al(),br(this),this.curOp.forceUpdate=!0,No(this,n),t.autofocus&&!re||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ca(r)},20):Dr(this);for(var o in ta)ta.hasOwnProperty(o)&&ta[o](this,t[o],Hr);Mo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Ba.length;++s)Ba[s](this);yr(this),oe&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Wt.defaults=Es,Wt.optionHandlers=ta;function ql(e){var t=e.display;ue(t.scroller,"mousedown",Jt(e,vs)),k&&X<11?ue(t.scroller,"dblclick",Jt(e,function(u){if(Ke(e,u))return;var d=pr(e,u);if(!d||Ha(e,u)||Kn(e.display,u))return;f(u);var x=e.findWordAt(d);$i(e.doc,x.anchor,x.head)})):ue(t.scroller,"dblclick",function(u){return Ke(e,u)||f(u)}),ue(t.scroller,"contextmenu",function(u){return xs(e,u)}),ue(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||xs(e,u)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(u){if(u.touches.length!=1)return!1;var d=u.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(u,d){if(d.left==null)return!0;var x=d.left-u.left,T=d.top-u.top;return x*x+T*T>20*20}ue(t.scroller,"touchstart",function(u){if(!Ke(e,u)&&!a(u)&&!Ha(e,u)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),ue(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ue(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Kn(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var x=e.coordsChar(t.activeTouch,"page"),T;!d.prev||o(d,d.prev)?T=new jt(x,x):!d.prev.prev||o(d,d.prev.prev)?T=e.findWordAt(x):T=new jt(We(x.line,0),St(e.doc,We(x.line+1,0))),e.setSelection(T.anchor,T.head),e.focus(),f(u)}i()}),ue(t.scroller,"touchcancel",i),ue(t.scroller,"scroll",function(){t.scroller.clientHeight&&(li(e,t.scroller.scrollTop),gr(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))}),ue(t.scroller,"mousewheel",function(u){return _o(e,u)}),ue(t.scroller,"DOMMouseScroll",function(u){return _o(e,u)}),ue(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Ke(e,u)||O(u)},over:function(u){Ke(e,u)||(Tl(e,u),O(u))},start:function(u){return Ml(e,u)},drop:Jt(e,Ol),leave:function(u){Ke(e,u)||is(e)}};var s=t.input.getField();ue(s,"keyup",function(u){return ms.call(e,u)}),ue(s,"keydown",Jt(e,ps)),ue(s,"keypress",Jt(e,gs)),ue(s,"focus",function(u){return Ca(e,u)}),ue(s,"blur",function(u){return Dr(e,u)})}var Ba=[];Wt.defineInitHook=function(e){return Ba.push(e)};function Oi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=Mn(e,t).state:r="prev");var o=e.options.tabSize,s=ht(i,t),u=v(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var d=s.text.match(/^\s*/)[0],x;if(!n&&!/\S/.test(s.text))x=0,r="not";else if(r=="smart"&&(x=i.mode.indent(a,s.text.slice(d.length),s.text),x==Fe||x>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?x=v(ht(i,t-1).text,null,o):x=0:r=="add"?x=u+e.options.indentUnit:r=="subtract"?x=u-e.options.indentUnit:typeof r=="number"&&(x=u+r),x=Math.max(0,x);var T="",Q=0;if(e.options.indentWithTabs)for(var G=Math.floor(x/o);G;--G)Q+=o,T+=" ";if(Q<x&&(T+=$(x-Q)),T!=d)return Ur(i,T,We(t,0),We(t,d.length),"+input"),s.stateAfter=null,!0;for(var Se=0;Se<i.sel.ranges.length;Se++){var Pe=i.sel.ranges[Se];if(Pe.head.line==t&&Pe.head.ch<d.length){var Ge=We(t,d.length);Pa(i,Se,new jt(Ge,Ge));break}}}var Nn=null;function na(e){Nn=e}function Ka(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,s=i=="paste"||e.state.pasteIncoming>o,u=ge(t),d=null;if(s&&n.ranges.length>1)if(Nn&&Nn.text.join(`
|
|
`)==t){if(n.ranges.length%Nn.text.length==0){d=[];for(var x=0;x<Nn.text.length;x++)d.push(a.splitLines(Nn.text[x]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=C(u,function(et){return[et]}));for(var T=e.curOp.updateInput,Q=n.ranges.length-1;Q>=0;Q--){var G=n.ranges[Q],Se=G.from(),Pe=G.to();G.empty()&&(r&&r>0?Se=We(Se.line,Se.ch-r):e.state.overwrite&&!s?Pe=We(Pe.line,Math.min(ht(a,Pe.line).text.length,Pe.ch+h(u).length)):s&&Nn&&Nn.lineWise&&Nn.text.join(`
|
|
`)==u.join(`
|
|
`)&&(Se=Pe=We(Se.line,0)));var Ge={from:Se,to:Pe,text:d?d[Q%d.length]:u,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Ir(e.doc,Ge),en(e,"inputRead",e,Ge)}t&&!s&&Ss(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=T),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Cs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&yn(t,function(){return Ka(t,r,0,null,"paste")}),!0}function Ss(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Oi(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(ht(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Oi(e,i.head.line,"smart")));o&&en(e,"electricInput",e,i.head.line)}}function ks(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:We(i,0),head:We(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function Os(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Ms(){var e=w("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=w("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return oe?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),Os(e),t}function Ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Jt(this,t[n])(this,i,o),we(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Qi(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==n||i[a].name==n)return i.splice(a,1),!0},addOverlay:un(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");g(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,pn(this)}),removeOverlay:un(function(n){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==n||typeof n=="string"&&o.name==n){i.splice(a,1),this.state.modeGen++,pn(this);return}}}),indentLine:un(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),dn(this.doc,n)&&Oi(this,n,i,a)}),indentSelection:un(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var s=i[o];if(s.empty())s.head.line>a&&(Oi(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&Rr(this));else{var u=s.from(),d=s.to(),x=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var T=x;T<a;++T)Oi(this,T,n);var Q=this.doc.sel.ranges;u.ch==0&&i.length==Q.length&&Q[o].from().ch>0&&Pa(this.doc,o,new jt(u,Q[o].to()),xe)}}}),getTokenAt:function(n,i){return Ti(this,n,i)},getLineTokens:function(n,i){return Ti(this,We(n),i,!0)},getTokenTypeAt:function(n){n=St(this.doc,n);var i=sr(this,ht(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,u;if(s==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=s)o=d;else if(i[d*2+1]<s)a=d+1;else{u=i[d*2+2];break}}var x=u?u.indexOf("overlay "):-1;return x<0?u:x==0?null:u.slice(0,x-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],s=this.getModeAt(n);if(typeof s[i]=="string")o[s[i]]&&a.push(o[s[i]]);else if(s[i])for(var u=0;u<s[i].length;u++){var d=o[s[i][u]];d&&a.push(d)}else s.helperType&&o[s.helperType]?a.push(o[s.helperType]):o[s.name]&&a.push(o[s.name]);for(var x=0;x<o._global.length;x++){var T=o._global[x];T.pred(s,this)&&Y(a,T.val)==-1&&a.push(T.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Er(a,n==null?a.first+a.size-1:n),Mn(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=St(this.doc,n):a=n?o.from():o.to(),Dn(this,a,i||"page")},charCoords:function(n,i){return ma(this,St(this.doc,n),i||"page")},coordsChar:function(n,i){return n=lo(this,n,i||"page"),va(this,n.left,n.top)},lineAtHeight:function(n,i){return n=lo(this,{top:n,left:0},i||"page").top,sn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,s;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),s=ht(this.doc,n)}else s=n;return Ui(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Ln(s):0)},defaultTextHeight:function(){return _r(this.display)},defaultCharWidth:function(){return Lr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,s){var u=this.display;n=Dn(this,St(this.doc,n));var d=n.bottom,x=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var T=Math.max(u.wrapper.clientHeight,this.doc.height),Q=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>T)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=T&&(d=n.bottom),x+i.offsetWidth>Q&&(x=Q-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",s=="right"?(x=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?x=0:s=="middle"&&(x=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=x+"px"),a&&Js(this,{left:x,top:d,right:x+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:un(ps),triggerOnKeyPress:un(gs),triggerOnKeyUp:ms,triggerOnMouseDown:un(vs),execCommand:function(n){if(Ei.hasOwnProperty(n))return Ei[n].call(null,this)},triggerElectric:un(function(n){Ss(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var u=St(this.doc,n),d=0;d<i&&!(u=Xa(this.doc,u,s,a,o),u.hitSide);++d);return u},moveH:un(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Xa(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},te)}),deleteH:un(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Wr(this,function(s){var u=Xa(o,s.head,n,i,!1);return n<0?{from:u,to:s.head}:{from:s.head,to:u}})}),findPosV:function(n,i,a,o){var s=1,u=o;i<0&&(s=-1,i=-i);for(var d=St(this.doc,n),x=0;x<i;++x){var T=Dn(this,d,"div");if(u==null?u=T.left:T.left=u,d=Ts(this,T,s,a),d.hitSide)break}return d},moveV:un(function(n,i){var a=this,o=this.doc,s=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(x){if(u)return n<0?x.from():x.to();var T=Dn(a,x.head,"div");x.goalColumn!=null&&(T.left=x.goalColumn),s.push(T.left);var Q=Ts(a,T,n,i);return i=="page"&&x==o.sel.primary()&&ka(a,ma(a,Q,"div").top-T.top),Q},te),s.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=s[d]}),findWordAt:function(n){var i=this.doc,a=ht(i,n.line).text,o=n.ch,s=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||s==a.length)&&o?--o:++s;for(var d=a.charAt(o),x=Te(d,u)?function(T){return Te(T,u)}:/\s/.test(d)?function(T){return/\s/.test(T)}:function(T){return!/\s/.test(T)&&!Te(T)};o>0&&x(a.charAt(o-1));)--o;for(;s<a.length&&x(a.charAt(s));)++s}return new jt(We(n.line,o),We(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):be(this.display.cursorDiv,"CodeMirror-overwrite"),we(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==le()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:un(function(n,i){si(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-In(this)-this.display.barHeight,width:n.scrollWidth-In(this)-this.display.barWidth,clientHeight:fa(this),clientWidth:fr(this)}},scrollIntoView:un(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:We(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Zs(this,n):xo(this,n.from,n.to,n.margin)}),setSize:un(function(n,i){var a=this,o=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&ao(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){qn(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,we(this,"refresh",this)}),operation:function(n){return yn(this,n)},startOperation:function(){return br(this)},endOperation:function(){return yr(this)},refresh:un(function(){var n=this.display.cachedTextHeight;pn(this),this.curOp.forceUpdate=!0,ai(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),Ta(this.display),(n==null||Math.abs(n-_r(this.display))>.5||this.options.lineWrapping)&&wa(this),we(this,"refresh",this)}),swapDoc:un(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),No(this,n),ai(this),this.display.input.reset(),si(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,en(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[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}},I(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function Xa(e,t,r,n,i){var a=t,o=r,s=ht(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var st=t.line+u;return st<e.first||st>=e.first+e.size?!1:(t=new We(st,t.ch,t.sticky),s=ht(e,st))}function x(st){var tt;if(n=="codepoint"){var ft=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(ft)?tt=null:tt=new We(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(ft>=55296&&ft<56320?2:1))),-r)}else i?tt=Nl(e.cm,s,t,r):tt=Ua(s,t,r);if(tt==null)if(!st&&d())t=Fa(i,e.cm,s,t.line,u);else return!1;else t=tt;return!0}if(n=="char"||n=="codepoint")x();else if(n=="column")x(!0);else if(n=="word"||n=="group")for(var T=null,Q=n=="group",G=e.cm&&e.cm.getHelper(t,"wordChars"),Se=!0;!(r<0&&!x(!Se));Se=!1){var Pe=s.text.charAt(t.ch)||`
|
|
`,Ge=Te(Pe,G)?"w":Q&&Pe==`
|
|
`?"n":!Q||/\s/.test(Pe)?null:"p";if(Q&&!Se&&!Ge&&(Ge="s"),T&&T!=Ge){r<0&&(r=1,x(),t.sticky="after");break}if(Ge&&(T=Ge),r>0&&!x(!Se))break}var et=Ji(e,t,a,o,!0);return $n(a,et)&&(et.hitSide=!0),et}function Ts(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*_r(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=va(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var It=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new N,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};It.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;Os(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(s){for(var u=s.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}ue(i,"paste",function(s){if(!a(s)||Ke(n,s)||Cs(s,n))return;X<=11&&setTimeout(Jt(n,function(){return t.updateFromDOM()}),20)}),ue(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),ue(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),ue(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ue(i,"touchstart",function(){return r.forceCompositionEnd()}),ue(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||Ke(n,s))return;if(n.somethingSelected())na({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=ks(n);na({lineWise:!0,text:u.text}),s.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,xe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var d=Nn.text.join(`
|
|
`);if(s.clipboardData.setData("Text",d),s.clipboardData.getData("Text")==d){s.preventDefault();return}}var x=Ms(),T=x.firstChild;n.display.lineSpace.insertBefore(x,n.display.lineSpace.firstChild),T.value=Nn.text.join(`
|
|
`);var Q=document.activeElement;_(T),setTimeout(function(){n.display.lineSpace.removeChild(x),Q.focus(),Q==i&&r.showPrimarySelection()},50)}ue(i,"copy",o),ue(i,"cut",o)},It.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},It.prototype.prepareSelection=function(){var e=mo(this.cm,!1);return e.focus=document.activeElement==this.div,e},It.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},It.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},It.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=ra(t,e.anchorNode,e.anchorOffset),o=ra(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&wt(or(a,o),n)==0&&wt(jn(a,o),i)==0)return;var s=t.display.view,u=n.line>=t.display.viewFrom&&As(t,n)||{node:s[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&As(t,i);if(!d){var x=s[s.length-1].measure,T=x.maps?x.maps[x.maps.length-1]:x.map;d={node:T[T.length-1],offset:T[T.length-2]-T[T.length-3]}}if(!u||!d){e.removeAllRanges();return}var Q=e.rangeCount&&e.getRangeAt(0),G;try{G=Z(u.node,u.offset,d.offset,d.node)}catch(Se){}G&&(!ce&&t.state.focused?(e.collapse(u.node,u.offset),G.collapsed||(e.removeAllRanges(),e.addRange(G))):(e.removeAllRanges(),e.addRange(G)),Q&&e.anchorNode==null?e.addRange(Q):ce&&this.startGracePeriod()),this.rememberSelection()},It.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)},It.prototype.showMultipleSelections=function(e){pe(this.cm.display.cursorDiv,e.cursors),pe(this.cm.display.selectionDiv,e.selection)},It.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},It.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},It.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},It.prototype.blur=function(){this.div.blur()},It.prototype.getField=function(){return this.div},It.prototype.supportsTouch=function(){return!0},It.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():yn(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)},It.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},It.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(A&&z&&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 r=ra(t,e.anchorNode,e.anchorOffset),n=ra(t,e.focusNode,e.focusOffset);r&&n&&yn(t,function(){an(t.doc,er(r,n),xe),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},It.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=We(n.line-1,ht(e.doc,n.line-1).length)),i.ch==ht(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=We(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=mr(e,n.line))==0?(o=At(t.view[0].line),s=t.view[0].node):(o=At(t.view[a].line),s=t.view[a-1].node.nextSibling);var u=mr(e,i.line),d,x;if(u==t.view.length-1?(d=t.viewTo-1,x=t.lineDiv.lastChild):(d=At(t.view[u+1].line)-1,x=t.view[u+1].node.previousSibling),!s)return!1;for(var T=e.doc.splitLines(tu(e,s,x,o,d)),Q=nn(e.doc,We(o,0),We(d,ht(e.doc,d).text.length));T.length>1&&Q.length>1;)if(h(T)==h(Q))T.pop(),Q.pop(),d--;else if(T[0]==Q[0])T.shift(),Q.shift(),o++;else break;for(var G=0,Se=0,Pe=T[0],Ge=Q[0],et=Math.min(Pe.length,Ge.length);G<et&&Pe.charCodeAt(G)==Ge.charCodeAt(G);)++G;for(var st=h(T),tt=h(Q),ft=Math.min(st.length-(T.length==1?G:0),tt.length-(Q.length==1?G:0));Se<ft&&st.charCodeAt(st.length-Se-1)==tt.charCodeAt(tt.length-Se-1);)++Se;if(T.length==1&&Q.length==1&&o==n.line)for(;G&&G>n.ch&&st.charCodeAt(st.length-Se-1)==tt.charCodeAt(tt.length-Se-1);)G--,Se++;T[T.length-1]=st.slice(0,st.length-Se).replace(/^\u200b+/,""),T[0]=T[0].slice(G).replace(/\u200b+$/,"");var xt=We(o,G),bt=We(d,Q.length?h(Q).length-Se:0);if(T.length>1||T[0]||wt(xt,bt))return Ur(e.doc,T,xt,bt,"+input"),!0},It.prototype.ensurePolled=function(){this.forceCompositionEnd()},It.prototype.reset=function(){this.forceCompositionEnd()},It.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},It.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)},It.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&yn(this.cm,function(){return pn(e.cm)})},It.prototype.setUneditable=function(e){e.contentEditable="false"},It.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Jt(this.cm,Ka)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},It.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},It.prototype.onContextMenu=function(){},It.prototype.resetPosition=function(){},It.prototype.needsContentAttribute=!0;function As(e,t){var r=ha(e,t.line);if(!r||r.hidden)return null;var n=ht(e.doc,t.line),i=eo(r,n,t.line),a=nt(n,e.doc.direction),o="left";if(a){var s=rt(a,t.ch);o=s%2?"right":"left"}var u=ro(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Br(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,s=e.doc.lineSeparator(),u=!1;function d(G){return function(Se){return Se.id==G}}function x(){o&&(a+=s,u&&(a+=s),o=u=!1)}function T(G){G&&(x(),a+=G)}function Q(G){if(G.nodeType==1){var Se=G.getAttribute("cm-text");if(Se){T(Se);return}var Pe=G.getAttribute("cm-marker"),Ge;if(Pe){var et=e.findMarks(We(n,0),We(i+1,0),d(+Pe));et.length&&(Ge=et[0].find(0))&&T(nn(e.doc,Ge.from,Ge.to).join(s));return}if(G.getAttribute("contenteditable")=="false")return;var st=/^(pre|div|p|li|table|br)$/i.test(G.nodeName);if(!/^br$/i.test(G.nodeName)&&G.textContent.length==0)return;st&&x();for(var tt=0;tt<G.childNodes.length;tt++)Q(G.childNodes[tt]);/^(pre|p)$/i.test(G.nodeName)&&(u=!0),st&&(o=!0)}else G.nodeType==3&&T(G.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Q(t),t==r);)t=t.nextSibling,u=!1;return a}function ra(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Br(e.clipPos(We(e.display.viewTo-1)),!0);t=null,r=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 i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return nu(a,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!M(n,t))return Br(We(At(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?h(e.rest):e.line;return Br(We(At(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var u=e.measure,d=u.maps;function x(Ge,et,st){for(var tt=-1;tt<(d?d.length:0);tt++)for(var ft=tt<0?u.map:d[tt],xt=0;xt<ft.length;xt+=3){var bt=ft[xt+2];if(bt==Ge||bt==et){var Mt=At(tt<0?e.line:e.rest[tt]),Ft=ft[xt]+st;return(st<0||bt!=Ge)&&(Ft=ft[xt+(st?1:0)]),We(Mt,Ft)}}}var T=x(o,s,r);if(T)return Br(T,i);for(var Q=s.nextSibling,G=o?o.nodeValue.length-r:0;Q;Q=Q.nextSibling){if(T=x(Q,Q.firstChild,0),T)return Br(We(T.line,T.ch-G),i);G+=Q.textContent.length}for(var Se=s.previousSibling,Pe=r;Se;Se=Se.previousSibling){if(T=x(Se,Se.firstChild,-1),T)return Br(We(T.line,T.ch+Pe),i);Pe+=Se.textContent.length}}var Kt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new N,this.hasSelection=!1,this.composing=null};Kt.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),E&&(i.style.width="0px"),ue(i,"input",function(){k&&X>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),ue(i,"paste",function(o){if(Ke(n,o)||Cs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Ke(n,o))return;if(n.somethingSelected())na({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=ks(n);na({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,xe):(r.prevInput="",i.value=s.text.join(`
|
|
`),_(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}ue(i,"cut",a),ue(i,"copy",a),ue(e.scroller,"paste",function(o){if(Kn(e,o)||Ke(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),ue(e.lineSpace,"selectstart",function(o){Kn(e,o)||f(o)}),ue(i,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),ue(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Kt.prototype.createField=function(e){this.wrapper=Ms(),this.textarea=this.wrapper.firstChild},Kt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Kt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=mo(e);if(e.options.moveInputWithCursor){var i=Dn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Kt.prototype.showSelection=function(e){var t=this.cm,r=t.display;pe(r.cursorDiv,e.cursors),pe(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Kt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&_(this.textarea),k&&X>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",k&&X>=9&&(this.hasSelection=null))},Kt.prototype.getField=function(){return this.textarea},Kt.prototype.supportsTouch=function(){return!1},Kt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!re||le()!=this.textarea))try{this.textarea.focus()}catch(e){}},Kt.prototype.blur=function(){this.textarea.blur()},Kt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Kt.prototype.receivedFocus=function(){this.slowPoll()},Kt.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()})},Kt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Kt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ee(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(k&&X>=9&&this.hasSelection===i||ie&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,i.length);o<s&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return yn(t,function(){Ka(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Kt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Kt.prototype.onKeyPress=function(){k&&X>=9&&(this.hasSelection=null),this.fastPoll()},Kt.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=pr(r,e),o=n.scroller.scrollTop;if(!a||j)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Jt(r,an)(r.doc,er(a),xe);var u=i.style.cssText,d=t.wrapper.style.cssText,x=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-x.top-5)+"px; left: "+(e.clientX-x.left-5)+`px;
|
|
z-index: 1000; background: `+(k?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var T;oe&&(T=window.scrollY),n.input.focus(),oe&&window.scrollTo(null,T),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=G,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function Q(){if(i.selectionStart!=null){var Pe=r.somethingSelected(),Ge="\u200B"+(Pe?i.value:"");i.value="\u21DA",i.value=Ge,t.prevInput=Pe?"":"\u200B",i.selectionStart=1,i.selectionEnd=Ge.length,n.selForContextMenu=r.doc.sel}}function G(){if(t.contextMenuPending!=G)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,k&&X<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!k||k&&X<9)&&Q();var Pe=0,Ge=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Jt(r,Vo)(r):Pe++<10?n.detectingSelectAll=setTimeout(Ge,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ge,200)}}if(k&&X>=9&&Q(),Ye){O(e);var Se=function(){lt(window,"mouseup",Se),setTimeout(G,20)};ue(window,"mouseup",Se)}else setTimeout(G,50)},Kt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Kt.prototype.setUneditable=function(){},Kt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?l(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 r=le();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(ue(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch(u){}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(lt(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Wt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return s}function iu(e){e.off=lt,e.on=ue,e.wheelEventPixels=dl,e.Doc=mn,e.splitLines=ge,e.countColumn=v,e.findColumn=K,e.isWordChar=me,e.Pass=Fe,e.signal=we,e.Line=dr,e.changeEnd=tr,e.scrollbarModel=Co,e.Pos=We,e.cmpPos=wt,e.modes=he,e.mimeModes=B,e.resolveMode=ke,e.getMode=je,e.modeExtensions=it,e.extendMode=Ot,e.copyState=Et,e.startState=zt,e.innerMode=Rt,e.commands=Ei,e.keyMap=Xn,e.keyName=us,e.isModifierKey=ss,e.lookupKey=zr,e.normalizeKeyMap=Rl,e.StringStream=Pt,e.SharedTextMarker=yi,e.TextMarker=rr,e.LineWidget=bi,e.e_preventDefault=f,e.e_stopPropagation=m,e.e_stop=O,e.addClass=L,e.contains=M,e.rmClass=be,e.keyNames=ir}Yl(Wt),Ql(Wt);var au="iter insert remove copy getEditor constructor".split(" ");for(var ia in mn.prototype)mn.prototype.hasOwnProperty(ia)&&Y(au,ia)<0&&(Wt.prototype[ia]=function(e){return function(){return e.apply(this.doc,arguments)}}(mn.prototype[ia]));return I(mn),Wt.inputStyles={textarea:Kt,contenteditable:It},Wt.defineMode=function(e){!Wt.defaults.mode&&e!="null"&&(Wt.defaults.mode=e),Ze.apply(this,arguments)},Wt.defineMIME=qe,Wt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Wt.defineMIME("text/plain","null"),Wt.defineExtension=function(e,t){Wt.prototype[e]=t},Wt.defineDocExtension=function(e,t){mn.prototype[e]=t},Wt.fromTextArea=ru,iu(Wt),Wt.version="5.58.2",Wt})},Y1PL:function(kt,dt,y){"use strict";var F=y("wx14"),Oe=y("1OyB"),ce=y("vuIU"),Re=y("Ji7U"),Ae=y("LK+K"),ee=y("cDcd"),k=y("VTBJ"),X=y("rePB"),oe=y("Zm9Q"),V=y("Kwbf"),z=y("c+Xe"),j=y("m+aA"),_e=y("bdgK"),J=new Map;function H(xe){xe.forEach(function(de){var te,K=de.target;(te=J.get(K))===null||te===void 0||te.forEach(function(D){return D(K)})})}var E=new _e.default(H),A=null,re=null;function ie(xe,de){J.has(xe)||(J.set(xe,new Set),E.observe(xe)),J.get(xe).add(de)}function ye(xe,de){J.has(xe)&&(J.get(xe).delete(de),J.get(xe).size||(E.unobserve(xe),J.delete(xe)))}var Ve=function(xe){Object(Re.a)(te,xe);var de=Object(Ae.a)(te);function te(){return Object(Oe.a)(this,te),de.apply(this,arguments)}return Object(ce.a)(te,[{key:"render",value:function(){return this.props.children}}]),te}(ee.Component),Be=ee.createContext(null);function Ue(xe){var de=xe.children,te=xe.onBatchResize,K=ee.useRef(0),D=ee.useRef([]),$=ee.useContext(Be),h=ee.useCallback(function(C,g,q){K.current+=1;var Ce=K.current;D.current.push({size:C,element:g,data:q}),Promise.resolve().then(function(){Ce===K.current&&(te==null||te(D.current),D.current=[])}),$==null||$(C,g,q)},[te,$]);return ee.createElement(Be.Provider,{value:h},de)}function Ye(xe){var de=xe.children,te=xe.disabled,K=ee.useRef(null),D=ee.useRef(null),$=ee.useContext(Be),h=ee.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),C=ee.isValidElement(de)&&Object(z.c)(de),g=C?de.ref:null,q=ee.useMemo(function(){return Object(z.a)(g,K)},[g,K]),Ce=ee.useRef(xe);Ce.current=xe;var ne=ee.useCallback(function(me){var Te=Ce.current,He=Te.onResize,ze=Te.data,Le=me.getBoundingClientRect(),De=Le.width,at=Le.height,ut=me.offsetWidth,ot=me.offsetHeight,rt=Math.floor(De),mt=Math.floor(at);if(h.current.width!==rt||h.current.height!==mt||h.current.offsetWidth!==ut||h.current.offsetHeight!==ot){var nt={width:rt,height:mt,offsetWidth:ut,offsetHeight:ot};h.current=nt;var $e=ut===Math.round(De)?De:ut,ue=ot===Math.round(at)?at:ot,ct=Object(k.a)(Object(k.a)({},nt),{},{offsetWidth:$e,offsetHeight:ue});$==null||$(ct,me,ze),He&&Promise.resolve().then(function(){He(ct,me)})}},[]);return ee.useEffect(function(){var me=Object(j.a)(K.current)||Object(j.a)(D.current);return me&&!te&&ie(me,ne),function(){return ye(me,ne)}},[K.current,te]),ee.createElement(Ve,{ref:D},C?ee.cloneElement(de,{ref:q}):de)}var ve="rc-observer-key";function be(xe){var de=xe.children,te=Object(oe.a)(de);return te.map(function(K,D){var $=(K==null?void 0:K.key)||"".concat(ve,"-").concat(D);return ee.createElement(Ye,Object(F.a)({},xe,{key:$}),K)})}be.Collection=Ue;var Ie=be,pe=y("bT9E"),w=y("TSYQ"),fe=y.n(w),Z=`
|
|
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
|
|
`,M=["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"],le={},L;function P(xe){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,te=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(de&&le[te])return le[te];var K=window.getComputedStyle(xe),D=K.getPropertyValue("box-sizing")||K.getPropertyValue("-moz-box-sizing")||K.getPropertyValue("-webkit-box-sizing"),$=parseFloat(K.getPropertyValue("padding-bottom"))+parseFloat(K.getPropertyValue("padding-top")),h=parseFloat(K.getPropertyValue("border-bottom-width"))+parseFloat(K.getPropertyValue("border-top-width")),C=M.map(function(q){return"".concat(q,":").concat(K.getPropertyValue(q))}).join(";"),g={sizingStyle:C,paddingSize:$,borderSize:h,boxSizing:D};return de&&te&&(le[te]=g),g}function _(xe){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;L||(L=document.createElement("textarea"),L.setAttribute("tab-index","-1"),L.setAttribute("aria-hidden","true"),document.body.appendChild(L)),xe.getAttribute("wrap")?L.setAttribute("wrap",xe.getAttribute("wrap")):L.removeAttribute("wrap");var D=P(xe,de),$=D.paddingSize,h=D.borderSize,C=D.boxSizing,g=D.sizingStyle;L.setAttribute("style","".concat(g,";").concat(Z)),L.value=xe.value||xe.placeholder||"";var q=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,ne=L.scrollHeight,me;if(C==="border-box"?ne+=h:C==="content-box"&&(ne-=$),te!==null||K!==null){L.value=" ";var Te=L.scrollHeight-$;te!==null&&(q=Te*te,C==="border-box"&&(q=q+$+h),ne=Math.max(q,ne)),K!==null&&(Ce=Te*K,C==="border-box"&&(Ce=Ce+$+h),me=ne>Ce?"":"hidden",ne=Math.min(Ce,ne))}return{height:ne,minHeight:q,maxHeight:Ce,overflowY:me,resize:"none"}}var c=y("Gytx"),l=y.n(c),v;(function(xe){xe[xe.NONE=0]="NONE",xe[xe.RESIZING=1]="RESIZING",xe[xe.RESIZED=2]="RESIZED"})(v||(v={}));var N=function(xe){Object(Re.a)(te,xe);var de=Object(Ae.a)(te);function te(K){var D;return Object(Oe.a)(this,te),D=de.call(this,K),D.nextFrameActionId=void 0,D.resizeFrameId=void 0,D.textArea=void 0,D.saveTextArea=function($){D.textArea=$},D.handleResize=function($){var h=D.state.resizeStatus,C=D.props,g=C.autoSize,q=C.onResize;if(h!==v.NONE)return;typeof q=="function"&&q($),g&&D.resizeOnNextFrame()},D.resizeOnNextFrame=function(){cancelAnimationFrame(D.nextFrameActionId),D.nextFrameActionId=requestAnimationFrame(D.resizeTextarea)},D.resizeTextarea=function(){var $=D.props.autoSize;if(!$||!D.textArea)return;var h=$.minRows,C=$.maxRows,g=_(D.textArea,!1,h,C);D.setState({textareaStyles:g,resizeStatus:v.RESIZING},function(){cancelAnimationFrame(D.resizeFrameId),D.resizeFrameId=requestAnimationFrame(function(){D.setState({resizeStatus:v.RESIZED},function(){D.resizeFrameId=requestAnimationFrame(function(){D.setState({resizeStatus:v.NONE}),D.fixFirefoxAutoScroll()})})})})},D.renderTextArea=function(){var $=D.props,h=$.prefixCls,C=h===void 0?"rc-textarea":h,g=$.autoSize,q=$.onResize,Ce=$.className,ne=$.disabled,me=D.state,Te=me.textareaStyles,He=me.resizeStatus,ze=Object(pe.a)(D.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Le=fe()(C,Ce,Object(X.a)({},"".concat(C,"-disabled"),ne));"value"in ze&&(ze.value=ze.value||"");var De=Object(k.a)(Object(k.a)(Object(k.a)({},D.props.style),Te),He===v.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return ee.createElement(Ie,{onResize:D.handleResize,disabled:!(g||q)},ee.createElement("textarea",Object(F.a)({},ze,{className:Le,style:De,ref:D.saveTextArea})))},D.state={textareaStyles:{},resizeStatus:v.NONE},D}return Object(ce.a)(te,[{key:"componentDidUpdate",value:function(D){(D.value!==this.props.value||!l()(D.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 D=this.textArea.selectionStart,$=this.textArea.selectionEnd;this.textArea.setSelectionRange(D,$)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),te}(ee.Component),Y=N,Me=function(xe){Object(Re.a)(te,xe);var de=Object(Ae.a)(te);function te(K){var D;Object(Oe.a)(this,te),D=de.call(this,K),D.resizableTextArea=void 0,D.focus=function(){D.resizableTextArea.textArea.focus()},D.saveTextArea=function(h){D.resizableTextArea=h},D.handleChange=function(h){var C=D.props.onChange;D.setValue(h.target.value,function(){D.resizableTextArea.resizeTextarea()}),C&&C(h)},D.handleKeyDown=function(h){var C=D.props,g=C.onPressEnter,q=C.onKeyDown;h.keyCode===13&&g&&g(h),q&&q(h)};var $=typeof K.value=="undefined"||K.value===null?K.defaultValue:K.value;return D.state={value:$},D}return Object(ce.a)(te,[{key:"setValue",value:function(D,$){"value"in this.props||this.setState({value:D},$)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return ee.createElement(Y,Object(F.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(D){return"value"in D?{value:D.value}:null}}]),te}(ee.Component),Fe=dt.a=Me},ZpRC:function(kt,dt,y){"use strict";function F(z){return typeof z=="object"&&z!=null&&z.nodeType===1}function Oe(z,j){return(!j||z!=="hidden")&&z!=="visible"&&z!=="clip"}function ce(z,j){if(z.clientHeight<z.scrollHeight||z.clientWidth<z.scrollWidth){var _e=getComputedStyle(z,null);return Oe(_e.overflowY,j)||Oe(_e.overflowX,j)||function(J){var H=function(E){if(!E.ownerDocument||!E.ownerDocument.defaultView)return null;try{return E.ownerDocument.defaultView.frameElement}catch(A){return null}}(J);return!!H&&(H.clientHeight<J.scrollHeight||H.clientWidth<J.scrollWidth)}(z)}return!1}function Re(z,j,_e,J,H,E,A,re){return E<z&&A>j||E>z&&A<j?0:E<=z&&re<=_e||A>=j&&re>=_e?E-z-J:A>j&&re<_e||E<z&&re>_e?A-j+H:0}var Ae=function(z,j){var _e=window,J=j.scrollMode,H=j.block,E=j.inline,A=j.boundary,re=j.skipOverflowHiddenElements,ie=typeof A=="function"?A:function(Te){return Te!==A};if(!F(z))throw new TypeError("Invalid target");for(var ye=document.scrollingElement||document.documentElement,Ve=[],Be=z;F(Be)&&ie(Be);){if((Be=Be.parentElement)===ye){Ve.push(Be);break}Be!=null&&Be===document.body&&ce(Be)&&!ce(document.documentElement)||Be!=null&&ce(Be,re)&&Ve.push(Be)}for(var Ue=_e.visualViewport?_e.visualViewport.width:innerWidth,Ye=_e.visualViewport?_e.visualViewport.height:innerHeight,ve=window.scrollX||pageXOffset,be=window.scrollY||pageYOffset,Ie=z.getBoundingClientRect(),pe=Ie.height,w=Ie.width,fe=Ie.top,Z=Ie.right,M=Ie.bottom,le=Ie.left,L=H==="start"||H==="nearest"?fe:H==="end"?M:fe+pe/2,P=E==="center"?le+w/2:E==="end"?Z:le,_=[],c=0;c<Ve.length;c++){var l=Ve[c],v=l.getBoundingClientRect(),N=v.height,Y=v.width,Me=v.top,Fe=v.right,xe=v.bottom,de=v.left;if(J==="if-needed"&&fe>=0&&le>=0&&M<=Ye&&Z<=Ue&&fe>=Me&&M<=xe&&le>=de&&Z<=Fe)return _;var te=getComputedStyle(l),K=parseInt(te.borderLeftWidth,10),D=parseInt(te.borderTopWidth,10),$=parseInt(te.borderRightWidth,10),h=parseInt(te.borderBottomWidth,10),C=0,g=0,q="offsetWidth"in l?l.offsetWidth-l.clientWidth-K-$:0,Ce="offsetHeight"in l?l.offsetHeight-l.clientHeight-D-h:0;if(ye===l)C=H==="start"?L:H==="end"?L-Ye:H==="nearest"?Re(be,be+Ye,Ye,D,h,be+L,be+L+pe,pe):L-Ye/2,g=E==="start"?P:E==="center"?P-Ue/2:E==="end"?P-Ue:Re(ve,ve+Ue,Ue,K,$,ve+P,ve+P+w,w),C=Math.max(0,C+be),g=Math.max(0,g+ve);else{C=H==="start"?L-Me-D:H==="end"?L-xe+h+Ce:H==="nearest"?Re(Me,xe,N,D,h+Ce,L,L+pe,pe):L-(Me+N/2)+Ce/2,g=E==="start"?P-de-K:E==="center"?P-(de+Y/2)+q/2:E==="end"?P-Fe+$+q:Re(de,Fe,Y,K,$+q,P,P+w,w);var ne=l.scrollLeft,me=l.scrollTop;L+=me-(C=Math.max(0,Math.min(me+C,l.scrollHeight-N+Ce))),P+=ne-(g=Math.max(0,Math.min(ne+g,l.scrollWidth-Y+q)))}_.push({el:l,top:C,left:g})}return _};function ee(z){return z===Object(z)&&Object.keys(z).length!==0}function k(z,j){j===void 0&&(j="auto");var _e="scrollBehavior"in document.body.style;z.forEach(function(J){var H=J.el,E=J.top,A=J.left;H.scroll&&_e?H.scroll({top:E,left:A,behavior:j}):(H.scrollTop=E,H.scrollLeft=A)})}function X(z){return z===!1?{block:"end",inline:"nearest"}:ee(z)?z:{block:"start",inline:"nearest"}}function oe(z,j){var _e=!z.ownerDocument.documentElement.contains(z);if(ee(j)&&typeof j.behavior=="function")return j.behavior(_e?[]:Ae(z,j));if(_e)return;var J=X(j);return k(Ae(z,J),J.behavior)}var V=dt.a=oe},Zss7:function(kt,dt,y){var F;(function(Oe){var ce=/^\s+/,Re=/\s+$/,Ae=0,ee=Oe.round,k=Oe.min,X=Oe.max,oe=Oe.random;function V(h,C){if(h=h||"",C=C||{},h instanceof V)return h;if(!(this instanceof V))return new V(h,C);var g=z(h);this._originalInput=h,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=ee(100*this._a)/100,this._format=C.format||g.format,this._gradientType=C.gradientType,this._r<1&&(this._r=ee(this._r)),this._g<1&&(this._g=ee(this._g)),this._b<1&&(this._b=ee(this._b)),this._ok=g.ok,this._tc_id=Ae++}V.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 h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),C,g,q,Ce,ne,me;return C=h.r/255,g=h.g/255,q=h.b/255,C<=.03928?Ce=C/12.92:Ce=Oe.pow((C+.055)/1.055,2.4),g<=.03928?ne=g/12.92:ne=Oe.pow((g+.055)/1.055,2.4),q<=.03928?me=q/12.92:me=Oe.pow((q+.055)/1.055,2.4),.2126*Ce+.7152*ne+.0722*me},setAlpha:function(h){return this._a=_(h),this._roundA=ee(100*this._a)/100,this},toHsv:function(){var h=H(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=H(this._r,this._g,this._b),C=ee(h.h*360),g=ee(h.s*100),q=ee(h.v*100);return this._a==1?"hsv("+C+", "+g+"%, "+q+"%)":"hsva("+C+", "+g+"%, "+q+"%, "+this._roundA+")"},toHsl:function(){var h=_e(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=_e(this._r,this._g,this._b),C=ee(h.h*360),g=ee(h.s*100),q=ee(h.l*100);return this._a==1?"hsl("+C+", "+g+"%, "+q+"%)":"hsla("+C+", "+g+"%, "+q+"%, "+this._roundA+")"},toHex:function(h){return A(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return re(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:ee(this._r),g:ee(this._g),b:ee(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+ee(this._r)+", "+ee(this._g)+", "+ee(this._b)+")":"rgba("+ee(this._r)+", "+ee(this._g)+", "+ee(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:ee(c(this._r,255)*100)+"%",g:ee(c(this._g,255)*100)+"%",b:ee(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+ee(c(this._r,255)*100)+"%, "+ee(c(this._g,255)*100)+"%, "+ee(c(this._b,255)*100)+"%)":"rgba("+ee(c(this._r,255)*100)+"%, "+ee(c(this._g,255)*100)+"%, "+ee(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:L[A(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var C="#"+ie(this._r,this._g,this._b,this._a),g=C,q=this._gradientType?"GradientType = 1, ":"";if(h){var Ce=V(h);g="#"+ie(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+q+"startColorstr="+C+",endColorstr="+g+")"},toString:function(h){var C=!!h;h=h||this._format;var g=!1,q=this._a<1&&this._a>=0,Ce=!C&&q&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return Ce?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(g=this.toRgbString()),h==="prgb"&&(g=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(g=this.toHexString()),h==="hex3"&&(g=this.toHexString(!0)),h==="hex4"&&(g=this.toHex8String(!0)),h==="hex8"&&(g=this.toHex8String()),h==="name"&&(g=this.toName()),h==="hsl"&&(g=this.toHslString()),h==="hsv"&&(g=this.toHsvString()),g||this.toHexString())},clone:function(){return V(this.toString())},_applyModification:function(h,C){var g=h.apply(null,[this].concat([].slice.call(C)));return this._r=g._r,this._g=g._g,this._b=g._b,this.setAlpha(g._a),this},lighten:function(){return this._applyModification(Ue,arguments)},brighten:function(){return this._applyModification(Ye,arguments)},darken:function(){return this._applyModification(ve,arguments)},desaturate:function(){return this._applyModification(ye,arguments)},saturate:function(){return this._applyModification(Ve,arguments)},greyscale:function(){return this._applyModification(Be,arguments)},spin:function(){return this._applyModification(be,arguments)},_applyCombination:function(h,C){return h.apply(null,[this].concat([].slice.call(C)))},analogous:function(){return this._applyCombination(Z,arguments)},complement:function(){return this._applyCombination(Ie,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(fe,arguments)},triad:function(){return this._applyCombination(pe,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},V.fromRatio=function(h,C){if(typeof h=="object"){var g={};for(var q in h)h.hasOwnProperty(q)&&(q==="a"?g[q]=h[q]:g[q]=Fe(h[q]));h=g}return V(h,C)};function z(h){var C={r:0,g:0,b:0},g=1,q=null,Ce=null,ne=null,me=!1,Te=!1;return typeof h=="string"&&(h=D(h)),typeof h=="object"&&(K(h.r)&&K(h.g)&&K(h.b)?(C=j(h.r,h.g,h.b),me=!0,Te=String(h.r).substr(-1)==="%"?"prgb":"rgb"):K(h.h)&&K(h.s)&&K(h.v)?(q=Fe(h.s),Ce=Fe(h.v),C=E(h.h,q,Ce),me=!0,Te="hsv"):K(h.h)&&K(h.s)&&K(h.l)&&(q=Fe(h.s),ne=Fe(h.l),C=J(h.h,q,ne),me=!0,Te="hsl"),h.hasOwnProperty("a")&&(g=h.a)),g=_(g),{ok:me,format:h.format||Te,r:k(255,X(C.r,0)),g:k(255,X(C.g,0)),b:k(255,X(C.b,0)),a:g}}function j(h,C,g){return{r:c(h,255)*255,g:c(C,255)*255,b:c(g,255)*255}}function _e(h,C,g){h=c(h,255),C=c(C,255),g=c(g,255);var q=X(h,C,g),Ce=k(h,C,g),ne,me,Te=(q+Ce)/2;if(q==Ce)ne=me=0;else{var He=q-Ce;me=Te>.5?He/(2-q-Ce):He/(q+Ce);switch(q){case h:ne=(C-g)/He+(C<g?6:0);break;case C:ne=(g-h)/He+2;break;case g:ne=(h-C)/He+4;break}ne/=6}return{h:ne,s:me,l:Te}}function J(h,C,g){var q,Ce,ne;h=c(h,360),C=c(C,100),g=c(g,100);function me(ze,Le,De){return De<0&&(De+=1),De>1&&(De-=1),De<1/6?ze+(Le-ze)*6*De:De<1/2?Le:De<2/3?ze+(Le-ze)*(2/3-De)*6:ze}if(C===0)q=Ce=ne=g;else{var Te=g<.5?g*(1+C):g+C-g*C,He=2*g-Te;q=me(He,Te,h+1/3),Ce=me(He,Te,h),ne=me(He,Te,h-1/3)}return{r:q*255,g:Ce*255,b:ne*255}}function H(h,C,g){h=c(h,255),C=c(C,255),g=c(g,255);var q=X(h,C,g),Ce=k(h,C,g),ne,me,Te=q,He=q-Ce;if(me=q===0?0:He/q,q==Ce)ne=0;else{switch(q){case h:ne=(C-g)/He+(C<g?6:0);break;case C:ne=(g-h)/He+2;break;case g:ne=(h-C)/He+4;break}ne/=6}return{h:ne,s:me,v:Te}}function E(h,C,g){h=c(h,360)*6,C=c(C,100),g=c(g,100);var q=Oe.floor(h),Ce=h-q,ne=g*(1-C),me=g*(1-Ce*C),Te=g*(1-(1-Ce)*C),He=q%6,ze=[g,me,ne,ne,Te,g][He],Le=[Te,g,g,me,ne,ne][He],De=[ne,ne,Te,g,g,me][He];return{r:ze*255,g:Le*255,b:De*255}}function A(h,C,g,q){var Ce=[Me(ee(h).toString(16)),Me(ee(C).toString(16)),Me(ee(g).toString(16))];return q&&Ce[0].charAt(0)==Ce[0].charAt(1)&&Ce[1].charAt(0)==Ce[1].charAt(1)&&Ce[2].charAt(0)==Ce[2].charAt(1)?Ce[0].charAt(0)+Ce[1].charAt(0)+Ce[2].charAt(0):Ce.join("")}function re(h,C,g,q,Ce){var ne=[Me(ee(h).toString(16)),Me(ee(C).toString(16)),Me(ee(g).toString(16)),Me(xe(q))];return Ce&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)&&ne[3].charAt(0)==ne[3].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0)+ne[3].charAt(0):ne.join("")}function ie(h,C,g,q){var Ce=[Me(xe(q)),Me(ee(h).toString(16)),Me(ee(C).toString(16)),Me(ee(g).toString(16))];return Ce.join("")}V.equals=function(h,C){return!h||!C?!1:V(h).toRgbString()==V(C).toRgbString()},V.random=function(){return V.fromRatio({r:oe(),g:oe(),b:oe()})};function ye(h,C){C=C===0?0:C||10;var g=V(h).toHsl();return g.s-=C/100,g.s=l(g.s),V(g)}function Ve(h,C){C=C===0?0:C||10;var g=V(h).toHsl();return g.s+=C/100,g.s=l(g.s),V(g)}function Be(h){return V(h).desaturate(100)}function Ue(h,C){C=C===0?0:C||10;var g=V(h).toHsl();return g.l+=C/100,g.l=l(g.l),V(g)}function Ye(h,C){C=C===0?0:C||10;var g=V(h).toRgb();return g.r=X(0,k(255,g.r-ee(255*-(C/100)))),g.g=X(0,k(255,g.g-ee(255*-(C/100)))),g.b=X(0,k(255,g.b-ee(255*-(C/100)))),V(g)}function ve(h,C){C=C===0?0:C||10;var g=V(h).toHsl();return g.l-=C/100,g.l=l(g.l),V(g)}function be(h,C){var g=V(h).toHsl(),q=(g.h+C)%360;return g.h=q<0?360+q:q,V(g)}function Ie(h){var C=V(h).toHsl();return C.h=(C.h+180)%360,V(C)}function pe(h){var C=V(h).toHsl(),g=C.h;return[V(h),V({h:(g+120)%360,s:C.s,l:C.l}),V({h:(g+240)%360,s:C.s,l:C.l})]}function w(h){var C=V(h).toHsl(),g=C.h;return[V(h),V({h:(g+90)%360,s:C.s,l:C.l}),V({h:(g+180)%360,s:C.s,l:C.l}),V({h:(g+270)%360,s:C.s,l:C.l})]}function fe(h){var C=V(h).toHsl(),g=C.h;return[V(h),V({h:(g+72)%360,s:C.s,l:C.l}),V({h:(g+216)%360,s:C.s,l:C.l})]}function Z(h,C,g){C=C||6,g=g||30;var q=V(h).toHsl(),Ce=360/g,ne=[V(h)];for(q.h=(q.h-(Ce*C>>1)+720)%360;--C;)q.h=(q.h+Ce)%360,ne.push(V(q));return ne}function M(h,C){C=C||6;for(var g=V(h).toHsv(),q=g.h,Ce=g.s,ne=g.v,me=[],Te=1/C;C--;)me.push(V({h:q,s:Ce,v:ne})),ne=(ne+Te)%1;return me}V.mix=function(h,C,g){g=g===0?0:g||50;var q=V(h).toRgb(),Ce=V(C).toRgb(),ne=g/100,me={r:(Ce.r-q.r)*ne+q.r,g:(Ce.g-q.g)*ne+q.g,b:(Ce.b-q.b)*ne+q.b,a:(Ce.a-q.a)*ne+q.a};return V(me)},V.readability=function(h,C){var g=V(h),q=V(C);return(Oe.max(g.getLuminance(),q.getLuminance())+.05)/(Oe.min(g.getLuminance(),q.getLuminance())+.05)},V.isReadable=function(h,C,g){var q=V.readability(h,C),Ce,ne;ne=!1,Ce=$(g);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":ne=q>=4.5;break;case"AAlarge":ne=q>=3;break;case"AAAsmall":ne=q>=7;break}return ne},V.mostReadable=function(h,C,g){var q=null,Ce=0,ne,me,Te,He;g=g||{},me=g.includeFallbackColors,Te=g.level,He=g.size;for(var ze=0;ze<C.length;ze++)ne=V.readability(h,C[ze]),ne>Ce&&(Ce=ne,q=V(C[ze]));return V.isReadable(h,q,{level:Te,size:He})||!me?q:(g.includeFallbackColors=!1,V.mostReadable(h,["#fff","#000"],g))};var le=V.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"},L=V.hexNames=P(le);function P(h){var C={};for(var g in h)h.hasOwnProperty(g)&&(C[h[g]]=g);return C}function _(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,C){N(h)&&(h="100%");var g=Y(h);return h=k(C,X(0,parseFloat(h))),g&&(h=parseInt(h*C,10)/100),Oe.abs(h-C)<1e-6?1:h%C/parseFloat(C)}function l(h){return k(1,X(0,h))}function v(h){return parseInt(h,16)}function N(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function Y(h){return typeof h=="string"&&h.indexOf("%")!=-1}function Me(h){return h.length==1?"0"+h:""+h}function Fe(h){return h<=1&&(h=h*100+"%"),h}function xe(h){return Oe.round(parseFloat(h)*255).toString(16)}function de(h){return v(h)/255}var te=function(){var h="[-\\+]?\\d+%?",C="[-\\+]?\\d*\\.\\d+%?",g="(?:"+C+")|(?:"+h+")",q="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",Ce="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?";return{CSS_UNIT:new RegExp(g),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+Ce),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 K(h){return!!te.CSS_UNIT.exec(h)}function D(h){h=h.replace(ce,"").replace(Re,"").toLowerCase();var C=!1;if(le[h])h=le[h],C=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var g;return(g=te.rgb.exec(h))?{r:g[1],g:g[2],b:g[3]}:(g=te.rgba.exec(h))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=te.hsl.exec(h))?{h:g[1],s:g[2],l:g[3]}:(g=te.hsla.exec(h))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=te.hsv.exec(h))?{h:g[1],s:g[2],v:g[3]}:(g=te.hsva.exec(h))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=te.hex8.exec(h))?{r:v(g[1]),g:v(g[2]),b:v(g[3]),a:de(g[4]),format:C?"name":"hex8"}:(g=te.hex6.exec(h))?{r:v(g[1]),g:v(g[2]),b:v(g[3]),format:C?"name":"hex"}:(g=te.hex4.exec(h))?{r:v(g[1]+""+g[1]),g:v(g[2]+""+g[2]),b:v(g[3]+""+g[3]),a:de(g[4]+""+g[4]),format:C?"name":"hex8"}:(g=te.hex3.exec(h))?{r:v(g[1]+""+g[1]),g:v(g[2]+""+g[2]),b:v(g[3]+""+g[3]),format:C?"name":"hex"}:!1}function $(h){var C,g;return h=h||{level:"AA",size:"small"},C=(h.level||"AA").toUpperCase(),g=(h.size||"small").toLowerCase(),C!=="AA"&&C!=="AAA"&&(C="AA"),g!=="small"&&g!=="large"&&(g="small"),{level:C,size:g}}kt.exports?kt.exports=V:!(F=function(){return V}.call(dt,y,dt,kt),F!==void 0&&(kt.exports=F))})(Math)},bT9E:function(kt,dt,y){"use strict";y.d(dt,"a",function(){return Oe});var F=y("VTBJ");function Oe(ce,Re){var Ae=Object(F.a)({},ce);return Array.isArray(Re)&&Re.forEach(function(ee){delete Ae[ee]}),Ae}},c5Ni:function(kt,dt,y){},dejd:function(kt,dt,y){},dmUQ:function(kt,dt,y){"use strict";var F=y("Ff2n"),Oe=y("rePB"),ce=y("1OyB"),Re=y("vuIU"),Ae=y("Ji7U"),ee=y("md7G"),k=y("foSv"),X=y("cDcd"),oe=y.n(X),V=y("TSYQ"),z=y.n(V),j=y("4IlW");function _e(pe,w){var fe=Object.keys(pe);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(pe);w&&(Z=Z.filter(function(M){return Object.getOwnPropertyDescriptor(pe,M).enumerable})),fe.push.apply(fe,Z)}return fe}function J(pe){for(var w=1;w<arguments.length;w++){var fe=arguments[w]!=null?arguments[w]:{};w%2?_e(Object(fe),!0).forEach(function(Z){Object(Oe.a)(pe,Z,fe[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(fe)):_e(Object(fe)).forEach(function(Z){Object.defineProperty(pe,Z,Object.getOwnPropertyDescriptor(fe,Z))})}return pe}function H(pe){var w=E();return function(){var Z=Object(k.a)(pe),M;if(w){var le=Object(k.a)(this).constructor;M=Reflect.construct(Z,arguments,le)}else M=Z.apply(this,arguments);return Object(ee.a)(this,M)}}function E(){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(pe){return!1}}function A(){}function re(pe){pe.preventDefault()}var ie=function(w){return w.replace(/[^\w.-]+/g,"")},ye=200,Ve=600,Be=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Ue=function(w){return w!=null},Ye=function(w,fe){return fe===w||typeof fe=="number"&&typeof w=="number"&&isNaN(fe)&&isNaN(w)},ve=function(pe){Object(Ae.a)(fe,pe);var w=H(fe);function fe(Z){var M;Object(ce.a)(this,fe),M=w.call(this,Z),M.onKeyDown=function(P){var _=M.props,c=_.onKeyDown,l=_.onPressEnter;if(P.keyCode===j.a.UP){var v=M.getRatio(P);M.up(P,v,null),M.stop()}else if(P.keyCode===j.a.DOWN){var N=M.getRatio(P);M.down(P,N,null),M.stop()}else P.keyCode===j.a.ENTER&&l&&l(P);if(M.recordCursorPosition(),M.lastKeyCode=P.keyCode,c){for(var Y=arguments.length,Me=new Array(Y>1?Y-1:0),Fe=1;Fe<Y;Fe++)Me[Fe-1]=arguments[Fe];c.apply(void 0,[P].concat(Me))}},M.onKeyUp=function(P){var _=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),_){for(var c=arguments.length,l=new Array(c>1?c-1:0),v=1;v<c;v++)l[v-1]=arguments[v];_.apply(void 0,[P].concat(l))}},M.onChange=function(P){var _=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(P)),M.setState({inputValue:M.rawInput}),_(M.toNumber(M.rawInput))},M.onMouseUp=function(){var P=M.props.onMouseUp;M.recordCursorPosition(),P&&P.apply(void 0,arguments)},M.onFocus=function(){var P;M.setState({focused:!0}),(P=M.props).onFocus.apply(P,arguments)},M.onBlur=function(){var P=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var _=M.getCurrentValidValue(M.state.inputValue),c=M.setValue(_,A);if(P){var l=M.input.value,v=M.getInputDisplayValue({focus:!1,value:c});M.input.value=v&&Number(v),P.apply(void 0,arguments),M.input.value=l}},M.getRatio=function(P){var _=1;return P.metaKey||P.ctrlKey?_=.1:P.shiftKey&&(_=10),_},M.getFullNum=function(P){return isNaN(P)?P:/e/i.test(String(P))?Number(P).toFixed(18).replace(/\.?0+$/,""):P},M.getPrecision=function(P){if(Ue(M.props.precision))return M.props.precision;var _=String(P);if(_.indexOf("e-")>=0)return parseInt(_.slice(_.indexOf("e-")+2),10);var c=0;return _.indexOf(".")>=0&&(c=_.length-_.indexOf(".")-1),c},M.getInputDisplayValue=function(P){var _=P||M.state,c=_.focused,l=_.inputValue,v=_.value,N;c?N=l:N=M.toPrecisionAsStep(v),N==null&&(N="");var Y=M.formatWrapper(N);return Ue(M.props.decimalSeparator)&&(Y=Y.toString().replace(".",M.props.decimalSeparator)),Y},M.recordCursorPosition=function(){try{M.cursorStart=M.input.selectionStart,M.cursorEnd=M.input.selectionEnd,M.currentValue=M.input.value,M.cursorBefore=M.input.value.substring(0,M.cursorStart),M.cursorAfter=M.input.value.substring(M.cursorEnd)}catch(P){}},M.restoreByAfter=function(P){if(P===void 0)return!1;var _=M.input.value,c=_.lastIndexOf(P);if(c===-1)return!1;var l=M.cursorBefore.length;return M.lastKeyCode===j.a.DELETE&&M.cursorBefore.charAt(l-1)===P[0]?(M.fixCaret(l,l),!0):c+P.length===_.length?(M.fixCaret(c,c),!0):!1},M.partRestoreByAfter=function(P){return P===void 0?!1:Array.prototype.some.call(P,function(_,c){var l=P.substring(c);return M.restoreByAfter(l)})},M.isNotCompleteNumber=function(P){return isNaN(P)||P===""||P===null||P&&P.toString().indexOf(".")===P.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(P,_,c){M.pressingUpOrDown=!0,M.step("down",P,_,c)},M.up=function(P,_,c){M.pressingUpOrDown=!0,M.step("up",P,_,c)},M.saveInput=function(P){M.input=P};var le=Z.value;le===void 0&&(le=Z.defaultValue),M.state={focused:Z.autoFocus};var L=M.getValidValue(M.toNumber(le));return M.state=J(J({},M.state),{},{inputValue:M.toPrecisionAsStep(L),value:L}),M}return Object(Re.a)(fe,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var le=this.props,L=le.value,P=le.onChange,_=le.max,c=le.min,l=this.state.focused;if(M){if(!Ye(M.value,L)||!Ye(M.max,_)||!Ye(M.min,c)){var v=l?L:this.getValidValue(L),N;this.pressingUpOrDown?N=v:this.inputting?N=this.rawInput:N=this.toPrecisionAsStep(v),this.setState({value:v,inputValue:N})}var Y="value"in this.props?L:this.state.value;"max"in this.props&&M.max!==_&&typeof Y=="number"&&Y>_&&P&&P(_),"min"in this.props&&M.min!==c&&typeof Y=="number"&&Y<c&&P&&P(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Me=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===j.a.BACKSPACE?Me=this.cursorStart-1:this.lastKeyCode===j.a.DELETE&&(Me=this.cursorStart):Me=this.input.value.length,this.fixCaret(Me,Me)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case j.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case j.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Fe){}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(M){var le=M;return le===""?le="":this.isNotCompleteNumber(parseFloat(le))?le=this.state.value:le=this.getValidValue(le),this.toNumber(le)}},{key:"getValueFromEvent",value:function(M){var le=M.target.value.trim().replace(/。/g,".");return Ue(this.props.decimalSeparator)&&(le=le.replace(this.props.decimalSeparator,".")),le}},{key:"getValidValue",value:function(M){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,P=parseFloat(M);return isNaN(P)?M:(P<le&&(P=le),P>L&&(P=L),P)}},{key:"setValue",value:function(M,le){var L=this.props.precision,P=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),_=this.state.value,c=_===void 0?null:_,l=this.state.inputValue,v=l===void 0?null:l,N=typeof P=="number"?P.toFixed(L):"".concat(P),Y=P!==c||N!=="".concat(v);return"value"in this.props?(v=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:v},le)):this.setState({value:P,inputValue:this.toPrecisionAsStep(M)},le),Y&&this.props.onChange(P),P}},{key:"getMaxPrecision",value:function(M){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=this.props,P=L.precision,_=L.step;if(Ue(P))return P;var c=this.getPrecision(le),l=this.getPrecision(_),v=this.getPrecision(M);return M?Math.max(v,c+l):c+l}},{key:"getPrecisionFactor",value:function(M){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=this.getMaxPrecision(M,le);return Math.pow(10,L)}},{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(M){return this.props.formatter?this.props.formatter(M):M}},{key:"toPrecisionAsStep",value:function(M){if(this.isNotCompleteNumber(M)||M==="")return M;var le=Math.abs(this.getMaxPrecision(M));return isNaN(le)?M.toString():Number(M).toFixed(le)}},{key:"toNumber",value:function(M){var le=this.props.precision,L=this.state.focused,P=M&&M.length>16&&L;return this.isNotCompleteNumber(M)||P?M:Ue(le)?Math.round(M*Math.pow(10,le))/Math.pow(10,le):Number(M)}},{key:"upStep",value:function(M,le){var L=this.props.step,P=this.getPrecisionFactor(M,le),_=Math.abs(this.getMaxPrecision(M,le)),c=((P*M+P*L*le)/P).toFixed(_);return this.toNumber(c)}},{key:"downStep",value:function(M,le){var L=this.props.step,P=this.getPrecisionFactor(M,le),_=Math.abs(this.getMaxPrecision(M,le)),c=((P*M-P*L*le)/P).toFixed(_);return this.toNumber(c)}},{key:"step",value:function(M,le){var L=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=arguments.length>3?arguments[3]:void 0;this.stop(),le&&(le.persist(),le.preventDefault());var c=this.props;if(c.disabled)return;var l=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(l))return;var v=this["".concat(M,"Step")](l,P),N=v>c.max||v<c.min;if(v>c.max?v=c.max:v<c.min&&(v=c.min),this.setValue(v,null),this.setState({focused:!0},function(){L.pressingUpOrDown=!1}),N)return;this.autoStepTimer=setTimeout(function(){L[M](le,P,!0)},_?ye:Ve)}},{key:"fixCaret",value:function(M,le){if(M===void 0||le===void 0||!this.input||!this.input.value)return;try{var L=this.input.selectionStart,P=this.input.selectionEnd;(M!==L||le!==P)&&this.input.setSelectionRange(M,le)}catch(_){}}},{key:"render",value:function(){var M,le=this.props,L=le.prefixCls,P=le.disabled,_=le.readOnly,c=le.useTouch,l=le.autoComplete,v=le.upHandler,N=le.downHandler,Y=le.className,Me=le.max,Fe=le.min,xe=le.style,de=le.title,te=le.onMouseEnter,K=le.onMouseLeave,D=le.onMouseOver,$=le.onMouseOut,h=le.required,C=le.onClick,g=le.tabIndex,q=le.type,Ce=le.placeholder,ne=le.id,me=le.inputMode,Te=le.pattern,He=le.step,ze=le.maxLength,Le=le.autoFocus,De=le.name,at=le.onPaste,ut=le.onInput,ot=Object(F.a)(le,["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"]),rt=this.state,mt=rt.value,nt=rt.focused,$e=z()(L,(M={},Object(Oe.a)(M,Y,!!Y),Object(Oe.a)(M,"".concat(L,"-disabled"),P),Object(Oe.a)(M,"".concat(L,"-focused"),nt),M)),ue={};Object.keys(ot).forEach(function(O){(O.substr(0,5)==="data-"||O.substr(0,5)==="aria-"||O==="role")&&(ue[O]=ot[O])});var ct=!_&&!P,lt=this.getInputDisplayValue(null),we=(mt||mt===0)&&(isNaN(mt)||Number(mt)>=Me),Ke=(mt||mt===0)&&(isNaN(mt)||Number(mt)<=Fe),W=we||P||_,R=Ke||P||_,I=z()("".concat(L,"-handler"),"".concat(L,"-handler-up"),Object(Oe.a)({},"".concat(L,"-handler-up-disabled"),W)),f=z()("".concat(L,"-handler"),"".concat(L,"-handler-down"),Object(Oe.a)({},"".concat(L,"-handler-down-disabled"),R)),m=c?{onTouchStart:W?A:this.up,onTouchEnd:this.stop}:{onMouseDown:W?A:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},b=c?{onTouchStart:R?A:this.down,onTouchEnd:this.stop}:{onMouseDown:R?A:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return oe.a.createElement("div",{className:$e,style:xe,title:de,onMouseEnter:te,onMouseLeave:K,onMouseOver:D,onMouseOut:$,onFocus:function(){return null},onBlur:function(){return null}},oe.a.createElement("div",{className:"".concat(L,"-handler-wrap")},oe.a.createElement("span",Object.assign({unselectable:"on"},m,{role:"button","aria-label":"Increase Value","aria-disabled":W,className:I}),v||oe.a.createElement("span",{unselectable:"on",className:"".concat(L,"-handler-up-inner"),onClick:re})),oe.a.createElement("span",Object.assign({unselectable:"on"},b,{role:"button","aria-label":"Decrease Value","aria-disabled":R,className:f}),N||oe.a.createElement("span",{unselectable:"on",className:"".concat(L,"-handler-down-inner"),onClick:re}))),oe.a.createElement("div",{className:"".concat(L,"-input-wrap")},oe.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Fe,"aria-valuemax":Me,"aria-valuenow":mt,required:h,type:q,placeholder:Ce,onPaste:at,onClick:C,onMouseUp:this.onMouseUp,className:"".concat(L,"-input"),tabIndex:g,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ct?this.onKeyDown:A,onKeyUp:ct?this.onKeyUp:A,autoFocus:Le,maxLength:ze,readOnly:_,disabled:P,max:Me,min:Fe,step:He,name:De,title:de,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:Te,inputMode:me,onInput:ut},ue))))}}]),fe}(oe.a.Component);ve.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Be,min:-Be,step:1,style:{},onChange:A,onKeyDown:A,onPressEnter:A,onFocus:A,onBlur:A,parser:ie,required:!1,autoComplete:"off"};var be=ve,Ie=dt.a=be},h78n:function(kt,dt,y){"use strict";y.d(dt,"a",function(){return M});var F=y("cDcd"),Oe=y.n(F),ce=y("TSYQ"),Re=y.n(ce),Ae={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},ee=function(P){var _=P.map(function(){return Object(F.useRef)()}),c=Object(F.useRef)();return Object(F.useEffect)(function(){var l=Date.now(),v=!1;Object.keys(_).forEach(function(N){var Y=_[N].current;if(!Y)return;v=!0;var Me=Y.style;Me.transitionDuration=".3s, .3s, .3s, .06s",c.current&&l-c.current<100&&(Me.transitionDuration="0s, 0s")}),v&&(c.current=Date.now())}),[_]};function k(){return k=Object.assign||function(L){for(var P=1;P<arguments.length;P++){var _=arguments[P];for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&(L[c]=_[c])}return L},k.apply(this,arguments)}function X(L,P){return _e(L)||j(L,P)||V(L,P)||oe()}function oe(){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 V(L,P){if(!L)return;if(typeof L=="string")return z(L,P);var _=Object.prototype.toString.call(L).slice(8,-1);if(_==="Object"&&L.constructor&&(_=L.constructor.name),_==="Map"||_==="Set")return Array.from(L);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return z(L,P)}function z(L,P){(P==null||P>L.length)&&(P=L.length);for(var _=0,c=new Array(P);_<P;_++)c[_]=L[_];return c}function j(L,P){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(L)))return;var _=[],c=!0,l=!1,v=void 0;try{for(var N=L[Symbol.iterator](),Y;!(c=(Y=N.next()).done)&&!(_.push(Y.value),P&&_.length===P);c=!0);}catch(Me){l=!0,v=Me}finally{try{!c&&N.return!=null&&N.return()}finally{if(l)throw v}}return _}function _e(L){if(Array.isArray(L))return L}function J(L,P){if(L==null)return{};var _=H(L,P),c,l;if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(L);for(l=0;l<v.length;l++){if(c=v[l],P.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(L,c))continue;_[c]=L[c]}}return _}function H(L,P){if(L==null)return{};var _={},c=Object.keys(L),l,v;for(v=0;v<c.length;v++){if(l=c[v],P.indexOf(l)>=0)continue;_[l]=L[l]}return _}var E=function(P){var _=P.className,c=P.percent,l=P.prefixCls,v=P.strokeColor,N=P.strokeLinecap,Y=P.strokeWidth,Me=P.style,Fe=P.trailColor,xe=P.trailWidth,de=P.transition,te=J(P,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete te.gapPosition;var K=Array.isArray(c)?c:[c],D=Array.isArray(v)?v:[v],$=ee(K),h=X($,1),C=h[0],g=Y/2,q=100-Y/2,Ce="M ".concat(N==="round"?g:0,",").concat(g,`
|
|
L `).concat(N==="round"?q:100,",").concat(g),ne="0 0 100 ".concat(Y),me=0;return Oe.a.createElement("svg",k({className:Re()("".concat(l,"-line"),_),viewBox:ne,preserveAspectRatio:"none",style:Me},te),Oe.a.createElement("path",{className:"".concat(l,"-line-trail"),d:Ce,strokeLinecap:N,stroke:Fe,strokeWidth:xe||Y,fillOpacity:"0"}),K.map(function(Te,He){var ze={strokeDasharray:"".concat(Te,"px, 100px"),strokeDashoffset:"-".concat(me,"px"),transition:de||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Le=D[He]||D[D.length-1];return me+=Te,Oe.a.createElement("path",{key:He,className:"".concat(l,"-line-path"),d:Ce,strokeLinecap:N,stroke:Le,strokeWidth:Y,fillOpacity:"0",ref:C[He],style:ze})}))};E.defaultProps=Ae;var A=E;function re(){return re=Object.assign||function(L){for(var P=1;P<arguments.length;P++){var _=arguments[P];for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&(L[c]=_[c])}return L},re.apply(this,arguments)}function ie(L,P){return Ye(L)||Ue(L,P)||Ve(L,P)||ye()}function ye(){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 Ve(L,P){if(!L)return;if(typeof L=="string")return Be(L,P);var _=Object.prototype.toString.call(L).slice(8,-1);if(_==="Object"&&L.constructor&&(_=L.constructor.name),_==="Map"||_==="Set")return Array.from(L);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return Be(L,P)}function Be(L,P){(P==null||P>L.length)&&(P=L.length);for(var _=0,c=new Array(P);_<P;_++)c[_]=L[_];return c}function Ue(L,P){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(L)))return;var _=[],c=!0,l=!1,v=void 0;try{for(var N=L[Symbol.iterator](),Y;!(c=(Y=N.next()).done)&&!(_.push(Y.value),P&&_.length===P);c=!0);}catch(Me){l=!0,v=Me}finally{try{!c&&N.return!=null&&N.return()}finally{if(l)throw v}}return _}function Ye(L){if(Array.isArray(L))return L}function ve(L,P){if(L==null)return{};var _=be(L,P),c,l;if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(L);for(l=0;l<v.length;l++){if(c=v[l],P.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(L,c))continue;_[c]=L[c]}}return _}function be(L,P){if(L==null)return{};var _={},c=Object.keys(L),l,v;for(v=0;v<c.length;v++){if(l=c[v],P.indexOf(l)>=0)continue;_[l]=L[l]}return _}var Ie=0;function pe(L){return+L.replace("%","")}function w(L){return Array.isArray(L)?L:[L]}function fe(L,P,_,c){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,v=arguments.length>5?arguments[5]:void 0,N=50-c/2,Y=0,Me=-N,Fe=0,xe=-2*N;switch(v){case"left":Y=-N,Me=0,Fe=2*N,xe=0;break;case"right":Y=N,Me=0,Fe=-2*N,xe=0;break;case"bottom":Me=N,xe=2*N;break;default:}var de="M 50,50 m ".concat(Y,",").concat(Me,`
|
|
a `).concat(N,",").concat(N," 0 1 1 ").concat(Fe,",").concat(-xe,`
|
|
a `).concat(N,",").concat(N," 0 1 1 ").concat(-Fe,",").concat(xe),te=Math.PI*2*N,K={stroke:_,strokeDasharray:"".concat(P/100*(te-l),"px ").concat(te,"px"),strokeDashoffset:"-".concat(l/2+L/100*(te-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:de,pathStyle:K}}var Z=function(P){var _=P.prefixCls,c=P.strokeWidth,l=P.trailWidth,v=P.gapDegree,N=P.gapPosition,Y=P.trailColor,Me=P.strokeLinecap,Fe=P.style,xe=P.className,de=P.strokeColor,te=P.percent,K=ve(P,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),D=Object(F.useMemo)(function(){return Ie+=1,Ie},[]),$=fe(0,100,Y,c,v,N),h=$.pathString,C=$.pathStyle,g=w(te),q=w(de),Ce=q.find(function(ze){return Object.prototype.toString.call(ze)==="[object Object]"}),ne=ee(g),me=ie(ne,1),Te=me[0],He=function(){var Le=0;return g.map(function(De,at){var ut=q[at]||q[q.length-1],ot=Object.prototype.toString.call(ut)==="[object Object]"?"url(#".concat(_,"-gradient-").concat(D,")"):"",rt=fe(Le,De,ut,c,v,N);return Le+=De,Oe.a.createElement("path",{key:at,className:"".concat(_,"-circle-path"),d:rt.pathString,stroke:ot,strokeLinecap:Me,strokeWidth:c,opacity:De===0?0:1,fillOpacity:"0",style:rt.pathStyle,ref:Te[at]})})};return Oe.a.createElement("svg",re({className:Re()("".concat(_,"-circle"),xe),viewBox:"0 0 100 100",style:Fe},K),Ce&&Oe.a.createElement("defs",null,Oe.a.createElement("linearGradient",{id:"".concat(_,"-gradient-").concat(D),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(ze,Le){return pe(ze)-pe(Le)}).map(function(ze,Le){return Oe.a.createElement("stop",{key:Le,offset:ze,stopColor:Ce[ze]})}))),Oe.a.createElement("path",{className:"".concat(_,"-circle-trail"),d:h,stroke:Y,strokeLinecap:Me,strokeWidth:l||c,fillOpacity:"0",style:C}),He().reverse())};Z.defaultProps=Ae;var M=Z,le={Line:A,Circle:M}},kSUc:function(kt,dt,y){},lZu9:function(kt,dt,y){(function(F){F(y("VrN/"),y("1eCo"),y("8EBN"))})(function(F){"use strict";F.defineMode("markdown",function(Oe,ce){var Re=F.getMode(Oe,"text/html"),Ae=Re.name=="null";function ee(c){if(F.findModeByName){var l=F.findModeByName(c);l&&(c=l.mime||l.mimes[0])}var v=F.getMode(Oe,c);return v.name=="null"?null:v}ce.highlightFormatting===void 0&&(ce.highlightFormatting=!1),ce.maxBlockquoteDepth===void 0&&(ce.maxBlockquoteDepth=0),ce.taskLists===void 0&&(ce.taskLists=!1),ce.strikethrough===void 0&&(ce.strikethrough=!1),ce.emoji===void 0&&(ce.emoji=!1),ce.fencedCodeBlockHighlighting===void 0&&(ce.fencedCodeBlockHighlighting=!0),ce.fencedCodeBlockDefaultMode===void 0&&(ce.fencedCodeBlockDefaultMode="text/plain"),ce.xml===void 0&&(ce.xml=!0),ce.tokenTypeOverrides===void 0&&(ce.tokenTypeOverrides={});var k={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 X in k)k.hasOwnProperty(X)&&ce.tokenTypeOverrides[X]&&(k[X]=ce.tokenTypeOverrides[X]);var oe=/^([*\-_])(?:\s*\1){2,}\s*$/,V=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,z=/^\[(x| )\](?=\s)/i,j=ce.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,_e=/^ {0,3}(?:\={1,}|-{2,})\s*$/,J=/^[^#!\[\]*_\\<>` "'(~:]+/,H=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,A=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,re=" ";function ie(c,l,v){return l.f=l.inline=v,v(c,l)}function ye(c,l,v){return l.f=l.block=v,v(c,l)}function Ve(c){return!c||!/\S/.test(c.string)}function Be(c){if(c.linkTitle=!1,c.linkHref=!1,c.linkText=!1,c.em=!1,c.strong=!1,c.strikethrough=!1,c.quote=0,c.indentedCode=!1,c.f==Ye){var l=Ae;if(!l){var v=F.innerMode(Re,c.htmlState);l=v.mode.name=="xml"&&v.state.tagStart===null&&!v.state.context&&v.state.tokenize.isInText}l&&(c.f=pe,c.block=Ue,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function Ue(c,l){var v=c.column()===l.indentation,N=Ve(l.prevLine.stream),Y=l.indentedCode,Me=l.prevLine.hr,Fe=l.list!==!1,xe=(l.listStack[l.listStack.length-1]||0)+3;l.indentedCode=!1;var de=l.indentation;if(l.indentationDiff===null&&(l.indentationDiff=l.indentation,Fe)){for(l.list=null;de<l.listStack[l.listStack.length-1];)l.listStack.pop(),l.listStack.length?l.indentation=l.listStack[l.listStack.length-1]:l.list=!1;l.list!==!1&&(l.indentationDiff=de-l.listStack[l.listStack.length-1])}var te=!N&&!Me&&!l.prevLine.header&&(!Fe||!Y)&&!l.prevLine.fencedCodeEnd,K=(l.list===!1||Me||N)&&l.indentation<=xe&&c.match(oe),D=null;if(l.indentationDiff>=4&&(Y||l.prevLine.fencedCodeEnd||l.prevLine.header||N))return c.skipToEnd(),l.indentedCode=!0,k.code;if(c.eatSpace())return null;if(v&&l.indentation<=xe&&(D=c.match(j))&&D[1].length<=6)return l.quote=0,l.header=D[1].length,l.thisLine.header=!0,ce.highlightFormatting&&(l.formatting="header"),l.f=l.inline,be(l);if(l.indentation<=xe&&c.eat(">"))return l.quote=v?1:l.quote+1,ce.highlightFormatting&&(l.formatting="quote"),c.eatSpace(),be(l);if(!K&&!l.setext&&v&&l.indentation<=xe&&(D=c.match(V))){var $=D[1]?"ol":"ul";return l.indentation=de+c.current().length,l.list=!0,l.quote=0,l.listStack.push(l.indentation),l.em=!1,l.strong=!1,l.code=!1,l.strikethrough=!1,ce.taskLists&&c.match(z,!1)&&(l.taskList=!0),l.f=l.inline,ce.highlightFormatting&&(l.formatting=["list","list-"+$]),be(l)}else{if(v&&l.indentation<=xe&&(D=c.match(H,!0)))return l.quote=0,l.fencedEndRE=new RegExp(D[1]+"+ *$"),l.localMode=ce.fencedCodeBlockHighlighting&&ee(D[2]||ce.fencedCodeBlockDefaultMode),l.localMode&&(l.localState=F.startState(l.localMode)),l.f=l.block=ve,ce.highlightFormatting&&(l.formatting="code-block"),l.code=-1,be(l);if(l.setext||(!te||!Fe)&&!l.quote&&l.list===!1&&!l.code&&!K&&!E.test(c.string)&&(D=c.lookAhead(1))&&(D=D.match(_e)))return l.setext?(l.header=l.setext,l.setext=0,c.skipToEnd(),ce.highlightFormatting&&(l.formatting="header")):(l.header=D[0].charAt(0)=="="?1:2,l.setext=l.header),l.thisLine.header=!0,l.f=l.inline,be(l);if(K)return c.skipToEnd(),l.hr=!0,l.thisLine.hr=!0,k.hr;if(c.peek()==="[")return ie(c,l,le)}return ie(c,l,l.inline)}function Ye(c,l){var v=Re.token(c,l.htmlState);if(!Ae){var N=F.innerMode(Re,l.htmlState);(N.mode.name=="xml"&&N.state.tagStart===null&&!N.state.context&&N.state.tokenize.isInText||l.md_inside&&c.current().indexOf(">")>-1)&&(l.f=pe,l.block=Ue,l.htmlState=null)}return v}function ve(c,l){var v=l.listStack[l.listStack.length-1]||0,N=l.indentation<v,Y=v+3;if(l.fencedEndRE&&l.indentation<=Y&&(N||c.match(l.fencedEndRE))){ce.highlightFormatting&&(l.formatting="code-block");var Me;return N||(Me=be(l)),l.localMode=l.localState=null,l.block=Ue,l.f=pe,l.fencedEndRE=null,l.code=0,l.thisLine.fencedCodeEnd=!0,N?ye(c,l,l.block):Me}else return l.localMode?l.localMode.token(c,l.localState):(c.skipToEnd(),k.code)}function be(c){var l=[];if(c.formatting){l.push(k.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var v=0;v<c.formatting.length;v++)l.push(k.formatting+"-"+c.formatting[v]),c.formatting[v]==="header"&&l.push(k.formatting+"-"+c.formatting[v]+"-"+c.header),c.formatting[v]==="quote"&&(!ce.maxBlockquoteDepth||ce.maxBlockquoteDepth>=c.quote?l.push(k.formatting+"-"+c.formatting[v]+"-"+c.quote):l.push("error"))}if(c.taskOpen)return l.push("meta"),l.length?l.join(" "):null;if(c.taskClosed)return l.push("property"),l.length?l.join(" "):null;if(c.linkHref?l.push(k.linkHref,"url"):(c.strong&&l.push(k.strong),c.em&&l.push(k.em),c.strikethrough&&l.push(k.strikethrough),c.emoji&&l.push(k.emoji),c.linkText&&l.push(k.linkText),c.code&&l.push(k.code),c.image&&l.push(k.image),c.imageAltText&&l.push(k.imageAltText,"link"),c.imageMarker&&l.push(k.imageMarker)),c.header&&l.push(k.header,k.header+"-"+c.header),c.quote&&(l.push(k.quote),!ce.maxBlockquoteDepth||ce.maxBlockquoteDepth>=c.quote?l.push(k.quote+"-"+c.quote):l.push(k.quote+"-"+ce.maxBlockquoteDepth)),c.list!==!1){var N=(c.listStack.length-1)%3;N?N===1?l.push(k.list2):l.push(k.list3):l.push(k.list1)}return c.trailingSpaceNewLine?l.push("trailing-space-new-line"):c.trailingSpace&&l.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),l.length?l.join(" "):null}function Ie(c,l){return c.match(J,!0)?be(l):void 0}function pe(c,l){var v=l.text(c,l);if(typeof v!="undefined")return v;if(l.list)return l.list=null,be(l);if(l.taskList){var N=c.match(z,!0)[1]===" ";return N?l.taskOpen=!0:l.taskClosed=!0,ce.highlightFormatting&&(l.formatting="task"),l.taskList=!1,be(l)}if(l.taskOpen=!1,l.taskClosed=!1,l.header&&c.match(/^#+$/,!0))return ce.highlightFormatting&&(l.formatting="header"),be(l);var Y=c.next();if(l.linkTitle){l.linkTitle=!1;var Me=Y;Y==="("&&(Me=")"),Me=(Me+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Fe="^\\s*(?:[^"+Me+"\\\\]+|\\\\\\\\|\\\\.)"+Me;if(c.match(new RegExp(Fe),!0))return k.linkHref}if(Y==="`"){var xe=l.formatting;ce.highlightFormatting&&(l.formatting="code"),c.eatWhile("`");var de=c.current().length;if(l.code==0&&(!l.quote||de==1))return l.code=de,be(l);if(de==l.code){var te=be(l);return l.code=0,te}else return l.formatting=xe,be(l)}else if(l.code)return be(l);if(Y==="\\"&&(c.next(),ce.highlightFormatting)){var K=be(l),D=k.formatting+"-escape";return K?K+" "+D:D}if(Y==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return l.imageMarker=!0,l.image=!0,ce.highlightFormatting&&(l.formatting="image"),be(l);if(Y==="["&&l.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return l.imageMarker=!1,l.imageAltText=!0,ce.highlightFormatting&&(l.formatting="image"),be(l);if(Y==="]"&&l.imageAltText){ce.highlightFormatting&&(l.formatting="image");var K=be(l);return l.imageAltText=!1,l.image=!1,l.inline=l.f=fe,K}if(Y==="["&&!l.image)return l.linkText&&c.match(/^.*?\]/)||(l.linkText=!0,ce.highlightFormatting&&(l.formatting="link")),be(l);if(Y==="]"&&l.linkText){ce.highlightFormatting&&(l.formatting="link");var K=be(l);return l.linkText=!1,l.inline=l.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?fe:pe,K}if(Y==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=w,ce.highlightFormatting&&(l.formatting="link");var K=be(l);return K?K+=" ":K="",K+k.linkInline}if(Y==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){l.f=l.inline=w,ce.highlightFormatting&&(l.formatting="link");var K=be(l);return K?K+=" ":K="",K+k.linkEmail}if(ce.xml&&Y==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var $=c.string.indexOf(">",c.pos);if($!=-1){var h=c.string.substring(c.start,$);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(h)&&(l.md_inside=!0)}return c.backUp(1),l.htmlState=F.startState(Re),ye(c,l,Ye)}if(ce.xml&&Y==="<"&&c.match(/^\/\w*?>/))return l.md_inside=!1,"tag";if(Y==="*"||Y==="_"){for(var C=1,g=c.pos==1?" ":c.string.charAt(c.pos-2);C<3&&c.eat(Y);)C++;var q=c.peek()||" ",Ce=!/\s/.test(q)&&(!A.test(q)||/\s/.test(g)||A.test(g)),ne=!/\s/.test(g)&&(!A.test(g)||/\s/.test(q)||A.test(q)),me=null,Te=null;if(C%2&&(!l.em&&Ce&&(Y==="*"||!ne||A.test(g))?me=!0:l.em==Y&&ne&&(Y==="*"||!Ce||A.test(q))&&(me=!1)),C>1&&(!l.strong&&Ce&&(Y==="*"||!ne||A.test(g))?Te=!0:l.strong==Y&&ne&&(Y==="*"||!Ce||A.test(q))&&(Te=!1)),Te!=null||me!=null){ce.highlightFormatting&&(l.formatting=me==null?"strong":Te==null?"em":"strong em"),me===!0&&(l.em=Y),Te===!0&&(l.strong=Y);var te=be(l);return me===!1&&(l.em=!1),Te===!1&&(l.strong=!1),te}}else if(Y===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return be(l);c.backUp(1)}if(ce.strikethrough){if(Y==="~"&&c.eatWhile(Y)){if(l.strikethrough){ce.highlightFormatting&&(l.formatting="strikethrough");var te=be(l);return l.strikethrough=!1,te}else if(c.match(/^[^\s]/,!1))return l.strikethrough=!0,ce.highlightFormatting&&(l.formatting="strikethrough"),be(l)}else if(Y===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return be(l);c.backUp(2)}}if(ce.emoji&&Y===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){l.emoji=!0,ce.highlightFormatting&&(l.formatting="emoji");var He=be(l);return l.emoji=!1,He}return Y===" "&&(c.match(/^ +$/,!1)?l.trailingSpace++:l.trailingSpace&&(l.trailingSpaceNewLine=!0)),be(l)}function w(c,l){var v=c.next();if(v===">"){l.f=l.inline=pe,ce.highlightFormatting&&(l.formatting="link");var N=be(l);return N?N+=" ":N="",N+k.linkInline}return c.match(/^[^>]+/,!0),k.linkInline}function fe(c,l){if(c.eatSpace())return null;var v=c.next();return v==="("||v==="["?(l.f=l.inline=M(v==="("?")":"]"),ce.highlightFormatting&&(l.formatting="link-string"),l.linkHref=!0,be(l)):"error"}var Z={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(c){return function(l,v){var N=l.next();if(N===c){v.f=v.inline=pe,ce.highlightFormatting&&(v.formatting="link-string");var Y=be(v);return v.linkHref=!1,Y}return l.match(Z[c]),v.linkHref=!0,be(v)}}function le(c,l){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(l.f=L,c.next(),ce.highlightFormatting&&(l.formatting="link"),l.linkText=!0,be(l)):ie(c,l,pe)}function L(c,l){if(c.match(/^\]:/,!0)){l.f=l.inline=P,ce.highlightFormatting&&(l.formatting="link");var v=be(l);return l.linkText=!1,v}return c.match(/^([^\]\\]|\\.)+/,!0),k.linkText}function P(c,l){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?l.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),l.f=l.inline=pe,k.linkHref+" url")}var _={startState:function(){return{f:Ue,prevLine:{stream:null},thisLine:{stream:null},block:Ue,htmlState:null,indentation:0,inline:pe,text:Ie,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(c){return{f:c.f,prevLine:c.prevLine,thisLine:c.thisLine,block:c.block,htmlState:c.htmlState&&F.copyState(Re,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?F.copyState(c.localMode,c.localState):null,inline:c.inline,text:c.text,formatting:!1,linkText:c.linkText,linkTitle:c.linkTitle,linkHref:c.linkHref,code:c.code,em:c.em,strong:c.strong,strikethrough:c.strikethrough,emoji:c.emoji,header:c.header,setext:c.setext,hr:c.hr,taskList:c.taskList,list:c.list,listStack:c.listStack.slice(0),quote:c.quote,indentedCode:c.indentedCode,trailingSpace:c.trailingSpace,trailingSpaceNewLine:c.trailingSpaceNewLine,md_inside:c.md_inside,fencedEndRE:c.fencedEndRE}},token:function(c,l){if(l.formatting=!1,c!=l.thisLine.stream){if(l.header=0,l.hr=!1,c.match(/^\s*$/,!0))return Be(l),null;if(l.prevLine=l.thisLine,l.thisLine={stream:c},l.taskList=!1,l.trailingSpace=0,l.trailingSpaceNewLine=!1,!l.localState&&(l.f=l.block,l.f!=Ye)){var v=c.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(l.indentation=v,l.indentationDiff=null,v>0)return null}}return l.f(c,l)},innerMode:function(c){return c.block==Ye?{state:c.htmlState,mode:Re}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:_}},indent:function(c,l,v){return c.block==Ye&&Re.indent?Re.indent(c.htmlState,l,v):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,l,v):F.Pass},blankLine:Be,getType:be,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return _},"xml"),F.defineMIME("text/markdown","markdown"),F.defineMIME("text/x-markdown","markdown")})},osHv:function(kt,dt,y){(function(F){F(y("VrN/"))})(function(F){"use strict";var Oe=F.Pos;function ce(A,re){return A.line-re.line||A.ch-re.ch}var Re="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",Ae=Re+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ee=new RegExp("<(/?)(["+Re+"]["+Ae+"]*)","g");function k(A,re,ie,ye){this.line=re,this.ch=ie,this.cm=A,this.text=A.getLine(re),this.min=ye?Math.max(ye.from,A.firstLine()):A.firstLine(),this.max=ye?Math.min(ye.to-1,A.lastLine()):A.lastLine()}function X(A,re){var ie=A.cm.getTokenTypeAt(Oe(A.line,re));return ie&&/\btag\b/.test(ie)}function oe(A){return A.line>=A.max?void 0:(A.ch=0,A.text=A.cm.getLine(++A.line),!0)}function V(A){return A.line<=A.min?void 0:(A.text=A.cm.getLine(--A.line),A.ch=A.text.length,!0)}function z(A){for(;;){var re=A.text.indexOf(">",A.ch);if(re==-1){if(oe(A))continue;return}if(!X(A,re+1)){A.ch=re+1;continue}var ie=A.text.lastIndexOf("/",re),ye=ie>-1&&!/\S/.test(A.text.slice(ie+1,re));return A.ch=re+1,ye?"selfClose":"regular"}}function j(A){for(;;){var re=A.ch?A.text.lastIndexOf("<",A.ch-1):-1;if(re==-1){if(V(A))continue;return}if(!X(A,re+1)){A.ch=re;continue}ee.lastIndex=re,A.ch=re;var ie=ee.exec(A.text);if(ie&&ie.index==re)return ie}}function _e(A){for(;;){ee.lastIndex=A.ch;var re=ee.exec(A.text);if(!re){if(oe(A))continue;return}if(!X(A,re.index+1)){A.ch=re.index+1;continue}return A.ch=re.index+re[0].length,re}}function J(A){for(;;){var re=A.ch?A.text.lastIndexOf(">",A.ch-1):-1;if(re==-1){if(V(A))continue;return}if(!X(A,re+1)){A.ch=re;continue}var ie=A.text.lastIndexOf("/",re),ye=ie>-1&&!/\S/.test(A.text.slice(ie+1,re));return A.ch=re+1,ye?"selfClose":"regular"}}function H(A,re){for(var ie=[];;){var ye=_e(A),Ve,Be=A.line,Ue=A.ch-(ye?ye[0].length:0);if(!ye||!(Ve=z(A)))return;if(Ve=="selfClose")continue;if(ye[1]){for(var Ye=ie.length-1;Ye>=0;--Ye)if(ie[Ye]==ye[2]){ie.length=Ye;break}if(Ye<0&&(!re||re==ye[2]))return{tag:ye[2],from:Oe(Be,Ue),to:Oe(A.line,A.ch)}}else ie.push(ye[2])}}function E(A,re){for(var ie=[];;){var ye=J(A);if(!ye)return;if(ye=="selfClose"){j(A);continue}var Ve=A.line,Be=A.ch,Ue=j(A);if(!Ue)return;if(Ue[1])ie.push(Ue[2]);else{for(var Ye=ie.length-1;Ye>=0;--Ye)if(ie[Ye]==Ue[2]){ie.length=Ye;break}if(Ye<0&&(!re||re==Ue[2]))return{tag:Ue[2],from:Oe(A.line,A.ch),to:Oe(Ve,Be)}}}}F.registerHelper("fold","xml",function(A,re){for(var ie=new k(A,re.line,0);;){var ye=_e(ie);if(!ye||ie.line!=re.line)return;var Ve=z(ie);if(!Ve)return;if(!ye[1]&&Ve!="selfClose"){var Be=Oe(ie.line,ie.ch),Ue=H(ie,ye[2]);return Ue&&ce(Ue.from,Be)>0?{from:Be,to:Ue.from}:null}}}),F.findMatchingTag=function(A,re,ie){var ye=new k(A,re.line,re.ch,ie);if(ye.text.indexOf(">")==-1&&ye.text.indexOf("<")==-1)return;var Ve=z(ye),Be=Ve&&Oe(ye.line,ye.ch),Ue=Ve&&j(ye);if(!Ve||!Ue||ce(ye,re)>0)return;var Ye={from:Oe(ye.line,ye.ch),to:Be,tag:Ue[2]};return Ve=="selfClose"?{open:Ye,close:null,at:"open"}:Ue[1]?{open:E(ye,Ue[2]),close:Ye,at:"close"}:(ye=new k(A,Be.line,Be.ch,ie),{open:Ye,close:H(ye,Ue[2]),at:"open"})},F.findEnclosingTag=function(A,re,ie,ye){for(var Ve=new k(A,re.line,re.ch,ie);;){var Be=E(Ve,ye);if(!Be)break;var Ue=new k(A,re.line,re.ch,ie),Ye=H(Ue,Be.tag);if(Ye)return{open:Be,close:Ye}}},F.scanForClosingTag=function(A,re,ie,ye){var Ve=new k(A,re.line,re.ch,ye?{from:0,to:ye}:null);return H(Ve,ie)}})},p0QG:function(kt,dt,y){kt.exports={flex_box_center:"flex_box_center___2axlI",flex_space_between:"flex_space_between___F6m1U",flex_box_vertical_center:"flex_box_vertical_center___2GovZ",flex_box_center_end:"flex_box_center_end___2h9j0",flex_box_column:"flex_box_column___1kuIs",SubMentItem:"SubMentItem___34z-Y",MenuItem:"MenuItem___1bbPM",wrp:"wrp___3LRhb",classroomInfo:"classroomInfo___Ohxoq",title:"title___22ZLP",titleLeft:"titleLeft___1MP-h",titleRight:"titleRight___3zsz9",classroomUser:"classroomUser___1ePAN",headPic:"headPic___2lEg_",teacherInfo:"teacherInfo___3C0Dn",classroomDesc:"classroomDesc____QVZX",classroomDescBg:"classroomDescBg___1e7L7",joinCouses:"joinCouses___2G4vP",bg:"bg___2QojS",leftMenus:"leftMenus___34tjX",titleSelected:"titleSelected___K6QwW",menuText:"menuText___3qMqH",totalCount:"totalCount___R2q38",actions:"actions___26Ww0",task_count:"task_count___3UQ1V",container:"container___2EGM4",leftMenuActions:"leftMenuActions___3_J-1"}},"p77/":function(kt,dt,y){},rUJ1:function(kt,dt){const y=/[&<>"']/,F=/[&<>"']/g,Oe=/[<>"']|&(?!#?\w+;)/,ce=/[<>"']|&(?!#?\w+;)/g,Re={"&":"&","<":"<",">":">",'"':""","'":"'"},Ae=ve=>Re[ve];function ee(ve,be){if(be){if(y.test(ve))return ve.replace(F,Ae)}else if(Oe.test(ve))return ve.replace(ce,Ae);return ve}const k=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function X(ve){return ve.replace(k,(be,Ie)=>(Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""))}const oe=/(^|[^\[])\^/g;function V(ve,be){ve=ve.source||ve,be=be||"";const Ie={replace:(pe,w)=>(w=w.source||w,w=w.replace(oe,"$1"),ve=ve.replace(pe,w),Ie),getRegex:()=>new RegExp(ve,be)};return Ie}const z=/[^\w:]/g,j=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _e(ve,be,Ie){if(ve){let pe;try{pe=decodeURIComponent(X(Ie)).replace(z,"").toLowerCase()}catch(w){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}be&&!j.test(Ie)&&(Ie=re(be,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(pe){return null}return Ie}const J={},H=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function re(ve,be){J[" "+ve]||(H.test(ve)?J[" "+ve]=ve+"/":J[" "+ve]=Be(ve,"/",!0)),ve=J[" "+ve];const Ie=ve.indexOf(":")===-1;return be.substring(0,2)==="//"?Ie?be:ve.replace(E,"$1")+be:be.charAt(0)==="/"?Ie?be:ve.replace(A,"$1")+be:ve+be}const ie={exec:function(){}};function ye(ve){let be=1,Ie,pe;for(;be<arguments.length;be++){Ie=arguments[be];for(pe in Ie)Object.prototype.hasOwnProperty.call(Ie,pe)&&(ve[pe]=Ie[pe])}return ve}function Ve(ve,be){const Ie=ve.replace(/\|/g,(fe,Z,M)=>{let le=!1,L=Z;for(;--L>=0&&M[L]==="\\";)le=!le;return le?"|":" |"}),pe=Ie.split(/ \|/);let w=0;if(pe.length>be)pe.splice(be);else for(;pe.length<be;)pe.push("");for(;w<pe.length;w++)pe[w]=pe[w].trim().replace(/\\\|/g,"|");return pe}function Be(ve,be,Ie){const pe=ve.length;if(pe===0)return"";let w=0;for(;w<pe;){const fe=ve.charAt(pe-w-1);if(fe===be&&!Ie)w++;else if(fe!==be&&Ie)w++;else break}return ve.substr(0,pe-w)}function Ue(ve,be){if(ve.indexOf(be[1])===-1)return-1;const Ie=ve.length;let pe=0,w=0;for(;w<Ie;w++)if(ve[w]==="\\")w++;else if(ve[w]===be[0])pe++;else if(ve[w]===be[1]&&(pe--,pe<0))return w;return-1}function Ye(ve){ve&&ve.sanitize&&!ve.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")}kt.exports={escape:ee,unescape:X,edit:V,cleanUrl:_e,resolveUrl:re,noopTest:ie,merge:ye,splitCells:Ve,rtrim:Be,findClosingBracket:Ue,checkSanitizeDeprecation:Ye}}}]);
|