(window.webpackJsonp=window.webpackJsonp||[]).push([[105,3,5,7,8,13],{"+92d":function(tn,Qe,I){tn.exports=I.p+"static/b1.8d46544a.svg"},"+NIl":function(tn,Qe,I){(function(te){te(I("VrN/"))})(function(te){"use strict";te.defineMode("stex",function(Y,N){"use strict";function K(d,s){d.cmdState.push(s)}function A(d){return d.cmdState.length>0?d.cmdState[d.cmdState.length-1]:null}function M(d){var s=d.cmdState.pop();s&&s.closeBracket()}function H(d){for(var s=d.cmdState,r=s.length-1;r>=0;r--){var u=s[r];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function P(d,s,r){return function(){this.name=d,this.bracketNo=0,this.style=s,this.styles=r,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var k={};k.importmodule=P("importmodule","tag",["string","builtin"]),k.documentclass=P("documentclass","tag",["","atom"]),k.usepackage=P("usepackage","tag",["atom"]),k.begin=P("begin","tag",["atom"]),k.end=P("end","tag",["atom"]),k.label=P("label","tag",["atom"]),k.ref=P("ref","tag",["atom"]),k.eqref=P("eqref","tag",["atom"]),k.cite=P("cite","tag",["atom"]),k.bibitem=P("bibitem","tag",["atom"]),k.Bibitem=P("Bibitem","tag",["atom"]),k.RBibitem=P("RBibitem","tag",["atom"]),k.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function D(d,s){d.f=s}function b(d,s){var r;if(d.match(/^\\[a-zA-Z@]+/)){var u=d.current().slice(1);return r=k.hasOwnProperty(u)?k[u]:k.DEFAULT,r=new r,K(s,r),D(s,f),r.style}if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/\\]/))return"tag";if(d.match("\\["))return D(s,function(a,n){return m(a,n,"\\]")}),"keyword";if(d.match("\\("))return D(s,function(a,n){return m(a,n,"\\)")}),"keyword";if(d.match("$$"))return D(s,function(a,n){return m(a,n,"$$")}),"keyword";if(d.match("$"))return D(s,function(a,n){return m(a,n,"$")}),"keyword";var o=d.next();if(o=="%")return d.skipToEnd(),"comment";if(o=="}"||o=="]"){if(r=A(s),r)r.closeBracket(o),D(s,f);else return"error";return"bracket"}else return o=="{"||o=="["?(r=k.DEFAULT,r=new r,K(s,r),"bracket"):/\d/.test(o)?(d.eatWhile(/[\w.%]/),"atom"):(d.eatWhile(/[\w\-_]/),r=H(s),r.name=="begin"&&(r.argument=d.current()),r.styleIdentifier())}function m(d,s,r){if(d.eatSpace())return null;if(r&&d.match(r))return D(s,b),"keyword";if(d.match(/^\\[a-zA-Z@]+/))return"tag";if(d.match(/^[a-zA-Z]+/))return"variable-2";if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/]/))return"tag";if(d.match(/^[\^_&]/))return"tag";if(d.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(d.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=d.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(d.skipToEnd(),"comment"):"error"}function f(d,s){var r=d.peek(),u;return r=="{"||r=="["?(u=A(s),u.openBracket(r),d.eat(r),D(s,b),"bracket"):/[ \t\r]/.test(r)?(d.eat(r),null):(D(s,b),M(s),b(d,s))}return{startState:function(){var d=N.inMathMode?function(s,r){return m(s,r)}:b;return{cmdState:[],f:d}},copyState:function(d){return{cmdState:d.cmdState.slice(),f:d.f}},token:function(d,s){return s.f(d,s)},blankLine:function(d){d.f=b,d.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},"+ua5":function(tn,Qe,I){},"19Vz":function(tn,Qe,I){(function(te){te(I("VrN/"))})(function(te){te.defineOption("placeholder","",function(P,k,D){var b=D&&D!=te.Init;if(k&&!b)P.on("blur",A),P.on("change",M),P.on("swapDoc",M),te.on(P.getInputField(),"compositionupdate",P.state.placeholderCompose=function(){K(P)}),M(P);else if(!k&&b){P.off("blur",A),P.off("change",M),P.off("swapDoc",M),te.off(P.getInputField(),"compositionupdate",P.state.placeholderCompose),Y(P);var m=P.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}k&&!P.hasFocus()&&A(P)});function Y(P){P.state.placeholder&&(P.state.placeholder.parentNode.removeChild(P.state.placeholder),P.state.placeholder=null)}function N(P){Y(P);var k=P.state.placeholder=document.createElement("pre");k.style.cssText="height: 0; overflow: visible",k.style.direction=P.getOption("direction"),k.className="CodeMirror-placeholder CodeMirror-line-like";var D=P.getOption("placeholder");typeof D=="string"&&(D=document.createTextNode(D)),k.appendChild(D),P.display.lineSpace.insertBefore(k,P.display.lineSpace.firstChild)}function K(P){setTimeout(function(){var k=!1,D=P.getInputField();D.nodeName=="TEXTAREA"?k=!D.value:P.lineCount()==1&&(k=!/[^\u200b]/.test(D.querySelector(".CodeMirror-line").textContent)),k?N(P):Y(P)},20)}function A(P){H(P)&&N(P)}function M(P){var k=P.getWrapperElement(),D=H(P);k.className=k.className.replace(" CodeMirror-empty","")+(D?" CodeMirror-empty":""),D?N(P):Y(P)}function H(P){return P.lineCount()===1&&P.getLine(0)===""}})},"1ZF9":function(tn,Qe,I){tn.exports=I.p+"static/Authorize.cc9c212f.png"},"1eCo":function(tn,Qe,I){(function(te){te(I("VrN/"))})(function(te){"use strict";var Y={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},N={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(K,A){var M=K.indentUnit,H={},P=A.htmlMode?Y:N;for(var k in P)H[k]=P[k];for(var k in A)H[k]=A[k];var D,b;function m(c,v){function p(F){return v.tokenize=F,F(c,v)}var E=c.next();if(E=="<")return c.eat("!")?c.eat("[")?c.match("CDATA[")?p(s("atom","]]>")):null:c.match("--")?p(s("comment","-->")):c.match("DOCTYPE",!0,!0)?(c.eatWhile(/[\w\._\-]/),p(r(1))):null:c.eat("?")?(c.eatWhile(/[\w\._\-]/),v.tokenize=s("meta","?>"),"meta"):(D=c.eat("/")?"closeTag":"openTag",v.tokenize=f,"tag bracket");if(E=="&"){var U;return c.eat("#")?c.eat("x")?U=c.eatWhile(/[a-fA-F\d]/)&&c.eat(";"):U=c.eatWhile(/[\d]/)&&c.eat(";"):U=c.eatWhile(/[\w\.\-:]/)&&c.eat(";"),U?"atom":"error"}else return c.eatWhile(/[^&<]/),null}m.isInText=!0;function f(c,v){var p=c.next();if(p==">"||p=="/"&&c.eat(">"))return v.tokenize=m,D=p==">"?"endTag":"selfcloseTag","tag bracket";if(p=="=")return D="equals",null;if(p=="<"){v.tokenize=m,v.state=n,v.tagName=v.tagStart=null;var E=v.tokenize(c,v);return E?E+" tag error":"tag error"}else return/[\'\"]/.test(p)?(v.tokenize=d(p),v.stringStartCol=c.column(),v.tokenize(c,v)):(c.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(c){var v=function(p,E){for(;!p.eol();)if(p.next()==c){E.tokenize=f;break}return"string"};return v.isInAttribute=!0,v}function s(c,v){return function(p,E){for(;!p.eol();){if(p.match(v)){E.tokenize=m;break}p.next()}return c}}function r(c){return function(v,p){for(var E;(E=v.next())!=null;){if(E=="<")return p.tokenize=r(c+1),p.tokenize(v,p);if(E==">")if(c==1){p.tokenize=m;break}else return p.tokenize=r(c-1),p.tokenize(v,p)}return"meta"}}function u(c,v,p){this.prev=c.context,this.tagName=v,this.indent=c.indented,this.startOfLine=p,(H.doNotIndent.hasOwnProperty(v)||c.context&&c.context.noIndent)&&(this.noIndent=!0)}function o(c){c.context&&(c.context=c.context.prev)}function a(c,v){for(var p;;){if(!c.context)return;if(p=c.context.tagName,!H.contextGrabbers.hasOwnProperty(p)||!H.contextGrabbers[p].hasOwnProperty(v))return;o(c)}}function n(c,v,p){return c=="openTag"?(p.tagStart=v.column(),R):c=="closeTag"?w:n}function R(c,v,p){return c=="word"?(p.tagName=v.current(),b="tag",C):H.allowMissingTagName&&c=="endTag"?(b="tag bracket",C(c,v,p)):(b="error",R)}function w(c,v,p){if(c=="word"){var E=v.current();return p.context&&p.context.tagName!=E&&H.implicitlyClosed.hasOwnProperty(p.context.tagName)&&o(p),p.context&&p.context.tagName==E||H.matchClosing===!1?(b="tag",x):(b="tag error",O)}else return H.allowMissingTagName&&c=="endTag"?(b="tag bracket",x(c,v,p)):(b="error",O)}function x(c,v,p){return c!="endTag"?(b="error",x):(o(p),n)}function O(c,v,p){return b="error",x(c,v,p)}function C(c,v,p){if(c=="word")return b="attribute",_;if(c=="endTag"||c=="selfcloseTag"){var E=p.tagName,U=p.tagStart;return p.tagName=p.tagStart=null,c=="selfcloseTag"||H.autoSelfClosers.hasOwnProperty(E)?a(p,E):(a(p,E),p.context=new u(p,E,U==p.indented)),n}return b="error",C}function _(c,v,p){return c=="equals"?y:(H.allowMissing||(b="error"),C(c,v,p))}function y(c,v,p){return c=="string"?h:c=="word"&&H.allowUnquoted?(b="string",C):(b="error",C(c,v,p))}function h(c,v,p){return c=="string"?h:C(c,v,p)}return{startState:function(c){var v={tokenize:m,state:n,indented:c||0,tagName:null,tagStart:null,context:null};return c!=null&&(v.baseIndent=c),v},token:function(c,v){if(!v.tagName&&c.sol()&&(v.indented=c.indentation()),c.eatSpace())return null;D=null;var p=v.tokenize(c,v);return(p||D)&&p!="comment"&&(b=null,v.state=v.state(D||p,c,v),b&&(p=b=="error"?p+" error":b)),p},indent:function(c,v,p){var E=c.context;if(c.tokenize.isInAttribute)return c.tagStart==c.indented?c.stringStartCol+1:c.indented+M;if(E&&E.noIndent)return te.Pass;if(c.tokenize!=f&&c.tokenize!=m)return p?p.match(/^(\s*)/)[0].length:0;if(c.tagName)return H.multilineTagIndentPastTag!==!1?c.tagStart+c.tagName.length+2:c.tagStart+M*(H.multilineTagIndentFactor||1);if(H.alignCDATA&&/$/,blockCommentStart:"",configuration:H.htmlMode?"html":"xml",helperType:H.htmlMode?"html":"xml",skipAttribute:function(c){c.state==y&&(c.state=C)},xmlCurrentTag:function(c){return c.tagName?{name:c.tagName,close:c.type=="closeTag"}:null},xmlCurrentContext:function(c){for(var v=[],p=c.context;p;p=p.prev)p.tagName&&v.push(p.tagName);return v.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(tn,Qe,I){"use strict";I.d(Qe,"d",function(){return An}),I.d(Qe,"b",function(){return me}),I.d(Qe,"c",function(){return Tt}),I.d(Qe,"a",function(){return En});var te=I("VTBJ"),Y=I("1OyB"),N=I("vuIU"),K=I("JX7q"),A=I("Ji7U"),M=I("LK+K"),H=I("q1tI"),P=I("I8Z2"),k=I("BGR+"),D=I("wx14"),b=I("rePB"),m=I("4IlW"),f=I("2GS6"),d=I("Gytx"),s=I.n(d),r=I("TSYQ"),u=I.n(r),o=I("U8pU"),a=I("ODXe"),n=/iPhone/i,R=/iPod/i,w=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,O=/Android/i,C=/\bAndroid(?:.+)SD4930UR\b/i,_=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,y=/Windows Phone/i,h=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,v=/BB10/i,p=/Opera Mini/i,E=/\b(CriOS|Chrome)(?:.+)Mobile/i,U=/Mobile(?:.+)Firefox\b/i;function F(Qt,gt){return Qt.test(gt)}function z(Qt){var gt=Qt||(typeof navigator!="undefined"?navigator.userAgent:""),yt=gt.split("[FBAN");if(typeof yt[1]!="undefined"){var rt=yt,ce=Object(a.a)(rt,1);gt=ce[0]}if(yt=gt.split("Twitter"),typeof yt[1]!="undefined"){var Re=yt,At=Object(a.a)(Re,1);gt=At[0]}var ot={apple:{phone:F(n,gt)&&!F(y,gt),ipod:F(R,gt),tablet:!F(n,gt)&&F(w,gt)&&!F(y,gt),device:(F(n,gt)||F(R,gt)||F(w,gt))&&!F(y,gt)},amazon:{phone:F(C,gt),tablet:!F(C,gt)&&F(_,gt),device:F(C,gt)||F(_,gt)},android:{phone:!F(y,gt)&&F(C,gt)||!F(y,gt)&&F(x,gt),tablet:!F(y,gt)&&!F(C,gt)&&!F(x,gt)&&(F(_,gt)||F(O,gt)),device:!F(y,gt)&&(F(C,gt)||F(_,gt)||F(x,gt)||F(O,gt))||F(/\bokhttp\b/i,gt)},windows:{phone:F(y,gt),tablet:F(h,gt),device:F(y,gt)||F(h,gt)},other:{blackberry:F(c,gt),blackberry10:F(v,gt),opera:F(p,gt),firefox:F(U,gt),chrome:F(E,gt),device:F(c,gt)||F(v,gt)||F(p,gt)||F(U,gt)||F(E,gt)},any:null,phone:null,tablet:null};return ot.any=ot.apple.device||ot.android.device||ot.windows.device||ot.other.device,ot.phone=ot.apple.phone||ot.android.phone||ot.windows.phone,ot.tablet=ot.apple.tablet||ot.android.tablet||ot.windows.tablet,ot}var G=Object(te.a)(Object(te.a)({},z()),{},{isMobile:z}),B=G;function T(){}function V(Qt,gt,yt){var rt=gt||"";return Qt.key||"".concat(rt,"item_").concat(yt)}function Z(Qt){return"".concat(Qt,"-menu-")}function oe(Qt,gt){var yt=-1;H.Children.forEach(Qt,function(rt){yt+=1,rt&&rt.type&&rt.type.isMenuItemGroup?H.Children.forEach(rt.props.children,function(ce){yt+=1,gt(ce,yt)}):gt(rt,yt)})}function pe(Qt,gt,yt){if(!Qt||yt.find)return;H.Children.forEach(Qt,function(rt){if(rt){var ce=rt.type;if(!ce||!(ce.isSubMenu||ce.isMenuItem||ce.isMenuItemGroup))return;gt.indexOf(rt.key)!==-1?yt.find=!0:rt.props.children&&pe(rt.props.children,gt,yt)}})}var Ye=["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(gt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,rt=gt&&typeof gt.getBoundingClientRect=="function"&>.getBoundingClientRect().width;if(rt){if(yt){var ce=getComputedStyle(gt),Re=ce.marginLeft,At=ce.marginRight;rt+=+Re.replace("px","")+ +At.replace("px","")}rt=+rt.toFixed(6)}return rt||0},Ie=function(gt,yt,rt){gt&&Object(o.a)(gt.style)==="object"&&(gt.style[yt]=rt)},Je=function(){return B.any},Ke=I("KQm4"),be=I("Ff2n"),de=I("i8i4"),nt=I("bdgK"),Kt=I("uciX"),jt=I("8XRh"),wt={adjustX:1,adjustY:1},ze={topLeft:{points:["bl","tl"],overflow:wt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:wt,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:wt,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:wt,offset:[4,0]}},ft={topLeft:{points:["bl","tl"],overflow:wt,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:wt,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:wt,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:wt,offset:[4,0]}},dt=ze,Nt=0,Ze={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Bt=function(gt,yt,rt){var ce=Z(yt),Re=gt.getState();gt.setState({defaultActiveFirst:Object(te.a)(Object(te.a)({},Re.defaultActiveFirst),{},Object(b.a)({},ce,rt))})},Ut=function(Qt){Object(A.a)(yt,Qt);var gt=Object(M.a)(yt);function yt(rt){var ce;Object(Y.a)(this,yt),ce=gt.call(this,rt),ce.onDestroy=function(_e){ce.props.onDestroy(_e)},ce.onKeyDown=function(_e){var Ne=_e.keyCode,xt=ce.menuInstance,Xt=ce.props,vn=Xt.isOpen,Mn=Xt.store;if(Ne===m.a.ENTER)return ce.onTitleClick(_e),Bt(Mn,ce.props.eventKey,!0),!0;if(Ne===m.a.RIGHT)return vn?xt.onKeyDown(_e):(ce.triggerOpenChange(!0),Bt(Mn,ce.props.eventKey,!0)),!0;if(Ne===m.a.LEFT){var ci;if(vn)ci=xt.onKeyDown(_e);else return;return ci||(ce.triggerOpenChange(!1),ci=!0),ci}return vn&&(Ne===m.a.UP||Ne===m.a.DOWN)?xt.onKeyDown(_e):void 0},ce.onOpenChange=function(_e){ce.props.onOpenChange(_e)},ce.onPopupVisibleChange=function(_e){ce.triggerOpenChange(_e,_e?"mouseenter":"mouseleave")},ce.onMouseEnter=function(_e){var Ne=ce.props,xt=Ne.eventKey,Xt=Ne.onMouseEnter,vn=Ne.store;Bt(vn,ce.props.eventKey,!1),Xt({key:xt,domEvent:_e})},ce.onMouseLeave=function(_e){var Ne=ce.props,xt=Ne.parentMenu,Xt=Ne.eventKey,vn=Ne.onMouseLeave;xt.subMenuInstance=Object(K.a)(ce),vn({key:Xt,domEvent:_e})},ce.onTitleMouseEnter=function(_e){var Ne=ce.props,xt=Ne.eventKey,Xt=Ne.onItemHover,vn=Ne.onTitleMouseEnter;Xt({key:xt,hover:!0}),vn({key:xt,domEvent:_e})},ce.onTitleMouseLeave=function(_e){var Ne=ce.props,xt=Ne.parentMenu,Xt=Ne.eventKey,vn=Ne.onItemHover,Mn=Ne.onTitleMouseLeave;xt.subMenuInstance=Object(K.a)(ce),vn({key:Xt,hover:!1}),Mn({key:Xt,domEvent:_e})},ce.onTitleClick=function(_e){var Ne=Object(K.a)(ce),xt=Ne.props;if(xt.onTitleClick({key:xt.eventKey,domEvent:_e}),xt.triggerSubMenuAction==="hover")return;ce.triggerOpenChange(!xt.isOpen,"click"),Bt(xt.store,ce.props.eventKey,!1)},ce.onSubMenuClick=function(_e){typeof ce.props.onClick=="function"&&ce.props.onClick(ce.addKeyPath(_e))},ce.onSelect=function(_e){ce.props.onSelect(_e)},ce.onDeselect=function(_e){ce.props.onDeselect(_e)},ce.getPrefixCls=function(){return"".concat(ce.props.rootPrefixCls,"-submenu")},ce.getActiveClassName=function(){return"".concat(ce.getPrefixCls(),"-active")},ce.getDisabledClassName=function(){return"".concat(ce.getPrefixCls(),"-disabled")},ce.getSelectedClassName=function(){return"".concat(ce.getPrefixCls(),"-selected")},ce.getOpenClassName=function(){return"".concat(ce.props.rootPrefixCls,"-submenu-open")},ce.saveMenuInstance=function(_e){ce.menuInstance=_e},ce.addKeyPath=function(_e){return Object(te.a)(Object(te.a)({},_e),{},{keyPath:(_e.keyPath||[]).concat(ce.props.eventKey)})},ce.triggerOpenChange=function(_e,Ne){var xt=ce.props.eventKey,Xt=function(){ce.onOpenChange({key:xt,item:Object(K.a)(ce),trigger:Ne,open:_e})};Ne==="mouseenter"?ce.mouseenterTimeout=setTimeout(function(){Xt()},0):Xt()},ce.isChildrenSelected=function(){var _e={find:!1};return pe(ce.props.children,ce.props.selectedKeys,_e),_e.find},ce.isOpen=function(){return ce.props.openKeys.indexOf(ce.props.eventKey)!==-1},ce.adjustWidth=function(){if(!ce.subMenuTitle||!ce.menuInstance)return;var _e=de.findDOMNode(ce.menuInstance);if(_e.offsetWidth>=ce.subMenuTitle.offsetWidth)return;_e.style.minWidth="".concat(ce.subMenuTitle.offsetWidth,"px")},ce.saveSubMenuTitle=function(_e){ce.subMenuTitle=_e},ce.getBaseProps=function(){var _e=Object(K.a)(ce),Ne=_e.props;return{mode:Ne.mode==="horizontal"?"vertical":Ne.mode,visible:ce.props.isOpen,level:Ne.level+1,inlineIndent:Ne.inlineIndent,focusable:!1,onClick:ce.onSubMenuClick,onSelect:ce.onSelect,onDeselect:ce.onDeselect,onDestroy:ce.onDestroy,selectedKeys:Ne.selectedKeys,eventKey:"".concat(Ne.eventKey,"-menu-"),openKeys:Ne.openKeys,motion:Ne.motion,onOpenChange:ce.onOpenChange,subMenuOpenDelay:Ne.subMenuOpenDelay,parentMenu:Object(K.a)(ce),subMenuCloseDelay:Ne.subMenuCloseDelay,forceSubMenuRender:Ne.forceSubMenuRender,triggerSubMenuAction:Ne.triggerSubMenuAction,builtinPlacements:Ne.builtinPlacements,defaultActiveFirst:Ne.store.getState().defaultActiveFirst[Z(Ne.eventKey)],multiple:Ne.multiple,prefixCls:Ne.rootPrefixCls,id:ce.internalMenuId,manualRef:ce.saveMenuInstance,itemIcon:Ne.itemIcon,expandIcon:Ne.expandIcon,direction:Ne.direction}},ce.getMotion=function(_e,Ne){var xt=Object(K.a)(ce),Xt=xt.haveRendered,vn=ce.props,Mn=vn.motion,ci=vn.rootPrefixCls,$n=Object(te.a)(Object(te.a)({},Mn),{},{leavedClassName:"".concat(ci,"-hidden"),removeOnLeave:!1,motionAppear:Xt||!Ne||_e!=="inline"});return $n};var Re=rt.store,At=rt.eventKey,ot=Re.getState(),Yt=ot.defaultActiveFirst;ce.isRootMenu=!1;var rn=!1;return Yt&&(rn=Yt[At]),Bt(Re,At,rn),ce}return Object(N.a)(yt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ce=this,Re=this.props,At=Re.mode,ot=Re.parentMenu,Yt=Re.manualRef;if(Yt&&Yt(this),At!=="horizontal"||!ot.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return ce.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ce=this.props,Re=ce.onDestroy,At=ce.eventKey;Re&&Re(At),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(ce){var Re=this,At=this.getBaseProps(),ot=this.getMotion(At.mode,At.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||At.visible||At.forceSubMenuRender,!this.haveOpened)return H.createElement("div",null);var Yt=At.direction;return H.createElement(jt.default,Object.assign({visible:At.visible},ot),function(rn){var _e=rn.className,Ne=rn.style,xt=u()("".concat(At.prefixCls,"-sub"),_e,Object(b.a)({},"".concat(At.prefixCls,"-rtl"),Yt==="rtl"));return H.createElement(Ae,Object.assign({},At,{id:Re.internalMenuId,className:xt,style:Ne}),ce)})}},{key:"render",value:function(){var ce,Re=Object(te.a)({},this.props),At=Re.isOpen,ot=this.getPrefixCls(),Yt=Re.mode==="inline",rn=u()(ot,"".concat(ot,"-").concat(Re.mode),(ce={},Object(b.a)(ce,Re.className,!!Re.className),Object(b.a)(ce,this.getOpenClassName(),At),Object(b.a)(ce,this.getActiveClassName(),Re.active||At&&!Yt),Object(b.a)(ce,this.getDisabledClassName(),Re.disabled),Object(b.a)(ce,this.getSelectedClassName(),this.isChildrenSelected()),ce));this.internalMenuId||(Re.eventKey?this.internalMenuId="".concat(Re.eventKey,"$Menu"):(Nt+=1,this.internalMenuId="$__$".concat(Nt,"$Menu")));var _e={},Ne={},xt={};Re.disabled||(_e={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ne={onClick:this.onTitleClick},xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Xt={},vn=Re.direction;Yt&&(vn==="rtl"?Xt.paddingRight=Re.inlineIndent*Re.level:Xt.paddingLeft=Re.inlineIndent*Re.level);var Mn={};this.props.isOpen&&(Mn={"aria-owns":this.internalMenuId});var ci=null;Re.mode!=="horizontal"&&(ci=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(ci=H.createElement(this.props.expandIcon,Object(te.a)({},this.props))));var $n=H.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Xt,className:"".concat(ot,"-title"),role:"button"},xt,Ne,{"aria-expanded":At},Mn,{"aria-haspopup":"true",title:typeof Re.title=="string"?Re.title:void 0}),Re.title,ci||H.createElement("i",{className:"".concat(ot,"-arrow")})),Cn=this.renderChildren(Re.children),Ti=Re.parentMenu.isRootMenu?Re.parentMenu.props.getPopupContainer:function(tr){return tr.parentNode},Wi=Ze[Re.mode],hi=Re.popupOffset?{offset:Re.popupOffset}:{},fi=Re.mode==="inline"?"":Re.popupClassName;fi+=vn==="rtl"?" ".concat(ot,"-rtl"):"";var ji=Re.disabled,er=Re.triggerSubMenuAction,yr=Re.subMenuOpenDelay,cn=Re.forceSubMenuRender,ri=Re.subMenuCloseDelay,pr=Re.builtinPlacements;Ye.forEach(function(tr){return delete Re[tr]}),delete Re.onClick;var Cr=vn==="rtl"?Object.assign({},ft,pr):Object.assign({},ze,pr);return delete Re.direction,H.createElement("li",Object.assign({},Re,_e,{className:rn,role:"menuitem"}),Yt&&$n,Yt&&Cn,!Yt&&H.createElement(Kt.a,{prefixCls:ot,popupClassName:u()("".concat(ot,"-popup"),fi),getPopupContainer:Ti,builtinPlacements:Cr,popupPlacement:Wi,popupVisible:At,popupAlign:hi,popup:Cn,action:ji?[]:[er],mouseEnterDelay:yr,mouseLeaveDelay:ri,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:cn},$n))}}]),yt}(H.Component);Ut.defaultProps={onMouseEnter:T,onMouseLeave:T,onTitleMouseEnter:T,onTitleMouseLeave:T,onTitleClick:T,manualRef:T,mode:"vertical",title:""};var Mt=Object(P.b)(function(Qt,gt){var yt=Qt.openKeys,rt=Qt.activeKey,ce=Qt.selectedKeys,Re=gt.eventKey,At=gt.subMenuKey;return{isOpen:yt.indexOf(Re)>-1,active:rt[At]===Re,selectedKeys:ce}})(Ut);Mt.isSubMenu=!0;var An=Mt,mn="menuitem-overflowed",pn=.5,tt=function(Qt){Object(A.a)(yt,Qt);var gt=Object(M.a)(yt);function yt(){var rt;return Object(Y.a)(this,yt),rt=gt.apply(this,arguments),rt.resizeObserver=null,rt.mutationObserver=null,rt.originalTotalWidth=0,rt.overflowedItems=[],rt.menuItemSizes=[],rt.cancelFrameId=null,rt.state={lastVisibleIndex:void 0},rt.getMenuItemNodes=function(){var ce=rt.props.prefixCls,Re=de.findDOMNode(Object(K.a)(rt));return Re?[].slice.call(Re.children).filter(function(At){return At.className.split(" ").indexOf("".concat(ce,"-overflowed-submenu"))<0}):[]},rt.getOverflowedSubMenuItem=function(ce,Re,At){var ot=rt.props,Yt=ot.overflowedIndicator,rn=ot.level,_e=ot.mode,Ne=ot.prefixCls,xt=ot.theme;if(rn!==1||_e!=="horizontal")return null;var Xt=rt.props.children[0],vn=Xt.props,Mn=vn.children,ci=vn.title,$n=vn.style,Cn=Object(be.a)(vn,["children","title","style"]),Ti=Object(te.a)({},$n),Wi="".concat(ce,"-overflowed-indicator"),hi="".concat(ce,"-overflowed-indicator");Re.length===0&&At!==!0?Ti=Object(te.a)(Object(te.a)({},Ti),{},{display:"none"}):At&&(Ti=Object(te.a)(Object(te.a)({},Ti),{},{visibility:"hidden",position:"absolute"}),Wi="".concat(Wi,"-placeholder"),hi="".concat(hi,"-placeholder"));var fi=xt?"".concat(Ne,"-").concat(xt):"",ji={};return Ye.forEach(function(er){Cn[er]!==void 0&&(ji[er]=Cn[er])}),H.createElement(An,Object.assign({title:Yt,className:"".concat(Ne,"-overflowed-submenu"),popupClassName:fi},ji,{key:Wi,eventKey:hi,disabled:!1,style:Ti}),Re)},rt.setChildrenWidthAndResize=function(){if(rt.props.mode!=="horizontal")return;var ce=de.findDOMNode(Object(K.a)(rt));if(!ce)return;var Re=ce.children;if(!Re||Re.length===0)return;var At=ce.children[Re.length-1];Ie(At,"display","inline-block");var ot=rt.getMenuItemNodes(),Yt=ot.filter(function(rn){return rn.className.split(" ").indexOf(mn)>=0});Yt.forEach(function(rn){Ie(rn,"display","inline-block")}),rt.menuItemSizes=ot.map(function(rn){return xe(rn,!0)}),Yt.forEach(function(rn){Ie(rn,"display","none")}),rt.overflowedIndicatorWidth=xe(ce.children[ce.children.length-1],!0),rt.originalTotalWidth=rt.menuItemSizes.reduce(function(rn,_e){return rn+_e},0),rt.handleResize(),Ie(At,"display","none")},rt.handleResize=function(){if(rt.props.mode!=="horizontal")return;var ce=de.findDOMNode(Object(K.a)(rt));if(!ce)return;var Re=xe(ce);rt.overflowedItems=[];var At=0,ot;rt.originalTotalWidth>Re+pn&&(ot=-1,rt.menuItemSizes.forEach(function(Yt){At+=Yt,At+rt.overflowedIndicatorWidth<=Re&&(ot+=1)})),rt.setState({lastVisibleIndex:ot})},rt}return Object(N.a)(yt,[{key:"componentDidMount",value:function(){var ce=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Re=de.findDOMNode(this);if(!Re)return;this.resizeObserver=new nt.default(function(At){At.forEach(function(){var ot=ce.cancelFrameId;cancelAnimationFrame(ot),ce.cancelFrameId=requestAnimationFrame(ce.setChildrenWidthAndResize)})}),[].slice.call(Re.children).concat(Re).forEach(function(At){ce.resizeObserver.observe(At)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ce.resizeObserver.disconnect(),[].slice.call(Re.children).concat(Re).forEach(function(At){ce.resizeObserver.observe(At)}),ce.setChildrenWidthAndResize()}),this.mutationObserver.observe(Re,{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(ce){var Re=this,At=this.state.lastVisibleIndex;return(ce||[]).reduce(function(ot,Yt,rn){var _e=Yt;if(Re.props.mode==="horizontal"){var Ne=Re.getOverflowedSubMenuItem(Yt.props.eventKey,[]);At!==void 0&&Re.props.className.indexOf("".concat(Re.props.prefixCls,"-root"))!==-1&&(rn>At&&(_e=H.cloneElement(Yt,{style:{display:"none"},eventKey:"".concat(Yt.props.eventKey,"-hidden"),className:"".concat(mn)})),rn===At+1&&(Re.overflowedItems=ce.slice(At+1).map(function(Xt){return H.cloneElement(Xt,{key:Xt.props.eventKey,mode:"vertical-left"})}),Ne=Re.getOverflowedSubMenuItem(Yt.props.eventKey,Re.overflowedItems)));var xt=[].concat(Object(Ke.a)(ot),[Ne,_e]);return rn===ce.length-1&&xt.push(Re.getOverflowedSubMenuItem(Yt.props.eventKey,[],!0)),xt}return[].concat(Object(Ke.a)(ot),[_e])},[])}},{key:"render",value:function(){var ce=this.props,Re=ce.visible,At=ce.prefixCls,ot=ce.overflowedIndicator,Yt=ce.mode,rn=ce.level,_e=ce.tag,Ne=ce.children,xt=ce.theme,Xt=Object(be.a)(ce,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),vn=_e;return H.createElement(vn,Object.assign({},Xt),this.renderChildren(Ne))}}]),yt}(H.Component);tt.defaultProps={tag:"div",className:""};var fn=tt;function In(Qt){return Qt.length?Qt.every(function(gt){return!!gt.props.disabled}):!0}function He(Qt,gt,yt){var rt=Qt.getState();Qt.setState({activeKey:Object(te.a)(Object(te.a)({},rt.activeKey),{},Object(b.a)({},gt,yt))})}function Ue(Qt){return Qt.eventKey||"0-menu-"}function pt(Qt,gt){var yt=gt,rt=Qt.children,ce=Qt.eventKey;if(yt){var Re;if(oe(rt,function(At,ot){At&&At.props&&!At.props.disabled&&yt===V(At,ce,ot)&&(Re=!0)}),Re)return yt}return yt=null,Qt.defaultActiveFirst&&oe(rt,function(At,ot){!yt&&At&&!At.props.disabled&&(yt=V(At,ce,ot))}),yt}function Ct(Qt){if(Qt){var gt=this.instanceArray.indexOf(Qt);gt!==-1?this.instanceArray[gt]=Qt:this.instanceArray.push(Qt)}}var Ge=function(Qt){Object(A.a)(yt,Qt);var gt=Object(M.a)(yt);function yt(rt){var ce;return Object(Y.a)(this,yt),ce=gt.call(this,rt),ce.onKeyDown=function(Re,At){var ot=Re.keyCode,Yt;if(ce.getFlatInstanceArray().forEach(function(_e){_e&&_e.props.active&&_e.onKeyDown&&(Yt=_e.onKeyDown(Re))}),Yt)return 1;var rn=null;return(ot===m.a.UP||ot===m.a.DOWN)&&(rn=ce.step(ot===m.a.UP?-1:1)),rn?(Re.preventDefault(),He(ce.props.store,Ue(ce.props),rn.props.eventKey),typeof At=="function"&&At(rn),1):void 0},ce.onItemHover=function(Re){var At=Re.key,ot=Re.hover;He(ce.props.store,Ue(ce.props),ot?At:null)},ce.onDeselect=function(Re){ce.props.onDeselect(Re)},ce.onSelect=function(Re){ce.props.onSelect(Re)},ce.onClick=function(Re){ce.props.onClick(Re)},ce.onOpenChange=function(Re){ce.props.onOpenChange(Re)},ce.onDestroy=function(Re){ce.props.onDestroy(Re)},ce.getFlatInstanceArray=function(){return ce.instanceArray},ce.step=function(Re){var At=ce.getFlatInstanceArray(),ot=ce.props.store.getState().activeKey[Ue(ce.props)],Yt=At.length;if(!Yt)return null;Re<0&&(At=At.concat().reverse());var rn=-1;if(At.every(function(Xt,vn){return Xt&&Xt.props.eventKey===ot?(rn=vn,!1):!0}),!ce.props.defaultActiveFirst&&rn!==-1&&In(At.slice(rn,Yt-1)))return;var _e=(rn+1)%Yt,Ne=_e;do{var xt=At[Ne];if(!xt||xt.props.disabled)Ne=(Ne+1)%Yt;else return xt}while(Ne!==_e);return null},ce.renderCommonMenuItem=function(Re,At,ot){var Yt=ce.props.store.getState(),rn=Object(K.a)(ce),_e=rn.props,Ne=V(Re,_e.eventKey,At),xt=Re.props;if(!xt||typeof Re.type=="string")return Re;var Xt=Ne===Yt.activeKey,vn=Object(te.a)(Object(te.a)({mode:xt.mode||_e.mode,level:_e.level,inlineIndent:_e.inlineIndent,renderMenuItem:ce.renderMenuItem,rootPrefixCls:_e.prefixCls,index:At,parentMenu:_e.parentMenu,manualRef:xt.disabled?void 0:Object(f.a)(Re.ref,Ct.bind(Object(K.a)(ce))),eventKey:Ne,active:!xt.disabled&&Xt,multiple:_e.multiple,onClick:function(ci){(xt.onClick||T)(ci),ce.onClick(ci)},onItemHover:ce.onItemHover,motion:_e.motion,subMenuOpenDelay:_e.subMenuOpenDelay,subMenuCloseDelay:_e.subMenuCloseDelay,forceSubMenuRender:_e.forceSubMenuRender,onOpenChange:ce.onOpenChange,onDeselect:ce.onDeselect,onSelect:ce.onSelect,builtinPlacements:_e.builtinPlacements,itemIcon:xt.itemIcon||ce.props.itemIcon,expandIcon:xt.expandIcon||ce.props.expandIcon},ot),{},{direction:_e.direction});return(_e.mode==="inline"||Je())&&(vn.triggerSubMenuAction="click"),H.cloneElement(Re,vn)},ce.renderMenuItem=function(Re,At,ot){if(!Re)return null;var Yt=ce.props.store.getState(),rn={openKeys:Yt.openKeys,selectedKeys:Yt.selectedKeys,triggerSubMenuAction:ce.props.triggerSubMenuAction,subMenuKey:ot};return ce.renderCommonMenuItem(Re,At,rn)},rt.store.setState({activeKey:Object(te.a)(Object(te.a)({},rt.store.getState().activeKey),{},Object(b.a)({},rt.eventKey,pt(rt,rt.activeKey)))}),ce.instanceArray=[],ce}return Object(N.a)(yt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ce){return this.props.visible||ce.visible||this.props.className!==ce.className||!s()(this.props.style,ce.style)}},{key:"componentDidUpdate",value:function(ce){var Re=this.props,At="activeKey"in Re?Re.activeKey:Re.store.getState().activeKey[Ue(Re)],ot=pt(Re,At);if(ot!==At)He(Re.store,Ue(Re),ot);else if("activeKey"in ce){var Yt=pt(ce,ce.activeKey);ot!==Yt&&He(Re.store,Ue(Re),ot)}}},{key:"render",value:function(){var ce=this,Re=Object(D.a)({},this.props);this.instanceArray=[];var At=u()(Re.prefixCls,Re.className,"".concat(Re.prefixCls,"-").concat(Re.mode)),ot={className:At,role:Re.role||"menu"};Re.id&&(ot.id=Re.id),Re.focusable&&(ot.tabIndex=0,ot.onKeyDown=this.onKeyDown);var Yt=Re.prefixCls,rn=Re.eventKey,_e=Re.visible,Ne=Re.level,xt=Re.mode,Xt=Re.overflowedIndicator,vn=Re.theme;return Ye.forEach(function(Mn){return delete Re[Mn]}),delete Re.onClick,H.createElement(fn,Object.assign({},Re,{prefixCls:Yt,mode:xt,tag:"ul",level:Ne,theme:vn,visible:_e,overflowedIndicator:Xt},ot),H.Children.map(Re.children,function(Mn,ci){return ce.renderMenuItem(Mn,ci,rn||"0-menu-")}))}}]),yt}(H.Component);Ge.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:T};var vt=Object(P.b)()(Ge),Ae=vt,ge=I("Kwbf");function Ee(Qt,gt,yt){var rt=Qt.prefixCls,ce=Qt.motion,Re=Qt.defaultMotions,At=Re===void 0?{}:Re,ot=Qt.openAnimation,Yt=Qt.openTransitionName,rn=gt.switchingModeFromInline;if(ce)return ce;if(Object(o.a)(ot)==="object"&&ot)Object(ge.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ot=="string")return{motionName:"".concat(rt,"-open-").concat(ot)};if(Yt)return{motionName:Yt};var _e=At[yt];return _e||(rn?null:At.other)}var ae=function(Qt){Object(A.a)(yt,Qt);var gt=Object(M.a)(yt);function yt(rt){var ce;Object(Y.a)(this,yt),ce=gt.call(this,rt),ce.inlineOpenKeys=[],ce.onSelect=function(ot){var Yt=Object(K.a)(ce),rn=Yt.props;if(rn.selectable){var _e=ce.store.getState(),Ne=_e.selectedKeys,xt=ot.key;rn.multiple?Ne=Ne.concat([xt]):Ne=[xt],"selectedKeys"in rn||ce.store.setState({selectedKeys:Ne}),rn.onSelect(Object(te.a)(Object(te.a)({},ot),{},{selectedKeys:Ne}))}},ce.onClick=function(ot){var Yt=ce.getRealMenuMode(),rn=Object(K.a)(ce),_e=rn.store,Ne=rn.props.onOpenChange;Yt!=="inline"&&!("openKeys"in ce.props)&&(_e.setState({openKeys:[]}),Ne([])),ce.props.onClick(ot)},ce.onKeyDown=function(ot,Yt){ce.innerMenu.getWrappedInstance().onKeyDown(ot,Yt)},ce.onOpenChange=function(ot){var Yt=Object(K.a)(ce),rn=Yt.props,_e=ce.store.getState().openKeys.concat(),Ne=!1,xt=function(vn){var Mn=!1;if(vn.open)Mn=_e.indexOf(vn.key)===-1,Mn&&_e.push(vn.key);else{var ci=_e.indexOf(vn.key);Mn=ci!==-1,Mn&&_e.splice(ci,1)}Ne=Ne||Mn};Array.isArray(ot)?ot.forEach(xt):xt(ot),Ne&&("openKeys"in ce.props||ce.store.setState({openKeys:_e}),rn.onOpenChange(_e))},ce.onDeselect=function(ot){var Yt=Object(K.a)(ce),rn=Yt.props;if(rn.selectable){var _e=ce.store.getState().selectedKeys.concat(),Ne=ot.key,xt=_e.indexOf(Ne);xt!==-1&&_e.splice(xt,1),"selectedKeys"in rn||ce.store.setState({selectedKeys:_e}),rn.onDeselect(Object(te.a)(Object(te.a)({},ot),{},{selectedKeys:_e}))}},ce.onMouseEnter=function(ot){ce.restoreModeVerticalFromInline();var Yt=ce.props.onMouseEnter;Yt&&Yt(ot)},ce.onTransitionEnd=function(ot){var Yt=ot.propertyName==="width"&&ot.target===ot.currentTarget,rn=ot.target.className,_e=Object.prototype.toString.call(rn)==="[object SVGAnimatedString]"?rn.animVal:rn,Ne=ot.propertyName==="font-size"&&_e.indexOf("anticon")>=0;(Yt||Ne)&&ce.restoreModeVerticalFromInline()},ce.setInnerMenu=function(ot){ce.innerMenu=ot},ce.isRootMenu=!0;var Re=rt.defaultSelectedKeys,At=rt.defaultOpenKeys;return"selectedKeys"in rt&&(Re=rt.selectedKeys||[]),"openKeys"in rt&&(At=rt.openKeys||[]),ce.store=Object(P.c)({selectedKeys:Re,openKeys:At,activeKey:{"0-menu-":pt(rt,rt.activeKey)}}),ce.state={switchingModeFromInline:!1},ce}return Object(N.a)(yt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ce){this.updateOpentKeysWhenSwitchMode(ce),this.updateMiniStore();var Re=this.props,At=Re.siderCollapsed,ot=Re.inlineCollapsed,Yt=Re.onOpenChange;(!ce.inlineCollapsed&&ot||!ce.siderCollapsed&&At)&&Yt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(ce){var Re=this.props,At=this.store,ot=this.inlineOpenKeys,Yt=At.getState(),rn={};ce.mode==="inline"&&Re.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Re||((Re.inlineCollapsed&&!ce.inlineCollapsed||Re.siderCollapsed&&!ce.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Yt.openKeys.concat(),rn.openKeys=[]),(!Re.inlineCollapsed&&ce.inlineCollapsed||!Re.siderCollapsed&&ce.siderCollapsed)&&(rn.openKeys=ot,this.inlineOpenKeys=[])),Object.keys(rn).length&&At.setState(rn)}},{key:"updateMenuDisplay",value:function(){var ce=this.props.collapsedWidth,Re=this.store,At=this.prevOpenKeys,ot=this.getInlineCollapsed()&&(ce===0||ce==="0"||ce==="0px");ot?(this.prevOpenKeys=Re.getState().openKeys.concat(),this.store.setState({openKeys:[]})):At&&(this.store.setState({openKeys:At}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ce=this.props.mode,Re=this.state.switchingModeFromInline,At=this.getInlineCollapsed();return Re&&At?"inline":At?"vertical":ce}},{key:"getInlineCollapsed",value:function(){var ce=this.props,Re=ce.inlineCollapsed,At=ce.siderCollapsed;return At!==void 0?At:Re}},{key:"restoreModeVerticalFromInline",value:function(){var ce=this.state.switchingModeFromInline;ce&&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 ce=Object(te.a)({},Object(k.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Re=this.getRealMenuMode();return ce.className+=" ".concat(ce.prefixCls,"-root"),ce.direction==="rtl"&&(ce.className+=" ".concat(ce.prefixCls,"-rtl")),ce=Object(te.a)(Object(te.a)({},ce),{},{mode:Re,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ee(this.props,this.state,Re)}),delete ce.openAnimation,delete ce.openTransitionName,H.createElement(P.a,{store:this.store},H.createElement(Ae,Object.assign({},ce,{ref:this.setInnerMenu}),this.props.children))}}]),yt}(H.Component);ae.defaultProps={selectable:!0,onClick:T,onSelect:T,onOpenChange:T,onDeselect:T,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:H.createElement("span",null,"\xB7\xB7\xB7")};var re=ae,he=function(Qt){Object(A.a)(yt,Qt);var gt=Object(M.a)(yt);function yt(){var rt;return Object(Y.a)(this,yt),rt=gt.apply(this,arguments),rt.onKeyDown=function(ce){var Re=ce.keyCode;return Re===m.a.ENTER?(rt.onClick(ce),!0):void 0},rt.onMouseLeave=function(ce){var Re=rt.props,At=Re.eventKey,ot=Re.onItemHover,Yt=Re.onMouseLeave;ot({key:At,hover:!1}),Yt({key:At,domEvent:ce})},rt.onMouseEnter=function(ce){var Re=rt.props,At=Re.eventKey,ot=Re.onItemHover,Yt=Re.onMouseEnter;ot({key:At,hover:!0}),Yt({key:At,domEvent:ce})},rt.onClick=function(ce){var Re=rt.props,At=Re.eventKey,ot=Re.multiple,Yt=Re.onClick,rn=Re.onSelect,_e=Re.onDeselect,Ne=Re.isSelected,xt={key:At,keyPath:[At],item:Object(K.a)(rt),domEvent:ce};Yt(xt),ot?Ne?_e(xt):rn(xt):Ne||rn(xt)},rt.saveNode=function(ce){rt.node=ce},rt}return Object(N.a)(yt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ce=this.props;ce.onDestroy&&ce.onDestroy(ce.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 ce,Re=Object(te.a)({},this.props),At=u()(this.getPrefixCls(),Re.className,(ce={},Object(b.a)(ce,this.getActiveClassName(),!Re.disabled&&Re.active),Object(b.a)(ce,this.getSelectedClassName(),Re.isSelected),Object(b.a)(ce,this.getDisabledClassName(),Re.disabled),ce)),ot=Object(te.a)(Object(te.a)({},Re.attribute),{},{title:typeof Re.title=="string"?Re.title:void 0,className:At,role:Re.role||"menuitem","aria-disabled":Re.disabled});Re.role==="option"?ot=Object(te.a)(Object(te.a)({},ot),{},{role:"option","aria-selected":Re.isSelected}):(Re.role===null||Re.role==="none")&&(ot.role="none");var Yt={onClick:Re.disabled?null:this.onClick,onMouseLeave:Re.disabled?null:this.onMouseLeave,onMouseEnter:Re.disabled?null:this.onMouseEnter},rn=Object(te.a)({},Re.style);Re.mode==="inline"&&(Re.direction==="rtl"?rn.paddingRight=Re.inlineIndent*Re.level:rn.paddingLeft=Re.inlineIndent*Re.level),Ye.forEach(function(Ne){return delete Re[Ne]}),delete Re.direction;var _e=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(_e=H.createElement(this.props.itemIcon,this.props)),H.createElement("li",Object.assign({},Object(k.default)(Re,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ot,Yt,{style:rn,ref:this.saveNode}),Re.children,_e)}}]),yt}(H.Component);he.isMenuItem=!0,he.defaultProps={onSelect:T,onMouseEnter:T,onMouseLeave:T,manualRef:T};var ve=Object(P.b)(function(Qt,gt){var yt=Qt.activeKey,rt=Qt.selectedKeys,ce=gt.eventKey,Re=gt.subMenuKey;return{active:yt[Re]===ce,isSelected:rt.indexOf(ce)!==-1}})(he),me=ve,Be=function(Qt){Object(A.a)(yt,Qt);var gt=Object(M.a)(yt);function yt(){var rt;return Object(Y.a)(this,yt),rt=gt.apply(this,arguments),rt.renderInnerMenuItem=function(ce){var Re=rt.props,At=Re.renderMenuItem,ot=Re.index;return At(ce,ot,rt.props.subMenuKey)},rt}return Object(N.a)(yt,[{key:"render",value:function(){var ce=Object(D.a)({},this.props),Re=ce.className,At=Re===void 0?"":Re,ot=ce.rootPrefixCls,Yt="".concat(ot,"-item-group-title"),rn="".concat(ot,"-item-group-list"),_e=ce.title,Ne=ce.children;return Ye.forEach(function(xt){return delete ce[xt]}),delete ce.onClick,delete ce.direction,H.createElement("li",Object.assign({},ce,{className:"".concat(At," ").concat(ot,"-item-group")}),H.createElement("div",{className:Yt,title:typeof _e=="string"?_e:void 0},_e),H.createElement("ul",{className:rn},H.Children.map(Ne,this.renderInnerMenuItem)))}}]),yt}(H.Component);Be.isMenuItemGroup=!0,Be.defaultProps={disabled:!0};var Tt=Be,Jt=function(gt){var yt=gt.className,rt=gt.rootPrefixCls,ce=gt.style;return H.createElement("li",{className:"".concat(yt," ").concat(rt,"-item-divider"),style:ce})};Jt.defaultProps={disabled:!0,className:"",style:{}};var En=Jt,mt=Qe.e=re},"4wi7":function(tn,Qe,I){"use strict";var te=I("14J3"),Y=I("BMrR"),N=I("sRBo"),K=I("kaz8"),A=I("5NDa"),M=I("5rEg"),H=I("9og8"),P=I("tJVT"),k=I("WmNS"),D=I.n(k),b=I("q1tI"),m=I.n(b),f=I("oOBs"),d=I.n(f),s=I("xOL1"),r=I.n(s),u=I("BdwD"),o=function(n){var R=n.data,w=n.value,x=w===void 0?[]:w,O=n.handleChangePage,C=n.setSelectedRowKeys,_=n.selectedRowKeys,y=n.onChange,h=y===void 0?function(){}:y,c=Object(b.useState)([]),v=Object(P.a)(c,2),p=v[0],E=v[1],U=Object(b.useState)([]),F=Object(P.a)(U,2),z=F[0],G=F[1],B=Object(b.useState)([]),T=Object(P.a)(B,2),V=T[0],Z=T[1],oe=Object(b.useState)(1),pe=Object(P.a)(oe,2),Ye=pe[0],xe=pe[1],Ie=Object(b.useState)(),Je=Object(P.a)(Ie,2),Ke=Je[0],be=Je[1];return Object(b.useEffect)(function(){E(R),G([]),Z([])},[R]),Object(b.useEffect)(function(){C&&(G(_),Z(_))},[_]),m.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},m.a.createElement("div",{className:d.a.leftdiv},m.a.createElement(M.a.Search,{size:"large",onChange:function(){var de=Object(H.a)(D.a.mark(function nt(Kt){return D.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:E(R.filter(function(ze){var ft;return ze==null||((ft=ze.name)===null||ft===void 0)?void 0:ft.includes(Kt.target.value)}));case 1:case"end":return wt.stop()}},nt)}));return function(nt){return de.apply(this,arguments)}}(),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),p.length===0&&m.a.createElement(u.a,{styles:{margin:"70px auto"},customText:"\u6682\u65E0\u5206\u73ED"}),m.a.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},m.a.createElement(K.a.Group,{value:z.map(function(de){return"".concat(de.id)}),onChange:function(nt){C(p.filter(function(Kt){return nt.includes("".concat(Kt.id))}))},style:{marginTop:"10px"}},p.map(function(de,nt){return m.a.createElement(Y.a,{key:de.id,style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200}},m.a.createElement(K.a,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:de.is_published,value:"".concat(de.id)},m.a.createElement("div",{className:d.a.listClass},m.a.createElement("span",{className:d.a.spantitle,style:{width:de.is_published?"108px":"170px"}},de.name),de.is_published&&m.a.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"\u5DF2\u53D1\u5E03"))))})))),m.a.createElement("div",{className:d.a.rightdiv},m.a.createElement(M.a.Search,{onChange:function(nt){Z(z.filter(function(Kt){return Kt.name.includes(nt.target.value)}))},size:"large",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),V.length===0&&m.a.createElement(u.a,{styles:{margin:"70px auto"},customText:"\u6682\u672A\u9009\u62E9\u5206\u73ED"}),V.length>0&&m.a.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},m.a.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},V.map(function(de,nt){return m.a.createElement(Y.a,{justify:"space-between",style:{marginTop:"10px"},key:de.id},m.a.createElement("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"}},de.name),m.a.createElement("img",{src:r.a,style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){C(z.filter(function(jt){return"".concat(jt.id)!="".concat(de.id)}))}}))})))))};Qe.a=o},"55Ip":function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return a});var te=I("Ty5D"),Y=I("dI71"),N=I("q1tI"),K=I.n(N),A=I("YS25"),M=I("17x9"),H=I.n(M),P=I("wx14"),k=I("zLVn"),D=I("9R94"),b=function(y){Object(Y.a)(h,y);function h(){for(var v,p=arguments.length,E=new Array(p),U=0;U
=0||p.relatedTarget.className.indexOf("".concat(z,"-next"))>=0))return;y.setState({goInputText:""}),F(y.getValidValue())},y.go=function(p){var E=y.state.goInputText;if(E==="")return;(p.keyCode===d.ENTER||p.type==="click")&&(y.setState({goInputText:""}),y.props.quickGo(y.getValidValue()))},y}return Object(A.a)(_,[{key:"getValidValue",value:function(){var h=this.state,c=h.goInputText,v=h.current;return!c||isNaN(c)?v:Number(c)}},{key:"getPageSizeOptions",value:function(){var h=this.props,c=h.pageSize,v=h.pageSizeOptions;return v.some(function(p){return p.toString()===c.toString()})?v:v.concat([c.toString()]).sort(function(p,E){var U=isNaN(Number(p))?0:Number(p),F=isNaN(Number(E))?0:Number(E);return U-F})}},{key:"render",value:function(){var h=this,c=this.props,v=c.pageSize,p=c.locale,E=c.rootPrefixCls,U=c.changeSize,F=c.quickGo,z=c.goButton,G=c.selectComponentClass,B=c.buildOptionText,T=c.selectPrefixCls,V=c.disabled,Z=this.state.goInputText,oe="".concat(E,"-options"),pe=G,Ye=null,xe=null,Ie=null;if(!U&&!F)return null;var Je=this.getPageSizeOptions();if(U&&pe){var Ke=Je.map(function(be,de){return k.a.createElement(pe.Option,{key:de,value:be.toString()},(B||h.buildOptionText)(be))});Ye=k.a.createElement(pe,{disabled:V,prefixCls:T,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(v||Je[0]).toString(),onChange:this.changeSize,getPopupContainer:function(de){return de.parentNode}},Ke)}return F&&(z&&(Ie=typeof z=="boolean"?k.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(oe,"-quick-jumper-button")},p.jump_to_confirm):k.a.createElement("span",{onClick:this.go,onKeyUp:this.go},z)),xe=k.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},p.jump_to,k.a.createElement("input",{disabled:V,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),p.page,Ie)),k.a.createElement("li",{className:"".concat(oe)},Ye,xe)}}]),_}(k.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var r=s,u=I("N2Kk");function o(){}function a(O){return typeof O=="number"&&isFinite(O)&&Math.floor(O)===O}function n(O,C,_){return _}function R(O,C,_){var y=typeof O=="undefined"?C.pageSize:O;return Math.floor((_.total-1)/y)+1}var w=function(O){Object(M.a)(_,O);var C=Object(H.a)(_);function _(y){var h;Object(K.a)(this,_),h=C.call(this,y),h.getJumpPrevPage=function(){return Math.max(1,h.state.current-(h.props.showLessItems?3:5))},h.getJumpNextPage=function(){return Math.min(R(void 0,h.state,h.props),h.state.current+(h.props.showLessItems?3:5))},h.getItemIcon=function(U,F){var z=h.props.prefixCls,G=U||k.a.createElement("button",{type:"button","aria-label":F,className:"".concat(z,"-item-link")});return typeof U=="function"&&(G=k.a.createElement(U,Object(N.a)({},h.props))),G},h.savePaginationNode=function(U){h.paginationNode=U},h.isValid=function(U){return a(U)&&U!==h.state.current},h.shouldDisplayQuickJumper=function(){var U=h.props,F=U.showQuickJumper,z=U.pageSize,G=U.total;return G<=z?!1:F},h.handleKeyDown=function(U){(U.keyCode===d.ARROW_UP||U.keyCode===d.ARROW_DOWN)&&U.preventDefault()},h.handleKeyUp=function(U){var F=h.getValidValue(U),z=h.state.currentInputValue;F!==z&&h.setState({currentInputValue:F}),U.keyCode===d.ENTER?h.handleChange(F):U.keyCode===d.ARROW_UP?h.handleChange(F-1):U.keyCode===d.ARROW_DOWN&&h.handleChange(F+1)},h.changePageSize=function(U){var F=h.state.current,z=R(U,h.state,h.props);F=F>z?z:F,z===0&&(F=h.state.current),typeof U=="number"&&("pageSize"in h.props||h.setState({pageSize:U}),"current"in h.props||h.setState({current:F,currentInputValue:F})),h.props.onShowSizeChange(F,U),"onChange"in h.props&&h.props.onChange&&h.props.onChange(F,U)},h.handleChange=function(U){var F=h.props.disabled,z=U;if(h.isValid(z)&&!F){var G=R(void 0,h.state,h.props);z>G?z=G:z<1&&(z=1),"current"in h.props||h.setState({current:z,currentInputValue:z});var B=h.state.pageSize;return h.props.onChange(z,B),z}return h.state.current},h.prev=function(){h.hasPrev()&&h.handleChange(h.state.current-1)},h.next=function(){h.hasNext()&&h.handleChange(h.state.current+1)},h.jumpPrev=function(){h.handleChange(h.getJumpPrevPage())},h.jumpNext=function(){h.handleChange(h.getJumpNextPage())},h.hasPrev=function(){return h.state.current>1},h.hasNext=function(){return h.state.current2?z-2:0),B=2;B=v?E=v:E=Number(c),E}},{key:"getShowSizeChanger",value:function(){var h=this.props,c=h.showSizeChanger,v=h.total,p=h.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:v>p}},{key:"renderPrev",value:function(h){var c=this.props,v=c.prevIcon,p=c.itemRender,E=p(h,"prev",this.getItemIcon(v,"prev page")),U=!this.hasPrev();return Object(P.isValidElement)(E)?Object(P.cloneElement)(E,{disabled:U}):E}},{key:"renderNext",value:function(h){var c=this.props,v=c.nextIcon,p=c.itemRender,E=p(h,"next",this.getItemIcon(v,"next page")),U=!this.hasNext();return Object(P.isValidElement)(E)?Object(P.cloneElement)(E,{disabled:U}):E}},{key:"render",value:function(){var h=this,c=this.props,v=c.prefixCls,p=c.className,E=c.style,U=c.disabled,F=c.hideOnSinglePage,z=c.total,G=c.locale,B=c.showQuickJumper,T=c.showLessItems,V=c.showTitle,Z=c.showTotal,oe=c.simple,pe=c.itemRender,Ye=c.showPrevNextJumpers,xe=c.jumpPrevIcon,Ie=c.jumpNextIcon,Je=c.selectComponentClass,Ke=c.selectPrefixCls,be=c.pageSizeOptions,de=this.state,nt=de.current,Kt=de.pageSize,jt=de.currentInputValue;if(F===!0&&z<=Kt)return null;var wt=R(void 0,this.state,this.props),ze=[],ft=null,dt=null,Nt=null,Ze=null,Bt=null,Ut=B&&B.goButton,Mt=T?1:2,An=nt-1>0?nt-1:0,mn=nt+1=Mt*2&&nt!==1+2&&(ze[0]=Object(P.cloneElement)(ze[0],{className:"".concat(v,"-item-after-jump-prev")}),ze.unshift(ft)),wt-nt>=Mt*2&&nt!==wt-2&&(ze[ze.length-1]=Object(P.cloneElement)(ze[ze.length-1],{className:"".concat(v,"-item-before-jump-next")}),ze.push(dt)),pt!==1&&ze.unshift(Nt),Ct!==wt&&ze.push(Ze)}var Ae=null;Z&&(Ae=k.a.createElement("li",{className:"".concat(v,"-total-text")},Z(z,[z===0?0:(nt-1)*Kt+1,nt*Kt>z?z:nt*Kt])));var ge=!this.hasPrev()||!wt,Ee=!this.hasNext()||!wt;return k.a.createElement("ul",Object(te.a)({className:b()(v,p,Object(Y.a)({},"".concat(v,"-disabled"),U)),style:E,unselectable:"unselectable",ref:this.savePaginationNode},pn),Ae,k.a.createElement("li",{title:V?G.prev_page:null,onClick:this.prev,tabIndex:ge?null:0,onKeyPress:this.runIfEnterPrev,className:b()("".concat(v,"-prev"),Object(Y.a)({},"".concat(v,"-disabled"),ge)),"aria-disabled":ge},this.renderPrev(An)),ze,k.a.createElement("li",{title:V?G.next_page:null,onClick:this.next,tabIndex:Ee?null:0,onKeyPress:this.runIfEnterNext,className:b()("".concat(v,"-next"),Object(Y.a)({},"".concat(v,"-disabled"),Ee)),"aria-disabled":Ee},this.renderNext(mn)),k.a.createElement(r,{disabled:U,locale:G,rootPrefixCls:v,selectComponentClass:Je,selectPrefixCls:Ke,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:nt,pageSize:Kt,pageSizeOptions:be,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ut}))}}],[{key:"getDerivedStateFromProps",value:function(h,c){var v={};if("current"in h&&(v.current=h.current,h.current!==c.current&&(v.currentInputValue=v.current)),"pageSize"in h&&h.pageSize!==c.pageSize){var p=c.current,E=R(h.pageSize,c,h);p=p>E?E:p,"current"in h||(v.current=p,v.currentInputValue=p),v.pageSize=h.pageSize}return v}}]),_}(k.a.Component);w.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:o,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:o,locale:u.a,style:{},itemRender:n,totalBoundaryShowSizeChanger:50};var x=w},"6RRn":function(tn,Qe,I){"use strict";var te=I("wCXF"),Y=I("n6Qo");I.d(Qe,"b",function(){return Y.a});var N=I("IBYe"),K=I("6eGT"),A=I("hW8S");I.d(Qe,"a",function(){return A.a}),Qe.c=te.b},"6UM0":function(tn,Qe,I){var te,Y;(function(){var N;(function(){"use strict";var A=[function(k,D,b){var m=b(1).Beautifier,f=b(5).Options;function d(s,r){var u=new m(s,r);return u.beautify()}k.exports=d,k.exports.defaultOptions=function(){return new f}},function(k,D,b){var m=b(2).Output,f=b(3).Token,d=b(4),s=b(5).Options,r=b(7).Tokenizer,u=b(7).line_starters,o=b(7).positionable_operators,a=b(7).TOKEN;function n(T,V){return V.indexOf(T)!==-1}function R(T){return T.replace(/^\s+/g,"")}function w(T){for(var V={},Z=0;ZZ&&(Z=T.line_indent_level));var oe={mode:V,parent:T,last_token:T?T.last_token:new f(a.START_BLOCK,""),last_word:T?T.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:Z,alignment:0,line_indent_level:T?T.line_indent_level:Z,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},G.prototype._reset=function(T){var V=T.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var Z=new r(T,this._options);return this._tokens=Z.tokenize(),T},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T,V=this._reset(this._source_text),Z=this._options.eol;this._options.eol==="auto"&&(Z=`
`,V&&d.lineBreak.test(V||"")&&(Z=V.match(d.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return T=this._output.get_code(Z),T},G.prototype.handle_token=function(T,V){T.type===a.START_EXPR?this.handle_start_expr(T):T.type===a.END_EXPR?this.handle_end_expr(T):T.type===a.START_BLOCK?this.handle_start_block(T):T.type===a.END_BLOCK?this.handle_end_block(T):T.type===a.WORD?this.handle_word(T):T.type===a.RESERVED?this.handle_word(T):T.type===a.SEMICOLON?this.handle_semicolon(T):T.type===a.STRING?this.handle_string(T):T.type===a.EQUALS?this.handle_equals(T):T.type===a.OPERATOR?this.handle_operator(T):T.type===a.COMMA?this.handle_comma(T):T.type===a.BLOCK_COMMENT?this.handle_block_comment(T,V):T.type===a.COMMENT?this.handle_comment(T,V):T.type===a.DOT?this.handle_dot(T):T.type===a.EOF?this.handle_eof(T):T.type===a.UNKNOWN?this.handle_unknown(T,V):this.handle_unknown(T,V)},G.prototype.handle_whitespace_and_comments=function(T,V){var Z=T.newlines,oe=this._options.keep_array_indentation&&E(this._flags.mode);if(T.comments_before)for(var pe=T.comments_before.next();pe;)this.handle_whitespace_and_comments(pe,V),this.handle_token(pe,V),pe=T.comments_before.next();if(oe)for(var Ye=0;Ye0,V);else if(this._options.max_preserve_newlines&&Z>this._options.max_preserve_newlines&&(Z=this._options.max_preserve_newlines),this._options.preserve_newlines&&Z>1){this.print_newline(!1,V);for(var xe=1;xe0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.set_mode=function(T){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,T),this._flags=this.create_flags(this._previous_flags,T),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&v(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||O(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(T){var V=!1;return V=V||O(this._flags.last_token,["var","let","const"])&&T.type===a.WORD,V=V||x(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&O(this._flags.last_token,B)&&!T.newlines,V=V||x(this._flags.last_token,"else")&&!(x(T,"if")&&!T.comments_before),V=V||this._flags.last_token.type===a.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),V=V||this._flags.last_token.type===a.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(T.text==="--"||T.text==="++")&&this._last_last_text!=="function"&&T.type!==a.WORD&&T.type!==a.RESERVED,V=V||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||O(this._flags.last_token,["get","set"])),V?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(T,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T,O(T,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T);var V=c.Expression;if(T.text==="["){if(this._flags.last_token.type===a.WORD||this._flags.last_token.text===")"){O(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(T),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=c.ArrayLiteral,E(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),n(this._flags.last_token.type,[a.START_EXPR,a.END_EXPR,a.WORD,a.OPERATOR,a.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===a.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=c.ForInitializer):n(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=c.Conditional):n(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&T.whitespace_before===""?this._output.space_before_token=!1:(n(this._flags.last_token.text,u)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T);else if(this._flags.last_token.type===a.WORD){this._output.space_before_token=!1;var Z=this._tokens.peek(-3);if(this._options.space_after_named_function&&Z){var oe=this._tokens.peek(-4);O(Z,["async","function"])||Z.text==="*"&&O(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?(Z.text==="{"||Z.text===","||Z.text==="*"&&(oe.text==="{"||oe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(T);(this._flags.last_token.type===a.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(n(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&n(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===a.START_BLOCK?this.print_newline():(this._flags.last_token.type===a.END_EXPR||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===a.COMMA)&&this.allow_wrap_or_preserved_newline(T,T.newlines),this.print_token(T),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(T){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(T,T.text==="]"&&E(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===a.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(T),this.restore_mode(),v(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(T){this.handle_whitespace_and_comments(T);var V=this._tokens.peek(),Z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===a.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):Z&&(n(Z.text,[":",","])&&n(V.type,[a.STRING,a.WORD,a.RESERVED])||n(V.text,["get","set","..."])&&n(Z.type,[a.WORD,a.RESERVED]))?n(this._last_last_text,["class","interface"])&&!n(Z.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===a.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):n(this._flags.last_token.type,[a.EQUALS,a.START_EXPR,a.COMMA,a.OPERATOR])||O(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(O(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!V.comments_before&&V.text==="}",pe=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===a.END_EXPR;if(this._options.brace_preserve_inline){var Ye=0,xe=null;this._flags.inline_frame=!0;do if(Ye+=1,xe=this._tokens.peek(Ye-1),xe.newlines){this._flags.inline_frame=!1;break}while(xe.type!==a.EOF&&!(xe.type===a.END_BLOCK&&xe.opened===T))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==a.OPERATOR&&(pe||this._flags.last_token.type===a.EQUALS||O(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(E(this._previous_flags.mode)&&(this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.COMMA)&&((this._flags.last_token.type===a.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(T),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==a.OPERATOR&&this._flags.last_token.type!==a.START_EXPR&&(this._flags.last_token.type===a.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(T),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(T){for(this.handle_whitespace_and_comments(T);this._flags.mode===c.Statement;)this.restore_mode();var V=this._flags.last_token.type===a.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(E(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(T)},G.prototype.handle_word=function(T){if(T.type===a.RESERVED){if(n(T.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)T.type=a.WORD;else if(T.text==="import"&&n(this._tokens.peek().text,["(","."]))T.type=a.WORD;else if(n(T.text,["as","from"])&&!this._flags.import_block)T.type=a.WORD;else if(this._flags.mode===c.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(T.type=a.WORD)}}if(this.start_of_statement(T)?O(this._flags.last_token,["var","let","const"])&&T.type===a.WORD&&(this._flags.declaration_statement=!0):T.newlines&&!U(this._flags.mode)&&(this._flags.last_token.type!==a.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==a.EQUALS&&(this._options.preserve_newlines||!O(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(T),this.print_newline()):this.handle_whitespace_and_comments(T),this._flags.do_block&&!this._flags.do_while)if(x(T,"while")){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&x(T,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&O(T,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(T),this._flags.in_case=!0;return}if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T)),x(T,"function")){(n(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(n(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===a.OPERATOR))&&(!this._output.just_added_blankline()&&!T.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD?O(this._flags.last_token,["get","set","new","export"])||O(this._flags.last_token,B)?this._output.space_before_token=!0:x(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===a.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(U(this._flags.mode)||E(this._flags.mode))||this.print_newline(),this.print_token(T),this._flags.last_word=T.text;return}var Z="NONE";if(this._flags.last_token.type===a.END_BLOCK?this._previous_flags.inline_frame?Z="SPACE":O(T,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines?Z="NEWLINE":(Z="SPACE",this._output.space_before_token=!0):Z="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&this._flags.mode===c.BlockStatement?Z="NEWLINE":this._flags.last_token.type===a.SEMICOLON&&U(this._flags.mode)?Z="SPACE":this._flags.last_token.type===a.STRING?Z="NEWLINE":this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.last_token.text==="*"&&(n(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&n(this._last_last_text,["{",","]))?Z="SPACE":this._flags.last_token.type===a.START_BLOCK?this._flags.inline_frame?Z="SPACE":Z="NEWLINE":this._flags.last_token.type===a.END_EXPR&&(this._output.space_before_token=!0,Z="NEWLINE"),O(T,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Z="SPACE":Z="NEWLINE"),O(T,["else","catch","finally"]))if((!(this._flags.last_token.type===a.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Z==="NEWLINE"?O(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&O(T,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==a.END_EXPR?(this._flags.last_token.type!==a.START_EXPR||!O(T,["var","let","const"]))&&this._flags.last_token.text!==":"&&(x(T,"if")&&x(T.previous,"else")?this._output.space_before_token=!0:this.print_newline()):O(T,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&E(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Z==="SPACE"&&(this._output.space_before_token=!0);T.previous&&(T.previous.type===a.WORD||T.previous.type===a.RESERVED)&&(this._output.space_before_token=!0),this.print_token(T),this._flags.last_word=T.text,T.type===a.RESERVED&&(T.text==="do"?this._flags.do_block=!0:T.text==="if"?this._flags.if_block=!0:T.text==="import"?this._flags.import_block=!0:this._flags.import_block&&x(T,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(T){this.start_of_statement(T)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(T);for(var V=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&x(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(T)},G.prototype.handle_string=function(T){T.text.startsWith("`")&&T.newlines===0&&T.whitespace_before===""&&(T.previous.text===")"||this._flags.last_token.type===a.WORD)||(this.start_of_statement(T)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(T),this._flags.last_token.type===a.RESERVED||this._flags.last_token.type===a.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR||this._flags.last_token.type===a.EQUALS||this._flags.last_token.type===a.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T):T.text.startsWith("`")&&this._flags.last_token.type===a.END_EXPR&&(T.previous.text==="]"||T.previous.text===")")&&T.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(T)},G.prototype.handle_equals=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0},G.prototype.handle_comma=function(T){this.handle_whitespace_and_comments(T,!0),this.print_token(T),this._output.space_before_token=!0,this._flags.declaration_statement?(U(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)},G.prototype.handle_operator=function(T){var V=T.text==="*"&&(O(this._flags.last_token,["function","yield"])||n(this._flags.last_token.type,[a.START_BLOCK,a.COMMA,a.END_BLOCK,a.SEMICOLON])),Z=n(T.text,["-","+"])&&(n(this._flags.last_token.type,[a.START_BLOCK,a.START_EXPR,a.EQUALS,a.OPERATOR])||n(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(T)){var oe=!V;this.handle_whitespace_and_comments(T,oe)}if(T.text==="*"&&this._flags.last_token.type===a.DOT){this.print_token(T);return}if(T.text==="::"){this.print_token(T);return}if(this._flags.last_token.type===a.OPERATOR&&n(this._options.operator_position,h)&&this.allow_wrap_or_preserved_newline(T),T.text===":"&&this._flags.in_case){this.print_token(T),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==a.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var pe=!0,Ye=!0,xe=!1;if(T.text===":"?this._flags.ternary_depth===0?pe=!1:(this._flags.ternary_depth-=1,xe=!0):T.text==="?"&&(this._flags.ternary_depth+=1),!Z&&!V&&this._options.preserve_newlines&&n(T.text,o)){var Ie=T.text===":",Je=Ie&&xe,Ke=Ie&&!xe;switch(this._options.operator_position){case y.before_newline:this._output.space_before_token=!Ke,this.print_token(T),(!Ie||Je)&&this.allow_wrap_or_preserved_newline(T),this._output.space_before_token=!0;return;case y.after_newline:this._output.space_before_token=!0,!Ie||Je?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(T):this._output.space_before_token=!1,this.print_token(T),this._output.space_before_token=!0;return;case y.preserve_newline:Ke||this.allow_wrap_or_preserved_newline(T),pe=!(this._output.just_added_newline()||Ke),this._output.space_before_token=pe,this.print_token(T),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(T),pe=!1;var be=this._tokens.peek();Ye=be&&n(be.type,[a.WORD,a.RESERVED])}else if(T.text==="...")this.allow_wrap_or_preserved_newline(T),pe=this._flags.last_token.type===a.START_BLOCK,Ye=!1;else if(n(T.text,["--","++","!","~"])||Z){if((this._flags.last_token.type===a.COMMA||this._flags.last_token.type===a.START_EXPR)&&this.allow_wrap_or_preserved_newline(T),pe=!1,Ye=!1,T.newlines&&(T.text==="--"||T.text==="++"||T.text==="~")){var de=O(this._flags.last_token,C)&&T.newlines;de&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(de,!0)}this._flags.last_token.text===";"&&U(this._flags.mode)&&(pe=!0),this._flags.last_token.type===a.RESERVED?pe=!0:this._flags.last_token.type===a.END_EXPR?pe=!(this._flags.last_token.text==="]"&&(T.text==="--"||T.text==="++")):this._flags.last_token.type===a.OPERATOR&&(pe=n(T.text,["--","-","++","+"])&&n(this._flags.last_token.text,["--","-","++","+"]),n(T.text,["+","-"])&&n(this._flags.last_token.text,["--","++"])&&(Ye=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||pe,this.print_token(T),this._output.space_before_token=Ye},G.prototype.handle_block_comment=function(T,V){if(this._output.raw){this._output.add_raw_token(T),T.directives&&T.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(T.directives){this.print_newline(!1,V),this.print_token(T),T.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!d.newline.test(T.text)&&!T.newlines){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0;return}else this.print_block_commment(T,V)},G.prototype.print_block_commment=function(T,V){var Z=p(T.text),oe,pe=!1,Ye=!1,xe=T.whitespace_before,Ie=xe.length;if(this.print_newline(!1,V),this.print_token_line_indentation(T),this._output.add_token(Z[0]),this.print_newline(!1,V),Z.length>1){for(Z=Z.slice(1),pe=F(Z,"*"),Ye=z(Z,xe),pe&&(this._flags.alignment=1),oe=0;oe=0;d--)if(this.__items[d].match(f))return!0;return!1},D.prototype.set_indent=function(f,d){this.is_empty()&&(this.__indent_count=f||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},D.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},D.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},D.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var f=this.__parent.current_line;return f.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),f.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),f.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,f.__items[0]===" "&&(f.__items.splice(0,1),f.__character_count-=1),!0}return!1},D.prototype.is_empty=function(){return this.__items.length===0},D.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},D.prototype.push=function(f){this.__items.push(f);var d=f.lastIndexOf(`
`);d!==-1?this.__character_count=f.length-d:this.__character_count+=f.length},D.prototype.pop=function(){var f=null;return this.is_empty()||(f=this.__items.pop(),this.__character_count-=f.length),f},D.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},D.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},D.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},D.prototype.toString=function(){var f="";return this.is_empty()?this.__parent.indent_empty_lines&&(f=this.__parent.get_indent_string(this.__indent_count)):(f=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),f+=this.__items.join("")),f};function b(f,d){this.__cache=[""],this.__indent_size=f.indent_size,this.__indent_string=f.indent_char,f.indent_with_tabs||(this.__indent_string=new Array(f.indent_size+1).join(f.indent_char)),d=d||"",f.indent_level>0&&(d=new Array(f.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}b.prototype.get_indent_size=function(f,d){var s=this.__base_string_length;return d=d||0,f<0&&(s=0),s+=f*this.__indent_size,s+=d,s},b.prototype.get_indent_string=function(f,d){var s=this.__base_string;return d=d||0,f<0&&(f=0,s=""),d+=f*this.__indent_size,this.__ensure_cache(d),s+=this.__cache[d],s},b.prototype.__ensure_cache=function(f){for(;f>=this.__cache.length;)this.__add_column()},b.prototype.__add_column=function(){var f=this.__cache.length,d=0,s="";this.__indent_size&&f>=this.__indent_size&&(d=Math.floor(f/this.__indent_size),f-=d*this.__indent_size,s=new Array(d+1).join(this.__indent_string)),f&&(s+=new Array(f+1).join(" ")),this.__cache.push(s)};function m(f,d){this.__indent_cache=new b(f,d),this.raw=!1,this._end_with_newline=f.end_with_newline,this.indent_size=f.indent_size,this.wrap_line_length=f.wrap_line_length,this.indent_empty_lines=f.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new D(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(f,d){return this.__indent_cache.get_indent_string(f,d)},m.prototype.get_indent_size=function(f,d){return this.__indent_cache.get_indent_size(f,d)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(f){return this.is_empty()||!f&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(f){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return f!==`
`&&(s=s.replace(/[\n]/g,f)),s},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(f,d){return f=f||0,d=d||0,this.next_line.set_indent(f,d),this.__lines.length>1?(this.current_line.set_indent(f,d),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(f){for(var d=0;d1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(f,d){for(var s=this.__lines.length-2;s>=0;){var r=this.__lines[s];if(r.is_empty())break;if(r.item(0).indexOf(f)!==0&&r.item(-1)!==d){this.__lines.splice(s+1,0,new D(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},k.exports.Output=m},function(k){function D(b,m,f,d){this.type=b,this.text=m,this.comments_before=null,this.newlines=f||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}k.exports.Token=D},function(k,D){var b="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",d="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",s="(?:\\\\u[0-9a-fA-F]{4}|["+b+f+"])",r="(?:\\\\u[0-9a-fA-F]{4}|["+m+f+d+"])*";D.identifier=new RegExp(s+r,"g"),D.identifierStart=new RegExp(s),D.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+f+d+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;D.newline=/[\n\r\u2028\u2029]/,D.lineBreak=new RegExp(`\r
|`+D.newline.source),D.allLineBreaks=new RegExp(D.lineBreak.source,"g")},function(k,D,b){var m=b(6).Options,f=["before-newline","after-newline","preserve-newline"];function d(s){m.call(this,s,"js");var r=this.raw_options.brace_style||null;r==="expand-strict"?this.raw_options.brace_style="expand":r==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),_=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_=_.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),_="\\?\\.(?!\\d) "+_,_=_.replace(/ /g,"|");var y=new RegExp(_),h="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=h.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),v=new RegExp("^(?:"+c.join("|")+")$"),p,E=function(F,z){f.call(this,F,z),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new u(this._input),B=new o(this._input).read_options(this._options);this.__patterns={template:B,identifier:B.starting_with(r.identifier).matching(r.identifierMatch),number:G.matching(w),punct:G.matching(y),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(//),include:G.starting_with(/#include/).until_after(r.lineBreak),shebang:G.starting_with(/#!/).until_after(r.lineBreak),xml:G.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:B.until(/['\\\n\r\u2028\u2029]/),double_quote:B.until(/["\\\n\r\u2028\u2029]/),template_text:B.until(/[`\\$]/),template_expression:B.until(/[`}\\]/)}};E.prototype=new f,E.prototype._is_comment=function(F){return F.type===n.COMMENT||F.type===n.BLOCK_COMMENT||F.type===n.UNKNOWN},E.prototype._is_opening=function(F){return F.type===n.START_BLOCK||F.type===n.START_EXPR},E.prototype._is_closing=function(F,z){return(F.type===n.END_BLOCK||F.type===n.END_EXPR)&&z&&(F.text==="]"&&z.text==="["||F.text===")"&&z.text==="("||F.text==="}"&&z.text==="{")},E.prototype._reset=function(){p=!1},E.prototype._get_next_token=function(F,z){var G=null;this._readWhitespace();var B=this._input.peek();return B===null?this._create_token(n.EOF,""):(G=G||this._read_non_javascript(B),G=G||this._read_string(B),G=G||this._read_word(F),G=G||this._read_singles(B),G=G||this._read_comment(B),G=G||this._read_regexp(B,F),G=G||this._read_xml(B,F),G=G||this._read_punctuation(),G=G||this._create_token(n.UNKNOWN,this._input.next()),G)},E.prototype._read_word=function(F){var z;if(z=this.__patterns.identifier.read(),z!=="")return z=z.replace(r.allLineBreaks,`
`),!(F.type===n.DOT||F.type===n.RESERVED&&(F.text==="set"||F.text==="get"))&&v.test(z)?(z==="in"||z==="of")&&(F.type===n.WORD||F.type===n.STRING)?this._create_token(n.OPERATOR,z):this._create_token(n.RESERVED,z):this._create_token(n.WORD,z);if(z=this.__patterns.number.read(),z!=="")return this._create_token(n.WORD,z)},E.prototype._read_singles=function(F){var z=null;return F==="("||F==="["?z=this._create_token(n.START_EXPR,F):F===")"||F==="]"?z=this._create_token(n.END_EXPR,F):F==="{"?z=this._create_token(n.START_BLOCK,F):F==="}"?z=this._create_token(n.END_BLOCK,F):F===";"?z=this._create_token(n.SEMICOLON,F):F==="."&&O.test(this._input.peek(1))?z=this._create_token(n.DOT,F):F===","&&(z=this._create_token(n.COMMA,F)),z&&this._input.next(),z},E.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(n.EQUALS,F):F==="?."?this._create_token(n.DOT,F):this._create_token(n.OPERATOR,F)},E.prototype._read_non_javascript=function(F){var z="";if(F==="#"){if(this._is_first_token()&&(z=this.__patterns.shebang.read(),z))return this._create_token(n.UNKNOWN,z.trim()+`
`);if(z=this.__patterns.include.read(),z)return this._create_token(n.UNKNOWN,z.trim()+`
`);F=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(x)){do F=this._input.next(),G+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(n.WORD,G)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(z=this.__patterns.html_comment_start.read(),z){for(;this._input.hasNext()&&!this._input.testChar(r.newline);)z+=this._input.next();return p=!0,this._create_token(n.COMMENT,z)}}else if(p&&F==="-"&&(z=this.__patterns.html_comment_end.read(),z))return p=!1,this._create_token(n.COMMENT,z);return null},E.prototype._read_comment=function(F){var z=null;if(F==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var B=R.get_directives(G);B&&B.ignore==="start"&&(G+=R.readIgnored(this._input)),G=G.replace(r.allLineBreaks,`
`),z=this._create_token(n.BLOCK_COMMENT,G),z.directives=B}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),z=this._create_token(n.COMMENT,G))}return z},E.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var z=this._input.next();return this.has_char_escapes=!1,F==="`"?z+=this._read_string_recursive("`",!0,"${"):z+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(z=U(z)),this._input.peek()===F&&(z+=this._input.next()),z=z.replace(r.allLineBreaks,`
`),this._create_token(n.STRING,z)}return null},E.prototype._allow_regexp_or_xml=function(F){return F.type===n.RESERVED&&a(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===n.END_EXPR&&F.text===")"&&F.opened.previous.type===n.RESERVED&&a(F.opened.previous.text,["if","while","for"])||a(F.type,[n.COMMENT,n.START_EXPR,n.START_BLOCK,n.START,n.END_BLOCK,n.OPERATOR,n.EQUALS,n.EOF,n.SEMICOLON,n.COMMA])},E.prototype._read_regexp=function(F,z){if(F==="/"&&this._allow_regexp_or_xml(z)){for(var G=this._input.next(),B=!1,T=!1;this._input.hasNext()&&(B||T||this._input.peek()!==F)&&!this._input.testChar(r.newline);)G+=this._input.peek(),B?B=!1:(B=this._input.peek()==="\\",this._input.peek()==="["?T=!0:this._input.peek()==="]"&&(T=!1)),this._input.next();return this._input.peek()===F&&(G+=this._input.next(),G+=this._input.read(r.identifier)),this._create_token(n.STRING,G)}return null},E.prototype._read_xml=function(F,z){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(z)){var G="",B=this.__patterns.xml.read_match();if(B){for(var T=B[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=T.indexOf("{")===0,Z=0;B;){var oe=!!B[1],pe=B[2],Ye=!!B[B.length-1]||pe.slice(0,8)==="![CDATA[";if(!Ye&&(pe===T||V&&pe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--Z:++Z),G+=B[0],Z<=0)break;B=this.__patterns.xml.read_match()}return B||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(r.allLineBreaks,`
`),this._create_token(n.STRING,G)}}return null};function U(F){for(var z="",G=0,B=new m(F),T=null;B.hasNext();)if(T=B.match(/([\s]|[^\\]|\\\\)+/g),T&&(z+=T[0]),B.peek()==="\\"){if(B.next(),B.peek()==="x")T=B.match(/x([0-9A-Fa-f]{2})/g);else if(B.peek()==="u")T=B.match(/u([0-9A-Fa-f]{4})/g);else{z+="\\",B.hasNext()&&(z+=B.next());continue}if(!T)return F;if(G=parseInt(T[1],16),G>126&&G<=255&&T[0].indexOf("x")===0)return F;if(G>=0&&G<32){z+="\\"+T[0];continue}else G===34||G===39||G===92?z+="\\"+String.fromCharCode(G):z+=String.fromCharCode(G)}return z}E.prototype._read_string_recursive=function(F,z,G){var B,T;F==="'"?T=this.__patterns.single_quote:F==='"'?T=this.__patterns.double_quote:F==="`"?T=this.__patterns.template_text:F==="}"&&(T=this.__patterns.template_expression);for(var V=T.read(),Z="";this._input.hasNext();){if(Z=this._input.next(),Z===F||!z&&r.newline.test(Z)){this._input.back();break}else Z==="\\"&&this._input.hasNext()?(B=this._input.peek(),B==="x"||B==="u"?this.has_char_escapes=!0:B==="\r"&&this._input.peek(1)===`
`&&this._input.next(),Z+=this._input.next()):G&&(G==="${"&&Z==="$"&&this._input.peek()==="{"&&(Z+=this._input.next()),G===Z&&(F==="`"?Z+=this._read_string_recursive("}",z,"`"):Z+=this._read_string_recursive("`",z,"${"),this._input.hasNext()&&(Z+=this._input.next())));Z+=T.read(),V+=Z}return V},k.exports.Tokenizer=E,k.exports.TOKEN=n,k.exports.positionable_operators=C.slice(),k.exports.line_starters=h.slice()},function(k){var D=RegExp.prototype.hasOwnProperty("sticky");function b(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}b.prototype.restart=function(){this.__position=0},b.prototype.back=function(){this.__position>0&&(this.__position-=1)},b.prototype.hasNext=function(){return this.__position=0&&m=0&&f=m.length&&this.__input.substring(f-m.length,f).toLowerCase()===m},k.exports.InputScanner=b},function(k,D,b){var m=b(8).InputScanner,f=b(3).Token,d=b(10).TokenStream,s=b(11).WhitespacePattern,r={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(o,a){this._input=new m(o),this._options=a||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var o,a=new f(r.START,""),n=null,R=[],w=new d;a.type!==r.EOF;){for(o=this._get_next_token(a,n);this._is_comment(o);)w.add(o),o=this._get_next_token(a,n);w.isEmpty()||(o.comments_before=w,w=new d),o.parent=n,this._is_opening(o)?(R.push(n),n=o):n&&this._is_closing(o,n)&&(o.opened=n,n.closed=o,n=R.pop(),o.parent=n),o.previous=a,a.next=o,this.__tokens.add(o),a=o}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(o,a){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(r.RAW,n):this._create_token(r.EOF,"")},u.prototype._is_comment=function(o){return!1},u.prototype._is_opening=function(o){return!1},u.prototype._is_closing=function(o,a){return!1},u.prototype._create_token=function(o,a){var n=new f(o,a,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return n},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},k.exports.Tokenizer=u,k.exports.TOKEN=r},function(k){function D(b){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=b}D.prototype.restart=function(){this.__position=0},D.prototype.isEmpty=function(){return this.__tokens_length===0},D.prototype.hasNext=function(){return this.__position=0&&b/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new m,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(s){var r=this._create();return r._disabled[s]=!0,r._update(),r},d.prototype.read_options=function(s){var r=this._create();for(var u in f)r._disabled[u]=s.templating.indexOf(u)===-1;return r._update(),r},d.prototype.exclude=function(s){var r=this._create();return r._excluded[s]=!0,r._update(),r},d.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var r=this._read_template();r;)this._match_pattern?r+=this._input.read(this._match_pattern):r+=this._input.readUntil(this.__template_pattern),s+=r,r=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},d.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},d.prototype._read_template=function(){var s="",r=this._input.peek();if(r==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(s=s||this.__patterns.erb.read())}else r==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},k.exports.TemplatablePattern=d}],M={};function H(k){var D=M[k];if(D!==void 0)return D.exports;var b=M[k]={exports:{}};return A[k](b,b.exports,H),b.exports}var P=H(0);N=P})();var K=N;!(te=[],Y=function(){return{js_beautify:K}}.apply(Qe,te),Y!==void 0&&(tn.exports=Y))})()},"6eGT":function(tn,Qe,I){"use strict";function te(Y){return null}Qe.a=te},"7Cbv":function(tn,Qe,I){"use strict";var te=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Y=new Uint8Array(16);function N(){if(!te)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return te(Y)}var K=/^(?:[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 A(f){return typeof f=="string"&&K.test(f)}for(var M=A,H=[],P=0;P<256;++P)H.push((P+256).toString(16).substr(1));function k(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(H[f[d+0]]+H[f[d+1]]+H[f[d+2]]+H[f[d+3]]+"-"+H[f[d+4]]+H[f[d+5]]+"-"+H[f[d+6]]+H[f[d+7]]+"-"+H[f[d+8]]+H[f[d+9]]+"-"+H[f[d+10]]+H[f[d+11]]+H[f[d+12]]+H[f[d+13]]+H[f[d+14]]+H[f[d+15]]).toLowerCase();if(!M(s))throw TypeError("Stringified UUID is invalid");return s}var D=k;function b(f,d,s){f=f||{};var r=f.random||(f.rng||N)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,d){s=s||0;for(var u=0;u<16;++u)d[s+u]=r[u];return d}return D(r)}var m=Qe.a=b},"7ahc":function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return R});var te=I("k1fw"),Y=I("0Owb"),N=I("+L6B"),K=I("2/Rp"),A=I("y8nQ"),M=I("Vl3Y"),H=I("tJVT"),P=I("OaEy"),k=I("2fM7"),D=I("q1tI"),b=I.n(D),m=I("VrN/"),f=I.n(m),d=I("p77/"),s=I.n(d),r=I("c5Ni"),u=I.n(r),o=k.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},n={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"]};Qe.b=function(w){var x=w.callback,O=w.onCancel,C=Object(D.useState)("python"),_=Object(H.a)(C,2),y=_[0],h=_[1];function c(p){h(n[p][1])}function v(p){x(p)}return b.a.createElement(M.a,Object(Y.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:v}),b.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},b.a.createElement(k.a,{onChange:c},Object.keys(n).map(function(p){return b.a.createElement(o,{key:p,value:p},n[p][0])}))),b.a.createElement(M.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},b.a.createElement(R,{mode:y})),b.a.createElement("div",{className:"flex-container flex-end"},b.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),b.a.createElement(K.a,{type:"ghost",onClick:O},"\u53D6\u6D88")))};function R(w){var x=w.value,O=w.onChange,C=w.mode,_=w.options,y=_===void 0?{}:_,h=Object(D.useRef)(),c=Object(D.useState)(),v=Object(H.a)(c,2),p=v[0],E=v[1];return Object(D.useEffect)(function(){if(p){function U(F){var z=F.getValue();O&&O(z)}return p.on("change",U),function(){p.off("change",U)}}},[p,O]),Object(D.useEffect)(function(){p&&p.setOption("mode",C)},[p,C]),Object(D.useEffect)(function(){p&&((x!==p.getValue()||x==="")&&setTimeout(function(){p.setValue(x||" ")},300))},[p,x]),Object(D.useEffect)(function(){if(h.current&&!p){var U=f.a.fromTextArea(h.current,Object(te.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},y));E(U)}},[h.current,p]),b.a.createElement("div",{className:"my-codemirror-container"},b.a.createElement("textarea",{ref:h}))}},"7ixt":function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return N});var te={adjustX:1,adjustY:1},Y=[0,0],N={left:{points:["cr","cl"],overflow:te,offset:[-4,0],targetOffset:Y},right:{points:["cl","cr"],overflow:te,offset:[4,0],targetOffset:Y},top:{points:["bc","tc"],overflow:te,offset:[0,-4],targetOffset:Y},bottom:{points:["tc","bc"],overflow:te,offset:[0,4],targetOffset:Y},topLeft:{points:["bl","tl"],overflow:te,offset:[0,-4],targetOffset:Y},leftTop:{points:["tr","tl"],overflow:te,offset:[-4,0],targetOffset:Y},topRight:{points:["br","tr"],overflow:te,offset:[0,-4],targetOffset:Y},rightTop:{points:["tl","tr"],overflow:te,offset:[4,0],targetOffset:Y},bottomRight:{points:["tr","br"],overflow:te,offset:[0,4],targetOffset:Y},rightBottom:{points:["bl","br"],overflow:te,offset:[4,0],targetOffset:Y},bottomLeft:{points:["tl","bl"],overflow:te,offset:[0,4],targetOffset:Y},leftBottom:{points:["br","bl"],overflow:te,offset:[-4,0],targetOffset:Y}},K=N},"815F":function(tn,Qe,I){"use strict";I.d(Qe,"e",function(){return H}),I.d(Qe,"c",function(){return k}),I.d(Qe,"d",function(){return D}),I.d(Qe,"a",function(){return m}),I.d(Qe,"f",function(){return f}),I.d(Qe,"b",function(){return d});var te=I("KQm4"),Y=I("VTBJ"),N=I("Ff2n"),K=I("Zm9Q"),A=I("Kwbf"),M=I("OZM5");function H(s,r){return s!=null?s:r}function P(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=new Map;function u(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(o||[]).forEach(function(n){var R=n.key,w=n.children;Object(A.a)(R!=null,"Tree node must have a certain key: [".concat(a).concat(R,"]"));var x=String(R);Object(A.a)(!r.has(x)||R===null||R===void 0,"Same 'key' exist in the Tree: ".concat(x)),r.set(x,!0),u(w,"".concat(a).concat(x," > "))})}u(s)}function k(s){function r(u){var o=Object(K.a)(u);return o.map(function(a){if(!Object(M.i)(a))return Object(A.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var n=a.key,R=a.props,w=R.children,x=Object(N.a)(R,["children"]),O=Object(Y.a)({key:n},x),C=r(w);return C.length&&(O.children=C),O}).filter(function(a){return a})}return r(s)}function D(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=new Set(r===!0?[]:r),o=[];function a(n){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return n.map(function(w,x){var O=Object(M.h)(R?R.pos:"0",x),C=H(w.key,O),_=Object(Y.a)(Object(Y.a)({},w),{},{parent:R,pos:O,children:null,data:w,isStart:[].concat(Object(te.a)(R?R.isStart:[]),[x===0]),isEnd:[].concat(Object(te.a)(R?R.isEnd:[]),[x===n.length-1])});return o.push(_),r===!0||u.has(C)?_.children=a(w.children||[],_):_.children=[],_})}return a(s),o}function b(s,r,u){var o;u?typeof u=="string"?o=function(R){return R[u]}:typeof u=="function"&&(o=function(R){return u(R)}):o=function(R,w){return H(R.key,w)};function a(n,R,w){var x=n?n.children:s,O=n?Object(M.h)(w.pos,R):"0";if(n){var C=o(n,O),_={node:n,index:R,pos:O,key:C,parentPos:w.node?w.pos:null,level:w.level+1};r(_)}x&&x.forEach(function(y,h){a(y,h,{node:n,pos:O,level:w?w.level+1:-1})})}a(null)}function m(s){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=r.initWrapper,o=r.processEntity,a=r.onProcessFinished,n=arguments.length>2?arguments[2]:void 0,R={},w={},x={posEntities:R,keyEntities:w};return u&&(x=u(x)||x),b(s,function(O){var C=O.node,_=O.index,y=O.pos,h=O.key,c=O.parentPos,v=O.level,p={node:C,index:_,key:h,pos:y,level:v},E=H(h,y);R[y]=p,w[E]=p,p.parent=R[c],p.parent&&(p.parent.children=p.parent.children||[],p.parent.children.push(p)),o&&o(p,x)},n),a&&a(x),x}function f(s,r){var u=r.expandedKeys,o=r.selectedKeys,a=r.loadedKeys,n=r.loadingKeys,R=r.checkedKeys,w=r.halfCheckedKeys,x=r.dragOverNodeKey,O=r.dropPosition,C=r.keyEntities,_=C[s],y={eventKey:s,expanded:u.indexOf(s)!==-1,selected:o.indexOf(s)!==-1,loaded:a.indexOf(s)!==-1,loading:n.indexOf(s)!==-1,checked:R.indexOf(s)!==-1,halfChecked:w.indexOf(s)!==-1,pos:String(_?_.pos:""),dragOver:x===s&&O===0,dragOverGapTop:x===s&&O===-1,dragOverGapBottom:x===s&&O===1};return y}function d(s){var r=s.data,u=s.expanded,o=s.selected,a=s.checked,n=s.loaded,R=s.loading,w=s.halfChecked,x=s.dragOver,O=s.dragOverGapTop,C=s.dragOverGapBottom,_=s.pos,y=s.active,h=Object(Y.a)(Object(Y.a)({},r),{},{expanded:u,selected:o,checked:a,loaded:n,loading:R,halfChecked:w,dragOver:x,dragOverGapTop:O,dragOverGapBottom:C,pos:_,active:y});return"props"in h||Object.defineProperty(h,"props",{get:function(){return Object(A.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),h}},"8EBN":function(tn,Qe,I){(function(te){te(I("VrN/"))})(function(te){"use strict";te.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 Y=0;Y-1&&K.substring(H+1,K.length);if(P)return te.findModeByExtension(P)},te.findModeByName=function(K){K=K.toLowerCase();for(var A=0;A=W.length?ne.slice(W.length):ne}).join(`
`)}var u=[],o=[""],a=new d.a.Renderer,n=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function R(){u.length=0,o=[""]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(X,S,L,W){if(S>=X.length||X[S].level<=L)return S;var ne=X[S];W.push("- "+ne.text+""),S++;var Q=[];return S=x(X,S,ne.level,Q),Q.length>0&&(W.push("
"),Q.forEach(function(ke){W.push(ke)}),W.push("
")),W.push(" "),S=x(X,S,L,W),S}function O(){return x(u,0,0,o),o.push("
"),o.join("")}var C={heading:function(S){var L=n.exec(S);if(L)return{type:"heading",raw:L[0],depth:L[1].length,text:L[2]}},fences:function(S){var L=this.rules.block.fences.exec(S);if(L){var W=L[0],ne=r(W,L[3]||""),Q=L[2]?L[2].trim():L[2];if(["latex","katex","math"].indexOf(Q)>=0){var ke=h(),Vt=ne;ne=ke,c[ke]={type:"block",expression:Vt}}return{type:"code",raw:W,lang:Q,text:ne}}}},_=/(?:\${2})([^\n`]+?)(?:\${2})/gi,y=0,h=function(){return"__special_katext_id_".concat(y++,"__")},c={};function v(){return c}function p(){y=0,c={}}function E(X){return X=X.replace(_,function(S,L){var W=h();return c[W]={type:"inline",expression:L},W}),X}var U=a.listitem;a.listitem=function(X){return U(E(X))};var F=a.paragraph;a.paragraph=function(X){return F(E(X))};var z=a.tablecell;a.tablecell=function(X,S){return z(E(X),S)},a.code=function(X,S,L){var W=(S||"").match(/\S*/)[0];return W?["latex","katex","math"].indexOf(W)>=0?"".concat(X,"
"):'
').concat(L?X:Object(s.escape)(X,!0),`
`):''+(L?X:Object(s.escape)(X,!0))+"
"},a.heading=function(X,S,L){var W=this.options.headerPrefix+L.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:W,level:S,text:X}),"'+X+""},d.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),d.a.use({tokenizer:C,renderer:a});var G=d.a,B=I("SJMd"),T=I("ulZh"),V=I.n(T),Z=I("m3rI"),oe=I("Oy/b"),pe=I("p5ED"),Ye=I("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var xe=function(X,S){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,W){L.__proto__=W}||function(L,W){for(var ne in W)Object.prototype.hasOwnProperty.call(W,ne)&&(L[ne]=W[ne])})(X,S)};function Ie(X,S){function L(){this.constructor=X}xe(X,S),X.prototype=S===null?Object.create(S):(L.prototype=S.prototype,new L)}function Je(X,S,L,W){return new(L||(L=Promise))(function(ne,Q){function ke(Qn){try{kn(W.next(Qn))}catch(nn){Q(nn)}}function Vt(Qn){try{kn(W.throw(Qn))}catch(nn){Q(nn)}}function kn(Qn){var nn;Qn.done?ne(Qn.value):(nn=Qn.value,nn instanceof L?nn:new L(function(ti){ti(nn)})).then(ke,Vt)}kn((W=W.apply(X,S||[])).next())})}function Ke(X,S){var L,W,ne,Q,ke={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return Q={next:Vt(0),throw:Vt(1),return:Vt(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Vt(kn){return function(Qn){return function(nn){if(L)throw new TypeError("Generator is already executing.");for(;ke;)try{if(L=1,W&&(ne=2&nn[0]?W.return:nn[0]?W.throw||((ne=W.return)&&ne.call(W),0):W.next)&&!(ne=ne.call(W,nn[1])).done)return ne;switch(W=0,ne&&(nn=[2&nn[0],ne.value]),nn[0]){case 0:case 1:ne=nn;break;case 4:return ke.label++,{value:nn[1],done:!1};case 5:ke.label++,W=nn[1],nn=[0];continue;case 7:nn=ke.ops.pop(),ke.trys.pop();continue;default:if(!(ne=ke.trys,(ne=ne.length>0&&ne[ne.length-1])||nn[0]!==6&&nn[0]!==2)){ke=0;continue}if(nn[0]===3&&(!ne||nn[1]>ne[0]&&nn[1]',"select"),this.addActionButton(W,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(W,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(W,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(W,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(W,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(W,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(W,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Q){var ke=document.createElement("div");ke.className=""+L.toolbarButtonStyleClass.name,ke.setAttribute("data-type-name",Q.typeName),ke.innerHTML=Q.icon,ke.addEventListener("click",function(){L.markerToolbarButtonClicked(ke,Q)}),L.buttons.push(ke),L.markerButtons.push(ke)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ne=document.createElement("div");ne.className=this.toolbarBlockStyleClass.name,ne.style.whiteSpace="nowrap",ne.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ne),this.addActionButton(ne,'',"render"),this.addActionButton(ne,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},X.prototype.addButtonClickListener=function(S){this.buttonClickListeners.push(S)},X.prototype.removeButtonClickListener=function(S){this.buttonClickListeners.indexOf(S)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(S),1)},X.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},X.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var S=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var L=0;L0&&this.buttonClickListeners.forEach(function(W){return W("marker",L)}),this.markerButtonOverflowBlock.style.display="none"},X.prototype.actionToolbarButtonClicked=function(S,L){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(W){return W("action",L)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},X.prototype.setActiveButton=function(S){this.resetButtonStyles(),S.className=S.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),S.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},X.prototype.setActiveMarkerButton=function(S){var L=this.markerButtons.find(function(W){return W.getAttribute("data-type-name")===S});L&&this.setActiveButton(L)},X.prototype.setCurrentMarker=function(S){var L=this;this.currentMarker=S,this.buttons.filter(function(W){return/delete|notes/.test(W.getAttribute("data-action"))}).forEach(function(W){L.currentMarker===void 0?(W.style.fillOpacity="0.4",W.style.pointerEvents="none"):(W.style.fillOpacity="1",W.style.pointerEvents="all")})},X}(),Nt=function(){function X(S,L,W,ne){this.panels=[],this.panelButtons=[],this.markerjsContainer=S,this.displayMode=L,this.uiStyleSettings=W,this.styles=ne,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return X.prototype.addStyles=function(){var S;this.toolboxStyleClass=this.styles.addClass(new ft("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ft("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var L=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ft("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ft("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ft("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ft("toolbox-panel-row_colors",`
background-color: `+((S=this.uiStyleSettings.toolboxBackgroundColor)!==null&&S!==void 0?S:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ft("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*L)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*L)+`px;
padding: `+L+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ft("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ft("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new ze("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ze("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},X.prototype.show=function(S){var L;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=S,this.uiContainer.className=this.toolboxStyleClass.name+" "+((L=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&L!==void 0?L:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},X.prototype.setPanelButtons=function(S){var L,W,ne=this;this.panels=S,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((L=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&L!==void 0?L:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((W=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&W!==void 0?W:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Q){var ke;Q.uiStyleSettings=ne.uiStyleSettings;var Vt=document.createElement("div");Vt.className=ne.toolboxButtonStyleClass.name+" "+((ke=ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ke!==void 0?ke:ne.toolboxButtonStyleColorsClass.name),Vt.innerHTML=Q.icon,Vt.title=Q.title,Vt.addEventListener("click",function(){ne.panelButtonClick(Q)}),ne.panelButtons.push(Vt),ne.buttonRow.appendChild(Vt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},X.prototype.panelButtonClick=function(S){var L=this,W=-1;if(S!==this.activePanel){W=this.panels.indexOf(S),this.panelRow.innerHTML="";var ne=S.getUi();ne.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ne),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=S}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){L.displayMode==="inline"?L.panelRow.style.display="none":L.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Q,ke){var Vt,kn;Q.className=L.toolboxButtonStyleClass.name+" "+(ke===W?""+((Vt=L.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:L.toolboxActiveButtonStyleColorsClass.name):""+((kn=L.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&kn!==void 0?kn:L.toolboxButtonStyleColorsClass.name))})},X}(),Ze=function(X,S){this.title=X,this.icon=S},Bt=function(X){function S(L,W,ne,Q){var ke=X.call(this,L,Q||'')||this;return ke.colors=[],ke.addTransparent=!1,ke.colorBoxes=[],ke.colors=W,ke.currentColor=ne,ke.setCurrentColor=ke.setCurrentColor.bind(ke),ke.getColorBox=ke.getColorBox.bind(ke),ke}return Ie(S,X),S.prototype.getUi=function(){var L=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.whiteSpace="nowrap",this.colors.forEach(function(ne){var Q=L.getColorBox(ne);W.appendChild(Q),L.colorBoxes.push(Q)}),W},S.prototype.getColorBox=function(L){var W=this,ne=this.uiStyleSettings.toolbarHeight/4,Q=this.uiStyleSettings.toolbarHeight-ne,ke=document.createElement("div");ke.style.display="inline-block",ke.style.boxSizing="content-box",ke.style.width=Q-2+"px",ke.style.height=Q-2+"px",ke.style.padding="1px",ke.style.marginRight="2px",ke.style.marginBottom="2px",ke.style.borderWidth="2px",ke.style.borderStyle="solid",ke.style.borderRadius=(Q+2)/2+"px",ke.style.borderColor=L===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ke.addEventListener("click",function(){W.setCurrentColor(L,ke)});var Vt=document.createElement("div");return Vt.style.display="inline-block",Vt.style.width=Q-2+"px",Vt.style.height=Q-2+"px",Vt.style.backgroundColor=L,Vt.style.borderRadius=Q/2+"px",L==="transparent"&&(Vt.style.fill=this.uiStyleSettings.toolboxAccentColor,Vt.innerHTML=``),ke.appendChild(Vt),ke},S.prototype.setCurrentColor=function(L,W){var ne=this;this.currentColor=L,this.colorBoxes.forEach(function(Q){Q.style.borderColor=Q===W?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(L)},S}(Ze),Ut=function(){function X(S,L,W){this._state="new",this._isSelected=!1,this._container=S,this._overlayContainer=L,this.globalSettings=W,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(X.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),X.prototype.ownsTarget=function(S){return!1},Object.defineProperty(X.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),X.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},X.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},X.prototype.pointerDown=function(S,L){},X.prototype.dblClick=function(S,L){},X.prototype.manipulate=function(S){},X.prototype.pointerUp=function(S){this.stateChanged()},X.prototype.dispose=function(){},X.prototype.addMarkerVisualToContainer=function(S){this.container.childNodes.length>0?this.container.insertBefore(S,this.container.childNodes[0]):this.container.appendChild(S)},X.prototype.getState=function(){return{typeName:X.typeName,state:this.state,notes:this.notes}},X.prototype.restoreState=function(S){this._state=S.state,this.notes=S.notes},X.prototype.scale=function(S,L){},X.prototype.colorChanged=function(S){this.onColorChanged&&this.onColorChanged(S),this.stateChanged()},X.prototype.fillColorChanged=function(S){this.onFillColorChanged&&this.onFillColorChanged(S),this.stateChanged()},X.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var S=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),S.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(S)&&this.onStateChanged(this)}},X.typeName="MarkerBase",X}(),Mt=function(){function X(){this.findGripByVisual=this.findGripByVisual.bind(this)}return X.prototype.findGripByVisual=function(S){return this.topLeft.ownsTarget(S)?this.topLeft:this.topCenter.ownsTarget(S)?this.topCenter:this.topRight.ownsTarget(S)?this.topRight:this.centerLeft.ownsTarget(S)?this.centerLeft:this.centerRight.ownsTarget(S)?this.centerRight:this.bottomLeft.ownsTarget(S)?this.bottomLeft:this.bottomCenter.ownsTarget(S)?this.bottomCenter:this.bottomRight.ownsTarget(S)?this.bottomRight:void 0},X}(),An=function(){function X(){this.GRIP_SIZE=10,this.visual=de.createGroup(),this.visual.appendChild(de.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(de.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return X.prototype.ownsTarget=function(S){return S===this.visual||S===this.visual.childNodes[0]||S===this.visual.childNodes[1]},X}(),mn=function(){function X(){}return X.toITransformMatrix=function(S){return{a:S.a,b:S.b,c:S.c,d:S.d,e:S.e,f:S.f}},X.toSVGMatrix=function(S,L){return S.a=L.a,S.b=L.b,S.c=L.c,S.d=L.d,S.e=L.e,S.f=L.f,S},X}(),pn=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.left=0,Q.top=0,Q.width=0,Q.height=0,Q.defaultSize={x:50,y:20},Q.offsetX=0,Q.offsetY=0,Q.rotationAngle=0,Q.CB_DISTANCE=10,Q._suppressMarkerCreateEvent=!1,Q.container.transform.baseVal.appendItem(de.createTransform()),Q.setupControlBox(),Q}return Ie(S,X),Object.defineProperty(S.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"visual",{get:function(){return this._visual},set:function(L){this._visual=L;var W=de.createTransform();this._visual.transform.baseVal.appendItem(W)},enumerable:!1,configurable:!0}),S.prototype.ownsTarget=function(L){return!!X.prototype.ownsTarget.call(this,L)||!!(this.controlGrips.findGripByVisual(L)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(L))},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.state==="new"&&(this.left=L.x,this.top=L.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ne=this.unrotatePoint(L);if(this.manipulationStartX=ne.x,this.manipulationStartY=ne.y,this.offsetX=ne.x-this.left,this.offsetY=ne.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(W),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(W)){this.activeGrip=this.rotatorGrip;var Q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Q.x-this.width/2,this.top=Q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ke=this.container.transform.baseVal.getItem(0);ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},S.prototype.pointerUp=function(L){var W=this.state;X.prototype.pointerUp.call(this,L),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(L),this._state="select",W==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},S.prototype.moveVisual=function(L){this.visual.style.transform="translate("+L.x+"px, "+L.y+"px)"},S.prototype.manipulate=function(L){var W=this.unrotatePoint(L);this.state==="creating"?this.resize(L):this.state==="move"?(this.left=this.manipulationStartLeft+(W.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(W.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(W):this.state==="rotate"&&this.rotate(L)},S.prototype.resize=function(L){var W=this.manipulationStartLeft,ne=this.manipulationStartWidth,Q=this.manipulationStartTop,ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:W=this.manipulationStartLeft+L.x-this.manipulationStartX,ne=this.manipulationStartWidth+this.manipulationStartLeft-W;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ne=this.manipulationStartWidth+L.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Q=this.manipulationStartTop+L.y-this.manipulationStartY,ke=this.manipulationStartHeight+this.manipulationStartTop-Q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ke=this.manipulationStartHeight+L.y-this.manipulationStartY}ne>=0?(this.left=W,this.width=ne):(this.left=W+ne,this.width=-ne),ke>=0?(this.top=Q,this.height=ke):(this.top=Q+ke,this.height=-ke),this.setSize()},S.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},S.prototype.rotate=function(L){if(Math.abs(L.x-this.centerX)>.1){var W=Math.sign(L.x-this.centerX);this.rotationAngle=180*Math.atan((L.y-this.centerY)/(L.x-this.centerX))/Math.PI+90*W,this.applyRotation()}},S.prototype.applyRotation=function(){var L=this.container.transform.baseVal.getItem(0);L.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(L,0)},S.prototype.rotatePoint=function(L){if(this.rotationAngle===0)return L;var W=this.container.getCTM(),ne=de.createPoint(L.x,L.y);return{x:(ne=ne.matrixTransform(W)).x,y:ne.y}},S.prototype.unrotatePoint=function(L){if(this.rotationAngle===0)return L;var W=this.container.getCTM();W=W.inverse();var ne=de.createPoint(L.x,L.y);return{x:(ne=ne.matrixTransform(W)).x,y:ne.y}},S.prototype.select=function(){X.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},S.prototype.deselect=function(){X.prototype.deselect.call(this),this.controlBox.style.display="none"},S.prototype.setupControlBox=function(){this.controlBox=de.createGroup();var L=de.createTransform();L.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(L),this.container.appendChild(this.controlBox),this.controlRect=de.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=de.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Mt,this.addControlGrips(),this.controlBox.style.display="none"},S.prototype.adjustControlBox=function(){var L=this.controlBox.transform.baseVal.getItem(0);L.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(L,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},S.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},S.prototype.createGrip=function(){var L=new An;return L.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(L.visual),L},S.prototype.positionGrips=function(){var L=this.controlGrips.topLeft.GRIP_SIZE,W=-L/2,ne=W,Q=(this.width+this.CB_DISTANCE)/2-L/2,ke=(this.height+this.CB_DISTANCE)/2-L/2,Vt=this.height+this.CB_DISTANCE-L/2,kn=this.width+this.CB_DISTANCE-L/2;this.positionGrip(this.controlGrips.topLeft.visual,W,ne),this.positionGrip(this.controlGrips.topCenter.visual,Q,ne),this.positionGrip(this.controlGrips.topRight.visual,kn,ne),this.positionGrip(this.controlGrips.centerLeft.visual,W,ke),this.positionGrip(this.controlGrips.centerRight.visual,kn,ke),this.positionGrip(this.controlGrips.bottomLeft.visual,W,Vt),this.positionGrip(this.controlGrips.bottomCenter.visual,Q,Vt),this.positionGrip(this.controlGrips.bottomRight.visual,kn,Vt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Q,ne-3*this.CB_DISTANCE)},S.prototype.positionGrip=function(L,W,ne){var Q=L.transform.baseVal.getItem(0);Q.setTranslate(W,ne),L.transform.baseVal.replaceItem(Q,0)},S.prototype.hideControlBox=function(){this.controlBox.style.display="none"},S.prototype.showControlBox=function(){this.controlBox.style.display=""},S.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:mn.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:mn.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},X.prototype.getState.call(this))},S.prototype.restoreState=function(L){X.prototype.restoreState.call(this,L);var W=L;this.left=W.left,this.top=W.top,this.width=W.width,this.height=W.height,this.rotationAngle=W.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(mn.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,W.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(mn.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,W.containerTransformMatrix))},S.prototype.scale=function(L,W){X.prototype.scale.call(this,L,W);var ne=this.rotatePoint({x:this.left,y:this.top}),Q=this.unrotatePoint({x:ne.x*L,y:ne.y*W});this.left=Q.x,this.top=Q.y,this.width=this.width*L,this.height=this.height*W,this.adjustControlBox()},S}(Ut),tt=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.visual)},S.prototype.createVisual=function(){this.visual=de.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.state==="new"&&(this.createVisual(),this.moveVisual(L),this._state="creating")},S.prototype.manipulate=function(L){X.prototype.manipulate.call(this,L)},S.prototype.resize=function(L){X.prototype.resize.call(this,L),this.setSize()},S.prototype.setSize=function(){X.prototype.setSize.call(this),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},S.prototype.pointerUp=function(L){X.prototype.pointerUp.call(this,L),this.setSize()},S.prototype.setStrokeColor=function(L){this.strokeColor=L,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(L),this.stateChanged()},S.prototype.setFillColor=function(L){this.fillColor=L,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},S.prototype.setStrokeWidth=function(L){this.strokeWidth=L,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},S.prototype.setStrokeDasharray=function(L){this.strokeDasharray=L,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},S.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},X.prototype.getState.call(this))},S.prototype.restoreState=function(L){var W=L;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),X.prototype.restoreState.call(this,L),this.setSize()},S.prototype.scale=function(L,W){X.prototype.scale.call(this,L,W),this.setSize()},S.title="Rectangle marker",S}(pn),fn=function(X){function S(L,W,ne,Q){var ke=X.call(this,L,Q||'')||this;return ke.widths=[],ke.widthBoxes=[],ke.widths=W,ke.currentWidth=ne,ke.setCurrentWidth=ke.setCurrentWidth.bind(ke),ke}return Ie(S,X),S.prototype.getUi=function(){var L=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.widths.forEach(function(ne){var Q=document.createElement("div");Q.style.display="flex",Q.style.flexGrow="2",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=ne===L.currentWidth?L.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){L.setCurrentWidth(ne,Q)}),W.appendChild(Q);var ke=document.createElement("div");ke.innerText=ne.toString(),ke.style.marginRight="5px",Q.appendChild(ke);var Vt=document.createElement("div");Vt.style.minHeight="20px",Vt.style.flexGrow="2",Vt.style.display="flex",Vt.style.alignItems="center";var kn=document.createElement("hr");kn.style.minWidth="20px",kn.style.border="0px",kn.style.borderTop=ne+"px solid "+L.uiStyleSettings.toolboxColor,kn.style.flexGrow="2",Vt.appendChild(kn),Q.appendChild(Vt),L.widthBoxes.push(Q)}),W},S.prototype.setCurrentWidth=function(L,W){var ne=this;this.currentWidth=L,this.widthBoxes.forEach(function(Q){Q.style.borderColor=Q===W?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},S}(Ze),In=function(X){function S(L,W,ne,Q){var ke=X.call(this,L,Q||'')||this;return ke.styles=[],ke.styleBoxes=[],ke.styles=W,ke.currentStyle=ne,ke.setCurrentStyle=ke.setCurrentStyle.bind(ke),ke}return Ie(S,X),S.prototype.getUi=function(){var L=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.styles.forEach(function(ne){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/L.styles.length-5+"%",Q.style.borderColor=ne===L.currentStyle?L.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){L.setCurrentStyle(ne,Q)}),W.appendChild(Q);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.overflow="hidden";var Vt=``;ke.innerHTML=Vt,Q.appendChild(ke),L.styleBoxes.push(Q)}),W},S.prototype.setCurrentStyle=function(L,W){var ne=this;this.currentStyle=L,this.styleBoxes.forEach(function(Q){Q.style.borderColor=Q===W?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},S}(Ze),He=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.strokePanel=new Bt("Line color",ne.defaultColorSet,ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new fn("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new In("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return Ie(S,X),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=X.prototype.getState.call(this);return L.typeName=S.typeName,L},S.typeName="FrameMarker",S.title="Frame marker",S.icon='',S}(tt),Ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},pt=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.x1=0,Q.y1=0,Q.x2=0,Q.y2=0,Q.defaultLength=50,Q.manipulationStartX=0,Q.manipulationStartY=0,Q.manipulationStartX1=0,Q.manipulationStartY1=0,Q.manipulationStartX2=0,Q.manipulationStartY2=0,Q.setupControlBox(),Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!!X.prototype.ownsTarget.call(this,L)||!(!this.grip1.ownsTarget(L)&&!this.grip2.ownsTarget(L))},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.manipulationStartX=L.x,this.manipulationStartY=L.y,this.state==="new"&&(this.x1=L.x,this.y1=L.y,this.x2=L.x,this.y2=L.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(W)?this.activeGrip=this.grip1:this.grip2.ownsTarget(W)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},S.prototype.pointerUp=function(L){var W=this.state;X.prototype.pointerUp.call(this,L),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(L),this._state="select",W==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},S.prototype.adjustVisual=function(){},S.prototype.manipulate=function(L){this.state==="creating"?this.resize(L):this.state==="move"?(this.x1=this.manipulationStartX1+L.x-this.manipulationStartX,this.y1=this.manipulationStartY1+L.y-this.manipulationStartY,this.x2=this.manipulationStartX2+L.x-this.manipulationStartX,this.y2=this.manipulationStartY2+L.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(L)},S.prototype.resize=function(L){switch(this.activeGrip){case this.grip1:this.x1=L.x,this.y1=L.y;break;case this.grip2:case void 0:this.x2=L.x,this.y2=L.y}this.adjustVisual(),this.adjustControlBox()},S.prototype.select=function(){X.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},S.prototype.deselect=function(){X.prototype.deselect.call(this),this.controlBox.style.display="none"},S.prototype.setupControlBox=function(){this.controlBox=de.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},S.prototype.adjustControlBox=function(){this.positionGrips()},S.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},S.prototype.createGrip=function(){var L=new An;return L.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(L.visual),L},S.prototype.positionGrips=function(){var L=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-L/2,this.y1-L/2),this.positionGrip(this.grip2.visual,this.x2-L/2,this.y2-L/2)},S.prototype.positionGrip=function(L,W,ne){var Q=L.transform.baseVal.getItem(0);Q.setTranslate(W,ne),L.transform.baseVal.replaceItem(Q,0)},S.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},X.prototype.getState.call(this))},S.prototype.restoreState=function(L){X.prototype.restoreState.call(this,L);var W=L;this.x1=W.x1,this.y1=W.y1,this.x2=W.x2,this.y2=W.y2},S.prototype.scale=function(L,W){X.prototype.scale.call(this,L,W),this.x1=this.x1*L,this.y1=this.y1*W,this.x2=this.x2*L,this.y2=this.y2*W,this.adjustVisual(),this.adjustControlBox()},S}(Ut),Ct=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.strokePanel=new Bt("Line color",ne.defaultColorSet,ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new fn("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new In("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.visual&&L!==this.selectorLine&&L!==this.visibleLine)},S.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},S.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),de.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},S.prototype.setStrokeColor=function(L){this.strokeColor=L,this.adjustVisual(),this.colorChanged(L)},S.prototype.setStrokeWidth=function(L){this.strokeWidth=L,this.adjustVisual()},S.prototype.setStrokeDasharray=function(L){this.strokeDasharray=L,this.adjustVisual(),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},X.prototype.getState.call(this));return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){X.prototype.restoreState.call(this,L);var W=L;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.createVisual(),this.adjustVisual()},S.typeName="LineMarker",S.title="Line marker",S.icon='',S}(pt),Ge=function(X){function S(L,W,ne,Q){var ke=X.call(this,L,Q||'')||this;return ke.fonts=[],ke.fontBoxes=[],ke.fonts=W,ke.currentFont=ne,ke.setCurrentFont=ke.setCurrentFont.bind(ke),ke}return Ie(S,X),S.prototype.getUi=function(){var L=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.flexGrow="2",this.fonts.forEach(function(ne){var Q=document.createElement("div");Q.style.display="inline-block",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/L.fonts.length-5+"%",Q.style.borderColor=ne===L.currentFont?L.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){L.setCurrentFont(ne,Q)}),W.appendChild(Q);var ke=document.createElement("div");ke.style.display="flex",ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.fontFamily=ne,ke.style.overflow="hidden";var Vt=document.createElement("div");Vt.style.whiteSpace="nowrap",Vt.style.overflow="hidden",Vt.style.textOverflow="ellipsis",Vt.innerHTML="The quick brown fox jumps over the lazy dog",ke.appendChild(Vt),Q.appendChild(ke),L.fontBoxes.push(Q)}),W},S.prototype.setCurrentFont=function(L,W){var ne=this;this.currentFont=L,this.fontBoxes.forEach(function(Q){Q.style.borderColor=Q===W?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},S}(Ze),vt=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.color="transparent",Q.padding=5,Q.DEFAULT_TEXT="your text here",Q.text=Q.DEFAULT_TEXT,Q.isMoved=!1,Q.color=ne.defaultColor,Q.fontFamily=ne.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setColor=Q.setColor.bind(Q),Q.setFont=Q.setFont.bind(Q),Q.renderText=Q.renderText.bind(Q),Q.sizeText=Q.sizeText.bind(Q),Q.textEditDivClicked=Q.textEditDivClicked.bind(Q),Q.showTextEditor=Q.showTextEditor.bind(Q),Q.setSize=Q.setSize.bind(Q),Q.positionTextEditor=Q.positionTextEditor.bind(Q),Q.colorPanel=new Bt("Color",ne.defaultColorSet,ne.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.fontFamilyPanel=new Ge("Font",ne.defaultFontFamilies,ne.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q}return Ie(S,X),S.prototype.ownsTarget=function(L){if(X.prototype.ownsTarget.call(this,L)||L===this.visual||L===this.textElement||L===this.bgRectangle)return!0;var W=!1;return this.textElement.childNodes.forEach(function(ne){ne===L&&(W=!0)}),W},S.prototype.createVisual=function(){this.visual=de.createGroup(),this.bgRectangle=de.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=de.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.isMoved=!1,this.pointerDownPoint=L,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(L),this._state="creating")},S.prototype.renderText=function(){var L=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(W){L.textElement.appendChild(de.createTSpan(W.trim()===""?" ":W.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},S.prototype.getTextScale=function(){var L=this.textElement.getBBox(),W=1;if(L.width>0&&L.height>0){var ne=(1*this.width-this.width*this.padding*2/100)/L.width,Q=(1*this.height-this.height*this.padding*2/100)/L.height;W=Math.min(ne,Q)}return W},S.prototype.getTextPosition=function(L){var W=this.textElement.getBBox(),ne=0,Q=0;return W.width>0&&W.height>0&&(ne=(this.width-W.width*L)/2,Q=this.height/2-W.height*L/2),{x:ne,y:Q}},S.prototype.sizeText=function(){var L=this.textElement.getBBox(),W=this.getTextScale(),ne=this.getTextPosition(W);ne.y-=L.y*W,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ne.x+"px, "+ne.y+"px) scale("+W+", "+W+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ne.x,ne.y),this.textElement.transform.baseVal.getItem(1).setScale(W,W))},S.prototype.manipulate=function(L){X.prototype.manipulate.call(this,L),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(L.x-this.pointerDownPoint.x)>5||Math.abs(L.y-this.pointerDownPoint.y)>5)},S.prototype.resize=function(L){X.prototype.resize.call(this,L),this.isMoved=!0,this.setSize(),this.sizeText()},S.prototype.setSize=function(){X.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},S.prototype.pointerUp=function(L){var W=this.state;W==="creating"&&(this._suppressMarkerCreateEvent=!0),X.prototype.pointerUp.call(this,L),this.setSize(),(W==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},S.prototype.showTextEditor=function(){var L=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(W){W.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var W=Number.parseFloat(L.textEditor.style.fontSize);L.textEditor.clientWidth>=Number.parseInt(L.textEditor.style.maxWidth)&&W>.9;)W-=.1,L.textEditor.style.fontSize=Math.max(W,.9)+"em"}),this.textEditor.addEventListener("keyup",function(W){W.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(W){if(W.clipboardData){var ne=W.clipboardData.getData("text"),Q=window.getSelection();if(!Q.rangeCount)return!1;Q.deleteFromDocument(),Q.getRangeAt(0).insertNode(document.createTextNode(ne)),W.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){L.textEditDivClicked(L.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},S.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var L=this.getTextScale(),W=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ne=this.textElement.getBBox(),Q={x:ne.width*L,y:ne.height*L};W.x-=Q.x/2,W.y-=Q.y/2,this.textEditor.style.top=W.y+"px",this.textEditor.style.left=W.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-W.x+"px",this.textEditor.style.fontSize=Math.max(16*L,12)+"px",this.textElement.style.display="none"}},S.prototype.textEditDivClicked=function(L){this.text=L.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},S.prototype.select=function(){X.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},S.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),X.prototype.deselect.call(this)},S.prototype.dblClick=function(L,W){X.prototype.dblClick.call(this,L,W),this.showTextEditor()},S.prototype.setColor=function(L){this.textElement&&de.setAttributes(this.textElement,[["fill",L]]),this.color=L,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(L)},S.prototype.setFont=function(L){this.textElement&&de.setAttributes(this.textElement,[["font-family",L]]),this.fontFamily=L,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},S.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},S.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},X.prototype.getState.call(this));return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){var W=L;this.color=W.color,this.fontFamily=W.fontFamily,this.padding=W.padding,this.text=W.text,this.createVisual(),X.prototype.restoreState.call(this,L),this.setSize()},S.prototype.scale=function(L,W){X.prototype.scale.call(this,L,W),this.setSize(),this.sizeText(),this.positionTextEditor()},S.typeName="TextMarker",S.title="Text marker",S.icon='',S}(pn),Ae=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.color="transparent",Q.lineWidth=3,Q.drawing=!1,Q.pixelRatio=1,Q.color=ne.defaultColor,Q.lineWidth=ne.defaultStrokeWidth,Q.pixelRatio=ne.freehandPixelRatio,Q.setColor=Q.setColor.bind(Q),Q.addCanvas=Q.addCanvas.bind(Q),Q.finishCreation=Q.finishCreation.bind(Q),Q.setLineWidth=Q.setLineWidth.bind(Q),Q.colorPanel=new Bt("Color",ne.defaultColorSet,ne.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.lineWidthPanel=new fn("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.lineWidthPanel.onWidthChanged=Q.setLineWidth,Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.visual&&L!==this.drawingImage)},S.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var L=de.createTransform();this.visual.transform.baseVal.appendItem(L),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(L,W){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(L.x,L.y),this.drawing=!0):X.prototype.pointerDown.call(this,L,W)},S.prototype.manipulate=function(L){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(L.x,L.y),this.canvasContext.stroke()):X.prototype.manipulate.call(this,L)},S.prototype.resize=function(L){X.prototype.resize.call(this,L),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},S.prototype.pointerUp=function(L){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):X.prototype.pointerUp.call(this,L)},S.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},S.prototype.select=function(){this.state==="creating"&&this.finishCreation(),X.prototype.select.call(this)},S.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),X.prototype.deselect.call(this)},S.prototype.finishCreation=function(){for(var L=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),W=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ne=W[0],Q=W[1],ke=W[2],Vt=W[3],kn=!1,Qn=0;Qn0&&(kn=!0,QnVt&&(Vt=Qn),nn>ke&&(ke=nn));if(kn){this.left=ne/this.pixelRatio,this.top=Q/this.pixelRatio,this.width=(ke-ne)/this.pixelRatio,this.height=(Vt-Q)/this.pixelRatio;var ti=document.createElement("canvas");ti.width=ke-ne,ti.height=Vt-Q,ti.getContext("2d").putImageData(this.canvasContext.getImageData(ne,Q,ke-ne,Vt-Q),0,0),this.drawingImgUrl=ti.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},S.prototype.setDrawingImage=function(){de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},S.prototype.setColor=function(L){this.color=L,this.colorChanged(L)},S.prototype.setLineWidth=function(L){this.lineWidth=L},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=Object.assign({drawingImgUrl:this.drawingImgUrl},X.prototype.getState.call(this));return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){this.createVisual(),X.prototype.restoreState.call(this,L),this.drawingImgUrl=L.drawingImgUrl,this.setDrawingImage()},S.prototype.scale=function(L,W){X.prototype.scale.call(this,L,W),this.setDrawingImage()},S.typeName="FreehandMarker",S.title="Freehand marker",S.icon='',S}(pn),ge=function(X){function S(L,W,ne){var Q=X.call(this,L,ne||'')||this;return Q.typeBoxes=[],Q.currentType=W,Q.setCurrentType=Q.setCurrentType.bind(Q),Q}return Ie(S,X),S.prototype.getUi=function(){var L=this,W=document.createElement("div");W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2";for(var ne=function(Vt){var kn="both";switch(Vt){case 0:kn="both";break;case 1:kn="start";break;case 2:kn="end";break;case 3:kn="none"}var Qn=document.createElement("div");if(Qn.style.display="flex",Qn.style.flexGrow="2",Qn.style.alignItems="center",Qn.style.justifyContent="space-between",Qn.style.padding="5px",Qn.style.borderWidth="2px",Qn.style.borderStyle="solid",Qn.style.borderColor=kn===Q.currentType?Q.uiStyleSettings.toolboxAccentColor:"transparent",Qn.addEventListener("click",function(){L.setCurrentType(kn,Qn)}),W.appendChild(Qn),kn==="both"||kn==="start"){var nn=document.createElement("div");nn.style.display="flex",nn.style.alignItems="center",nn.style.minHeight="20px",nn.innerHTML=``,nn.style.marginLeft="5px",Qn.appendChild(nn)}var ti=document.createElement("div");ti.style.display="flex",ti.style.alignItems="center",ti.style.minHeight="20px",ti.style.flexGrow="2";var qn=document.createElement("hr");if(qn.style.minWidth="20px",qn.style.border="0px",qn.style.borderTop="3px solid "+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee"),qn.style.flexGrow="2",ti.appendChild(qn),Qn.appendChild(ti),kn==="both"||kn==="end"){var Li=document.createElement("div");Li.style.display="flex",Li.style.alignItems="center",Li.style.minHeight="20px",Li.innerHTML=``,Li.style.marginRight="5px",Qn.appendChild(Li)}Q.typeBoxes.push(Qn)},Q=this,ke=0;ke<4;ke++)ne(ke);return W},S.prototype.setCurrentType=function(L,W){var ne=this;this.currentType=L,this.typeBoxes.forEach(function(Q){Q.style.borderColor=Q===W?ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},S}(Ze),Ee=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.arrowType="end",Q.arrowBaseHeight=10,Q.arrowBaseWidth=10,Q.getArrowPoints=Q.getArrowPoints.bind(Q),Q.setArrowType=Q.setArrowType.bind(Q),Q.arrowTypePanel=new ge("Arrow type","end"),Q.arrowTypePanel.onArrowTypeChanged=Q.setArrowType,Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.arrow1&&L!==this.arrow2)},S.prototype.getArrowPoints=function(L,W){var ne=this.arrowBaseWidth+2*this.strokeWidth,Q=this.arrowBaseHeight+2*this.strokeWidth;return L-ne/2+","+(W+Q/2)+" "+L+","+(W-Q/2)+" "+(L+ne/2)+","+(W+Q/2)},S.prototype.createTips=function(){this.arrow1=de.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=de.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow2)},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.state==="creating"&&this.createTips()},S.prototype.adjustVisual=function(){if(X.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",de.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),de.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var L=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.arrow1.transform.baseVal.getItem(0);W.setRotate(L,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(W,0);var ne=this.arrow2.transform.baseVal.getItem(0);ne.setRotate(L+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ne,0)}},S.prototype.setArrowType=function(L){this.arrowType=L,this.adjustVisual(),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=Object.assign({arrowType:this.arrowType},X.prototype.getState.call(this));return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){X.prototype.restoreState.call(this,L);var W=L;this.arrowType=W.arrowType,this.createTips(),this.adjustVisual()},S.typeName="ArrowMarker",S.title="Arrow marker",S.icon='',S}(Ct),ae=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.fillColor=ne.defaultFillColor,Q.strokeWidth=0,Q.fillPanel=new Bt("Color",ne.defaultColorSet,ne.defaultFillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q}return Ie(S,X),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=X.prototype.getState.call(this);return L.typeName=S.typeName,L},S.typeName="CoverMarker",S.title="Cover marker",S.icon='',S}(tt),re=function(X){function S(L,W,ne,Q){var ke=X.call(this,L,Q||'')||this;return ke.opacities=[],ke.opacityBoxes=[],ke.opacities=W,ke.currentOpacity=ne,ke.setCurrentOpacity=ke.setCurrentOpacity.bind(ke),ke}return Ie(S,X),S.prototype.getUi=function(){var L=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",W.style.justifyContent="space-between",this.opacities.forEach(function(ne){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="center",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=ne===L.currentOpacity?L.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){L.setCurrentOpacity(ne,Q)}),W.appendChild(Q);var ke=document.createElement("div");ke.innerText=100*ne+"%",Q.appendChild(ke),L.opacityBoxes.push(Q)}),W},S.prototype.setCurrentOpacity=function(L,W){var ne=this;this.currentOpacity=L,this.opacityBoxes.forEach(function(Q){Q.style.borderColor=Q===W?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},S}(Ze),he=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.setOpacity=Q.setOpacity.bind(Q),Q.fillColor=ne.defaultHighlightColor,Q.strokeWidth=0,Q.opacity=ne.defaultHighlightOpacity,Q.fillPanel=new Bt("Color",ne.defaultColorSet,Q.fillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q.opacityPanel=new re("Opacity",ne.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return Ie(S,X),S.prototype.setOpacity=function(L){this.opacity=L,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=X.prototype.getState.call(this);return L.typeName=S.typeName,L},S.typeName="HighlightMarker",S.title="Highlight marker",S.icon='',S}(ae),ve='',me=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.bgColor="transparent",Q.tipPosition={x:0,y:0},Q.tipBase1Position={x:0,y:0},Q.tipBase2Position={x:0,y:0},Q.tipMoving=!1,Q.color=ne.defaultStrokeColor,Q.bgColor=ne.defaultFillColor,Q.fontFamily=ne.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setBgColor=Q.setBgColor.bind(Q),Q.getTipPoints=Q.getTipPoints.bind(Q),Q.positionTip=Q.positionTip.bind(Q),Q.setTipPoints=Q.setTipPoints.bind(Q),Q.colorPanel=new Bt("Text color",ne.defaultColorSet,Q.color,''),Q.colorPanel.onColorChanged=Q.setColor,Q.bgColorPanel=new Bt("Fill color",ne.defaultColorSet,Q.bgColor,ve),Q.bgColorPanel.onColorChanged=Q.setBgColor,Q.fontFamilyPanel=new Ge("Font",ne.defaultFontFamilies,ne.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q.tipGrip=new An,Q.tipGrip.visual.transform.baseVal.appendItem(de.createTransform()),Q.controlBox.appendChild(Q.tipGrip.visual),Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return X.prototype.ownsTarget.call(this,L)||this.tipGrip.ownsTarget(L)||this.tip===L},S.prototype.createTip=function(){de.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=de.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},S.prototype.pointerDown=function(L,W){this.state==="new"&&X.prototype.pointerDown.call(this,L,W),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(W)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):X.prototype.pointerDown.call(this,L,W)},S.prototype.pointerUp=function(L){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,X.prototype.pointerUp.call(this,L);else{var W=this.state==="creating";X.prototype.pointerUp.call(this,L),this.setTipPoints(W),this.positionTip()}},S.prototype.manipulate=function(L){if(this.tipMoving){var W=this.unrotatePoint(L);this.tipPosition={x:W.x-this.manipulationStartLeft,y:W.y-this.manipulationStartTop},this.positionTip()}else X.prototype.manipulate.call(this,L)},S.prototype.setBgColor=function(L){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",L]]),de.setAttributes(this.tip,[["fill",L]])),this.bgColor=L,this.fillColorChanged(L)},S.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},S.prototype.setTipPoints=function(L){L===void 0&&(L=!1);var W=Math.min(this.height/2,15),ne=this.height/5;L&&(this.tipPosition={x:W+ne/2,y:this.height+20});var Q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Q',S}(vt),Be=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.fillColor=ne.defaultFillColor,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.setOpacity=Q.setOpacity.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q.strokePanel=new Bt("Line color",be(ne.defaultColorSet,["transparent"]),ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.fillPanel=new Bt("Fill color",be(ne.defaultColorSet,["transparent"]),Q.fillColor,ve),Q.fillPanel.onColorChanged=Q.setFillColor,Q.strokeWidthPanel=new fn("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new In("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q.opacityPanel=new re("Opacity",ne.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.visual)},S.prototype.createVisual=function(){this.visual=de.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.state==="new"&&(this.createVisual(),this.moveVisual(L),this._state="creating")},S.prototype.manipulate=function(L){X.prototype.manipulate.call(this,L)},S.prototype.resize=function(L){X.prototype.resize.call(this,L),this.setSize()},S.prototype.setSize=function(){X.prototype.setSize.call(this),de.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},S.prototype.pointerUp=function(L){X.prototype.pointerUp.call(this,L),this.setSize()},S.prototype.setStrokeColor=function(L){this.strokeColor=L,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(L),this.stateChanged()},S.prototype.setFillColor=function(L){this.fillColor=L,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(L),this.stateChanged()},S.prototype.setStrokeWidth=function(L){this.strokeWidth=L,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},S.prototype.setStrokeDasharray=function(L){this.strokeDasharray=L,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},S.prototype.setOpacity=function(L){this.opacity=L,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},X.prototype.getState.call(this));return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){var W=L;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),X.prototype.restoreState.call(this,L),this.setSize()},S.prototype.scale=function(L,W){X.prototype.scale.call(this,L,W),this.setSize()},S.typeName="EllipseMarker",S.title="Ellipse marker",S.icon='',S}(pn),Tt=function(X){function S(L,W,ne){return X.call(this,L,W,ne)||this}return Ie(S,X),Object.defineProperty(S.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.tip1&&L!==this.tip2)},S.prototype.createTips=function(){this.tip1=de.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.tip1),this.tip2=de.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.tip2)},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.state==="creating"&&this.createTips()},S.prototype.adjustVisual=function(){if(X.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(de.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var L=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.tip1.transform.baseVal.getItem(0);W.setRotate(L,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(W,0);var ne=this.tip2.transform.baseVal.getItem(0);ne.setRotate(L+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ne,0)}},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=X.prototype.getState.call(this);return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){X.prototype.restoreState.call(this,L),this.createTips(),this.adjustVisual()},S.typeName="MeasurementMarker",S.title="Measurement marker",S.icon='',S}(Ct),Jt=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.strokePanel.colors=ne.defaultColorSet,Q.fillColor="transparent",Q}return Ie(S,X),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=X.prototype.getState.call(this);return L.typeName=S.typeName,L},S.typeName="EllipseFrameMarker",S.title="Ellipse frame marker",S.icon='',S}(Be),En=function(){function X(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(X.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),X.prototype.addUndoStep=function(S){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(S)||(this.undoStack.push(S),JSON.stringify(this.lastRedoStep)!==JSON.stringify(S)&&this.redoStack.splice(0,this.redoStack.length))},X.prototype.replaceLastUndoStep=function(S){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=S)},X.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},X.prototype.undo=function(){if(this.undoStack.length>1){var S=this.undoStack.pop();return S!==void 0&&this.redoStack.push(S),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},X.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},X}(),mt=function(X){function S(L,W,ne){var Q=X.call(this,L,W,ne)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.curveX=0,Q.curveY=0,Q.manipulationStartCurveX=0,Q.manipulationStartCurveY=0,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.positionGrips=Q.positionGrips.bind(Q),Q.addControlGrips=Q.addControlGrips.bind(Q),Q.adjustVisual=Q.adjustVisual.bind(Q),Q.setupControlBox=Q.setupControlBox.bind(Q),Q.resize=Q.resize.bind(Q),Q.strokeColor=ne.defaultColor,Q.strokeWidth=ne.defaultStrokeWidth,Q.strokeDasharray=ne.defaultStrokeDasharray,Q.strokePanel=new Bt("Line color",ne.defaultColorSet,ne.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new fn("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new In("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return Ie(S,X),S.prototype.ownsTarget=function(L){return!(!X.prototype.ownsTarget.call(this,L)&&L!==this.visual&&L!==this.selectorCurve&&L!==this.visibleCurve&&!this.curveGrip.ownsTarget(L))},S.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},S.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorCurve=de.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=de.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},S.prototype.pointerDown=function(L,W){X.prototype.pointerDown.call(this,L,W),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=L.x,this.curveY=L.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(W)&&(this.activeGrip=this.curveGrip,this._state="resize")},S.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),de.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},S.prototype.setupControlBox=function(){X.prototype.setupControlBox.call(this),this.curveControlLine1=de.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=de.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},S.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,X.prototype.addControlGrips.call(this)},S.prototype.positionGrips=function(){X.prototype.positionGrips.call(this);var L=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-L/2,this.curveY-L/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},S.prototype.manipulate=function(L){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+L.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+L.y-this.manipulationStartY),X.prototype.manipulate.call(this,L)},S.prototype.resize=function(L){this.activeGrip===this.curveGrip&&(this.curveX=L.x,this.curveY=L.y),X.prototype.resize.call(this,L),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},S.prototype.setStrokeColor=function(L){this.strokeColor=L,this.adjustVisual(),this.colorChanged(L)},S.prototype.setStrokeWidth=function(L){this.strokeWidth=L,this.adjustVisual()},S.prototype.setStrokeDasharray=function(L){this.strokeDasharray=L,this.adjustVisual()},S.prototype.scale=function(L,W){this.curveX=this.curveX*L,this.curveY=this.curveY*W,X.prototype.scale.call(this,L,W)},Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),S.prototype.getState=function(){var L=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},X.prototype.getState.call(this));return L.typeName=S.typeName,L},S.prototype.restoreState=function(L){X.prototype.restoreState.call(this,L);var W=L;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.curveX=W.curveX,this.curveY=W.curveY,this.createVisual(),this.adjustVisual()},S.typeName="CurveMarker",S.title="Curve marker",S.icon='',S}(pt),Qt=function(){function X(S,L){L===void 0&&(L=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=S,this.cancelable=L}return Object.defineProperty(X.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),X.prototype.preventDefault=function(){this._defaultPrevented=!0},X}(),gt=function(X){function S(L,W,ne){var Q=X.call(this,L,!1)||this;return Q.dataUrl=W,Q.state=ne,Q}return Ie(S,X),S}(Qt),yt=function(X){function S(L,W,ne){ne===void 0&&(ne=!1);var Q=X.call(this,L,ne)||this;return Q.marker=W,Q}return Ie(S,X),S}(Qt),rt=function(){function X(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return X.prototype.addEventListener=function(S,L){this[S].push(L)},X.prototype.removeEventListener=function(S,L){var W=this[S].indexOf(L);W>-1&&this[S].splice(W,1)},X}(),ce=function(){function X(S){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ue,this._isOpen=!1,this.undoRedoManager=new En,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new rt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=X.instanceCounter++,this.styles=new wt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=S,this.targetRoot=document.body,this.width=S.clientWidth,this.height=S.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(X.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ae,Ee,vt,Jt,Be,he,me,Tt,ae,Ct,mt]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ae,Ee,vt,Be,he,me]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ae,Ee,vt,he]},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(S){var L=this;this._availableMarkerTypes.splice(0),S.forEach(function(W){if(typeof W=="string"){var ne=L.ALL_MARKER_TYPES.find(function(Q){return Q.typeName===W});ne!==void 0&&L._availableMarkerTypes.push(ne)}else L._availableMarkerTypes.push(W)})},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(S){this._zoomLevel=S,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),X.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),nt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},X.prototype.show=function(){var S=this;this.styles.styleSheetRoot===void 0&&jt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=jt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(L){return L(new Qt(S))})},X.prototype.render=function(){return Je(this,void 0,void 0,function(){var S;return Ke(this,function(L){switch(L.label){case 0:return this.setCurrentMarker(),(S=new Kt).naturalSize=this.renderAtNaturalSize,S.imageType=this.renderImageType,S.imageQuality=this.renderImageQuality,S.markersOnly=this.renderMarkersOnly,S.width=this.renderWidth,S.height=this.renderHeight,[4,S.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return L.sent(),[4,S.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,L.sent()]}})})},X.prototype.close=function(S){var L=this;if(S===void 0&&(S=!1),this.isOpen){var W=!1;S||this.eventListeners.beforeclose.forEach(function(ne){var Q=new Qt(L,!0);ne(Q),Q.defaultPrevented&&(W=!0)}),W||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ne){return ne(new Qt(L))}),this.detachEvents(),this._isOpen=!1)}},X.prototype.addMarkersToToolbar=function(){for(var S,L=[],W=0;Wthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*S:this.editorCanvas.clientWidth,W=L',S.title="Powered by marker.js",S.style.display="grid",S.style.alignItems="center",S.style.justifyItems="center",S.style.padding="3px",S.style.width="20px",S.style.height="20px",this.logoUI.appendChild(S),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},X.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},X.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},X.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},X.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var S=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=S+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new dt(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(S),1),S.dispose()},X.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},X.prototype.toolbarButtonClicked=function(S,L){if(S==="marker"&&L!==void 0)this.createNewMarker(L);else if(S==="action")switch(L){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},X.prototype.deleteSelectedMarker=function(){var S=this;if(this._currentMarker!==void 0){var L=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ne){var Q=new yt(S,S._currentMarker,!0);ne(Q),Q.defaultPrevented&&(L=!0)}),!L){var W=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ne){return ne(new yt(S,W))})}}},X.prototype.clear=function(){var S=this,L=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ke){var Vt=new yt(S,void 0,!0);ke(Vt),Vt.defaultPrevented&&(L=!0)}),!L)){this.setCurrentMarker();for(var W=function(ke){var Vt=ne.markers[ke];ne.setCurrentMarker(ne.markers[ke]),ne._currentMarker.dispose(),ne.markerImage.removeChild(ne._currentMarker.container),ne.markers.splice(ne.markers.indexOf(ne._currentMarker),1),ne.eventListeners.markerdelete.forEach(function(kn){return kn(new yt(S,Vt))})},ne=this,Q=this.markers.length-1;Q>=0;Q--)W(Q);this.addUndoStep()}},Object.defineProperty(X.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),X.prototype.showNotesEditor=function(){var S;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(S=this._currentMarker.notes)!==null&&S!==void 0?S:"",this.overlayContainer.appendChild(this.notesArea))},X.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},X.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},X.prototype.addUndoStep=function(){var S=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var L=this.getState(),W=this.undoRedoManager.getLastUndoStep();if(!W||W.width===L.width&&W.height===L.height){var ne=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(L),ne1&&this.panTo({x:S.clientX,y:S.clientY}))},X.prototype.onPointerUp=function(S){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(S.clientX,S.clientY)),this.isDragging=!1,this.addUndoStep()},X.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},X.prototype.onKeyUp=function(S){this._currentMarker===void 0||this.notesArea!==void 0||S.key!=="Delete"&&S.key!=="Backspace"||this.deleteSelectedMarker()},X.prototype.clientToLocalCoordinates=function(S,L){var W=this.markerImage.getBoundingClientRect();return{x:(S-W.left)/this.zoomLevel,y:(L-W.top)/this.zoomLevel}},X.prototype.onWindowResize=function(){this.positionUI()},X.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var S=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=S+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},X.prototype.addLicenseKey=function(S){nt.addKey(S)},X.prototype.addEventListener=function(S,L){this.eventListeners.addEventListener(S,L)},X.prototype.removeEventListener=function(S,L){this.eventListeners.removeEventListener(S,L)},X.prototype.renderState=function(S){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(S),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(X.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),X.prototype.focus=function(){var S=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(L){return L(new Qt(S))}))},X.prototype.blur=function(){var S=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(L){return L(new Qt(S))}))},X.instanceCounter=0,X}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Re=function(X,S){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,W){L.__proto__=W}||function(L,W){for(var ne in W)Object.prototype.hasOwnProperty.call(W,ne)&&(L[ne]=W[ne])})(X,S)};function At(X,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function L(){this.constructor=X}Re(X,S),X.prototype=S===null?Object.create(S):(L.prototype=S.prototype,new L)}function ot(X,S,L,W){return new(L||(L=Promise))(function(ne,Q){function ke(Qn){try{kn(W.next(Qn))}catch(nn){Q(nn)}}function Vt(Qn){try{kn(W.throw(Qn))}catch(nn){Q(nn)}}function kn(Qn){var nn;Qn.done?ne(Qn.value):(nn=Qn.value,nn instanceof L?nn:new L(function(ti){ti(nn)})).then(ke,Vt)}kn((W=W.apply(X,S||[])).next())})}function Yt(X,S){var L,W,ne,Q,ke={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return Q={next:Vt(0),throw:Vt(1),return:Vt(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Vt(kn){return function(Qn){return function(nn){if(L)throw new TypeError("Generator is already executing.");for(;ke;)try{if(L=1,W&&(ne=2&nn[0]?W.return:nn[0]?W.throw||((ne=W.return)&&ne.call(W),0):W.next)&&!(ne=ne.call(W,nn[1])).done)return ne;switch(W=0,ne&&(nn=[2&nn[0],ne.value]),nn[0]){case 0:case 1:ne=nn;break;case 4:return ke.label++,{value:nn[1],done:!1};case 5:ke.label++,W=nn[1],nn=[0];continue;case 7:nn=ke.ops.pop(),ke.trys.pop();continue;default:if(!(ne=ke.trys,(ne=ne.length>0&&ne[ne.length-1])||nn[0]!==6&&nn[0]!==2)){ke=0;continue}if(nn[0]===3&&(!ne||nn[1]>ne[0]&&nn[1]0&&L>0){var W=new Ti(S,L),ne=W.ratio>=1?20:W.getHorizontalLength(20),Q=W.ratio<1?20:W.getVerticalLength(20),ke=document.createElementNS("http://www.w3.org/2000/svg","svg");ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ke);var Vt=_e.createDefs();ke.appendChild(Vt);var kn=_e.createElement("clipPath",[["id","text-bg-clip"]]);Vt.appendChild(kn);var Qn=_e.createPath(_e.getHollowRectanglePath((24-ne)/2,(24-Q)/2,ne,Q,(24-ne)/2+2,(24-Q)/2+2,ne-4,Q-4));ke.appendChild(Qn);var nn=_e.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);nn.appendChild(_e.createTSpan(S+":"+L)),ke.appendChild(nn);var ti=nn.getBBox();_e.setAttributes(nn,[["x",((24-ti.width)/2).toString()],["y",((24-ti.height)/2-ti.y).toString()]]);var qn=_e.createPath(_e.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(ti.width))/2,(24-Math.ceil(ti.height))/2,Math.ceil(ti.width),Math.ceil(ti.height)));return kn.appendChild(qn),_e.setAttributes(Qn,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ke),ke.outerHTML}return''},X}(),hi=function(X){function S(L,W,ne){var Q=X.call(this,L,W)||this;return Q.isDropdownOpen=!1,Q.onClick=Q.dropdownButtonClicked,Q.dropdownButtons=ne,Q}return At(S,X),S.prototype.setupDropdown=function(){var L=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(W){W.className=L.className,W.colorsClassName=L.colorsClassName,L.dropdownBlock.appendChild(W.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},S.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},S.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},S.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},S.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},S.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},S}($n),fi=function(){function X(S,L){this.GRIP_SIZE=10,this.color=S,this.fillColor=L,this.visual=_e.createGroup(),this.visual.appendChild(_e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_e.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return X.prototype.ownsTarget=function(S){return S===this.visual||S===this.visual.childNodes[0]||S===this.visual.childNodes[1]},X.prototype.setCenter=function(S,L){this.visual.childNodes.forEach(function(W){return _e.setAttributes(W,[["cx",S.toString()],["cy",L.toString()]])})},X}(),ji=function(){function X(S,L,W,ne){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=S,this.canvasHeight=L,this.margin=W,this.container=ne,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(X.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(S){this._aspectRatio=S,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(S){this._isGridVisible=S,this.gridContainer&&_e.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(S){this._zoomFactor=S,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),X.prototype.open=function(){var S=this;this.cropShadeElement=_e.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_e.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var L=0;Lthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-L.height/2),_e.setAttributes(this.cropRectElement,[["x",L.x.toString()],["y",L.y.toString()],["width",L.width.toString()],["height",L.height.toString()]]);var W=L.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Q,ke){var Vt=L.y+W*(ke+1);_e.setAttributes(Q,[["x1",""+L.x],["y1",""+Vt],["x2",""+(L.x+L.width)],["y2",""+Vt]])});var ne=L.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Q,ke){var Vt=L.x+ne*(ke+1);_e.setAttributes(Q,[["x1",""+Vt],["y1",""+L.y],["x2",""+Vt],["y2",""+(L.y+L.height)]])}),_e.setAttributes(this.cropShadeElement,[["d",_e.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,L.x,L.y,L.width,L.height)]]),this.topLeftGrip.setCenter(L.x,L.y),this.topRightGrip.setCenter(L.x+L.width,L.y),this.bottomLeftGrip.setCenter(L.x,L.y+L.height),this.bottomRightGrip.setCenter(L.x+L.width,L.y+L.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},X.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},X.prototype.clientToLocalCoordinates=function(S,L){var W=this.container.getBoundingClientRect();return{x:S-W.left+this.margin,y:L-W.top+this.margin}},X.prototype.onPointerDown=function(S){this.container.setPointerCapture(S.pointerId),this.previousPoint=this.clientToLocalCoordinates(S.clientX,S.clientY),this.cropRectElement===S.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(S.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(S.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(S.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(S.target)&&(this.activeGrip=this.bottomRightGrip)},X.prototype.onPointerMove=function(S){if(this.isMoving)this.move(this.clientToLocalCoordinates(S.clientX,S.clientY));else if(this.activeGrip){var L=this.clientToLocalCoordinates(S.clientX,S.clientY);this.resize(L)}S.preventDefault()},X.prototype.onPointerUp=function(S){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(S.pointerId)},X.prototype.move=function(S){var L=S.x-this.previousPoint.x,W=S.y-this.previousPoint.y;this.zoomFactor!==1&&(L=-L/this.zoomFactor,W=-W/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+L),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+W),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=S},X.prototype.resize=function(S){var L=Object.assign({},this.cropRect),W=S.x-this.previousPoint.x,ne=S.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:L.x+Wthis.canvasWidth*this.zoomFactor&&(W=this.canvasWidth*this.zoomFactor-L.width),L.width+=W}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(L.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(W),L.height=this.aspectRatio.getVerticalLength(L.width)):(L.y+=ne,L.height=this.cropRect.y+this.cropRect.height-L.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?L.height=this.aspectRatio.getVerticalLength(L.width):L.height+=ne}L.width<10&&(L.x=this.cropRect.x,L.width=10),L.height<10&&(L.y=this.cropRect.y,L.height=10),this.previousPoint=S,L.x>=this.margin&&L.y>=this.margin&&L.x-this.margin+L.width<=this.canvasWidth&&L.y-this.margin+L.height<=this.canvasHeight&&(this.cropRect=L,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},X.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var S=this.cropRect.x+this.cropRect.width/2,L=this.cropRect.y+this.cropRect.height/2,W=this.aspectRatio.getHorizontalLength(this.cropRect.height),ne=this.aspectRatio.getVerticalLength(this.cropRect.width);W/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=S-this.cropRect.width/2,this.cropRect.y=L-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},X.prototype.getRescaledRect=function(S,L,W,ne,Q,ke){var Vt=W/S,kn=ne/L;return{x:(Q.x-ke)*Vt+ke,y:(Q.y-ke)*kn+ke,width:Q.width*Vt,height:Q.height*kn}},X.prototype.scaleCanvas=function(S,L){var W=this.getRescaledRect(this.canvasWidth,this.canvasHeight,S,L,this.cropRect,this.margin);this.canvasWidth=S,this.canvasHeight=L,this.onCropChange&&this.onCropChange(W),this.setCropRectangle(W)},X}(),er=function(){function X(S){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=S,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(X.prototype,"angle",{get:function(){return this._angle},set:function(S){this._angle=S,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),X.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},X.prototype.onPointerDown=function(S){this.controlContainer.setPointerCapture(S.pointerId),this.isDragging=!0,this.previousPoint={x:S.clientX,y:S.clientY}},X.prototype.onPointerMove=function(S){this.isDragging&&(this.onAngleChange&&this.onAngleChange((S.clientX-this.previousPoint.x)/5),this.previousPoint.x=S.clientX)},X.prototype.onPointerUp=function(S){this.isDragging&&this.onAngleChange&&this.onAngleChange((S.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(S.pointerId)},X.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var S=this.angleLabelText.getBBox();_e.setAttributes(this.angleLabelElement,[["x",((this.width-S.width)/2).toString()],["y",(this.height/2).toString()]])}},X.prototype.positionScaleShape=function(){if(this.scaleShape){var S=this.scaleShape.transform.baseVal.getItem(0);S.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(S,0)}},X.prototype.getVisual=function(){var S=document.createElementNS("http://www.w3.org/2000/svg","svg");S.setAttribute("xmlns","http://www.w3.org/2000/svg"),S.setAttribute("width",this.width+"px"),S.setAttribute("height",this.height+"px"),S.setAttribute("viewBox","0 0 "+this.width+" "+this.height),S.style.flexShrink="0",document.body.appendChild(S);for(var L="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,W=1;W<=this.width/5+10;W++){var ne=W%5==0?this.height/3:this.height/6;L+="h4v"+-ne+"h1v"+ne}L+="v1H0Z",this.scaleShape=_e.createPath(L);var Q=_e.createTransform();this.scaleShape.transform.baseVal.appendItem(Q),S.appendChild(this.scaleShape),this.angleLabelElement=_e.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_e.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ke=_e.createTSpan("");return ke.innerHTML="°",this.angleLabelElement.appendChild(ke),S.appendChild(this.angleLabelElement),document.body.removeChild(S),S},X}(),yr=function(){function X(){this.naturalSize=!1,this.imageType="image/png"}return X.prototype.rasterize=function(S,L,W,ne,Q,ke,Vt){var kn=this;return new Promise(function(Qn){var nn=document.createElement("canvas");nn.width=S.width.baseVal.value-2*ne,nn.height=S.height.baseVal.value-2*ne;var ti=1,qn=1;kn.naturalSize===!0?(ti=L.naturalWidth/(S.width.baseVal.value-2*ne)/ke,qn=L.naturalHeight/(S.height.baseVal.value-2*ne)/Vt,nn.width=L.naturalWidth/ke,nn.height=L.naturalHeight/Vt):kn.width!==void 0&&kn.height!==void 0&&(ti=kn.width/W.width,qn=kn.height/W.height,nn.width*=ti,nn.height*=qn);var Li=nn.getContext("2d");Li.translate(nn.width/2,nn.height/2),Li.rotate(Q*Math.PI/180),Li.scale(ke,Vt),Li.translate(-nn.width/2,-nn.height/2),Li.drawImage(L,0,0,nn.width,nn.height);var lr=document.createElement("canvas");lr.width=W.width*ti,lr.height=W.height*qn,lr.getContext("2d").putImageData(Li.getImageData((W.x-ne)*ti,(W.y-ne)*qn,W.width*ti,W.height*qn),0,0),Qn(lr.toDataURL(kn.imageType,kn.imageQuality))})},X}(),cn=function(){function X(S){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=X.instanceCounter++,this.styles=new Ne(this.instanceNo),this.target=S,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(X.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(S){this._zoomToCropEnabled=S,S?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(S){this._isGridVisible=S,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"gridLines",{get:function(){return this._gridLines},set:function(S){this._gridLines=S,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(S){this._rotationAngle=S,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"aspectRatio",{get:function(){var S;return(S=this._aspectRatio)!==null&&S!==void 0?S:this.aspectRatios[0]},set:function(S){this._aspectRatio=S},enumerable:!1,configurable:!0}),X.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},X.prototype.show=function(){this.showUI(),this.open()},X.prototype.close=function(S){S===void 0&&(S=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),S||this.closeEventListeners.forEach(function(L){return L()}),this._isOpen=!1)},X.prototype.addRenderEventListener=function(S){this.renderEventListeners.push(S)},X.prototype.removeRenderEventListener=function(S){this.renderEventListeners.indexOf(S)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(S),1)},X.prototype.addCloseEventListener=function(S){this.closeEventListeners.push(S)},X.prototype.removeCloseEventListener=function(S){this.closeEventListeners.indexOf(S)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(S),1)},X.prototype.setupResizeObserver=function(){var S=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){S.resize(S.target.clientWidth,S.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},X.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var S=1*this.target.clientWidth/this.target.clientHeight,L=this.contentDiv.clientWidth/S>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*S:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,W=L+2*this.CANVAS_MARGINS+this.CANVAS_MARGIN?this.target.offsetTop-(S+this.CANVAS_MARGIN):0;this.coverDiv.style.top=L+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},X.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},X.prototype.addTopToolbar=function(){var S=this;this.topToolbar=new vn,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var L=new ci;L.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(L);var W=[];this.aspectRatios.forEach(function(qn){var Li=new $n(Wi.getIcon(qn.horizontal,qn.vertical),qn.horizontal===0&&qn.vertical===0?"FREE":qn.horizontal+":"+qn.vertical);Li.onClick=function(){return S.ratioButtonClicked(qn)},W.push(Li)}),this.aspectRatioButton=new hi(Wi.getIcon(0,0),"Aspect ratio",W),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,L.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ne=new $n('',"Toggle grid");ne.isActive=this.isGridVisible,ne.onClick=function(){S.isGridVisible=!S.isGridVisible,ne.isActive=S.isGridVisible},L.addButton(ne);var Q=new $n('',"Zoom to selection");if(Q.isActive=this.zoomToCropEnabled,Q.onClick=function(){S.zoomToCropEnabled=!S.zoomToCropEnabled,Q.isActive=S.zoomToCropEnabled},L.addButton(Q),!rn.isLicensed){var ke=new Cn;this.topToolbar.addElementBlock(ke);var Vt=document.createElement("div");Vt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var kn=document.createElement("a");kn.style.color="currentColor",kn.href="https://markerjs.com/products/cropro",kn.target="_blank",kn.innerHTML='',Vt.appendChild(kn),ke.addElement(Vt)}var Qn=new ci;Qn.minWidth=3*this.toolbarHeight+"px",Qn.contentAlign="end",this.topToolbar.addButtonBlock(Qn);var nn=new $n('',"OK");nn.onClick=this.startRenderAndClose,Qn.addButton(nn),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(nn.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var ti=new $n('',"Close");ti.onClick=this.close,Qn.addButton(ti),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(ti.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},X.prototype.addBottomToolbar=function(){var S=this;this.bottomToolbar=new vn,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var L=new ci;L.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(L);var W=new $n('',"Rotate left");W.onClick=this.rotateLeftButtonClicked,L.addButton(W);var ne=new $n('',"Rotate right");ne.onClick=this.rotateRightButtonClicked,L.addButton(ne);var Q=new Cn;Q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Q),this.straightener=new er("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Qn){S.rotateBy(Qn),S.straightener.angle=S.rotationAngle},Q.addElement(this.straightener.getUI());var ke=new ci;ke.minWidth=2*this.toolbarHeight+"px",ke.contentAlign="end",this.bottomToolbar.addButtonBlock(ke);var Vt=new $n('',"Flip horizontal");Vt.onClick=this.flipHorizontallyButtonClicked,ke.addButton(Vt);var kn=new $n('',"Flip vertical");kn.onClick=this.flipVerticallyButtonClicked,ke.addButton(kn)},X.prototype.ratioButtonClicked=function(S){this.aspectRatio=S,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},X.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Wi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},X.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ti(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},X.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},X.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},X.prototype.restoreState=function(S){if(S){var L=this.cropLayer.getRescaledRect(S.width,S.height,this.imageWidth,this.imageHeight,S.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(L),this.cropRectChanged(L),this.flippedHorizontally=S.flippedHorizontally,this.flippedVertically=S.flippedVertically,this.applyFlip(),this.rotationAngle=S.rotationAngle,this.applyRotation()}},X.prototype.clientToLocalCoordinates=function(S,L){var W=this.cropImage.getBoundingClientRect();return{x:S-W.left,y:L-W.top}},X.prototype.onWindowResize=function(){this.positionUI()},X.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var S=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=S+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},X.prototype.rotateLeftButtonClicked=function(){var S=this.rotationAngle-90;this.rotationAngle%90!=0&&(S+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(S)},X.prototype.rotateRightButtonClicked=function(){var S=this.rotationAngle+90;this.rotationAngle%90!=0&&(S-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(S)},X.prototype.rotateTo=function(S){S=(S=S>180?S-360:S)<=-180?S+360:S,this.rotationAngle=S,this.applyRotation()},X.prototype.rotateBy=function(S){this.rotateTo((this.rotationAngle+S)%360)},X.prototype.applyRotation=function(){var S=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var L=this.editingTargetRotationContainer.transform.baseVal.getItem(0);L.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(L,0);var W=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/W.width,this.imageHeight/W.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=S},X.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},X.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},X.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},X.prototype.startRenderAndClose=function(){return ot(this,void 0,void 0,function(){var S,L;return Yt(this,function(W){switch(W.label){case 0:return[4,this.render()];case 1:return S=W.sent(),L=this.getState(),this.renderEventListeners.forEach(function(ne){return ne(S,L)}),this.close(!0),[2]}})})},X.prototype.render=function(){return ot(this,void 0,void 0,function(){var S;return Yt(this,function(L){switch(L.label){case 0:return(S=new yr).naturalSize=this.renderAtNaturalSize,S.imageType=this.renderImageType,S.imageQuality=this.renderImageQuality,S.width=this.renderWidth,S.height=this.renderHeight,this.unzoomFromCrop(),_e.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,S.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return L.sent(),[4,S.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,L.sent()]}})})},X.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Xt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Xt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Xt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var S=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Xt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*S)+`px;
height: `+(this.toolbarHeight-2*S)+`px;
padding: `+S+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Xt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Xt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new xt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new xt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Xt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Xt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Xt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Xt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*S)+`px;
padding: `+S+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Xt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},X.instanceCounter=0,X}(),ri=I("8hTe"),pr=I.n(ri),Cr=/]*>/g;function tr(X){var S=document.createElement("div");return S.innerHTML=X,S.childNodes.length===0?"":S.childNodes[0].nodeValue}var nr=Qe.a=function(X){var S=X.value,L=S===void 0?"":S,W=X.edit,ne=W===void 0?!1:W,Q=X.className,ke=X.showTextOnly,Vt=X.showLines,kn=X.replaces,Qn=X.zoomImg,nn=X.hasMask,ti=X.style,qn=ti===void 0?{}:ti,Li=X.stylesPrev,lr=Li===void 0?{}:Li,ar=String(L),Ki=Object(D.useRef)(),Pr=Object(D.useRef)(),Vr=Object(D.useState)(""),Ai=Object(H.a)(Vr,2),wi=Ai[0],ir=Ai[1],Fi=Object(D.useState)("office"),Bn=Object(H.a)(Fi,2),gn=Bn[0],Tn=Bn[1],_n=function(){var Oe=new cn(Pr.current);Oe.displayMode="popup",Oe.addRenderEventListener(function(){var Ve=Object(M.a)(k.a.mark(function et(Ot){var Et;return k.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Ki.current.style.display="none",ht.next=3,Object(Ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ot}});case 3:Et=ht.sent,Et!=null&&Et.id&&kn(Pr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(Et==null?void 0:Et.id,"?type=").concat(Et.content_type));case 5:case"end":return ht.stop()}},et)}));return function(et){return Ve.apply(this,arguments)}}()),Oe.show()},si=function(){var Oe=new ce(Pr.current);Oe.settings.displayMode="popup",Oe.addEventListener("render",function(){var Ve=Object(M.a)(k.a.mark(function et(Ot){var Et;return k.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Ki.current.style.display="none",!Pr.current){ht.next=6;break}return ht.next=4,Object(Ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ot.dataUrl}});case 4:Et=ht.sent,Et!=null&&Et.id&&kn(Pr.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(Et==null?void 0:Et.id,"?type=").concat(Et.content_type));case 6:case"end":return ht.stop()}},et)}));return function(et){return Ve.apply(this,arguments)}}()),Oe.show(),window.markerArea=Oe},ai=Object(D.useMemo)(function(){Ki.current&&(Ki.current.style.zIndex=-1);try{var qe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Oe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ve=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ar=ar.replace(qe,"("+Z.a.API_SERVER+"/api/attachments/").replace(Oe,'"'+Z.a.API_SERVER+"/api/attachments/").replace(Ve,'"'+Z.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(je){}var et=G(ar),Ot=v();if(ar.match(/\[TOC\]/)&&(et=et.replace("[TOC]
",O()),R()),et=et.replace(/(__special_katext_id_\d+__)/g,function(je,ht){var it=Ot[ht],st=it.type,bt=it.expression;return Object(oe.renderToString)(tr(bt)||"",{displayMode:st==="block",throwOnError:!1,output:"html"})}),et=et.replace(/▁/g,"\u2581\u2581\u2581"),p(),ke){var Et=document.createElement("div");return Et.innerHTML=et,Et.innerText}return setTimeout(function(){return Ce()},500),et},[ar]),J=Object(D.useRef)();w.WebkitLineClamp=Vt,Vt&&(qn=Object(A.a)(Object(A.a)({},qn),w));function ue(qe){var Oe=qe.target;if(Oe.tagName.toUpperCase()==="IMG"){if(Qn){var Ve=Oe.getAttribute("src");ir(Ve),Tn("image")}}else if(Oe.tagName.toUpperCase()==="A"){var et=Oe.getAttribute("href");if(et.indexOf("office")>-1)qe.preventDefault(),ir(et),Tn("office");else if(et.indexOf("application/pdf")>-1)qe.preventDefault(),ir(et),Tn("pdf");else if(et.indexOf("text/html")>-1)qe.preventDefault(),ir(et),Tn("html");else if(et.startsWith("#")){qe.preventDefault();var Ot=document.getElementById(et.replace("#",""));Ot&&Ot.scrollIntoView(!0)}}}var Ce=function(){var Oe,Ve=(Oe=J.current)===null||Oe===void 0?void 0:Oe.querySelectorAll("video");Ve==null||Ve.forEach(function(et){if(et.oncontextmenu=function(){return!1},et.src.indexOf(".m3u8")>-1&&!et.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Ot=new V.a;Ot.loadSource(et.src),Ot.attachMedia(et)}}})};Object(D.useEffect)(function(){if(J.current&&ai&&(ai.match(Cr)&&window.PR.prettyPrint()),J.current)return J.current.addEventListener("click",ue),function(){J.current.removeEventListener("click",ue),p(),R()}},[ai,J.current,ue]);var Te=function(Oe){if(!ne)return;Oe.target.nodeName==="IMG"?(Ki.current.style.zIndex=1,Ki.current.style.display="flex",Ki.current.style.width=Oe.target.clientWidth+"px",Ki.current.style.height=Oe.target.clientHeight+"px",Ki.current.style.top=Oe.target.offsetTop+"px",Ki.current.style.left=Oe.target.offsetLeft+"px",Pr.current.src=Oe.target.getAttribute("src")):Ki.current.style.display="none"};return b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:J,style:Object(A.a)({},qn),className:"".concat(Q||""," markdown-body ").concat(pr.a.mdBody),onMouseOver:Te,dangerouslySetInnerHTML:{__html:ai}}),b.a.createElement("div",{ref:Ki,className:pr.a.button},b.a.createElement(Y.a,null,b.a.createElement(K.a,{onClick:function(){return _n()}},"\u88C1\u526A"),b.a.createElement(K.a,{onClick:function(){return si()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:Pr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),b.a.createElement(pe.a,{close:!0,data:wi,type:wi!=null&&wi.length?gn:"",style:Object(A.a)({},lr),onClose:function(){return ir("")}}))}},"9VGf":function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return N});var te=I("q1tI"),Y=I.n(te);function N(K,A){var M=Object(te.useRef)();Object(te.useEffect)(function(){M.current=K}),Object(te.useEffect)(function(){function H(){M.current()}if(A!==null){var P=setInterval(H,A);return function(){return clearInterval(P)}}},[A])}},AHFd:function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return P});var te=I("giR+"),Y=I("fyUT"),N=I("OaEy"),K=I("2fM7"),A=I("tJVT"),M=I("q1tI"),H=I.n(M),P;(function(D){D[D.Number=1]="Number",D[D.Percent=2]="Percent"})(P||(P={}));var k=function(b){var m=b.value,f=b.onChange,d=b.disabled,s=b.hidePercentOption,r=s===void 0?!1:s,u=Object(M.useMemo)(function(){return r?P.Number:P.Percent},[r]),o=Object(M.useState)(u),a=Object(A.a)(o,2),n=a[0],R=a[1],w=Object(M.useCallback)(function(O){return n===P.Number?"".concat(O,"\u5206"):"".concat(O,"%")},[n]),x=Object(M.useCallback)(function(O){if(n===P.Number){var C=O.replace("\u5206","");return isNaN(parseInt(C,10))?0:C}else{var _=O.replace("%","");return _}},[n]);return Object(M.useEffect)(function(){R(m.type)},[m]),H.a.createElement("div",{style:{display:"inline-block"}},H.a.createElement(K.a,{onChange:function(C){R(C),f({type:C,inputValue:C===P.Number?5:20})},value:n||u,style:{width:100},options:r?[{label:"\u5206\u503C",value:P.Number}]:[{label:"\u767E\u5206\u6BD4",value:P.Percent},{label:"\u5206\u503C",value:P.Number}],disabled:d}),H.a.createElement(Y.a,{disabled:d,value:m.inputValue,formatter:w,parser:x,max:n===P.Percent?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:function(C){f({type:n,inputValue:C})}}))};Qe.b=k},BU3w:function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return M});var te=I("MNnm"),Y="rc-util-key";function N(H){if(H.attachTo)return H.attachTo;var P=document.querySelector("head");return P||document.body}function K(H){var P,k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var D=document.createElement("style");if((P=k.csp)===null||P===void 0?void 0:P.nonce){var b;D.nonce=(b=k.csp)===null||b===void 0?void 0:b.nonce}D.innerHTML=H;var m=N(k),f=m.firstChild;return k.prepend&&m.prepend?m.prepend(D):k.prepend&&f?m.insertBefore(D,f):m.appendChild(D),D}var A=new Map;function M(H,P){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},D=N(k);if(!A.has(D)){var b=K("",k),m=b.parentNode;A.set(D,m),m.removeChild(b)}var f=Array.from(A.get(D).children).find(function(o){return o.tagName==="STYLE"&&o[Y]===P});if(f){var d,s;if(((d=k.csp)===null||d===void 0?void 0:d.nonce)&&f.nonce!==((s=k.csp)===null||s===void 0?void 0:s.nonce)){var r;f.nonce=(r=k.csp)===null||r===void 0?void 0:r.nonce}return f.innerHTML!==H&&(f.innerHTML=H),f}var u=K(H,k);return u[Y]=P,u}},Bd2K:function(tn,Qe,I){(function(te){te(I("VrN/"),I("osHv"))})(function(te){te.defineOption("autoCloseTags",!1,function(k,D,b){if(b!=te.Init&&b&&k.removeKeyMap("autoCloseTags"),!D)return;var m={name:"autoCloseTags"};(typeof D!="object"||D.whenClosing!==!1)&&(m["'/'"]=function(f){return M(f)}),(typeof D!="object"||D.whenOpening!==!1)&&(m["'>'"]=function(f){return K(f)}),k.addKeyMap(m)});var Y=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],N=["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 K(k){if(k.getOption("disableInput"))return te.Pass;for(var D=k.listSelections(),b=[],m=k.getOption("autoCloseTags"),f=0;fd.ch&&(a=a.slice(0,a.length-s.end+d.ch));var x=a.toLowerCase();if(!a||s.type=="string"&&(s.end!=d.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&o.close||s.string.indexOf("/")==d.ch-s.start-1||R&&H(R,x)>-1||P(k,r.mode.xmlCurrentContext&&r.mode.xmlCurrentContext(u)||[],a,d,!0))return te.Pass;var O=typeof m=="object"&&m.emptyTags;if(O&&H(O,a)>-1){b[f]={text:"/>",newPos:te.Pos(d.line,d.ch+2)};continue}var C=w&&H(w,x)>-1;b[f]={indent:C,text:">"+(C?`
`:"")+""+a+">",newPos:C?te.Pos(d.line+1,0):te.Pos(d.line,d.ch+1)}}for(var _=typeof m=="object"&&m.dontIndentOnAutoClose,f=D.length-1;f>=0;f--){var y=b[f];k.replaceRange(y.text,D[f].head,D[f].anchor,"+insert");var h=k.listSelections().slice(0);h[f]={head:y.newPos,anchor:y.newPos},k.setSelections(h),!_&&y.indent&&(k.indentLine(y.newPos.line,null,!0),k.indentLine(y.newPos.line+1,null,!0))}}function A(k,D){for(var b=k.listSelections(),m=[],f=D?"/":"",d=k.getOption("autoCloseTags"),s=typeof d=="object"&&d.dontIndentOnSlash,r=0;r"&&(R+=">"),m[r]=R}if(k.replaceSelections(m),b=k.listSelections(),!s)for(var r=0;r=0&&D[u]==b;u--)++r;m=s.to;for(var u=1;u0){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:"",D=[],b=0;bAe.length)&&(ge=Ae.length);for(var Ee=0,ae=new Array(ge);Ee=Ae.length?{done:!0}:{done:!1,value:Ae[ae++]}}}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 Ee=Ae[Symbol.iterator](),Ee.next.bind(Ee)}function M(Ae,ge){return ge={exports:{}},Ae(ge,ge.exports),ge.exports}var H=M(function(Ae){function ge(){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 Ee(ae){Ae.exports.defaults=ae}Ae.exports={defaults:ge(),getDefaults:ge,changeDefaults:Ee}}),P=H.defaults,k=H.getDefaults,D=H.changeDefaults,b=/[&<>"']/,m=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},r=function(ge){return s[ge]};function u(Ae,ge){if(ge){if(b.test(Ae))return Ae.replace(m,r)}else if(f.test(Ae))return Ae.replace(d,r);return Ae}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ae){return Ae.replace(o,function(ge,Ee){return Ee=Ee.toLowerCase(),Ee==="colon"?":":Ee.charAt(0)==="#"?Ee.charAt(1)==="x"?String.fromCharCode(parseInt(Ee.substring(2),16)):String.fromCharCode(+Ee.substring(1)):""})}var n=/(^|[^\[])\^/g;function R(Ae,ge){Ae=Ae.source||Ae,ge=ge||"";var Ee={replace:function(re,he){return he=he.source||he,he=he.replace(n,"$1"),Ae=Ae.replace(re,he),Ee},getRegex:function(){return new RegExp(Ae,ge)}};return Ee}var w=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function O(Ae,ge,Ee){if(Ae){var ae;try{ae=decodeURIComponent(a(Ee)).replace(w,"").toLowerCase()}catch(re){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}ge&&!x.test(Ee)&&(Ee=c(ge,Ee));try{Ee=encodeURI(Ee).replace(/%25/g,"%")}catch(re){return null}return Ee}var C={},_=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,h=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(Ae,ge){C[" "+Ae]||(_.test(Ae)?C[" "+Ae]=Ae+"/":C[" "+Ae]=U(Ae,"/",!0)),Ae=C[" "+Ae];var Ee=Ae.indexOf(":")===-1;return ge.substring(0,2)==="//"?Ee?ge:Ae.replace(y,"$1")+ge:ge.charAt(0)==="/"?Ee?ge:Ae.replace(h,"$1")+ge:Ae+ge}var v={exec:function(){}};function p(Ae){for(var ge=1,Ee,ae;ge=0&&me[Tt]==="\\";)Be=!Be;return Be?"|":" |"}),ae=Ee.split(/ \|/),re=0;if(ae.length>ge)ae.splice(ge);else for(;ae.length=ae.length?re.slice(ae.length):re}).join(`
`)}var xe=function(){function Ae(Ee){this.options=Ee||B}var ge=Ae.prototype;return ge.space=function(ae){var re=this.rules.block.newline.exec(ae);if(re)return re[0].length>1?{type:"space",raw:re[0]}:{raw:`
`}},ge.code=function(ae,re){var he=this.rules.block.code.exec(ae);if(he){var ve=re[re.length-1];if(ve&&ve.type==="paragraph")return{raw:he[0],text:he[0].trimRight()};var me=he[0].replace(/^ {4}/gm,"");return{type:"code",raw:he[0],codeBlockStyle:"indented",text:this.options.pedantic?me:T(me,`
`)}}},ge.fences=function(ae){var re=this.rules.block.fences.exec(ae);if(re){var he=re[0],ve=Ye(he,re[3]||"");return{type:"code",raw:he,lang:re[2]?re[2].trim():re[2],text:ve}}},ge.heading=function(ae){var re=this.rules.block.heading.exec(ae);if(re)return{type:"heading",raw:re[0],depth:re[1].length,text:re[2]}},ge.nptable=function(ae){var re=this.rules.block.nptable.exec(ae);if(re){var he={type:"table",header:V(re[1].replace(/^ *| *\| *$/g,"")),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:re[3]?re[3].replace(/\n$/,"").split(`
`):[],raw:re[0]};if(he.header.length===he.align.length){var ve=he.align.length,me;for(me=0;me ?/gm,"");return{type:"blockquote",raw:re[0],text:he}}},ge.list=function(ae){var re=this.rules.block.list.exec(ae);if(re){for(var he=re[0],ve=re[2],me=ve.length>1,Be=ve[ve.length-1]===")",Tt={type:"list",raw:he,ordered:me,start:me?+ve.slice(0,-1):"",loose:!1,items:[]},Jt=re[0].match(this.rules.block.item),En=!1,mt,Qt,gt,yt,rt,ce,Re,At=Jt.length,ot=0;ot1||this.options.smartLists&>!==ve)&&(yt=Jt.slice(ot+1).join(`
`),Tt.raw=Tt.raw.substring(0,Tt.raw.length-yt.length),ot=At-1)),rt=En||/\n\n(?!\s*$)/.test(mt),ot!==At-1&&(En=mt.charAt(mt.length-1)===`
`,rt||(rt=En)),rt&&(Tt.loose=!0),ce=/^\[[ xX]\] /.test(mt),Re=void 0,ce&&(Re=mt[1]!==" ",mt=mt.replace(/^\[[ xX]\] +/,"")),Tt.items.push({type:"list_item",raw:he,task:ce,checked:Re,loose:rt,text:mt});return Tt}},ge.html=function(ae){var re=this.rules.block.html.exec(ae);if(re)return{type:this.options.sanitize?"paragraph":"html",raw:re[0],pre:!this.options.sanitizer&&(re[1]==="pre"||re[1]==="script"||re[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):Z(re[0]):re[0]}},ge.def=function(ae){var re=this.rules.block.def.exec(ae);if(re){re[3]&&(re[3]=re[3].substring(1,re[3].length-1));var he=re[1].toLowerCase().replace(/\s+/g," ");return{tag:he,raw:re[0],href:re[2],title:re[3]}}},ge.table=function(ae){var re=this.rules.block.table.exec(ae);if(re){var he={type:"table",header:V(re[1].replace(/^ *| *\| *$/g,"")),align:re[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:re[3]?re[3].replace(/\n$/,"").split(`
`):[]};if(he.header.length===he.align.length){he.raw=re[0];var ve=he.align.length,me;for(me=0;me/i.test(ve[0])&&(re=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(ve[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ve[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:ve[0],inLink:re,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):Z(ve[0]):ve[0]}},ge.link=function(ae){var re=this.rules.inline.link.exec(ae);if(re){var he=oe(re[2],"()");if(he>-1){var ve=re[0].indexOf("!")===0?5:4,me=ve+re[1].length+he;re[2]=re[2].substring(0,he),re[0]=re[0].substring(0,me).trim(),re[3]=""}var Be=re[2],Tt="";if(this.options.pedantic){var Jt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Be);Jt?(Be=Jt[1],Tt=Jt[3]):Tt=""}else Tt=re[3]?re[3].slice(1,-1):"";Be=Be.trim().replace(/^<([\s\S]*)>$/,"$1");var En=pe(re,{href:Be&&Be.replace(this.rules.inline._escapes,"$1"),title:Tt&&Tt.replace(this.rules.inline._escapes,"$1")},re[0]);return En}},ge.reflink=function(ae,re){var he;if((he=this.rules.inline.reflink.exec(ae))||(he=this.rules.inline.nolink.exec(ae))){var ve=(he[2]||he[1]).replace(/\s+/g," ");if(ve=re[ve.toLowerCase()],!ve||!ve.href){var me=he[0].charAt(0);return{type:"text",raw:me,text:me}}var Be=pe(he,ve,he[0]);return Be}},ge.strong=function(ae,re,he){he===void 0&&(he="");var ve=this.rules.inline.strong.start.exec(ae);if(ve&&(!ve[1]||ve[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){re=re.slice(-1*ae.length);var me=ve[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;me.lastIndex=0;for(var Be;(ve=me.exec(re))!=null;)if(Be=this.rules.inline.strong.middle.exec(re.slice(0,ve.index+3)),Be)return{type:"strong",raw:ae.slice(0,Be[0].length),text:ae.slice(2,Be[0].length-2)}}},ge.em=function(ae,re,he){he===void 0&&(he="");var ve=this.rules.inline.em.start.exec(ae);if(ve&&(!ve[1]||ve[1]&&(he===""||this.rules.inline.punctuation.exec(he)))){re=re.slice(-1*ae.length);var me=ve[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;me.lastIndex=0;for(var Be;(ve=me.exec(re))!=null;)if(Be=this.rules.inline.em.middle.exec(re.slice(0,ve.index+2)),Be)return{type:"em",raw:ae.slice(0,Be[0].length),text:ae.slice(1,Be[0].length-1)}}},ge.codespan=function(ae){var re=this.rules.inline.code.exec(ae);if(re){var he=re[2].replace(/\n/g," "),ve=/[^ ]/.test(he),me=he.startsWith(" ")&&he.endsWith(" ");return ve&&me&&(he=he.substring(1,he.length-1)),he=Z(he,!0),{type:"codespan",raw:re[0],text:he}}},ge.br=function(ae){var re=this.rules.inline.br.exec(ae);if(re)return{type:"br",raw:re[0]}},ge.del=function(ae){var re=this.rules.inline.del.exec(ae);if(re)return{type:"del",raw:re[0],text:re[1]}},ge.autolink=function(ae,re){var he=this.rules.inline.autolink.exec(ae);if(he){var ve,me;return he[2]==="@"?(ve=Z(this.options.mangle?re(he[1]):he[1]),me="mailto:"+ve):(ve=Z(he[1]),me=ve),{type:"link",raw:he[0],text:ve,href:me,tokens:[{type:"text",raw:ve,text:ve}]}}},ge.url=function(ae,re){var he;if(he=this.rules.inline.url.exec(ae)){var ve,me;if(he[2]==="@")ve=Z(this.options.mangle?re(he[0]):he[0]),me="mailto:"+ve;else{var Be;do Be=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Be!==he[0]);ve=Z(he[0]),he[1]==="www."?me="http://"+ve:me=ve}return{type:"link",raw:he[0],text:ve,href:me,tokens:[{type:"text",raw:ve,text:ve}]}}},ge.inlineText=function(ae,re,he){var ve=this.rules.inline.text.exec(ae);if(ve){var me;return re?me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):Z(ve[0]):ve[0]:me=Z(this.options.smartypants?he(ve[0]):ve[0]),{type:"text",raw:ve[0],text:me}}},Ae}(),Ie=G.noopTest,Je=G.edit,Ke=G.merge,be={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Ie,table:Ie,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};be._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,be._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,be.def=Je(be.def).replace("label",be._label).replace("title",be._title).getRegex(),be.bullet=/(?:[*+-]|\d{1,9}[.)])/,be.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,be.item=Je(be.item,"gm").replace(/bull/g,be.bullet).getRegex(),be.list=Je(be.list).replace(/bull/g,be.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+be.def.source+")").getRegex(),be._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",be._comment=//,be.html=Je(be.html,"i").replace("comment",be._comment).replace("tag",be._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),be.paragraph=Je(be._paragraph).replace("hr",be.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",be._tag).getRegex(),be.blockquote=Je(be.blockquote).replace("paragraph",be.paragraph).getRegex(),be.normal=Ke({},be),be.gfm=Ke({},be.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*|$)"}),be.gfm.nptable=Je(be.gfm.nptable).replace("hr",be.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",be._tag).getRegex(),be.gfm.table=Je(be.gfm.table).replace("hr",be.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",be._tag).getRegex(),be.pedantic=Ke({},be.normal,{html:Je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",be._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:Ie,paragraph:Je(be.normal._paragraph).replace("hr",be.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",be.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var de={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ie,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",de.punctuation=Je(de.punctuation).replace(/punctuation/g,de._punctuation).getRegex(),de._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",de._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",de.em.start=Je(de.em.start).replace(/punctuation/g,de._punctuation).getRegex(),de.em.middle=Je(de.em.middle).replace(/punctuation/g,de._punctuation).replace(/overlapSkip/g,de._overlapSkip).getRegex(),de.em.endAst=Je(de.em.endAst,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.em.endUnd=Je(de.em.endUnd,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.strong.start=Je(de.strong.start).replace(/punctuation/g,de._punctuation).getRegex(),de.strong.middle=Je(de.strong.middle).replace(/punctuation/g,de._punctuation).replace(/blockSkip/g,de._blockSkip).getRegex(),de.strong.endAst=Je(de.strong.endAst,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.strong.endUnd=Je(de.strong.endUnd,"g").replace(/punctuation/g,de._punctuation).getRegex(),de.blockSkip=Je(de._blockSkip,"g").getRegex(),de.overlapSkip=Je(de._overlapSkip,"g").getRegex(),de._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,de._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,de._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])?)+(?![-_])/,de.autolink=Je(de.autolink).replace("scheme",de._scheme).replace("email",de._email).getRegex(),de._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,de.tag=Je(de.tag).replace("comment",be._comment).replace("attribute",de._attribute).getRegex(),de._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,de._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,de._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,de.link=Je(de.link).replace("label",de._label).replace("href",de._href).replace("title",de._title).getRegex(),de.reflink=Je(de.reflink).replace("label",de._label).getRegex(),de.reflinkSearch=Je(de.reflinkSearch,"g").replace("reflink",de.reflink).replace("nolink",de.nolink).getRegex(),de.normal=Ke({},de),de.pedantic=Ke({},de.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:Je(/^!?\[(label)\]\((.*?)\)/).replace("label",de._label).getRegex(),reflink:Je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",de._label).getRegex()}),de.gfm=Ke({},de.normal,{escape:Je(de.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ae="x"+ae.toString(16)),ge+=""+ae+";";return ge}var dt=function(){function Ae(Ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ee||Kt,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ae={block:jt.normal,inline:wt.normal};this.options.pedantic?(ae.block=jt.pedantic,ae.inline=wt.pedantic):this.options.gfm&&(ae.block=jt.gfm,this.options.breaks?ae.inline=wt.breaks:ae.inline=wt.gfm),this.tokenizer.rules=ae}Ae.lex=function(ae,re){var he=new Ae(re);return he.lex(ae)};var ge=Ae.prototype;return ge.lex=function(ae){return ae=ae.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ae,this.tokens,!0),this.inline(this.tokens),this.tokens},ge.blockTokens=function(ae,re,he){re===void 0&&(re=[]),he===void 0&&(he=!0),ae=ae.replace(/^ +$/gm,"");for(var ve,me,Be,Tt;ae;){if(ve=this.tokenizer.space(ae)){ae=ae.substring(ve.raw.length),ve.type&&re.push(ve);continue}if(ve=this.tokenizer.code(ae,re)){ae=ae.substring(ve.raw.length),ve.type?re.push(ve):(Tt=re[re.length-1],Tt.raw+=`
`+ve.raw,Tt.text+=`
`+ve.text);continue}if(ve=this.tokenizer.fences(ae)){ae=ae.substring(ve.raw.length),re.push(ve);continue}if(ve=this.tokenizer.heading(ae)){ae=ae.substring(ve.raw.length),re.push(ve);continue}if(ve=this.tokenizer.nptable(ae)){ae=ae.substring(ve.raw.length),re.push(ve);continue}if(ve=this.tokenizer.hr(ae)){ae=ae.substring(ve.raw.length),re.push(ve);continue}if(ve=this.tokenizer.blockquote(ae)){ae=ae.substring(ve.raw.length),ve.tokens=this.blockTokens(ve.text,[],he),re.push(ve);continue}if(ve=this.tokenizer.list(ae)){for(ae=ae.substring(ve.raw.length),Be=ve.items.length,me=0;me0)for(;(Jt=this.tokenizer.rules.inline.reflinkSearch.exec(Tt))!=null;)En.includes(Jt[0].slice(Jt[0].lastIndexOf("[")+1,-1))&&(Tt=Tt.slice(0,Jt.index)+"["+"a".repeat(Jt[0].length-2)+"]"+Tt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Jt=this.tokenizer.rules.inline.blockSkip.exec(Tt))!=null;)Tt=Tt.slice(0,Jt.index)+"["+"a".repeat(Jt[0].length-2)+"]"+Tt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ae;){if(Be=this.tokenizer.escape(ae)){ae=ae.substring(Be.raw.length),re.push(Be);continue}if(Be=this.tokenizer.tag(ae,he,ve)){ae=ae.substring(Be.raw.length),he=Be.inLink,ve=Be.inRawBlock,re.push(Be);continue}if(Be=this.tokenizer.link(ae)){ae=ae.substring(Be.raw.length),Be.type==="link"&&(Be.tokens=this.inlineTokens(Be.text,[],!0,ve)),re.push(Be);continue}if(Be=this.tokenizer.reflink(ae,this.tokens.links)){ae=ae.substring(Be.raw.length),Be.type==="link"&&(Be.tokens=this.inlineTokens(Be.text,[],!0,ve)),re.push(Be);continue}if(Be=this.tokenizer.strong(ae,Tt,me)){ae=ae.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],he,ve),re.push(Be);continue}if(Be=this.tokenizer.em(ae,Tt,me)){ae=ae.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],he,ve),re.push(Be);continue}if(Be=this.tokenizer.codespan(ae)){ae=ae.substring(Be.raw.length),re.push(Be);continue}if(Be=this.tokenizer.br(ae)){ae=ae.substring(Be.raw.length),re.push(Be);continue}if(Be=this.tokenizer.del(ae)){ae=ae.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],he,ve),re.push(Be);continue}if(Be=this.tokenizer.autolink(ae,ft)){ae=ae.substring(Be.raw.length),re.push(Be);continue}if(!he&&(Be=this.tokenizer.url(ae,ft))){ae=ae.substring(Be.raw.length),re.push(Be);continue}if(Be=this.tokenizer.inlineText(ae,ve,ze)){ae=ae.substring(Be.raw.length),me=Be.raw.slice(-1),re.push(Be);continue}if(ae){var mt="Infinite loop on byte: "+ae.charCodeAt(0);if(this.options.silent){console.error(mt);break}else throw new Error(mt)}}return re},Y(Ae,null,[{key:"rules",get:function(){return{block:jt,inline:wt}}}]),Ae}(),Nt=H.defaults,Ze=G.cleanUrl,Bt=G.escape,Ut=function(){function Ae(Ee){this.options=Ee||Nt}var ge=Ae.prototype;return ge.code=function(ae,re,he){var ve=(re||"").match(/\S*/)[0];if(this.options.highlight){var me=this.options.highlight(ae,ve);me!=null&&me!==ae&&(he=!0,ae=me)}return ve?''+(he?ae:Bt(ae,!0))+`
`:""+(he?ae:Bt(ae,!0))+`
`},ge.blockquote=function(ae){return`
`+ae+`
`},ge.html=function(ae){return ae},ge.heading=function(ae,re,he,ve){return this.options.headerIds?"
`:""+ae+"
`},ge.hr=function(){return this.options.xhtml?`
`:`
`},ge.list=function(ae,re,he){var ve=re?"ol":"ul",me=re&&he!==1?' start="'+he+'"':"";return"<"+ve+me+`>
`+ae+""+ve+`>
`},ge.listitem=function(ae){return""+ae+`
`},ge.checkbox=function(ae){return" "},ge.paragraph=function(ae){return""+ae+`
`},ge.table=function(ae,re){return re&&(re=""+re+""),`
`},ge.tablerow=function(ae){return`
`+ae+`
`},ge.tablecell=function(ae,re){var he=re.header?"th":"td",ve=re.align?"<"+he+' align="'+re.align+'">':"<"+he+">";return ve+ae+""+he+`>
`},ge.strong=function(ae){return""+ae+""},ge.em=function(ae){return""+ae+""},ge.codespan=function(ae){return""+ae+""},ge.br=function(){return this.options.xhtml?"
":"
"},ge.del=function(ae){return""+ae+""},ge.link=function(ae,re,he){if(ae=Ze(this.options.sanitize,this.options.baseUrl,ae),ae===null)return he;var ve='"+he+"",ve},ge.image=function(ae,re,he){if(ae=Ze(this.options.sanitize,this.options.baseUrl,ae),ae===null)return he;var ve='
":">",ve},ge.text=function(ae){return ae},Ae}(),Mt=function(){function Ae(){}var ge=Ae.prototype;return ge.strong=function(ae){return ae},ge.em=function(ae){return ae},ge.codespan=function(ae){return ae},ge.del=function(ae){return ae},ge.html=function(ae){return ae},ge.text=function(ae){return ae},ge.link=function(ae,re,he){return""+he},ge.image=function(ae,re,he){return""+he},ge.br=function(){return""},Ae}(),An=function(){function Ae(){this.seen={}}var ge=Ae.prototype;return ge.slug=function(ae){var re=ae.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(re)){var he=re;do this.seen[he]++,re=he+"-"+this.seen[he];while(this.seen.hasOwnProperty(re))}return this.seen[re]=0,re},Ae}(),mn=H.defaults,pn=G.unescape,tt=function(){function Ae(Ee){this.options=Ee||mn,this.options.renderer=this.options.renderer||new Ut,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Mt,this.slugger=new An}Ae.parse=function(ae,re){var he=new Ae(re);return he.parse(ae)};var ge=Ae.prototype;return ge.parse=function(ae,re){re===void 0&&(re=!0);var he="",ve,me,Be,Tt,Jt,En,mt,Qt,gt,yt,rt,ce,Re,At,ot,Yt,rn,_e,Ne=ae.length;for(ve=0;ve0&&ot.tokens[0].type==="text"?(ot.tokens[0].text=_e+" "+ot.tokens[0].text,ot.tokens[0].tokens&&ot.tokens[0].tokens.length>0&&ot.tokens[0].tokens[0].type==="text"&&(ot.tokens[0].tokens[0].text=_e+" "+ot.tokens[0].tokens[0].text)):ot.tokens.unshift({type:"text",text:_e}):At+=_e),At+=this.parse(ot.tokens,Re),gt+=this.renderer.listitem(At,rn,Yt);he+=this.renderer.list(gt,rt,ce);continue}case"html":{he+=this.renderer.html(yt.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(yt.tokens));continue}case"text":{for(gt=yt.tokens?this.parseInline(yt.tokens):yt.text;ve+1An error occurred:
"+He(Be.message+"",!0)+"
";throw Be}}Ge.options=Ge.setOptions=function(Ae){return fn(Ge.defaults,Ae),pt(Ge.defaults),Ge},Ge.getDefaults=Ue,Ge.defaults=Ct,Ge.use=function(Ae){var ge=fn({},Ae);if(Ae.renderer&&function(){var ae=Ge.defaults.renderer||new Ut,re=function(me){var Be=ae[me];ae[me]=function(){for(var Tt=arguments.length,Jt=new Array(Tt),En=0;En`,triples:"",explode:"[]{}"},N=te.Pos;te.defineOption("autoCloseBrackets",!1,function(s,r,u){u&&u!=te.Init&&(s.removeKeyMap(A),s.state.closeBrackets=null),r&&(M(K(r,"pairs")),s.state.closeBrackets=r,s.addKeyMap(A))});function K(s,r){return r=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[r]!=null?s[r]:Y[r]}var A={Backspace:k,Enter:D};function M(s){for(var r=0;r=0;a--){var R=o[a].head;s.replaceRange("",N(R.line,R.ch-1),N(R.line,R.ch+1),"+delete")}}function D(s){var r=P(s),u=r&&K(r,"explode");if(!u||s.getOption("disableInput"))return te.Pass;for(var o=s.listSelections(),a=0;a0;return{anchor:new N(s.anchor.line,s.anchor.ch+(r?-1:1)),head:new N(s.head.line,s.head.ch+(r?1:-1))}}function m(s,r){var u=P(s);if(!u||s.getOption("disableInput"))return te.Pass;var o=K(u,"pairs"),a=o.indexOf(r);if(a==-1)return te.Pass;for(var n=K(u,"closeBefore"),R=K(u,"triples"),w=o.charAt(a+1)==r,x=s.listSelections(),O=a%2==0,C,_=0;_=0&&s.getRange(h,N(h.line,h.ch+3))==r+r+r?c="skipThree":c="skip";else if(w&&h.ch>1&&R.indexOf(r)>=0&&s.getRange(N(h.line,h.ch-2),h)==r+r){if(h.ch>2&&/\bstring/.test(s.getTokenTypeAt(N(h.line,h.ch-2))))return te.Pass;c="addFour"}else if(w){var p=h.ch==0?" ":s.getRange(N(h.line,h.ch-1),h);if(!te.isWordChar(v)&&p!=r&&!te.isWordChar(p))c="both";else return te.Pass}else if(O&&(v.length===0||/\s/.test(v)||n.indexOf(v)>-1))c="both";else return te.Pass;if(!C)C=c;else if(C!=c)return te.Pass}var E=a%2?o.charAt(a-1):r,U=a%2?r:o.charAt(a+1);s.operation(function(){if(C=="skip")s.execCommand("goCharRight");else if(C=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(C=="surround"){for(var z=s.getSelections(),F=0;F>>6)+k(128|U&63):k(224|U>>>12&15)+k(128|U>>>6&63)+k(128|U&63)}else{var U=65536+(E.charCodeAt(0)-55296)*1024+(E.charCodeAt(1)-56320);return k(240|U>>>18&7)+k(128|U>>>12&63)+k(128|U>>>6&63)+k(128|U&63)}},b=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,m=function(E){return E.replace(b,D)},f=function(E){var U=[0,2,1][E.length%3],F=E.charCodeAt(0)<<16|(E.length>1?E.charCodeAt(1):0)<<8|(E.length>2?E.charCodeAt(2):0),z=[H.charAt(F>>>18),H.charAt(F>>>12&63),U>=2?"=":H.charAt(F>>>6&63),U>=1?"=":H.charAt(F&63)];return z.join("")},d=K.btoa&&typeof K.btoa=="function"?function(E){return K.btoa(E)}:function(E){if(E.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return E.replace(/[\s\S]{1,3}/g,f)},s=function(E){return d(m(String(E)))},r=function(E){return E.replace(/[+\/]/g,function(U){return U=="+"?"-":"_"}).replace(/=/g,"")},u=function(E,U){return U?r(s(E)):s(E)},o=function(E){return u(E,!0)},a;K.Uint8Array&&(a=function(E,U){for(var F="",z=0,G=E.length;z>>18)+H.charAt(Z>>>12&63)+(typeof T!="undefined"?H.charAt(Z>>>6&63):"=")+(typeof V!="undefined"?H.charAt(Z&63):"=")}return U?r(F):F});var n=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,R=function(E){switch(E.length){case 4:var U=(7&E.charCodeAt(0))<<18|(63&E.charCodeAt(1))<<12|(63&E.charCodeAt(2))<<6|63&E.charCodeAt(3),F=U-65536;return k((F>>>10)+55296)+k((F&1023)+56320);case 3:return k((15&E.charCodeAt(0))<<12|(63&E.charCodeAt(1))<<6|63&E.charCodeAt(2));default:return k((31&E.charCodeAt(0))<<6|63&E.charCodeAt(1))}},w=function(E){return E.replace(n,R)},x=function(E){var U=E.length,F=U%4,z=(U>0?P[E.charAt(0)]<<18:0)|(U>1?P[E.charAt(1)]<<12:0)|(U>2?P[E.charAt(2)]<<6:0)|(U>3?P[E.charAt(3)]:0),G=[k(z>>>16),k(z>>>8&255),k(z&255)];return G.length-=[0,0,2,1][F],G.join("")},O=K.atob&&typeof K.atob=="function"?function(E){return K.atob(E)}:function(E){return E.replace(/\S{1,4}/g,x)},C=function(E){return O(String(E).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(E){return w(O(E))},y=function(E){return String(E).replace(/[-_]/g,function(U){return U=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},h=function(E){return _(y(E))},c;K.Uint8Array&&(c=function(E){return Uint8Array.from(C(y(E)),function(U){return U.charCodeAt(0)})});var v=function(){var E=K.Base64;return K.Base64=A,E};if(K.Base64={VERSION:M,atob:C,btoa:d,fromBase64:h,toBase64:u,utob:m,encode:u,encodeURI:o,btou:w,decode:h,noConflict:v,fromUint8Array:a,toUint8Array:c},typeof Object.defineProperty=="function"){var p=function(E){return{value:E,enumerable:!1,writable:!0,configurable:!0}};K.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",p(function(){return h(this)})),Object.defineProperty(String.prototype,"toBase64",p(function(E){return u(this,E)})),Object.defineProperty(String.prototype,"toBase64URI",p(function(){return u(this,!0)}))}}return K.Meteor&&(Base64=K.Base64),tn.exports?tn.exports.Base64=K.Base64:!(Y=[],N=function(){return K.Base64}.apply(Qe,Y),N!==void 0&&(tn.exports=N)),{Base64:K.Base64}})}).call(this,I("IyRk"))},LSTS:function(tn,Qe,I){"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});var te=function(){function m(f,d){for(var s=0;s=0)continue;if(!Object.prototype.hasOwnProperty.call(m,s))continue;d[s]=m[s]}return d}function P(m,f){if(!(m instanceof f))throw new TypeError("Cannot call a class as a function")}function k(m,f){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&(typeof f=="object"||typeof f=="function")?f:m}function D(m,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof f);m.prototype=Object.create(f&&f.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),f&&(Object.setPrototypeOf?Object.setPrototypeOf(m,f):m.__proto__=f)}var b=function(m){D(f,m);function f(d){P(this,f);var s=k(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,d));return s.scrollListener=s.scrollListener.bind(s),s.eventListenerOptions=s.eventListenerOptions.bind(s),s.mousewheelListener=s.mousewheelListener.bind(s),s}return te(f,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var s=this.getParentElement(this.scrollComponent);s.scrollTop=s.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var s=!1,r={get passive(){s=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch(u){}return s}},{key:"eventListenerOptions",value:function(){var s=this.props.useCapture;return this.isPassiveSupported()&&(s={useCapture:this.props.useCapture,passive:!0}),s}},{key:"setDefaultLoader",value:function(s){this.defaultLoader=s}},{key:"detachMousewheelListener",value:function(){var s=window;this.props.useWindow===!1&&(s=this.scrollComponent.parentNode),s.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var s=window;this.props.useWindow===!1&&(s=this.getParentElement(this.scrollComponent)),s.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),s.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(s){var r=this.props.getScrollParent&&this.props.getScrollParent();return r!=null?r:s&&s.parentNode}},{key:"filterProps",value:function(s){return s}},{key:"attachScrollListener",value:function(){var s=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!s)return;var r=window;this.props.useWindow===!1&&(r=s),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}},{key:"mousewheelListener",value:function(s){s.deltaY===1&&!this.isPassiveSupported()&&s.preventDefault()}},{key:"scrollListener",value:function(){var s=this.scrollComponent,r=window,u=this.getParentElement(s),o=void 0;if(this.props.useWindow){var a=document.documentElement||document.body.parentNode||document.body,n=r.pageYOffset!==void 0?r.pageYOffset:a.scrollTop;this.props.isReverse?o=n:o=this.calculateOffset(s,n)}else this.props.isReverse?o=u.scrollTop:o=s.scrollHeight-u.scrollTop-u.clientHeight;o1&&arguments[1]!==void 0?arguments[1]:1,Ee=Mt.length,ae=0;ae1&&arguments[1]!==void 0?arguments[1]:!1;return Object(O.a)(T).map(function(Z,oe){if(!A.isValidElement(Z)||!Z.type)return null;var pe=Z.type.isSelectOptGroup,Ye=Z.key,xe=Z.props,Ie=xe.children,Je=Object(H.a)(xe,["children"]);return V||!pe?C(Z):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(Ye===null?oe:Ye,"__"),label:Ye},Je),{},{options:_(Ie)})}).filter(function(Z){return Z})}var y=I("2Qr1"),h=I("qNPg"),c=I("U8pU"),v=I("Kwbf"),p=I("WKfj");function E(T){var V=T.mode,Z=T.options,oe=T.children,pe=T.backfill,Ye=T.allowClear,xe=T.placeholder,Ie=T.getInputElement,Je=T.showSearch,Ke=T.onSearch,be=T.defaultOpen,de=T.autoFocus,nt=T.labelInValue,Kt=T.value,jt=T.inputValue,wt=T.optionLabelProp,ze=V==="multiple"||V==="tags",ft=Je!==void 0?Je:ze||V==="combobox",dt=Z||_(oe);if(Object(v.a)(V!=="tags"||dt.every(function(Ut){return!Ut.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var Nt=dt.some(function(Ut){return Ut.options?Ut.options.some(function(Mt){return typeof("value"in Mt?Mt.value:Mt.key)=="number"}):typeof("value"in Ut?Ut.value:Ut.key)=="number"});Object(v.a)(!Nt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(v.a)(V!=="combobox"||!wt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(v.a)(V==="combobox"||!pe,"`backfill` only works with `combobox` mode."),Object(v.a)(V==="combobox"||!Ie,"`getInputElement` only work with `combobox` mode."),Object(v.b)(V!=="combobox"||!Ie||!Ye||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ke&&!ft&&V!=="combobox"&&V!=="tags"&&Object(v.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(v.b)(!be||de,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Kt!=null){var Ze=Object(p.d)(Kt);Object(v.a)(!nt||Ze.every(function(Ut){return Object(c.a)(Ut)==="object"&&("key"in Ut||"value"in Ut)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(v.a)(!ze||Array.isArray(Kt),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var Bt=null;Object(O.a)(oe).some(function(Ut){if(!A.isValidElement(Ut)||!Ut.type)return!1;var Mt=Ut.type;if(Mt.isSelectOption)return!1;if(Mt.isSelectOptGroup){var An=Object(O.a)(Ut.props.children).every(function(mn){return!A.isValidElement(mn)||!Ut.type||mn.type.isSelectOption?!0:(Bt=mn.type,!1)});return!An}return Bt=Mt,!0}),Bt&&Object(v.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Bt.displayName||Bt.name||Bt,"`.")),Object(v.a)(jt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=E,F=Object(h.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:_,flattenOptions:y.d,getLabeledValue:y.e,filterOptions:y.b,isValueDisabled:y.g,findValueOption:y.c,warningProps:U,fillOptionsWithMissingValue:y.a}),z=function(T){Object(N.a)(Z,T);var V=Object(K.a)(Z);function Z(){var oe;return Object(te.a)(this,Z),oe=V.apply(this,arguments),oe.selectRef=A.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(Y.a)(Z,[{key:"render",value:function(){return A.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),Z}(A.Component);z.Option=n,z.OptGroup=w;var G=z,B=Qe.c=G},M8RZ:function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return k});var te=I("fWQN"),Y=I("mtLc"),N=I("yKVA"),K=I("879j"),A=I("q1tI"),M=I.n(A),H=I("i8i4"),P=I.n(H),k=function(D){Object(N.a)(m,D);var b=Object(K.a)(m);function m(f){var d;Object(te.a)(this,m),d=b.call(this,f);var s=window.document;return d.node=s.createElement("div"),s.body.appendChild(d.node),d}return Object(Y.a)(m,[{key:"render",value:function(){var d=this.props.children;return Object(H.createPortal)(d,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(M.a.Component)},NLgs:function(tn,Qe,I){"use strict";I.d(Qe,"e",function(){return n}),I.d(Qe,"f",function(){return R}),I.d(Qe,"d",function(){return x}),I.d(Qe,"c",function(){return O}),I.d(Qe,"a",function(){return C}),I.d(Qe,"b",function(){return _});var te=I("miYZ"),Y=I("tsqr"),N=I("9og8"),K=I("2qtc"),A=I("kLXV"),M=I("WmNS"),H=I.n(M),P=I("q1tI"),k=I.n(P),D=I("9kvl"),b=I("xKgJ"),m=I("1vsH"),f=I("RCxd"),d=I("yTi+"),s=I.n(d),r=I("1ZF9"),u=I.n(r),o=I("NoGO"),a=I.n(o),n=function(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(R(h)&&w(c))},R=function(h){return Object(b.p)()?!0:(h({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},w=function(){var h,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,v=Object(D.c)()._store.getState(),p=v.user;return(h=p.userInfo)!==null&&h!==void 0&&h.profile_completed?!0:(A.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:c?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){D.d.push("/account/profile/edit")}}),!1)},x=function(){var h,c=Object(D.c)()._store.getState(),v=c.user;return(h=v.userInfo)!==null&&h!==void 0&&h.professional_certification?!0:(A.a.confirm({title:"\u63D0\u793A",centered:!0,content:k.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(m.S)("/account/certification")}}),!1)},O=function(){return Object(b.a)()?!0:(A.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:k.a.createElement("div",{className:"tc",style:{marginLeft:-38}},k.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),k.a.createElement("img",{src:a.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},C=function(h,c){return h?!0:(A.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:k.a.createElement("div",null,k.a.createElement("p",null,c||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),k.a.createElement("div",{style:{marginLeft:"110px"}},k.a.createElement("img",{src:u.a,width:200}),k.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(m.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},_=function(h){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",v=Object(D.c)()._store.getState(),p=v.shixunsDetail.detail;return(p==null?void 0:p.public)===2||(p==null?void 0:p.public)===1||(p==null?void 0:p.shixun_status)===3?(A.a.info({centered:!0,icon:k.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:k.a.createElement("div",{className:"tc",style:{marginLeft:-38}},k.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},k.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(p==null?void 0:p.public)===2?"\u5DF2\u516C\u5F00":(p==null?void 0:p.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",c,"\u3002"),k.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),k.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:s.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(p==null?void 0:p.shixun_status)===2?(A.a.confirm({centered:!0,icon:k.a.createElement(f.a,null),title:"\u63D0\u793A",content:k.a.createElement("div",null,k.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",c,"\u3002"),k.a.createElement("br",null),k.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){A.a.confirm({width:440,centered:!0,icon:k.a.createElement(f.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var U=Object(N.a)(H.a.mark(function z(){var G;return H.a.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.next=2,h({type:"shixunsDetail/cancelRelease",payload:{id:p==null?void 0:p.identifier}});case 2:G=T.sent,G.status!==401&&(Y.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),h({type:"shixunsDetail/getShixunsDetail",payload:{id:p==null?void 0:p.identifier}}),h({type:"practiceSetting/getCommonData",payload:{id:p==null?void 0:p.identifier}}));case 4:case"end":return T.stop()}},z)}));function F(){return U.apply(this,arguments)}return F}()})}}),!0):!1}},Nd3P:function(tn,Qe,I){tn.exports={wrap:"wrap___h8kK3",maxWidth70:"maxWidth70___31ilo",maxWidth80:"maxWidth80___QYyBn",maxWidth100:"maxWidth100___1Caz0",maxWidth110:"maxWidth110___2Ikef",maxWidth120:"maxWidth120___1TY6-",reviewStatusTooltip:"reviewStatusTooltip___btvLr",color32C:"color32C___3168D",MdEditor:"MdEditor___1md-c",tr1:"tr1___33AUl"}},NoGO:function(tn,Qe,I){tn.exports=I.p+"static/newqrcode.d852fdfc.png"},NvD2:function(tn,Qe,I){"use strict";I.d(Qe,"a",function(){return M});var te=I("Kwbf");function Y(H,P){var k=new Set;return H.forEach(function(D){P.has(D)||k.add(D)}),k}function N(H){var P=H||{},k=P.disabled,D=P.disableCheckbox,b=P.checkable;return!!(k||D)||b===!1}function K(H,P,k,D){for(var b=new Set(H),m=new Set,f=0;f<=k;f+=1){var d=P.get(f)||new Set;d.forEach(function(o){var a=o.key,n=o.node,R=o.children,w=R===void 0?[]:R;b.has(a)&&!D(n)&&w.filter(function(x){return!D(x.node)}).forEach(function(x){b.add(x.key)})})}for(var s=new Set,r=k;r>=0;r-=1){var u=P.get(r)||new Set;u.forEach(function(o){var a=o.parent,n=o.node;if(D(n)||!o.parent||s.has(o.parent.key))return;if(D(o.parent.node)){s.add(a.key);return}var R=!0,w=!1;(a.children||[]).filter(function(x){return!D(x.node)}).forEach(function(x){var O=x.key,C=b.has(O);R&&!C&&(R=!1),!w&&(C||m.has(O))&&(w=!0)}),R&&b.add(a.key),w&&m.add(a.key),s.add(a.key)})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from(Y(m,b))}}function A(H,P,k,D,b){for(var m=new Set(H),f=new Set(P),d=0;d<=D;d+=1){var s=k.get(d)||new Set;s.forEach(function(a){var n=a.key,R=a.node,w=a.children,x=w===void 0?[]:w;!m.has(n)&&!f.has(n)&&!b(R)&&x.filter(function(O){return!b(O.node)}).forEach(function(O){m.delete(O.key)})})}f=new Set;for(var r=new Set,u=D;u>=0;u-=1){var o=k.get(u)||new Set;o.forEach(function(a){var n=a.parent,R=a.node;if(b(R)||!a.parent||r.has(a.parent.key))return;if(b(a.parent.node)){r.add(n.key);return}var w=!0,x=!1;(n.children||[]).filter(function(O){return!b(O.node)}).forEach(function(O){var C=O.key,_=m.has(C);w&&!_&&(w=!1),!x&&(_||f.has(C))&&(x=!0)}),w||m.delete(n.key),x&&f.add(n.key),r.add(n.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(Y(f,m))}}function M(H,P,k,D){var b=[],m;D?m=D:m=N;var f=new Set(H.filter(function(u){var o=!!k[u];return o||b.push(u),o})),d=new Map,s=0;Object.keys(k).forEach(function(u){var o=k[u],a=o.level,n=d.get(a);n||(n=new Set,d.set(a,n)),n.add(o),s=Math.max(s,a)}),Object(te.a)(!b.length,"Tree missing follow keys: ".concat(b.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var r;return P===!0?r=K(f,d,s,m):r=A(f,P.halfCheckedKeys,d,s,m),r}},OH33:function(tn,Qe,I){"use strict";I.r(Qe);var te=I("g9YV"),Y=I("wCAj"),N=I("Znn+"),K=I("ZTPi"),A=I("5Dmo"),M=I("3S7+"),H=I("sPJy"),P=I("bE4q"),k=I("+L6B"),D=I("2/Rp"),b=I("miYZ"),m=I("tsqr"),f=I("9og8"),d=I("2qtc"),s=I("kLXV"),r=I("tJVT"),u=I("WmNS"),o=I.n(u),a=I("q1tI"),n=I.n(a),R=I("ErOA"),w=I("Ty5D"),x=I("55Ip"),O=I("9kvl"),C=I("jhfD"),_=I("1vsH"),y=I("T2oS"),h=I("W9HT"),c=I("DjyN"),v=I("NUBc"),p=I("k1fw"),E=I("9Bee"),U=function(gn){var Tn=gn.shixunHomeworks,_n=gn.dispatch,si=Object(w.i)();return n.a.createElement(s.a,{centered:!0,title:"\u63D0\u793A",visible:Tn.actionTabs.key==="\u5220\u9664",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(f.a)(o.a.mark(function ai(){var J;return o.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,_n({type:"shixunHomeworks/deleteReply",payload:{object_id:Tn.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:J=Ce.sent,J.status===0&&(m.b.success("\u5220\u9664\u6210\u529F"),_n({type:"shixunHomeworks/setActionTabs",payload:{}}),_n({type:"shixunHomeworks/getReplyList",payload:Object(p.a)({},Tn.actionTabs.params)}));case 4:case"end":return Ce.stop()}},ai)})),onCancel:function(){_n({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement("p",null,"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"))},F=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks;return{shixunHomeworks:gn}})(U),z=I("wd/R"),G=I.n(z),B=I("iF7n"),T=I.n(B),V=I("xKgJ"),Z=I("BdwD");G.a.lang("ZH-cn");var oe=["","\u7B80\u5355","\u4E2D\u7B49","\u56F0\u96BE"],pe=function(gn){var Tn,_n,si=gn.shixunHomeworks,ai=gn.classroomList,J=gn.globalSetting,ue=gn.user,Ce=gn.loading,Te=gn.dispatch,qe=Object(a.useState)(Object(p.a)(Object(p.a)({},Object(w.i)()),{},{per_page:10})),Oe=Object(r.a)(qe,2),Ve=Oe[0],et=Oe[1],Ot=Object(a.useState)([]),Et=Object(r.a)(Ot,2),je=Et[0],ht=Et[1],it=Object(a.useState)(-1),st=Object(r.a)(it,2),bt=st[0],Lt=st[1],ct=Object(a.useState)(""),Gt=Object(r.a)(ct,2),on=Gt[0],Dn=Gt[1],Kn=Object(a.useState)(""),wn=Object(r.a)(Kn,2),Nn=wn[0],Pn=wn[1],Dt=ai.detailLeftMenus,sn=Object(w.h)(),Ft=Object(a.useState)({}),St=Object(r.a)(Ft,2),Un=St[0],Sn=St[1],zt=si.workDetail,lt=si.workList,jn=Object(a.useState)("1"),ln=Object(r.a)(jn,2),Jn=ln[0],$t=ln[1],On=Object(a.useState)(!1),Fn=Object(r.a)(On,2),hn=Fn[0],yi=Fn[1];Object(a.useEffect)(function(){lt.homework_status&&Rn()},[lt]);function Rn(){return bn.apply(this,arguments)}function bn(){return bn=Object(f.a)(o.a.mark(function Rt(){var Xe,kt,Pt;return o.a.wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:return yi(!0),zn.next=3,Object(R.a)("/api/courses/".concat(Ve.coursesId,"/homework_commons/edit_hack_homework.json"),{method:"get",params:Object(p.a)(Object(p.a)({},Ve),{},{id:Ve.categoryId})});case 3:Pt=zn.sent,ht(Pt),yi(!1),Ve.defaultExpandedRowKeys=["".concat(Pt==null||((Xe=Pt.data)===null||Xe===void 0||((kt=Xe[0])===null||kt===void 0))?void 0:kt.identifier)],Jn!="2"&&$t(Pt!=null&&Pt.description?"1":"2"),et(Object(p.a)({},Ve));case 9:case"end":return zn.stop()}},Rt)})),bn.apply(this,arguments)}return n.a.createElement("section",{className:T.a.bg},n.a.createElement(h.a,{spinning:hn},n.a.createElement(K.a,{onChange:function(Xe){$t(Xe)},activeKey:Jn},n.a.createElement(K.a.TabPane,{key:1,tab:"\u8BF4\u660E"},n.a.createElement("section",{className:" edu-container",style:{padding:"20px 20px",background:"#fff"}},!(je!=null&&je.description)&&n.a.createElement(Z.a,{customText:"\u6682\u65E0\u8BF4\u660E"}),n.a.createElement(E.a,{value:(je==null?void 0:je.description)||""}))),n.a.createElement(K.a.TabPane,{key:2,tab:"\u9898\u76EE\u5217\u8868"},n.a.createElement("div",null,n.a.createElement("section",{className:" edu-container",style:{padding:"20px 20px",background:"#fff"}},Ve.defaultExpandedRowKeys&&n.a.createElement(Y.a,{dataSource:je==null?void 0:je.data,rowKey:function(Xe){return Xe==null?void 0:Xe.identifier},pagination:!1,expandable:{expandedRowRender:function(Xe){var kt,Pt;return n.a.createElement("div",{style:{padding:"10px 48px",borderRadius:2}},n.a.createElement("p",null,"\u9898\u76EE\uFF1A",Xe==null?void 0:Xe.name),n.a.createElement("p",null,"\u63CF\u8FF0\uFF1A",Xe==null?void 0:Xe.description),n.a.createElement("div",{style:{width:"100%",textAlign:"end"}},Object(V.c)()&&(je==null||((kt=je.homework_status)===null||kt===void 0)?void 0:kt.includes("\u672A\u53D1\u5E03"))&&n.a.createElement(D.a,{type:"primary",ghost:!0,onClick:function(){window.open("/problems/".concat(Xe==null?void 0:Xe.identifier,"/edit?type=1")),localStorage.setItem("program_homework",[Ve.coursesId,Ve.categoryId])}},"\u7F16\u8F91"),Object(V.c)()&&(je==null||((Pt=je.homework_status)===null||Pt===void 0)?void 0:Pt.includes("\u672A\u53D1\u5E03"))&&n.a.createElement(D.a,{type:"primary",style:{marginLeft:20},ghost:!0,onClick:function(){s.a.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var zn=Object(f.a)(o.a.mark(function oi(){var ei;return o.a.wrap(function(mi){for(;;)switch(mi.prev=mi.next){case 0:return mi.next=2,Object(R.a)("/api/problems/".concat(Xe==null?void 0:Xe.identifier,".json"),{method:"delete"});case 2:ei=mi.sent,(ei==null?void 0:ei.status)===0&&(m.b.info("\u5220\u9664\u6210\u529F"),Ve.page=1,Rn());case 4:case"end":return mi.stop()}},oi)}));function Ln(){return zn.apply(this,arguments)}return Ln}()})}},"\u5220\u9664")))},defaultExpandedRowKeys:Ve.defaultExpandedRowKeys},columns:[{title:"\u9898\u76EE",dataIndex:"name",ellipsis:!0,width:"20%",key:"name"},{title:"\u96BE\u5EA6",dataIndex:"difficult",key:"difficult",render:function(Xe,kt,Pt){return n.a.createElement("div",null,oe[Xe])}},{title:"\u901A\u8FC7\u7387",dataIndex:"pass_rate",key:"pass_rate"},{title:"\u901A\u8FC7\u4EBA\u6570",dataIndex:"submit_info",key:"submit_info"},{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline",ellipsis:!0,width:"10%",key:"tag_discipline"},{title:"\u64CD\u4F5C",dataIndex:"identifier",key:"identifier",render:function(Xe,kt,Pt){return n.a.createElement("div",null,n.a.createElement("a",{href:"/classrooms/".concat(Ve.coursesId,"/program_homework/").concat(Ve.categoryId,"/").concat(Xe,"/ranking")},"\u6392\u884C"),n.a.createElement("a",{onClick:Object(f.a)(o.a.mark(function an(){var zn;return o.a.wrap(function(oi){for(;;)switch(oi.prev=oi.next){case 0:return oi.next=2,Object(R.a)("/api/problems/".concat(kt==null?void 0:kt.identifier,"/start.json"),{method:"get"});case 2:zn=oi.sent,zn&&(window.open("/myproblems/".concat(zn==null?void 0:zn.identifier,"?type=1")),localStorage.setItem("program_homework",[Ve.coursesId,Ve.categoryId]));case 4:case"end":return oi.stop()}},an)})),style:{margin:"0px 20px"}},Object(V.c)()?"\u4F53\u9A8C":"\u8FDB\u5165\u7B54\u9898"))}}]})),console.log("---",["".concat(je==null||((Tn=je.data)===null||Tn===void 0||((_n=Tn[0])===null||_n===void 0))?void 0:_n.identifier)]),n.a.createElement("aside",{className:"tc mt30 pb30"},n.a.createElement(v.a,{defaultCurrent:1,total:je==null?void 0:je.count,hideOnSinglePage:!0,showTotal:function(Xe){return n.a.createElement("span",null,"\u5171",Xe,"\u6761")},current:Ve.page||1,pageSize:Ve.per_page||10,onChange:function(Xe,kt){Ve.page=Xe,Ve.per_page=kt,et(Object(p.a)({},Ve)),Rn()}})))))),n.a.createElement(F,null))},Ye=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.classroomList,_n=Bn.loading,si=Bn.user,ai=Bn.globalSetting;return{shixunHomeworks:gn,globalSetting:ai,classroomList:Tn,user:si,loading:_n.effects}})(pe),xe=I("oBTY"),Ie=I("giR+"),Je=I("fyUT"),Ke=I("7Kak"),be=I("9yH6"),de=I("qVdP"),nt=I("jsC+"),Kt=I("5NDa"),jt=I("5rEg"),wt=I("14J3"),ze=I("BMrR"),ft=I("sRBo"),dt=I("kaz8"),Nt=I("jCWc"),Ze=I("kPKH"),Bt=I("lUTK"),Ut=I("BvKs"),Mt=I("jrin"),An=I("y8nQ"),mn=I("Vl3Y"),pn=I("8Skl"),tt=I("y3Kf"),fn=I("Llu2"),In=I("0NbB"),He=I("T7RX"),Ue=I("PpiC"),pt=I("IMoZ"),Ct=function(gn){var Tn=gn.shixunHomeworks,_n=gn.dispatch,si=Object(Ue.a)(gn,["shixunHomeworks","dispatch"]),ai=Object(w.i)(),J=Object(a.useState)(!0),ue=Object(r.a)(J,2),Ce=ue[0],Te=ue[1],qe=Object(a.useState)(!1),Oe=Object(r.a)(qe,2),Ve=Oe[0],et=Oe[1],Ot=mn.a.useForm(),Et=Object(r.a)(Ot,1),je=Et[0],ht=function(){var it=Object(f.a)(o.a.mark(function st(){var bt,Lt;return o.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return bt=je.getFieldValue(),Gt.next=3,Object(R.a)("/api/homework_commons/".concat(ai.categoryId,"/batch_comment.json"),{method:"post",body:{student_work_ids:Object(xe.a)(Tn.actionTabs.selectArrs),cover_all:Ce,hidden_comment:bt.hidden_comment,comment:bt.comment}});case 3:Lt=Gt.sent,Lt.status===0&&(m.b.success("\u8BC4\u9605\u6210\u529F"),je.resetFields(),_n({type:"shixunHomeworks/setActionTabs",payload:{}}),_n({type:"shixunHomeworks/getWorkList",payload:Object(p.a)({},Tn.actionTabs.params)}));case 5:case"end":return Gt.stop()}},st)}));return function(){return it.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(s.a,{centered:!0,title:"\u4E00\u952E\u70B9\u8BC4",visible:Tn.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(f.a)(o.a.mark(function it(){var st;return o.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:st=je.getFieldValue(),JSON.stringify(st)==="{}"||st.hidden_comment===""&&st.comment===""?et(!0):Tn.workList.partial_comment?_n({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",selectArrs:Tn.actionTabs.selectArrs,params:Tn.actionTabs.params}}):ht();case 2:case"end":return Lt.stop()}},it)})),onCancel:function(){_n({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(mn.a,{form:je,onChange:function(){Ve&&et(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(mn.a.Item,{name:"comment"},n.a.createElement(jt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(mn.a.Item,{name:"hidden_comment"},n.a.createElement(jt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Ve&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")),n.a.createElement(s.a,{centered:!0,title:n.a.createElement("span",null,n.a.createElement(pt.a,{className:"c-orange mr20"}),"\u63D0\u793A"),visible:Tn.actionTabs.key==="\u4E00\u952E\u70B9\u8BC4\u786E\u8BA4",okText:"\u786E\u5B9A\u70B9\u8BC4",cancelText:"\u653E\u5F03\u70B9\u8BC4",onOk:function(){ht()},onCancel:function(){_n({type:"shixunHomeworks/setActionTabs",payload:{}})},width:400},n.a.createElement("div",{className:"tc"},n.a.createElement("p",null,"\u90E8\u5206\u5B66\u751F\u5DF2\u6709\u70B9\u8BC4\u5185\u5BB9\uFF0C\u662F\u5426\u8986\u76D6\u5DF2\u6709\u70B9\u8BC4\u5185\u5BB9\uFF1F"),n.a.createElement("p",null,n.a.createElement(be.a.Group,{onChange:function(st){Te(st.target.value)},value:Ce},n.a.createElement(be.a,{value:!0},"\u8986\u76D6\u5DF2\u6709\u70B9\u8BC4"),n.a.createElement(be.a,{value:!1},"\u8DF3\u8FC7\u5DF2\u6709\u70B9\u8BC4"))))))},Ge=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks;return{shixunHomeworks:gn}})(Ct),vt=I("XYT7"),Ae=I("Nd3P"),ge=I.n(Ae),Ee=function(gn){var Tn,_n,si,ai,J=gn.shixunHomeworks,ue=gn.dispatch,Ce=Object(Ue.a)(gn,["shixunHomeworks","dispatch"]),Te=Object(w.i)(),qe=Object(a.useState)(!1),Oe=Object(r.a)(qe,2),Ve=Oe[0],et=Oe[1],Ot=Object(a.useState)((Tn=J.actionTabs.selectArrs)===null||Tn===void 0||((_n=Tn.data)===null||_n===void 0)?void 0:_n.name),Et=Object(r.a)(Ot,2),je=Et[0],ht=Et[1],it=mn.a.useForm(),st=Object(r.a)(it,1),bt=st[0];Object(a.useEffect)(function(){var ct,Gt,on,Dn,Kn,wn;J.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&bt.setFieldsValue({comment:(ct=J.actionTabs.selectArrs)===null||ct===void 0||((Gt=ct.data)===null||Gt===void 0)?void 0:Gt.work_comment,hidden_comment:(on=J.actionTabs.selectArrs)===null||on===void 0||((Dn=on.data)===null||Dn===void 0)?void 0:Dn.work_comment_hidden}),ht((Kn=J.actionTabs.selectArrs)===null||Kn===void 0||((wn=Kn.data)===null||wn===void 0)?void 0:wn.name)},[J.actionTabs.key]);var Lt=function(){var ct=Object(f.a)(o.a.mark(function Gt(){var on,Dn,Kn,wn;return o.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Kn=bt.getFieldValue(),Pn.next=3,Object(R.a)("/api/student_works/".concat((on=J.actionTabs.selectArrs)===null||on===void 0||((Dn=on.data)===null||Dn===void 0)?void 0:Dn.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:Kn.hidden_comment,comment:Kn.comment}});case 3:if(wn=Pn.sent,!(wn.status===0)){Pn.next=9;break}return m.b.success("\u8BC4\u9605\u6210\u529F"),bt.resetFields(),ue({type:"shixunHomeworks/setActionTabs",payload:{}}),Pn.abrupt("return",ue({type:"shixunHomeworks/getWorkList",payload:Te}));case 9:case"end":return Pn.stop()}},Gt)}));return function(){return ct.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(s.a,{centered:!0,title:(si=J.actionTabs.selectArrs)!==null&&si!==void 0&&(ai=si.data)!==null&&ai!==void 0&&ai.work_comment_hidden?"\u66F4\u6539"+je+"\u70B9\u8BC4":je+"\u70B9\u8BC4",visible:J.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(f.a)(o.a.mark(function ct(){var Gt;return o.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:Gt=bt.getFieldValue(),JSON.stringify(Gt)==="{}"||Gt.hidden_comment===""&&Gt.comment===""?et(!0):Lt();case 2:case"end":return Dn.stop()}},ct)})),onCancel:function(){ue({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(mn.a,{form:bt,onChange:function(){Ve&&et(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(mn.a.Item,{name:"comment"},n.a.createElement(jt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(mn.a.Item,{name:"hidden_comment"},n.a.createElement(jt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Ve&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},ae=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks;return{shixunHomeworks:gn}})(Ee),re=function(gn){var Tn=gn.shixunHomeworks,_n=gn.dispatch,si=Object(Ue.a)(gn,["shixunHomeworks","dispatch"]),ai=Object(w.i)(),J=Object(a.useState)([]),ue=Object(r.a)(J,2),Ce=ue[0],Te=ue[1],qe=Object(a.useState)([]),Oe=Object(r.a)(qe,2),Ve=Oe[0],et=Oe[1];Object(a.useEffect)(function(){Tn.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B"&&Ot()},[Tn.actionTabs.key]);function Ot(){return Et.apply(this,arguments)}function Et(){return Et=Object(f.a)(o.a.mark(function ht(){var it;return o.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Object(R.a)("/api/homework_commons/".concat(ai.categoryId,"/code_quality_analyses/group_list.json"),{method:"GET",params:{page:1,limit:200}});case 2:it=bt.sent,Te(it);case 4:case"end":return bt.stop()}},ht)})),Et.apply(this,arguments)}var je=[{title:"\u5206\u73ED\u60C5\u51B5",dataIndex:"name"},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"works_count"},{title:"\u68C0\u6D4B\u8FDB\u5EA6",dataIndex:"status"},{title:"\u4E0A\u6B21\u8BC4\u5206\u65F6\u95F4",dataIndex:"last_analysis_time"}];return n.a.createElement(n.a.Fragment,null,n.a.createElement(s.a,{centered:!0,title:"\u4EE3\u7801\u8D28\u91CF\u8BC4\u5206",visible:Tn.actionTabs.key==="\u8D28\u91CF\u68C0\u6D4B",width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(f.a)(o.a.mark(function ht(){var it;return o.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Object(R.a)("/api/homework_commons/".concat(ai.categoryId,"/code_quality_analyses.json"),{method:"POST",body:{group_ids:Ve}});case 2:it=bt.sent,(it==null?void 0:it.status)===0&&(O.d.replace("/classrooms/".concat(ai.coursesId,"/shixun_homework/").concat(ai.categoryId,"/detail?tabs=4")),window.location.reload(),_n({type:"shixunHomeworks/setActionTabs",payload:{}}),et([]));case 4:case"end":return bt.stop()}},ht)})),onCancel:function(){et([]),_n({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(Y.a,{rowSelection:{type:"checkbox",onChange:function(it,st){et(Object(xe.a)(it))},selectedRowKeys:Ve,getCheckboxProps:function(it){return{disabled:it.status==="\u8FDB\u884C\u4E2D"||it.works_count===0}}},rowKey:function(it){return it.key||it.id},scroll:{y:300},pagination:!1,columns:je,dataSource:Ce==null?void 0:Ce.group_list})))},he=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks;return{shixunHomeworks:gn}})(re),ve=I("Ot1p"),me=I("mgmH"),Be=function(gn){var Tn,_n,si,ai,J,ue,Ce,Te,qe,Oe=gn.shixunHomeworks,Ve=gn.loading,et=gn.dispatch,Ot=gn.setExportParams,Et=gn.user,je=Object(w.i)(),ht=Object(a.useState)(Object(p.a)(Object(p.a)({},{page:1,limit:20,order:"work_score",b_order:"desc"}),je)),it=Object(r.a)(ht,2),st=it[0],bt=it[1],Lt=mn.a.useForm(),ct=Object(r.a)(Lt,1),Gt=ct[0],on=Object(a.useState)(),Dn=Object(r.a)(on,2),Kn=Dn[0],wn=Dn[1],Nn=Object(a.useState)({}),Pn=Object(r.a)(Nn,2),Dt=Pn[0],sn=Pn[1],Ft=Object(a.useState)([]),St=Object(r.a)(Ft,2),Un=St[0],Sn=St[1],zt=Object(a.useState)(!1),lt=Object(r.a)(zt,2),jn=lt[0],ln=lt[1],Jn=Object(a.useState)([]),$t=Object(r.a)(Jn,2),On=$t[0],Fn=$t[1],hn=Object(a.useState)(!1),yi=Object(r.a)(hn,2),Rn=yi[0],bn=yi[1],Rt=Object(a.useState)(),Xe=Object(r.a)(Rt,2),kt=Xe[0],Pt=Xe[1],an=Object(a.useState)(1),zn=Object(r.a)(an,2),Ln=zn[0],oi=zn[1],ei=Object(a.useState)(),Oi=Object(r.a)(ei,2),mi=Oi[0],bi=Oi[1],Ji=Object(a.useState)(),Vi=Object(r.a)(Ji,2),$i=Vi[0],gr=Vi[1],vr=Object(a.useState)(),ye=Object(r.a)(vr,2),Me=ye[0],We=ye[1],we=Object(a.useState)(),ie=Object(r.a)(we,2),fe=ie[0],le=ie[1],Se=Object(a.useState)(),De=Object(r.a)(Se,2),$e=De[0],Le=De[1],at=Object(a.useState)(!1),It=Object(r.a)(at,2),qt=It[0],un=It[1],Hn=Object(w.h)();Object(a.useEffect)(function(){return Gn(!0),function(){sn([]),Sn([])}},[st.coursesId]),Object(a.useEffect)(function(){var dn,Zt=JSON.parse(JSON.stringify(Oe.workList));!(Zt!=null&&(dn=Zt.student_works)!==null&&dn!==void 0&&dn.length)&&Zt!==null&&Zt!==void 0&&Zt.id?(Zt.student_works=[Object(p.a)({},Zt)],sn(Zt)):(Zt!=null&&Zt.id&&Sn([Object(p.a)(Object(p.a)({},Zt),{number:"\u6211"})]),sn(Object(p.a)({},Zt)))},[Oe.workList]);var Gn=function(Zt){Ot(Object(p.a)({},st));var yn=et({type:"shixunHomeworks/getWorkList",payload:st});return Zt&&yn.then(function(Ht){var Wt,pi,Pi;(Ht!=null&&(Wt=Ht.homework_status)!==null&&Wt!==void 0&&Wt.includes("\u8FDB\u884C\u4E2D")||Ht!=null&&(pi=Ht.homework_status)!==null&&pi!==void 0&&pi.includes("\u8865\u4EA4\u4E2D")||Ht!=null&&(Pi=Ht.homework_status)!==null&&Pi!==void 0&&Pi.includes("\u63D0\u4EA4\u4E2D"))&&!Object(V.s)()&&li()}),yn};Object(a.useEffect)(function(){di()},[]);var di=function(){var dn=Object(f.a)(o.a.mark(function Zt(){var yn;return o.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return Wt.next=2,Object(vt.I)({categoryId:je.categoryId});case 2:yn=Wt.sent,wn(yn==null?void 0:yn.update_score);case 4:case"end":return Wt.stop()}},Zt)}));return function(){return dn.apply(this,arguments)}}(),li=function(){var dn=Object(f.a)(o.a.mark(function Zt(){var yn;return o.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return et({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6210\u7EE9\u8BA1\u7B97\u4E2D\uFF0C\u8BF7\u7A0D\u5019..."}}),Wt.next=3,Object(vt.Z)({categoryId:je.categoryId});case 3:yn=Wt.sent,et({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),(yn==null?void 0:yn.status)===0&&(m.b.success(yn==null?void 0:yn.message),Gn());case 6:case"end":return Wt.stop()}},Zt)}));return function(){return dn.apply(this,arguments)}}(),Ei=function(){st.page=1;var Zt=Object.assign({},Gt.getFieldValue());delete st.course_group,delete st.teacher_comment,Object.keys(Zt).map(function(yn){switch(yn){case"task_status":Zt[yn].includes("all")||!Zt[yn].length?(delete st.work_status,Gt.setFieldsValue(Object(Mt.a)({},"task_status","all"))):(st.work_status=Zt[yn],Gt.setFieldsValue(Object(Mt.a)({},"task_status",st.work_status)));break;case"course_group_info":Zt[yn].includes("all")||!Zt[yn].length?(delete st.course_group,Gt.setFieldsValue(Object(Mt.a)({},"course_group_info","all"))):(st.course_group=Zt[yn],Gt.setFieldsValue(Object(Mt.a)({},"course_group_info",st.course_group)));break;case"teacher_comment":if(Zt[yn].includes("all")||!Zt[yn].length)delete st.teacher_comment,Gt.setFieldsValue(Object(Mt.a)({},"teacher_comment","all"));else{var Ht;st.teacher_comment=((Ht=Zt[yn])===null||Ht===void 0?void 0:Ht.length)===1?Number(Zt[yn][0]):"",Gt.setFieldsValue(Object(Mt.a)({},"teacher_comment",Zt[yn]))}break}}),Gn()};Object(a.useEffect)(function(){if(document.getElementById("divhe")){var dn=document.getElementById("divhe").scrollHeight;dn>47&&(Le(47),un(!0))}},[document.getElementById("divhe")]);var Ri=function(Zt,yn){st.page=Zt,st.limit=20,Gn()};function gi(){oi(1),bi(""),gr(""),We(""),le(""),Fn([])}var xi=[{title:"\u5E8F\u53F7",dataIndex:"number",align:"center",width:50,fixed:"left",ellipsis:{showTitle:!1},render:function(Zt,yn,Ht){return st.limit*(st.page-1)+Ht+1}},{title:"\u59D3\u540D",dataIndex:"user_name",align:"center",width:110,fixed:"left",ellipsis:{showTitle:!1},render:function(Zt){return n.a.createElement(M.a,{placement:"bottomLeft",title:Zt},n.a.createElement("span",{className:"current"},Zt))}},!(Dt!=null&&Dt.is_excellent)&&!Object(V.r)()&&{title:"\u5B66\u53F7",dataIndex:"student_id",align:"center",sorter:!0,fixed:"left",width:110,showSorterTooltip:!1,ellipsis:{showTitle:!1},sortOrder:st.order==="student_id"?st.b_order==="desc"?"descend":"ascend":null,render:function(Zt){return n.a.createElement(M.a,{placement:"bottomLeft",title:Zt||"--"},n.a.createElement("span",{className:"current"},Zt||"--"))}},{title:"\u5206\u73ED",dataIndex:"group_name",align:"center",width:180,fixed:"left",ellipsis:{showTitle:!1},render:function(Zt,yn){return Zt?n.a.createElement(M.a,{placement:"bottom",title:Zt},n.a.createElement("span",{className:"current"},Zt)):"--"}},{title:"\u4F5C\u4E1A\u72B6\u6001",dataIndex:"work_status",align:"center",width:80,fixed:"left",sorter:!0,ellipsis:{showTitle:!1},showSorterTooltip:!1,sortOrder:st.order==="work_status"?st.b_order==="desc"?"descend":"ascend":null,render:function(Zt){return n.a.createElement(_.f,{status:Zt})}},{title:"\u5B8C\u6210\u65F6\u95F4",align:"center",dataIndex:"achieve_time",ellipsis:{showTitle:!1},render:function(Zt,yn){return n.a.createElement(M.a,{placement:"bottomLeft",title:Zt},n.a.createElement("span",{className:"current"},Zt))}},{title:"\u901A\u8FC7\u60C5\u51B5",align:"center",dataIndex:"achieve_info",ellipsis:{showTitle:!1},render:function(Zt,yn){return n.a.createElement("span",null,Zt||"- -")}},{title:"\u6700\u7EC8\u6210\u7EE9",align:"center",dataIndex:"score",ellipsis:{showTitle:!1},render:function(Zt,yn){return n.a.createElement("span",null,Zt||"- -")}},{title:"\u5B8C\u6210\u65F6\u957F",dataIndex:"achieve_time_long",align:"center",render:function(Zt,yn){return Zt&&Zt!="--"?n.a.createElement(M.a,{placement:"bottom",title:Zt},n.a.createElement("span",{className:"current"},Zt)):"--"}},{title:n.a.createElement("span",null,"\u8BC4\u9605\u72B6\u6001"),align:"center",dataIndex:"has_comment",width:90,fixed:"right",ellipsis:!0,render:function(Zt){return Zt?"\u5DF2\u8BC4\u9605":"\u672A\u8BC4\u9605"}},{title:"\u64CD\u4F5C",dataInex:"action",align:"center",width:70,fixed:"right",ellipsis:!0,className:"workListTable",render:function(Zt,yn){return Object(V.s)()?n.a.createElement("div",null,Object(_.B)(yn==null?void 0:yn.work_status)==="\u672A\u5F00\u542F"?n.a.createElement("span",null,"--"):n.a.createElement(x.a,{target:"_blank",onClick:function(Wt){Wt.stopPropagation()},to:"/classrooms/".concat(st.coursesId,"/program_homework/").concat(st.categoryId,"/").concat(yn.id,"/").concat(yn.user_id,"/comment")},"\u67E5\u770B")):n.a.createElement("a",{target:"_blank",onClick:function(Wt){var pi;if(Wt.stopPropagation(),(pi=Et.userInfo)!==null&&pi!==void 0&&pi.professional_certification)window.open("/classrooms/".concat(st.coursesId,"/program_homework/").concat(st.categoryId,"/").concat(yn.id,"/").concat(yn.user_id,"/comment"),"_blank");else return s.a.confirm({title:"\u63D0\u793A",centered:!0,content:n.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(_.S)("/account/certification")}}),!1}},"\u67E5\u770B\u4F5C\u4E1A")}}].filter(function(dn){return!!dn}),Di=function(){return n.a.createElement(Ut.a,null,n.a.createElement(Ut.a.Item,{onClick:function(){Object(me.h)(JSON.parse(sessionStorage.all_student_works_params),"shixun_work_list")},key:"1"},"\u5B66\u751F\u6210\u7EE9"),n.a.createElement(Ut.a.Item,{key:"2"},n.a.createElement(x.a,{to:"/classrooms/".concat(st.coursesId,"/exportlist/shixun_work_list")},"\u5386\u53F2\u5BFC\u51FA")))};return n.a.createElement(n.a.Fragment,null,n.a.createElement("section",{className:"".concat(ge.a.wrap," minH500 bg-white pl30 pr30 pt30")},((Tn=Dt.homework_status)===null||Tn===void 0?void 0:Tn.includes("\u672A\u53D1\u5E03"))&&n.a.createElement(Z.a,null),!((_n=Dt.homework_status)!==null&&_n!==void 0&&_n.includes("\u672A\u53D1\u5E03"))&&n.a.createElement("aside",null,!Object(V.c)()&&n.a.createElement("div",{className:"c-light-black font12"},n.a.createElement("span",null,"\u53D1\u5E03\u65F6\u95F4 ",Dt==null?void 0:Dt.publish_time),n.a.createElement("span",{className:"ml5"},"\u622A\u6B62\u65F6\u95F4 ",Dt==null?void 0:Dt.end_time),n.a.createElement("span",{className:"ml5"},"\u8865\u4EA4\u65F6\u95F4 ",(Dt==null?void 0:Dt.late_time)||"- -")),Object(V.c)()&&n.a.createElement(n.a.Fragment,null,n.a.createElement(mn.a,{form:Gt,onChange:Ei,initialValues:(si={},Object(Mt.a)(si,"task_status","all"),Object(Mt.a)(si,"course_group_info","all"),Object(Mt.a)(si,"teacher_comment","all"),si)},((ai=Dt.task_status)===null||ai===void 0?void 0:ai.length)>0&&n.a.createElement(mn.a.Item,{name:"task_status"},n.a.createElement(dt.a.Group,{value:[],style:{width:"100%"}},n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{className:"font14",flex:"80px"},"\u4F5C\u4E1A\u72B6\u6001:"),n.a.createElement(Ze.a,{flex:"80px"},n.a.createElement(dt.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(Ze.a,{flex:"1"},Dt.task_status&&Dt.task_status.map(function(dn,Zt){return n.a.createElement(dt.a,{name:"task_status",value:dn.id},dn.name,"(",dn.count,")")}))))),((J=Dt.course_group_info)===null||J===void 0?void 0:J.length)>0&&n.a.createElement(mn.a.Item,{name:"course_group_info"},n.a.createElement(dt.a.Group,{style:{width:"100%"}},n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{className:"font14",flex:"80px"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(Ze.a,{flex:"80px"},n.a.createElement(dt.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(Ze.a,{flex:"1",id:"divhe",style:{height:$e+"px",overflow:"hidden"}},(ue=Dt.course_group_info)===null||ue===void 0?void 0:ue.map(function(dn,Zt){return n.a.createElement(dt.a,{value:dn.course_group_id},dn.group_group_name,"(",dn.count,")")})),qt&&n.a.createElement("span",{onClick:function(){var Zt=document.getElementById("divhe").scrollHeight;$e>47?Le(47):Le(Zt)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"}},$e===47?"\u5C55\u5F00":"\u6536\u8D77",$e===47?n.a.createElement(pn.a,{style:{marginBottom:"3px",marginLeft:"2px"}}):n.a.createElement(tt.a,{style:{marginBottom:"3px",marginLeft:"2px"}}))))),((Ce=Dt.teacher_comment)===null||Ce===void 0?void 0:Ce.length)>0&&n.a.createElement(mn.a.Item,{name:"teacher_comment"},n.a.createElement(dt.a.Group,{style:{width:"100%"}},n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{className:"font14",flex:"80px"},"\u8FFD\u52A0\u70B9\u8BC4:"),n.a.createElement(Ze.a,{flex:"80px"},n.a.createElement(dt.a,{value:"all"},"\u5168\u90E8")),n.a.createElement(Ze.a,{flex:"1"},Dt.teacher_comment&&Dt.teacher_comment.map(function(dn,Zt){return n.a.createElement(dt.a,{value:String(dn.id)},dn.name,"(",dn.count,")")})))))),n.a.createElement(ze.a,{align:"middle"},n.a.createElement(Ze.a,{flex:"1"},n.a.createElement(ze.a,{align:"middle"},n.a.createElement(Ze.a,null,n.a.createElement(jt.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(Zt){st.search=Zt,st.page=1,Gn()},style:{width:240}})),n.a.createElement(Ze.a,null,n.a.createElement("span",{className:"ml5"},n.a.createElement("span",{className:"c-red"},Dt.work_count),"\u4E2A\u68C0\u7D22\u7ED3\u679C\uFF08",Dt.work_count,"\u4E2A\u5B66\u751F\uFF09")))),n.a.createElement(Ze.a,null,Object(V.c)()&&n.a.createElement(D.a,{className:"ml10",onClick:function(){et({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",selectArrs:Dt.student_works.map(function(Zt){return Zt.id}),params:st}})}},n.a.createElement("span",{className:"".concat(ge.a.tr1," iconfont icon-daimachazhong")}),"\u4EE3\u7801\u67E5\u91CD"),Object(V.c)()&&n.a.createElement(D.a,{className:"ml10",onClick:li},n.a.createElement("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"\u66F4\u65B0\u6210\u7EE9"),Object(V.c)()&&n.a.createElement(nt.a,{overlay:Di,className:"ml10"},n.a.createElement(D.a,null,n.a.createElement(fn.a,null),"\u5BFC\u51FA",n.a.createElement(In.a,null)))))),n.a.createElement(ze.a,{style:{justifyContent:"end",marginTop:"5px"}},Object(V.c)()&&Kn&&n.a.createElement("span",null,n.a.createElement("span",{style:{color:"red"}},"*"),"\u5217\u8868\u4E2D\u4F5C\u4E1A\u8BB0\u5F55\u5B58\u5728\u5DEE\u5F02\uFF0C\u8BF7\u70B9\u51FB\u201C\u66F4\u65B0\u6210\u7EE9\u201D\u6309\u94AE")),n.a.createElement(Y.a,{className:"mt30",loading:Ve["shixunHomeworks/getWorkList"],pagination:!1,style:{cursor:"pointer"},onRow:function(Zt){return{onClick:function(Ht){window.open("/classrooms/".concat(st.coursesId,"/program_homework/").concat(st.categoryId,"/").concat(Zt.id,"/").concat(Zt.user_id,"/comment"),"_blank")}}},dataSource:Dt.student_works,columns:xi,onChange:function(Zt,yn,Ht){Ht.field&&(st.order=Ht.field),Ht.order||(st.b_order="asc"),Ht.order==="ascend"&&(st.b_order="asc"),Ht.order==="descend"&&(st.b_order="desc"),Ht.order||(st.b_order="asc"),Gn()}}),n.a.createElement(Ge,null),n.a.createElement(ae,null),n.a.createElement(He.a,null)),n.a.createElement(s.a,{title:"\u4E00\u952E\u6253\u56DE\u91CD\u505A",visible:jn,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:Object(f.a)(o.a.mark(function dn(){var Zt,yn;return o.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(!(Ln===2)){Wt.next=13;break}if(!(On.length<=0)){Wt.next=4;break}return m.b.info("\u8BF7\u9009\u62E9\u4F5C\u4E1A\u72B6\u6001"),Wt.abrupt("return");case 4:if(fe){Wt.next=7;break}return m.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),Wt.abrupt("return");case 7:return Wt.next=9,Object(R.a)("/api/homework_commons/".concat(st.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:fe,status:On}});case 9:Zt=Wt.sent,Zt.status===0&&(Pt(Zt),ln(!1),bn(!0)),Wt.next=32;break;case 13:if(!(Me===0||$i===0)){Wt.next=16;break}Wt.next=22;break;case 16:if(Me){Wt.next=19;break}return m.b.info("\u6700\u4F4E\u5206\u4E0D\u80FD\u4E3A\u7A7A"),Wt.abrupt("return");case 19:if($i){Wt.next=22;break}return m.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u4E3A\u7A7A"),Wt.abrupt("return");case 22:if(!(Me>$i)){Wt.next=25;break}return m.b.info("\u6700\u9AD8\u5206\u4E0D\u80FD\u5927\u4E8E\u6700\u4F4E\u5206"),Wt.abrupt("return");case 25:if(fe){Wt.next=28;break}return m.b.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A"),Wt.abrupt("return");case 28:return Wt.next=30,Object(R.a)("/api/homework_commons/".concat(st.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:fe,min_score:Me,max_score:$i}});case 30:yn=Wt.sent,yn.status===0&&(Pt(yn),ln(!1),bn(!0));case 32:case"end":return Wt.stop()}},dn)})),onCancel:function(){ln(!1),gi()}},n.a.createElement("div",{style:{padding:"32px"}},n.a.createElement("div",null,n.a.createElement("div",null,n.a.createElement("span",{style:{width:"80px"}},"\u6253\u56DE\u65B9\u5F0F\uFF1A"),n.a.createElement(be.a.Group,{value:Ln,onChange:function(Zt){oi(Zt.target.value)}},n.a.createElement(be.a,{value:1},"\u6309\u6210\u7EE9\u6253\u56DE"),n.a.createElement(be.a,{value:2},"\u6309\u4F5C\u4E1A\u72B6\u6001\u6253\u56DE"))),Ln===1&&n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"70px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*"),"\u6700\u4F4E\u5206\uFF1A"),n.a.createElement(Je.a,{min:0,max:100,value:Me,onChange:function(Zt){return We(Zt)},style:{width:"100px"}}),n.a.createElement("span",{style:{width:"80px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*"),"\u6700\u9AD8\u5206\uFF1A"),n.a.createElement(Je.a,{min:0,max:100,value:$i,onChange:function(Zt){return gr(Zt)},style:{width:"100px"}})),Ln===2&&n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"80px"}},"\u4F5C\u4E1A\u72B6\u6001\uFF1A"),n.a.createElement(dt.a.Group,{onChange:function(Zt){Fn(Object(xe.a)(Zt))},style:{width:"100%"}},(Te=Dt.task_status)===null||Te===void 0?void 0:Te.map(function(dn,Zt){return n.a.createElement(dt.a,{name:"task_status",value:dn.id},dn.name,"(",dn.count,")")}))),n.a.createElement("div",{style:{display:"flex",marginTop:"20px"}},n.a.createElement("span",{style:{width:"70px",textAlign:"end"}},n.a.createElement("span",{style:{color:"red"}},"*")," \u8BC4\u8BED\uFF1A"),n.a.createElement(ve.a,{className:ge.a.MdEditor,onChange:function(Zt){return le(Zt)},placeholder:"\u8BF7\u586B\u5199\u8BC4\u8BED"}))))),n.a.createElement(s.a,{visible:Rn,title:"\u6253\u56DE\u786E\u8BA4",onOk:Object(f.a)(o.a.mark(function dn(){var Zt,yn;return o.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(!(Ln===2)){Wt.next=7;break}return Wt.next=3,Object(R.a)("/api/homework_commons/".concat(st.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:fe,status:On}});case 3:Zt=Wt.sent,Zt.status===0&&(m.b.info("\u6253\u56DE\u6210\u529F"),gi(),Gn(),bn(!1)),Wt.next=11;break;case 7:return Wt.next=9,Object(R.a)("/api/homework_commons/".concat(st.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:st.categoryId,comment:fe,min_score:Me,max_score:$i}});case 9:yn=Wt.sent,yn.status===0&&(m.b.info("\u6253\u56DE\u6210\u529F"),gi(),Gn(),bn(!1));case 11:case"end":return Wt.stop()}},dn)})),onCancel:function(){gi(),bn(!1)}},n.a.createElement("div",{style:{padding:"32px"}},Ln===1&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u6210\u7EE9\u5728",Me,"-",$i,"\u7684\u5B66\u751F\u8FDB\u884C\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),Ln===2&&n.a.createElement("span",null,"\u786E\u8BA4\u5C06\u4F5C\u4E1A\u72B6\u6001\u4E3A",((qe=Dt.task_status)===null||qe===void 0?void 0:qe.filter(function(dn){return On==null?void 0:On.includes(dn.id)}).map(function(dn){return dn.name}).toString())+",","\u7684\u5B66\u751F\u8FDB\u884C\u4F5C\u4E1A\u6253\u56DE\u91CD\u505A\u5417\uFF1F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u8BE5\u6761\u4EF6\u4E0B\u5171\u6709",kt==null?void 0:kt.count,"\u540D\u5B66\u751F")))),n.a.createElement(he,null),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(v.a,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,onChange:Ri,current:st.page||1,defaultPageSize:20,total:Dt.work_count})))},Tt=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading,_n=Bn.user;return{shixunHomeworks:gn,loading:Tn.effects,user:_n}})(Be),Jt=I("fOrg"),En=I("+KLJ"),mt=function(gn){var Tn,_n=gn.shixunHomeworks,si=gn.loading,ai=gn.dispatch,J=Object(w.i)(),ue=Object(a.useState)(Object(p.a)(Object(p.a)({},{page:1,limit:20,group_ids:[]}),J)),Ce=Object(r.a)(ue,2),Te=Ce[0],qe=Ce[1],Oe=Object(w.h)(),Ve=_n.codeReview,et=Object(a.useState)({}),Ot=Object(r.a)(et,2),Et=Ot[0],je=Ot[1],ht=mn.a.useForm(),it=Object(r.a)(ht,1),st=it[0];Te.order="code_rate",Te.sort="desc",Te.category=Te.categoryId,Object(a.useEffect)(function(){bt(),console.log("params",Te)},[Te]),Object(a.useEffect)(function(){_n.actionTabs.key==="\u6267\u884C\u4EE3\u7801\u67E5\u91CD"&&bt()},[_n.actionTabs.key]);var bt=function(){var on=Object(f.a)(o.a.mark(function Dn(){var Kn;return o.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,ai({type:"shixunHomeworks/getCodeReview",payload:Object(p.a)({},Te)});case 2:Kn=Nn.sent,Kn.status===-2&&setTimeout(function(){return bt()},1500);case 4:case"end":return Nn.stop()}},Dn)}));return function(){return on.apply(this,arguments)}}(),Lt=function(){},ct=function(Dn,Kn){Te.page=Dn,Te.limit=20,ai({type:"shixunHomeworks/getCodeReview",payload:Object(p.a)({},Te)})},Gt=[{title:"\u5E8F\u53F7",dataIndex:"number",render:function(Dn,Kn,wn){return Te.limit*(Te.page-1)+wn+1}},{title:"\u59D3\u540D",dataIndex:"username"},{title:"\u5B66\u53F7",dataIndex:"student_id"},{title:"\u76F8\u4F3C\u5EA6",dataIndex:"code_rate",render:function(Dn){return n.a.createElement("span",{className:"c-orange"},Dn)}},{title:"\u64CD\u4F5C",dataInex:"action",render:function(Dn,Kn){return n.a.createElement("div",null,n.a.createElement(x.a,{target:"_blank",to:"/classrooms/".concat(Te.coursesId,"/program_homework/").concat(Te.categoryId,"/review_detail/").concat(Kn.user_id)},"\u67E5\u770B"),n.a.createElement("br",null))}}];return n.a.createElement("section",{className:"minH500 bg-white pl30 pr30 pt10"},(Ve==null?void 0:Ve.status)===-2&&n.a.createElement(En.a,{message:"\u67E5\u91CD\u8FDB\u884C\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u2026\u2026",className:"mb10 font14",type:"error"}),n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{flex:"1"},n.a.createElement("p",{className:"mt10"},"\u67E5\u91CD\u65F6\u95F4\uFF1A",Ve.last_review_time,n.a.createElement(D.a,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){ai({type:"shixunHomeworks/setActionTabs",payload:{key:"\u4EE3\u7801\u67E5\u91CD",params:Te}})}},"\u4EE3\u7801\u67E5\u91CD"))),n.a.createElement(Ze.a,null,n.a.createElement(jt.a.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22",onSearch:function(Dn){Te.search=Dn,ai({type:"shixunHomeworks/getCodeReview",payload:Te})},style:{width:200}}),n.a.createElement("span",{className:"ml5 c-red"}))),((Tn=Ve.group_info)===null||Tn===void 0?void 0:Tn.length)>0&&n.a.createElement(n.a.Fragment,null,n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{flex:"80px",className:"font14"},"\u5206\u73ED\u60C5\u51B5:"),n.a.createElement(Ze.a,{flex:"80px"},n.a.createElement(dt.a,{checked:Te.group_ids=="",value:"all",onChange:function(Dn){delete Te.group_ids,Te.group_ids=[],Te.page=1,qe(Object(p.a)({},Te))}},"\u5168\u90E8")),n.a.createElement(Ze.a,{flex:"1"},Ve.group_info&&Ve.group_info.map(function(on,Dn){return n.a.createElement(dt.a,{style:{marginLeft:0},value:on.id,checked:Te.group_ids.includes(on.id),onChange:function(wn){wn.target.checked?Te.group_ids.push(on.id):Te.group_ids.splice(Te.group_ids.indexOf(on.id),1),Te.page=1,qe(Object(p.a)({},Te))}},on.name,"(",on.members_count,")")}))),n.a.createElement(ze.a,{className:"font14 c-red mt5"},n.a.createElement(Ze.a,null,"\u672C\u9875\u4EC5\u663E\u793A\u5168\u90E8\u5DF2\u67E5\u91CD\u5206\u73ED"))),n.a.createElement("p",{className:"mt10"},n.a.createElement("span",{className:"c-red"},Ve.copy_reviews_count),"\u4E2A\u7591\u4F3C\u6284\u88AD\u4F5C\u54C1\uFF08",Ve.all_reviews_count,"\u4F5C\u54C1\uFF09"),n.a.createElement(Y.a,{className:"mt30",loading:si["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:Ve.users_reviews,columns:Gt,onChange:function(Dn,Kn,wn){wn.order==="ascend"&&(Te.b_order="asc"),wn.order==="descend"&&(Te.b_order="desc"),wn.order||delete Te.b_order,ai({type:"shixunHomeworks/getCodeReview",payload:Object(p.a)({},Te)})}}),n.a.createElement("aside",{className:"tc mb50 mt30"},n.a.createElement(v.a,{showSizeChanger:!1,onChange:ct,defaultCurrent:Te.page||1,current:Te.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:Ve.copy_reviews_count})))},Qt=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn.effects}})(mt),gt=I("OaEy"),yt=I("2fM7"),rt=I("iQDF"),ce=I("+eQT"),Re=I("/MfK"),At=I("w5pM"),ot=I("Lyp1"),Yt=I("LvDl"),rn=I("xb3X"),_e=I.n(rn),Ne=I("AHFd"),xt=I("eozf"),Xt=ce.a.RangePicker,vn=yt.a.Option,Mn=function(gn){var Tn,_n,si,ai,J,ue,Ce,Te,qe,Oe,Ve=gn.shixunHomeworks,et=gn.loading,Ot=gn.dispatch,Et=Object(w.i)(),je=Ve.workSetting,ht=Ve.workList,it=Ve.changeData,st=Object(a.useState)(!0),bt=Object(r.a)(st,2),Lt=bt[0],ct=bt[1],Gt=Object(a.useState)(!1),on=Object(r.a)(Gt,2),Dn=on[0],Kn=on[1],wn=Object(a.useState)([]),Nn=Object(r.a)(wn,2),Pn=Nn[0],Dt=Nn[1],sn=Object(a.useState)([]),Ft=Object(r.a)(sn,2),St=Ft[0],Un=Ft[1],Sn=Object(a.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_minus_score:0,penalty_type:Ne.a.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,send_type:void 0,difficult_count:[],difficult_settings:[],late_penalty:0}),zt=Object(r.a)(Sn,2),lt=zt[0],jn=zt[1];Object(a.useEffect)(function(){return ln(),function(){Dt([].concat())}},[]);var ln=function(){Ot({type:"shixunHomeworks/getWorkSetting",payload:Object(p.a)({},Et)})};Object(a.useEffect)(function(){var Rt;if(!(je!=null&&je.course_id))return;Object.keys(lt).map(function(Xe){lt[Xe]=je[Xe]}),(!lt.allow_late||!lt.unified_late)&&(lt.late_minus_score=20,lt.penalty_type=Ne.a.Percent),lt.unified_setting||(lt.unified_late=!1,lt.unified_anonymous_comment=!1,lt.unified_anonymous_appeal=!1),Pn=JSON.parse(JSON.stringify(je.group_settings.map(function(Xe){return Object(p.a)(Object(p.a)({},Xe),{},{group_name:[Xe.group_name]})}).filter(function(Xe){return Xe.publish_time!==null}))),St=JSON.parse(JSON.stringify(je.allow_late_settings.map(function(Xe){return Object(p.a)(Object(p.a)({},Xe),{},{group_name:[Xe.group_name]})}).filter(function(Xe){return Xe.late_time!==null}))),lt.difficult_settings.length===0&&(lt.difficult_settings=[0,0,0]),jn(Object(p.a)({},lt)),Dt(Object(xe.a)(Pn)),((Rt=St)===null||Rt===void 0?void 0:Rt.length)<=0?Un([{late_minus_score:20}]):Un(Object(xe.a)(St))},[je]);var Jn=function(){var Xe,kt=JSON.parse(JSON.stringify(lt));if(kt.categoryId=Et.categoryId,lt.unified_setting||(Pn=(Xe=Pn)===null||Xe===void 0?void 0:Xe.map(function(an){var zn;if(!an.publish_time||!an.end_time)throw m.b.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!an.group_name)throw m.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return an.group_name=typeof(an==null?void 0:an.group_name)=="string"?[an==null?void 0:an.group_name]:an==null?void 0:an.group_name,an.group_id=(zn=je.group_settings)===null||zn===void 0?void 0:zn.filter(function(Ln){var oi;return an==null||((oi=an.group_name)===null||oi===void 0)?void 0:oi.includes(Ln.group_name)}).map(function(Ln){return Ln.group_id||Ln.id}).toString().split(","),an})),kt.group_settings=Pn,lt.allow_late)if(lt.unified_late){if(lt.late_minus_score===null||lt.late_minus_score===void 0||lt.late_minus_score<0||lt.late_minus_score>100)throw m.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!lt.late_time)throw m.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else{var Pt;St=(Pt=St)===null||Pt===void 0?void 0:Pt.map(function(an){var zn,Ln;if(an.late_minus_score===null||an.late_minus_score===void 0||an.late_minus_score<0||an.late_minus_score>100)throw m.b.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!an.late_time)throw m.b.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!an.group_name)throw m.b.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return an.group_name=typeof(an==null?void 0:an.group_name)=="string"?[an==null?void 0:an.group_name]:an==null?void 0:an.group_name,an.group_id=an==null||((zn=an.group_name)===null||zn===void 0||((Ln=zn.map(function(oi){var ei,Oi,mi=(ei=je.group_settings)===null||ei===void 0||((Oi=ei.filter(function(bi){return(bi==null?void 0:bi.group_name)===oi}))===null||Oi===void 0)?void 0:Oi[0];return mi==null?void 0:mi.group_id}))===null||Ln===void 0))?void 0:Ln.toString().split(","),an}),kt.allow_late_settings=St}kt.send_type===1&&(kt.difficult_settings=kt.difficult_settings.map(function(an){return an||0})),$t(kt)},$t=function(Xe){var kt;if(Xe.total_score===null){m.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Xe!=null&&Xe.work_efficiency&&Xe.eff_score===null){m.b.warn("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}var Pt={shixun_evaluation:Xe.shixun_evaluation,challenge_settings:Xe.challenge_settings},an=function(){var zn=Object(f.a)(o.a.mark(function Ln(){var oi;return o.a.wrap(function(Oi){for(;;)switch(Oi.prev=Oi.next){case 0:return Kn(!0),Oi.next=3,Object(R.a)("/api/homework_commons/".concat(Et.categoryId,"/publish_setting.json"),{method:"post",body:Object(p.a)({},Xe)});case 3:oi=Oi.sent,oi.status===0&&(m.b.success("\u66F4\u65B0\u6210\u529F"),ct(!0),ln(),Ot({type:"shixunHomeworks/getWorkList",payload:Object(p.a)({},Et)})),Kn(!1);case 6:case"end":return Oi.stop()}},Ln)}));return function(){return zn.apply(this,arguments)}}();!Object(Yt.isEqual)(it,Pt)&&!(ht!=null&&(kt=ht.homework_status)!==null&&kt!==void 0&&kt.includes("\u672A\u53D1\u5E03"))?s.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:an}):an()},On=function(Xe,kt){var Pt,an=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"group_id";return kt?kt.find(function(zn){return zn[an]===Xe}):je==null||((Pt=je.group_settings)===null||Pt===void 0)?void 0:Pt.find(function(zn){return zn.group_id[0]===Xe})},Fn=(je==null?void 0:je.allow_late)||(je==null?void 0:je.anonymous_comment),hn=function(Xe){var kt=On(Xe,je==null?void 0:je.allow_late_settings,"id"),Pt=On(Xe,je==null?void 0:je.anonymous_comment_settings);return(je==null?void 0:je.allow_late)&&kt&&(kt==null?void 0:kt.late_time)!==null||(je==null?void 0:je.anonymous_comment)&&Pt&&(Pt==null?void 0:Pt.evaluation_start)!==null},yi=Object(a.useMemo)(function(){var Rt;if(je!=null&&je.unified_setting){var Xe;return!(ht!=null&&(Xe=ht.homework_status)!==null&&Xe!==void 0&&Xe.includes("\u5DF2\u622A\u6B62"))||(je==null?void 0:je.allow_late)||(je==null?void 0:je.anonymous_comment)}var kt=je==null||((Rt=je.group_settings)===null||Rt===void 0)?void 0:Rt.some(function(Pt){return G()(Pt.end_time)<=G()()});return!kt||(je==null?void 0:je.allow_late)||(je==null?void 0:je.all_group_late)},[je,ht]),Rn=je==null?void 0:je.anonymous_comment,bn=function(Xe){if(!Xe)return!1;var kt=On(Xe,je==null?void 0:je.anonymous_comment_settings);return(je==null?void 0:je.anonymous_comment)&&kt&&(kt==null?void 0:kt.evaluation_start)!==null};return n.a.createElement("section",{className:_e.a.form},n.a.createElement(ze.a,{align:"middle"},n.a.createElement(Ze.a,{flex:"1"},n.a.createElement("div",{className:_e.a.title},"\u8BD5\u9898\u53D1\u5E03")),n.a.createElement(Ze.a,null,Object(V.c)()&&n.a.createElement(D.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return ct(!1)}},"\u7F16\u8F91\u8BBE\u7F6E"))),n.a.createElement("div",{className:"mt10"},n.a.createElement("label",{className:"mr20"},"\u53D1\u5E03\u65B9\u5F0F")," ",n.a.createElement(be.a.Group,{disabled:Lt||!(ht!=null&&(Tn=ht.homework_status)!==null&&Tn!==void 0&&Tn.includes("\u672A\u53D1\u5E03")),value:lt.send_type,onChange:function(Xe){lt.send_type=Xe.target.value,jn(Object.assign({},lt))}},n.a.createElement(be.a,{value:0},"\u5168\u90E8\u56FA\u5B9A\u8BD5\u9898"),n.a.createElement(be.a,{className:"ml20",value:1},"\u968F\u673A\u62BD\u9898")),lt.send_type===1&&n.a.createElement(ze.a,{className:"mt20",style:{marginLeft:94}},n.a.createElement(Ze.a,null,"\u7B80\u5355\u9898\u6570",n.a.createElement(Je.a,{precision:0,disabled:Lt||!(ht!=null&&(_n=ht.homework_status)!==null&&_n!==void 0&&_n.includes("\u672A\u53D1\u5E03")),placeholder:"\u6700\u5927".concat(lt.difficult_count[0]||0),min:0,max:lt.difficult_count[0]||0,value:lt.difficult_settings[0],onChange:function(Xe){lt.difficult_settings[0]=Xe,jn(Object.assign({},lt))},className:"ml10 mr20"})),n.a.createElement(Ze.a,null,"\u9002\u4E2D\u9898\u6570",n.a.createElement(Je.a,{precision:0,disabled:Lt||!(ht!=null&&(si=ht.homework_status)!==null&&si!==void 0&&si.includes("\u672A\u53D1\u5E03")),placeholder:"\u6700\u5927".concat(lt.difficult_count[1]||0),min:0,max:lt.difficult_count[1]||0,value:lt.difficult_settings[1],onChange:function(Xe){lt.difficult_settings[1]=Xe,jn(Object.assign({},lt))},className:"ml10 mr20"})),n.a.createElement(Ze.a,null,"\u56F0\u96BE\u9898\u6570",n.a.createElement(Je.a,{precision:0,disabled:Lt||!(ht!=null&&(ai=ht.homework_status)!==null&&ai!==void 0&&ai.includes("\u672A\u53D1\u5E03")),placeholder:"\u6700\u5927".concat(lt.difficult_count[2]||0),min:0,max:lt.difficult_count[2]||0,value:lt.difficult_settings[2],onChange:function(Xe){lt.difficult_settings[2]=Xe,jn(Object.assign({},lt))},className:"ml10 mr20"})))),n.a.createElement("div",{className:"mt30"},n.a.createElement("h1",{className:"mb10"},"\u53D1\u5E03\u8BBE\u7F6E"),n.a.createElement("label",{className:"mr20"},"\u53D1\u5E03\u65B9\u5F0F")," ",n.a.createElement(be.a.Group,{disabled:Lt||!(ht!=null&&(J=ht.homework_status)!==null&&J!==void 0&&J.includes("\u672A\u53D1\u5E03")),value:lt.unified_setting,onChange:function(Xe){var kt;if(!(ht!=null&&(kt=ht.homework_status)!==null&&kt!==void 0&&kt.includes("\u672A\u53D1\u5E03"))){m.b.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(lt.unified_setting=!lt.unified_setting,lt.unified_setting||(lt.unified_late=!1),jn(Object.assign({},lt)),lt.unified_setting===!1&&Pn==""){Dt(Pn.concat({}));return}lt.unified_setting&&(Dt([]),Un([{late_minus_score:5}]))}},n.a.createElement(be.a,{value:!0},"\u7EDF\u4E00\u53D1\u5E03"),n.a.createElement(be.a,{className:"ml20",disabled:(je==null||((ue=je.group_settings)===null||ue===void 0)?void 0:ue.length)===0,value:!1},"\u5206\u73ED\u53D1\u5E03")),(je==null||((Ce=je.group_settings)===null||Ce===void 0)?void 0:Ce.length)===0&&n.a.createElement("p",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},"\uFF08\u672C\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03\u201C\uFF09")),lt.unified_setting&&n.a.createElement("div",{style:{marginLeft:50}},n.a.createElement(ze.a,{align:"middle",className:"mt25 pl30"},n.a.createElement(Ze.a,null,"\u53D1\u5E03\u65F6\u95F4"),n.a.createElement(Ze.a,{className:"ml10"},n.a.createElement(ce.a,{style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:function(Xe){return Object(xt.b)(Xe,je==null?void 0:je.course_end_date)},disabledTime:function(Xe){return Object(xt.c)(Xe)},disabled:Lt||!(ht!=null&&(Te=ht.homework_status)!==null&&Te!==void 0&&Te.includes("\u672A\u53D1\u5E03")),value:lt.publish_time?G()(lt.publish_time):"",onChange:function(Xe,kt){lt.publish_time=kt,(lt.end_time==""||!lt.end_time)&<.unified_setting&&(lt.end_time=G()(Xe).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),jn(Object.assign({},lt))}})),n.a.createElement(Ze.a,null,n.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u7684\u65F6\u95F4)"))),n.a.createElement(ze.a,{align:"middle",className:"mt25 pl30"},n.a.createElement(Ze.a,null,"\u622A\u6B62\u65F6\u95F4"),n.a.createElement(Ze.a,{className:"ml10"},n.a.createElement(ce.a,{style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:G()(Object(_.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:Lt||Fn,disabledDate:function(Xe){return Object(xt.b)(Xe,je==null?void 0:je.course_end_date,lt.publish_time)},disabledTime:function(Xe){return Object(xt.c)(Xe,lt.publish_time)},value:lt.end_time?G()(lt.end_time):"",onChange:function(Xe,kt){lt.end_time=kt,jn(Object.assign({},lt))}})),n.a.createElement(Ze.a,null,n.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9)")))),!lt.unified_setting&&((qe=Pn)===null||qe===void 0?void 0:qe.length)>0&&n.a.createElement(ze.a,{style:{marginTop:30,paddingTop:20,marginLeft:80,borderTop:"1px solid #eee"}},n.a.createElement(Ze.a,{span:24},n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{span:10}),n.a.createElement(Ze.a,{span:10},n.a.createElement(ze.a,{className:"c-grey-c ml30"},n.a.createElement(Ze.a,{flex:"1"},"(\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4)"),n.a.createElement(Ze.a,{flex:"1"},"(\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9)"))),n.a.createElement(Ze.a,{span:4}))),Pn&&Pn.map(function(Rt,Xe){var kt,Pt,an,zn,Ln;return n.a.createElement(Ze.a,{span:24,key:Xe},n.a.createElement(ze.a,{gutter:[8,16]},n.a.createElement(Ze.a,{span:10},n.a.createElement(ze.a,{gutter:[8,16]},n.a.createElement(Ze.a,null,"\u53D1\u5E03\u89C4\u5219 ",Xe+1),n.a.createElement(Ze.a,{flex:"1",style:{maxWidth:300}},n.a.createElement(yt.a,{disabled:Lt||!(ht!=null&&(kt=ht.homework_status)!==null&&kt!==void 0&&kt.includes("\u672A\u53D1\u5E03"))&&Rt.id,className:"ml20",mode:"multiple",style:{width:"100%"},value:Rt.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(ei){Pn[Xe].group_name=ei,Pn[Xe].group_id=Rt.group_id;var Oi=Object(Yt.flattenDeep)(Pn.map(function(bi){return bi.group_name})),mi=St.map(function(bi){var Ji=(bi==null?void 0:bi.group_name)||[];return Object(p.a)(Object(p.a)({},bi),{},{group_name:Object(Yt.remove)(Ji,function(Vi){return Oi.includes(Vi)})})});Un(mi),Dt(Pn.slice())}},je.group_settings&&je.group_settings.map(function(oi){if(!Pn.map(function(ei){return ei.group_name}).toString().split(",").includes(String(oi.group_name)))return n.a.createElement(vn,{value:oi.group_name,key:oi.id},oi.group_name)}))))),n.a.createElement(Ze.a,{span:10},n.a.createElement("div",{className:"ml30"},n.a.createElement(Xt,{allowClear:!1,ranges:{\u6B64\u523B:[Rt.publish_time?G()(Rt.publish_time):G()(),G()()]},disabled:Lt||(G()()<=G()((Pt=On((an=Rt.group_id)===null||an===void 0?void 0:an[0]))===null||Pt===void 0?void 0:Pt.publish_time)?!1:[!0,hn((zn=Rt.group_id)===null||zn===void 0?void 0:zn[0])]),style:{width:400},placeholder:["\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4","\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4"],disabledDate:function(ei){return Object(xt.b)(ei,je==null?void 0:je.course_end_date)},disabledTime:function(ei){return Object(xt.c)(ei)},showTime:{format:"HH:mm",defaultValue:[G()(Object(_.d)(),"HH:mm"),G()(Object(_.d)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:Rt.publish_time&&[G()(Rt.publish_time),Rt.end_time?G()(Rt.end_time):void 0],onChange:function(ei,Oi){Pn[Xe].publish_time=Oi[0],Pn[Xe].end_time=Oi[1],Dt(Object(xe.a)(Pn))}}))),!Lt&&n.a.createElement(Ze.a,{span:4},Xe>0&&!Rt.id&&n.a.createElement(Re.a,{onClick:function(){Pn=Pn.filter(function(ei,Oi){return Xe!==Oi}),Dt(Pn.slice()),setTimeout(function(){return Dt(Pn.slice())},10)}}),Pn.length<(je==null||((Ln=je.group_settings)===null||Ln===void 0)?void 0:Ln.length)&&n.a.createElement(At.a,{className:"c-green ml20",onClick:function(){Dt(Pn.concat({}))}}))))})),n.a.createElement(ze.a,{className:"mt30"},n.a.createElement(Ze.a,null,n.a.createElement(ze.a,{align:"middle"},n.a.createElement("h1",{style:{marginBottom:0}},"\u8865\u4EA4\u8BBE\u7F6E"),n.a.createElement(M.a,{placement:"right",title:"\u4F5C\u4E1A\u622A\u6B62\u540E\u624D\u53EF\u5F00\u542F\u8865\u4EA4\uFF0C\u5F00\u542F\u8865\u4EA4\u540E\u4E0D\u53EF\u53D8\u66F4\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\u3002"},n.a.createElement(ot.a,{style:{marginLeft:4,cursor:"pointer"}})))),n.a.createElement(Ze.a,{span:24,className:"mt10"},n.a.createElement(dt.a,{checked:lt.allow_late,disabled:Lt||yi,onChange:function(){lt.allow_late=!lt.allow_late,St==""&&Un([{late_minus_score:5}]),jn(Object.assign({},lt))}},n.a.createElement("span",null,"\u5F00\u542F\u8865\u4EA4")),n.a.createElement(M.a,{overlayStyle:{width:380,maxWidth:380},title:n.a.createElement("div",{style:{display:"flex",flexFlow:"column"}},n.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219\u8BF4\u660E"),n.a.createElement("span",null,"\u5F00\u542F\u8865\u4EA4\uFF0C\u5B66\u751F\u53EA\u5728\u8865\u4EA4\u65F6\u95F4\u5185\u624D\u901A\u5173\u5219\u6263\u9664\u5206\u503C\uFF0C\u672A\u901A\u5173\u4E0D\u6263\u5206\uFF1B"),n.a.createElement("span",null,"\u5B66\u751F\u5728\u6B63\u5E38\u4F5C\u4E1A\u89C4\u5B9A\u65F6\u95F4\u5185\u901A\u5173\uFF0C\u5728\u8865\u4EA4\u9636\u6BB5\u518D\u6B21\u901A\u5173\u4E0D\u6263\u5206\u3002"))},n.a.createElement(ot.a,null)))),(lt==null?void 0:lt.allow_late)&&n.a.createElement("div",{style:{marginLeft:50}},n.a.createElement("div",{className:"ml30 mt20",style:{marginLeft:50}},n.a.createElement("span",null,"\u8865\u4EA4\u65B9\u5F0F\uFF1A"),n.a.createElement(be.a.Group,{disabled:Lt||(je==null?void 0:je.anonymous_comment)||(je==null?void 0:je.allow_late),value:lt.unified_late,onChange:function(Xe){lt.unified_late=Xe.target.value,St==""&&!Xe.target.value&&Un([{late_minus_score:5}]),jn(Object(p.a)({},lt))}},(lt==null?void 0:lt.unified_setting)&&n.a.createElement(be.a,{value:!0}," \u7EDF\u4E00\u8865\u4EA4 "),(je==null||((Oe=je.group_settings)===null||Oe===void 0)?void 0:Oe.length)&&n.a.createElement(be.a,{value:!1}," \u5206\u73ED\u8865\u4EA4 "))),lt!=null&<.unified_late?n.a.createElement(n.a.Fragment,null,n.a.createElement(ze.a,{align:"middle",className:"mt25 pl30"},n.a.createElement(Ze.a,null,"\u8865\u4EA4\u6263\u5206:"),n.a.createElement(Ze.a,{className:"ml5"},n.a.createElement(Ne.b,{disabled:Lt||Rn,value:{type:lt.penalty_type,inputValue:lt.late_minus_score},onChange:function(Xe){jn(Object(p.a)(Object(p.a)({},lt),{},{late_minus_score:Xe.inputValue,penalty_type:Xe.type}))}})),n.a.createElement(Ze.a,{flex:"1",className:"ml5"},n.a.createElement("span",{className:"c-grey-c ml10"},lt.penalty_type===Ne.a.Number?"(\u8865\u4EA4\u65F6\u6309\u7167\u5B66\u751F\u603B\u6210\u7EE9\u6263\u5206)":"(\u5B66\u751F\u6210\u7EE9\u5C06\u6263\u9664\u8865\u4EA4\u5173\u5361\u5206\u503C\u7684\u767E\u5206\u6BD4)"))),n.a.createElement(ze.a,{align:"middle",className:"mt25 pl30"},n.a.createElement(Ze.a,null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4:"),n.a.createElement(Ze.a,{className:"ml5"},n.a.createElement(ce.a,{allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:G()(Object(_.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:Lt||Rn,value:lt.late_time?G()(lt.late_time):"",disabledDate:function(Xe){return Object(xt.b)(Xe,je==null?void 0:je.course_end_date)},disabledTime:function(Xe){return Object(xt.c)(Xe)},onChange:function(Xe,kt){lt.late_time=kt,jn(Object.assign({},lt))}})),n.a.createElement(Ze.a,null,n.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u201C\u5EF6\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u7684\u65F6\u95F4\u622A\u70B9)")))):St.map(function(Rt,Xe){var kt;return n.a.createElement(Ze.a,{span:24,key:Xe},n.a.createElement(ze.a,{className:"mt25"},n.a.createElement(Ze.a,{style:{marginLeft:30}},n.a.createElement("span",null,"\u8865\u4EA4\u89C4\u5219",Xe+1,"\uFF1A"),n.a.createElement(yt.a,{disabled:Lt||!(ht!=null&&(kt=ht.homework_status)!==null&&kt!==void 0&&kt.includes("\u672A\u53D1\u5E03"))&&Rt.id||(je==null?void 0:je.anonymous_comment),mode:"multiple",style:{width:306},value:typeof Rt.group_name=="string"?[Rt.group_name]:Rt.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(an){St[Xe].group_name=an,St[Xe].group_id=Rt.group_id,Un(St.slice())}},je.group_settings&&je.group_settings.map(function(Pt){if(lt!=null&<.unified_setting&&!St.map(function(an){return an.group_name}).toString().split(",").includes(String(Pt.group_name)))return n.a.createElement(vn,{value:Pt.group_name,key:Pt.id},Pt.group_name);if(Pn.map(function(an){return an.group_name}).toString().split(",").includes(String(Pt.group_name))&&(!St.map(function(an){return an.group_name}).toString().split(",").includes(String(Pt.group_name))&&G()(Pt.end_time)<=G()()))return n.a.createElement(vn,{value:Pt.group_name,key:Pt.id},Pt.group_name)}))),n.a.createElement(Ze.a,{className:"ml20"},n.a.createElement("span",null,"\u8865\u4EA4\u6263\u5206\uFF1A"),n.a.createElement(Ne.b,{disabled:Lt||bn(Rt.id),value:{type:Rt.penalty_type,inputValue:Rt.late_minus_score},onChange:function(an){St[Xe].late_minus_score=an.inputValue,St[Xe].penalty_type=an.type,Un(Object(xe.a)(St))}})),n.a.createElement(Ze.a,{className:"ml20"},n.a.createElement("span",null,"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\uFF1A"),n.a.createElement(ce.a,{disabled:Lt||bn(Rt.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:G()(Object(_.d)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:function(an){return Object(xt.b)(an,je==null?void 0:je.course_end_date)},disabledTime:function(an){return Object(xt.c)(an)},format:"YYYY-MM-DD HH:mm",value:Rt!=null&&Rt.late_time?G()(Rt.late_time):void 0,onChange:function(an,zn){St[Xe].late_time=zn,Un(Object(xe.a)(St))}})),!Lt&&n.a.createElement(Ze.a,{className:"ml20"},Xe>0&&!Rt.id&&n.a.createElement(Re.a,{onClick:function(){St=St.filter(function(an,zn){return Xe!==zn}),Un(St.slice()),setTimeout(function(){return Un(St.slice())},10)}}),n.a.createElement(At.a,{className:"c-green ml20",onClick:function(){Un(St.concat({penalty_type:Ne.a.Percent,late_minus_score:20}))}}))))})),n.a.createElement("div",{style:{height:100}}),!Lt&&n.a.createElement("div",{className:_e.a.btns},n.a.createElement(D.a,{type:"primary",loading:Dn,onClick:function(){return Jn()}},"\u63D0\u4EA4"),n.a.createElement(D.a,{type:"primary",ghost:!0,className:"ml20",onClick:function(){ct(!0),ln()}},"\u53D6\u6D88")))},ci=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn.effects}})(Mn);function $n(Bn,gn){for(var Tn=[],_n=Bn;_nG()(Ce.rank_forbidden_start),value:hn.rank_forbidden_start?G()(hn.rank_forbidden_start):"",onChange:function(Pt,an){hn.rank_forbidden_start=an,(hn.end_time==""||!hn.end_time)&&hn.unified_setting&&(hn.end_time=G()(Pt).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),yi(Object.assign({},hn))}})),n.a.createElement(Ze.a,null,n.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u770B\u4E0D\u5230\u6392\u884C\u699C\u7684\u5F00\u59CB\u65F6\u95F4)"))),n.a.createElement(ze.a,{align:"middle",className:"mt25"},n.a.createElement(Ze.a,null,"\u622A\u6B62\u65F6\u95F4"),n.a.createElement(Ze.a,{className:"ml10"},n.a.createElement(ce.a,{style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:G()(Object(_.d)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:et,disabledDate:bn,value:hn.rank_forbidden_end?G()(hn.rank_forbidden_end):"",onChange:function(Pt,an){hn.rank_forbidden_end=an,yi(Object.assign({},hn))}})),n.a.createElement(Ze.a,null,n.a.createElement("span",{className:"c-grey-c ml10"},"(\u5B66\u751F\u770B\u4E0D\u5230\u6392\u884C\u699C\u7684\u7ED3\u675F\u65F6\u95F4)"))))),console.log("----",Nn),!hn.unified_setting&&((Tn=Nn)===null||Tn===void 0?void 0:Tn.length)>0&&!!hn.rank_forbidden&&n.a.createElement(ze.a,{style:{marginTop:30,paddingTop:20,marginLeft:80,borderTop:"1px solid #eee"}},n.a.createElement(Ze.a,{span:24},n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{span:10}),n.a.createElement(Ze.a,{span:10},n.a.createElement(ze.a,{className:"c-grey-c ml30"},n.a.createElement(Ze.a,{flex:"1"},"(\u5B66\u751F\u770B\u4E0D\u5230\u6392\u884C\u699C\u7684\u5F00\u59CB\u65F6\u95F4)"),n.a.createElement(Ze.a,{flex:"1"},"(\u5B66\u751F\u770B\u4E0D\u5230\u6392\u884C\u699C\u7684\u7ED3\u675F\u65F6\u95F4)"))),n.a.createElement(Ze.a,{span:4}))),Ft.map(function(kt,Pt){var an,zn,Ln,oi,ei,Oi,mi;return n.a.createElement(Ze.a,{span:24,key:Pt},n.a.createElement(ze.a,{className:"mt25"},n.a.createElement(Ze.a,{style:{marginLeft:30}},n.a.createElement("span",null,"\u5C01\u699C\u89C4\u5219",Pt+1,"\uFF1A"),n.a.createElement(yt.a,{disabled:et||!(Te!=null&&(an=Te.homework_status)!==null&&an!==void 0&&an.includes("\u672A\u53D1\u5E03"))&&kt.id,mode:"multiple",style:{width:306},value:typeof kt.group_name=="string"?[kt.group_name]:kt.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:function(Ji){Ft[Pt].group_name=Ji,Ft[Pt].group_id=kt.group_id,St(Ft.slice())}},Ce.group_settings&&Ce.group_settings.map(function(bi){if(hn!=null&&hn.unified_setting&&!Ft.map(function(Ji){return Ji.group_name}).toString().split(",").includes(String(bi.group_name)))return n.a.createElement(Wi,{value:bi.group_name,key:bi.id},bi.group_name);if(Nn.map(function(Ji){return Ji.group_name}).toString().split(",").includes(String(bi.group_name))&&!Ft.map(function(Ji){return Ji.group_name}).toString().split(",").includes(String(bi.group_name)))return n.a.createElement(Wi,{value:bi.group_name,key:bi.id},bi.group_name)}))),n.a.createElement(Ze.a,{span:10},n.a.createElement("div",{className:"ml30"},n.a.createElement(Ti,{allowClear:!1,disabled:et||(Ce!=null&&(zn=Ce.group_settings)!==null&&zn!==void 0&&(Ln=zn.filter(function(bi){return bi.id===kt.id}))!==null&&Ln!==void 0&&(oi=Ln[0])!==null&&oi!==void 0&&oi.rank_forbidden_start?G()()0&&!kt.id&&n.a.createElement(Re.a,{onClick:function(){Ft=Ft.filter(function(Ji,Vi){return Pt!==Vi}),St(Ft.slice()),setTimeout(function(){return St(Ft.slice())},10)}}),n.a.createElement(At.a,{className:"c-green ml20",onClick:function(){St(Ft.concat({}))}}))))})),!et&&n.a.createElement("div",{className:_e.a.btns},n.a.createElement(D.a,{type:"primary",loading:Lt,onClick:function(){return Rt()}},"\u63D0\u4EA4"),n.a.createElement(D.a,{type:"primary",ghost:!0,className:"ml20",onClick:function(){Ot(!0),Rn()}},"\u53D6\u6D88"))),n.a.createElement(s.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:zt,onCancel:function(){return lt(!1)}},n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("label",{style:{width:"50px"}},"\u59D3\u540D\uFF1A")," ",n.a.createElement(jt.a.Search,{onChange:function(Pt){}})),n.a.createElement(Y.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(Pt,an){$t(Pt)}},pagination:!1,dataSource:[{name:"1"}],columns:[{title:"\u73ED\u7EA7",dataIndex:"name",key:"name"},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time",key:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time",key:"end_time"}]}))))},fi=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn.effects}})(hi),ji=function(gn){var Tn,_n=gn.shixunHomeworks,si=gn.loading,ai=gn.dispatch,J=Object(w.i)(),ue=_n.workSetting,Ce=_n.workList,Te=_n.changeData,qe=Object(a.useState)(!0),Oe=Object(r.a)(qe,2),Ve=Oe[0],et=Oe[1],Ot=Object(a.useState)(!1),Et=Object(r.a)(Ot,2),je=Et[0],ht=Et[1],it=Object(a.useState)(!1),st=Object(r.a)(it,2),bt=st[0],Lt=st[1],ct=mn.a.useForm(),Gt=Object(r.a)(ct,1),on=Gt[0],Dn=Object(a.useState)([]),Kn=Object(r.a)(Dn,2),wn=Kn[0],Nn=Kn[1],Pn=Object(a.useState)([]),Dt=Object(r.a)(Pn,2),sn=Dt[0],Ft=Dt[1],St=!(Ce!=null&&(Tn=Ce.homework_status)!==null&&Tn!==void 0&&Tn.includes("\u672A\u53D1\u5E03")),Un=Object(a.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,is_onpage_time:!0,training_time_rules:1,hack_settings:[],punish_time:void 0,hack_score_settings:void 0}),Sn=Object(r.a)(Un,2),zt=Sn[0],lt=Sn[1];Object(a.useEffect)(function(){return jn(),function(){Nn([].concat())}},[]);var jn=function(){ai({type:"shixunHomeworks/getWorkSetting",payload:Object(p.a)({},J)})};Object(a.useEffect)(function(){if(!(ue!=null&&ue.course_id))return;Object.keys(zt).map(function(On){zt[On]=ue[On]}),(!zt.allow_late||!zt.unified_late)&&(zt.late_penalty=5),wn=JSON.parse(JSON.stringify(ue.group_settings.map(function(On){return Object(p.a)(Object(p.a)({},On),{},{group_name:[On.group_name]})}).filter(function(On){return On.publish_time!==null}))),sn=JSON.parse(JSON.stringify(ue.allow_late_settings.map(function(On){return Object(p.a)(Object(p.a)({},On),{},{group_name:[On.group_name]})}).filter(function(On){return On.late_time!==null}))),$t(),lt(Object(p.a)({},zt)),Nn(Object(xe.a)(wn)),Ft(Object(xe.a)(sn))},[ue]);var ln=function(){var Fn=JSON.parse(JSON.stringify(zt));Jn(Fn)},Jn=function(Fn){if(console.log(Fn.total_score,Fn.eff_score),Fn.total_score===null){m.b.warn("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}var hn=function(){var yi=Object(f.a)(o.a.mark(function Rn(){var bn;return o.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return ht(!0),Xe.next=3,Object(R.a)("/api/homework_commons/".concat(J.categoryId,"/hack_score_setting.json"),{method:"post",body:Object(p.a)({},Fn)});case 3:bn=Xe.sent,bn.status===0&&(m.b.success("\u66F4\u65B0\u6210\u529F"),et(!0),jn(),ai({type:"shixunHomeworks/getWorkList",payload:Object(p.a)({},J)})),ht(!1);case 6:case"end":return Xe.stop()}},Rn)}));return function(){return yi.apply(this,arguments)}}();(zt==null?void 0:zt.hack_score_settings)!==(ue==null?void 0:ue.hack_score_settings)&&St?s.a.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:hn}):hn()},$t=function(){var Fn,hn=zt.total_score,yi=(Fn=zt.hack_settings)===null||Fn===void 0?void 0:Fn.length,Rn=0,bn;switch(zt.hack_score_settings){case 0:var Rt=(hn/yi).toFixed(2);zt.hack_settings.map(function(ei,Oi){Rn=Oi,ei.hack_score=Rt>0?Rt:0}),bn=(hn-Rt*(yi-1)).toFixed(2),zt.hack_settings[Rn].hack_score=bn>0?bn:0;break;case 1:var Xe=[0,1,3,6],kt=0,Pt=zt.hack_settings.filter(function(ei){return ei.difficult===1}).length*Xe[1],an=zt.hack_settings.filter(function(ei){return ei.difficult===2}).length*Xe[2],zn=zt.hack_settings.filter(function(ei){return ei.difficult===3}).length*Xe[3],Ln=hn/(Pt+an+zn);console.log(Ln,2222),zt.hack_settings.map(function(ei,Oi){Rn=Oi,ei.hack_score=(Xe[ei.difficult]*Ln).toFixed(2),kt=kt+Number(ei.hack_score)});var oi=zt.hack_settings[Rn].hack_score;bn=(hn-kt+Number(oi)).toFixed(2),zt.hack_settings[Rn].hack_score=bn>0?bn:0;break}};return n.a.createElement("section",{className:_e.a.form},n.a.createElement(ze.a,{align:"middle"},n.a.createElement(Ze.a,{flex:"1"}),n.a.createElement(Ze.a,null,(ue==null?void 0:ue.can_edit)&&n.a.createElement(D.a,{type:"primary",size:"middle",ghost:!0,onClick:function(){return et(!1)}},"\u7F16\u8F91\u8BBE\u7F6E"))),n.a.createElement(ze.a,{align:"middle"},n.a.createElement(Ze.a,null,n.a.createElement("span",null,"\u603B\u5206\u503C"),n.a.createElement(Je.a,{min:0,className:"ml10 mr10",style:{width:160},value:zt.total_score,disabled:Ve||St,onChange:function(Fn){zt.total_score=Fn,lt(Object.assign({},zt)),$t()}}),"\xA0\u5206"),n.a.createElement(Ze.a,{style:{marginLeft:100}},n.a.createElement("span",null,"\u6D4B\u8BC4\u5355\u6B21\u62A5\u9519\u589E\u52A0\u65F6\u957F"),n.a.createElement(Je.a,{className:"ml10 mr10",style:{width:160},min:0,value:zt.punish_time,precision:0,disabled:Ve,onChange:function(Fn){zt.punish_time=Fn,lt(Object.assign({},zt)),$t()}}),"\xA0\u5206\u949F")),n.a.createElement(ze.a,{align:"middle",style:{marginTop:20}},n.a.createElement(Ze.a,null,n.a.createElement("span",null,"\u8BD5\u9898\u5206\u503C\u8BBE\u7F6E\u89C4\u5219")),n.a.createElement(Ze.a,{flex:"1"},n.a.createElement(mn.a.Item,{className:"ml20"},n.a.createElement(be.a.Group,{disabled:Ve||St,value:zt.hack_score_settings,onChange:function(Fn){zt.hack_score_settings=Fn.target.value,lt(Object.assign({},zt)),$t()}},n.a.createElement(be.a,{value:0},"\u5747\u5206\u6BD4\u4F8B"),n.a.createElement(be.a,{className:"ml20 mr20",value:1},"\u96BE\u6613\u5EA6"),n.a.createElement(be.a,{value:2},"\u81EA\u5B9A\u4E49\u5206\u503C"))))),n.a.createElement("div",{className:_e.a.hackList},zt.hack_settings&&zt.hack_settings.map(function(On,Fn){return n.a.createElement(ze.a,{key:Fn,align:"middle",style:{marginTop:20}},n.a.createElement(Ze.a,{flex:"1",className:"pr10"},n.a.createElement("strong",null,On.hack_name)),n.a.createElement(Ze.a,{flex:"150px"},n.a.createElement(Je.a,{min:0,step:.1,value:On.hack_score,disabled:Ve||zt.hack_score_settings!==2||St,onChange:function(yi){zt.hack_settings[Fn].hack_score=yi;var Rn=zt.hack_settings.reduce(function(bn,Rt){return bn+Number(Rt.hack_score)},0);zt.total_score=Rn.toFixed(2),lt(Object(p.a)({},zt))}}),n.a.createElement("span",{className:"ml10"},"\u5206")),n.a.createElement(Ze.a,{style:{lineHeight:"20px"}},On.difficult===1&&n.a.createElement("span",{className:"tag-style-border-small bg-green c-white mr10"},"\u7B80\u5355"),On.difficult===2&&n.a.createElement("span",{className:"tag-style-border-small bg-blue c-white mr10"},"\u9002\u4E2D"),On.difficult===3&&n.a.createElement("span",{className:"tag-style-border-small bg-orange c-white mr10"},"\u56F0\u96BE")))})),n.a.createElement("div",{style:{height:100}}),!Ve&&n.a.createElement("div",{className:_e.a.btns},n.a.createElement(D.a,{type:"primary",loading:je,onClick:function(){return ln()}},"\u63D0\u4EA4"),n.a.createElement(D.a,{type:"primary",ghost:!0,className:"ml20",onClick:function(){et(!0),jn()}},"\u53D6\u6D88")))},er=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn.effects}})(ji),yr=function(gn){var Tn,_n,si=gn.shixunHomeworks,ai=gn.loading,J=gn.dispatch,ue=Object(a.useState)(!0),Ce=Object(r.a)(ue,2),Te=Ce[0],qe=Ce[1],Oe=Object(a.useState)(!1),Ve=Object(r.a)(Oe,2),et=Ve[0],Ot=Ve[1],Et=Object(a.useState)([]),je=Object(r.a)(Et,2),ht=je[0],it=je[1],st=Object(a.useState)([]),bt=Object(r.a)(st,2),Lt=bt[0],ct=bt[1],Gt=Object(a.useState)([]),on=Object(r.a)(Gt,2),Dn=on[0],Kn=on[1],wn=Object(a.useState)([]),Nn=Object(r.a)(wn,2),Pn=Nn[0],Dt=Nn[1],sn=Object(w.i)();function Ft(){return St.apply(this,arguments)}function St(){return St=Object(f.a)(o.a.mark(function lt(){var jn;return o.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Jn.next=2,Object(R.a)("/api/homework_commons/".concat(sn.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:jn=Jn.sent,ct(jn);case 4:case"end":return Jn.stop()}},lt)})),St.apply(this,arguments)}function Un(){return Sn.apply(this,arguments)}function Sn(){return Sn=Object(f.a)(o.a.mark(function lt(){var jn;return o.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Jn.next=2,Object(R.a)("/api/courses/".concat(sn==null?void 0:sn.coursesId,"/teachers"),{method:"get",params:{homework_id:sn.categoryId}});case 2:jn=Jn.sent,jn==null||jn.teacher_list.map(function($t){$t.key=$t.user_id}),Kn(jn==null?void 0:jn.teacher_list),Dt(jn==null?void 0:jn.teacher_list);case 6:case"end":return Jn.stop()}},lt)})),Sn.apply(this,arguments)}Object(a.useEffect)(function(){Ft(),Un()},[sn]);var zt=function(){};return n.a.createElement("section",{className:_e.a.form},n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{flex:"1"},n.a.createElement("span",{style:{fontSize:"16px"}},"\u534F\u4F5C\u8BBE\u7F6E"),(Lt==null?void 0:Lt.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){Ot(!0)}},"+\u6DFB\u52A0\u534F\u4F5C\u8005"))),n.a.createElement(ze.a,{style:{marginTop:"20px",marginBottom:"20px"}},(Lt==null||((Tn=Lt.data)===null||Tn===void 0)?void 0:Tn.length)<=0&&n.a.createElement(Z.a,{customText:"\u8BE5\u4F5C\u4E1A\u6682\u65E0\u534F\u4F5C\u8005"}),Lt==null||((_n=Lt.data)===null||_n===void 0)?void 0:_n.map(function(lt){return n.a.createElement("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px"}},n.a.createElement("span",{style:{flex:"1"}},lt==null?void 0:lt.real_name),(Lt==null?void 0:Lt.can_edit)&&n.a.createElement("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:Object(f.a)(o.a.mark(function jn(){var ln;return o.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,Object(R.a)("/api/homework_commons/".concat(sn.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:lt.id}});case 2:ln=$t.sent,ln.status===0&&(m.b.info("\u5220\u9664\u6210\u529F"),Ft(),Un());case 4:case"end":return $t.stop()}},jn)}))},"X"))})),n.a.createElement(ze.a,null,!Te&&n.a.createElement(Ze.a,{className:"mb50"},n.a.createElement(D.a,{type:"primary",size:"large",onClick:function(){return zt()}},"\u63D0\u4EA4"),n.a.createElement(D.a,{type:"primary",size:"large",ghost:!0,className:"ml20",onClick:function(){qe(!0)}},"\u53D6\u6D88"))),n.a.createElement(s.a,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",visible:et,onCancel:function(){return Ot(!1)},onOk:Object(f.a)(o.a.mark(function lt(){var jn;return o.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(!(ht.length===0)){Jn.next=3;break}return m.b.info("\u8BF7\u9009\u62E9\u534F\u4F5C\u8001\u5E08"),Jn.abrupt("return");case 3:return Jn.next=5,Object(R.a)("/api/homework_commons/".concat(sn.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:ht}});case 5:jn=Jn.sent,jn.status===0&&(m.b.info("\u6DFB\u52A0\u6210\u529F"),it([]),Ft(),Un(),Ot(!1));case 7:case"end":return Jn.stop()}},lt)}))},n.a.createElement("div",null,n.a.createElement("div",{style:{display:"flex"}},n.a.createElement("label",{style:{width:"50px"}},"\u59D3\u540D\uFF1A")," ",n.a.createElement(jt.a.Search,{onChange:function(jn){Kn(Pn.filter(function(ln){return ln.name.indexOf(jn.target.value)>-1}))}})),n.a.createElement(Y.a,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(jn,ln){it(jn)},selectedRowKeys:ht,getCheckboxProps:function(jn){return{disabled:jn.is_collaborator}}},pagination:!1,dataSource:Dn,columns:[{title:"\u59D3\u540D",dataIndex:"name",key:"name"},{title:"\u89D2\u8272",dataIndex:"role",key:"role"}]}))))},cn=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn.effects}})(yr),ri=ce.a.RangePicker,pr=yt.a.Option,Cr=function(gn){var Tn=gn.shixunHomeworks,_n=gn.loading,si=gn.dispatch;return n.a.createElement("section",{className:"bg-white pl30 pr30 pt10 mb10"},n.a.createElement(K.a,null,n.a.createElement(K.a.TabPane,{tab:"\u53D1\u5E03\u8BBE\u7F6E",key:1},n.a.createElement(ci,null)),n.a.createElement(K.a.TabPane,{tab:"\u8BC4\u5206\u8BBE\u7F6E",key:2},n.a.createElement(er,null)),n.a.createElement(K.a.TabPane,{tab:"\u516C\u5F00\u8BBE\u7F6E",key:3},n.a.createElement(fi,null)),n.a.createElement(K.a.TabPane,{tab:"\u534F\u4F5C\u8BBE\u7F6E",key:4},n.a.createElement(cn,null))))},tr=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn.effects}})(Cr),nr=I("RotF"),X=I.n(nr),S=function(gn){var Tn,_n=gn.shixunHomeworks,si=gn.loading,ai=gn.dispatch,J=Object(w.i)(),ue=Object(w.h)(),Ce=Object(a.useState)([]),Te=Object(r.a)(Ce,2),qe=Te[0],Oe=Te[1],Ve=Object(a.useState)([]),et=Object(r.a)(Ve,2),Ot=et[0],Et=et[1],je=Object(a.useState)(!0),ht=Object(r.a)(je,2),it=ht[0],st=ht[1],bt=Object(a.useState)(!1),Lt=Object(r.a)(bt,2),ct=Lt[0],Gt=Lt[1],on=Object(a.useState)(1),Dn=Object(r.a)(on,2),Kn=Dn[0],wn=Dn[1],Nn=Object(a.useState)([]),Pn=Object(r.a)(Nn,2),Dt=Pn[0],sn=Pn[1],Ft=Object(a.useState)(!1),St=Object(r.a)(Ft,2),Un=St[0],Sn=St[1],zt=Object(a.useState)(!1),lt=Object(r.a)(zt,2),jn=lt[0],ln=lt[1];Object(a.useEffect)(function(){_n.actionTabs.key==="\u4EE3\u7801\u67E5\u91CD"?(On.resetFields(),Oe([]),Sn(!0),hn()):Sn(!1)},[_n.actionTabs.key]);var Jn=mn.a.useForm(),$t=Object(r.a)(Jn,1),On=$t[0],Fn=[],hn=function(){var bn=Object(f.a)(o.a.mark(function Rt(){var Xe,kt,Pt;return o.a.wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:if(!(it&&!ct)){zn.next=11;break}return Gt(!0),wn(Kn+1),zn.next=5,Object(vt.x)(Object(p.a)(Object(p.a)({},J),{},{page:Kn}));case 5:kt=zn.sent,Pt=Object(xe.a)(kt.group_list),kt!=null&&kt.ungroup_list&&Pt.push({id:kt==null?void 0:kt.ungroup_list.id,name:kt==null?void 0:kt.ungroup_list.name,works_count:kt==null?void 0:kt.ungroup_list.work_count,last_review_time:kt==null?void 0:kt.ungroup_list.last_review_time}),Oe([].concat(Object(xe.a)(qe),Object(xe.a)(Pt))),Gt(!1),((Xe=kt.group_list)===null||Xe===void 0?void 0:Xe.length)<10&&st(!1);case 11:case"end":return zn.stop()}},Rt)}));return function(){return bn.apply(this,arguments)}}(),yi=function(){ai({type:"shixunHomeworks/setActionTabs",payload:{}}),ln(!1),st(!0),Gt(!1),wn(1),Oe([]),On.resetFields()},Rn=[{title:"",dataIndex:"id",width:280,render:function(Rt,Xe){return n.a.createElement(dt.a,{disabled:!(Xe.works_count>1),value:String(Xe.id)},Xe.name)}},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"works_count"},{title:"\u4E0A\u6B21\u67E5\u91CD\u65F6\u95F4",dataIndex:"last_review_time",width:130}];return n.a.createElement(s.a,{centered:!0,title:"\u4EE3\u7801\u67E5\u91CD",keyboard:!1,maskClosable:!1,visible:Un,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",width:820,bodyStyle:{minHeight:200},onOk:Object(f.a)(o.a.mark(function bn(){var Rt,Xe;return o.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return Rt=On.getFieldValue(),Pt.next=3,Object(R.a)("/api/homework_commons/".concat(J.categoryId,"/hack_homework_code_repeat.json"),{method:"post",body:{group_ids:Object(xe.a)(Rt.group_ids)}});case 3:if(Xe=Pt.sent,!(Xe.status===0)){Pt.next=11;break}return yi(),m.b.success("\u64CD\u4F5C\u6210\u529F"),Pt.next=9,ai({type:"shixunHomeworks/getWorkList",payload:_n.actionTabs.params});case 9:O.d.push("/classrooms/".concat(J.coursesId,"/program_homework/").concat(J.categoryId,"/detail?tabs=2")),ai({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6267\u884C\u4EE3\u7801\u67E5\u91CD"}});case 11:case"end":return Pt.stop()}},bn)})),onCancel:yi},_n.codeReviewCourse&&n.a.createElement(mn.a,{form:On,onChange:function(Rt){sn(Object(p.a)({},On.getFieldValue()))},initialValues:(Tn={},Object(Mt.a)(Tn,"group_ids",Fn),Object(Mt.a)(Tn,"end_time",G()(G()().add(7,"days").format("YYYY-MM-DD HH:mm"))),Tn)},n.a.createElement("div",{className:"flexd-table-header mt20"},n.a.createElement(Y.a,{pagination:!1,dataSource:[],columns:Rn})),n.a.createElement(mn.a.Item,{name:"group_ids"},n.a.createElement(dt.a.Group,{className:"w100"},n.a.createElement("div",{style:{width:"100%",maxHeight:260,overflow:"auto"}},n.a.createElement(X.a,{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(Rt){hn()},hasMore:it,useWindow:!1},n.a.createElement(Y.a,{loading:si.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:Rn,dataSource:qe,pagination:!1})))))),n.a.createElement(ze.a,null,n.a.createElement(Ze.a,{className:"ml10"},n.a.createElement(dt.a,{checked:jn,onChange:function(Rt){ln(Rt.target.checked);var Xe=[];Rt.target.checked&&(Xe=qe.filter(function(kt){return kt.works_count>1}).map(function(kt){return kt.id+""})),On.setFieldsValue(Object(Mt.a)({},"group_ids",Xe))}},"\u5168\u9009"))))},L=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading;return{shixunHomeworks:gn,loading:Tn}})(S),W=I("nPLb"),ne=I("XpUO"),Q=I("bTeP"),ke=I.n(Q),Vt=I("HBuW"),kn=I("NLgs"),Qn=I("m3rI"),nn=I("+92d"),ti=I.n(nn),qn=I("wwSX"),Li=I.n(qn),lr=I("zlzj"),ar=I.n(lr),Ki=I("deN7"),Pr=[ti.a,Li.a,ar.a],Vr=function(gn){var Tn,_n,si=gn.user,ai=Object(a.useState)(Object(p.a)(Object(p.a)({},Object(w.i)()),{},{page:1,per_page:10,rank_type:2,course_group:Object(V.s)()?[si.userInfo.course.course_group_id]:[]},Object(w.i)())),J=Object(r.a)(ai,2),ue=J[0],Ce=J[1],Te=Object(a.useState)([]),qe=Object(r.a)(Te,2),Oe=qe[0],Ve=qe[1],et=Object(a.useState)([]),Ot=Object(r.a)(et,2),Et=Ot[0],je=Ot[1],ht=Object(a.useState)([]),it=Object(r.a)(ht,2),st=it[0],bt=it[1],Lt=Object(a.useState)(!1),ct=Object(r.a)(Lt,2),Gt=ct[0],on=ct[1],Dn=Object(a.useState)([{title:"\u6392\u884C",dataIndex:"rank",width:100,fixed:"left",render:function(Ft,St,Un){return Ft<4?n.a.createElement("img",{src:Pr[Ft-1]}):Ft}},{title:"\u7528\u6237",dataIndex:"user_name",width:150,fixed:"left",key:"user_name",render:function(Ft,St,Un){return n.a.createElement("div",null,n.a.createElement("img",{style:{width:30,height:30,borderRadius:"50%",marginRight:10},src:Qn.a.IMG_SERVER+"/images/"+(St==null?void 0:St.image_url)}),Ft)}},{title:"\u5206\u73ED",dataIndex:"course_group",key:"course_group",ellipsis:!0,width:150,fixed:"left"},{title:"\u5B66\u53F7",dataIndex:"student_id",key:"student_id",width:150,ellipsis:!0,fixed:"left",render:function(Ft){return Ft||"- -"}},{title:"\u901A\u8FC7",dataIndex:"passed_count",width:100,fixed:"left",key:"passed_count"},{title:"\u5F97\u5206",dataIndex:"score",width:100,fixed:"left",key:"score"}]),Kn=Object(r.a)(Dn,2),wn=Kn[0],Nn=Kn[1];Object(a.useEffect)(function(){wn.splice(7);for(var sn=function(Sn){var zt,lt,jn,ln,Jn={};Jn.title=Oe!=null&&Oe.sent_type?n.a.createElement("span",null,"\u9898\u76EE"+(Sn+1)+"\uFF08".concat(Oe==null||((zt=Oe.question_data)===null||zt===void 0||((lt=zt[Sn])===null||lt===void 0))?void 0:lt.question_score,"\uFF09")):n.a.createElement("a",{onClick:Object(f.a)(o.a.mark(function $t(){var On,Fn,hn;return o.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,Object(R.a)("/api/problems/".concat(Oe==null||((On=Oe.question_data)===null||On===void 0||((Fn=On[Sn])===null||Fn===void 0))?void 0:Fn.identifier,"/start.json"),{method:"get"});case 2:hn=Rn.sent,hn&&(window.open("/myproblems/".concat(hn==null?void 0:hn.identifier,"?type=1")),localStorage.setItem("program_homework",[ue.coursesId,ue.categoryId]));case 4:case"end":return Rn.stop()}},$t)}))},"\u9898\u76EE"+(Sn+1)+"\uFF08".concat(Oe==null||((jn=Oe.question_data)===null||jn===void 0||((ln=jn[Sn])===null||ln===void 0))?void 0:ln.question_score,"\uFF09")),Jn.dataIndex="question_data",Jn.width=250,Jn.render=function($t,On){var Fn,hn,yi,Rn,bn;return n.a.createElement("div",null,($t==null||((Fn=$t[Sn])===null||Fn===void 0)?void 0:Fn.answer_question_time)&&n.a.createElement("div",null,n.a.createElement("span",{style:{cursor:"pointer"},className:"iconfont icon-shixun4 c-blue",onClick:Object(f.a)(o.a.mark(function Rt(){var Xe,kt,Pt,an,zn,Ln,oi,ei;return o.a.wrap(function(mi){for(;;)switch(mi.prev=mi.next){case 0:if($t!=null&&(Xe=$t[Sn])!==null&&Xe!==void 0&&Xe.open_code){mi.next=3;break}return m.b.info("\u6682\u4E0D\u5141\u8BB8\u67E5\u770B\u4EE3\u7801"),mi.abrupt("return");case 3:return mi.next=5,Object(R.a)("/api/courses/view_code.json",{method:"get",params:Object(p.a)(Object(p.a)({},ue),{},{id:ue.coursesId,homework_common_id:ue.categoryId,hack_user_code_id:$t==null||((kt=$t[Sn])===null||kt===void 0)?void 0:kt.hack_user_code_id})});case 5:ei=mi.sent,s.a.warning({icon:null,width:800,title:n.a.createElement("div",null,n.a.createElement("span",null,"\u4EE3\u7801"),n.a.createElement("span",null,"\u4F7F\u7528\u8BED\u8A00\uFF1A",$t==null||((Pt=$t[Sn])===null||Pt===void 0)?void 0:Pt.current_language),n.a.createElement("span",null,"\u8FD0\u884C\u5185\u5B58\uFF1A",$t==null||((an=$t[Sn])===null||an===void 0)?void 0:an.memory,"\uFF08KB\uFF09"),n.a.createElement("span",null,"\u8FD0\u884C\u65F6\u957F\uFF1A",$t==null||((zn=$t[Sn])===null||zn===void 0)?void 0:zn.run_time,"\uFF08ms\uFF09"),n.a.createElement("span",null,"\u5F97\u5206\uFF1A",$t==null||((Ln=$t[Sn])===null||Ln===void 0)?void 0:Ln.score)),content:n.a.createElement(Ki.a,{languages:[{language:$t==null||((oi=$t[Sn])===null||oi===void 0)?void 0:oi.language,code:ei==null?void 0:ei.code}],v:$t,shixunWorkReport:"shixunWorkReport",dispatch:"dispatch",autoHeight:!1,language:$t.language,game_id:$t.id,diff_code_count:$t.diff_code_count})});case 7:case"end":return mi.stop()}},Rt)}))}),n.a.createElement("span",{style:{margin:"0px 10px"}},($t==null||((hn=$t[Sn])===null||hn===void 0)?void 0:hn.answer_question_time)||"- -"),$t!=null&&(yi=$t[Sn])!==null&&yi!==void 0&&yi.submit_count?n.a.createElement(M.a,{title:"".concat(($t==null||((Rn=$t[Sn])===null||Rn===void 0)?void 0:Rn.submit_count)||0,"\u6B21\u5C1D\u8BD5\u51FA\u9519")},n.a.createElement("span",{style:{color:"red",marginRight:5},className:"iconfont icon-Bug"}),($t==null||((bn=$t[Sn])===null||bn===void 0)?void 0:bn.submit_count)||0):null))},wn.push(Jn)},Ft=0;Ft<(Oe==null||((St=Oe.question_data)===null||St===void 0)?void 0:St.length);Ft++){var St;sn(Ft)}Nn(Object(xe.a)(wn))},[Oe==null?void 0:Oe.question_data]),Object(a.useEffect)(function(){var sn;si!=null&&(sn=si.userInfo)!==null&&sn!==void 0&&sn.course&&(Object(V.s)()&&(ue.course_group=Object(V.s)()?[si.userInfo.course.course_group_id]:[],Ce(Object(p.a)({},ue))),Pn(1))},[si==null?void 0:si.userInfo]);function Pn(sn){return Dt.apply(this,arguments)}function Dt(){return Dt=Object(f.a)(o.a.mark(function sn(Ft){var St,Un,Sn,zt,lt,jn,ln;return o.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return on(!0),$t.next=3,Object(R.a)("/api/courses/rank_list.json",{method:"get",params:Object(p.a)(Object(p.a)({},ue),{},{id:ue.coursesId,rank_type:2,homework_common_id:ue.categoryId})});case 3:if(St=$t.sent,Ve(St),on(!1),Object(V.s)()?(Ft===1&&je([St==null||((Un=St.course_group)===null||Un===void 0||((Sn=Un[0])===null||Sn===void 0))?void 0:Sn.id]),St!=null&&St.my_rank?bt([St==null?void 0:St.my_rank].concat(Object(xe.a)(St==null?void 0:St.rank_list))):bt(Object(xe.a)(St==null?void 0:St.rank_list))):bt(Object(xe.a)(St==null?void 0:St.rank_list)),Ft===1){for(zt={title:n.a.createElement(M.a,{title:`\u603B\u8017\u65F6\u65F6\u4E3A\u505A\u9898\u901A\u8FC7\u65F6\u957F\u548C\u7F5A\u65F6\u65F6\u957F\u7684\u603B\u548C\uFF0C
\u7F5A\u65F6\u65F6\u957F=\u8BC4\u6D4B\u51FA\u9519\u6B21\u6570X\u8BBE\u7F6E\u7684\u7F5A\u65F6\uFF08\u5F53\u524D\u4E3A`.concat(St==null?void 0:St.punish_time,"\u5206\uFF09")},n.a.createElement("span",{style:{marginRight:3}},"\u603B\u8017\u65F6")," ",n.a.createElement("span",{style:{fontSize:"14px"},className:"iconfont icon-tishixiaowenhao c-blue"})),dataIndex:"finish_time",width:150,ellipsis:!0,fixed:"left",key:"finish_time"},wn.push(zt),lt=function(Fn){var hn,yi,Rn,bn,Rt={};Rt.title=St!=null&&St.sent_type?n.a.createElement("span",null,"\u9898\u76EE"+(Fn+1)+"\uFF08".concat(St==null||((hn=St.question_data)===null||hn===void 0||((yi=hn[Fn])===null||yi===void 0))?void 0:yi.question_score,"\uFF09")):n.a.createElement("a",{onClick:Object(f.a)(o.a.mark(function Xe(){var kt,Pt,an;return o.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(R.a)("/api/problems/".concat(St==null||((kt=St.question_data)===null||kt===void 0||((Pt=kt[Fn])===null||Pt===void 0))?void 0:Pt.identifier,"/start.json"),{method:"get"});case 2:an=Ln.sent,an&&(window.open("/myproblems/".concat(an==null?void 0:an.identifier,"?type=1")),localStorage.setItem("program_homework",[ue.coursesId,ue.categoryId]));case 4:case"end":return Ln.stop()}},Xe)}))},"\u9898\u76EE"+(Fn+1)+"\uFF08".concat(St==null||((Rn=St.question_data)===null||Rn===void 0||((bn=Rn[Fn])===null||bn===void 0))?void 0:bn.question_score,"\uFF09")),Rt.dataIndex="question_data",Rt.width=250,Rt.render=function(Xe,kt){var Pt,an,zn,Ln,oi;return n.a.createElement("div",null,(Xe==null||((Pt=Xe[Fn])===null||Pt===void 0)?void 0:Pt.answer_question_time)&&n.a.createElement("div",null,n.a.createElement("span",{style:{cursor:"pointer"},className:"iconfont icon-shixun4 c-blue",onClick:Object(f.a)(o.a.mark(function ei(){var Oi,mi,bi,Ji,Vi,$i,gr,vr;return o.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(Xe!=null&&(Oi=Xe[Fn])!==null&&Oi!==void 0&&Oi.open_code){Me.next=3;break}return m.b.info("\u6682\u4E0D\u5141\u8BB8\u67E5\u770B\u4EE3\u7801"),Me.abrupt("return");case 3:return Me.next=5,Object(R.a)("/api/courses/view_code.json",{method:"get",params:Object(p.a)(Object(p.a)({},ue),{},{id:ue.coursesId,homework_common_id:ue.categoryId,hack_user_code_id:Xe==null||((mi=Xe[Fn])===null||mi===void 0)?void 0:mi.hack_user_code_id})});case 5:vr=Me.sent,s.a.warning({icon:null,width:800,title:n.a.createElement("div",null,n.a.createElement("span",null,"\u4EE3\u7801"),n.a.createElement("span",null,"\u4F7F\u7528\u8BED\u8A00\uFF1A",Xe==null||((bi=Xe[Fn])===null||bi===void 0)?void 0:bi.current_language),n.a.createElement("span",null,"\u8FD0\u884C\u5185\u5B58\uFF1A",Xe==null||((Ji=Xe[Fn])===null||Ji===void 0)?void 0:Ji.memory,"\uFF08KB\uFF09"),n.a.createElement("span",null,"\u8FD0\u884C\u65F6\u957F\uFF1A",Xe==null||((Vi=Xe[Fn])===null||Vi===void 0)?void 0:Vi.run_time,"\uFF08ms\uFF09"),n.a.createElement("span",null,"\u5F97\u5206\uFF1A",Xe==null||(($i=Xe[Fn])===null||$i===void 0)?void 0:$i.score)),content:n.a.createElement(Ki.a,{languages:[{language:Xe==null||((gr=Xe[Fn])===null||gr===void 0)?void 0:gr.language,code:vr==null?void 0:vr.code}],v:Xe,shixunWorkReport:"shixunWorkReport",dispatch:"dispatch",autoHeight:!1,language:Xe.language,game_id:Xe.id,diff_code_count:Xe.diff_code_count})});case 7:case"end":return Me.stop()}},ei)}))}),n.a.createElement("span",{style:{margin:"0px 10px"}},(Xe==null||((an=Xe[Fn])===null||an===void 0)?void 0:an.answer_question_time)||"- -"),Xe!=null&&(zn=Xe[Fn])!==null&&zn!==void 0&&zn.submit_count?n.a.createElement(M.a,{title:"".concat((Xe==null||((Ln=Xe[Fn])===null||Ln===void 0)?void 0:Ln.submit_count)||0,"\u6B21\u5C1D\u8BD5\u51FA\u9519")},n.a.createElement("span",{style:{color:"red",marginRight:5},className:"iconfont icon-Bug"}),(Xe==null||((oi=Xe[Fn])===null||oi===void 0)?void 0:oi.submit_count)||0):null))},wn.push(Rt)},jn=0;jn<(St==null||((ln=St.question_data)===null||ln===void 0)?void 0:ln.length);jn++)lt(jn);Nn(Object(xe.a)(wn))}case 8:case"end":return $t.stop()}},sn)})),Dt.apply(this,arguments)}return console.log("----",wn),n.a.createElement("div",{style:{width:1200,margin:"0px auto"}},(Oe==null?void 0:Oe.message)==="\u5C01\u699C\u4E2D"?n.a.createElement(Z.a,{customText:"\u7B54\u9898\u65F6\u95F4\u8FDB\u5165\u5012\u8BA1\u65F6\uFF0C\u6682\u65F6\u5C01\u699C\uFF0C\u8BF7\u52A0\u901F\u7ADE\u6280\u901A\u5173\u7B54\u9898"}):n.a.createElement("div",{style:{background:"#fff",padding:20}},n.a.createElement("div",{style:{display:"inline-flex"}},n.a.createElement("label",null,"\u5206\u73ED\u60C5\u51B5\uFF1A"),Object(V.c)()&&n.a.createElement("div",{style:{flex:1}},n.a.createElement(dt.a.Group,{className:ke.a.checkboxgroup,value:Et,onChange:function(Ft){if(ue.type===1)je([]),ue.course_group=[],ue.page=1,Ce(Object(p.a)({},ue)),Pn();else if(ue.type===2){var St;je(["\u5168\u90E8"].concat()),ue.course_group=Oe==null||((St=Oe.course_group)===null||St===void 0)?void 0:St.map(function(Un){return Un.id}),ue.page=1,Ce(Object(p.a)({},ue)),Pn()}else je(Object(xe.a)(Ft.filter(function(Un){return Un!="\u5168\u90E8"}))),ue.course_group=Ft.filter(function(Un){return Un!="\u5168\u90E8"}),ue.page=1,Ce(Object(p.a)({},ue)),Pn()}},n.a.createElement(dt.a,{value:"\u5168\u90E8",onChange:function(Ft){Ft.target.checked?ue.type=2:ue.type=1}},"\u5168\u90E8\u5206\u73ED"),Oe==null||((Tn=Oe.course_group)===null||Tn===void 0)?void 0:Tn.map(function(sn,Ft){return n.a.createElement(dt.a,{onChange:function(Un){ue.type=3},value:sn.id},sn==null?void 0:sn.name)}))),Object(V.s)()&&n.a.createElement(be.a.Group,{onChange:function(Ft){Ft.target.value==="\u5168\u90E8"?(ue.course_group=[],ue.page=1,Ce(Object(p.a)({},ue)),Pn()):(ue.course_group=[Ft.target.value],ue.page=1,Ce(Object(p.a)({},ue)),Pn())},defaultValue:si.userInfo.course.course_group_id},n.a.createElement(be.a,{value:"\u5168\u90E8"},"\u5168\u90E8\u5206\u73ED"),Oe==null||((_n=Oe.course_group)===null||_n===void 0)?void 0:_n.map(function(sn,Ft){return n.a.createElement(be.a,{value:sn.id},sn.name)}))),Object(V.c)()&&n.a.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",marginTop:10}},n.a.createElement("span",{style:{fontSize:14,color:"#B1BACD"}},"\u6392\u884C\u89C4\u5219\uFF1A\u65F6\u95F4\u7ED3\u675F\u540E\u6B63\u5F0F\u5C01\u699C\uFF0C\u65F6\u95F4\u6BB5\u4E4B\u5916\u7684\u63D0\u4EA4\u4E0D\u8BA1\u5165\u6392\u884C\u3002 ",n.a.createElement("a",{onClick:function(){s.a.warning({title:"\u8BA1\u5206\u89C4\u5219",width:500,content:n.a.createElement("div",null,n.a.createElement("p",null,"\u6392\u540D\u89C4\u5219\uFF1A\u7ECF\u5178ACM\u89C4\u5219"),n.a.createElement("p",null,"AC\uFF08\u901A\u8FC7\u9898\u76EE\uFF09\u8D8A\u591A\uFF0C\u6392\u540D\u8D8A\u9760\u524D\u3002"),n.a.createElement("p",null,"AC\u76F8\u540C\uFF0C\u603B\u7528\u65F6\u8D8A\u5C11\uFF0C\u6392\u540D\u8D8A\u9760\u524D\u3002"),n.a.createElement("p",null,"\u603B\u7528\u65F6=\u2211\uFF08\u6BCF\u4E00\u4E2A\u9898\u76EE\u7684\u7528\u65F6\uFF09"),n.a.createElement("p",null,"\u6BCF\u4E00\u4E2A\u9898\u76EE\u7684\u7528\u65F6=\u6BD4\u8D5B\u5F00\u59CB\u5230\u63D0\u4EA4\u88AB\u901A\u8FC7\u7684\u65F6\u95F4+\u7F5A\u65F6"),n.a.createElement("p",null,"\u7F5A\u65F6=\uFF08\u901A\u8FC7\u524D\uFF09\u9519\u8BEF\u4EE3\u7801\u63D0\u4EA4\u6B21\u6570*\u6BCF\u6B21\u7F5A\u65F6"),n.a.createElement("p",null,"\u4E0D\u7B97\u7F5A\u65F6\u7684\u60C5\u51B5\uFF1A\u6CA1\u6709\u901A\u8FC7\u7684\u9898\u76EE\u3001\uFF08\u7CFB\u7EDF\uFF09\u5185\u90E8\u9519\u8BEF\u3001\u7F16\u8BD1\u9519\u8BEF"))})}},"\u70B9\u51FB\u67E5\u770B\u8BA1\u5206\u89C4\u5219")),n.a.createElement(D.a,{onClick:function(){Object(me.v)(Object(p.a)(Object(p.a)({},ue),{},{id:ue.coursesId,rank_type:2,homework_common_id:ue.categoryId}))}},"\u5BFC\u51FA")),n.a.createElement(h.a,{spinning:Gt},n.a.createElement(Y.a,{style:{marginTop:10},pagination:!1,scroll:{x:1200},rowClassName:function(Ft,St){return St===0&&Object(V.s)()&&ke.a.tables},dataSource:st,columns:wn})),n.a.createElement("div",{style:{width:"100%",textAlign:"center",marginTop:10}},n.a.createElement(v.a,{current:ue.page,pageSize:ue.per_page,total:Oe==null?void 0:Oe.count,hideOnSinglePage:!0,onChange:function(Ft,St){ue.page=Ft,ue.per_page=St,Ce(Object(p.a)({},ue)),Pn()}}))))},Ai=Object(O.a)(function(Bn){var gn=Bn.user;return{user:gn}})(Vr),wi=[{live:"A",gz:"0\u4E2A\u9519\u8BEF",ld:"0\u4E2A\u6F0F\u6D1E",gf:"0 - 5%"},{live:"B",gz:"\u81F3\u5C111\u4E2A\u6B21\u8981\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u6B21\u8981\u6F0F\u6D1E",gf:"6% - 10%"},{live:"C",gz:"\u81F3\u5C111\u4E2A\u4E3B\u8981\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u4E3B\u8981\u6F0F\u6D1E",gf:"11% - 20%"},{live:"D",gz:"\u81F3\u5C111\u4E2A\u4E25\u91CD\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u4E25\u91CD\u6F0F\u6D1E",gf:"21% - 50%"},{live:"E",gz:"\u81F3\u5C111\u4E2A\u5D29\u6E83\u9519\u8BEF",ld:"\u81F3\u5C111\u4E2A\u5D29\u6E83\u6F0F\u6D1E",gf:"\u8D85\u8FC750%"}],ir=function(gn){var Tn,_n=gn.shixunHomeworks,si=gn.globalSetting,ai=gn.loading,J=gn.dispatch,ue=Object(w.i)(),Ce=Object(w.h)(),Te=Object(w.g)(),qe=Object(a.useState)([]),Oe=Object(r.a)(qe,2),Ve=Oe[0],et=Oe[1],Ot=Object(a.useState)(Ce.query.tabs||"0"),Et=Object(r.a)(Ot,2),je=Et[0],ht=Et[1],it=Object(a.useState)({}),st=Object(r.a)(it,2),bt=st[0],Lt=st[1],ct=_n.workList,Gt=Object(a.useState)(!1),on=Object(r.a)(Gt,2),Dn=on[0],Kn=on[1],wn;ue.category=Ce.query.category_id,ue.order="work_score",ue.b_order="desc";var Nn=function(zt){ht(zt),zt==="0"&&J({type:"shixunHomeworks/getWorkList",payload:ue})},Pn=function(){s.a.confirm({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u4F60\u5728\u8BE5\u5B9E\u8BAD\u7684\u5B66\u4E60\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A\uFF0C\u65E0\u6CD5\u6062\u590D",n.a.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u91CD\u505A\uFF1F"),onOk:function(){var zt=Object(f.a)(o.a.mark(function jn(){var ln,Jn,$t;return o.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Jn=(ln=_n.workList)===null||ln===void 0?void 0:ln.myshixun_identifier,Fn.next=3,Object(vt.X)({id:Jn});case 3:$t=Fn.sent,$t&&(m.b.info(`\u5DF2\u6E05\u7A7A\u672C\u5B9E\u8BAD\u7684\u5B66\u4E60\u8BB0\u5F55
\u8BF7\u70B9\u51FB\u201C\u5F00\u542F\u6311\u6218\u201D\u91CD\u505A\u8BFE\u7A0B\u5B9E\u9A8C`),J({type:"shixunHomeworks/getWorkList",payload:bt}));case 5:case"end":return Fn.stop()}},jn)}));function lt(){return zt.apply(this,arguments)}return lt}()})},Dt=function Sn(zt){var lt;zt=(lt=zt)!==null&<!==void 0&<.includes(".json")?zt:"".concat(zt,".json"),s.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var jn=Object(f.a)(o.a.mark(function Jn(){var $t,On;return o.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(Vt.Bb)({url:zt});case 2:if($t=hn.sent,$t){hn.next=5;break}return hn.abrupt("return");case 5:return m.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),hn.next=8,Object(Vt.E)({id:$t.shixun_identifier});case 8:if(On=hn.sent,!(On!=null&&On.game_identifier)){hn.next=12;break}return Object(_.S)("/tasks/".concat(On.game_identifier,"?coursesId=").concat(ue.coursesId)),hn.abrupt("return");case 12:(On==null?void 0:On.status)===2?Sn(On==null?void 0:On.message):(On==null?void 0:On.status)===3&&sn(On==null?void 0:On.message);case 13:case"end":return hn.stop()}},Jn)}));function ln(){return jn.apply(this,arguments)}return ln}()})},sn=function(zt){s.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",zt,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Ft=function(){var Sn=Object(f.a)(o.a.mark(function zt(lt){var jn,ln;return o.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return lt=(jn=lt)!==null&&jn!==void 0&&jn.includes(".json")?lt:"".concat(lt,".json"),$t.next=3,Object(Vt.Bb)({url:lt});case 3:if(ln=$t.sent,console.log(ln,"execRes"),!(ln!=null&&ln.game_identifier)){$t.next=8;break}return Object(_.S)("/tasks/".concat(ln.game_identifier,"?coursesId=").concat(ue.coursesId)),$t.abrupt("return");case 8:(ln==null?void 0:ln.status)===-3?Object(_.q)():(ln==null?void 0:ln.status)===2?Dt(ln==null?void 0:ln.message):(ln==null?void 0:ln.status)===3&&sn(ln==null?void 0:ln.message);case 9:case"end":return $t.stop()}},zt)}));return function(lt){return Sn.apply(this,arguments)}}(),St=[{name:"\u4F5C\u4E1A\u5217\u8868",id:"0",compontent:n.a.createElement(Tt,{setExportParams:Lt}),forceRender:!0},{name:"\u4F5C\u4E1A\u8BE6\u60C5",id:"1",compontent:n.a.createElement(Ye,null)},{name:"\u6392\u884C\u699C",id:"5",compontent:n.a.createElement(Ai,null)},{name:"\u4EE3\u7801\u67E5\u91CD",id:"2",compontent:n.a.createElement(Qt,null)},{name:Object(V.c)()?"\u9AD8\u7EA7\u8BBE\u7F6E":"\u5F97\u5206\u89C4\u5219",id:"3",compontent:n.a.createElement(tr,null)},{name:n.a.createElement("a",{style:{color:"#b9b8b8"},href:"/classrooms/".concat(ue.coursesId,"/program_homework/").concat(ue.categoryId,"/answer")},"\u89E3\u7B54&\u8BA8\u8BBA"),id:"6",compontent:!1}].filter(function(Sn){var zt;if(Object(V.s)())return Sn.name!=="\u4EE3\u7801\u67E5\u91CD";if(Object(V.s)()||(ct==null||((zt=ct.homework_status)===null||zt===void 0)?void 0:zt[0])!=="\u5DF2\u622A\u6B62")return Sn.name!=="\u8D28\u91CF\u68C0\u6D4B";var lt;return!ct.code_review&&(ct==null||((lt=ct.homework_status)===null||lt===void 0)?void 0:lt[0])!=="\u672A\u53D1\u5E03"?!0:Sn.name!=="\u4EE3\u7801\u67E5\u91CD"}).filter(function(Sn){return ct.open_code_quality_analysis?!0:Sn.name!=="\u8D28\u91CF\u68C0\u6D4B"}),Un=function(){var zt,lt,jn,ln,Jn,$t,On,Fn;return n.a.createElement("aside",{className:ke.a.workListTabButton},Object(V.s)()&&((zt=_n.workList)===null||zt===void 0?void 0:zt.redo_work)&&n.a.createElement(D.a,{onClick:Pn,type:"primary",icon:n.a.createElement("i",{className:"iconfont icon-dahuizhongzuo3x"})},"\u91CD\u505A"),((lt=_n.workList)===null||lt===void 0?void 0:lt.shixun_status)>1&&((jn=_n.workList)===null||jn===void 0?void 0:jn.time_status)<5&&Object(V.s)()&&n.a.createElement(D.a,{type:"primary",icon:n.a.createElement("i",{className:"iconfont icon-kaiqizhong"}),onClick:function(){var yi,Rn,bn,Rt,Xe,kt,Pt;if(!Object(kn.e)(J,!0))return;(yi=_n.workList)!==null&&yi!==void 0&&(Rn=yi.task_operation)!==null&&Rn!==void 0&&(bn=Rn[1])!==null&&bn!==void 0&&bn.includes("/")?Ft((Rt=_n.workList)===null||Rt===void 0||((Xe=Rt.task_operation)===null||Xe===void 0)?void 0:Xe[1]):Object(_.S)("/tasks/".concat((kt=_n.workList)===null||kt===void 0||((Pt=kt.task_operation)===null||Pt===void 0)?void 0:Pt[1]))}},(ln=_n.workList)===null||ln===void 0||((Jn=ln.task_operation)===null||Jn===void 0)?void 0:Jn[0]),(($t=_n.workList)===null||$t===void 0?void 0:$t.commit_des)&&n.a.createElement(D.a,{type:"primary",icon:n.a.createElement("i",{className:"iconfont icon-tijiaozongjie"}),onClick:function(){var yi;Object(_.S)("/classrooms/".concat(ue.coursesId,"/shixun_homework/").concat(ue.categoryId,"/").concat((yi=_n.workList)===null||yi===void 0?void 0:yi.id,"/commitsummary"))}},(On=_n.workList)===null||On===void 0?void 0:On.commit_des),Object(V.c)()&&(ct==null||((Fn=ct.homework_status)===null||Fn===void 0)?void 0:Fn[0])==="\u672A\u53D1\u5E03"&&n.a.createElement(D.a,{type:"primary",icon:n.a.createElement("i",{className:"iconfont icon-bianji2"}),onClick:function(){Te.push("/classrooms/".concat(ue.coursesId,"/program_homework/").concat(ue.categoryId,"/edit"))}},"\u7F16\u8F91\u4F5C\u4E1A"),Object(V.c)()&&ct.publish_immediately&&n.a.createElement(D.a,{type:"primary",icon:n.a.createElement("i",{className:"iconfont icon-yishezhifabushijian1"}),onClick:function(){J({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u53D1\u5E03",selectArrs:[ue.categoryId],selectArrsAll:[ct],params:ue,detail:!0,type:2}})}},"\u7ACB\u5373\u53D1\u5E03"),Object(V.c)()&&ct.end_immediately&&n.a.createElement(D.a,{style:{background:"#0152d9",color:"#fff"},type:"primary",icon:n.a.createElement("i",{className:"iconfont icon-jiezhishiyan"}),onClick:function(){J({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u622A\u6B62",params:ue,type:2,detail:!0,selectArrs:[ue.categoryId]}})}},"\u7ACB\u5373\u622A\u6B62"))};return n.a.createElement("section",null,n.a.createElement("div",{className:"edu-container"},ct.homework_name&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:"mt10"},ct.category&&n.a.createElement(P.a,{separator:">"},n.a.createElement(P.a.Item,null,n.a.createElement(x.a,{to:"/classrooms/".concat(ct.course_id,"/program_homework")},ct.course_name)),n.a.createElement(P.a.Item,null,n.a.createElement(x.a,{to:"/classrooms/".concat(ct.course_id,"/program_homework/").concat(ct.category.main?"":ct.category.category_id)},ct.category.category_name)),n.a.createElement(P.a.Item,null,"\u4F5C\u4E1A\u8BE6\u60C5"))),n.a.createElement("aside",{className:[ke.a.title,"mt20"].join(" ")},n.a.createElement(x.a,{to:"/classrooms/".concat(ct.course_id,"/program_homework/").concat(ct.category.main?"":ct.category.category_id)},n.a.createElement(C.a,{className:"font16 c-black"})),n.a.createElement(M.a,{title:ct.homework_name,placement:"bottom"},n.a.createElement("strong",{className:"font20 ml5"},ct.homework_name)),n.a.createElement(_.m,{temporary:!0,status:ct.homework_status}),Object(V.s)()&&n.a.createElement("span",{style:{fontWeight:800,color:"#0152d9",textAlign:"end",flex:1,cursor:"pointer"}},n.a.createElement(D.a,{onClick:Object(f.a)(o.a.mark(function Sn(){var zt,lt;return o.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,Object(R.a)("/api/problems/".concat((zt=_n.workList)===null||zt===void 0?void 0:zt.start_identifier,"/start.json"),{method:"get"});case 2:lt=ln.sent,lt&&(window.open("/myproblems/".concat(lt==null?void 0:lt.identifier,"?type=1")),localStorage.setItem("program_homework",[ue.coursesId,ue.categoryId]));case 4:case"end":return ln.stop()}},Sn)})),type:"primary"},(Tn=ct.homework_status)!==null&&Tn!==void 0&&Tn.includes("\u5DF2\u622A\u6B62")?"\u67E5\u770B\u4F5C\u4E1A":"\u8FDB\u5165\u7EC3\u4E60"," ")))),n.a.createElement("aside",{className:"mt30 relative ".concat(ke.a.workListTabWrap)},n.a.createElement(K.a,{type:"card",defaultActiveKey:je,activeKey:je,tabBarExtraContent:Un(),onChange:Nn},St.map(function(Sn,zt){return n.a.createElement(K.a.TabPane,{tab:Sn.name,key:Sn.id,forceRender:Sn.forceRender},Sn.compontent)})))),n.a.createElement(L,null),n.a.createElement(W.a,{courseEndTime:ct==null?void 0:ct.course_end_date}),n.a.createElement(ne.a,{courseEndTime:ct==null?void 0:ct.course_end_date}),n.a.createElement(s.a,{visible:Dn,title:"\u89C4\u5219\u8BF4\u660E",width:800,footer:null,onCancel:function(){Kn(!1)}},n.a.createElement("p",null,"\u4E00\u3001\u7B49\u7EA7\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"1. \u7F3A\u9677\u7B49\u7EA7"),n.a.createElement("p",{style:{marginLeft:"10px"}},n.a.createElement(Y.a,{dataSource:wi,columns:[{title:"\u7B49\u7EA7",dataIndex:"live"},{title:"\u7F3A\u9677\u8BC4\u4F30\u89C4\u5219",dataIndex:"gz"},{title:"\u6F0F\u6D1E\u8BC4\u4F30\u89C4\u5219",dataIndex:"ld"},{title:"\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219",dataIndex:"gf"}],pagination:!1})),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6CE8\uFF1A\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219\u4E2D\u6570\u503C\u6765\u6E90\u4E3A\u8BA1\u7B97\u6280\u672F\u503A\u52A1\u65F6\u95F4\u5360\u5F00\u53D1\u6240\u6709\u4EE3\u7801\u6240\u9700\u8981\u7684\u65F6\u95F4\u7684\u6BD4\u4F8B\uFF08Technical Debt Ratio\uFF09"),n.a.createElement("p",{style:{marginLeft:"20px"}},"Technical Debt Ratio = \u6280\u672F\u503A\u52A1\u65F6\u95F4 / \u5F00\u53D1\u65F6\u95F4"),n.a.createElement("p",{style:{marginLeft:"20px"}},"\u6280\u672F\u503A\u52A1\u65F6\u95F4\u4E3A\u4FEE\u590D\u6240\u6709\u95EE\u9898\u6240\u9700\u8981\u7684\u65F6\u95F4\u3002"),n.a.createElement("p",null,"\u4E8C\u3001\u590D\u6742\u5EA6\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6839\u636E\u4EE3\u7801\u8DEF\u5F84\u6570\u8BA1\u7B97\u7684\u6570\u503C\uFF0C\u6BCF\u5F53\u4E00\u4E2A\u51FD\u6570\u7684\u63A7\u5236\u6D41\u5206\u53C9\u65F6\uFF0C\u590D\u6742\u5EA6\u8BA1\u6570\u5668\u5C31\u4F1A\u81EA\u589E\u4E00\u3002"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6BCF\u4E2A\u7A0B\u5E8F\u8BED\u8A00\u7684\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u590D\u6742\u5EA6\u6570\u636E\u4E0D\u540C\uFF0C\u4F46\u6BCF\u4E2A\u51FD\u6570\u7684\u6700\u5C0F\u590D\u6742\u5EA6\u4E3A1\u3002\uFF08\u7279\u5B9A\u8BED\u8A00\u7684\u8BE6\u7EC6\u6570\u636E\u7565\uFF09"),n.a.createElement("p",null,"\u4E09\u3001\u4EE3\u7801\u8D28\u91CF\u5206\u89C4\u5219"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u4EE3\u7801\u8D28\u91CF\u5206 = 0.5*\u7F3A\u9677\u5206\u6570 + 0.3*\u6F0F\u6D1E\u5206\u6570 + 0.2*\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u5176\u4E2D\uFF1A"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u7F3A\u9677/\u6F0F\u6D1E/\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570\u8BA1\u7B97\u89C4\u5219\u4E3A\uFF1A100 - 100 *((100*\u5D29\u6E83\u6570 + 5*\u4E25\u91CD\u6570 + 3*\u4E3B\u8981\u6570 + 1*\u6B21\u6570\uFF09/ \u4EE3\u7801\u884C\u6570\uFF09"),n.a.createElement("p",{style:{marginLeft:"10px"}},"\u6CE8\uFF1A\u5206\u6570\u4E3A\u7A7A\u7684\u4EE3\u8868\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u683C\u5F0F\u3002")))},Fi=Qe.default=Object(O.a)(function(Bn){var gn=Bn.shixunHomeworks,Tn=Bn.loading,_n=Bn.globalSetting;return{shixunHomeworks:gn,globalSetting:_n,loading:Tn.effects}})(ir)},OLES:function(tn,Qe,I){"use strict";var te=I("U8pU"),Y=I("VTBJ"),N=I("Ff2n"),K=I("q1tI"),A=I("uciX"),M=I("7ixt"),H=function(f){var d=f.overlay,s=f.prefixCls,r=f.id,u=f.overlayInnerStyle;return K.createElement("div",{className:"".concat(s,"-inner"),id:r,role:"tooltip",style:u},typeof d=="function"?d():d)},P=H,k=function(f,d){var s=f.overlayClassName,r=f.trigger,u=r===void 0?["hover"]:r,o=f.mouseEnterDelay,a=o===void 0?0:o,n=f.mouseLeaveDelay,R=n===void 0?.1:n,w=f.overlayStyle,x=f.prefixCls,O=x===void 0?"rc-tooltip":x,C=f.children,_=f.onVisibleChange,y=f.afterVisibleChange,h=f.transitionName,c=f.animation,v=f.placement,p=v===void 0?"right":v,E=f.align,U=E===void 0?{}:E,F=f.destroyTooltipOnHide,z=F===void 0?!1:F,G=f.defaultVisible,B=f.getTooltipContainer,T=f.overlayInnerStyle,V=Object(N.a)(f,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Z=Object(K.useRef)(null);Object(K.useImperativeHandle)(d,function(){return Z.current});var oe=Object(Y.a)({},V);"visible"in f&&(oe.popupVisible=f.visible);var pe=function(){var Ke=f.arrowContent,be=Ke===void 0?null:Ke,de=f.overlay,nt=f.id;return[K.createElement("div",{className:"".concat(O,"-arrow"),key:"arrow"},be),K.createElement(P,{key:"content",prefixCls:O,id:nt,overlay:de,overlayInnerStyle:T})]},Ye=!1,xe=!1;if(typeof z=="boolean")Ye=z;else if(z&&Object(te.a)(z)==="object"){var Ie=z.keepParent;Ye=Ie===!0,xe=Ie===!1}return K.createElement(A.a,Object.assign({popupClassName:s,prefixCls:O,popup:pe,action:u,builtinPlacements:M.a,popupPlacement:p,ref:Z,popupAlign:U,getPopupContainer:B,onPopupVisibleChange:_,afterPopupVisibleChange:y,popupTransitionName:h,popupAnimation:c,defaultPopupVisible:G,destroyPopupOnHide:Ye,autoDestroy:xe,mouseLeaveDelay:R,popupStyle:w,mouseEnterDelay:a},oe),C)},D=Object(K.forwardRef)(k),b=Qe.a=D},OZM5:function(tn,Qe,I){"use strict";I.d(Qe,"b",function(){return D}),I.d(Qe,"a",function(){return b}),I.d(Qe,"k",function(){return m}),I.d(Qe,"h",function(){return f}),I.d(Qe,"i",function(){return d}),I.d(Qe,"g",function(){return s}),I.d(Qe,"c",function(){return r}),I.d(Qe,"d",function(){return u}),I.d(Qe,"j",function(){return n}),I.d(Qe,"e",function(){return R}),I.d(Qe,"f",function(){return w});var te=I("KQm4"),Y=I("U8pU"),N=I("Ff2n"),K=I("q1tI"),A=I.n(K),M=I("Kwbf"),H=I("WaYH"),P=.25,k=2;function D(x,O){var C=x.slice(),_=C.indexOf(O);return _>=0&&C.splice(_,1),C}function b(x,O){var C=x.slice();return C.indexOf(O)===-1&&C.push(O),C}function m(x){return x.split("-")}function f(x,O){return"".concat(x,"-").concat(O)}function d(x){return x&&x.type&&x.type.isTreeNode}function s(x,O){var C=[x],_=O[x];function y(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];h.forEach(function(c){var v=c.key,p=c.children;C.push(v),y(p)})}return y(_.children),C}function r(x,O){var C=x.clientY,_=O.selectHandle.getBoundingClientRect(),y=_.top,h=_.bottom,c=_.height,v=Math.max(c*P,k);return C<=y+v?-1:C>=h-v?1:0}function u(x,O){if(!x)return;var C=O.multiple;return C?x.slice():x.length?[x[0]]:x}var o=function(O){return O};function a(x,O){if(!x)return[];var C=O||{},_=C.processProps,y=_===void 0?o:_,h=Array.isArray(x)?x:[x];return h.map(function(c){var v=c.children,p=Object(N.a)(c,["children"]),E=a(v,O);return A.a.createElement(H.a,Object.assign({},y(p)),E)})}function n(x){if(!x)return null;var O;if(Array.isArray(x))O={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(Y.a)(x)==="object")O={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(M.a)(!1,"`checkedKeys` is not an array or an object"),null;return O}function R(x,O){var C=new Set;function _(y){if(C.has(y))return;var h=O[y];if(!h)return;C.add(y);var c=h.parent,v=h.node;if(v.disabled)return;c&&_(c.key)}return(x||[]).forEach(function(y){_(y)}),Object(te.a)(C)}function w(x){var O={};return Object.keys(x).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(O[C]=x[C])}),O}},Ot1p:function(tn,Qe,I){"use strict";var te=I("2qtc"),Y=I("kLXV"),N=I("rAM+"),K=I("miYZ"),A=I("tsqr"),M=I("9og8"),H=I("tJVT"),P=I("jrin"),k=I("WmNS"),D=I.n(k),b=I("q1tI"),m=I.n(b),f=I("VrN/"),d=I.n(f),s=I("bdgK"),r=I("p77/"),u=I("Bd2K"),o=I("ELLl"),a=I("19Vz"),n=I("lZu9"),R=I("+NIl"),w=I("kSUc"),x=I("9Bee"),O=function(me){var Be=me.value,Tt=Be===void 0?"":Be,Jt=me.className,En=me.showTextOnly,mt=me.showLines,Qt=me.style,gt=Qt===void 0?{}:Qt,yt=Object(b.useMemo)(function(){return""},[Tt]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:yt}}))},C=I("0Owb"),_=I("dejd"),y=I("C+DQ"),h=I("1vsH"),c=I("m3rI"),v=[{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 p(me){var Be=me.onActionCallback,Tt=me.title,Jt=me.icon,En=me.actionName,mt=me.className,Qt=mt===void 0?"":mt,gt=me.children;function yt(){Be(En)}return m.a.createElement("a",{title:Tt,className:Qt,onClick:yt},m.a.createElement("i",{className:"md-iconfont ".concat(Jt)}),gt)}var E=function(me){var Be=me.watch,Tt=me.showNullButton,Jt=me.onActionCallback,En=me.fullScreen,mt=me.insertTemp,Qt=me.hidetoolBar,gt=me.uuid,yt=me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(h.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(h.F)("_educoder_session"),"&key=").concat(gt,"&api=").concat(encodeURIComponent(c.a.PROXY_SERVER)));var rt=[].concat(v,[{title:"".concat(Be?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Be?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!Qt&&rt.map(function(ce,Re){return m.a.createElement("li",{key:Re},ce.actionName?m.a.createElement(p,Object(C.a)({},ce,{onActionCallback:Jt})):m.a.createElement("span",{className:"v-line"}))}),Tt?m.a.createElement("li",null,m.a.createElement(p,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Jt},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,mt&&m.a.createElement("li",null,m.a.createElement(p,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(mt),onActionCallback:Jt},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(p,{icon:"".concat(En?"icon-shrink":"icon-enlarge"),title:En?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Jt})))},U=I("M8RZ"),F=I("+L6B"),z=I("2/Rp"),G=I("y8nQ"),B=I("Vl3Y"),T=I("5NDa"),V=I("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},oe=function(me){var Be=me.callback,Tt=me.onCancel;function Jt(En){Be(En)}return m.a.createElement(B.a,Object(C.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Jt}),m.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(V.a,null)),m.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(V.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(z.a,{type:"ghost",onClick:Tt},"\u53D6\u6D88")))},pe=I("7ahc"),Ye=I("HmJG"),xe=I("BjJ7"),Ie=B.a.useForm,Je={width:280,marginRight:10},Ke={labelCol:{span:5},wrapperCol:{span:19}},be=function(me){var Be=me.callback,Tt=me.onCancel,Jt=Ie(),En=Object(H.a)(Jt,1),mt=En[0];function Qt(rt){Be(rt)}function gt(rt,ce){if(rt.status===-1){A.b.error(rt.message);return}mt.setFieldsValue({src:"/api/attachments/".concat(rt.id),type:ce.type})}function yt(rt){var ce=rt.target.files[0];nt(ce,gt)}return m.a.createElement(B.a,Object(C.a)({form:mt},Ke,{className:"upload-image-panel",onFinish:Qt}),m.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(V.a,{style:Je})),m.a.createElement(de,{onFileChange:yt}))),m.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(V.a,{style:{width:264}})),m.a.createElement(B.a.Item,{style:{textAlign:"right"}},m.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(z.a,{type:"ghost",onClick:Tt},"\u53D6\u6D88")))};function de(me){var Be=me.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Be}))}function nt(me,Be){if(!me)throw new String("\u6CA1\u6709\u6587\u4EF6");var Tt=new FormData;Tt.append("editormd-image-file",me),Tt.append("file_param_name","editormd-image-file"),Tt.append("byxhr","true");var Jt=new window.XMLHttpRequest;Jt.withCredentials=!0,Jt.addEventListener("load",function(En){Be(JSON.parse(En.target.responseText),me)},!1),Jt.addEventListener("error",function(En){console.error(En)},!1),Jt.open("POST","".concat(xe.a,"/api/attachments.json")),Jt.send(Tt)}var Kt=I("giR+"),jt=I("fyUT"),wt=I("7Kak"),ze=I("9yH6"),ft=ze.a.Group,dt={margin:"0 8px"},Nt=function(me){var Be=me.callback,Tt=me.onCancel;function Jt(En){Be(En)}return m.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Jt},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:dt},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:dt},"\u884C\u6570"),m.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(jt.a,null)),m.a.createElement("span",{style:dt},"\u5217\u6570"),m.a.createElement(B.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(jt.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:dt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(B.a.Item,{name:"align"},m.a.createElement(ft,null,m.a.createElement(ze.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(ze.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(ze.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(ze.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(z.a,{type:"ghost",onClick:Tt},"\u53D6\u6D88")))},Ze=I("ErOA"),Bt=I("7Cbv"),Ut="link",Mt="upload-image",An="code-block",mn="add-table",pn="------------",tt={default:pn,left:":".concat(pn),center:":".concat(pn,":"),right:"".concat(pn,":")},fn=I("9VGf"),In,He;function Ue(){}var pt=0,Ct=1e4,Ge="\u2581",vt=`
**\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 Ae(me){return/^\d+$/.test(me)?"".concat(me,"px"):me}var ge=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ee=ge?"Cmd":"Ctrl",ae=["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"],re=(In={},Object(P.a)(In,Ee+"-B","bold"),Object(P.a)(In,Ee+"-I","italic"),In),he=(He={},Object(P.a)(He,Ut,"\u6DFB\u52A0\u94FE\u63A5"),Object(P.a)(He,An,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(P.a)(He,Mt,"\u6DFB\u52A0\u6587\u4EF6"),Object(P.a)(He,mn,"\u6DFB\u52A0\u8868\u683C"),He),ve=Qe.a=function(me){var Be=me.defaultValue,Tt=Be===void 0?"":Be,Jt=me.onChange,En=me.width,mt=En===void 0?"100%":En,Qt=me.height,gt=Qt===void 0?400:Qt,yt=me.miniToolbar,rt=yt===void 0?!1:yt,ce=me.isFocus,Re=ce===void 0?!1:ce,At=me.watch,ot=me.insertTemp,Yt=me.mode,rn=Yt===void 0?"markdown":Yt,_e=me.id,Ne=_e===void 0?"markdown-editor-id":_e,xt=me.showResizeBar,Xt=xt===void 0?!1:xt,vn=me.noStorage,Mn=vn===void 0?!1:vn,ci=me.showNullButton,$n=ci===void 0?!1:ci,Cn=me.hidetoolBar,Ti=Cn===void 0?!1:Cn,Wi=me.fullScreen,hi=Wi===void 0?!1:Wi,fi=me.onBlur,ji=me.onCMBeforeChange,er=me.onFullScreen,yr=me.className,cn=yr===void 0?"":yr,ri=me.disablePaste,pr=ri===void 0?!1:ri,Cr=me.placeholder,tr=Cr===void 0?"":Cr,nr=me.values,X=nr===void 0?"":nr,S=Object(b.useState)(null),L=Object(H.a)(S,2),W=L[0],ne=L[1],Q=Object(b.useState)(Tt),ke=Object(H.a)(Q,2),Vt=ke[0],kn=ke[1],Qn=Object(b.useState)(At),nn=Object(H.a)(Qn,2),ti=nn[0],qn=nn[1],Li=Object(b.useState)(hi),lr=Object(H.a)(Li,2),ar=lr[0],Ki=lr[1],Pr=Object(b.useState)(""),Vr=Object(H.a)(Pr,2),Ai=Vr[0],wi=Vr[1],ir=Object(b.useState)(0),Fi=Object(H.a)(ir,2),Bn=Fi[0],gn=Fi[1],Tn=Object(b.useState)(gt),_n=Object(H.a)(Tn,2),si=_n[0],ai=_n[1],J=Object(b.useState)(!1),ue=Object(H.a)(J,2),Ce=ue[0],Te=ue[1],qe=Object(b.useRef)(Object(Bt.a)()),Oe=Object(b.useRef)(!1),Ve=Object(b.useRef)(),et=Object(b.useRef)(),Ot=Object(b.useRef)(),Et=Object(b.useRef)(),je=Object(b.useRef)(),ht=function(){var Dt=Object(M.a)(D.a.mark(function sn(){var Ft,St;return D.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:return Sn.next=2,Object(Ze.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:qe.current}});case 2:St=Sn.sent,St!=null&&(Ft=St.attachments)!==null&&Ft!==void 0&&Ft.length&&(console.log("cm:",W,et),St.attachments.map(function(zt){zt.content_type.indexOf("image")>-1?W.replaceSelection(".concat(zt.content_type,")")):zt.content_type.indexOf("video")>-1?W.replaceSelection('')):zt.content_type.indexOf("pdf")>-1?W.replaceSelection('').concat(zt.name,"")):W.replaceSelection("[".concat(zt.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(zt.content_type,")"))}));case 4:case"end":return Sn.stop()}},sn)}));return function(){return Dt.apply(this,arguments)}}();Object(b.useEffect)(function(){kn(X),W==null||W.setValue(X)},[X]),Object(b.useEffect)(function(){er==null||er(ar)},[ar]),Object(b.useEffect)(function(){if(et.current){var Dt=d.a.fromTextArea(et.current,{mode:rn,lineNumbers:!rt,lineWrapping:!0,value:Tt,autoCloseTags:!0,autoCloseBrackets:!0});Re&&Dt.focus();function sn(Ft,St){if(pr){St.preventDefault();return}var Un=St.clipboardData;if(Un){var Sn=Un.types.toString(),zt=Un.items;if(Sn==="Files"||Un.types.indexOf("Files")>-1){if(St.preventDefault(),rn=="stex")return;try{var lt,jn=zt[1];((lt=zt[0])===null||lt===void 0?void 0:lt.kind)==="file"&&(jn=zt[0]);var ln=jn.getAsFile(),Jn=ln.name.split(".").pop();nt(ln,function($t){if($t.id){var On,Fn,hn;(ln==null||((On=ln.type)===null||On===void 0)?void 0:On.indexOf("image"))>-1?Dt.replaceSelection(".concat($t.content_type,")")):(ln==null||((Fn=ln.type)===null||Fn===void 0)?void 0:Fn.indexOf("video"))>-1?Dt.replaceSelection('')):(ln==null||((hn=ln.type)===null||hn===void 0)?void 0:hn.indexOf("pdf"))>-1?Dt.replaceSelection('').concat(ln.name,"")):ae.includes(Jn)?Dt.replaceSelection('').concat(ln.name,"")):Dt.replaceSelection("[".concat(ln.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat($t.id,"?type=").concat($t.content_type,")"))}else($t==null?void 0:$t.status)===401&&(document.location.href="/user/login")})}catch($t){A.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Dt.on("paste",sn),Dt.on("dragleave",function(Ft,St){Ot.current.classList.remove("mouse-hover-md")}),Dt.on("dragover",function(Ft,St){Ot.current.classList.add("mouse-hover-md")}),Dt.on("drop",function(Ft,St){Ot.current.classList.add("mouse-hover-md");var Un;if(Un=St.dataTransfer.files,Un.length>0){St.preventDefault(),St.stopPropagation();for(var Sn=function(jn){var ln=Un[jn],Jn=ln.name.split(".").pop();nt(ln,function($t){if($t.id){var On,Fn,hn;(ln==null||((On=ln.type)===null||On===void 0)?void 0:On.indexOf("image"))>-1?Dt.replaceSelection(".concat($t.content_type,")")):(ln==null||((Fn=ln.type)===null||Fn===void 0)?void 0:Fn.indexOf("video"))>-1?Dt.replaceSelection('')):(ln==null||((hn=ln.type)===null||hn===void 0)?void 0:hn.indexOf("pdf"))>-1?Dt.replaceSelection('').concat(ln.name,"")):ae.includes(Jn)?Dt.replaceSelection('').concat(ln.name,"")):Dt.replaceSelection("[".concat(ln.name,"](").concat(c.a.API_SERVER,"/api/attachments/").concat($t.id,"?type=").concat($t.content_type,")"))}else($t==null?void 0:$t.status)===401&&(document.location.href="/user/login")})},zt=0;zt0||zt.target.offsetWidth>0)&&(it(),W.setSize("100%","100%"),W.refresh())}}catch(lt){Un.e(lt)}finally{Un.f()}});return Ft.observe(et.current.parentElement),Ft}if(W){var sn=Dt();return function(){sn.unobserve(et.current.parentElement)}}},[W,it]),Object(b.useEffect)(function(){if(W){for(var Dt=[],sn=function(){var zt=St[Ft];Un=Object(H.a)(zt,2);var lt=Un[0],jn=Un[1],ln=Object(P.a)({},lt,function(){st(jn)});Dt.push(ln),W.addKeyMap(ln)},Ft=0,St=Object.entries(re);Ft0){var Dt=new Date().getTime(),sn=window.sessionStorage.getItem(Ne);Dt>=Bn+Ct&&(!sn||sn!==Vt)&&(window.sessionStorage.setItem(Ne,Vt),Te(!0))}},Ct),Object(b.useEffect)(function(){qn(At)},[W,At]),Object(b.useEffect)(function(){W&&(Re&&W.focus())},[W,Re]),Object(b.useEffect)(function(){if(ti&&W){var Dt=W.getScrollerElement();function sn(Ft){var St=Ft.target;if(je.current){var Un=St.scrollTop/St.scrollHeight;je.current.scrollTop=je.current.scrollHeight*Un}}return Dt.addEventListener("scroll",sn),function(){Dt.removeEventListener("scroll",sn)}}},[W,ti]),Object(b.useEffect)(function(){if(W&&ji){function Dt(sn,Ft){ji(sn,Ft)}return W.on("beforeChange",Dt),function(){W.off("beforeChange",Dt)}}},[W,ji]),Object(b.useEffect)(function(){if(W&&fi){function Dt(){fi(W.getValue())}return W.on("blur",Dt),function(){W.off("blur",Dt)}}},[W,fi]),Object(b.useEffect)(function(){if(W){function Dt(sn){var Ft=sn.getValue();kn(Ft),gn(new Date().getTime()),sn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Jt&&Jt(Ft)}return W.on("change",Dt),function(){W.off("change",Dt)}}},[W,Jt]),Object(b.useEffect)(function(){W&&(Tt==null?(W.setValue(""),kn("")):Tt!==W.getValue()&&(W.setValue(Tt),kn(Tt),W.setCursor(W.lineCount(),0)))},[W,Tt]);var st=Object(b.useCallback)(function(Dt){var sn=W.getCursor(),Ft=W.getSelection(),St=Ft.split(`
`);switch(Dt){case"bold":return W.replaceSelection("**"+Ft+"**"),Ft===""&&W.setCursor(sn.line,sn.ch+2),W.focus();case"italic":return W.replaceSelection("*"+Ft+"*"),Ft===""&&W.setCursor(sn.line,sn.ch+1),W.focus();case"code":return W.replaceSelection("`"+Ft+"`"),Ft===""&&W.setCursor(sn.line,sn.ch+1),W.focus();case"inline-latex":return W.replaceSelection("`$$"+Ft+"$$`"),Ft===""&&W.setCursor(sn.line,sn.ch+3),W.focus();case"latex":return W.replaceSelection("```latex\n"+Ft+"\n```"),W.setCursor(sn.line+1,Ft.length+1),W.focus();case"line-break":return W.replaceSelection(`
`),W.focus();case"list-ul":return Ft===""?W.replaceSelection("- "+Ft):W.replaceSelection(St.map(function(Un){return Un===""?"":"- ".concat(Un)}).join(`
`)),W.focus();case"list-ol":return Ft===""?W.replaceSelection("1. "+Ft):W.replaceSelection(St.map(function(Un,Sn){return Un===""?"":"".concat(Sn+1,". ").concat(Un)}).join(`
`)),W.focus();case"add-null-ch":return Ft===""&&W.setCursor(sn.line,sn.ch+1),W.replaceSelection(Ge),W.focus();case"inster-template-1":return Ft===""&&W.setCursor(sn.line,sn.ch),W.replaceSelection(vt),W.focus();case"eraser":return W.setValue(""),W.focus();case"trigger-watch":return qn(!ti),W.focus();case"trigger-full-screen":return Ki(!ar),W.focus();case Ut:wi(Ut);return;case An:wi(An);return;case Mt:wi(Mt);return;case mn:wi(mn);return;default:throw new Error}},[W,ti,ar]),bt=Object(b.useCallback)(function(Dt){wi("");switch(Ai){case Ut:var sn=Dt.title,Ft=Dt.link;return W.replaceSelection("[".concat(sn,"](").concat(Ft,")")),W.focus();case An:var St=Dt.language,Un=Dt.content;return W.replaceSelection(["```"+St,Un,"```"].join(`
`)),W.focus();case Mt:var Sn=Dt.src,zt=Dt.alt;return zt?W.replaceSelection(".concat(Sn,' "').concat(zt,'" )')):W.replaceSelection("")),W.focus();case mn:for(var lt=Dt.row,jn=Dt.col,ln=Dt.align,Jn=`
`,$t=0;$t300&&(lt=300);var jn=gt+lt+"px";ai(jn)}}return Dt.addEventListener("mousedown",St),document.addEventListener("mousemove",Sn),document.addEventListener("mouseup",Un),function(){Dt.removeEventListener("mousedown",St),document.removeEventListener("mousemove",Sn),document.removeEventListener("mouseup",Un)}}},[W,Et]),Object(b.useEffect)(function(){ai(gt)},[gt]);var Gt=Ae(mt),on=Ae(si),Dn={width:Gt,height:on},Kn=Object(b.useMemo)(function(){if(Bn){var Dt=new Date(Bn),sn=Dt.getHours(),Ft=Dt.getMinutes(),St=Dt.getSeconds();return sn=sn<10?"0"+sn:sn,Ft=Ft<10?"0"+Ft:Ft,St=St<10?"0"+St:St,"".concat(sn,":").concat(Ft,":").concat(St)}return 0},[Bn]);function wn(){window.sessionStorage.removeItem(Ne),Te(!1),gn(0)}function Nn(){Te(!1),gn(0),W.setValue(window.sessionStorage.getItem(Ne))}function Pn(Dt,sn){var Ft=W.getValue();Ft=Ft.replace(Dt,sn),kn(Ft),W==null||W.setValue(Ft)}return m.a.createElement(b.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ot},m.a.createElement("div",{className:"markdown-editor-container ".concat(cn," ").concat(ti?"on-preview":""," ").concat(rt?"mini":""," ").concat(ar?"full-screen":""),style:Dn},m.a.createElement(E,{insertTemp:ot,watch:ti,fullScreen:ar,showNullButton:$n,onActionCallback:st,hidetoolBar:Ti,uuid:qe.current,setOpenPhones:function(){Oe.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:et,placeholder:tr})),ti?m.a.createElement("div",{ref:je,className:"preview-container"},rn==="stex"&&m.a.createElement(O,{value:Vt}),rn!=="stex"&&m.a.createElement(x.a,{edit:!0,value:Vt,replaces:Pn})):null))),Xt?m.a.createElement("a",{ref:Et,className:"editor-resize"}):null,m.a.createElement(U.a,null,he[Ai]?m.a.createElement(Y.a,{centered:!0,title:he[Ai],visible:!0,onCancel:ct,footer:null,className:"markdown-popup-form"},Lt):null))}},RotF:function(tn,Qe,I){tn.exports=I("LSTS")},"SA+Z":function(tn,Qe,I){var te=I("wTVA"),Y=I("EbDI"),N=I("ZhPi"),K=I("wkBT");function A(M){return te(M)||Y(M)||N(M)||K()}tn.exports=A,tn.exports.__esModule=!0,tn.exports.default=tn.exports},SJMd:function(tn,Qe){/**
* @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 I,te,Y,N=!1,K,A;window.PR_SHOULD_USE_CONTINUATION=!0;var M,H;(function(){var P=window,k=["break,continue,do,else,for,if,return,while"],D=[k,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],b=[D,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[b,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],f=[b,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],d=[b,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="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",r=[b,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[k,"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"],a=[k,"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"],n=[k,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[m,d,f,r,u,o,a,n],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",O="kwd",C="com",_="typ",y="lit",h="pun",c="pln",v="tag",p="dec",E="src",U="atn",F="atv",z="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ft){for(var dt=0,Nt=!1,Ze=!1,Bt=0,Ut=ft.length;Bt122||(ae<65||Ee>90||pt.push([Math.max(65,Ee)|32,Math.min(ae,90)|32]),ae<97||Ee>122||pt.push([Math.max(97,Ee)&~32,Math.min(ae,122)&~32]))}}pt.sort(function(me,Be){return me[0]-Be[0]||Be[1]-me[1]});for(var re=[],he=[],vt=0;vtve[0]&&(ve[1]+1>ve[0]&&Ge.push("-"),Ge.push(pn(ve[1])))}return Ge.push("]"),Ge.join("")}function fn(He){for(var Ue=He.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")),pt=Ue.length,Ct=[],Ge=0,vt=0;Ge=2&&Ee==="["?Ue[Ge]=tt(Ae):Ee!=="\\"&&(Ue[Ge]=Ae.replace(/[a-zA-Z]/g,function(he){var ve=he.charCodeAt(0);return"["+String.fromCharCode(ve&~32,ve|32)+"]"}))}return Ue.join("")}for(var In=[],Bt=0,Ut=ft.length;Bt=0;)Nt[In.charAt(He)]=fn;var Ue=fn[1],pt=""+Ue;mn.hasOwnProperty(pt)||(An.push(Ue),mn[pt]=null)}An.push(/[\0-\uffff]/),Ze=B(An)})();var Bt=dt.length,Ut=function(Mt){for(var An=Mt.sourceCode,mn=Mt.basePos,pn=Mt.sourceNode,tt=[mn,c],fn=0,In=An.match(Ze)||[],He={},Ue=0,pt=In.length;Ue=5&&Ge.substring(0,5)==="lang-",Ae&&!(vt&&typeof vt[1]=="string")&&(Ae=!1,Ge=E),Ae||(He[Ct]=Ge)}var ae=fn;if(fn+=Ct.length,!Ae)tt.push(mn+ae,Ge);else{var re=vt[1],he=Ct.indexOf(re),ve=he+re.length;vt[2]&&(ve=Ct.length-vt[2].length,he=ve-re.length);var me=Ge.substring(5);V(pn,mn+ae,Ct.substring(0,he),Ut,tt),V(pn,mn+ae+he,re,de(me,re),tt),V(pn,mn+ae+ve,Ct.substring(ve),Ut,tt)}}Mt.decorations=tt};return Ut}function Ye(ft){var dt=[],Nt=[];ft.tripleQuotedStrings?dt.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ft.multiLineStrings?dt.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):dt.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ft.verbatimStrings&&Nt.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ze=ft.hashComments;Ze&&(ft.cStyleComments?(Ze>1?dt.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):dt.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Nt.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):dt.push([C,/^#[^\r\n]*/,null,"#"])),ft.cStyleComments&&(Nt.push([C,/^\/\/[^\r\n]*/,null]),Nt.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Bt=ft.regexLiterals;if(Bt){var Ut=Bt>1?"":`
\r`,Mt=Ut?".":"[\\S\\s]",An="/(?=[^/*"+Ut+"])(?:[^/\\x5B\\x5C"+Ut+"]|\\x5C"+Mt+"|\\x5B(?:[^\\x5C\\x5D"+Ut+"]|\\x5C"+Mt+")*(?:\\x5D|$))+/";Nt.push(["lang-regex",RegExp("^"+G+"("+An+")")])}var mn=ft.types;mn&&Nt.push([_,mn]);var pn=(""+ft.keywords).replace(/^ | $/g,"");pn.length&&Nt.push([O,new RegExp("^(?:"+pn.replace(/[\s,]+/g,"|")+")\\b"),null]),dt.push([c,/^\s+/,null,` \r
\xA0`]);var tt="^.[^\\s\\w.$@'\"`/\\\\]*";return ft.regexLiterals&&(tt+="(?!s*/)"),Nt.push([y,/^@[a-z_$][a-z_$@0-9]*/i,null],[_,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[y,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[h,new RegExp(tt),null]),pe(dt,Nt)}var xe=Ye({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ie(ft,dt,Nt){for(var Ze=/(?:^|\s)nocode(?:\s|$)/,Bt=/\r\n?|\n/,Ut=ft.ownerDocument,Mt=Ut.createElement("li");ft.firstChild;)Mt.appendChild(ft.firstChild);var An=[Mt];function mn(Ue){var pt=Ue.nodeType;if(pt==1&&!Ze.test(Ue.className))if(Ue.nodeName==="br")pn(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var Ct=Ue.firstChild;Ct;Ct=Ct.nextSibling)mn(Ct);else if((pt==3||pt==4)&&Nt){var Ge=Ue.nodeValue,vt=Ge.match(Bt);if(vt){var Ae=Ge.substring(0,vt.index);Ue.nodeValue=Ae;var ge=Ge.substring(vt.index+vt[0].length);if(ge){var Ee=Ue.parentNode;Ee.insertBefore(Ut.createTextNode(ge),Ue.nextSibling)}pn(Ue),Ae||Ue.parentNode.removeChild(Ue)}}}function pn(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function pt(vt,Ae){var ge=Ae?vt.cloneNode(!1):vt,Ee=vt.parentNode;if(Ee){var ae=pt(Ee,1),re=vt.nextSibling;ae.appendChild(ge);for(var he=re;he;he=re)re=he.nextSibling,ae.appendChild(he)}return ge}for(var Ct=pt(Ue.nextSibling,0),Ge;(Ge=Ct.parentNode)&&Ge.nodeType===1;)Ct=Ge;An.push(Ct)}for(var tt=0;tt=Ee&&(mn+=2),Ut>=ae&&(fn+=2)}}finally{Ge&&(Ge.style.display=vt)}}var Ke={};function be(ft,dt){for(var Nt=dt.length;--Nt>=0;){var Ze=dt[Nt];Ke.hasOwnProperty(Ze)?P.console&&console.warn("cannot override language handler %s",Ze):Ke[Ze]=ft}}function de(ft,dt){return ft&&Ke.hasOwnProperty(ft)||(ft=/^\s*]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[h,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^