(self.webpackChunk=self.webpackChunk||[]).push([[4496],{4887:function(){"use strict"},27431:function(Ot,zt){"use strict";zt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},63089:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Ot={},zt="5.0",fe={},se=null,gt=!1,Ie=!1,_e=null,me=!1,Ye=null,Be=null,qe=0;qe4?parseFloat(we):5};Ot.setHTML5Codebase=function(we,Xe){Be=we,Ve(we,Xe)},Ot.setJavaCodebase=Ot.setJavaCodebaseVersion=Ot.isCompiledInstalled=Ot.setPreCompiledScriptPath=Ot.setPreCompiledResourcePath=function(){},Ot.setHTML5CodebaseVersion=function(we,Xe){var Ze=parseFloat(we);if(Ze!==NaN&&Ze<5){console.log("The GeoGebra HTML5 codebase version "+Ze+" is deprecated. Using version latest instead.");return}Ye=we,ce(we,Xe)},Ot.getHTML5CodebaseVersion=function(){return Ue},Ot.getParameters=function(){return fe},Ot.setFontsCSSURL=function(we){Et=we},Ot.setGiacJSURL=function(we){},Ot.setJNLPFile=function(we){de=we},Ot.setJNLPBaseDir=function(we){},Ot.inject=function(){function we(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Xe="auto",Ze=fe.id,Mt,it=!1,Ce=0;Ce=5)return!0;var we=Ot.getAppletObject();return we&&typeof we.recalculateEnvironments=="function"?(we.recalculateEnvironments(),!0):!1},Ot.startAnimation=function(){var we=Ot.getAppletObject();return we&&typeof we.startAnimation=="function"?(we.startAnimation(),!0):!1},Ot.stopAnimation=function(){var we=Ot.getAppletObject();return we&&typeof we.stopAnimation=="function"?(we.stopAnimation(),!0):!1},Ot.getAppletObject=function(){var we=fe.id!==void 0?fe.id:"ggbApplet";return window[we]},Ot.resize=function(){};var rt=function(we,Xe,Ze){var Mt=document.createElement("param");Mt.setAttribute("name",Xe),Mt.setAttribute("value",Ze),we.appendChild(Mt)},Pe=function(we){return we&&we!=="false"},je=function(we,Xe,Ze){vt(Ue)<=4.2&&(Ze=!0);var Mt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ue||ggbHTML5LoadedCodebaseIsWebSimple&&!Oe)&&(Mt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var it=document.createElement("div");it.classList.add("appletParameters","notranslate");var Ce=Xe.width,ve=Xe.height;if(Xe.disableAutoScale=Xe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Xe.disableAutoScale,Xe.width!==void 0)if(vt(Ue)<=4.4)Pe(Xe.showToolBar)&&(Xe.height-=7),Pe(Xe.showAlgebraInput)&&(Xe.height-=37),Xe.width<605&&Pe(Xe.showToolBar)&&(Xe.width=605,Ce=605);else{var Me=100;(Pe(Xe.showToolBar)||Pe(Xe.showMenuBar))&&(Xe.hasOwnProperty("customToolBar")&&(Xe.customToolbar=Xe.customToolBar),Me=Pe(Xe.showMenuBar)?245:155),Ce=5?(Xe.appletOnLoad=function(ee){var ie=we.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(He),window.GGBT_wsf_view&&$(window).trigger("resize"),xe(ee)},Je||He.appendChild(et)):it.appendChild(et),He.appendChild(it),Je||we.appendChild(He),setTimeout(function(){Ot.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(it),we.appendChild(nt),Xe.appletOnLoad=function(ee){Ot.resize(),xe(ee)}}function Ke(ee,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,ie.appletOnLoad):renderGGBElement(ee),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function xt(ee,ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ee,params:ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ue){Ke(ue.article,ue.params)}),html5AppletsToProcess=null)},vt(Ue)<5&&(ee.className+=" geogebraweb")):Ke(ee,ie)}if(Mt){scriptLoadStarted=!0;for(var kt=0;kt0?($e.remove(),He.attr("id","fullscreencontent").show(),jQuery(xe).append(He),window.dispatchEvent(new Event("resize"))):je($e,Xe,!1),window.GGBT_wsf_view.launchFullScreen(xe)}else ft=Mt,je(we,Xe,!1);if(!window.GGBT_wsf_view)for(ve=0;vewe/4*3&&($e=we/4*3),xe=$e/5.8,Me.setAttribute("src",st),Me.setAttribute("width",$e),Me.setAttribute("height",xe);var He=(we-$e)/2,Je=(Xe-xe)/2;Me.style.left=He+"px",Me.style.top=Je+"px",it.appendChild(Me)}}return it.appendChild(ve),it},dt=function(we){return we=we.toLowerCase(),we==="html5"||we==="screenshot"?we:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ce=function(we,Xe){if(Ue=we,Xe){Ve(Ue,!0);return}var Ze=!gt;if(Ze){var Mt=vt(Ue);!isNaN(Mt)&&Mt<4.4&&(Ze=!1)}var it,Ce;window.location.protocol.substr(0,4)==="http"?it=window.location.protocol:it="http:";var ve=Ue.indexOf("//");ve>0?Ce=Ue:ve===0?Ce=it+Ue:Ce="https://www.geogebra.org/apps/5.2.814.0/";for(var Me in pe)if(Ue.slice(pe[Me].length*-1)===pe[Me]||Ue.slice((pe[Me].length+1)*-1)===pe[Me]+"/"){Ve(Ce,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ze&&!se.is3D&&!se.AV&&!se.SV&&!se.CV&&!se.EV2&&!se.CP&&!se.PC&&!se.DA&&!se.FI&&!se.PV&&!Pe(fe.showToolBar)&&!Pe(fe.showMenuBar)&&!Pe(fe.showAlgebraInput)&&!Pe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Ce+="webSimple/":Ce+="web3d/",Ve(Ce,!1)},Ve=function(we,Xe){if(we.requirejs){Te=we;return}we.slice(-1)!=="/"&&(we+="/"),Te=we,Xe===null&&(Xe=we.indexOf("http")===-1),ye=Xe,Fe="web.nocache.js",Oe=!1;var Ze=Te.split("/");Ze.length>1&&(!Xe&&Ze[Ze.length-2]==="webSimple"?(Fe="webSimple.nocache.js",Oe=!0):pe.indexOf(Ze[Ze.length-2])>=0&&(Fe=Ze[Ze.length-2]+".nocache.js")),Ze=we.split("/"),Ue=Ze[Ze.length-3],Ue.substr(0,4)==="test"?Ue=Ue.substr(4,1)+"."+Ue.substr(5,1):(Ue.substr(0,3)==="war"||Ue.substr(0,4)==="beta")&&(Ue="5.0");var Mt=parseFloat(Ue);Mt!==NaN&&Mt<5&&we.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Mt+" is deprecated. Using version latest instead."),ce("5.0",Xe))},wt=function(we,Xe){window.console&&window.console.log&&(!Xe||typeof Xe.showLogging=="undefined"||Xe.showLogging&&Xe.showLogging!=="false")&&console.log(we)};fe.material_id!==void 0?$t(lt):lt();function lt(){var we=zt;Ye!==null?we=Ye:parseFloat(we)<5&&(we="5.0"),ce(we,!1),Be!==null&&Ve(Be,ye),me=!0}return Ot},GGBAppletUtils=function(){"use strict";function Ot(){return window.GGBT_wsf_edit!==void 0}function zt(me,Ye){Ye!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+Ye+","+Ye+")",me.style.webkitTransform="scale("+Ye+","+Ye+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function fe(me,Ye,Be,qe,ke,de){var Te=null;if(de!=null&&de!="")for(var ye=me.parentNode;ye!=null;)if((" "+ye.className+" ").indexOf(" "+de+" ")>-1){Te=ye;break}else ye=ye.parentNode;var ft=0,Ue=0,Fe=0,Oe=0,Le=0,st=0,ut=0;if(Te)ft=Te.offsetWidth,Ue=Math.max(qe?Te.offsetWidth:0,Te.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ft=Math.min(window.innerWidth,document.documentElement.clientWidth),Ue=Math.min(window.innerHeight,document.documentElement.clientHeight),Fe=ft):(ft=window.innerWidth,Ue=window.innerHeight,Fe=window.innerWidth),me){var Et=me.getBoundingClientRect();Et.left>0&&Et.left<=ft&&(ke===void 0||!ke)&&(document.dir==="rtl"?(Le=ft-Et.width-Et.left,st=Fe<=480?10:30):(st=Et.left,Le=Fe<=480?10:30),Oe=st+Le)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var yt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Oe=40,ut=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Oe=0,ut=40)}}return me&&((Be===void 0||!Be)&&Ye>0&&Ye+Oe1&&(de=!0)),Ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))ke=se(me,Ye,de,Be,me.scaleContainerClass);else return qe;return de&&(!me.hasOwnProperty("scale")||qe===1)?ke:Math.min(qe,ke)}function Ie(me){var Ye=Math.min(window.innerWidth,document.documentElement.clientWidth),Be=Math.min(window.innerHeight,document.documentElement.clientHeight),qe=me.getBoundingClientRect(),ke=(Ye-qe.width)/2,de=(Be-qe.height)/2;de<0&&(de=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?me.style.left="40px":me.style.left=ke+"px",me.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?me.style.top="40px":me.style.top=de+"px",me.style.left=ke+"px")}function _e(me,Ye){var Be=me.querySelector(".appletParameters");if(Be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ye.id!==Be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Be.parentElement&&/fullscreen/.test(Be.parentElement.className))return;var qe=gt(Ye,me);Ot()&&Be.setAttribute("data-param-scale",qe);for(var ke=null,de=0;de=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Ot){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ot){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ot){var zt=c[Ot];return zt==null?null:zt},r=d,webModule.__errFn=e}function B(){function Ot(me){var Ye=me.lastIndexOf(rb);Ye==-1&&(Ye=me.length);var Be=me.indexOf(sb);Be==-1&&(Be=me.length);var qe=me.lastIndexOf(tb,Math.min(Be,Ye));return qe>=O?me.substring(O,qe+P):W}function zt(me){if(!me.match(/^\w+:\/\//)){var Ye=o.createElement(ub);Ye.src=me+vb,me=Ot(Ye.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function se(){for(var me=o.getElementsByTagName(_),Ye=O;YeO?me[me.length-P].href:W}function Ie(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var _e=fe();return _e==W&&(_e=se()),_e==W&&(_e=gt()),_e==W&&Ie()&&(_e=Ot(o.location.href)),_e=zt(_e),_e}function C(Ot){return Ot.match(/^\//)||Ot.match(/^[a-zA-Z]+:\/\//)?Ot:webModule.__moduleBase+Ot}function D(){var Ot=[],zt=O,fe=[],se=[];function gt(me){var Ye=se[me](),Be=fe[me];if(Ye in Be)return Ye;var qe=[];for(var ke in Be)qe[Be[ke]]=ke;throw r&&r(me,qe,Ye),null}if(__gwt_isKnownPropertyValue=function(me,Ye){return Ye in fe[me]},webModule.__getPropMap=function(){var me={};for(var Ye in fe)fe.hasOwnProperty(Ye)&&(me[Ye]=gt(Ye));return me},webModule.__computePropValue=gt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ie;try{Ie=Cb;var _e=Ie.indexOf(Db);_e!=-1&&(zt=parseInt(Ie.substring(_e+P),$),Ie=Ie.substring(O,_e))}catch(me){}return webModule.__softPermutationId=zt,C(Ie+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},88457:function(Ot,zt,fe){"use strict";fe.d(zt,{Ax:function(){return _e},Ds:function(){return me},KI:function(){return Be},SI:function(){return Ie},f1:function(){return gt}});var se=fe(78323);function gt(qe){let ke=!0;if(qe.length>0){for(let de=0;de0&&ue[ue.length-1])||Re[0]!==6&&Re[0]!==2)){ge=0;continue}if(Re[0]===3&&(!ue||Re[1]>ue[0]&&Re[1]',"select"),this.addActionButton(ie,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ie,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ie,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ie,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ie,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ie,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ie,'',"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(ne){var ge=document.createElement("div");ge.className=""+ee.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){ee.markerToolbarButtonClicked(ge,ne)}),ee.buttons.push(ge),ee.markerButtons.push(ge)}),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 ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'',"render"),this.addActionButton(ue,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ae.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ae.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ee=0;ee0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(te,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(te){var ee=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},ae.prototype.setCurrentMarker=function(te){var ee=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){ee.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ae}(),ut=function(){function ae(te,ee,ie,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=ee,this.uiStyleSettings=ie,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new Le("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 Le("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Le("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Le("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Le("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 Le("toolbox-panel-row_colors",` background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new Le("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px; padding: `+ee+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Le("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Le("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},ae.prototype.show=function(te){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(te){var ee,ie,ue=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ge;ne.uiStyleSettings=ue.uiStyleSettings;var ct=document.createElement("div");ct.className=ue.toolboxButtonStyleClass.name+" "+((ge=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ue.toolboxButtonStyleColorsClass.name),ct.innerHTML=ne.icon,ct.title=ne.title,ct.addEventListener("click",function(){ue.panelButtonClick(ne)}),ue.panelButtons.push(ct),ue.buttonRow.appendChild(ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(te){var ee=this,ie=-1;if(te!==this.activePanel){ie=this.panels.indexOf(te),this.panelRow.innerHTML="";var ue=te.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),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=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ge){var ct,pt;ne.className=ee.toolboxButtonStyleClass.name+" "+(ge===ie?""+((ct=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ct!==void 0?ct:ee.toolboxActiveButtonStyleColorsClass.name):""+((pt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&pt!==void 0?pt:ee.toolboxButtonStyleColorsClass.name))})},ae}(),Et=function(ae,te){this.title=ae,this.icon=te},yt=function(ae){function te(ee,ie,ue,ne){var ge=ae.call(this,ee,ne||'')||this;return ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=ie,ge.currentColor=ue,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return Be(te,ae),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ne=ee.getColorBox(ue);ie.appendChild(ne),ee.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(ee){var ie=this,ue=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ue,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=ne-2+"px",ge.style.height=ne-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(ne+2)/2+"px",ge.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){ie.setCurrentColor(ee,ge)});var ct=document.createElement("div");return ct.style.display="inline-block",ct.style.width=ne-2+"px",ct.style.height=ne-2+"px",ct.style.backgroundColor=ee,ct.style.borderRadius=ne/2+"px",ee==="transparent"&&(ct.style.fill=this.uiStyleSettings.toolboxAccentColor,ct.innerHTML=` `),ge.appendChild(ct),ge},te.prototype.setCurrentColor=function(ee,ie){var ue=this;this.currentColor=ee,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},te}(Et),vt=function(){function ae(te,ee,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=ee,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(te,ee){},ae.prototype.dblClick=function(te,ee){},ae.prototype.manipulate=function(te){},ae.prototype.pointerUp=function(te){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ae.prototype.scale=function(te,ee){},ae.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ae.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),mt=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},ae}(),ht=function(){function ae(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ae}(),$t=function(){function ae(){}return ae.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ae.toSVGMatrix=function(te,ee){return te.a=ee.a,te.b=ee.b,te.c=ee.c,te.d=ee.d,te.e=ee.e,te.f=ee.f,te},ae}(),Se=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(Te.createTransform()),ne.setupControlBox(),ne}return Be(te,ae),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(ee){this._visual=ee;var ie=Te.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!ae.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ue=this.unrotatePoint(ee);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(ee){var ie=this.state;ae.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},te.prototype.manipulate=function(ee){var ie=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(ee)},te.prototype.resize=function(ee){var ie=this.manipulationStartLeft,ue=this.manipulationStartWidth,ne=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+ee.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+ee.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+ee.y-this.manipulationStartY}ue>=0?(this.left=ie,this.width=ue):(this.left=ie+ue,this.width=-ue),ge>=0?(this.top=ne,this.height=ge):(this.top=ne+ge,this.height=-ge),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var ie=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},te.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},te.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM(),ue=Te.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.y}},te.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM();ie=ie.inverse();var ue=Te.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.y}},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var ee=Te.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=Te.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=Te.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"},te.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,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()},te.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()},te.prototype.createGrip=function(){var ee=new ht;return ee.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,ie=-ee/2,ue=ie,ne=(this.width+this.CB_DISTANCE)/2-ee/2,ge=(this.height+this.CB_DISTANCE)/2-ee/2,ct=this.height+this.CB_DISTANCE-ee/2,pt=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,ue),this.positionGrip(this.controlGrips.topCenter.visual,ne,ue),this.positionGrip(this.controlGrips.topRight.visual,pt,ue),this.positionGrip(this.controlGrips.centerLeft.visual,ie,ge),this.positionGrip(this.controlGrips.centerRight.visual,pt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,ct),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,ct),this.positionGrip(this.controlGrips.bottomRight.visual,pt,ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ue-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(ee,ie,ue){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,ue),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:$t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:$t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},te.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var ie=ee;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix($t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix($t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie);var ue=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ue.x*ee,y:ue.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*ee,this.height=this.height*ie,this.adjustControlBox()},te}(vt),Ge=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Te.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)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){ae.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie),this.setSize()},te.title="Rectangle marker",te}(Se),rt=function(ae){function te(ee,ie,ue,ne){var ge=ae.call(this,ee,ne||'')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=ie,ge.currentWidth=ue,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return Be(te,ae),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ue===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentWidth(ue,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=ue.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.display="flex",ct.style.alignItems="center";var pt=document.createElement("hr");pt.style.minWidth="20px",pt.style.border="0px",pt.style.borderTop=ue+"px solid "+ee.uiStyleSettings.toolboxColor,pt.style.flexGrow="2",ct.appendChild(pt),ne.appendChild(ct),ee.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(ee,ie){var ue=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Et),Pe=function(ae){function te(ee,ie,ue,ne){var ge=ae.call(this,ee,ne||'')||this;return ge.styles=[],ge.styleBoxes=[],ge.styles=ie,ge.currentStyle=ue,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return Be(te,ae),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/ee.styles.length-5+"%",ne.style.borderColor=ue===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentStyle(ue,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var ct=` `;ge.innerHTML=ct,ne.appendChild(ge),ee.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(ee,ie){var ue=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Et),je=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new yt("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Be(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="FrameMarker",te.title="Frame marker",te.icon='',te}(Ge),Ee=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,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},ze=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!!ae.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.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(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(ee){var ie=this.state;ae.prototype.pointerUp.call(this,ee),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(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},te.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var ee=new ht;return ee.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},te.prototype.positionGrip=function(ee,ie,ue){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,ue),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},te.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var ie=ee;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie),this.x1=this.x1*ee,this.y1=this.y1*ie,this.x2=this.x2*ee,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(vt),Pt=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new yt("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.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)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.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()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var ie=ee;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='',te}(ze),ot=function(ae){function te(ee,ie,ue,ne){var ge=ae.call(this,ee,ne||'')||this;return ge.fonts=[],ge.fontBoxes=[],ge.fonts=ie,ge.currentFont=ue,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return Be(te,ae),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(ue){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/ee.fonts.length-5+"%",ne.style.borderColor=ue===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentFont(ue,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=ue,ge.style.overflow="hidden";var ct=document.createElement("div");ct.style.whiteSpace="nowrap",ct.style.overflow="hidden",ct.style.textOverflow="ellipsis",ct.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(ct),ne.appendChild(ge),ee.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(ee,ie){var ue=this;this.currentFont=ee,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Et),St=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=ue.defaultColor,ne.fontFamily=ue.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new yt("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){if(ae.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(ue){ue===ee&&(ie=!0)}),ie},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.renderText=function(){var ee=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(ie){ee.textElement.appendChild(Te.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),ie=1;if(ee.width>0&&ee.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/ee.width,ne=(1*this.height-this.height*this.padding*2/100)/ee.height;ie=Math.min(ue,ne)}return ie},te.prototype.getTextPosition=function(ee){var ie=this.textElement.getBBox(),ue=0,ne=0;return ie.width>0&&ie.height>0&&(ue=(this.width-ie.width*ee)/2,ne=this.height/2-ie.height*ee/2),{x:ue,y:ne}},te.prototype.sizeText=function(){var ee=this.textElement.getBBox(),ie=this.getTextScale(),ue=this.getTextPosition(ie);ue.y-=ee.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},te.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(ee){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,ee),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var ee=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(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,ee.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var ue=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ue)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ee=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),ne={x:ue.width*ee,y:ue.height*ee};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*ee,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},te.prototype.dblClick=function(ee,ie){ae.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&Te.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},te.prototype.setFont=function(ee){this.textElement&&Te.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='',te}(Se),dt=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ue.defaultColor,ne.lineWidth=ue.defaultStrokeWidth,ne.pixelRatio=ue.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new yt("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var ee=Te.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){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(ee.x,ee.y),this.drawing=!0):ae.prototype.pointerDown.call(this,ee,ie)},te.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,ee)},te.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)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var ee=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=ie[0],ne=ie[1],ge=ie[2],ct=ie[3],pt=!1,Ct=0;Ct0&&(pt=!0,Ctct&&(ct=Ct),Re>ge&&(ge=Re));if(pt){this.left=ue/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ue)/this.pixelRatio,this.height=(ct-ne)/this.pixelRatio;var Zt=document.createElement("canvas");Zt.width=ge-ue,Zt.height=ct-ne,Zt.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ne,ge-ue,ct-ne),0,0),this.drawingImgUrl=Zt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},te.prototype.setLineWidth=function(ee){this.lineWidth=ee},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),ae.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='',te}(Se),pe=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ue||'')||this;return ne.typeBoxes=[],ne.currentType=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Be(te,ae),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ue=function(ct){var pt="both";switch(ct){case 0:pt="both";break;case 1:pt="start";break;case 2:pt="end";break;case 3:pt="none"}var Ct=document.createElement("div");if(Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=pt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){ee.setCurrentType(pt,Ct)}),ie.appendChild(Ct),pt==="both"||pt==="start"){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.minHeight="20px",Re.innerHTML=` `,Re.style.marginLeft="5px",Ct.appendChild(Re)}var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.style.flexGrow="2";var Rt=document.createElement("hr");if(Rt.style.minWidth="20px",Rt.style.border="0px",Rt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Rt.style.flexGrow="2",Zt.appendChild(Rt),Ct.appendChild(Zt),pt==="both"||pt==="end"){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.innerHTML=` `,It.style.marginRight="5px",Ct.appendChild(It)}ne.typeBoxes.push(Ct)},ne=this,ge=0;ge<4;ge++)ue(ge);return ie},te.prototype.setCurrentType=function(ee,ie){var ue=this;this.currentType=ee,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Et),ce=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new pe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},te.prototype.getArrowPoints=function(ee,ie){var ue=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return ee-ue/2+","+(ie+ne/2)+" "+ee+","+(ie-ne/2)+" "+(ee+ue/2)+","+(ie+ne/2)},te.prototype.createTips=function(){this.arrow1=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.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",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},te.prototype.setArrowType=function(ee){this.arrowType=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var ie=ee;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='',te}(Pt),Ve=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.fillColor=ue.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new yt("Color",ue.defaultColorSet,ue.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Be(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="CoverMarker",te.title="Cover marker",te.icon='',te}(Ge),wt=function(ae){function te(ee,ie,ue,ne){var ge=ae.call(this,ee,ne||'')||this;return ge.opacities=[],ge.opacityBoxes=[],ge.opacities=ie,ge.currentOpacity=ue,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return Be(te,ae),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ue===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentOpacity(ue,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*ue+"%",ne.appendChild(ge),ee.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(ee,ie){var ue=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Et),lt=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ue.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ue.defaultHighlightOpacity,ne.fillPanel=new yt("Color",ue.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new wt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Be(te,ae),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='',te}(Ve),we='',Xe='',Ze=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=ue.defaultStrokeColor,ne.bgColor=ue.defaultFillColor,ne.fontFamily=ue.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new yt("Text color",ue.defaultColorSet,ne.color,we),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new yt("Fill color",ue.defaultColorSet,ne.bgColor,Xe),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new ht,ne.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return ae.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(ee,ie){this.state==="new"&&ae.prototype.pointerDown.call(this,ee,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,ee,ie)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,ee);else{var ie=this.state==="creating";ae.prototype.pointerUp.call(this,ee),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(ee){if(this.tipMoving){var ie=this.unrotatePoint(ee);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",ee]]),Te.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},te.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},te.prototype.setTipPoints=function(ee){ee===void 0&&(ee=!1);var ie=Math.min(this.height/2,15),ue=this.height/5;ee&&(this.tipPosition={x:ie+ue/2,y:this.height+20});var ne=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?ne.1)){var ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='',te}(Pt),Ce=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.strokePanel.colors=ue.defaultColorSet,ne.fillColor="transparent",ne}return Be(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='',te}(Mt),ve=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),Me=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new yt("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.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)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.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)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/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()))},te.prototype.manipulate=function(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),ae.prototype.resize.call(this,ee),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},te.prototype.scale=function(ee,ie){this.curveX=this.curveX*ee,this.curveY=this.curveY*ie,ae.prototype.scale.call(this,ee,ie)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.prototype.restoreState.call(this,ee);var ie=ee;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.icon='',te}(ze),$e=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.defaultFillColor,ne.textColor=ue.defaultStrokeColor,ne.fontFamily=ue.defaultFontFamily,ne.fontSize=ue.defaultCaptionFontSize,ne.captionText=ue.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new yt("Line color",de(ue.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new yt("Fill color",de(ue.defaultColorSet,["transparent"]),ne.fillColor,Xe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new yt("Text color",ue.defaultColorSet,ne.textColor,we),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Te.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Te.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Te.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},te.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Te.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Te.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var ee=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.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(ee){this.captionElement&&Te.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(ee){this.captionElement&&Te.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),Te.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){ae.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(ee,ie){ae.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&Te.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&Te.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&Te.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&Te.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ae.prototype.getState.call(this));return ee.typeName=this.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='',te}(Se),xe=function(){function ae(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),He=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,!1)||this;return ne.dataUrl=ie,ne.state=ue,ne}return Be(te,ae),te}(xe),Je=function(ae){function te(ee,ie,ue){ue===void 0&&(ue=!1);var ne=ae.call(this,ee,ue)||this;return ne.marker=ie,ne}return Be(te,ae),te}(xe),et=function(){function ae(){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 ae.prototype.addEventListener=function(te,ee){this[te].push(ee)},ae.prototype.removeEventListener=function(te,ee){var ie=this[te].indexOf(ee);ie>-1&&this[te].splice(ie,1)},ae}(),nt=function(){function ae(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ee,this._isOpen=!1,this.undoRedoManager=new ve,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 et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new Fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.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(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,dt,ce,St,Ce,Mt,lt,Ze,it,Ve,Pt,Me,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,dt,ce,St,Mt,lt,Ze]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,dt,ce,St,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var ee=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var ue=ee.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});ue!==void 0&&ee._availableMarkerTypes.push(ue)}else ee._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,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(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ye.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Ue.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ue.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new xe(te))})},ae.prototype.render=function(){return qe(this,void 0,void 0,function(){var te;return ke(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(te=new ft).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ee.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},ae.prototype.close=function(te){var ee=this;if(te===void 0&&(te=!1),this.isOpen){var ie=!1;te||this.eventListeners.beforeclose.forEach(function(ue){var ne=new xe(ee,!0);ue(ne),ne.defaultPrevented&&(ie=!0)}),ie||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ue){return ue(new xe(ee))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,ee=[],ie=0;iethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,ie=ee',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ae.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")},ae.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"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.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 te=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"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 st(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.settings.uiOffsetTop===void 0&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ae.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())},ae.prototype.toolbarButtonClicked=function(te,ee){if(te==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(te==="action")switch(ee){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()}},ae.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ne=new Je(te,te._currentMarker,!0);ue(ne),ne.defaultPrevented&&(ee=!0)}),!ee){var ie=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(ue){return ue(new Je(te,ie))})}}},ae.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var ct=new Je(te,void 0,!0);ge(ct),ct.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var ie=function(ge){var ct=ue.markers[ge];ue.setCurrentMarker(ue.markers[ge]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(pt){return pt(new Je(te,ct))})},ue=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var te;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=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},ae.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)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ee=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===ee.width&&ie.height===ee.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),ue1&&this.panTo({x:te.clientX,y:te.clientY}))},ae.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(te,ee){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(ee-ie.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"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()},ae.prototype.addLicenseKey=function(te){ye.addKey(te)},ae.prototype.addEventListener=function(te,ee){this.eventListeners.addEventListener(te,ee)},ae.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},ae.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ee){return ee(new xe(te))}))},ae.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ee){return ee(new xe(te))}))},ae.instanceCounter=0,ae}(),Ke=fe(57193),xt=fe(63949),kt=(ae,te,ee)=>new Promise((ie,ue)=>{var ne=pt=>{try{ct(ee.next(pt))}catch(Ct){ue(Ct)}},ge=pt=>{try{ct(ee.throw(pt))}catch(Ct){ue(Ct)}},ct=pt=>pt.done?ie(pt.value):Promise.resolve(pt.value).then(ne,ge);ct((ee=ee.apply(ae,te)).next())}),Wt=({data:ae,className:te,fullWidth:ee,style:ie={},onClose:ue,onOk:ne,showFullTools:ge,noAssociationId:ct})=>{const pt=(0,se.useRef)(null),Ct=(0,se.useRef)(null),Re=(0,se.useRef)(null),Zt=(0,se.useRef)(null),[Rt,It]=(0,se.useState)(!1),[un,kn]=(0,se.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,se.useEffect)(()=>(Re.current||(Re.current=document.createElement("style"),document.head.appendChild(Re.current)),ae!=null&&ae.visible?(document.body.setAttribute("data-custom","y-hidden"),Re.current.innerHTML=" html { overflow-y: hidden; }",ae!=null&&ae.src&&cn()):(document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null)),()=>{document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null)}),[ae==null?void 0:ae.visible]);const cn=()=>kt(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const mr=yield(0,xt.ZJ)(ae==null?void 0:ae.src);pt.current.src="",pt.current.src=mr,pt.current.onload=function(){Zn()},It(!1),kn("")}),wn=mr=>kt(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const er=yield(0,Ke.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ae.title,file:mr.dataUrl}});er!=null&&er.id&&!ct?(yield(0,Ke.ZP)(`/api/attachments/${ae.id}/add_subitem.json`,{method:"post",body:{subitem_id:er==null?void 0:er.id,settings:JSON.stringify(mr.state)}})).status===0&&ne():er!=null&&er.id&&ne(er),It(!1),kn("")}),$n=()=>{const mr=document.querySelector('a[href="https://markerjs.com/"]');mr&&mr.parentNode&&(mr.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(ur=>{const nr=document.querySelector(ur.name);nr&&nr.setAttribute("title",ur.title)})},Zn=()=>{Ct.current=new nt(pt.current),Ct.current.targetRoot=Zt.current,Ct.current.addEventListener("render",wn),Ct.current.addEventListener("beforeclose",ue),ge&&(Ct.current.availableMarkerTypes=Ct.current.ALL_MARKER_TYPES,Ct.current.uiStyleSettings.redoButtonVisible=!0,Ct.current.uiStyleSettings.notesButtonVisible=!0,Ct.current.uiStyleSettings.zoomButtonVisible=!0,Ct.current.uiStyleSettings.zoomOutButtonVisible=!0,Ct.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ct.current.uiStyleSettings,Ct.current.show(),ae!=null&&ae.snapshotData&&Ct.current.restoreState(ae.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$n()},300)};return se.createElement(se.Fragment,null,(ae==null?void 0:ae.visible)&&se.createElement(me.Z,{spinning:Rt,tip:un,style:{position:"absolute",width:"100vw"}},se.createElement("div",{ref:Zt,className:_e()(gt.imageDimensions,te,ee?gt.fullWidth:""),style:ie},se.createElement("img",{className:gt.img,ref:pt}))))}},24638:function(Ot,zt,fe){"use strict";var se=fe(59301),gt=fe(77019),Ie=fe(5269),_e=fe(20554),me=fe(99571),Ye=fe(97231),Be=fe(27431),qe=fe(48136),ke=fe(59301);const de=(0,se.forwardRef)(({callback:Te,showSaveButton:ye,value:ft=""},Ue)=>{const Fe=(0,se.useRef)(),Oe=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Le=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r x=a + r\\text{cos}\\theta \\ \r y=b + r\\text{sin}\\theta \r \\end{matrix}\\right. `},{value:`\\begin{array}{l} \r \\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r \\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\left\\{\\begin{matrix} \r \\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r \\end{matrix}\\right. \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r \\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r a \\perp \\alpha \\ \r b \\perp \\alpha \r \\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r \\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r a \\parallel \\partial ,b \\parallel \\partial \r \\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r a \\perp m,a \\perp n \r \\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r \\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r a^{2}+b^{2}=c^{2} \r \\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r \\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r \\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r a,b \\in R^{+} \\ \r \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r a,b \\in R \\ \r \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r \\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r \\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r \\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r \\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r P \\left( \\emptyset \\right) =0 \\\\ \r P \\left( S \\right) =1 \r \\end{array}`},{value:`\\begin{array}{c} \r \\forall A \\in S \\\\ \r P \\left( A \\right) \\ge 0 \r \\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r \\end{array}`},{value:`\\begin{array}{c} \r P_{n}=n! \\\\ \r A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r \\end{array}`}]}]}],st=yt=>{Fe.current.setValue(Fe.current.getValue()+" "+yt.value+" ")},ut=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(gt.Z,{className:Be.Z.lists,gutter:[10,10]},Oe.map((yt,vt)=>ke.createElement(Ie.Z,{flex:"110px",className:Be.Z.item},ke.createElement("div",null,ke.createElement(Ye.Z,{value:`$$${yt.value}$$`}),yt.name),ke.createElement("div",{className:Be.Z.children},yt.children.map((mt,ht)=>ke.createElement("div",{key:ht},ke.createElement("h1",null,mt.name),ke.createElement(gt.Z,{gutter:[10,10]},mt.data.map(($t,Se)=>ke.createElement(Ie.Z,{key:Se,onClick:()=>st($t),className:Be.Z.diamond},ke.createElement(Ye.Z,{value:"`$$"+$t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(gt.Z,{className:Be.Z.lists,gutter:[10,10]},Le.map((yt,vt)=>ke.createElement(Ie.Z,{flex:"110px",className:Be.Z.item},ke.createElement("div",null,ke.createElement(Ye.Z,{value:"`$$"+yt.value+"$$`"}),yt.name),ke.createElement("div",{className:Be.Z.children},yt.children.map((mt,ht)=>ke.createElement("div",{key:ht},mt.name&&ke.createElement("h1",null,mt.name),ke.createElement(gt.Z,{gutter:[10,10]},mt.data.map(($t,Se)=>ke.createElement(Ie.Z,{key:Se,onClick:()=>st($t),className:Be.Z.diamond},ke.createElement(Ye.Z,{value:"`$$"+$t.value+"$$`"}))))))))))}],Et=()=>{var yt=document.createElement("div");yt.innerHTML=Fe.current.getValue();var vt=yt.innerText;return Te&&Te(vt),vt};return(0,se.useImperativeHandle)(Ue,()=>({getData:Et})),ke.createElement("div",{className:Be.Z.mathWrap},ke.createElement(_e.default,{defaultActiveKey:"1",items:ut}),ke.createElement("math-field",{locale:"zh_cn",className:Be.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Fe,style:{width:800,marginTop:30,fontSize:18}},ft||""),ye&&ke.createElement("div",{className:Be.Z.button},ke.createElement(me.ZP,{size:"large",onClick:Et,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});zt.Z=de},13922:function(Ot,zt,fe){"use strict";var se=fe(59301),gt=fe(93314),Ie=fe(99571),_e=Object.defineProperty,me=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,de=(Ue,Fe,Oe)=>Fe in Ue?_e(Ue,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Ue[Fe]=Oe,Te=(Ue,Fe)=>{for(var Oe in Fe||(Fe={}))qe.call(Fe,Oe)&&de(Ue,Oe,Fe[Oe]);if(Be)for(var Oe of Be(Fe))ke.call(Fe,Oe)&&de(Ue,Oe,Fe[Oe]);return Ue},ye=(Ue,Fe)=>me(Ue,Ye(Fe));const ft=({img:Ue,buttonProps:Fe={},styles:Oe={},customText:Le,ButtonText:st,ButtonClick:ut,Buttonclass:Et,ButtonTwo:yt,imgStyles:vt,loading:mt=!1,className:ht=""})=>se.createElement("section",{className:`tc animated fadeIn ${ht}`,style:Te({color:"#999",margin:"100px auto",visibility:mt?"hidden":"visible"},Oe)},se.createElement("img",{src:Ue||gt,style:ye(Te({},vt),{pointerEvents:"none",userSelect:"none"})}),se.createElement("p",{className:"mt20 font14"},Le||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),st&&se.createElement(Ie.ZP,Te({className:Et,onClick:ut},Fe),st),yt&&yt);zt.Z=ft},9931:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return Et}});var se=fe(59301),gt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ie=fe(99571),_e=fe(70557),me=fe(95440),Ye=fe(25399),Be=fe(63949),qe=fe(75823),ke=fe(13922),de=fe(78323),Te=fe(14084),ye=fe(59301),ft=Object.defineProperty,Ue=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Le=(yt,vt,mt)=>vt in yt?ft(yt,vt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):yt[vt]=mt,st=(yt,vt)=>{for(var mt in vt||(vt={}))Fe.call(vt,mt)&&Le(yt,mt,vt[mt]);if(Ue)for(var mt of Ue(vt))Oe.call(vt,mt)&&Le(yt,mt,vt[mt]);return yt},ut=(yt,vt,mt)=>new Promise((ht,$t)=>{var Se=Pe=>{try{rt(mt.next(Pe))}catch(je){$t(je)}},Ge=Pe=>{try{rt(mt.throw(Pe))}catch(je){$t(je)}},rt=Pe=>Pe.done?ht(Pe.value):Promise.resolve(Pe.value).then(Se,Ge);rt((mt=mt.apply(yt,vt)).next())}),Et=({editOffice:yt="view",data:vt,issaver:mt,onSaver:ht,theme:$t,type:Se,filename:Ge,monacoEditor:rt,className:Pe,style:je,close:Ee,onClose:ze,hasMask:Pt,disabledDownload:ot,onImgDimensions:St,showNodata:dt,recordInfo:pe})=>{const[ce,Ve]=(0,se.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wt,lt]=(0,se.useState)(""),[we,Xe]=(0,se.useState)(),Ze=window.ENV==="build"?"/react/build":"",Mt=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Ce=10*(1024*1024),ve=(0,se.useRef)();vt!=null&&vt.startsWith("/api")&&Se!=="txt"&&(vt=de.Z.API_SERVER+vt);const Me=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();Ge&&rt&&(rt.filename=Ge),(0,se.useEffect)(()=>{var et,nt;const Ke=(nt=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:nt.split(";");Ke==null||Ke.map(xt=>{let kt=xt.split("=");kt[0]==="_educoder_session"&<(kt[1])})},[]),(0,se.useEffect)(()=>{Se==="office"&&(vt.indexOf("bigfilescdn.")>-1||vt.indexOf("bigfiles1")>-1?Xe({url:vt,fileType:Me(vt),model:vt.indexOf("model=edit")?"edit":"view"}):xe())},[Se,vt]);function $e(et){return ut(this,null,function*(){et.data.type==="pdfdata"&&(ht(et.data.data),window.removeEventListener("message",$e,!1)),console.log("mess---:",et.data)})}const xe=()=>ut(void 0,null,function*(){console.log("data:",vt);let et=vt;vt.startsWith("http")||(et=location.origin+et);let nt=new URL(et).pathname.split("/").pop();const Ke=yield(0,qe.gJ)({attachment_id:nt});Ke.url=Mt+Ke.url,Xe(Ke)}),He=()=>{if(vt.startsWith("http")||vt.startsWith("blob:")){Je();return}(0,Be.Sv)(Ge||"educoder",vt,Ge)},Je=()=>{pe&&(0,Te.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Be.Nd)(Ge||"educoder",decodeURIComponent(vt))};return ye.createElement("div",{style:st({},je||{}),className:`${Pt&>.bgBlack} ${Se?gt.wrp:"hide"}`},Ee&&ye.createElement("div",{className:gt.close,ref:ve},!!St&&ye.createElement(Ye.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:()=>{ze(),St()}},ye.createElement("i",{className:"icon-yulanpizhu"}))),!ot&&ye.createElement(Ye.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:Je},ye.createElement("i",{className:"icon-quxiaozhiding"}))),mt&&ye.createElement(Ye.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",$e,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},ye.createElement("i",{className:"icon-baocun"}))),ye.createElement(Ye.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{ze()}},ye.createElement("i",{className:"icon-guanbi1"})))),ye.createElement("div",{className:`${gt[Pe]} ${Pe} ${gt.monaco} ${Se==="txt"?"show":"hide"}`},Se==="txt"&&ye.createElement(ye.Fragment,null,ye.createElement(me.ZP,st({},rt)))),Se==="audio"&&ye.createElement("audio",{src:`${(vt==null?void 0:vt.indexOf("http://"))>-1||(vt==null?void 0:vt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${vt}`,autoPlay:!0}),Se==="video"&&ye.createElement(ye.Fragment,null,(vt==null?void 0:vt.indexOf("http"))>-1?ye.createElement("video",{controls:!0,src:`${vt}`,autoPlay:!0}):ye.createElement("video",{controls:!0,src:`data:video/mp4;base64,${vt}`,autoPlay:!0})),Se==="office"&&we&&ye.createElement("iframe",{src:`${Ze}/office.html?key=${we.key}&url=${btoa(we.url)}&callbackUrl=${Mt+(we.callbackUrl||"")}&fileType=${we.fileType}&title=${we.title||""}&model=${yt}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!ot}`}),Se==="html"&&ye.createElement("iframe",{src:vt+"&disposition=inline"}),Se==="pdf"&&ye.createElement("iframe",{id:"pdfiframe",src:`${Ze}/js/pdfview/index.html?filename=${Ge||"educoder.pdf"}&url=${encodeURIComponent(vt)}&disabledDownload=${!!ot}&model=${yt}`}),Se==="image"&&ye.createElement("img",{src:`${(vt==null?void 0:vt.indexOf("http://"))>-1||(vt==null?void 0:vt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${vt}`}),(Se==="other"||Se==="download")&&ye.createElement(ye.Fragment,null,dt?ye.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ye.createElement(Ie.ZP,{icon:ye.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:He,disabled:ot},"\u4E0B\u8F7D")}):ye.createElement(Ie.ZP,{type:"primary",size:"middle",onClick:He,disabled:ot},ye.createElement(_e.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Se==="flowChart"&&ye.createElement("div",{className:"embed"},ye.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${vt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},97231:function(Ot,zt,fe){"use strict";fe.d(zt,{z:function(){return rt},Z:function(){return Pe}});var se=fe(59301),gt=fe(79562),Ie=fe(901),_e=fe(64018),me=fe(80360),Ye=fe(78323),Be=fe(63949),qe=fe(15342),ke=fe(44104),de=fe(99571),Te=fe(1012),ye=fe(9931),ft=fe(59301),Fe=({html:je})=>{const Ee=(0,se.useRef)(null),ze=(0,se.useRef)(null),Pt=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 56px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,se.useEffect)(()=>{const ot=Ee.current.attachShadow({mode:"open"});ze.current=document.createElement("div"),ze.current.className="markdown-body",ze.current.innerHTML=je,ot.appendChild(ze.current);const St=document.createElement("style");return St.textContent=Pt,ot.appendChild(St),()=>{ot.innerHTML=""}},[]),(0,se.useEffect)(()=>{ze.current&&(ze.current.innerHTML=je)},[je]),ft.createElement("div",{ref:Ee})};function Oe(je){const Ee=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],ze=new RegExp(`\\b(${Ee.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return je.replace(ze,"").trim()}var Le={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},st=Object.defineProperty,ut=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,vt=(je,Ee,ze)=>Ee in je?st(je,Ee,{enumerable:!0,configurable:!0,writable:!0,value:ze}):je[Ee]=ze,mt=(je,Ee)=>{for(var ze in Ee||(Ee={}))Et.call(Ee,ze)&&vt(je,ze,Ee[ze]);if(ut)for(var ze of ut(Ee))yt.call(Ee,ze)&&vt(je,ze,Ee[ze]);return je};const ht="@\u2581\u2581@",$t="@\u2581@",Se=/]*>/g;function Ge(je){let Ee=document.createElement("div");return Ee.innerHTML=je,Ee.childNodes.length===0?"":Ee.childNodes[0].nodeValue}const rt=(je,Ee)=>{je=je||"";const ze=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Pt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ot=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,St=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ee?je.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ze,(dt,pe,ce,Ve,wt,lt,we)=>{const Xe=pe||Ve||lt,Ze=ce||wt||we||"?";return Ye.Z.API_SERVER+"/api/attachments/"+Xe+Ze+"&t="+(0,Be.Jn)(Xe,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(je=je.replace(St,(dt,pe,ce,Ve,wt,lt,we)=>{const Xe=pe||Ve||lt,Ze=ce||wt||we||"?";return Ye.Z.API_SERVER+"/attachments/download/"+Xe+Ze+"&t="+(0,Be.Jn)(Xe,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(ze,(dt,pe,ce,Ve,wt,lt,we)=>{const Xe=pe||Ve||lt,Ze=ce||wt||we||"?";return Ye.Z.API_SERVER+"/api/attachments/"+Xe+Ze+"&t="+(0,Be.Jn)(Xe,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Pt,(dt,pe,ce,Ve,wt)=>{const lt=pe||Ve,we=ce||wt||"";return'"'+Ye.Z.API_SERVER+"/api/attachments/"+lt+we+lt+we+"&t="+(0,Be.Jn)(lt,Date.now())}).replace(ot,(dt,pe,ce,Ve,wt)=>{const lt=pe||Ve,we=ce||wt||"";return"("+Ye.Z.API_SERVER+"/files/uploads/"+lt+we+lt+we+"&t="+(0,Be.Jn)(lt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').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,` `),je)};var Pe=({value:je="",edit:Ee=!1,className:ze,showTextOnly:Pt,showLines:ot,style:St={},stylesPrev:dt={},highlightKeywords:pe,showProgramFill:ce,isProgramFill:Ve,disabledFill:wt=!1,programFillValue:lt,openEditor:we=()=>{},onFillChange:Xe=it=>{},onFillBlur:Ze=()=>{},onFillFocus:Mt=()=>{}})=>{let it=Oe(String(je||""));const Ce=(0,se.useRef)(),ve=(0,se.useRef)(),[Me,$e]=(0,se.useState)(""),[xe,He]=(0,se.useState)("office"),[Je,et]=(0,se.useState)([]),nt=(0,se.useRef)("a"+(0,Te.Z)()),Ke={},xt=Re=>//i.test(Re||""),kt=(Re,Zt,Rt)=>{const It=document.createElement(Re===$t?"input":"textarea");It.style.width="100%",It.style.height=Re===$t?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=Zt;const un=Object.keys(Ke).length;return Ke[un]=It,`${It.outerHTML}`};function Yt(Re){return Re=Re.replace(/!\[.*?\]\(.*?\)/g,""),Re=Re.replace(/\[.*?\]\(.*?\)/g,""),Re=Re.replace(new RegExp("","gs"),""),Re=Re.replace(//g,""),Re=Re.replace(//g,""),Re=Re.replace(new RegExp(".*?<\\/video>","gs"),""),Re=Re.replace(new RegExp(".*?<\\/audio>","gs"),""),Re=Re.replace(new RegExp(".*?<\\/style>","gs"),""),Re=Re.replace(new RegExp(".*?<\\/script>","gs"),""),Re}const Wt=Re=>!Pt&&xt(it)?Re:Re.replace(/([\s\S]+?)<\/style>/gim,function(Zt,Rt){let It=Rt.replace(/(\n|\r)/g,"").split("}"),un=[];return It.map(kn=>{kn!=""&&un.push(`.${nt.current} ${kn}`)}),``}),ae=(0,se.useMemo)(()=>{try{const It=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;it=it.replace(cn,"("+Ye.Z.API_SERVER+"/attachments/download/").replace(It,"("+Ye.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Ye.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Ye.Z.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,` `),Ce.current.style.display="none"}catch(It){}if(ce){let It=-1;return it=it.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(un,kn,cn){var wn;return++It,kt(un,It,(wn=lt==null?void 0:lt[It])==null?void 0:wn.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Wt(it||"")}
`}let Re=Wt(it);Re=(0,Ie.ZP)(Re);const Zt=(0,Ie.ez)();it.match(/\[TOC\]/)&&(Re=Re.replace("

[TOC]

",(0,Ie.Qv)()),(0,Ie.Iy)()),Re=Re.replace(/(__special_katext_id_\d+__)/g,(It,un)=>{const{type:kn,expression:cn}=Zt[un];return(0,qe.renderToString)(Ge(cn)||"",{displayMode:kn==="block",throwOnError:!1,output:"html"})}),Re=Re.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ie.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=Re,Pt)return Rt.innerText;if(pe){const It=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ue(Rt,It),Rt.innerHTML}return setTimeout(()=>ct(),500),Rt.innerHTML},[it,pe]);(0,se.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(Zt=>{Zt.oninput=te,Zt.onblur=ee,Zt.onfocus=ie})},[Je]),(0,se.useEffect)(()=>{var Re,Zt,Rt,It,un;if(lt!=null&<.length)try{const kn=ne.current.querySelectorAll(".edu-program-fill-score"),cn=ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[wn,$n]of cn.entries())$n.value=((Re=lt==null?void 0:lt[wn])==null?void 0:Re.value)||"",((Zt=lt==null?void 0:lt[wn])==null?void 0:Zt.type)==="warning"?$n.className="program-fill-warning":((Rt=lt==null?void 0:lt[wn])==null?void 0:Rt.type)==="success"?$n.className="program-fill-success":$n.className="";for(const[wn,$n]of kn.entries())$n.innerHTML=(It=lt==null?void 0:lt[wn])!=null&&It.score?`${(un=lt==null?void 0:lt[wn])==null?void 0:un.score}\u5206`:"";et(lt)}catch(kn){console.log(kn,"error")}},[lt]);const te=Re=>{Je[Re.target.dataset.id]=Je[Re.target.dataset.id]||{},Je[Re.target.dataset.id].value=Re.target.value,et([...Je]),Xe(Je,Re.target.dataset.id)},ee=Re=>{Je[Re.target.dataset.id]=Je[Re.target.dataset.id]||{},Je[Re.target.dataset.id].value=Re.target.value,et([...Je]),Ze(Je,Re.target.dataset.id)},ie=Re=>{Je[Re.target.dataset.id]=Je[Re.target.dataset.id]||{},Je[Re.target.dataset.id].value=Re.target.value,et([...Je]),Mt(Je,Re.target.dataset.id)};function ue(Re,Zt){return Re.childNodes.forEach(Rt=>{var It;if(Rt.childNodes.length>0)ue(Rt,Zt);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=(It=Rt.innerHTML)==null?void 0:It.replace(new RegExp(Zt,"gi"),'$&');else{const un=document.createElement("span");un.innerHTML=Rt.textContent.replace(new RegExp(Zt,"gi"),'$&'),Rt.replaceWith(un)}})}const ne=(0,se.useRef)();Ie.jb.WebkitLineClamp=ot,ot&&(St=mt(mt({},St),Ie.jb));function ge(Re){let Zt=Re.target;if(Zt.tagName.toUpperCase()==="A"){let Rt=Zt.getAttribute("href");if(Rt.indexOf("office")>-1)Re.preventDefault(),$e(Rt),He("office");else if(Rt.indexOf("application/pdf")>-1)Re.preventDefault(),$e(Rt),He("pdf");else if(Rt.indexOf("text/html")>-1)Re.preventDefault(),$e(Rt),He("html");else if(Rt.startsWith("#")){Re.preventDefault();let It=document.getElementById(Rt.replace("#",""));It&&It.scrollIntoView(!0)}}}const ct=()=>{var Re;const Zt=(Re=ne.current)==null?void 0:Re.querySelectorAll("video");Zt==null||Zt.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var It=new me.ZP;It.loadSource(Rt.src),It.attachMedia(Rt)}}})};(0,se.useEffect)(()=>{if(ne.current&&ae&&ae.match(Se)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",ge),()=>{var Re;(Re=ne.current)==null||Re.removeEventListener("click",ge),(0,Ie.AL)(),(0,Ie.Iy)()}},[ae,ne.current,ge]);const pt=Re=>{Re.target.nodeName==="IMG"&&Re.target.className.indexOf("draw-flowchart")>-1?(Ce.current.style.zIndex=1,Ce.current.style.display="flex",Ce.current.style.width=Re.target.clientWidth+"px",Ce.current.style.height=Re.target.clientHeight+"px",Ce.current.style.top=Re.target.offsetTop+"px",Ce.current.style.left=Re.target.offsetLeft+"px",Re.target.id&&(ve.current=Re.target.id)):Ce.current.style.display="none"},Ct=()=>{Ce.current.style.display="none"};return(0,se.useEffect)(()=>{var Re;const Zt=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(Re=ne.current)==null||Re.addEventListener("copy",Zt),()=>{var Rt;(Rt=ne.current)==null||Rt.removeEventListener("copy",Zt)}},[ne.current]),se.createElement("div",{style:{position:"relative"},onMouseLeave:Ct},Pt&&se.createElement("div",{ref:ne,className:`${Le.mdBody} `},ae),!Pt&&!xt(ae)&&se.createElement("div",{ref:ne,style:mt({},St),onMouseOver:pt,className:`${ze||""} ${wt?"disabled-fill":""} markdown-body ${Le.mdBody} ${nt.current}`,dangerouslySetInnerHTML:{__html:ae}}),!Pt&&xt(ae)&&se.createElement(Fe,{html:ae}),se.createElement("div",{ref:Ce,className:`${Le.button} ${Ee?"":Le.previewFlowChart}`},se.createElement(ke.Z,null,se.createElement(de.ZP,{onClick:()=>{Ee?we(ve.current):($e(ve.current),He("flowChart"))}},Ee?"\u7F16\u8F91":"\u9884\u89C8"))),se.createElement(ye.Z,{close:!0,data:Me,type:Me!=null&&Me.length?xe:"",style:mt({},dt),onClose:()=>$e("")}))}},99678:function(Ot,zt,fe){"use strict";fe.d(zt,{h:function(){return yt},Z:function(){return Et}});var se=fe(59301),gt=fe(82326),Ie=fe(28284),_e=fe(99571),me=fe(89780),Ye=fe.n(me),Be=fe(4887),qe=Object.defineProperty,ke=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Ue=(vt,mt,ht)=>mt in vt?qe(vt,mt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):vt[mt]=ht,Fe=(vt,mt)=>{for(var ht in mt||(mt={}))ye.call(mt,ht)&&Ue(vt,ht,mt[ht]);if(Te)for(var ht of Te(mt))ft.call(mt,ht)&&Ue(vt,ht,mt[ht]);return vt},Oe=(vt,mt)=>ke(vt,de(mt));const Le=gt.default.Option,st={labelCol:{span:4},wrapperCol:{span:20}},ut={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"]};var Et=({callback:vt,onCancel:mt})=>{const[ht,$t]=(0,se.useState)("python");function Se(rt){$t(ut[rt][1])}function Ge(rt){vt(rt)}return se.createElement(Ie.default,Oe(Fe({},st),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ge,style:{width:500}}),se.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},se.createElement(gt.default,{getPopupContainer:rt=>rt.parentNode,onChange:Se},Object.keys(ut).map(rt=>se.createElement(Le,{key:rt,value:rt},ut[rt][0])))),se.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},se.createElement(yt,{mode:ht})),se.createElement("div",{className:"flex-container flex-end"},se.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(_e.ZP,{type:"ghost",onClick:mt},"\u53D6\u6D88")))};function yt({value:vt,onChange:mt,mode:ht,options:$t={}}){const Se=(0,se.useRef)(),[Ge,rt]=(0,se.useState)();return(0,se.useEffect)(()=>{if(Ge){let Pe=function(je){const Ee=je.getValue();mt&&mt(Ee)};return Ge.on("change",Pe),()=>{Ge.off("change",Pe)}}},[Ge,mt]),(0,se.useEffect)(()=>{Ge&&Ge.setOption("mode",ht)},[Ge,ht]),(0,se.useEffect)(()=>{Ge&&(vt!==Ge.getValue()||vt==="")&&setTimeout(()=>{Ge.setValue(vt||"")},300)},[Ge,vt]),(0,se.useEffect)(()=>{if(Se.current&&!Ge){const Pe=Ye().fromTextArea(Se.current,Fe({mode:ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},$t));rt(Pe)}},[Se.current,Ge]),se.createElement("div",{className:"my-codemirror-container"},se.createElement("textarea",{ref:Se}))}},17949:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return xr}});var se=fe(59301),gt=fe(95392),Ie=fe(89780),_e=fe.n(Ie),me=fe(76374),Ye=fe(4887),Be=fe(6313),qe=fe(25717),ke=fe(99498),de=fe(25419),Te=fe(67549),ye=fe(97231),ft=({value:Ut="",className:pn,showTextOnly:En,showLines:Tn,style:Jn={}})=>{const tr=(0,se.useMemo)(()=>"",[Ut]);return se.createElement(se.Fragment,null,se.createElement("div",{dangerouslySetInnerHTML:{__html:tr}}))},Ue=Object.defineProperty,Fe=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Et=(Ut,pn,En)=>pn in Ut?Ue(Ut,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Ut[pn]=En,yt=(Ut,pn)=>{for(var En in pn||(pn={}))st.call(pn,En)&&Et(Ut,En,pn[En]);if(Le)for(var En of Le(pn))ut.call(pn,En)&&Et(Ut,En,pn[En]);return Ut},vt=(Ut,pn)=>Fe(Ut,Oe(pn));let mt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function ht({onActionCallback:Ut,title:pn,icon:En,actionName:Tn,className:Jn="",children:tr}){function dr(){Ut(Tn)}return se.createElement("a",{title:pn,className:Jn,onClick:dr},se.createElement("i",{className:`${En}`}),tr)}var $t=({watch:Ut,showNullButton:pn,showNullProgramButton:En,onActionCallback:Tn,fullScreen:Jn,insertTemp:tr,hidetoolBar:dr,extraUse:_n})=>{const Fn=[...mt,{title:`${Ut?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ut?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return se.createElement("ul",{className:"markdown-toolbar-container"},!dr&&Fn.map((hr,jt)=>se.createElement("li",{key:jt},hr.actionName?se.createElement(ht,vt(yt({},hr),{onActionCallback:Tn})):se.createElement("span",{className:"v-line"}))),pn?se.createElement("li",null,se.createElement(ht,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,En?se.createElement(se.Fragment,null,se.createElement("li",null,se.createElement(ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),se.createElement("li",null,se.createElement(ht,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,tr&&se.createElement("li",null,se.createElement(ht,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${tr}`,onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&se.createElement("li",null,_n),se.createElement("li",{className:"btn-full-screen"},se.createElement(ht,{icon:`${Jn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Jn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Tn})))},Se=fe(81123),Ge=fe(28284),rt=fe(37568),Pe=fe(99571),je=Object.defineProperty,Ee=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,Pt=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,dt=(Ut,pn,En)=>pn in Ut?je(Ut,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Ut[pn]=En,pe=(Ut,pn)=>{for(var En in pn||(pn={}))ot.call(pn,En)&&dt(Ut,En,pn[En]);if(Pt)for(var En of Pt(pn))St.call(pn,En)&&dt(Ut,En,pn[En]);return Ut},ce=(Ut,pn)=>Ee(Ut,ze(pn));const Ve={labelCol:{span:4},wrapperCol:{span:20}};var wt=({callback:Ut,onCancel:pn})=>{function En(Tn){Ut(Tn)}return se.createElement(Ge.default,ce(pe({},Ve),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:En,style:{width:500}}),se.createElement(Ge.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},se.createElement(rt.default,null)),se.createElement(Ge.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},se.createElement(rt.default,null)),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Pe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},lt=fe(99678),we=fe(90443),Xe=fe(62957),Ze=fe(77019),Mt=fe(54344),it=fe(59301),Ce=({callback:Ut,onCancel:pn})=>{const En=document.createElement("canvas"),Tn=En.getContext("2d");En.width=1e3,En.height=800,Tn.fillStyle="#ffffff",Tn.fillRect(0,0,En.width,En.height);const Jn=En.toDataURL("image/png");return it.createElement(Xe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},it.createElement(Ze.Z,{style:{height:"100vh"}},it.createElement(Mt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Jn,visible:!0,title:String(Date.now())},onOk:tr=>{Ut({src:tr.url})},onClose:pn})))},ve=fe(30641),Me=fe(5269),$e=fe(6767),xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},He=fe(59301),et=(0,se.forwardRef)(({onCancel:Ut,editImgId:pn,callback:En},Tn)=>{let Jn=(0,se.useRef)(),tr=(0,se.useRef)(),dr=(0,se.useRef)(),_n=(0,se.useRef)(!1);const Fn=(0,se.useRef)(!1);console.log("ref:",Tn);const[hr,jt]=(0,se.useState)(0),[at,Qt]=(0,se.useState)("100vh");return(0,se.useEffect)(()=>{jt(1)},[]),(0,se.useImperativeHandle)(Tn,()=>({setHeight:Qt})),He.createElement("div",{ref:Fn,className:"body-overflow-initial"},He.createElement(ve.Z,{width:"100vw",height:at,footer:null,closable:!0,placement:"bottom",open:!!hr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${xe.drawerWrap}`,onClose:()=>{window.saveDrawData(Cn=>{En({src:`/api/attachments/${Cn}`,id:Cn})})},title:He.createElement(Ze.Z,{align:"middle"},He.createElement(Me.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),He.createElement(Me.Z,{onClick:()=>{Qt(at==="60px"?"100vh":"60px")}},He.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),He.createElement(Me.Z,{onClick:()=>{window.saveDrawData(Cn=>{if(Cn===null){$e.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}$e.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),En({src:`/api/attachments/${Cn}`,id:Cn,disabledClose:!0})})}},He.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},He.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${pn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:tr})))}),nt=fe(78323),Ke=fe(47889),xt=fe(1439);const kt=Ke.ZP.Group,Yt={margin:"0 8px"};var Wt=({callback:Ut,onCancel:pn})=>{function En(Tn){Ut(Tn)}return se.createElement(Ge.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:En},se.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},se.createElement("span",{style:Yt},"\u5355\u5143\u683C\u6570\uFF1A"),se.createElement("span",{style:Yt},"\u884C\u6570"),se.createElement(Ge.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},se.createElement(xt.Z,null)),se.createElement("span",{style:Yt},"\u5217\u6570"),se.createElement(Ge.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},se.createElement(xt.Z,null))),se.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},se.createElement("span",{style:Yt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),se.createElement(Ge.default.Item,{name:"align"},se.createElement(kt,null,se.createElement(Ke.ZP,{value:"default"},se.createElement("i",{className:"fa fa-align-justify"})),se.createElement(Ke.ZP,{value:"left"},se.createElement("i",{className:"fa fa-align-left"})),se.createElement(Ke.ZP,{value:"center"},se.createElement("i",{className:"fa fa-align-center"})),se.createElement(Ke.ZP,{value:"right"},se.createElement("i",{className:"fa fa-align-right"}))))),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Pe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},ae=fe(71411),te=fe(63089),ee=fe.n(te),ue=(0,se.forwardRef)(({use3d:Ut,width:pn,height:En,callback:Tn,showSaveButton:Jn},tr)=>{const dr=(0,se.useRef)(),_n=(0,se.useRef)(),[Fn,hr]=(0,se.useState)(!1),jt=(0,se.useRef)({id:dr,appName:"graphing",width:pn||1e3,height:En||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,se.useEffect)(()=>{_n.current=new(ee())(jt.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const at=()=>{var Qt=window.ggbApplet.getPNGBase64(1,!0,72);return Tn&&Tn(Qt),Qt};return(0,se.useEffect)(()=>{jt.current.appName=Fn?"3D":"graphing",_n.current.inject("applet_container")},[Fn]),(0,se.useEffect)(()=>{hr(Ut)},[Ut]),(0,se.useImperativeHandle)(tr,()=>({getImgData:at})),se.createElement(se.Fragment,null,se.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:dr}),se.createElement(Ze.Z,{align:"middle"},se.createElement(Me.Z,{flex:1},se.createElement(ae.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Fn,onChange:Qt=>hr(Qt)})),se.createElement(Me.Z,null,se.createElement(Pe.ZP,{size:"large",onClick:at,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=fe(24638);const ge="link",ct="upload-image",pt="add-flowchart",Ct="draw-image",Re="add-flowchart",Zt="code-block",Rt="add-table",It="------------",un={default:It,left:`:${It}`,center:`:${It}:`,right:`${It}:`};var kn=fe(66991),cn=fe(63949);function wn(){}let $n=0;const Zn=1e4,mr="\u2581",er="@\u2581\u2581@",ur="@\u2581@",nr=` **\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`,In=["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"];function rr(Ut){return/^\d+$/.test(Ut)?`${Ut}px`:Ut}const Bn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xn={[Bn+"-B"]:"bold",[Bn+"-I"]:"italic"},Kn={[ge]:"\u6DFB\u52A0\u94FE\u63A5",[Zt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ct]:"\u6DFB\u52A0\u56FE\u7247",[Ct]:"\u6DFB\u52A0\u753B\u56FE",[pt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Rt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var xr=({defaultValue:Ut="",onChange:pn,width:En="100%",height:Tn=400,miniToolbar:Jn=!1,isFocus:tr=!1,watch:dr,insertTemp:_n,mode:Fn="markdown",id:hr="markdown-editor-id",showResizeBar:jt=!1,noStorage:at=!1,showNullButton:Qt=!1,showNullProgramButton:Cn=!1,hidetoolBar:Gn=!1,fullScreen:Ae=!1,onBlur:Ne,onCMBeforeChange:Bt,onFullScreen:Dt,className:We="",disablePaste:Lt=!1,disabled:Xt=!1,disabledFill:tn=!1,placeholder:hn="",values:_t="",extraUse:qt,onAddBlank:At})=>{const[bt,en]=(0,se.useState)(null),[vn,mn]=(0,se.useState)(Ut),[xn,Hn]=(0,se.useState)(dr),[Yn,dn]=(0,se.useState)(Ae),[Gt,gn]=(0,se.useState)(""),[nn,Wn]=(0,se.useState)(0),[wr,Qn]=(0,se.useState)(Tn),[Lr,Mr]=(0,se.useState)(!1),[Cr,ir]=(0,se.useState)(0),[Rr,gr]=(0,se.useState)(0),or=(0,se.useRef)(),Er=(0,se.useRef)(),Tr=(0,se.useRef)(),pr=(0,se.useRef)(),qn=(0,se.useRef)(),jn=(0,se.useRef)(),Br=(0,gt.useDispatch)();(0,se.useEffect)(()=>{const Vt=window.scrollY||window.pageYOffset;mn(_t),bt==null||bt.setValue(_t),window.scrollTo(0,Vt)},[_t]),(0,se.useEffect)(()=>{Dt==null||Dt(Yn)},[Yn]),(0,se.useEffect)(()=>{if(or.current){let Vt=function(rn,ln){var Mn;if(Lt){ln.preventDefault();return}const sr=ln.clipboardData;if(sr){const Vn=sr.types.toString(),yr=sr.items;if(Vn==="Files"||sr.types.indexOf("Files")>-1){if(ln.preventDefault(),Fn=="stex")return;try{let br=yr[1];((Mn=yr[0])==null?void 0:Mn.kind)==="file"&&(br=yr[0]);const Sr=br.getAsFile(),zr=Sr.name.split(".").pop();(0,we.I)(Sr,Ar=>{var Hr,ei,Li;Ar.id?((Hr=Sr==null?void 0:Sr.type)==null?void 0:Hr.indexOf("image"))>-1?Ft.replaceSelection(``):((ei=Sr==null?void 0:Sr.type)==null?void 0:ei.indexOf("video"))>-1?Ft.replaceSelection(``):((Li=Sr==null?void 0:Sr.type)==null?void 0:Li.indexOf("pdf"))>-1?Ft.replaceSelection(`${Sr.name}`):In.includes(zr)?Ft.replaceSelection(`${Sr.name}`):Ft.replaceSelection(`[${Sr.name}](/api/attachments/${Ar.id}?type=${Ar.content_type})`):(Ar==null?void 0:Ar.status)===401&&(document.location.href="/user/login")})}catch(br){$e.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ft=_e().fromTextArea(or.current,{mode:Fn,lineNumbers:!Jn,lineWrapping:!0,value:Ut,autoCloseTags:!0,autoCloseBrackets:!0});return Ft.on("keyup",function(rn,ln){ln.keyCode===8&&(rn.getValue()==""?Ft.setOption("placeholder",hn):Ft.setOption("placeholder",null))}),Ft.on("keydown",function(rn,ln){if(ln.keyCode===8){var Mn=Jr(rn);Mn&&ln.preventDefault()}}),tr&&Ft.focus(),Ft.on("paste",Vt),Xt&&Ft.on("beforeChange",function(rn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),en(Ft),()=>{Ft.off("paste",Vt)}}},[]);const Vr=(0,se.useCallback)(()=>{if(Er.current)try{}catch(Vt){console.log(Vt,"---- to set md editor body height")}},[wr,Er,Yn]);(0,se.useEffect)(()=>{function Vt(){let Ft=new me.Z(rn=>{for(let ln of rn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Vr(),bt.setSize("100%","100%"),bt.refresh())});return Ft.observe(or.current.parentElement),Ft}if(bt){const Ft=Vt();return()=>{var rn,ln;(rn=or.current)!=null&&rn.parentElement&&Ft.unobserve((ln=or.current)==null?void 0:ln.parentElement)}}},[bt,Vr]),(0,se.useEffect)(()=>{if(bt){let Vt=[];for(const[Ft,rn]of Object.entries(Xn)){let ln={[Ft]:()=>{Dr(rn)}};Vt.push(ln),bt.addKeyMap(ln)}return()=>{for(let Ft of Vt)bt.removeKeyMap(Ft)}}},[bt]),(0,se.useEffect)(()=>{Ae!==Yn&&dn(Ae)},[Ae]),(0,kn.Z)(()=>{if(!at&&nn>0){let Vt=new Date().getTime(),Ft=window.sessionStorage.getItem(hr);Vt>=nn+Zn&&(!Ft||Ft!==vn)&&(window.sessionStorage.setItem(hr,vn),Mr(!0))}},Zn),(0,se.useEffect)(()=>{Hn(dr)},[bt,dr]),(0,se.useEffect)(()=>{bt&&tr&&bt.focus()},[bt,tr]),(0,se.useEffect)(()=>{if(xn&&bt){let Vt=function(rn){let ln=rn.target;if(pr.current){let Mn=ln.scrollTop/ln.scrollHeight;pr.current.scrollTop=pr.current.scrollHeight*Mn}};const Ft=bt.getScrollerElement();return Ft.addEventListener("scroll",Vt),()=>{Ft.removeEventListener("scroll",Vt)}}},[bt,xn]),(0,se.useEffect)(()=>{if(bt&&Bt){let Vt=function(Ft,rn){Bt(Ft,rn)};return bt.on("beforeChange",Vt),()=>{bt.off("beforeChange",Vt)}}},[bt,Bt]),(0,se.useEffect)(()=>{if(bt&&Ne){let Vt=function(){Ne(bt.getValue())};return bt.on("blur",Vt),()=>{bt.off("blur",Vt)}}},[bt,Ne]);function Jr(Vt,Ft){var rn=Vt.getDoc(),ln=rn.getCursor(),Mn=rn.getLine(ln.line),sr=Mn.charAt(ln.ch-1),Vn=Mn.lastIndexOf("@\u2581@",ln.ch),yr=Mn.lastIndexOf("@\u2581\u2581@",ln.ch),br=Vn>yr?Vn:yr,Sr=Vn>yr?3:4;if(er.indexOf(sr)===-1)return null;if(console.log("change1:",Ft,Vt,Mn,ln,br,Vn,yr,sr),br>=0&&ln.ch-br<5){var zr=br+Sr;return rn.replaceRange("",{line:ln.line,ch:br},{line:ln.line,ch:zr}),{line:ln.line,ch:zr}}return null}(0,se.useEffect)(()=>{if(bt){let Vt=function(Ft,rn){const ln=Ft.getValue();mn(ln),Wn(new Date().getTime()),Ft.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pn&&(Cn?pn(ln,Kt(ln)):pn(ln))};return bt.on("change",Vt),()=>{bt.off("change",Vt)}}},[bt,pn]),(0,se.useEffect)(()=>{if(bt)if(Ut==null)bt.setValue(""),mn("");else{const Vt=window.scrollY||window.pageYOffset;Ut!==bt.getValue()&&(bt.setValue(Ut),mn(Ut),bt.setCursor(Xt?1:bt.lineCount(),0),window.scrollTo(0,Vt))}},[bt,Ut]);const Dr=(0,se.useCallback)(Vt=>{const Ft=bt.getCursor(),rn=bt.getSelection();let ln=rn.split(` `);switch(Vt){case"bold":return bt.replaceSelection("**"+rn+"**"),rn===""&&bt.setCursor(Ft.line,Ft.ch+2),bt.focus();case"italic":return bt.replaceSelection("*"+rn+"*"),rn===""&&bt.setCursor(Ft.line,Ft.ch+1),bt.focus();case"code":return bt.replaceSelection("`"+rn+"`"),rn===""&&bt.setCursor(Ft.line,Ft.ch+1),bt.focus();case"inline-latex":return(0,cn.Ye)(Br)?void 0:(gn("inline-latex"),bt.focus());case"latex":return bt.replaceSelection("```latex\n"+rn+"\n```"),bt.setCursor(Ft.line+1,rn.length+1),bt.focus();case"line-break":return bt.replaceSelection(`
`),bt.focus();case"list-ul":return rn===""?bt.replaceSelection("- "+rn):bt.replaceSelection(ln.map(Mn=>Mn===""?"":`- ${Mn}`).join(` `)),bt.focus();case"list-ol":return rn===""?bt.replaceSelection("1. "+rn):bt.replaceSelection(ln.map((Mn,sr)=>Mn===""?"":`${sr+1}. ${Mn}`).join(` `)),bt.focus();case"add-null-ch":At==null||At();return;case"add-signal":return rn===""&&bt.setCursor(Ft.line,Ft.ch),bt.replaceSelection(ur),bt.focus();case"add-multiple":return rn===""&&bt.setCursor(Ft.line,Ft.ch),bt.replaceSelection(er),bt.focus();case"inster-template-1":return rn===""&&bt.setCursor(Ft.line,Ft.ch),bt.replaceSelection(nr),bt.focus();case"eraser":return bt.setValue(""),bt.focus();case"trigger-watch":return Hn(!xn),bt.focus();case"trigger-full-screen":return dn(!Yn),bt.focus();case ge:gn(ge);return;case Zt:gn(Zt);return;case ct:gn(ct);return;case Ct:gn(Ct);return;case"maths-latex":if((0,cn.Ye)(Br))return;gn("maths-latex");return;case pt:qn.current="",sessionStorage.removeItem("file_id"),gn(pt);return;case Rt:gn(Rt);return;default:throw new Error}},[bt,xn,Yn]),Wr=(0,se.useCallback)((Vt,Ft)=>{var rn,ln,Mn,sr,Vn,yr;Vt!=null&&Vt.disabledClose||gn("");const{src:br,alt:Sr,id:zr}=Vt||{};switch(Gt){case ge:const{title:Oi,link:xi}=Vt;return bt.replaceSelection(`[${Oi}](${xi})`),bt.focus();case Zt:const{language:vi,content:Xi}=Vt;return bt.replaceSelection(["```"+vi,Xi,"```"].join(` `)),bt.focus();case"maths-latex":for(var Ar=atob(Vt),Hr=new Uint8Array(Ar.length),ei=0;ei{mi.id?bt.replaceSelection(`![,](/api/attachments/${mi.id}?type=${mi.content_type})`):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,cn.Ye)(Br))return;bt.replaceSelection("`$$"+Vt+"$$`");break;case Re:if(!zr)return;bt.getValue().indexOf(br)===-1?bt.replaceSelection(`
${Sr||
`):document.getElementById(zr).src=nt.Z.API_SERVER+br+"?t="+Date.now();break;case ct:case Ct:const fr=Ft,to=(Mn=(ln=(rn=fr==null?void 0:fr.name)==null?void 0:rn.split("."))==null?void 0:ln.pop)==null?void 0:Mn.call(ln);return((sr=fr==null?void 0:fr.type)==null?void 0:sr.indexOf("image"))>-1||!(fr!=null&&fr.type)?fr!=null&&fr.align||fr!=null&&fr.width?bt.replaceSelection(`

${Sr||

`):bt.replaceSelection(`${Sr||`):((Vn=fr==null?void 0:fr.type)==null?void 0:Vn.indexOf("video"))>-1?bt.replaceSelection(``):((yr=fr==null?void 0:fr.type)==null?void 0:yr.indexOf("pdf"))>-1?bt.replaceSelection(`${fr.name}`):In.includes(to)?bt.replaceSelection(`${fr.name}`):bt.replaceSelection(`[${fr.name}](${br})`),bt.focus();case Rt:const{row:ti,col:Ni,align:ao}=Vt;let Ji=` `;for(let mi=0;mi{switch(Gt){case ge:return se.createElement(wt,{callback:Wr,onCancel:_r});case Zt:return se.createElement(lt.Z,{callback:Wr,onCancel:_r});case ct:return se.createElement(we.Z,{callback:Wr,onCancel:_r});case pt:return se.createElement(et,{editImgId:qn.current,callback:Wr,onCancel:_r});case Rt:return se.createElement(Wt,{callback:Wr,onCancel:_r});case"maths-latex":return se.createElement(ue,{showSaveButton:!0,callback:Wr});case"inline-latex":return se.createElement(ne.Z,{showSaveButton:!0,callback:Wr});default:return null}},[Gt]);function _r(){gn("")}(0,se.useEffect)(()=>{if(Tr.current){let Vt=function(Vn){Mn=!0,sr=Vn.pageY},Ft=function(){Mn=!1},rn=function(Vn){if(Mn){let yr=Vn.pageY-sr;yr<0&&(yr=0),yr>300&&(yr=300);let br=Tn+yr+"px";Qn(br)}},ln=Tr.current,Mn=!1,sr=0;return ln.addEventListener("mousedown",Vt),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",Ft),()=>{ln.removeEventListener("mousedown",Vt),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",Ft)}}},[bt,Tr]),(0,se.useEffect)(()=>{Qn(Tn)},[Tn]);const ii=rr(En),Or=rr(wr),Rn={width:ii,height:Or},Ht=(0,se.useMemo)(()=>{if(nn){let Vt=new Date(nn),Ft=Vt.getHours(),rn=Vt.getMinutes(),ln=Vt.getSeconds();return Ft=Ft<10?"0"+Ft:Ft,rn=rn<10?"0"+rn:rn,ln=ln<10?"0"+ln:ln,`${Ft}:${rn}:${ln}`}return 0},[nn]),Kt=Vt=>{const Ft=[];if(Cn){let rn=-1;Vt=Vt.replace(/(@▁▁@|@▁@)/g,function(ln,Mn,sr){Ft.push({multiLine:ln!==ur})})}return Ft};function yn(){window.sessionStorage.removeItem(hr),Mr(!1),Wn(0)}function on(){Mr(!1),Wn(0),bt.setValue(window.sessionStorage.getItem(hr))}(0,se.useEffect)(()=>{Kn[Gt]&&Gt!==Ct&&Gt!==pt&&setTimeout(()=>{const Vt=document.getElementsByClassName("markdown-popup-form")[0],Ft=window.innerWidth/2-Vt.offsetWidth/2,rn=window.innerHeight/2-Vt.offsetHeight/2;ir(Ft),gr(rn)},0)},[Gt]);const Dn=Vt=>{Vt.preventDefault();const Ft=Vt.clientX-Cr,rn=Vt.clientY-Rr;document.body.onmousemove=ln=>{let Mn=ln.clientX-Ft,sr=ln.clientY-rn;const Vn=document.getElementsByClassName("markdown-popup-form")[0],yr=window.innerWidth-Vn.offsetWidth,br=window.innerHeight-Vn.offsetHeight;Mn=Math.max(0,Math.min(Mn,yr)),sr=Math.max(0,Math.min(sr,br)),ar(ln.clientX,ln.clientY,Ft,rn)&&(ir(Mn),gr(sr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ar=(Vt,Ft,rn,ln)=>{const Mn=document.body.clientHeight,sr=document.body.clientWidth;return Vt<20&&rn>Vt||Vt>sr-20&&rnFt||Ft>Mn-20&&ln{var Ft;qn.current=Vt,(Ft=jn.current)==null||Ft.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),jt?se.createElement("a",{ref:Tr,className:"editor-resize"}):null,Gt===Ct&&se.createElement(Ce,{callback:Wr,onCancel:_r}),Gt===pt&&se.createElement(et,{ref:jn,editImgId:qn.current,callback:Wr,onCancel:_r}),se.createElement(Se.Z,null,Kn[Gt]&&Gt!==Ct&&Gt!==pt?se.createElement(Xe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Rr},title:se.createElement("div",{style:{cursor:"move"},onMouseDown:Dn},Kn[Gt]),open:!0,onCancel:_r,footer:null,destroyOnClose:!0,width:Gt===pt?"1200px":null,height:Gt===pt?"80vh":null,className:"markdown-popup-form"},Nr):null))}},90443:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return mt},I:function(){return $t}});var se=fe(28284),gt=fe(6767),Ie=fe(37568),_e=fe(44104),me=fe(1439),Ye=fe(47889),Be=fe(99571),qe=fe(88457),ke=fe(59301),de=fe(59301),Te=Object.defineProperty,ye=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Le=(Se,Ge,rt)=>Ge in Se?Te(Se,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Se[Ge]=rt,st=(Se,Ge)=>{for(var rt in Ge||(Ge={}))Fe.call(Ge,rt)&&Le(Se,rt,Ge[rt]);if(Ue)for(var rt of Ue(Ge))Oe.call(Ge,rt)&&Le(Se,rt,Ge[rt]);return Se},ut=(Se,Ge)=>ye(Se,ft(Ge));const{useForm:Et}=se.default,yt={width:280,marginRight:10},vt={labelCol:{span:5},wrapperCol:{span:19}};var mt=({callback:Se,onCancel:Ge})=>{const[rt]=Et();let Pe=(0,ke.useRef)();function je(Pt){Pe.current.width=rt.getFieldValue("width"),Pe.current.align=rt.getFieldValue("align"),Se(Pt,Pe.current)}function Ee(Pt,ot){if(Pt.status===-1){gt.ZP.error(Pt.message);return}rt.setFieldsValue({src:`/api/attachments/${Pt.id}`,type:ot.type})}function ze(Pt){let ot=Pt.target.files[0];Pe.current=ot,$t(ot,Ee)}return de.createElement(se.default,ut(st({form:rt},vt),{className:"upload-image-panel",onFinish:je,style:{width:470,overflow:"hidden"}}),de.createElement(se.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(se.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(Ie.default,{style:yt})),de.createElement(ht,{onFileChange:ze}))),de.createElement(se.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(Ie.default,{style:{width:264}})),de.createElement(se.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(_e.Z,null,de.createElement(se.default.Item,{name:"width",style:{margin:0}},de.createElement(me.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(se.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(Ye.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),de.createElement("aside",null,de.createElement(se.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Be.ZP,{type:"default",onClick:Ge},"\u53D6\u6D88"))))};function ht({onFileChange:Se}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:Se}))}function $t(Se,Ge){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");let rt=new FormData;rt.append("editormd-image-file",Se),rt.append("file_param_name","editormd-image-file"),rt.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(je){Ge(JSON.parse(je.target.responseText),Se)},!1),Pe.addEventListener("error",function(je){console.error(je)},!1),Pe.open("POST",`${qe.KI}/api/attachments.json`),Pe.send(rt)}},81123:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ie}});var se=fe(59301),gt=fe(4676);class Ie extends se.Component{constructor(me){super(me);const Ye=window.document;this.node=Ye.createElement("div"),Ye.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,gt.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},95440:function(Ot,zt,fe){"use strict";fe.d(zt,{SV:function(){return Ce},ZP:function(){return it}});var se=fe(59301),gt=fe(76374);const Ie={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},_e={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},me={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std",content:["using namespace std"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},Ye={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},Be={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var qe=fe(53184),ke=fe.n(qe),de=(ve,Me,$e)=>new Promise((xe,He)=>{var Je=Ke=>{try{nt($e.next(Ke))}catch(xt){He(xt)}},et=Ke=>{try{nt($e.throw(Ke))}catch(xt){He(xt)}},nt=Ke=>Ke.done?xe(Ke.value):Promise.resolve(Ke.value).then(Je,et);nt(($e=$e.apply(ve,Me)).next())});const Te={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ye=(ve,Me,$e,xe)=>{const He=Me.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:$e.lineNumber,endColumn:$e.column});return Array.from(new Set(He.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:ve.languages.CompletionItemKind.Text,insertText:et,range:xe}))},ft=(ve,Me,$e,xe)=>{ve.languages.registerCompletionItemProvider(Me,{provideCompletionItems(He,Je){const et=He.getWordUntilPosition(Je),nt={startLineNumber:Je.lineNumber,endLineNumber:Je.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},Ke=He.getLineContent(Je.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...ye(ve,He,Je,nt),...$e.map(kt=>({label:kt,kind:ve.languages.CompletionItemKind.Keyword,documentation:kt,insertText:kt,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...xe.map(kt=>({label:kt.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:kt.content,insertText:Ke.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}})};var Ue=ve=>{Te.languages.forEach(Me=>{ve.languages.registerDocumentFormattingEditProvider(Me,{provideDocumentFormattingEdits($e){return de(this,null,function*(){const xe=ke()($e.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:$e.getFullModelRange(),text:xe}]})}})}),ft(ve,"java",_e.keywords,_e.quickKey),ft(ve,"cpp",me.keywords,me.quickKey),ft(ve,"c",Ie.keywords,[]),ft(ve,"python",Ye.keywords,Ye.quickKey),ft(ve,"scala",Be.keywords,Be.quickKey)};const Fe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Oe=Object.defineProperty,Le=(ve,Me,$e)=>Me in ve?Oe(ve,Me,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ve[Me]=$e,st=(ve,Me,$e)=>Le(ve,typeof Me!="symbol"?Me+"":Me,$e);const ut=class Hl{constructor(Me,$e,xe){this.placeholder=Me,this.editor=$e,this.monaco=xe,$e.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Hl.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};st(ut,"ID","editor.widget.placeholderHint");var yt=ut,vt=fe(96236),mt=fe(6767),ht=fe(25399),$t=fe(89392),Se=fe(27035),Ge=fe(56102),rt=Object.defineProperty,Pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,ot=(ve,Me,$e)=>Me in ve?rt(ve,Me,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ve[Me]=$e,St=(ve,Me)=>{for(var $e in Me||(Me={}))ze.call(Me,$e)&&ot(ve,$e,Me[$e]);if(Ee)for(var $e of Ee(Me))Pt.call(Me,$e)&&ot(ve,$e,Me[$e]);return ve},dt=(ve,Me)=>Pe(ve,je(Me)),pe=(ve,Me)=>{var $e={};for(var xe in ve)ze.call(ve,xe)&&Me.indexOf(xe)<0&&($e[xe]=ve[xe]);if(ve!=null&&Ee)for(var xe of Ee(ve))Me.indexOf(xe)<0&&Pt.call(ve,xe)&&($e[xe]=ve[xe]);return $e},ce=(ve,Me,$e)=>new Promise((xe,He)=>{var Je=Ke=>{try{nt($e.next(Ke))}catch(xt){He(xt)}},et=Ke=>{try{nt($e.throw(Ke))}catch(xt){He(xt)}},nt=Ke=>Ke.done?xe(Ke.value):Promise.resolve(Ke.value).then(Je,et);nt(($e=$e.apply(ve,Me)).next())});function Ve(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function wt(){}let lt=!1;const we={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Xe(ve=[]){let Me=ve;if(Array.isArray(ve)){for(let $e=0;$ece(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ve){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ve)}});var it=ve=>{var Me=ve,{width:$e="100%",height:xe="100%",value:He,language:Je="javascript",style:et={},options:nt={},overrideServices:Ke={},theme:xt="vs-dark",onEditBlur:kt,isCopy:Yt=!1,onSave:Wt,autoHeight:ae=!1,forbidCopy:te=!1,onChange:ee=wt,editorDidMount:ie=wt,onFocus:ue=wt,onBreakPoint:ne=wt,breakPointValue:ge=[],filename:ct="educoder.txt",errorLine:pt,errorContent:Ct="",highlightLine:Re,openBreakPoint:Zt=!1,placeholder:Rt="",showMiniMap:It=!0}=Me,un=pe(Me,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const kn=(0,se.useRef)(),cn=(0,se.useRef)({}),wn=(0,se.useRef)(),$n=(0,se.useRef)(),Zn=(0,se.useRef)([]),mr=(0,se.useRef)(!1),er=(0,se.useRef)(),ur=(0,se.useRef)(),nr=(0,se.useRef)(!1),[In,rr]=(0,se.useState)(!1);function cr(){let jt;return kn.current&&(jt=new gt.Z(at=>{for(let Qt of at)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&cn.current.instance.layout()}),jt.observe(kn.current)),jt}function Bn(){mt.ZP.warning({content:decodeURIComponent(Fe),key:"monaco-editor-tip"})}const Xn=()=>{let jt=cn.current.instance;if(He!=null&&jt&&In){const at=jt.getModel();at&&He!==at.getValue()&&(lt=!0,at.setValue(He),jt.layout(),lt=!1)}};(0,se.useEffect)(()=>{const jt=Se.Z.subscribe("formatDocument",at=>{var Qt;let Cn=cn.current.instance;(Qt=Cn==null?void 0:Cn.getAction)==null||Qt.call(Cn,"editor.action.formatDocument").run()});return window.updateMonacoValue=at=>{ee(at)},jt},[]),(0,se.useEffect)(()=>{var jt;let at=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{Xn()},500),He&&(He!=null&&He.length)&&((jt=at==null?void 0:at.updateOptions)==null||jt.call(at,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(He.split(/\r\n|\r|\n/g).length))+3,5)}))},[He,In,cn.current]),(0,se.useEffect)(()=>{if(pt&&cn.current&&cn.current.instance){let at=cn.current.instance;at.changeViewZones(function(Qt){var Cn=document.createElement("div");Cn.style.padding="10px 20px",Cn.style.width="calc(100% - 20px)",Cn.className="my-error-line-wrp",Cn.innerHTML=Ct,Qt.addZone({afterLineNumber:pt||11,heightInLines:3,domNode:Cn})});var jt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};at.addOverlayWidget(jt),at.revealPositionInCenter({lineNumber:20,column:1})}},[pt,cn.current,In]);const Kn=(jt="",at)=>{if(!jt||jt.trim()==="")return!0;const Cn=cn.current.instance.getModel().getLineTokens(at);let Gn=!1;for(let Ae=0;Ae<2;Ae++)Cn.getStandardTokenType(Ae)===1&&(Gn=!0);return Gn};(0,se.useEffect)(()=>{var jt;const at=(jt=cn.current)==null?void 0:jt.instance;if(at&&In&&te){const Qt=at.onDidBlurEditorWidget(()=>{nr.current=!1}),Cn=at.onDidFocusEditorText(()=>{nr.current=!0});return()=>{Qt.dispose(),Cn.dispose()}}},[cn.current,In,te]),(0,se.useEffect)(()=>{var jt;if((jt=cn.current)!=null&&jt.instance&&In&&Zt){let at=cn.current.instance,Qt=at.getModel();if(!Qt)return;(()=>{var _t;let qt=[],At=[];const bt=Qt.getAllDecorations();for(let vn of bt)vn.options.className==="highlighted-line"&&(qt.push((_t=vn==null?void 0:vn.range)==null?void 0:_t.startLineNumber),At.push(vn==null?void 0:vn.id));if(Re===qt[0])return;Qt.deltaDecorations(At,[]);const en=Qt.getLineCount();Re&&Re<=en&&(at.deltaDecorations([],[{range:new Ze.Range(Re,1,Re,Qt.getLineMaxColumn(Re)),options:{isWholeLine:!0,className:"highlighted-line"}}]),at.revealLineInCenter(Re))})();const Gn=(_t=!1)=>{var qt;let At=[],bt=[];const en=Qt.getAllDecorations();for(let vn of en)vn.options.linesDecorationsClassName==="breakpoints-select"&&(At.push((qt=vn==null?void 0:vn.range)==null?void 0:qt.startLineNumber),bt.push(vn==null?void 0:vn.id));if(_t)return{lines:At,ids:bt};ne(At)},Ae=_t=>ce(void 0,null,function*(){let qt={range:new Ze.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[qt]),Gn()}),Ne=_t=>ce(void 0,null,function*(){let qt=[];const At=at.getLineDecorations(_t);for(let bt of At)bt.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(bt.id);yield Qt.deltaDecorations(qt,[]),Gn()}),Bt=_t=>{let qt=at.getLineDecorations(_t);for(let At of qt)if(At.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,$t.isEqual)(ge,Gn(!0).lines)){Qt.deltaDecorations(Gn(!0).ids,[]);const _t=ge.map(qt=>({range:new Ze.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],_t)}const Dt=at.onDidChangeModelContent(_t=>{let qt=at.getPosition();if(qt){let At=qt.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Kn(Qt.getLineContent(At),At)?Ne(At):Bt(At)?(Ne(At),Ae(At)):Gn()},100)}}),We=at.onMouseDown(_t=>{var qt,At,bt;if(_t.target.detail&&((bt=(At=(qt=_t.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&bt.includes("line-numbers"))){let en=_t.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Bt(en)?Ne(en):Ae(en)}}),Lt=_t=>{let qt={range:new Ze.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Zn.current=at.deltaDecorations(Zn.current,[qt])},Xt=()=>{Zn.current=at.deltaDecorations(Zn.current,[])},tn=at.onMouseMove(_t=>{var qt,At,bt;if(Xt(),_t.target.detail&&((bt=(At=(qt=_t.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&bt.includes("line-numbers"))){let en=_t.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Lt(en)}}),hn=at.onMouseLeave(()=>{Xt()});return()=>{Dt.dispose(),We.dispose(),tn.dispose(),hn.dispose()}}},[cn.current,In,ge,Re,Zt,Je]),(0,se.useEffect)(()=>{var jt;(jt=cn.current)!=null&&jt.instance&&Zt&&cn.current.instance.setPosition({lineNumber:0,column:0})},[Re]);function xr(){let jt=cn.current.instance;if(jt){const at=jt.getSelection(),Qt=cn.current.pastePos||{},Cn=new Ze.Range(Qt.startLineNumber||at.endLineNumber,Qt.startColumn||at.endColumn,Qt.endLineNumber||at.endLineNumber,Qt.endColumn||at.endColumn);setTimeout(()=>{jt.executeEdits("",[{range:Cn,text:""}])},300)}}function Ut(jt){(window.navigator.platform.match("Mac")?jt.metaKey:jt.ctrlKey)&&jt.keyCode==83&&(jt.preventDefault(),Wt())}const pn=()=>{if(ae&&cn.current.instance){const jt=cn.current.instance.getContentHeight();Fn(jt{if(!nr.current)return;const{keyCode:at,ctrlKey:Qt,metaKey:Cn,target:Gn,type:Ae}=jt;return(Ae==="paste"||(at===67||at===86)&&(Cn||Qt))&&Gn.nodeName==="TEXTAREA"&&(Bn(),jt.preventDefault()),!1};function Jn(jt,at){var Qt=window.URL||window.webkitURL||window,Cn=new Blob([at]),Gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gn.href=Qt.createObjectURL(Cn),Gn.download=jt,En(Gn)}(0,se.useEffect)(()=>{pn()},[pn]),(0,se.useEffect)(()=>{kn.current&&!In&&Promise.all([fe.e(8909),fe.e(4100)]).then(fe.bind(fe,71448)).then(jt=>{try{Ze=jt,cn.current.instance=Ze.editor.create(kn.current,{value:He,language:Xe(Je),theme:xt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:It||!1}},Ke);const at=cn.current.instance;let Gn=[...vt.BH._menuItems].find(Dt=>Dt[0]._debugName=="EditorContext")[1],Ae=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ne=(Dt,We)=>{var Lt,Xt;let tn=Dt._first;do We.includes((Xt=(Lt=tn.element)==null?void 0:Lt.command)==null?void 0:Xt.id)&&Dt._remove(tn);while(tn=tn.next)};if(ie(at,Ze),setTimeout(()=>{pn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(ct||"educoder.txt",at.getValue())}})},500),cn.current.subscription=at.onDidChangeModelContent(Dt=>{mr.current?clearTimeout(er.current):(pn(),ee(at.getValue(),Dt)),er.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||Ue(Ze,Xe(Je)),te&&(Ne(Gn,Ae),kn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Tn),window.removeEventListener("paste",Tn),window.addEventListener("keydown",Tn),window.addEventListener("paste",Tn)),window.Monaco=Ze,kt&&at.onDidBlurEditorWidget(()=>{kt(at.getValue())}),ue&&at.onDidFocusEditorText(()=>{te&&Mt(),ue(at.getValue())}),te){Mt();try{at.onDidPaste(Dt=>{const We=at.getSelection(),Lt=cn.current.pastePos||{},Xt=new Ze.Range(Lt.startLineNumber||We.endLineNumber,Lt.startColumn||We.endColumn,Lt.endLineNumber||We.endLineNumber,Lt.endColumn||We.endColumn);at.executeEdits("",[{range:Dt.range,text:""}])})}catch(Dt){}}let Bt=cr();return Rt&&typeof Rt=="string"&&new yt(Rt,at,Ze),rr(!0),()=>{const Dt=cn.current.instance;Dt.dispose();const We=Dt.getModel();We&&We.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Bt.unobserve(kn.current)}}catch(at){}})},[]),(0,se.useEffect)(()=>{if(cn.current.instance&&In)return document.addEventListener("keydown",Ut,!1),()=>{document.removeEventListener("keydown",Ut)}},[Wt,In]),(0,se.useEffect)(()=>{let jt=cn.current.instance;if(jt&&In){let at=Xe(Je);Ze.editor.setModelLanguage(jt.getModel(),at)}},[Je,In]),(0,se.useEffect)(()=>{cn.current.instance&&In&&Ze.editor.setTheme(xt)},[xt,In]),(0,se.useEffect)(()=>{let jt=cn.current.instance;wn.current=nt,jt&&In&&(jt.updateOptions(St({},nt)),setTimeout(()=>{jt.getModel().updateOptions(St({},nt))},200))},[JSON.stringify(nt),In]),(0,se.useEffect)(()=>{let jt=cn.current.instance;jt&&In&&jt.layout()},[$e,xe,In]);const[tr,dr]=(0,se.useState)(Ve($e)),[_n,Fn]=(0,se.useState)(Ve(xe)),hr=dt(St({},et),{width:tr,height:_n,position:"relative"});return se.createElement("div",{className:"my-monaco-editor",ref:kn,style:hr},Yt&&se.createElement(Ge.CopyToClipboard,{text:He,onCopy:()=>mt.ZP.success("\u590D\u5236\u6210\u529F")},se.createElement(ht.Z,{title:"\u590D\u5236\u4EE3\u7801"},se.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},se.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ce({width:ve="100%",height:Me="100%",original:$e,modified:xe,language:He,options:Je={}}){const et=(0,se.useRef)(),[nt,Ke]=(0,se.useState)(null);function xt(ae){let te;return et.current&&(te=new gt.Z(ee=>{for(let ie of ee)(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&ae.layout()}),te.observe(et.current)),te}(0,se.useEffect)(()=>(et.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(ae=>{Ze=ae;const te=Ze.editor.createDiffEditor(et.current,dt(St({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Je),{wordWrap:!0}));Ke(te);let ee=xt(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),ee.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,se.useEffect)(()=>{nt&&nt.setModel({original:Ze.editor.createModel($e,He),modified:Ze.editor.createModel(xe,He)})},[$e,xe,He,nt]);const kt=Ve(ve),Yt=Ve(Me),Wt={width:kt,height:Yt};return se.createElement("div",{className:"my-diff-editor",ref:et,style:Wt})}},66991:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return gt}});var se=fe(59301);function gt(Ie,_e){const me=(0,se.useRef)();(0,se.useEffect)(()=>{me.current=Ie}),(0,se.useEffect)(()=>{function Ye(){me.current()}if(_e!==null){let Be=setInterval(Ye,_e);return()=>clearInterval(Be)}},[_e])}},30650:function(Ot,zt,fe){"use strict";fe.r(zt),fe.d(zt,{default:function(){return $t}});var se=fe(59301),gt=fe(17949),Ie=fe(6767),_e=fe(37568),me=fe(99571),Ye=fe(57193),Be=(Se,Ge,rt)=>new Promise((Pe,je)=>{var Ee=ot=>{try{Pt(rt.next(ot))}catch(St){je(St)}},ze=ot=>{try{Pt(rt.throw(ot))}catch(St){je(St)}},Pt=ot=>ot.done?Pe(ot.value):Promise.resolve(ot.value).then(Ee,ze);Pt((rt=rt.apply(Se,Ge)).next())});function qe({setIscreate:Se,init:Ge,UpdateItem:rt}){const[Pe,je]=(0,se.useState)(""),[Ee,ze]=(0,se.useState)("");(0,se.useEffect)(()=>{rt&&(je(rt&&rt.name),ze(rt&&rt.description))},[rt]);function Pt(){return Be(this,null,function*(){if(!Pe){Ie.ZP.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}if(!Ee){Ie.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}if(rt){ot();return}(yield(0,Ye.ZP)("/api/hpc_courses.json",{method:"post",body:{name:Pe,description:Ee,container_type:window.location.pathname.split("/")[1]}}))&&(Ie.ZP.info("\u521B\u5EFA\u6210\u529F"),Se(!1),Ge("add"))})}function ot(){return Be(this,null,function*(){(yield(0,Ye.ZP)(`/api/hpc_courses/${rt.id}.json`,{method:"put",body:{name:Pe,description:Ee,container_type:window.location.pathname.split("/")[1]}}))&&(Ie.ZP.info("\u7F16\u8F91\u6210\u529F"),Se(!1),Ge(""))})}return se.createElement("div",null,se.createElement(_e.default,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:Pe,maxLength:60,addonAfter:String(Pe.length)+"/60",onChange:St=>je(St.target.value)}),se.createElement(gt.Z,{id:"courseContentMD",defaultValue:Ee,onChange:St=>ze(St)}),se.createElement("div",{className:"clearfix mt30 mb30"},se.createElement(me.ZP,{type:"primary",onClick:()=>Pt(),className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),se.createElement("a",{className:"defalutCancelbtn fl",onClick:()=>Se(!1)},"\u53D6\u6D88")))}var ke=qe,de=fe(97231),Te=(Se,Ge,rt)=>new Promise((Pe,je)=>{var Ee=ot=>{try{Pt(rt.next(ot))}catch(St){je(St)}},ze=ot=>{try{Pt(rt.throw(ot))}catch(St){je(St)}},Pt=ot=>ot.done?Pe(ot.value):Promise.resolve(ot.value).then(Ee,ze);Pt((rt=rt.apply(Se,Ge)).next())});function ye({CourseItem:Se,userId:Ge,init:rt,ItemUpdate:Pe,setSee:je,UserInfo:Ee}){function ze(){return Te(this,null,function*(){(yield(0,Ye.ZP)(`/api/hpc_courses/${Se.id}.json`,{method:"delete"}))&&(Ie.ZP.info("\u5220\u9664\u6210\u529F"),rt("delete"),je(!1))})}function Pt(){Pe(Se)}return se.createElement("div",null,Ge===299635||Ge===301458||Ee!=null&&Ee.admin||Ee!=null&&Ee.business?se.createElement("div",{style:{textAlign:"right"}},se.createElement(me.ZP,{onClick:()=>Pt()},"\u7F16\u8F91"),se.createElement(me.ZP,{onClick:()=>ze(),style:{marginLeft:"30px"}},"\u5220\u9664")):null,se.createElement("h1",null,Se==null?void 0:Se.name),se.createElement(de.Z,{value:Se==null?void 0:Se.description}))}var ft=ye,Ue=fe(14566),Fe=fe(78323),Oe=fe(95392),Le=Object.defineProperty,st=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,yt=(Se,Ge,rt)=>Ge in Se?Le(Se,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Se[Ge]=rt,vt=(Se,Ge)=>{for(var rt in Ge||(Ge={}))ut.call(Ge,rt)&&yt(Se,rt,Ge[rt]);if(st)for(var rt of st(Ge))Et.call(Ge,rt)&&yt(Se,rt,Ge[rt]);return Se},mt=(Se,Ge,rt)=>new Promise((Pe,je)=>{var Ee=ot=>{try{Pt(rt.next(ot))}catch(St){je(St)}},ze=ot=>{try{Pt(rt.throw(ot))}catch(St){je(St)}},Pt=ot=>ot.done?Pe(ot.value):Promise.resolve(ot.value).then(Ee,ze);Pt((rt=rt.apply(Se,Ge)).next())});function ht({user:Se,dispatch:Ge}){var rt,Pe,je,Ee,ze,Pt,ot,St,dt;const[pe,ce]=(0,se.useState)(1),[Ve,wt]=(0,se.useState)(100),[lt,we]=(0,se.useState)([]),[Xe,Ze]=(0,se.useState)(!1),[Mt,it]=(0,se.useState)(!1),[Ce,ve]=(0,se.useState)(""),[Me,$e]=(0,se.useState)(""),[xe,He]=(0,se.useState)("");let{itemname:Je}=(0,Oe.useParams)();const[et,nt]=(0,se.useState)("");(0,se.useEffect)(()=>{Ge({type:"globalSetting/headerToggle",payload:!1}),pe&&Ke("")},[pe]);function Ke(ae){return mt(this,null,function*(){var te,ee;const ie=yield(0,Ye.ZP)("/api/hpc_courses.json",{method:"get",params:{page:pe,per_page:Ve,container_type:window.location.pathname.split("/")[1]}});if(ie){let ue=ie.data.hpc_courses.length;if(we(ie.data.hpc_courses),He(ie.data.file_url),$e(""),!ue)return;if(et)if(ae==="delete"){if(ue===0){it(!1);return}ve(ie.data.hpc_courses[0]),it(!0),nt(ie.data.hpc_courses[0].id)}else ae==="add"?(ve(ie.data.hpc_courses[ue-1]),it(!0),nt(ie.data.hpc_courses[ue-1].id)):(ve(ie.data.hpc_courses.filter(ne=>ne.id===et)[0]),it(!0),nt(et));else if(Je){let ne=0;(ee=(te=ie==null?void 0:ie.data)==null?void 0:te.hpc_courses)==null||ee.map((ge,ct)=>{var pt;(Je==null?void 0:Je.toLocaleLowerCase())===((pt=ge==null?void 0:ge.name)==null?void 0:pt.toLocaleLowerCase())&&(ne=ct)}),ve(ie.data.hpc_courses[ne]),it(!0),nt(ie.data.hpc_courses[ne].id),(Je==null?void 0:Je.toLocaleLowerCase())==="resources"&&(ve(ie.data.hpc_courses.filter(ge=>ge.id===15)[0]),it(!0),nt(15))}else ve(ie.data.hpc_courses[0]),it(!0),nt(ie.data.hpc_courses[0].id)}})}function xt(ae){Ze(!1),it(!0),ve(ae),nt(ae.id)}function kt(ae){$e(ae),Ze(!0),it(!1)}function Yt(){$e(""),Ze(!0),it(!1)}const Wt={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange(ae){const{status:te}=ae.file;te==="done"?(Ie.ZP.success(`${ae.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`),Ke("")):te==="error"&&Ie.ZP.error(`${ae.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:ae=>{const te=ae.size/1024/1024<150;return te||Ie.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),te}};return se.createElement("div",{style:{marginBottom:"40px"}},se.createElement("div",{className:"bannterdiv",style:{background:`url(${Fe.Z.IMG_SERVER+`/${xe}`})`}}),se.createElement("img",{style:{width:"100%"},src:Fe.Z.IMG_SERVER+`/${xe}`}),se.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},se.createElement("div",{style:{flex:"1",marginTop:"17px"}},lt&<.map((ae,te)=>se.createElement("p",{key:te,onClick:()=>xt(ae),className:et===ae.id?"menuitemselect":"menuitem task-hide"},ae.name)),((rt=Se==null?void 0:Se.userInfo)==null?void 0:rt.user_id)===299635||((Pe=Se==null?void 0:Se.userInfo)==null?void 0:Pe.user_id)===301458||(je=Se==null?void 0:Se.userInfo)!=null&&je.admin||(Ee=Se==null?void 0:Se.userInfo)!=null&&Ee.business?se.createElement("p",{onClick:()=>Yt(),className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},se.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),se.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},Xe?se.createElement(ke,{UpdateItem:Me,setIscreate:Ze,init:Ke}):null,Mt?se.createElement(ft,{UserInfo:Se==null?void 0:Se.userInfo,setSee:it,userId:(ze=Se==null?void 0:Se.userInfo)==null?void 0:ze.user_id,ItemUpdate:kt,CourseItem:Ce,init:Ke}):null)),((Pt=Se==null?void 0:Se.userInfo)==null?void 0:Pt.user_id)===299635||((ot=Se==null?void 0:Se.userInfo)==null?void 0:ot.user_id)===301458||(St=Se==null?void 0:Se.userInfo)!=null&&St.admin||(dt=Se==null?void 0:Se.userInfo)!=null&&dt.business?se.createElement(Ue.default,vt({},Wt),se.createElement(me.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var $t=(0,Oe.connect)(({user:Se})=>({user:Se}))(ht)},901:function(Ot,zt,fe){"use strict";fe.d(zt,{AL:function(){return yt},Iy:function(){return Te},Qv:function(){return Ue},ez:function(){return Et},jb:function(){return ye}});var se=fe(32834),gt=fe.n(se),Ie=fe(11690),_e=fe.n(Ie);let me=1;function Ye(Se,Ge){const rt=Se.match(/^(\s+)(?:```)/);if(rt===null)return Ge;const Pe=rt[1];return Ge.split(` `).map(je=>{const Ee=je.match(/^\s+/);if(Ee===null)return je;const[ze]=Ee;return ze.length>=Pe.length?je.slice(Pe.length):je}).join(` `)}let Be=[],qe=["
    "];const ke=new(gt()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Te(){Be.length=0,qe=["
      "]}const ye={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ft(Se,Ge,rt,Pe){if(Ge>=Se.length||Se[Ge].level<=rt)return Ge;var je=Se[Ge];Pe.push("
    • "+je.text+""),Ge++;var Ee=[];return Ge=ft(Se,Ge,je.level,Ee),Ee.length>0&&(Pe.push("
        "),Ee.forEach(function(ze){Pe.push(ze)}),Pe.push("
      ")),Pe.push("
    • "),Ge=ft(Se,Ge,rt,Pe),Ge}function Ue(){return ft(Be,0,0,qe),qe.push("
    "),qe.join("")}const Fe={heading(Se){const Ge=de.exec(Se);if(me+=1,Ge)return{type:"heading",raw:Ge[0],depth:Ge[1].length,text:Ge[2]}},fences(Se){const Ge=this.rules.block.fences.exec(Se);if(Ge){const rt=Ge[0];let Pe=Ye(rt,Ge[3]||"");const je=Ge[2]?Ge[2].trim():Ge[2];if(["latex","katex","math"].indexOf(je)>=0){const Ee=st(),ze=Pe;Pe=Ee,ut[Ee]={type:"block",expression:ze}}return{type:"code",raw:rt,lang:je,text:Pe}}}},Oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Le=0;const st=()=>`__special_katext_id_${Le++}__`;let ut={};function Et(){return ut}function yt(){Le=0,ut={}}function vt(Se){return Se=Se.replace(Oe,(Ge,rt)=>{const Pe=st();return ut[Pe]={type:"inline",expression:rt},Pe}),Se}const mt=ke.listitem;ke.listitem=function(Se){return mt(vt(Se))};const ht=ke.paragraph;ke.paragraph=function(Se){return ht(vt(Se))};const $t=ke.tablecell;ke.tablecell=function(Se,Ge){return $t(vt(Se),Ge)},ke.code=function(Se,Ge,rt){const Pe=(Ge||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`

    ${Se}

    `:`
    ${rt?Se:(0,Ie.escape)(Se,!0)}
    `:'
    '+(rt?Se:(0,Ie.escape)(Se,!0))+"
    "},ke.heading=function(Se,Ge,rt){let Pe=this.options.headerPrefix+rt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Be.push({anchor:Pe,level:Ge,text:Se}),"'+Se+""},gt().setOptions({silent:!0,gfm:!0,pedantic:!1}),gt().use({tokenizer:Fe,renderer:ke}),zt.ZP=gt()},99498:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){se.defineOption("placeholder","",function(qe,ke,de){var Te=de&&de!=se.Init;if(ke&&!Te)qe.on("blur",me),qe.on("change",Ye),qe.on("swapDoc",Ye),se.on(qe.getInputField(),"compositionupdate",qe.state.placeholderCompose=function(){_e(qe)}),Ye(qe);else if(!ke&&Te){qe.off("blur",me),qe.off("change",Ye),qe.off("swapDoc",Ye),se.off(qe.getInputField(),"compositionupdate",qe.state.placeholderCompose),gt(qe);var ye=qe.getWrapperElement();ye.className=ye.className.replace(" CodeMirror-empty","")}ke&&!qe.hasFocus()&&me(qe)});function gt(qe){qe.state.placeholder&&(qe.state.placeholder.parentNode.removeChild(qe.state.placeholder),qe.state.placeholder=null)}function Ie(qe){gt(qe);var ke=qe.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=qe.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var de=qe.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),ke.appendChild(de),qe.display.lineSpace.insertBefore(ke,qe.display.lineSpace.firstChild)}function _e(qe){setTimeout(function(){var ke=!1,de=qe.getInputField();de.nodeName=="TEXTAREA"?ke=!de.value:qe.lineCount()==1&&(ke=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),ke?Ie(qe):gt(qe)},20)}function me(qe){Be(qe)&&Ie(qe)}function Ye(qe){var ke=qe.getWrapperElement(),de=Be(qe);ke.className=ke.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Ie(qe):gt(qe)}function Be(qe){return qe.lineCount()===1&&qe.getLine(0)===""}})},25717:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){var gt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ie=se.Pos;se.defineOption("autoCloseBrackets",!1,function(Fe,Oe,Le){Le&&Le!=se.Init&&(Fe.removeKeyMap(me),Fe.state.closeBrackets=null),Oe&&(Ye(_e(Oe,"pairs")),Fe.state.closeBrackets=Oe,Fe.addKeyMap(me))});function _e(Fe,Oe){return Oe=="pairs"&&typeof Fe=="string"?Fe:typeof Fe=="object"&&Fe[Oe]!=null?Fe[Oe]:gt[Oe]}var me={Backspace:ke,Enter:de};function Ye(Fe){for(var Oe=0;Oe=0;ut--){var yt=st[ut].head;Fe.replaceRange("",Ie(yt.line,yt.ch-1),Ie(yt.line,yt.ch+1),"+delete")}}function de(Fe){var Oe=qe(Fe),Le=Oe&&_e(Oe,"explode");if(!Le||Fe.getOption("disableInput"))return se.Pass;for(var st=Fe.listSelections(),ut=0;ut0;return{anchor:new Ie(Fe.anchor.line,Fe.anchor.ch+(Oe?-1:1)),head:new Ie(Fe.head.line,Fe.head.ch+(Oe?1:-1))}}function ye(Fe,Oe){var Le=qe(Fe);if(!Le||Fe.getOption("disableInput"))return se.Pass;var st=_e(Le,"pairs"),ut=st.indexOf(Oe);if(ut==-1)return se.Pass;for(var Et=_e(Le,"closeBefore"),yt=_e(Le,"triples"),vt=st.charAt(ut+1)==Oe,mt=Fe.listSelections(),ht=ut%2==0,$t,Se=0;Se=0&&Fe.getRange(rt,Ie(rt.line,rt.ch+3))==Oe+Oe+Oe?Pe="skipThree":Pe="skip";else if(vt&&rt.ch>1&&yt.indexOf(Oe)>=0&&Fe.getRange(Ie(rt.line,rt.ch-2),rt)==Oe+Oe){if(rt.ch>2&&/\bstring/.test(Fe.getTokenTypeAt(Ie(rt.line,rt.ch-2))))return se.Pass;Pe="addFour"}else if(vt){var Ee=rt.ch==0?" ":Fe.getRange(Ie(rt.line,rt.ch-1),rt);if(!se.isWordChar(je)&&Ee!=Oe&&!se.isWordChar(Ee))Pe="both";else return se.Pass}else if(ht&&(je.length===0||/\s/.test(je)||Et.indexOf(je)>-1))Pe="both";else return se.Pass;if(!$t)$t=Pe;else if($t!=Pe)return se.Pass}var ze=ut%2?st.charAt(ut-1):Oe,Pt=ut%2?Oe:st.charAt(ut+1);Fe.operation(function(){if($t=="skip")Fe.execCommand("goCharRight");else if($t=="skipThree")for(var ot=0;ot<3;ot++)Fe.execCommand("goCharRight");else if($t=="surround"){for(var St=Fe.getSelections(),ot=0;ot'"]=function(ft){return _e(ft)}),ke.addKeyMap(ye)}});var gt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ie=["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 _e(ke){if(ke.getOption("disableInput"))return se.Pass;for(var de=ke.listSelections(),Te=[],ye=ke.getOption("autoCloseTags"),ft=0;ftUe.ch&&(ut=ut.slice(0,ut.length-Fe.end+Ue.ch));var mt=ut.toLowerCase();if(!ut||Fe.type=="string"&&(Fe.end!=Ue.ch||!/[\"\']/.test(Fe.string.charAt(Fe.string.length-1))||Fe.string.length==1)||Fe.type=="tag"&&st.close||Fe.string.indexOf("/")==Ue.ch-Fe.start-1||yt&&Be(yt,mt)>-1||qe(ke,Oe.mode.xmlCurrentContext&&Oe.mode.xmlCurrentContext(Le)||[],ut,Ue,!0))return se.Pass;var ht=typeof ye=="object"&&ye.emptyTags;if(ht&&Be(ht,ut)>-1){Te[ft]={text:"/>",newPos:se.Pos(Ue.line,Ue.ch+2)};continue}var $t=vt&&Be(vt,mt)>-1;Te[ft]={indent:$t,text:">"+($t?` `:"")+"",newPos:$t?se.Pos(Ue.line+1,0):se.Pos(Ue.line,Ue.ch+1)}}for(var Se=typeof ye=="object"&&ye.dontIndentOnAutoClose,ft=de.length-1;ft>=0;ft--){var Ge=Te[ft];ke.replaceRange(Ge.text,de[ft].head,de[ft].anchor,"+insert");var rt=ke.listSelections().slice(0);rt[ft]={head:Ge.newPos,anchor:Ge.newPos},ke.setSelections(rt),!Se&&Ge.indent&&(ke.indentLine(Ge.newPos.line,null,!0),ke.indentLine(Ge.newPos.line+1,null,!0))}}function me(ke,de){for(var Te=ke.listSelections(),ye=[],ft=de?"/":""&&(yt+=">"),ye[Oe]=yt}if(ke.replaceSelections(ye),Te=ke.listSelections(),!Fe)for(var Oe=0;Oe=0&&de[Le]==Te;Le--)++Oe;ye=Fe.to;for(var Le=1;Le=Le.max))return Le.ch=0,Le.text=Le.cm.getLine(++Le.line),!0}function de(Le){if(!(Le.line<=Le.min))return Le.text=Le.cm.getLine(--Le.line),Le.ch=Le.text.length,!0}function Te(Le){for(;;){var st=Le.text.indexOf(">",Le.ch);if(st==-1){if(ke(Le))continue;return}if(!qe(Le,st+1)){Le.ch=st+1;continue}var ut=Le.text.lastIndexOf("/",st),Et=ut>-1&&!/\S/.test(Le.text.slice(ut+1,st));return Le.ch=st+1,Et?"selfClose":"regular"}}function ye(Le){for(;;){var st=Le.ch?Le.text.lastIndexOf("<",Le.ch-1):-1;if(st==-1){if(de(Le))continue;return}if(!qe(Le,st+1)){Le.ch=st;continue}Ye.lastIndex=st,Le.ch=st;var ut=Ye.exec(Le.text);if(ut&&ut.index==st)return ut}}function ft(Le){for(;;){Ye.lastIndex=Le.ch;var st=Ye.exec(Le.text);if(!st){if(ke(Le))continue;return}if(!qe(Le,st.index+1)){Le.ch=st.index+1;continue}return Le.ch=st.index+st[0].length,st}}function Ue(Le){for(;;){var st=Le.ch?Le.text.lastIndexOf(">",Le.ch-1):-1;if(st==-1){if(de(Le))continue;return}if(!qe(Le,st+1)){Le.ch=st;continue}var ut=Le.text.lastIndexOf("/",st),Et=ut>-1&&!/\S/.test(Le.text.slice(ut+1,st));return Le.ch=st+1,Et?"selfClose":"regular"}}function Fe(Le,st){for(var ut=[];;){var Et=ft(Le),yt,vt=Le.line,mt=Le.ch-(Et?Et[0].length:0);if(!Et||!(yt=Te(Le)))return;if(yt!="selfClose")if(Et[1]){for(var ht=ut.length-1;ht>=0;--ht)if(ut[ht]==Et[2]){ut.length=ht;break}if(ht<0&&(!st||st==Et[2]))return{tag:Et[2],from:gt(vt,mt),to:gt(Le.line,Le.ch)}}else ut.push(Et[2])}}function Oe(Le,st){for(var ut=[];;){var Et=Ue(Le);if(!Et)return;if(Et=="selfClose"){ye(Le);continue}var yt=Le.line,vt=Le.ch,mt=ye(Le);if(!mt)return;if(mt[1])ut.push(mt[2]);else{for(var ht=ut.length-1;ht>=0;--ht)if(ut[ht]==mt[2]){ut.length=ht;break}if(ht<0&&(!st||st==mt[2]))return{tag:mt[2],from:gt(Le.line,Le.ch),to:gt(yt,vt)}}}}se.registerHelper("fold","xml",function(Le,st){for(var ut=new Be(Le,st.line,0);;){var Et=ft(ut);if(!Et||ut.line!=st.line)return;var yt=Te(ut);if(!yt)return;if(!Et[1]&&yt!="selfClose"){var vt=gt(ut.line,ut.ch),mt=Fe(ut,Et[2]);return mt&&Ie(mt.from,vt)>0?{from:vt,to:mt.from}:null}}}),se.findMatchingTag=function(Le,st,ut){var Et=new Be(Le,st.line,st.ch,ut);if(!(Et.text.indexOf(">")==-1&&Et.text.indexOf("<")==-1)){var yt=Te(Et),vt=yt&>(Et.line,Et.ch),mt=yt&&ye(Et);if(!(!yt||!mt||Ie(Et,st)>0)){var ht={from:gt(Et.line,Et.ch),to:vt,tag:mt[2]};return yt=="selfClose"?{open:ht,close:null,at:"open"}:mt[1]?{open:Oe(Et,mt[2]),close:ht,at:"close"}:(Et=new Be(Le,vt.line,vt.ch,ut),{open:ht,close:Fe(Et,mt[2]),at:"open"})}}},se.findEnclosingTag=function(Le,st,ut,Et){for(var yt=new Be(Le,st.line,st.ch,ut);;){var vt=Oe(yt,Et);if(!vt)break;var mt=new Be(Le,st.line,st.ch,ut),ht=Fe(mt,vt.tag);if(ht)return{open:vt,close:ht}}},se.scanForClosingTag=function(Le,st,ut,Et){var yt=new Be(Le,st.line,st.ch,Et?{from:0,to:Et}:null);return Fe(yt,ut)}})},89780:function(Ot){(function(zt,fe){Ot.exports=fe()})(this,function(){"use strict";var zt=navigator.userAgent,fe=navigator.platform,se=/gecko\/\d/i.test(zt),gt=/MSIE \d/.test(zt),Ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zt),_e=/Edge\/(\d+)/.exec(zt),me=gt||Ie||_e,Ye=me&&(gt?document.documentMode||6:+(_e||Ie)[1]),Be=!_e&&/WebKit\//.test(zt),qe=Be&&/Qt\/\d+\.\d+/.test(zt),ke=!_e&&/Chrome\//.test(zt),de=/Opera\//.test(zt),Te=/Apple Computer/.test(navigator.vendor),ye=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(zt),ft=/PhantomJS/.test(zt),Ue=!_e&&/AppleWebKit/.test(zt)&&/Mobile\/\w+/.test(zt),Fe=/Android/.test(zt),Oe=Ue||Fe||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(zt),Le=Ue||/Mac/.test(fe),st=/\bCrOS\b/.test(zt),ut=/win/i.test(fe),Et=de&&zt.match(/Version\/(\d*\.\d*)/);Et&&(Et=Number(Et[1])),Et&&Et>=15&&(de=!1,Be=!0);var yt=Le&&(qe||de&&(Et==null||Et<12.11)),vt=se||me&&Ye>=9;function mt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ht=function(a,y){var x=a.className,b=mt(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function $t(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Se(a,y){return $t(a).appendChild(y)}function Ge(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var z=0;z=y)return re+(y-z);re+=oe-z,re+=x-re%x,z=oe+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=St(this.onTimeout,this)};ce.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ce.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x=y)return b+Math.min(re,y-E);if(E+=z-b,E+=x-E%x,b=z+1,E>=y)return b}}var it=[""];function Ce(a){for(;it.length<=a;)it.push(ve(it)+" ");return it[a]}function ve(a){return a[a.length-1]}function Me(a,y){for(var x=[],b=0;b"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Je.test(a))}function nt(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function Ke(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var xt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function kt(a){return a.charCodeAt(0)>=768&&xt.test(a)}function Yt(a,y,x){for(;(x<0?y>0:yx?-1:1;;){if(y==x)return y;var E=(y+x)/2,z=b<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:x;a(z)?x=z:y=z+b}}function ae(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,z=0;zy||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",z),E=!0)}E||b(y,x,"ltr")}var te=null;function ee(a,y,x){var b;te=null;for(var E=0;Ey)return E;z.to==y&&(z.from!=z.to&&x=="before"?b=E:te=E),z.from==y&&(z.from!=z.to&&x!="before"?b=E:te=E)}return b!=null?b:te}var ie=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function le(he,be,De){this.level=he,this.from=be,this.to=De}return function(he,be){var De=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var tt=he.length,Qe=[],Tt=0;Tt-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function Ct(a,y){var x=ct(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E0}function It(a){a.prototype.on=function(y,x){ge(this,y,x)},a.prototype.off=function(y,x){pt(this,y,x)}}function un(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function kn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function wn(a){un(a),kn(a)}function $n(a){return a.target||a.srcElement}function Zn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Le&&a.ctrlKey&&y==1&&(y=3),y}var mr=function(){if(me&&Ye<9)return!1;var a=Ge("div");return"draggable"in a||"dragDrop"in a}(),er;function ur(a){if(er==null){var y=Ge("span","\u200B");Se(a,Ge("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(er=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&Ye<8))}var x=er?Ge("span","\u200B"):Ge("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var nr;function In(a){if(nr!=null)return nr;var y=Se(a,document.createTextNode("A\u062EA")),x=Pe(y,0,1).getBoundingClientRect(),b=Pe(y,1,2).getBoundingClientRect();return $t(a),!x||x.left==x.right?!1:nr=b.right-x.right<3}var rr=` b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(` `,y);E==-1&&(E=a.length);var z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(x.push(z.slice(0,re)),y+=re+1):(x.push(z),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},cr=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Bn=function(){var a=Ge("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Xn=null;function Kn(a){if(Xn!=null)return Xn;var y=Se(a,Ge("span","x")),x=y.getBoundingClientRect(),b=Pe(y,0,1).getBoundingClientRect();return Xn=Math.abs(x.left-b.left)>1}var xr={},Ut={};function pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),xr[a]=y}function En(a,y){Ut[a]=y}function Tn(a){if(typeof a=="string"&&Ut.hasOwnProperty(a))a=Ut[a];else if(a&&typeof a.name=="string"&&Ut.hasOwnProperty(a.name)){var y=Ut[a.name];typeof y=="string"&&(y={name:y}),a=He(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Tn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Tn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Jn(a,y){y=Tn(y);var x=xr[y.name];if(!x)return Jn(a,"text/plain");var b=x(a,y);if(tr.hasOwnProperty(y.name)){var E=tr[y.name];for(var z in E)E.hasOwnProperty(z)&&(b.hasOwnProperty(z)&&(b["_"+z]=b[z]),b[z]=E[z])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var tr={};function dr(a,y){var x=tr.hasOwnProperty(a)?tr[a]:tr[a]={};dt(y,x)}function _n(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Fn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function hr(a,y,x){return a.startState?a.startState(y,x):!0}var jt=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};jt.prototype.eol=function(){return this.pos>=this.string.length},jt.prototype.sol=function(){return this.pos==this.lineStart},jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jt.prototype.next=function(){if(this.posy},jt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},jt.prototype.skipToEnd=function(){this.pos=this.string.length},jt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},jt.prototype.backUp=function(a){this.pos-=a},jt.prototype.column=function(){return this.lastColumnPos0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},jt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},jt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},jt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function at(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],z=E.chunkSize();if(y=a.first&&yx?We(x,at(a,x).text.length):bt(y,at(a,y.line).text.length)}function bt(a,y){var x=a.ch;return x==null||x>y?We(a.line,y):x<0?We(a.line,0):a}function en(a,y){for(var x=[],b=0;bthis.maxLookAhead&&(this.maxLookAhead=a),y},mn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mn.fromSaved=function(a,y,x){return y instanceof vn?new mn(a,_n(a.mode,y.state),x,y.lookAhead):new mn(a,_n(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vn(y,this.maxLookAhead):y};function xn(a,y,x,b){var E=[a.state.modeGen],z={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},z,b);for(var re=x.state,oe=function(he){x.baseTokens=E;var be=a.state.overlays[he],De=1,tt=0;x.state=!0,Qn(a,y.text,be.mode,x,function(Qe,Tt){for(var Nt=De;ttQe&&E.splice(De,1,Qe,E[De+1],Jt),De+=2,tt=Math.min(Qe,Jt)}if(Tt)if(be.opaque)E.splice(Nt,De-Nt,Qe,"overlay "+Tt),De=Nt+2;else for(;Nta.options.maxHighlightLength&&_n(a.doc.mode,b.state),z=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Yn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new mn(b,!0,y);var z=Lr(a,y,x),re=z>b.first&&at(b,z-1).stateAfter,oe=re?mn.fromSaved(b,re,z):new mn(b,hr(b.mode),z);return b.iter(z,y,function(le){dn(a,le.text,oe);var he=oe.line;le.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&hey.start)return z}throw new Error("Mode "+a.name+" failed to advance stream.")}var nn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Wn(a,y,x,b){var E=a.doc,z=E.mode,re;y=At(E,y);var oe=at(E,y.line),le=Yn(a,y.line,x),he=new jt(oe.text,a.options.tabSize,le),be;for(b&&(be=[]);(b||he.posa.options.maxHighlightLength?(oe=!1,re&&dn(a,y,b,be.pos),be.pos=y.length,De=null):De=wr(gn(x,be,b.state,tt),z),tt){var Qe=tt[0].name;Qe&&(De="m-"+(De?Qe+" "+De:Qe))}if(!oe||he!=De){for(;lere;--oe){if(oe<=z.first)return z.first;var le=at(z,oe-1),he=le.stateAfter;if(he&&(!x||oe+(he instanceof vn?he.lookAhead:0)<=z.modeFrontier))return oe;var be=pe(le.text,null,a.options.tabSize);(E==null||b>be)&&(E=oe-1,b=be)}return E}function Mr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontierx;b--){var E=at(a,b).stateAfter;if(E&&(!(E instanceof vn)||b+E.lookAhead=y:z.to>y);(b||(b=[])).push(new or(re,z.from,le?null:z.to))}}return b}function jn(a,y,x){var b;if(a)for(var E=0;E=y:z.to>y);if(oe||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var le=z.from==null||(re.inclusiveLeft?z.from<=y:z.from0&&oe)for(var bn=0;bn0)){var be=[le,1],De=Lt(he.from,oe.from),tt=Lt(he.to,oe.to);(De<0||!re.inclusiveLeft&&!De)&&be.push({from:he.from,to:oe.from}),(tt>0||!re.inclusiveRight&&!tt)&&be.push({from:oe.to,to:he.to}),E.splice.apply(E,be),le+=be.length-3}}return E}function Dr(a){var y=a.markedSpans;if(y){for(var x=0;xy)&&(!b||ii(b,z.marker)<0)&&(b=z.marker)}return b}function yn(a,y,x,b,E){var z=at(a,y),re=ir&&z.markedSpans;if(re)for(var oe=0;oe=0&&De<=0||be<=0&&De>=0)&&(be<=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Lt(he.to,x)>=0:Lt(he.to,x)>0)||be>=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Lt(he.from,b)<=0:Lt(he.from,b)<0)))return!0}}}function on(a){for(var y;y=Rn(a);)a=y.find(-1,!0).line;return a}function Dn(a){for(var y;y=Ht(a);)a=y.find(1,!0).line;return a}function ar(a){for(var y,x;y=Ht(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Vt(a,y){var x=at(a,y),b=on(x);return x==b?y:Ae(b)}function Ft(a,y){if(y>a.lastLine())return y;var x=at(a,y),b;if(!rn(a,x))return y;for(;b=Ht(x);)x=b.find(1,!0).line;return Ae(x)+1}function rn(a,y){var x=ir&&y.markedSpans;if(x){for(var b=void 0,E=0;Ey.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var yr=function(a,y,x){this.text=a,Wr(this,y),this.height=x?x(this):1};yr.prototype.lineNo=function(){return Ae(this)},It(yr);function br(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Dr(a),Wr(a,x);var E=b?b(a):1;E!=a.height&&Gn(a,E)}function Sr(a){a.parent=null,Dr(a)}var zr={},Ar={};function Hr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Ar:zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=rt("span",null,null,Be?"padding-right: .1px":null),b={pre:rt("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var z=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Oi,In(a.display.measure)&&(re=ue(z,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&Ae(z);fr(z,b,Hn(a,z,oe)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=Pt(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=Pt(z.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(ur(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(Be){var le=b.content.lastChild;(/\bcm-tab\b/.test(le.className)||le.querySelector&&le.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Ct(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Pt(b.pre.className,b.textClass||"")),b}function Li(a){var y=Ge("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Oi(a,y,x,b,E,z,re){if(y){var oe=a.splitSpaces?xi(y,a.trailingSpace):y,le=a.cm.state.specialChars,he=!1,be;if(!le.test(y))a.col+=y.length,be=document.createTextNode(oe),a.map.push(a.pos,a.pos+y.length,be),me&&Ye<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var De=0;;){le.lastIndex=De;var tt=le.exec(y),Qe=tt?tt.index-De:y.length-De;if(Qe){var Tt=document.createTextNode(oe.slice(De,De+Qe));me&&Ye<9?be.appendChild(Ge("span",[Tt])):be.appendChild(Tt),a.map.push(a.pos,a.pos+Qe,Tt),a.col+=Qe,a.pos+=Qe}if(!tt)break;De+=Qe+1;var Nt=void 0;if(tt[0]==" "){var Jt=a.cm.options.tabSize,an=Jt-a.col%Jt;Nt=be.appendChild(Ge("span",Ce(an),"cm-tab")),Nt.setAttribute("role","presentation"),Nt.setAttribute("cm-text"," "),a.col+=an}else tt[0]=="\r"||tt[0]==` `?(Nt=be.appendChild(Ge("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Nt.setAttribute("cm-text",tt[0]),a.col+=1):(Nt=a.cm.options.specialCharPlaceholder(tt[0]),Nt.setAttribute("cm-text",tt[0]),me&&Ye<9?be.appendChild(Ge("span",[Nt])):be.appendChild(Nt),a.col+=1);a.map.push(a.pos,a.pos+1,Nt),a.pos++}}if(a.trailingSpace=oe.charCodeAt(y.length-1)==32,x||b||E||he||z||re){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var sn=Ge("span",[be],fn,z);if(re)for(var bn in re)re.hasOwnProperty(bn)&&bn!="style"&&bn!="class"&&sn.setAttribute(bn,re[bn]);return a.content.appendChild(sn)}a.content.appendChild(be)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;Ehe&&De.from<=he));tt++);if(De.to>=be)return a(x,b,E,z,re,oe,le);a(x,b.slice(0,De.to-he),E,z,null,oe,le),z=null,b=b.slice(De.to-he),he=De.to}}}function Xi(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function fr(a,y,x){var b=a.markedSpans,E=a.text,z=0;if(!b){for(var re=1;rele||Un.collapsed&&Sn.to==le&&Sn.from==le)){if(Sn.to!=null&&Sn.to!=le&&Qe>Sn.to&&(Qe=Sn.to,Nt=""),Un.className&&(Tt+=" "+Un.className),Un.css&&(tt=(tt?tt+";":"")+Un.css),Un.startStyle&&Sn.from==le&&(Jt+=" "+Un.startStyle),Un.endStyle&&Sn.to==Qe&&(bn||(bn=[])).push(Un.endStyle,Sn.to),Un.title&&((fn||(fn={})).title=Un.title),Un.attributes)for(var Fr in Un.attributes)(fn||(fn={}))[Fr]=Un.attributes[Fr];Un.collapsed&&(!an||ii(an.marker,Un)<0)&&(an=Sn)}else Sn.from>le&&Qe>Sn.from&&(Qe=Sn.from)}if(bn)for(var si=0;si=oe)break;for(var Bi=Math.min(oe,Qe);;){if(be){var ki=le+be.length;if(!an){var qr=ki>Bi?be.slice(0,Bi-le):be;y.addToken(y,qr,De?De+Tt:Tt,Jt,le+qr.length==Qe?Nt:"",tt,fn)}if(ki>=Bi){be=be.slice(Bi-le),le=Bi;break}le=ki,Jt=""}be=E.slice(z,z=x[he++]),De=Hr(x[he++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=ar(y),this.size=this.rest?Ae(ve(this.rest))-x+1:1,this.node=this.text=null,this.hidden=rn(a,y)}function ti(a,y,x){for(var b=[],E,z=y;z2&&z.push((le.bottom+he.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Ao(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;bx)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=on(y);var x=Ae(y),b=a.display.externalMeasured=new to(a.doc,y,x);b.lineN=x;var E=b.built=ei(a,b);return b.text=E.pre,Se(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return zi(a,uo(a,y),x,b)}function $i(a,y){if(y>=a.display.viewFrom&&y=x.lineN&&yy)&&(z=le-oe,E=z-1,y>=le&&(re="right")),E!=null){if(b=a[he+2],oe==le&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],re="left";if(x=="right"&&E==le-oe)for(;he=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),z=E.node,re=E.start,oe=E.end,le=E.collapse,he;if(z.nodeType==3){for(var be=0;be<4;be++){for(;re&&kt(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe0&&(le=b="right");var De;a.options.lineWrapping&&(De=z.getClientRects()).length>1?he=De[b=="right"?De.length-1:0]:he=z.getBoundingClientRect()}if(me&&Ye<9&&!re&&(!he||!he.left&&!he.right)){var tt=z.parentNode.getClientRects()[0];tt?he={left:tt.left,right:tt.left+Ui(a.display),top:tt.top,bottom:tt.bottom}:he=ba}for(var Qe=he.top-y.rect.top,Tt=he.bottom-y.rect.top,Nt=(Qe+Tt)/2,Jt=y.view.measure.heights,an=0;an=b.text.length?(le=b.text.length,he="before"):le<=0&&(le=0,he="after"),!oe)return re(he=="before"?le-1:le,he=="before");function be(Tt,Nt,Jt){var an=oe[Nt],fn=an.level==1;return re(Jt?Tt-1:Tt,fn!=Jt)}var De=ee(oe,le,he),tt=te,Qe=be(le,De,he=="before");return tt!=null&&(Qe.other=be(le,tt,he!="before")),Qe}function lr(a,y){var x=0;y=At(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=at(a.doc,y.line),E=Mn(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function zn(a,y,x,b,E){var z=We(a,y,x);return z.xRel=E,b&&(z.outside=b),z}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return zn(b.first,0,null,-1,-1);var E=Ne(b,x),z=b.first+b.size-1;if(E>z)return zn(b.first+b.size-1,at(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=at(b,E);;){var oe=Vi(a,re,E,y,x),le=Kt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!le)return oe;var he=le.find(1);if(he.line==E)return he;re=at(b,E=he.line)}}function fi(a,y,x,b){b-=Jo(y);var E=y.text.length,z=Wt(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=Wt(function(re){return zi(a,x,re).top>b},z,E),{begin:z,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,zi(a,x,b),"line").top;return fi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vi(a,y,x,b,E){E-=Mn(y);var z=uo(a,y),re=Jo(y),oe=0,le=y.text.length,he=!0,be=ue(y,a.doc.direction);if(be){var De=(a.options.lineWrapping?ro:Zi)(a,y,x,z,be,b,E);he=De.level!=1,oe=he?De.from:De.to-1,le=he?De.to:De.from-1}var tt=null,Qe=null,Tt=Wt(function(An){var Sn=zi(a,z,An);return Sn.top+=re,Sn.bottom+=re,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(tt=An,Qe=Sn),!0):!1},oe,le),Nt,Jt,an=!1;if(Qe){var fn=b-Qe.left=bn.bottom?1:0}return Tt=Yt(y.text,Tt,1),zn(x,Tt,Jt,an,b-Nt)}function Zi(a,y,x,b,E,z,re){var oe=Wt(function(De){var tt=E[De],Qe=tt.level!=1;return ni(wi(a,We(x,Qe?tt.to:tt.from,Qe?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),le=E[oe];if(oe>0){var he=le.level!=1,be=wi(a,We(x,he?le.from:le.to,he?"after":"before"),"line",y,b);ni(be,z,re,!0)&&be.top>re&&(le=E[oe-1])}return le}function ro(a,y,x,b,E,z,re){var oe=fi(a,y,b,re),le=oe.begin,he=oe.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,De=null,tt=0;tt=he||Qe.to<=le)){var Tt=Qe.level!=1,Nt=zi(a,b,Tt?Math.min(he,Qe.to)-1:Math.max(le,Qe.from)).right,Jt=NtJt)&&(be=Qe,De=Jt)}}return be||(be=E[E.length-1]),be.fromhe&&(be={from:be.from,to:he,level:be.level}),be}var Ti;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=Ge("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild(Ge("br"));Ti.appendChild(document.createTextNode("x"))}Se(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),$t(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ge("span","xxxxxxxxxx"),x=Ge("pre",[y],"CodeMirror-line-like");Se(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var oe=a.display.gutterSpecs[re].className;x[oe]=z.offsetLeft+z.clientLeft+E,b[oe]=z.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ai(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(rn(a.doc,E))return 0;var z=0;if(E.widgets)for(var re=0;re0&&(he=at(a.doc,le.line).text).length==le.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;le=We(le.line,Math.max(0,Math.round((z-Qi(a.display).left)/Ui(a.display))-be))}return le}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;by)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)ir&&Vt(a.doc,y)E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var z=ka(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var re=ka(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):fo(a)}else{var oe=ka(a,y,y,-1),le=ka(a,x,x+b,1);oe&&le?(E.view=E.view.slice(0,oe.index).concat(ti(a,oe.lineN,le.lineN)).concat(E.view.slice(le.index)),E.viewTo+=b):fo(a)}var he=E.externalMeasured;he&&(x=E.lineN&&y=b.viewTo)){var z=b.view[So(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);Ve(re,x)==-1&&re.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=So(a,y),z,re=a.display.view;if(!ir||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var oe=a.display.viewFrom,le=0;le0){if(E==re.length-1)return null;z=oe+re[E].size-y,E++}else z=oe-y;y+=z,x+=z}for(;Vt(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Wl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=ti(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=ti(a,y,b.viewFrom).concat(b.view):b.viewFromx&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function Cs(a){for(var y=a.display.view,x=0,b=0;b=a.display.viewTo||oe.to().line0?y.blinker=setInterval(function(){a.hasFocus()||No(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Ds(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,No(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ct(a,"focus",a,y),a.state.focused=!0,ze(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Be&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function No(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ct(a,"blur",a,y),a.state.focused=!1,ht(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Da(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b.005||be<-.005)&&(Gn(E.line,re),Ls(E.line),E.rest))for(var De=0;Dea.display.sizerWidth){var tt=Math.ceil(oe/Ui(a.display));tt>a.display.maxLineLength&&(a.display.maxLineLength=tt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ls(a){if(a.widgets)for(var y=0;y=re&&(z=Ne(y,Mn(at(y,le))-a.wrapper.clientHeight),re=le)}return{from:z,to:Math.max(re,z+1)}}function Zl(a,y){if(!Re(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!ft){var z=Ge("div","\u200B",null,`position: absolute; top: `+(y.top-x.viewOffset-Kr(a.display))+`px; height: `+(y.bottom-y.top+Mi(a)+x.barHeight)+`px; left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function _l(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?We(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?We(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,oe=wi(a,y),le=!x||x==y?oe:wi(a,x);E={left:Math.min(oe.left,le.left),top:Math.min(oe.top,le.top)-b,right:Math.max(oe.left,le.left),bottom:Math.max(oe.bottom,le.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,De=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(re=!0)),he.scrollLeft!=null&&(ko(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-De)>1&&(re=!0)),!re)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&ko(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=no(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var oe=a.doc.height+Wi(x),le=y.topoe-b;if(y.topE+z){var be=Math.min(y.top,(he?oe:y.bottom)-z);be!=E&&(re.scrollTop=be)}var De=a.options.fixedGutter?0:x.gutters.offsetWidth,tt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-De,Qe=qi(a)-x.gutters.offsetWidth,Tt=y.right-y.left>Qe;return Tt&&(y.right=y.left+Qe),y.left<10?re.scrollLeft=0:y.leftQe+tt-3&&(re.scrollLeft=y.right+(Tt?0:10)-Qe),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Ro(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function jl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=lr(a,y.from),b=lr(a,y.to);Ms(a,x,b,y.margin)}}function Ms(a,y,x,b){var E=Qa(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(se||es(a,{top:y}),Ts(a,y,!0),se&&es(a),na(a,100))}function Ts(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ko(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Rs(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Wi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Mi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=Ge("div",[Ge("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ge("div",[Ge("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),ge(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),ge(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&Ye<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var z=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=Le&&!ye?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ce,this.disableVert=new ce},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),z=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function Io(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;As(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Da(a),As(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function As(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ps={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ht(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ps[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),ge(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?ko(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&ze(a.display.wrapper,a.display.scrollbars.addClass)}var Vl=0;function Do(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vl},ao(a.curOp)}function Lo(a){var y=a.curOp;y&&mi(y,function(x){for(var b=0;b=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Ta(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&Da(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Mi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Yn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(z){if(b.line>=a.display.viewFrom){var re=z.styles,oe=z.text.length>a.options.maxHighlightLength?_n(y.mode,b.state):null,le=xn(a,z,b,!0);oe&&(b.state=oe),z.styles=le.styles;var he=z.styleClasses,be=le.classes;be?z.styleClasses=be:he&&(z.styleClasses=null);for(var De=!re||re.length!=z.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),tt=0;!De&&ttx)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Pi(a,function(){for(var z=0;z=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cs(a)==0)return!1;Is(a)&&(fo(a),y.dims=co(a));var E=b.first+b.size,z=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFromre&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),ir&&(z=Vt(a.doc,z),re=Ft(a.doc,re));var oe=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Wl(a,z,re),x.viewOffset=Mn(at(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var le=Cs(a);if(!oe&&le==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return le>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),le>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),$t(x.cursorDiv),$t(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,oe&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Ns(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==qi(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Wi(a.display)-no(a),x.top)}),y.visible=La(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=La(a.display,a.doc,x));if(!$a(a,y))break;Da(a);var E=ea(a);Qo(a),Io(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Ta(a,y);if($a(a,x)){Da(a),Ns(a,x);var b=ea(a);Qo(a),Io(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function oe(Tt){var Nt=Tt.nextSibling;return Be&&Le&&a.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),Nt}for(var le=b.view,he=b.viewFrom,be=0;be-1&&(Qe=!1),so(a,De,he,x)),Qe&&($t(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(Dt(a.options,he)))),re=De.node.nextSibling}he+=De.size}for(;re;)re=oe(re)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Mi(a)+"px"}function Rs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,z=b+"px",re=0;rere.clientWidth,le=re.scrollHeight>re.clientHeight;if(b&&oe||E&&le){if(E&&Le&&Be){e:for(var he=y.target,be=z.view;he!=re;he=he.parentNode)for(var De=0;De=0&&Lt(a,b.to())<=0)return x}return-1};var kr=function(a,y){this.anchor=a,this.head=y};kr.prototype.from=function(){return _t(this.anchor,this.head)},kr.prototype.to=function(){return hn(this.anchor,this.head)},kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(tt,Qe){return Lt(tt.from(),Qe.from())}),x=Ve(y,E);for(var z=1;z0:le>=0){var he=_t(oe.from(),re.from()),be=hn(oe.to(),re.to()),De=oe.empty()?re.from()==re.head:oe.from()==oe.head;z<=x&&--x,y.splice(--z,2,new kr(De?be:he,De?he:be))}}return new Fi(y,x)}function po(a,y){return new Fi([new kr(a,y||a)],0)}function vo(a){return a.text?We(a.from.line+a.text.length-1,ve(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Ws(a,y){if(Lt(a,y.from)<0)return a;if(Lt(a,y.to)<=0)return vo(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=vo(y).ch-y.to.ch),We(x,b)}function is(a,y){for(var x=[],b=0;b1&&a.remove(oe.line+1,Tt-1),a.insert(oe.line+1,an)}Zr(a,"change",a,y)}function mo(a,y,x){function b(E,z,re){if(E.linked)for(var oe=0;oe1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ve(a.done)}function Vs(a,y,x,b){var E=a.history;E.undone.length=0;var z=+new Date,re,oe;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=su(E,E.lastOp==b)))oe=ve(re.changes),Lt(y.from,y.to)==0&&Lt(y.from,oe.to)==0?oe.to=vo(y):re.changes.push(ss(a,y));else{var le=ve(E.done);for((!le||!le.ranges)&&Ba(a.sel,E.done),re={changes:[ss(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=z,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,oe||Ct(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,z=b&&b.origin;x==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||lu(a,z,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=ve(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Us(a,y,x,b){var E=y["spans_"+a.id],z=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[z]=re.markedSpans),++z})}function cu(a){if(!a)return null;for(var y,x=0;x-1&&(ve(oe)[De]=he[De],delete he[De])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var z=Lt(y,E)<0;z!=Lt(x,E)<0?(E=y,y=x):z!=Lt(y,x)<0&&(y=x)}return new kr(E,y)}else return new kr(x||y,y)}function Na(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(a,new Fi([ls(a.sel.primary(),y,x,E)],0),b)}function Ys(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),z=0;z=y.ch:oe.to>y.ch))){if(E&&(Ct(le,"beforeCursorEnter"),le.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!le.atomic)continue;if(x){var De=le.find(b<0?1:-1),tt=void 0;if((b<0?be:he)&&(De=el(a,De,-b,De&&De.line==y.line?z:null)),De&&De.line==y.line&&(tt=Lt(De,x))&&(b<0?tt<0:tt>0))return Oo(a,De,y,b,E)}var Qe=le.find(b<0?-1:1);return(b<0?he:be)&&(Qe=el(a,Qe,b,Qe.line==y.line?z:null)),Qe?Oo(a,Qe,y,b,E):null}}return y}function Ia(a,y,x,b,E){var z=b||1,re=Oo(a,y,x,z,E)||!E&&Oo(a,y,x,z,!0)||Oo(a,y,x,-z,E)||!E&&Oo(a,y,x,-z,!0);return re||(a.cantEdit=!0,We(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?At(a,We(y.line-1)):null:x>0&&y.ch==(b||at(a,y.line)).text.length?y.line=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Lt(y.from,y.to)==0)){var x=is(a,y);Vs(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Br(a,y));var b=[];mo(a,function(E,z){!z&&Ve(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Br(E,y))})}}function Fa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,z,re=a.sel,oe=y=="undo"?E.done:E.undone,le=y=="undo"?E.undone:E.done,he=0;he=0;--Qe){var Tt=tt(Qe);if(Tt)return Tt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Fi(Me(a.sel.ranges,function(E){return new kr(We(E.anchor.line+y,E.anchor.ch),We(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Ci(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;ba.lastLine())){if(y.from.linez&&(y={from:y.from,to:We(z,at(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Qt(a,y.from,y.to),x||(x=is(a,y)),a.cm?du(a.cm,y,b):as(a,y,b),Ra(a,x,we),a.cantEdit&&Ia(a,We(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,oe=!1,le=z.line;a.options.lineWrapping||(le=Ae(on(at(b,z.line))),b.iter(le,re.line+1,function(Qe){if(Qe==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Zt(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(le,z.line+y.text.length,function(Qe){var Tt=sr(Qe);Tt>E.maxLineLength&&(E.maxLine=Qe,E.maxLineLength=Tt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),Mr(b,z.line),na(a,400);var he=y.text.length-(re.line-z.line)-1;y.full?Ci(a):z.line==re.line&&y.text.length==1&&!Zs(a.doc,y)?ho(a,z.line,"text"):Ci(a,z.line,re.line+1,he);var be=Rt(a,"changes"),De=Rt(a,"change");if(De||be){var tt={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};De&&Zr(a,"change",a,tt),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(tt)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var z;b||(b=x),Lt(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),Ho(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x1||!(this.children[0]instanceof sa))){var oe=[];this.collapse(oe),this.children=[new sa(oe)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y50){for(var re=E.lines.length%25+25,oe=re;oe10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;ba.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Ci(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&Zr(a,"markerCleared",a,this,b,E),y&&Lo(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=rt("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(yn(a,y.line,y,x,z)||y.line!=x.line&&yn(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");gr()}z.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var oe=y.line,le=a.cm,he;if(a.iter(oe,x.line+1,function(De){le&&z.collapsed&&!le.options.lineWrapping&&on(De)==le.display.maxLine&&(he=!0),z.collapsed&&oe!=y.line&&Gn(De,0),pr(De,new or(z,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),z.collapsed&&a.iter(y.line,x.line+1,function(De){rn(a,De)&&Gn(De,0)}),z.clearOnEnter&&ge(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(Rr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++ul,z.atomic=!0),le){if(he&&(le.curOp.updateMaxLine=!0),z.collapsed)Ci(le,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var be=y.line;be<=x.line;be++)ho(le,be,"text");z.atomic&&qs(le.doc),Zr(le,"markerAdded",le,z)}return z}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x=0;le--)Ho(this,b[le]);oe?Js(this,oe):this.cm&&Ro(this.cm)}),undo:ai(function(){Fa(this,"undo")}),redo:ai(function(){Fa(this,"redo")}),undoSelection:ai(function(){Fa(this,"undo",!0)}),redoSelection:ai(function(){Fa(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=At(this,a),y=At(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var oe=0;oe=le.to||le.from==null&&E!=a.line||le.from!=null&&E==y.line&&le.from>=y.ch)&&(!x||x(le.marker))&&b.push(le.marker.parent||le.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;ba)return y=a,!0;a-=z,++x}),At(this,We(x,y))},indexFromPos:function(a){a=At(this,a);var y=a.ch;if(a.liney&&(y=a.from),a.to!=null&&a.to-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var be=a.dataTransfer.getData("Text");if(be){var De;if(y.state.draggingText&&!y.state.draggingText.copy&&(De=y.listSelections()),Ra(y.doc,po(x,x)),De)for(var tt=0;tt=0;oe--)Wo(a.doc,"",b[oe].from,b[oe].to,"+delete");Ro(a)})}function cs(a,y,x){var b=Yt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function hs(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new We(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=ue(x,y.doc.direction);if(z){var re=E<0?ve(z):z[0],oe=E<0==(re.level==1),le=oe?"after":"before",he;if(re.level>0||y.doc.direction=="rtl"){var be=uo(y,x);he=E<0?x.text.length-1:0;var De=zi(y,be,he).top;he=Wt(function(tt){return zi(y,be,tt).top==De},E<0==(re.level==1)?re.from:re.to-1,he),le=="before"&&(he=cs(x,he,1))}else he=E<0?re.to:re.from;return new We(b,he,le)}}return new We(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=ue(y,a.doc.direction);if(!E)return hs(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var z=ee(E,x.ch,x.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from=re.from&&tt>=be.begin)){var Qe=De?"before":"after";return new We(x.line,tt,Qe)}}var Tt=function(an,fn,sn){for(var bn=function(Fr,si){return si?new We(x.line,oe(Fr,1),"before"):new We(x.line,Fr,"after")};an>=0&&an0==(An.level!=1),Un=Sn?sn.begin:oe(sn.end,-1);if(An.from<=Un&&Un0?be.end:oe(be.begin,-1);return Jt!=null&&!(b>0&&Jt==y.text.length)&&(Nt=Tt(b>0?0:E.length-1,b,he(Jt)),Nt)?Nt:null}var da={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),we)},killLine:function(a){return _o(a,function(y){if(y.empty()){var x=at(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line0)E=new We(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),We(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=at(a.doc,E.line-1).text;re&&(E=new We(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),We(E.line-1,re.length-1),E,"+transpose"))}}x.push(new kr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Pi(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;ba&&Lt(y,this.pos)==0&&x==this.button};var va,ma;function Ru(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new ps(x,a,y),va=null,"double"):(va=new ps(x,a,y),ma=null,"single")}function El(a){var y=this,x=y.display;if(!(Re(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Be||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Zn(a),z=b?Ru(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,z,a))&&(E==1?b?Ou(y,b,z,a):$n(a)==x.scroller&&un(a):E==2?(b&&Na(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(vt?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(a,y,x,b,E){var z="Click";return b=="double"?z="Double"+z:b=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,pa(a,ml(z,E),E,function(re){if(typeof re=="string"&&(re=da[re]),!re)return!1;var oe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),oe=re(a,x)!=lt}finally{a.state.suppressEdits=!1}return oe})}function Fu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var z=st?x.shiftKey&&x.metaKey:x.altKey;E.unit=z?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Le?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Le?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout(St(Es,a),0):a.curOp.focus=Ee();var E=Fu(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&mr&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(Lt((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(Lt(re.to(),y)>0||y.xRel<0)?Hu(a,b,y,E):Wu(a,b,y,E)}function Hu(a,y,x,b){var E=a.display,z=!1,re=oi(a,function(he){Be&&(E.scroller.draggable=!1),a.state.draggingText=!1,pt(E.wrapper.ownerDocument,"mouseup",re),pt(E.wrapper.ownerDocument,"mousemove",oe),pt(E.scroller,"dragstart",le),pt(E.scroller,"drop",re),z||(un(he),b.addNew||Na(a.doc,x,null,null,b.extend),Be&&!Te||me&&Ye==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),oe=function(he){z=z||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},le=function(){return z=!0};Be&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),ge(E.wrapper.ownerDocument,"mouseup",re),ge(E.wrapper.ownerDocument,"mousemove",oe),ge(E.scroller,"dragstart",le),ge(E.scroller,"drop",re),Ds(a),setTimeout(function(){return E.input.focus()},20)}function Dl(a,y,x){if(x=="char")return new kr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new kr(We(y.line,0),At(a.doc,We(y.line+1,0)));var b=x(a,y);return new kr(b.from,b.to)}function Wu(a,y,x,b){var E=a.display,z=a.doc;un(y);var re,oe,le=z.sel,he=le.ranges;if(b.addNew&&!b.extend?(oe=z.sel.contains(x),oe>-1?re=he[oe]:re=new kr(x,x)):(re=z.sel.primary(),oe=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new kr(x,x)),x=Co(a,y,!0,!0),oe=-1;else{var be=Dl(a,x,b.unit);b.extend?re=ls(re,be.anchor,be.head,b.extend):re=be}b.addNew?oe==-1?(oe=he.length,di(z,Ki(a,he.concat([re]),oe),{scroll:!1,origin:"*mouse"})):he.length>1&&he[oe].empty()&&b.unit=="char"&&!b.extend?(di(z,Ki(a,he.slice(0,oe).concat(he.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),le=z.sel):us(z,oe,re,Xe):(oe=0,di(z,new Fi([re],0),Xe),le=z.sel);var De=x;function tt(sn){if(Lt(De,sn)!=0)if(De=sn,b.unit=="rectangle"){for(var bn=[],An=a.options.tabSize,Sn=pe(at(z,x.line).text,x.ch,An),Un=pe(at(z,sn.line).text,sn.ch,An),Fr=Math.min(Sn,Un),si=Math.max(Sn,Un),jr=Math.min(x.line,sn.line),Bi=Math.min(a.lastLine(),Math.max(x.line,sn.line));jr<=Bi;jr++){var ki=at(z,jr).text,qr=Mt(ki,Fr,An);Fr==si?bn.push(new kr(We(jr,qr),We(jr,qr))):ki.length>qr&&bn.push(new kr(We(jr,qr),We(jr,Mt(ki,si,An))))}bn.length||bn.push(new kr(x,x)),di(z,Ki(a,le.ranges.slice(0,oe).concat(bn),oe),{origin:"*mouse",scroll:!1}),a.scrollIntoView(sn)}else{var Ei=re,hi=Dl(a,sn,b.unit),ri=Ei.anchor,$r;Lt(hi.anchor,ri)>0?($r=hi.head,ri=_t(Ei.from(),hi.anchor)):($r=hi.anchor,ri=hn(Ei.to(),hi.head));var Ur=le.ranges.slice(0);Ur[oe]=zu(a,new kr(At(z,ri),$r)),di(z,Ki(a,Ur,oe),Xe)}}var Qe=E.wrapper.getBoundingClientRect(),Tt=0;function Nt(sn){var bn=++Tt,An=Co(a,sn,!0,b.unit=="rectangle");if(An)if(Lt(An,De)!=0){a.curOp.focus=Ee(),tt(An);var Sn=La(E,z);(An.line>=Sn.to||An.lineQe.bottom?20:0;Un&&setTimeout(oi(a,function(){Tt==bn&&(E.scroller.scrollTop+=Un,Nt(sn))}),50)}}function Jt(sn){a.state.selectingText=!1,Tt=1/0,sn&&(un(sn),E.input.focus()),pt(E.wrapper.ownerDocument,"mousemove",an),pt(E.wrapper.ownerDocument,"mouseup",fn),z.history.lastSelOrigin=null}var an=oi(a,function(sn){sn.buttons===0||!Zn(sn)?Jt(sn):Nt(sn)}),fn=oi(a,Jt);a.state.selectingText=fn,ge(E.wrapper.ownerDocument,"mousemove",an),ge(E.wrapper.ownerDocument,"mouseup",fn)}function zu(a,y){var x=y.anchor,b=y.head,E=at(a.doc,x.line);if(Lt(x,b)==0&&x.sticky==b.sticky)return y;var z=ue(E);if(!z)return y;var re=ee(z,x.ch,x.sticky),oe=z[re];if(oe.from!=x.ch&&oe.to!=x.ch)return y;var le=re+(oe.from==x.ch==(oe.level!=1)?0:1);if(le==0||le==z.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=ee(z,b.ch,b.sticky),De=be-re||(b.ch-x.ch)*(oe.level==1?-1:1);be==le-1||be==le?he=De<0:he=De>0}var tt=z[le+(he?-1:0)],Qe=he==(tt.level==1),Tt=Qe?tt.from:tt.to,Nt=Qe?"after":"before";return x.ch==Tt&&x.sticky==Nt?y:new kr(new We(x.line,Tt,Nt),b)}function Ll(a,y,x,b){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch(tt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&un(y);var re=a.display,oe=re.lineDiv.getBoundingClientRect();if(z>oe.bottom||!Rt(a,x))return cn(y);z-=oe.top-re.viewOffset;for(var le=0;le=E){var be=Ne(a.doc,z),De=a.display.gutterSpecs[le];return Ct(a,x,a,be,De.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||Zu(a,y)||Re(a,y,"contextmenu")||vt||a.display.input.onContextMenu(y)}function Zu(a,y){return Rt(a,"gutterContextMenu")?Ll(a,y,"gutterContextMenu",!1):!1}function Tl(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var Go={toString:function(){return"CodeMirror.Init"}},Al={},za={};function _u(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(oe,le,he){he!=Go&&z(oe,le,he)}:z)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),wo(b),Ci(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var z=[],re=b.doc.first;b.doc.iter(function(le){for(var he=0;;){var be=le.text.indexOf(E,he);if(be==-1)break;he=be+E.length,z.push(We(re,be))}re++});for(var oe=z.length-1;oe>=0;oe--)Wo(b.doc,E,z[oe],We(z[oe].line,z[oe].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,z){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=Go&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!ut),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ra(b)},!0),x("keyMap","default",function(b,E,z){var re=Ha(E),oe=z!=Go&&Ha(z);oe&&oe.detach&&oe.detach(b,re),re.attach&&re.attach(b,oe||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Io(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Io(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(No(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Go;if(!y!=!b){var E=a.display.dragFunctions,z=y?ge:pt;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(ze(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ht(a.display.wrapper,"CodeMirror-wrap"),Vn(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Io(a)},100)}function Gr(a,y){var x=this;if(!(this instanceof Gr))return new Gr(a,y);this.options=y=y?dt(y):{},dt(Al,y,!1);var b=y.value;typeof b=="string"?b=new Si(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Gr.inputStyles[y.inputStyle](this),z=this.display=new ru(a,b,E,y);z.wrapper.CodeMirror=this,Tl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ce,keySeq:null,specialChars:null},y.autofocus&&!Oe&&z.input.focus(),me&&Ye<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,_s(this,b),y.autofocus&&!Oe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):No(this);for(var re in za)za.hasOwnProperty(re)&&za[re](this,y[re],Go);Is(this),y.finishInit&&y.finishInit(this);for(var oe=0;oe20*20}ge(y.scroller,"touchstart",function(le){if(!Re(a,le)&&!z(le)&&!vs(a,le)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},le.touches.length==1&&(y.activeTouch.left=le.touches[0].pageX,y.activeTouch.top=le.touches[0].pageY)}}),ge(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ge(y.scroller,"touchend",function(le){var he=y.activeTouch;if(he&&!ui(y,le)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),De;!he.prev||re(he,he.prev)?De=new kr(be,be):!he.prev.prev||re(he,he.prev.prev)?De=a.findWordAt(be):De=new kr(We(be.line,0),At(a.doc,We(be.line+1,0))),a.setSelection(De.anchor,De.head),a.focus(),un(le)}E()}),ge(y.scroller,"touchcancel",E),ge(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Ct(a,"scroll",a))}),ge(y.scroller,"mousewheel",function(le){return Hs(a,le)}),ge(y.scroller,"DOMMouseScroll",function(le){return Hs(a,le)}),ge(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(le){Re(a,le)||wn(le)},over:function(le){Re(a,le)||(wu(a,le),wn(le))},start:function(le){return xu(a,le)},drop:oi(a,bu),leave:function(le){Re(a,le)||fl(a)}};var oe=y.input.getField();ge(oe,"keyup",function(le){return Sl.call(a,le)}),ge(oe,"keydown",oi(a,Cl)),ge(oe,"keypress",oi(a,kl)),ge(oe,"focus",function(le){return Ja(a,le)}),ge(oe,"blur",function(le){return No(a,le)})}var ms=[];Gr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=Yn(a,y).state:x="prev");var re=a.options.tabSize,oe=at(E,y),le=pe(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var he=oe.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(oe.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(z,oe.text.slice(he.length),oe.text),be==lt||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe(at(E,y-1).text,null,re):be=0:x=="add"?be=le+a.options.indentUnit:x=="subtract"?be=le-a.options.indentUnit:typeof x=="number"&&(be=le+x),be=Math.max(0,be);var De="",tt=0;if(a.options.indentWithTabs)for(var Qe=Math.floor(be/re);Qe;--Qe)tt+=re,De+=" ";if(ttre,le=rr(y),he=null;if(oe&&b.ranges.length>1)if(Yi&&Yi.text.join(` `)==y){if(b.ranges.length%Yi.text.length==0){he=[];for(var be=0;be=0;tt--){var Qe=b.ranges[tt],Tt=Qe.from(),Nt=Qe.to();Qe.empty()&&(x&&x>0?Tt=We(Tt.line,Tt.ch-x):a.state.overwrite&&!oe?Nt=We(Nt.line,Math.min(at(z,Nt.line).text.length,Nt.ch+ve(le).length)):oe&&Yi&&Yi.lineWise&&Yi.text.join(` `)==le.join(` `)&&(Tt=Nt=We(Tt.line,0)));var Jt={from:Tt,to:Nt,text:he?he[tt%he.length]:le,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Ho(a.doc,Jt),Zr(a,"inputRead",a,Jt)}y&&!oe&&Bl(a,y),Ro(a),a.curOp.updateInput<2&&(a.curOp.updateInput=De),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Pi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Bl(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var oe=0;oe-1){re=ga(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(at(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Zr(a,"electricInput",a,E.head.line)}}}function Nl(a){for(var y=[],x=[],b=0;bz&&(ga(this,oe.head.line,b,!0),z=oe.head.line,re==this.doc.sel.primIndex&&Ro(this));else{var le=oe.from(),he=oe.to(),be=Math.max(z,le.line);z=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var De=be;De0&&us(this.doc,re,new kr(le,tt[re].to()),we)}}}),getTokenAt:function(b,E){return Wn(this,b,E)},getLineTokens:function(b,E){return Wn(this,We(b),E,!0)},getTokenTypeAt:function(b){b=At(this.doc,b);var E=Hn(this,at(this.doc,b.line)),z=0,re=(E.length-1)/2,oe=b.ch,le;if(oe==0)le=E[2];else for(;;){var he=z+re>>1;if((he?E[he*2-1]:0)>=oe)re=he;else if(E[he*2+1]le&&(b=le,re=!0),oe=at(this.doc,b)}else oe=b;return Po(this,oe,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-Mn(oe):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,z,re,oe){var le=this.display;b=wi(this,At(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),le.sizer.appendChild(E),re=="over")he=b.top;else if(re=="above"||re=="near"){var De=Math.max(le.wrapper.clientHeight,this.doc.height),tt=Math.max(le.sizer.clientWidth,le.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>De)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=De&&(he=b.bottom),be+E.offsetWidth>tt&&(be=tt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",oe=="right"?(be=le.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(oe=="left"?be=0:oe=="middle"&&(be=(le.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),z&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(da.hasOwnProperty(b))return da[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,z,re){var oe=1;E<0&&(oe=-1,E=-E);for(var le=At(this.doc,b),he=0;he0&&be(z.charAt(re-1));)--re;for(;oe.5||this.options.lineWrapping)&&Ya(this),Ct(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),_s(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Zr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},It(a),a.registerHelper=function(b,E,z){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=z},a.registerGlobalHelper=function(b,E,z,re){a.registerHelper(b,E,re),x[b]._global.push({pred:z,val:re})}}function ys(a,y,x,b,E){var z=y,re=x,oe=at(a,y.line),le=E&&a.direction=="rtl"?-x:x;function he(){var fn=y.line+le;return fn=a.first+a.size?!1:(y=new We(fn,y.ch,y.sticky),oe=at(a,fn))}function be(fn){var sn;if(b=="codepoint"){var bn=oe.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(bn)?sn=null:sn=new We(y.line,Math.max(0,Math.min(oe.text.length,y.ch+x*(bn>=55296&&bn<56320?2:1))),-x)}else E?sn=Lu(a.cm,oe,y,x):sn=hs(oe,y,x);if(sn==null)if(!fn&&he())y=fs(E,a.cm,oe,y.line,le);else return!1;else y=sn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var De=null,tt=b=="group",Qe=a.cm&&a.cm.getHelper(y,"wordChars"),Tt=!0;!(x<0&&!be(!Tt));Tt=!1){var Nt=oe.text.charAt(y.ch)||` `,Jt=nt(Nt,Qe)?"w":tt&&Nt==` `?"n":!tt||/\s/.test(Nt)?null:"p";if(tt&&!Tt&&!Jt&&(Jt="s"),De&&De!=Jt){x<0&&(x=1,be(),y.sticky="after");break}if(Jt&&(De=Jt),x>0&&!be(!Tt))break}var an=Ia(a,y,z,re,!0);return Xt(z,an)&&(an.hitSide=!0),an}function Fl(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var oe=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),le=Math.max(oe-.5*Ai(a.display),3);re=(x>0?y.bottom:y.top)+x*le}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var he;he=ci(a,z,re),!!he.outside;){if(x<0?re<=0:re>=E.height){he.hitSide=!0;break}re+=x*5}return he}var Pr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Pr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Rl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(oe){for(var le=oe.target;le;le=le.parentNode){if(le==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(le.className))break}return!1}ge(E,"paste",function(oe){!z(oe)||Re(b,oe)||Pl(oe,b)||Ye<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),ge(E,"compositionstart",function(oe){y.composing={data:oe.data,done:!1}}),ge(E,"compositionupdate",function(oe){y.composing||(y.composing={data:oe.data,done:!1})}),ge(E,"compositionend",function(oe){y.composing&&(oe.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ge(E,"touchstart",function(){return x.forceCompositionEnd()}),ge(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(oe){if(!(!z(oe)||Re(b,oe))){if(b.somethingSelected())Za({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var le=Nl(b);Za({lineWise:!0,text:le.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(le.ranges,0,we),b.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var he=Yi.text.join(` `);if(oe.clipboardData.setData("Text",he),oe.clipboardData.getData("Text")==he){oe.preventDefault();return}}var be=Il(),De=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),De.value=Yi.text.join(` `);var tt=document.activeElement;ot(De),setTimeout(function(){b.display.lineSpace.removeChild(be),tt.focus(),tt==E&&x.showPrimarySelection()},50)}}ge(E,"copy",re),ge(E,"cut",re)},Pr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Pr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Pr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Pr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Pr.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line=y.display.viewFrom&&Ol(y,b)||{node:oe[0].measure.map[2],offset:0},he=E.linea.firstLine()&&(b=We(b.line-1,at(a.doc,b.line-1).length)),E.ch==at(a.doc,E.line).text.length&&E.liney.viewTo-1)return!1;var z,re,oe;b.line==y.viewFrom||(z=So(a,b.line))==0?(re=Ae(y.view[0].line),oe=y.view[0].node):(re=Ae(y.view[z].line),oe=y.view[z-1].node.nextSibling);var le=So(a,E.line),he,be;if(le==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=Ae(y.view[le+1].line)-1,be=y.view[le+1].node.previousSibling),!oe)return!1;for(var De=a.doc.splitLines(Yu(a,oe,be,re,he)),tt=Qt(a.doc,We(re,0),We(he,at(a.doc,he).text.length));De.length>1&&tt.length>1;)if(ve(De)==ve(tt))De.pop(),tt.pop(),he--;else if(De[0]==tt[0])De.shift(),tt.shift(),re++;else break;for(var Qe=0,Tt=0,Nt=De[0],Jt=tt[0],an=Math.min(Nt.length,Jt.length);Qeb.ch&&fn.charCodeAt(fn.length-Tt-1)==sn.charCodeAt(sn.length-Tt-1);)Qe--,Tt++;De[De.length-1]=fn.slice(0,fn.length-Tt).replace(/^\u200b+/,""),De[0]=De[0].slice(Qe).replace(/\u200b+$/,"");var An=We(re,Qe),Sn=We(he,tt.length?ve(tt).length-Tt:0);if(De.length>1||De[0]||Lt(An,Sn))return Wo(a.doc,De,An,Sn,"+input"),!0},Pr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Pr.prototype.reset=function(){this.forceCompositionEnd()},Pr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Pr.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Pr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return Ci(a.cm)})},Pr.prototype.setUneditable=function(a){a.contentEditable="false"},Pr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||oi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Pr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Pr.prototype.onContextMenu=function(){},Pr.prototype.resetPosition=function(){},Pr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=at(a.doc,y.line),E=Ao(x,b,y.line),z=ue(b,a.doc.direction),re="left";if(z){var oe=ee(z,y.ch);re=oe%2?"right":"left"}var le=xa(E.map,y.ch,re);return le.offset=le.collapse=="right"?le.end:le.start,le}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,oe=a.doc.lineSeparator(),le=!1;function he(Qe){return function(Tt){return Tt.id==Qe}}function be(){re&&(z+=oe,le&&(z+=oe),re=le=!1)}function De(Qe){Qe&&(be(),z+=Qe)}function tt(Qe){if(Qe.nodeType==1){var Tt=Qe.getAttribute("cm-text");if(Tt){De(Tt);return}var Nt=Qe.getAttribute("cm-marker"),Jt;if(Nt){var an=a.findMarks(We(b,0),We(E+1,0),he(+Nt));an.length&&(Jt=an[0].find(0))&&De(Qt(a.doc,Jt.from,Jt.to).join(oe));return}if(Qe.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;fn&&be();for(var sn=0;sn=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ge(E,"paste",function(re){Re(b,re)||Pl(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!Re(b,re)){if(b.somethingSelected())Za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var oe=Nl(b);Za({lineWise:!0,text:oe.text}),re.type=="cut"?b.setSelections(oe.ranges,null,we):(x.prevInput="",E.value=oe.text.join(` `),ot(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ge(E,"cut",z),ge(E,"copy",z),ge(a.scroller,"paste",function(re){if(!(ui(a,re)||Re(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,E.dispatchEvent(oe)}}),ge(a.lineSpace,"selectstart",function(re){ui(a,re)||un(re)}),ge(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),ge(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Xr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=wi(a,x.sel.primary().head,"div"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Se(x.cursorDiv,a.cursors),Se(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Xr.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&ot(this.textarea),me&&Ye>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&Ye>=9&&(this.hasSelection=null))}},Xr.prototype.getField=function(){return this.textarea},Xr.prototype.supportsTouch=function(){return!1},Xr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Oe||Ee()!=this.textarea))try{this.textarea.focus()}catch(a){}},Xr.prototype.blur=function(){this.textarea.blur()},Xr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xr.prototype.receivedFocus=function(){this.slowPoll()},Xr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Xr.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},Xr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||cr(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&Ye>=9&&this.hasSelection===E||Le&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!b&&(b="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,oe=Math.min(b.length,E.length);re1e3||E.indexOf(` `)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xr.prototype.onKeyPress=function(){me&&Ye>=9&&(this.hasSelection=null),this.fastPoll()},Xr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=Co(x,a),re=b.scroller.scrollTop;if(!z||de)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(z)==-1&&oi(x,di)(x.doc,po(z),we);var le=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px; z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;Be&&(De=window.scrollY),b.input.focus(),Be&&window.scrollTo(null,De),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Qe,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function tt(){if(E.selectionStart!=null){var Nt=x.somethingSelected(),Jt="\u200B"+(Nt?E.value:"");E.value="\u21DA",E.value=Jt,y.prevInput=Nt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Jt.length,b.selForContextMenu=x.doc.sel}}function Qe(){if(y.contextMenuPending==Qe&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=le,me&&Ye<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&Ye<9)&&tt();var Nt=0,Jt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Nt++<10?b.detectingSelectAll=setTimeout(Jt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Jt,200)}}if(me&&Ye>=9&&tt(),vt){wn(a);var Tt=function(){pt(window,"mouseup",Tt),setTimeout(Qe,20)};ge(window,"mouseup",Tt)}else setTimeout(Qe,50)},Xr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xr.prototype.setUneditable=function(){},Xr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?dt(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var x=Ee();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=oe.getValue()}var E;if(a.form&&(ge(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){b(),z.submit=E,z.submit(),z.submit=re}}catch(le){}}y.finishInit=function(le){le.save=b,le.getTextArea=function(){return a},le.toTextArea=function(){le.toTextArea=isNaN,b(),a.parentNode.removeChild(le.getWrapperElement()),a.style.display="",a.form&&(pt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var oe=Gr(function(le){return a.parentNode.insertBefore(le,a.nextSibling)},y);return oe}function Qu(a){a.off=pt,a.on=ge,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=rr,a.countColumn=pe,a.findColumn=Mt,a.isWordChar=et,a.Pass=lt,a.signal=Ct,a.Line=yr,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=We,a.cmpPos=Lt,a.modes=xr,a.mimeModes=Ut,a.resolveMode=Tn,a.getMode=Jn,a.modeExtensions=tr,a.extendMode=dr,a.copyState=_n,a.startState=hr,a.innerMode=Fn,a.commands=da,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=Zo,a.normalizeKeyMap=Du,a.StringStream=jt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=un,a.e_stopPropagation=kn,a.e_stop=wn,a.addClass=ze,a.contains=je,a.rmClass=ht,a.keyNames=yo}_u(Gr),Uu(Gr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&Ve(qu,Ga)<0&&(Gr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return It(Si),Gr.inputStyles={textarea:Xr,contenteditable:Pr},Gr.defineMode=function(a){!Gr.defaults.mode&&a!="null"&&(Gr.defaults.mode=a),pn.apply(this,arguments)},Gr.defineMIME=En,Gr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Gr.defineMIME("text/plain","null"),Gr.defineExtension=function(a,y){Gr.prototype[a]=y},Gr.defineDocExtension=function(a,y){Si.prototype[a]=y},Gr.fromTextArea=Ju,Qu(Gr),Gr.version="5.58.2",Gr})},25419:function(Ot,zt,fe){(function(se){se(fe(89780),fe(15525),fe(98101))})(function(se){"use strict";se.defineMode("markdown",function(gt,Ie){var _e=se.getMode(gt,"text/html"),me=_e.name=="null";function Ye(pe){if(se.findModeByName){var ce=se.findModeByName(pe);ce&&(pe=ce.mime||ce.mimes[0])}var Ve=se.getMode(gt,pe);return Ve.name=="null"?null:Ve}Ie.highlightFormatting===void 0&&(Ie.highlightFormatting=!1),Ie.maxBlockquoteDepth===void 0&&(Ie.maxBlockquoteDepth=0),Ie.taskLists===void 0&&(Ie.taskLists=!1),Ie.strikethrough===void 0&&(Ie.strikethrough=!1),Ie.emoji===void 0&&(Ie.emoji=!1),Ie.fencedCodeBlockHighlighting===void 0&&(Ie.fencedCodeBlockHighlighting=!0),Ie.fencedCodeBlockDefaultMode===void 0&&(Ie.fencedCodeBlockDefaultMode="text/plain"),Ie.xml===void 0&&(Ie.xml=!0),Ie.tokenTypeOverrides===void 0&&(Ie.tokenTypeOverrides={});var Be={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var qe in Be)Be.hasOwnProperty(qe)&&Ie.tokenTypeOverrides[qe]&&(Be[qe]=Ie.tokenTypeOverrides[qe]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Te=/^\[(x| )\](?=\s)/i,ye=Ie.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ft=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ue=/^[^#!\[\]*_\\<>` "'(~:]+/,Fe=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Oe=/^\s*\[[^\]]+?\]:.*$/,Le=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,st=" ";function ut(pe,ce,Ve){return ce.f=ce.inline=Ve,Ve(pe,ce)}function Et(pe,ce,Ve){return ce.f=ce.block=Ve,Ve(pe,ce)}function yt(pe){return!pe||!/\S/.test(pe.string)}function vt(pe){if(pe.linkTitle=!1,pe.linkHref=!1,pe.linkText=!1,pe.em=!1,pe.strong=!1,pe.strikethrough=!1,pe.quote=0,pe.indentedCode=!1,pe.f==ht){var ce=me;if(!ce){var Ve=se.innerMode(_e,pe.htmlState);ce=Ve.mode.name=="xml"&&Ve.state.tagStart===null&&!Ve.state.context&&Ve.state.tokenize.isInText}ce&&(pe.f=rt,pe.block=mt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function mt(pe,ce){var Ve=pe.column()===ce.indentation,wt=yt(ce.prevLine.stream),lt=ce.indentedCode,we=ce.prevLine.hr,Xe=ce.list!==!1,Ze=(ce.listStack[ce.listStack.length-1]||0)+3;ce.indentedCode=!1;var Mt=ce.indentation;if(ce.indentationDiff===null&&(ce.indentationDiff=ce.indentation,Xe)){for(ce.list=null;Mt=4&&(lt||ce.prevLine.fencedCodeEnd||ce.prevLine.header||wt))return pe.skipToEnd(),ce.indentedCode=!0,Be.code;if(pe.eatSpace())return null;if(Ve&&ce.indentation<=Ze&&(ve=pe.match(ye))&&ve[1].length<=6)return ce.quote=0,ce.header=ve[1].length,ce.thisLine.header=!0,Ie.highlightFormatting&&(ce.formatting="header"),ce.f=ce.inline,Se(ce);if(ce.indentation<=Ze&&pe.eat(">"))return ce.quote=Ve?1:ce.quote+1,Ie.highlightFormatting&&(ce.formatting="quote"),pe.eatSpace(),Se(ce);if(!Ce&&!ce.setext&&Ve&&ce.indentation<=Ze&&(ve=pe.match(de))){var Me=ve[1]?"ol":"ul";return ce.indentation=Mt+pe.current().length,ce.list=!0,ce.quote=0,ce.listStack.push(ce.indentation),ce.em=!1,ce.strong=!1,ce.code=!1,ce.strikethrough=!1,Ie.taskLists&&pe.match(Te,!1)&&(ce.taskList=!0),ce.f=ce.inline,Ie.highlightFormatting&&(ce.formatting=["list","list-"+Me]),Se(ce)}else{if(Ve&&ce.indentation<=Ze&&(ve=pe.match(Fe,!0)))return ce.quote=0,ce.fencedEndRE=new RegExp(ve[1]+"+ *$"),ce.localMode=Ie.fencedCodeBlockHighlighting&&Ye(ve[2]||Ie.fencedCodeBlockDefaultMode),ce.localMode&&(ce.localState=se.startState(ce.localMode)),ce.f=ce.block=$t,Ie.highlightFormatting&&(ce.formatting="code-block"),ce.code=-1,Se(ce);if(ce.setext||(!it||!Xe)&&!ce.quote&&ce.list===!1&&!ce.code&&!Ce&&!Oe.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(ft)))return ce.setext?(ce.header=ce.setext,ce.setext=0,pe.skipToEnd(),Ie.highlightFormatting&&(ce.formatting="header")):(ce.header=ve[0].charAt(0)=="="?1:2,ce.setext=ce.header),ce.thisLine.header=!0,ce.f=ce.inline,Se(ce);if(Ce)return pe.skipToEnd(),ce.hr=!0,ce.thisLine.hr=!0,Be.hr;if(pe.peek()==="[")return ut(pe,ce,Pt)}return ut(pe,ce,ce.inline)}function ht(pe,ce){var Ve=_e.token(pe,ce.htmlState);if(!me){var wt=se.innerMode(_e,ce.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||ce.md_inside&&pe.current().indexOf(">")>-1)&&(ce.f=rt,ce.block=mt,ce.htmlState=null)}return Ve}function $t(pe,ce){var Ve=ce.listStack[ce.listStack.length-1]||0,wt=ce.indentation=pe.quote?ce.push(Be.formatting+"-"+pe.formatting[Ve]+"-"+pe.quote):ce.push("error"))}if(pe.taskOpen)return ce.push("meta"),ce.length?ce.join(" "):null;if(pe.taskClosed)return ce.push("property"),ce.length?ce.join(" "):null;if(pe.linkHref?ce.push(Be.linkHref,"url"):(pe.strong&&ce.push(Be.strong),pe.em&&ce.push(Be.em),pe.strikethrough&&ce.push(Be.strikethrough),pe.emoji&&ce.push(Be.emoji),pe.linkText&&ce.push(Be.linkText),pe.code&&ce.push(Be.code),pe.image&&ce.push(Be.image),pe.imageAltText&&ce.push(Be.imageAltText,"link"),pe.imageMarker&&ce.push(Be.imageMarker)),pe.header&&ce.push(Be.header,Be.header+"-"+pe.header),pe.quote&&(ce.push(Be.quote),!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=pe.quote?ce.push(Be.quote+"-"+pe.quote):ce.push(Be.quote+"-"+Ie.maxBlockquoteDepth)),pe.list!==!1){var wt=(pe.listStack.length-1)%3;wt?wt===1?ce.push(Be.list2):ce.push(Be.list3):ce.push(Be.list1)}return pe.trailingSpaceNewLine?ce.push("trailing-space-new-line"):pe.trailingSpace&&ce.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ce.length?ce.join(" "):null}function Ge(pe,ce){if(pe.match(Ue,!0))return Se(ce)}function rt(pe,ce){var Ve=ce.text(pe,ce);if(typeof Ve!="undefined")return Ve;if(ce.list)return ce.list=null,Se(ce);if(ce.taskList){var wt=pe.match(Te,!0)[1]===" ";return wt?ce.taskOpen=!0:ce.taskClosed=!0,Ie.highlightFormatting&&(ce.formatting="task"),ce.taskList=!1,Se(ce)}if(ce.taskOpen=!1,ce.taskClosed=!1,ce.header&&pe.match(/^#+$/,!0))return Ie.highlightFormatting&&(ce.formatting="header"),Se(ce);var lt=pe.next();if(ce.linkTitle){ce.linkTitle=!1;var we=lt;lt==="("&&(we=")"),we=(we+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Xe="^\\s*(?:[^"+we+"\\\\]+|\\\\\\\\|\\\\.)"+we;if(pe.match(new RegExp(Xe),!0))return Be.linkHref}if(lt==="`"){var Ze=ce.formatting;Ie.highlightFormatting&&(ce.formatting="code"),pe.eatWhile("`");var Mt=pe.current().length;if(ce.code==0&&(!ce.quote||Mt==1))return ce.code=Mt,Se(ce);if(Mt==ce.code){var it=Se(ce);return ce.code=0,it}else return ce.formatting=Ze,Se(ce)}else if(ce.code)return Se(ce);if(lt==="\\"&&(pe.next(),Ie.highlightFormatting)){var Ce=Se(ce),ve=Be.formatting+"-escape";return Ce?Ce+" "+ve:ve}if(lt==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ce.imageMarker=!0,ce.image=!0,Ie.highlightFormatting&&(ce.formatting="image"),Se(ce);if(lt==="["&&ce.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ce.imageMarker=!1,ce.imageAltText=!0,Ie.highlightFormatting&&(ce.formatting="image"),Se(ce);if(lt==="]"&&ce.imageAltText){Ie.highlightFormatting&&(ce.formatting="image");var Ce=Se(ce);return ce.imageAltText=!1,ce.image=!1,ce.inline=ce.f=je,Ce}if(lt==="["&&!ce.image)return ce.linkText&&pe.match(/^.*?\]/)||(ce.linkText=!0,Ie.highlightFormatting&&(ce.formatting="link")),Se(ce);if(lt==="]"&&ce.linkText){Ie.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return ce.linkText=!1,ce.inline=ce.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?je:rt,Ce}if(lt==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Pe,Ie.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return Ce?Ce+=" ":Ce="",Ce+Be.linkInline}if(lt==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Pe,Ie.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return Ce?Ce+=" ":Ce="",Ce+Be.linkEmail}if(Ie.xml&<==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Me=pe.string.indexOf(">",pe.pos);if(Me!=-1){var $e=pe.string.substring(pe.start,Me);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($e)&&(ce.md_inside=!0)}return pe.backUp(1),ce.htmlState=se.startState(_e),Et(pe,ce,ht)}if(Ie.xml&<==="<"&&pe.match(/^\/\w*?>/))return ce.md_inside=!1,"tag";if(lt==="*"||lt==="_"){for(var xe=1,He=pe.pos==1?" ":pe.string.charAt(pe.pos-2);xe<3&&pe.eat(lt);)xe++;var Je=pe.peek()||" ",et=!/\s/.test(Je)&&(!Le.test(Je)||/\s/.test(He)||Le.test(He)),nt=!/\s/.test(He)&&(!Le.test(He)||/\s/.test(Je)||Le.test(Je)),Ke=null,xt=null;if(xe%2&&(!ce.em&&et&&(lt==="*"||!nt||Le.test(He))?Ke=!0:ce.em==lt&&nt&&(lt==="*"||!et||Le.test(Je))&&(Ke=!1)),xe>1&&(!ce.strong&&et&&(lt==="*"||!nt||Le.test(He))?xt=!0:ce.strong==lt&&nt&&(lt==="*"||!et||Le.test(Je))&&(xt=!1)),xt!=null||Ke!=null){Ie.highlightFormatting&&(ce.formatting=Ke==null?"strong":xt==null?"em":"strong em"),Ke===!0&&(ce.em=lt),xt===!0&&(ce.strong=lt);var it=Se(ce);return Ke===!1&&(ce.em=!1),xt===!1&&(ce.strong=!1),it}}else if(lt===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Se(ce);pe.backUp(1)}if(Ie.strikethrough){if(lt==="~"&&pe.eatWhile(lt)){if(ce.strikethrough){Ie.highlightFormatting&&(ce.formatting="strikethrough");var it=Se(ce);return ce.strikethrough=!1,it}else if(pe.match(/^[^\s]/,!1))return ce.strikethrough=!0,Ie.highlightFormatting&&(ce.formatting="strikethrough"),Se(ce)}else if(lt===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Se(ce);pe.backUp(2)}}if(Ie.emoji&<===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ce.emoji=!0,Ie.highlightFormatting&&(ce.formatting="emoji");var kt=Se(ce);return ce.emoji=!1,kt}return lt===" "&&(pe.match(/^ +$/,!1)?ce.trailingSpace++:ce.trailingSpace&&(ce.trailingSpaceNewLine=!0)),Se(ce)}function Pe(pe,ce){var Ve=pe.next();if(Ve===">"){ce.f=ce.inline=rt,Ie.highlightFormatting&&(ce.formatting="link");var wt=Se(ce);return wt?wt+=" ":wt="",wt+Be.linkInline}return pe.match(/^[^>]+/,!0),Be.linkInline}function je(pe,ce){if(pe.eatSpace())return null;var Ve=pe.next();return Ve==="("||Ve==="["?(ce.f=ce.inline=ze(Ve==="("?")":"]"),Ie.highlightFormatting&&(ce.formatting="link-string"),ce.linkHref=!0,Se(ce)):"error"}var Ee={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ze(pe){return function(ce,Ve){var wt=ce.next();if(wt===pe){Ve.f=Ve.inline=rt,Ie.highlightFormatting&&(Ve.formatting="link-string");var lt=Se(Ve);return Ve.linkHref=!1,lt}return ce.match(Ee[pe]),Ve.linkHref=!0,Se(Ve)}}function Pt(pe,ce){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ce.f=ot,pe.next(),Ie.highlightFormatting&&(ce.formatting="link"),ce.linkText=!0,Se(ce)):ut(pe,ce,rt)}function ot(pe,ce){if(pe.match(/^\]:/,!0)){ce.f=ce.inline=St,Ie.highlightFormatting&&(ce.formatting="link");var Ve=Se(ce);return ce.linkText=!1,Ve}return pe.match(/^([^\]\\]|\\.)+/,!0),Be.linkText}function St(pe,ce){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ce.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ce.f=ce.inline=rt,Be.linkHref+" url")}var dt={startState:function(){return{f:mt,prevLine:{stream:null},thisLine:{stream:null},block:mt,htmlState:null,indentation:0,inline:rt,text:Ge,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&se.copyState(_e,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?se.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,ce){if(ce.formatting=!1,pe!=ce.thisLine.stream){if(ce.header=0,ce.hr=!1,pe.match(/^\s*$/,!0))return vt(ce),null;if(ce.prevLine=ce.thisLine,ce.thisLine={stream:pe},ce.taskList=!1,ce.trailingSpace=0,ce.trailingSpaceNewLine=!1,!ce.localState&&(ce.f=ce.block,ce.f!=ht)){var Ve=pe.match(/^\s*/,!0)[0].replace(/\t/g,st).length;if(ce.indentation=Ve,ce.indentationDiff=null,Ve>0)return null}}return ce.f(pe,ce)},innerMode:function(pe){return pe.block==ht?{state:pe.htmlState,mode:_e}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:dt}},indent:function(pe,ce,Ve){return pe.block==ht&&_e.indent?_e.indent(pe.htmlState,ce,Ve):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ce,Ve):se.Pass},blankLine:vt,getType:Se,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return dt},"xml"),se.defineMIME("text/markdown","markdown"),se.defineMIME("text/x-markdown","markdown")})},98101:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){"use strict";se.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 gt=0;gt-1&&_e.substring(Be+1,_e.length);if(qe)return se.findModeByExtension(qe)},se.findModeByName=function(_e){_e=_e.toLowerCase();for(var me=0;me0?Ue.cmdState[Ue.cmdState.length-1]:null}function Ye(Ue){var Fe=Ue.cmdState.pop();Fe&&Fe.closeBracket()}function Be(Ue){for(var Fe=Ue.cmdState,Oe=Fe.length-1;Oe>=0;Oe--){var Le=Fe[Oe];if(Le.name!="DEFAULT")return Le}return{styleIdentifier:function(){return null}}}function qe(Ue,Fe,Oe){return function(){this.name=Ue,this.bracketNo=0,this.style=Fe,this.styles=Oe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ke={};ke.importmodule=qe("importmodule","tag",["string","builtin"]),ke.documentclass=qe("documentclass","tag",["","atom"]),ke.usepackage=qe("usepackage","tag",["atom"]),ke.begin=qe("begin","tag",["atom"]),ke.end=qe("end","tag",["atom"]),ke.label=qe("label","tag",["atom"]),ke.ref=qe("ref","tag",["atom"]),ke.eqref=qe("eqref","tag",["atom"]),ke.cite=qe("cite","tag",["atom"]),ke.bibitem=qe("bibitem","tag",["atom"]),ke.Bibitem=qe("Bibitem","tag",["atom"]),ke.RBibitem=qe("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(Ue,Fe){Ue.f=Fe}function Te(Ue,Fe){var Oe;if(Ue.match(/^\\[a-zA-Z@]+/)){var Le=Ue.current().slice(1);return Oe=ke.hasOwnProperty(Le)?ke[Le]:ke.DEFAULT,Oe=new Oe,_e(Fe,Oe),de(Fe,ft),Oe.style}if(Ue.match(/^\\[$&%#{}_]/)||Ue.match(/^\\[,;!\/\\]/))return"tag";if(Ue.match("\\["))return de(Fe,function(ut,Et){return ye(ut,Et,"\\]")}),"keyword";if(Ue.match("\\("))return de(Fe,function(ut,Et){return ye(ut,Et,"\\)")}),"keyword";if(Ue.match("$$"))return de(Fe,function(ut,Et){return ye(ut,Et,"$$")}),"keyword";if(Ue.match("$"))return de(Fe,function(ut,Et){return ye(ut,Et,"$")}),"keyword";var st=Ue.next();if(st=="%")return Ue.skipToEnd(),"comment";if(st=="}"||st=="]"){if(Oe=me(Fe),Oe)Oe.closeBracket(st),de(Fe,ft);else return"error";return"bracket"}else return st=="{"||st=="["?(Oe=ke.DEFAULT,Oe=new Oe,_e(Fe,Oe),"bracket"):/\d/.test(st)?(Ue.eatWhile(/[\w.%]/),"atom"):(Ue.eatWhile(/[\w\-_]/),Oe=Be(Fe),Oe.name=="begin"&&(Oe.argument=Ue.current()),Oe.styleIdentifier())}function ye(Ue,Fe,Oe){if(Ue.eatSpace())return null;if(Oe&&Ue.match(Oe))return de(Fe,Te),"keyword";if(Ue.match(/^\\[a-zA-Z@]+/))return"tag";if(Ue.match(/^[a-zA-Z]+/))return"variable-2";if(Ue.match(/^\\[$&%#{}_]/)||Ue.match(/^\\[,;!\/]/)||Ue.match(/^[\^_&]/))return"tag";if(Ue.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ue.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Le=Ue.next();return Le=="{"||Le=="}"||Le=="["||Le=="]"||Le=="("||Le==")"?"bracket":Le=="%"?(Ue.skipToEnd(),"comment"):"error"}function ft(Ue,Fe){var Oe=Ue.peek(),Le;return Oe=="{"||Oe=="["?(Le=me(Fe),Le.openBracket(Oe),Ue.eat(Oe),de(Fe,Te),"bracket"):/[ \t\r]/.test(Oe)?(Ue.eat(Oe),null):(de(Fe,Te),Ye(Fe),Te(Ue,Fe))}return{startState:function(){var Ue=Ie.inMathMode?function(Fe,Oe){return ye(Fe,Oe)}:Te;return{cmdState:[],f:Ue}},copyState:function(Ue){return{cmdState:Ue.cmdState.slice(),f:Ue.f}},token:function(Ue,Fe){return Fe.f(Ue,Fe)},blankLine:function(Ue){Ue.f=Te,Ue.cmdState.length=0},lineComment:"%"}}),se.defineMIME("text/x-stex","stex"),se.defineMIME("text/x-latex","stex")})},15525:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){"use strict";var gt={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},Ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};se.defineMode("xml",function(_e,me){var Ye=_e.indentUnit,Be={},qe=me.htmlMode?gt:Ie;for(var ke in qe)Be[ke]=qe[ke];for(var ke in me)Be[ke]=me[ke];var de,Te;function ye(Pe,je){function Ee(ot){return je.tokenize=ot,ot(Pe,je)}var ze=Pe.next();if(ze=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Ee(Fe("atom","]]>")):null:Pe.match("--")?Ee(Fe("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Ee(Oe(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),je.tokenize=Fe("meta","?>"),"meta"):(de=Pe.eat("/")?"closeTag":"openTag",je.tokenize=ft,"tag bracket");if(ze=="&"){var Pt;return Pe.eat("#")?Pe.eat("x")?Pt=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):Pt=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):Pt=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),Pt?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}ye.isInText=!0;function ft(Pe,je){var Ee=Pe.next();if(Ee==">"||Ee=="/"&&Pe.eat(">"))return je.tokenize=ye,de=Ee==">"?"endTag":"selfcloseTag","tag bracket";if(Ee=="=")return de="equals",null;if(Ee=="<"){je.tokenize=ye,je.state=Et,je.tagName=je.tagStart=null;var ze=je.tokenize(Pe,je);return ze?ze+" tag error":"tag error"}else return/[\'\"]/.test(Ee)?(je.tokenize=Ue(Ee),je.stringStartCol=Pe.column(),je.tokenize(Pe,je)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ue(Pe){var je=function(Ee,ze){for(;!Ee.eol();)if(Ee.next()==Pe){ze.tokenize=ft;break}return"string"};return je.isInAttribute=!0,je}function Fe(Pe,je){return function(Ee,ze){for(;!Ee.eol();){if(Ee.match(je)){ze.tokenize=ye;break}Ee.next()}return Pe}}function Oe(Pe){return function(je,Ee){for(var ze;(ze=je.next())!=null;){if(ze=="<")return Ee.tokenize=Oe(Pe+1),Ee.tokenize(je,Ee);if(ze==">")if(Pe==1){Ee.tokenize=ye;break}else return Ee.tokenize=Oe(Pe-1),Ee.tokenize(je,Ee)}return"meta"}}function Le(Pe,je,Ee){this.prev=Pe.context,this.tagName=je,this.indent=Pe.indented,this.startOfLine=Ee,(Be.doNotIndent.hasOwnProperty(je)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function st(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function ut(Pe,je){for(var Ee;;){if(!Pe.context||(Ee=Pe.context.tagName,!Be.contextGrabbers.hasOwnProperty(Ee)||!Be.contextGrabbers[Ee].hasOwnProperty(je)))return;st(Pe)}}function Et(Pe,je,Ee){return Pe=="openTag"?(Ee.tagStart=je.column(),yt):Pe=="closeTag"?vt:Et}function yt(Pe,je,Ee){return Pe=="word"?(Ee.tagName=je.current(),Te="tag",$t):Be.allowMissingTagName&&Pe=="endTag"?(Te="tag bracket",$t(Pe,je,Ee)):(Te="error",yt)}function vt(Pe,je,Ee){if(Pe=="word"){var ze=je.current();return Ee.context&&Ee.context.tagName!=ze&&Be.implicitlyClosed.hasOwnProperty(Ee.context.tagName)&&st(Ee),Ee.context&&Ee.context.tagName==ze||Be.matchClosing===!1?(Te="tag",mt):(Te="tag error",ht)}else return Be.allowMissingTagName&&Pe=="endTag"?(Te="tag bracket",mt(Pe,je,Ee)):(Te="error",ht)}function mt(Pe,je,Ee){return Pe!="endTag"?(Te="error",mt):(st(Ee),Et)}function ht(Pe,je,Ee){return Te="error",mt(Pe,je,Ee)}function $t(Pe,je,Ee){if(Pe=="word")return Te="attribute",Se;if(Pe=="endTag"||Pe=="selfcloseTag"){var ze=Ee.tagName,Pt=Ee.tagStart;return Ee.tagName=Ee.tagStart=null,Pe=="selfcloseTag"||Be.autoSelfClosers.hasOwnProperty(ze)?ut(Ee,ze):(ut(Ee,ze),Ee.context=new Le(Ee,ze,Pt==Ee.indented)),Et}return Te="error",$t}function Se(Pe,je,Ee){return Pe=="equals"?Ge:(Be.allowMissing||(Te="error"),$t(Pe,je,Ee))}function Ge(Pe,je,Ee){return Pe=="string"?rt:Pe=="word"&&Be.allowUnquoted?(Te="string",$t):(Te="error",$t(Pe,je,Ee))}function rt(Pe,je,Ee){return Pe=="string"?rt:$t(Pe,je,Ee)}return{startState:function(Pe){var je={tokenize:ye,state:Et,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(je.baseIndent=Pe),je},token:function(Pe,je){if(!je.tagName&&Pe.sol()&&(je.indented=Pe.indentation()),Pe.eatSpace())return null;de=null;var Ee=je.tokenize(Pe,je);return(Ee||de)&&Ee!="comment"&&(Te=null,je.state=je.state(de||Ee,Pe,je),Te&&(Ee=Te=="error"?Ee+" error":Te)),Ee},indent:function(Pe,je,Ee){var ze=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+Ye;if(ze&&ze.noIndent)return se.Pass;if(Pe.tokenize!=ft&&Pe.tokenize!=ye)return Ee?Ee.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return Be.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+Ye*(Be.multilineTagIndentFactor||1);if(Be.alignCDATA&&/$/,blockCommentStart:"",configuration:Be.htmlMode?"html":"xml",helperType:Be.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Ge&&(Pe.state=$t)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var je=[],Ee=Pe.context;Ee;Ee=Ee.prev)Ee.tagName&&je.push(Ee.tagName);return je.reverse()}}}),se.defineMIME("text/xml","xml"),se.defineMIME("application/xml","xml"),se.mimeModes.hasOwnProperty("text/html")||se.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return je}});var se=fe(33885),gt=fe(42978),Ie=fe(43403),_e=fe(34280),me=fe(59301),Ye=me.createContext(null),Be=me.createContext({}),qe=Ye,ke=fe(20068),de=fe(54476),Te=fe(92310),ye=fe.n(Te),ft=fe(77900),Ue=fe(10228),Fe=fe(26112),Oe=fe(75931),Le=fe(8654),st=["prefixCls","className","containerRef"],ut=function(ze){var Pt=ze.prefixCls,ot=ze.className,St=ze.containerRef,dt=(0,Oe.Z)(ze,st),pe=me.useContext(Be),ce=pe.panel,Ve=(0,Le.x1)(ce,St);return me.createElement("div",(0,de.Z)({className:ye()("".concat(Pt,"-content"),ot),role:"dialog",ref:Ve},(0,Fe.Z)(ze,{aria:!0}),{"aria-modal":"true"},dt))},Et=ut,yt=fe(48736);function vt(Ee){return typeof Ee=="string"&&String(Number(Ee))===Ee?((0,yt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ee)):Ee}function mt(Ee){warning(!("wrapperClassName"in Ee),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ee.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ht={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function $t(Ee,ze){var Pt,ot,St,dt=Ee.prefixCls,pe=Ee.open,ce=Ee.placement,Ve=Ee.inline,wt=Ee.push,lt=Ee.forceRender,we=Ee.autoFocus,Xe=Ee.keyboard,Ze=Ee.classNames,Mt=Ee.rootClassName,it=Ee.rootStyle,Ce=Ee.zIndex,ve=Ee.className,Me=Ee.id,$e=Ee.style,xe=Ee.motion,He=Ee.width,Je=Ee.height,et=Ee.children,nt=Ee.mask,Ke=Ee.maskClosable,xt=Ee.maskMotion,kt=Ee.maskClassName,Yt=Ee.maskStyle,Wt=Ee.afterOpenChange,ae=Ee.onClose,te=Ee.onMouseEnter,ee=Ee.onMouseOver,ie=Ee.onMouseLeave,ue=Ee.onClick,ne=Ee.onKeyDown,ge=Ee.onKeyUp,ct=Ee.styles,pt=Ee.drawerRender,Ct=me.useRef(),Re=me.useRef(),Zt=me.useRef();me.useImperativeHandle(ze,function(){return Ct.current});var Rt=function(Xn){var Kn=Xn.keyCode,xr=Xn.shiftKey;switch(Kn){case Ue.Z.TAB:{if(Kn===Ue.Z.TAB){if(!xr&&document.activeElement===Zt.current){var Ut;(Ut=Re.current)===null||Ut===void 0||Ut.focus({preventScroll:!0})}else if(xr&&document.activeElement===Re.current){var pn;(pn=Zt.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case Ue.Z.ESC:{ae&&Xe&&(Xn.stopPropagation(),ae(Xn));break}}};me.useEffect(function(){if(pe&&we){var Bn;(Bn=Ct.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[pe]);var It=me.useState(!1),un=(0,gt.Z)(It,2),kn=un[0],cn=un[1],wn=me.useContext(qe),$n;typeof wt=="boolean"?$n=wt?{}:{distance:0}:$n=wt||{};var Zn=(Pt=(ot=(St=$n)===null||St===void 0?void 0:St.distance)!==null&&ot!==void 0?ot:wn==null?void 0:wn.pushDistance)!==null&&Pt!==void 0?Pt:180,mr=me.useMemo(function(){return{pushDistance:Zn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[Zn]);me.useEffect(function(){if(pe){var Bn;wn==null||(Bn=wn.push)===null||Bn===void 0||Bn.call(wn)}else{var Xn;wn==null||(Xn=wn.pull)===null||Xn===void 0||Xn.call(wn)}},[pe]),me.useEffect(function(){return function(){var Bn;wn==null||(Bn=wn.pull)===null||Bn===void 0||Bn.call(wn)}},[]);var er=nt&&me.createElement(ft.default,(0,de.Z)({key:"mask"},xt,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style;return me.createElement("div",{className:ye()("".concat(dt,"-mask"),Kn,Ze==null?void 0:Ze.mask,kt),style:(0,se.Z)((0,se.Z)((0,se.Z)({},xr),Yt),ct==null?void 0:ct.mask),onClick:Ke&&pe?ae:void 0,ref:Xn})}),ur=typeof xe=="function"?xe(ce):xe,nr={};if(kn&&Zn)switch(ce){case"top":nr.transform="translateY(".concat(Zn,"px)");break;case"bottom":nr.transform="translateY(".concat(-Zn,"px)");break;case"left":nr.transform="translateX(".concat(Zn,"px)");break;default:nr.transform="translateX(".concat(-Zn,"px)");break}ce==="left"||ce==="right"?nr.width=vt(He):nr.height=vt(Je);var In={onMouseEnter:te,onMouseOver:ee,onMouseLeave:ie,onClick:ue,onKeyDown:ne,onKeyUp:ge},rr=me.createElement(ft.default,(0,de.Z)({key:"panel"},ur,{visible:pe,forceRender:lt,onVisibleChanged:function(Xn){Wt==null||Wt(Xn)},removeOnLeave:!1,leavedClassName:"".concat(dt,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style,Ut=me.createElement(Et,(0,de.Z)({id:Me,containerRef:Xn,prefixCls:dt,className:ye()(ve,Ze==null?void 0:Ze.content),style:(0,se.Z)((0,se.Z)({},$e),ct==null?void 0:ct.content)},(0,Fe.Z)(Ee,{aria:!0}),In),et);return me.createElement("div",(0,de.Z)({className:ye()("".concat(dt,"-content-wrapper"),Ze==null?void 0:Ze.wrapper,Kn),style:(0,se.Z)((0,se.Z)((0,se.Z)({},nr),xr),ct==null?void 0:ct.wrapper)},(0,Fe.Z)(Ee,{data:!0})),pt?pt(Ut):Ut)}),cr=(0,se.Z)({},it);return Ce&&(cr.zIndex=Ce),me.createElement(qe.Provider,{value:mr},me.createElement("div",{className:ye()(dt,"".concat(dt,"-").concat(ce),Mt,(0,ke.Z)((0,ke.Z)({},"".concat(dt,"-open"),pe),"".concat(dt,"-inline"),Ve)),style:cr,tabIndex:-1,ref:Ct,onKeyDown:Rt},er,me.createElement("div",{tabIndex:0,ref:Re,style:ht,"aria-hidden":"true","data-sentinel":"start"}),rr,me.createElement("div",{tabIndex:0,ref:Zt,style:ht,"aria-hidden":"true","data-sentinel":"end"})))}var Se=me.forwardRef($t),Ge=Se,rt=function(ze){var Pt=ze.open,ot=Pt===void 0?!1:Pt,St=ze.prefixCls,dt=St===void 0?"rc-drawer":St,pe=ze.placement,ce=pe===void 0?"right":pe,Ve=ze.autoFocus,wt=Ve===void 0?!0:Ve,lt=ze.keyboard,we=lt===void 0?!0:lt,Xe=ze.width,Ze=Xe===void 0?378:Xe,Mt=ze.mask,it=Mt===void 0?!0:Mt,Ce=ze.maskClosable,ve=Ce===void 0?!0:Ce,Me=ze.getContainer,$e=ze.forceRender,xe=ze.afterOpenChange,He=ze.destroyOnClose,Je=ze.onMouseEnter,et=ze.onMouseOver,nt=ze.onMouseLeave,Ke=ze.onClick,xt=ze.onKeyDown,kt=ze.onKeyUp,Yt=ze.panelRef,Wt=me.useState(!1),ae=(0,gt.Z)(Wt,2),te=ae[0],ee=ae[1],ie=me.useState(!1),ue=(0,gt.Z)(ie,2),ne=ue[0],ge=ue[1];(0,_e.Z)(function(){ge(!0)},[]);var ct=ne?ot:!1,pt=me.useRef(),Ct=me.useRef();(0,_e.Z)(function(){ct&&(Ct.current=document.activeElement)},[ct]);var Re=function(kn){var cn;if(ee(kn),xe==null||xe(kn),!kn&&Ct.current&&!((cn=pt.current)!==null&&cn!==void 0&&cn.contains(Ct.current))){var wn;(wn=Ct.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},Zt=me.useMemo(function(){return{panel:Yt}},[Yt]);if(!$e&&!te&&!ct&&He)return null;var Rt={onMouseEnter:Je,onMouseOver:et,onMouseLeave:nt,onClick:Ke,onKeyDown:xt,onKeyUp:kt},It=(0,se.Z)((0,se.Z)({},ze),{},{open:ct,prefixCls:dt,placement:ce,autoFocus:wt,keyboard:we,width:Ze,mask:it,maskClosable:ve,inline:Me===!1,afterOpenChange:Re,ref:pt},Rt);return me.createElement(Be.Provider,{value:Zt},me.createElement(Ie.Z,{open:ct||$e||te,autoDestroy:!1,getContainer:Me,autoLock:it&&(ct||te)},me.createElement(Ge,It)))},Pe=rt,je=Pe},20922:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return it}});var se=fe(54476),gt=fe(20068),Ie=fe(76190),_e=fe(42978),me=fe(75931),Ye=fe(67732),Be=fe(83652);function qe(){return typeof BigInt=="function"}function ke(Ce){return!Ce&&Ce!==0&&!Number.isNaN(Ce)||!String(Ce).trim()}function de(Ce){var ve=Ce.trim(),Me=ve.startsWith("-");Me&&(ve=ve.slice(1)),ve=ve.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ve.startsWith(".")&&(ve="0".concat(ve));var $e=ve||"0",xe=$e.split("."),He=xe[0]||"0",Je=xe[1]||"0";He==="0"&&Je==="0"&&(Me=!1);var et=Me?"-":"";return{negative:Me,negativeStr:et,trimStr:$e,integerStr:He,decimalStr:Je,fullStr:"".concat(et).concat($e)}}function Te(Ce){var ve=String(Ce);return!Number.isNaN(Number(ve))&&ve.includes("e")}function ye(Ce){var ve=String(Ce);if(Te(Ce)){var Me=Number(ve.slice(ve.indexOf("e-")+2)),$e=ve.match(/\.(\d+)/);return $e!=null&&$e[1]&&(Me+=$e[1].length),Me}return ve.includes(".")&&Ue(ve)?ve.length-ve.indexOf(".")-1:0}function ft(Ce){var ve=String(Ce);if(Te(Ce)){if(Ce>Number.MAX_SAFE_INTEGER)return String(qe()?BigInt(Ce).toString():Number.MAX_SAFE_INTEGER);if(Ce0&&arguments[0]!==void 0?arguments[0]:!0;return Me?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Ce}(),Oe=function(){function Ce(ve){if((0,Ye.Z)(this,Ce),(0,gt.Z)(this,"origin",""),(0,gt.Z)(this,"number",void 0),(0,gt.Z)(this,"empty",void 0),ke(ve)){this.empty=!0;return}this.origin=String(ve),this.number=Number(ve)}return(0,Be.Z)(Ce,[{key:"negate",value:function(){return new Ce(-this.toNumber())}},{key:"add",value:function(Me){if(this.isInvalidate())return new Ce(Me);var $e=Number(Me);if(Number.isNaN($e))return this;var xe=this.number+$e;if(xe>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(xeNumber.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(xe0&&arguments[0]!==void 0?arguments[0]:!0;return Me?this.isInvalidate()?"":ft(this.number):this.origin}}]),Ce}();function Le(Ce){return qe()?new Fe(Ce):new Oe(Ce)}function st(Ce,ve,Me){var $e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ce==="")return"";var xe=de(Ce),He=xe.negativeStr,Je=xe.integerStr,et=xe.decimalStr,nt="".concat(ve).concat(et),Ke="".concat(He).concat(Je);if(Me>=0){var xt=Number(et[Me]);if(xt>=5&&!$e){var kt=Le(Ce).add("".concat(He,"0.").concat("0".repeat(Me)).concat(10-xt));return st(kt.toString(),ve,Me,$e)}return Me===0?Ke:"".concat(Ke).concat(ve).concat(et.padEnd(Me,"0").slice(0,Me))}return nt===".0"?Ke:"".concat(Ke).concat(nt)}var ut=Le,Et=fe(92310),yt=fe.n(Et),vt=fe(36901),mt=fe(34280);function ht(Ce,ve){return typeof Proxy!="undefined"&&Ce?new Proxy(Ce,{get:function($e,xe){if(ve[xe])return ve[xe];var He=$e[xe];return typeof He=="function"?He.bind($e):He}}):Ce}var $t=fe(8654),Se=fe(59301),Ge=fe(48736);function rt(Ce,ve){var Me=(0,Se.useRef)(null);function $e(){try{var He=Ce.selectionStart,Je=Ce.selectionEnd,et=Ce.value,nt=et.substring(0,He),Ke=et.substring(Je);Me.current={start:He,end:Je,value:et,beforeTxt:nt,afterTxt:Ke}}catch(xt){}}function xe(){if(Ce&&Me.current&&ve)try{var He=Ce.value,Je=Me.current,et=Je.beforeTxt,nt=Je.afterTxt,Ke=Je.start,xt=He.length;if(He.startsWith(et))xt=et.length;else if(He.endsWith(nt))xt=He.length-Me.current.afterTxt.length;else{var kt=et[Ke-1],Yt=He.indexOf(kt,Ke-1);Yt!==-1&&(xt=Yt+1)}Ce.setSelectionRange(xt,xt)}catch(Wt){(0,Ge.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Wt.message))}}return[$e,xe]}var Pe=fe(49658),je=function(){var ve=(0,Se.useState)(!1),Me=(0,_e.Z)(ve,2),$e=Me[0],xe=Me[1];return(0,mt.Z)(function(){xe((0,Pe.Z)())},[]),$e},Ee=je,ze=fe(16089),Pt=200,ot=600;function St(Ce){var ve=Ce.prefixCls,Me=Ce.upNode,$e=Ce.downNode,xe=Ce.upDisabled,He=Ce.downDisabled,Je=Ce.onStep,et=Se.useRef(),nt=Se.useRef([]),Ke=Se.useRef();Ke.current=Je;var xt=function(){clearTimeout(et.current)},kt=function(ne,ge){ne.preventDefault(),xt(),Ke.current(ge);function ct(){Ke.current(ge),et.current=setTimeout(ct,Pt)}et.current=setTimeout(ct,ot)};Se.useEffect(function(){return function(){xt(),nt.current.forEach(function(ue){return ze.Z.cancel(ue)})}},[]);var Yt=Ee();if(Yt)return null;var Wt="".concat(ve,"-handler"),ae=yt()(Wt,"".concat(Wt,"-up"),(0,gt.Z)({},"".concat(Wt,"-up-disabled"),xe)),te=yt()(Wt,"".concat(Wt,"-down"),(0,gt.Z)({},"".concat(Wt,"-down-disabled"),He)),ee=function(){return nt.current.push((0,ze.Z)(xt))},ie={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Se.createElement("div",{className:"".concat(Wt,"-wrap")},Se.createElement("span",(0,se.Z)({},ie,{onMouseDown:function(ne){kt(ne,!0)},"aria-label":"Increase Value","aria-disabled":xe,className:ae}),Me||Se.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),Se.createElement("span",(0,se.Z)({},ie,{onMouseDown:function(ne){kt(ne,!1)},"aria-label":"Decrease Value","aria-disabled":He,className:te}),$e||Se.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function dt(Ce){var ve=typeof Ce=="number"?ft(Ce):de(Ce).fullStr,Me=ve.includes(".");return Me?de(ve.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Ce+"0"}var pe=fe(30292),ce=function(){var Ce=(0,Se.useRef)(0),ve=function(){ze.Z.cancel(Ce.current)};return(0,Se.useEffect)(function(){return ve},[]),function(Me){ve(),Ce.current=(0,ze.Z)(function(){Me()})}},Ve=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],wt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],lt=function(ve,Me){return ve||Me.isEmpty()?Me.toString():Me.toNumber()},we=function(ve){var Me=ut(ve);return Me.isInvalidate()?null:Me},Xe=Se.forwardRef(function(Ce,ve){var Me=Ce.prefixCls,$e=Ce.className,xe=Ce.style,He=Ce.min,Je=Ce.max,et=Ce.step,nt=et===void 0?1:et,Ke=Ce.defaultValue,xt=Ce.value,kt=Ce.disabled,Yt=Ce.readOnly,Wt=Ce.upHandler,ae=Ce.downHandler,te=Ce.keyboard,ee=Ce.changeOnWheel,ie=ee===void 0?!1:ee,ue=Ce.controls,ne=ue===void 0?!0:ue,ge=Ce.classNames,ct=Ce.stringMode,pt=Ce.parser,Ct=Ce.formatter,Re=Ce.precision,Zt=Ce.decimalSeparator,Rt=Ce.onChange,It=Ce.onInput,un=Ce.onPressEnter,kn=Ce.onStep,cn=Ce.changeOnBlur,wn=cn===void 0?!0:cn,$n=Ce.domRef,Zn=(0,me.Z)(Ce,Ve),mr="".concat(Me,"-input"),er=Se.useRef(null),ur=Se.useState(!1),nr=(0,_e.Z)(ur,2),In=nr[0],rr=nr[1],cr=Se.useRef(!1),Bn=Se.useRef(!1),Xn=Se.useRef(!1),Kn=Se.useState(function(){return ut(xt!=null?xt:Ke)}),xr=(0,_e.Z)(Kn,2),Ut=xr[0],pn=xr[1];function En(dn){xt===void 0&&pn(dn)}var Tn=Se.useCallback(function(dn,Gt){if(!Gt)return Re>=0?Re:Math.max(ye(dn),ye(nt))},[Re,nt]),Jn=Se.useCallback(function(dn){var Gt=String(dn);if(pt)return pt(Gt);var gn=Gt;return Zt&&(gn=gn.replace(Zt,".")),gn.replace(/[^\w.-]+/g,"")},[pt,Zt]),tr=Se.useRef(""),dr=Se.useCallback(function(dn,Gt){if(Ct)return Ct(dn,{userTyping:Gt,input:String(tr.current)});var gn=typeof dn=="number"?ft(dn):dn;if(!Gt){var nn=Tn(gn,Gt);if(Ue(gn)&&(Zt||nn>=0)){var Wn=Zt||".";gn=st(gn,Wn,nn)}}return gn},[Ct,Tn,Zt]),_n=Se.useState(function(){var dn=Ke!=null?Ke:xt;return Ut.isInvalidate()&&["string","number"].includes((0,Ie.Z)(dn))?Number.isNaN(dn)?"":dn:dr(Ut.toString(),!1)}),Fn=(0,_e.Z)(_n,2),hr=Fn[0],jt=Fn[1];tr.current=hr;function at(dn,Gt){jt(dr(dn.isInvalidate()?dn.toString(!1):dn.toString(!Gt),Gt))}var Qt=Se.useMemo(function(){return we(Je)},[Je,Re]),Cn=Se.useMemo(function(){return we(He)},[He,Re]),Gn=Se.useMemo(function(){return!Qt||!Ut||Ut.isInvalidate()?!1:Qt.lessEquals(Ut)},[Qt,Ut]),Ae=Se.useMemo(function(){return!Cn||!Ut||Ut.isInvalidate()?!1:Ut.lessEquals(Cn)},[Cn,Ut]),Ne=rt(er.current,In),Bt=(0,_e.Z)(Ne,2),Dt=Bt[0],We=Bt[1],Lt=function(Gt){return Qt&&!Gt.lessEquals(Qt)?Qt:Cn&&!Cn.lessEquals(Gt)?Cn:null},Xt=function(Gt){return!Lt(Gt)},tn=function(Gt,gn){var nn=Gt,Wn=Xt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!gn&&(nn=Lt(nn)||nn,Wn=!0),!Yt&&!kt&&Wn){var wr=nn.toString(),Qn=Tn(wr,gn);return Qn>=0&&(nn=ut(st(wr,".",Qn)),Xt(nn)||(nn=ut(st(wr,".",Qn,!0)))),nn.equals(Ut)||(En(nn),Rt==null||Rt(nn.isEmpty()?null:lt(ct,nn)),xt===void 0&&at(nn,gn)),nn}return Ut},hn=ce(),_t=function dn(Gt){if(Dt(),tr.current=Gt,jt(Gt),!Bn.current){var gn=Jn(Gt),nn=ut(gn);nn.isNaN()||tn(nn,!0)}It==null||It(Gt),hn(function(){var Wn=Gt;pt||(Wn=Gt.replace(/。/g,".")),Wn!==Gt&&dn(Wn)})},qt=function(){Bn.current=!0},At=function(){Bn.current=!1,_t(er.current.value)},bt=function(Gt){_t(Gt.target.value)},en=function(Gt){var gn;if(!(Gt&&Gn||!Gt&&Ae)){cr.current=!1;var nn=ut(Xn.current?dt(nt):nt);Gt||(nn=nn.negate());var Wn=(Ut||ut(0)).add(nn.toString()),wr=tn(Wn,!1);kn==null||kn(lt(ct,wr),{offset:Xn.current?dt(nt):nt,type:Gt?"up":"down"}),(gn=er.current)===null||gn===void 0||gn.focus()}},vn=function(Gt){var gn=ut(Jn(hr)),nn;gn.isNaN()?nn=tn(Ut,Gt):nn=tn(gn,Gt),xt!==void 0?at(Ut,!1):nn.isNaN()||at(nn,!1)},mn=function(){cr.current=!0},xn=function(Gt){var gn=Gt.key,nn=Gt.shiftKey;cr.current=!0,Xn.current=nn,gn==="Enter"&&(Bn.current||(cr.current=!1),vn(!1),un==null||un(Gt)),te!==!1&&!Bn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gn)&&(en(gn==="Up"||gn==="ArrowUp"),Gt.preventDefault())},Hn=function(){cr.current=!1,Xn.current=!1};Se.useEffect(function(){if(ie&&In){var dn=function(nn){en(nn.deltaY<0),nn.preventDefault()},Gt=er.current;if(Gt)return Gt.addEventListener("wheel",dn,{passive:!1}),function(){return Gt.removeEventListener("wheel",dn)}}});var Yn=function(){wn&&vn(!1),rr(!1),cr.current=!1};return(0,mt.o)(function(){Ut.isInvalidate()||at(Ut,!1)},[Re,Ct]),(0,mt.o)(function(){var dn=ut(xt);pn(dn);var Gt=ut(Jn(hr));(!dn.equals(Gt)||!cr.current||Ct)&&at(dn,cr.current)},[xt]),(0,mt.o)(function(){Ct&&We()},[hr]),Se.createElement("div",{ref:$n,className:yt()(Me,$e,(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},"".concat(Me,"-focused"),In),"".concat(Me,"-disabled"),kt),"".concat(Me,"-readonly"),Yt),"".concat(Me,"-not-a-number"),Ut.isNaN()),"".concat(Me,"-out-of-range"),!Ut.isInvalidate()&&!Xt(Ut))),style:xe,onFocus:function(){rr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:Hn,onCompositionStart:qt,onCompositionEnd:At,onBeforeInput:mn},ne&&Se.createElement(St,{prefixCls:Me,upNode:Wt,downNode:ae,upDisabled:Gn,downDisabled:Ae,onStep:en}),Se.createElement("div",{className:"".concat(mr,"-wrap")},Se.createElement("input",(0,se.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":He,"aria-valuemax":Je,"aria-valuenow":Ut.isInvalidate()?null:Ut.toString(),step:nt},Zn,{ref:(0,$t.sQ)(er,ve),className:mr,value:hr,onChange:bt,disabled:kt,readOnly:Yt}))))}),Ze=Se.forwardRef(function(Ce,ve){var Me=Ce.disabled,$e=Ce.style,xe=Ce.prefixCls,He=xe===void 0?"rc-input-number":xe,Je=Ce.value,et=Ce.prefix,nt=Ce.suffix,Ke=Ce.addonBefore,xt=Ce.addonAfter,kt=Ce.className,Yt=Ce.classNames,Wt=(0,me.Z)(Ce,wt),ae=Se.useRef(null),te=Se.useRef(null),ee=Se.useRef(null),ie=function(ne){ee.current&&(0,pe.nH)(ee.current,ne)};return Se.useImperativeHandle(ve,function(){return ht(ee.current,{focus:ie,nativeElement:ae.current.nativeElement||te.current})}),Se.createElement(vt.BaseInput,{className:kt,triggerFocus:ie,prefixCls:He,value:Je,disabled:Me,style:$e,prefix:et,suffix:nt,addonAfter:xt,addonBefore:Ke,classNames:Yt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:ae},Se.createElement(Xe,(0,se.Z)({prefixCls:He,disabled:Me,ref:ee,domRef:te,className:Yt==null?void 0:Yt.input},Wt)))}),Mt=Ze,it=Mt},25930:function(Ot,zt,fe){"use strict";fe.d(zt,{Cd:function(){return rt}});var se=fe(54476),gt=fe(33885),Ie=fe(75931),_e=fe(59301),me=fe(92310),Ye=fe.n(me),Be={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},qe=function(){var Ee=(0,_e.useRef)([]),ze=(0,_e.useRef)(null);return(0,_e.useEffect)(function(){var Pt=Date.now(),ot=!1;Ee.current.forEach(function(St){if(St){ot=!0;var dt=St.style;dt.transitionDuration=".3s, .3s, .3s, .06s",ze.current&&Pt-ze.current<100&&(dt.transitionDuration="0s, 0s")}}),ot&&(ze.current=Date.now())}),Ee.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(Ee){var ze=(0,gt.Z)((0,gt.Z)({},Be),Ee),Pt=ze.className,ot=ze.percent,St=ze.prefixCls,dt=ze.strokeColor,pe=ze.strokeLinecap,ce=ze.strokeWidth,Ve=ze.style,wt=ze.trailColor,lt=ze.trailWidth,we=ze.transition,Xe=(0,Ie.Z)(ze,ke);delete Xe.gapPosition;var Ze=Array.isArray(ot)?ot:[ot],Mt=Array.isArray(dt)?dt:[dt],it=qe(),Ce=ce/2,ve=100-ce/2,Me="M ".concat(pe==="round"?Ce:0,",").concat(Ce,` L `).concat(pe==="round"?ve:100,",").concat(Ce),$e="0 0 100 ".concat(ce),xe=0;return _e.createElement("svg",(0,se.Z)({className:Ye()("".concat(St,"-line"),Pt),viewBox:$e,preserveAspectRatio:"none",style:Ve},Xe),_e.createElement("path",{className:"".concat(St,"-line-trail"),d:Me,strokeLinecap:pe,stroke:wt,strokeWidth:lt||ce,fillOpacity:"0"}),Ze.map(function(He,Je){var et=1;switch(pe){case"round":et=1-ce/100;break;case"square":et=1-ce/2/100;break;default:et=1;break}var nt={strokeDasharray:"".concat(He*et,"px, 100px"),strokeDashoffset:"-".concat(xe,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ke=Mt[Je]||Mt[Mt.length-1];return xe+=He,_e.createElement("path",{key:Je,className:"".concat(St,"-line-path"),d:Me,strokeLinecap:pe,stroke:Ke,strokeWidth:ce,fillOpacity:"0",ref:function(kt){it[Je]=kt},style:nt})}))},Te=de,ye=fe(76190),ft=fe(42978),Ue=fe(47273),Fe=0,Oe=(0,Ue.Z)();function Le(){var je;return Oe?(je=Fe,Fe+=1):je="TEST_OR_SSR",je}var st=function(je){var Ee=_e.useState(),ze=(0,ft.Z)(Ee,2),Pt=ze[0],ot=ze[1];return _e.useEffect(function(){ot("rc_progress_".concat(Le()))},[]),je||Pt},ut=function(Ee){var ze=Ee.bg,Pt=Ee.children;return _e.createElement("div",{style:{width:"100%",height:"100%",background:ze}},Pt)};function Et(je,Ee){return Object.keys(je).map(function(ze){var Pt=parseFloat(ze),ot="".concat(Math.floor(Pt*Ee),"%");return"".concat(je[ze]," ").concat(ot)})}var yt=_e.forwardRef(function(je,Ee){var ze=je.prefixCls,Pt=je.color,ot=je.gradientId,St=je.radius,dt=je.style,pe=je.ptg,ce=je.strokeLinecap,Ve=je.strokeWidth,wt=je.size,lt=je.gapDegree,we=Pt&&(0,ye.Z)(Pt)==="object",Xe=we?"#FFF":void 0,Ze=wt/2,Mt=_e.createElement("circle",{className:"".concat(ze,"-circle-path"),r:St,cx:Ze,cy:Ze,stroke:Xe,strokeLinecap:ce,strokeWidth:Ve,opacity:pe===0?0:1,style:dt,ref:Ee});if(!we)return Mt;var it="".concat(ot,"-conic"),Ce=lt?"".concat(180+lt/2,"deg"):"0deg",ve=Et(Pt,(360-lt)/360),Me=Et(Pt,1),$e="conic-gradient(from ".concat(Ce,", ").concat(ve.join(", "),")"),xe="linear-gradient(to ".concat(lt?"bottom":"top",", ").concat(Me.join(", "),")");return _e.createElement(_e.Fragment,null,_e.createElement("mask",{id:it},Mt),_e.createElement("foreignObject",{x:0,y:0,width:wt,height:wt,mask:"url(#".concat(it,")")},_e.createElement(ut,{bg:xe},_e.createElement(ut,{bg:$e}))))}),vt=yt,mt=100,ht=function(Ee,ze,Pt,ot,St,dt,pe,ce,Ve,wt){var lt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,we=Pt/100*360*((360-dt)/360),Xe=dt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ze=(100-ot)/100*ze;Ve==="round"&&ot!==100&&(Ze+=wt/2,Ze>=ze&&(Ze=ze-.01));var Mt=mt/2;return{stroke:typeof ce=="string"?ce:void 0,strokeDasharray:"".concat(ze,"px ").concat(Ee),strokeDashoffset:Ze+lt,transform:"rotate(".concat(St+we+Xe,"deg)"),transformOrigin:"".concat(Mt,"px ").concat(Mt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},$t=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Se(je){var Ee=je!=null?je:[];return Array.isArray(Ee)?Ee:[Ee]}var Ge=function(Ee){var ze=(0,gt.Z)((0,gt.Z)({},Be),Ee),Pt=ze.id,ot=ze.prefixCls,St=ze.steps,dt=ze.strokeWidth,pe=ze.trailWidth,ce=ze.gapDegree,Ve=ce===void 0?0:ce,wt=ze.gapPosition,lt=ze.trailColor,we=ze.strokeLinecap,Xe=ze.style,Ze=ze.className,Mt=ze.strokeColor,it=ze.percent,Ce=(0,Ie.Z)(ze,$t),ve=mt/2,Me=st(Pt),$e="".concat(Me,"-gradient"),xe=ve-dt/2,He=Math.PI*2*xe,Je=Ve>0?90+Ve/2:-90,et=He*((360-Ve)/360),nt=(0,ye.Z)(St)==="object"?St:{count:St,gap:2},Ke=nt.count,xt=nt.gap,kt=Se(it),Yt=Se(Mt),Wt=Yt.find(function(ge){return ge&&(0,ye.Z)(ge)==="object"}),ae=Wt&&(0,ye.Z)(Wt)==="object",te=ae?"butt":we,ee=ht(He,et,0,100,Je,Ve,wt,lt,te,dt),ie=qe(),ue=function(){var ct=0;return kt.map(function(pt,Ct){var Re=Yt[Ct]||Yt[Yt.length-1],Zt=ht(He,et,ct,pt,Je,Ve,wt,Re,te,dt);return ct+=pt,_e.createElement(vt,{key:Ct,color:Re,ptg:pt,radius:xe,prefixCls:ot,gradientId:$e,style:Zt,strokeLinecap:te,strokeWidth:dt,gapDegree:Ve,ref:function(It){ie[Ct]=It},size:mt})}).reverse()},ne=function(){var ct=Math.round(Ke*(kt[0]/100)),pt=100/Ke,Ct=0;return new Array(Ke).fill(null).map(function(Re,Zt){var Rt=Zt<=ct-1?Yt[0]:lt,It=Rt&&(0,ye.Z)(Rt)==="object"?"url(#".concat($e,")"):void 0,un=ht(He,et,Ct,pt,Je,Ve,wt,Rt,"butt",dt,xt);return Ct+=(et-un.strokeDashoffset+xt)*100/et,_e.createElement("circle",{key:Zt,className:"".concat(ot,"-circle-path"),r:xe,cx:ve,cy:ve,stroke:It,strokeWidth:dt,opacity:1,style:un,ref:function(cn){ie[Zt]=cn}})})};return _e.createElement("svg",(0,se.Z)({className:Ye()("".concat(ot,"-circle"),Ze),viewBox:"0 0 ".concat(mt," ").concat(mt),style:Xe,id:Pt,role:"presentation"},Ce),!Ke&&_e.createElement("circle",{className:"".concat(ot,"-circle-trail"),r:xe,cx:ve,cy:ve,stroke:lt,strokeLinecap:te,strokeWidth:pe||dt,style:ee}),Ke?ne():ue())},rt=Ge,Pe={Line:Te,Circle:rt}},6551:function(Ot,zt,fe){"use strict";fe.d(zt,{ZP:function(){return Be}});var se=fe(42978),gt=fe(59301),Ie=fe(47273),_e=0,me=(0,Ie.Z)();function Ye(){var qe;return me?(qe=_e,_e+=1):qe="TEST_OR_SSR",qe}function Be(qe){var ke=gt.useState(),de=(0,se.Z)(ke,2),Te=de[0],ye=de[1];return gt.useEffect(function(){ye("rc_select_".concat(Ye()))},[]),qe||Te}},37463:function(Ot,zt,fe){"use strict";fe.d(zt,{Ac:function(){return Re},Xo:function(){return Rt},Wx:function(){return un},ZP:function(){return Gn},lk:function(){return Et}});var se=fe(54476),gt=fe(94480),Ie=fe(20068),_e=fe(33885),me=fe(42978),Ye=fe(75931),Be=fe(76190),qe=fe(18929),ke=fe(48736),de=fe(59301),Te=fe(92310),ye=fe.n(Te),ft=fe(34280),Ue=fe(49658),Fe=fe(8654),Oe=function(Ne){var Bt=Ne.className,Dt=Ne.customizeIcon,We=Ne.customizeIconProps,Lt=Ne.children,Xt=Ne.onMouseDown,tn=Ne.onClick,hn=typeof Dt=="function"?Dt(We):Dt;return de.createElement("span",{className:Bt,onMouseDown:function(qt){qt.preventDefault(),Xt==null||Xt(qt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:tn,"aria-hidden":!0},hn!==void 0?hn:de.createElement("span",{className:ye()(Bt.split(/\s+/).map(function(_t){return"".concat(_t,"-icon")}))},Lt))},Le=Oe,st=function(Ne,Bt,Dt,We,Lt){var Xt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,tn=arguments.length>6?arguments[6]:void 0,hn=arguments.length>7?arguments[7]:void 0,_t=de.useMemo(function(){if((0,Be.Z)(We)==="object")return We.clearIcon;if(Lt)return Lt},[We,Lt]),qt=de.useMemo(function(){return!!(!Xt&&We&&(Dt.length||tn)&&!(hn==="combobox"&&tn===""))},[We,Xt,Dt.length,tn,hn]);return{allowClear:qt,clearIcon:de.createElement(Le,{className:"".concat(Ne,"-clear"),onMouseDown:Bt,customizeIcon:_t},"\xD7")}},ut=de.createContext(null);function Et(){return de.useContext(ut)}function yt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ne=de.useState(!1),Bt=(0,me.Z)(Ne,2),Dt=Bt[0],We=Bt[1],Lt=de.useRef(null),Xt=function(){window.clearTimeout(Lt.current)};de.useEffect(function(){return Xt},[]);var tn=function(_t,qt){Xt(),Lt.current=window.setTimeout(function(){We(_t),qt&&qt()},Ae)};return[Dt,tn,Xt]}function vt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ne=de.useRef(null),Bt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Bt.current)}},[]);function Dt(We){(We||Ne.current===null)&&(Ne.current=We),window.clearTimeout(Bt.current),Bt.current=window.setTimeout(function(){Ne.current=null},Ae)}return[function(){return Ne.current},Dt]}function mt(Ae,Ne,Bt,Dt){var We=de.useRef(null);We.current={open:Ne,triggerOpen:Bt,customizedTrigger:Dt},de.useEffect(function(){function Lt(Xt){var tn;if(!((tn=We.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var hn=Xt.target;hn.shadowRoot&&Xt.composed&&(hn=Xt.composedPath()[0]||hn),We.current.open&&Ae().filter(function(_t){return _t}).every(function(_t){return!_t.contains(hn)&&_t!==hn})&&We.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Lt),function(){return window.removeEventListener("mousedown",Lt)}},[])}var ht=fe(10228);function $t(Ae){return Ae&&![ht.Z.ESC,ht.Z.SHIFT,ht.Z.BACKSPACE,ht.Z.TAB,ht.Z.WIN_KEY,ht.Z.ALT,ht.Z.META,ht.Z.WIN_KEY_RIGHT,ht.Z.CTRL,ht.Z.SEMICOLON,ht.Z.EQUALS,ht.Z.CAPS_LOCK,ht.Z.CONTEXT_MENU,ht.Z.F1,ht.Z.F2,ht.Z.F3,ht.Z.F4,ht.Z.F5,ht.Z.F6,ht.Z.F7,ht.Z.F8,ht.Z.F9,ht.Z.F10,ht.Z.F11,ht.Z.F12].includes(Ae)}var Se=fe(26112),Ge=fe(11780);function rt(Ae,Ne,Bt){var Dt=(0,_e.Z)((0,_e.Z)({},Ae),Bt?Ne:{});return Object.keys(Ne).forEach(function(We){var Lt=Ne[We];typeof Lt=="function"&&(Dt[We]=function(){for(var Xt,tn=arguments.length,hn=new Array(tn),_t=0;_tdn&&(rn="".concat(ln.slice(0,dn),"..."))}var Mn=function(Vn){Vn&&Vn.stopPropagation(),wr(on)};return typeof nn=="function"?ii(Vt,rn,Dn,Ft,Mn):_r(on,rn,Dn,Ft,Mn)},Rn=function(on){if(!We.length)return null;var Dn=typeof gn=="function"?gn(on):gn;return typeof nn=="function"?ii(void 0,Dn,!1,!1,void 0,!0):_r({title:Dn},Dn,!1)},Ht=de.createElement("div",{className:"".concat(Dr,"-search"),style:{width:pr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},de.createElement(Pt,{ref:hn,open:Lt,prefixCls:Dt,id:Bt,inputElement:null,disabled:qt,autoFocus:en,autoComplete:vn,editable:Nr,activeDescendantId:mn,value:Wr,onKeyDown:Mr,onMouseDown:Cr,onChange:Qn,onPaste:Lr,onCompositionStart:ir,onCompositionEnd:Rr,onBlur:gr,tabIndex:xn,attrs:(0,Se.Z)(Ne,!0)}),de.createElement("span",{ref:or,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Wr,"\xA0")),Kt=de.createElement(Ge.Z,{prefixCls:"".concat(Dr,"-overflow"),data:We,renderItem:Or,renderRest:Rn,suffix:Ht,itemKey:we,maxCount:Yn});return de.createElement("span",{className:"".concat(Dr,"-wrap")},Kt,!We.length&&!Wr&&de.createElement("span",{className:"".concat(Dr,"-placeholder")},_t))},Mt=Ze,it=function(Ne){var Bt=Ne.inputElement,Dt=Ne.prefixCls,We=Ne.id,Lt=Ne.inputRef,Xt=Ne.disabled,tn=Ne.autoFocus,hn=Ne.autoComplete,_t=Ne.activeDescendantId,qt=Ne.mode,At=Ne.open,bt=Ne.values,en=Ne.placeholder,vn=Ne.tabIndex,mn=Ne.showSearch,xn=Ne.searchValue,Hn=Ne.activeValue,Yn=Ne.maxLength,dn=Ne.onInputKeyDown,Gt=Ne.onInputMouseDown,gn=Ne.onInputChange,nn=Ne.onInputPaste,Wn=Ne.onInputCompositionStart,wr=Ne.onInputCompositionEnd,Qn=Ne.onInputBlur,Lr=Ne.title,Mr=de.useState(!1),Cr=(0,me.Z)(Mr,2),ir=Cr[0],Rr=Cr[1],gr=qt==="combobox",or=gr||mn,Er=bt[0],Tr=xn||"";gr&&Hn&&!ir&&(Tr=Hn),de.useEffect(function(){gr&&Rr(!1)},[gr,Hn]);var pr=qt!=="combobox"&&!At&&!mn?!1:!!Tr,qn=Lr===void 0?wt(Er):Lr,jn=de.useMemo(function(){return Er?null:de.createElement("span",{className:"".concat(Dt,"-selection-placeholder"),style:pr?{visibility:"hidden"}:void 0},en)},[Er,pr,en,Dt]);return de.createElement("span",{className:"".concat(Dt,"-selection-wrap")},de.createElement("span",{className:"".concat(Dt,"-selection-search")},de.createElement(Pt,{ref:Lt,prefixCls:Dt,id:We,open:At,inputElement:Bt,disabled:Xt,autoFocus:tn,autoComplete:hn,editable:or,activeDescendantId:_t,value:Tr,onKeyDown:dn,onMouseDown:Gt,onChange:function(Vr){Rr(!0),gn(Vr)},onPaste:nn,onCompositionStart:Wn,onCompositionEnd:wr,onBlur:Qn,tabIndex:vn,attrs:(0,Se.Z)(Ne,!0),maxLength:gr?Yn:void 0})),!gr&&Er?de.createElement("span",{className:"".concat(Dt,"-selection-item"),title:qn,style:pr?{visibility:"hidden"}:void 0},Er.label):null,jn)},Ce=it,ve=function(Ne,Bt){var Dt=(0,de.useRef)(null),We=(0,de.useRef)(!1),Lt=Ne.prefixCls,Xt=Ne.open,tn=Ne.mode,hn=Ne.showSearch,_t=Ne.tokenWithEnter,qt=Ne.disabled,At=Ne.prefix,bt=Ne.autoClearSearchValue,en=Ne.onSearch,vn=Ne.onSearchSubmit,mn=Ne.onToggleOpen,xn=Ne.onInputKeyDown,Hn=Ne.onInputBlur,Yn=Ne.domRef;de.useImperativeHandle(Bt,function(){return{focus:function(qn){Dt.current.focus(qn)},blur:function(){Dt.current.blur()}}});var dn=vt(0),Gt=(0,me.Z)(dn,2),gn=Gt[0],nn=Gt[1],Wn=function(qn){var jn=qn.which,Br=Dt.current instanceof HTMLTextAreaElement;!Br&&Xt&&(jn===ht.Z.UP||jn===ht.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),jn===ht.Z.ENTER&&tn==="tags"&&!We.current&&!Xt&&(vn==null||vn(qn.target.value)),!(Br&&!Xt&&~[ht.Z.UP,ht.Z.DOWN,ht.Z.LEFT,ht.Z.RIGHT].indexOf(jn))&&$t(jn)&&mn(!0)},wr=function(){nn(!0)},Qn=(0,de.useRef)(null),Lr=function(qn){en(qn,!0,We.current)!==!1&&mn(!0)},Mr=function(){We.current=!0},Cr=function(qn){We.current=!1,tn!=="combobox"&&Lr(qn.target.value)},ir=function(qn){var jn=qn.target.value;if(_t&&Qn.current&&/[\r\n]/.test(Qn.current)){var Br=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");jn=jn.replace(Br,Qn.current)}Qn.current=null,Lr(jn)},Rr=function(qn){var jn=qn.clipboardData,Br=jn==null?void 0:jn.getData("text");Qn.current=Br||""},gr=function(qn){var jn=qn.target;if(jn!==Dt.current){var Br=document.body.style.msTouchAction!==void 0;Br?setTimeout(function(){Dt.current.focus()}):Dt.current.focus()}},or=function(qn){var jn=gn();qn.target!==Dt.current&&!jn&&!(tn==="combobox"&&qt)&&qn.preventDefault(),(tn!=="combobox"&&(!hn||!jn)||!Xt)&&(Xt&&bt!==!1&&en("",!0,!1),mn())},Er={inputRef:Dt,onInputKeyDown:Wn,onInputMouseDown:wr,onInputChange:ir,onInputPaste:Rr,onInputCompositionStart:Mr,onInputCompositionEnd:Cr,onInputBlur:Hn},Tr=tn==="multiple"||tn==="tags"?de.createElement(Mt,(0,se.Z)({},Ne,Er)):de.createElement(Ce,(0,se.Z)({},Ne,Er));return de.createElement("div",{ref:Yn,className:"".concat(Lt,"-selector"),onClick:gr,onMouseDown:or},At&&de.createElement("div",{className:"".concat(Lt,"-prefix")},At),Tr)},Me=de.forwardRef(ve),$e=Me,xe=fe(65030),He=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Je=function(Ne){var Bt=Ne===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"}}},et=function(Ne,Bt){var Dt=Ne.prefixCls,We=Ne.disabled,Lt=Ne.visible,Xt=Ne.children,tn=Ne.popupElement,hn=Ne.animation,_t=Ne.transitionName,qt=Ne.dropdownStyle,At=Ne.dropdownClassName,bt=Ne.direction,en=bt===void 0?"ltr":bt,vn=Ne.placement,mn=Ne.builtinPlacements,xn=Ne.dropdownMatchSelectWidth,Hn=Ne.dropdownRender,Yn=Ne.dropdownAlign,dn=Ne.getPopupContainer,Gt=Ne.empty,gn=Ne.getTriggerDOMNode,nn=Ne.onPopupVisibleChange,Wn=Ne.onPopupMouseEnter,wr=(0,Ye.Z)(Ne,He),Qn="".concat(Dt,"-dropdown"),Lr=tn;Hn&&(Lr=Hn(tn));var Mr=de.useMemo(function(){return mn||Je(xn)},[mn,xn]),Cr=hn?"".concat(Qn,"-").concat(hn):_t,ir=typeof xn=="number",Rr=de.useMemo(function(){return ir?null:xn===!1?"minWidth":"width"},[xn,ir]),gr=qt;ir&&(gr=(0,_e.Z)((0,_e.Z)({},gr),{},{width:xn}));var or=de.useRef(null);return de.useImperativeHandle(Bt,function(){return{getPopupElement:function(){var Tr;return(Tr=or.current)===null||Tr===void 0?void 0:Tr.popupElement}}}),de.createElement(xe.Z,(0,se.Z)({},wr,{showAction:nn?["click"]:[],hideAction:nn?["click"]:[],popupPlacement:vn||(en==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Mr,prefixCls:Qn,popupTransitionName:Cr,popup:de.createElement("div",{onMouseEnter:Wn},Lr),ref:or,stretch:Rr,popupAlign:Yn,popupVisible:Lt,getPopupContainer:dn,popupClassName:ye()(At,(0,Ie.Z)({},"".concat(Qn,"-empty"),Gt)),popupStyle:gr,getTriggerDOMNode:gn,onPopupVisibleChange:nn}),Xt)},nt=de.forwardRef(et),Ke=nt,xt=fe(66712);function kt(Ae,Ne){var Bt=Ae.key,Dt;return"value"in Ae&&(Dt=Ae.value),Bt!=null?Bt:Dt!==void 0?Dt:"rc-index-key-".concat(Ne)}function Yt(Ae){return typeof Ae!="undefined"&&!Number.isNaN(Ae)}function Wt(Ae,Ne){var Bt=Ae||{},Dt=Bt.label,We=Bt.value,Lt=Bt.options,Xt=Bt.groupLabel,tn=Dt||(Ne?"children":"label");return{label:tn,value:We||"value",options:Lt||"options",groupLabel:Xt||tn}}function ae(Ae){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=Ne.fieldNames,Dt=Ne.childrenAsData,We=[],Lt=Wt(Bt,!1),Xt=Lt.label,tn=Lt.value,hn=Lt.options,_t=Lt.groupLabel;function qt(At,bt){Array.isArray(At)&&At.forEach(function(en){if(bt||!(hn in en)){var vn=en[tn];We.push({key:kt(en,We.length),groupOption:bt,data:en,label:en[Xt],value:vn})}else{var mn=en[_t];mn===void 0&&Dt&&(mn=en.label),We.push({key:kt(en,We.length),group:!0,data:en,label:mn}),qt(en[hn],!0)}})}return qt(Ae,!1),We}function te(Ae){var Ne=(0,_e.Z)({},Ae);return"props"in Ne||Object.defineProperty(Ne,"props",{get:function(){return(0,ke.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ne}}),Ne}var ee=function(Ne,Bt,Dt){if(!Bt||!Bt.length)return null;var We=!1,Lt=function tn(hn,_t){var qt=(0,xt.Z)(_t),At=qt[0],bt=qt.slice(1);if(!At)return[hn];var en=hn.split(At);return We=We||en.length>1,en.reduce(function(vn,mn){return[].concat((0,gt.Z)(vn),(0,gt.Z)(tn(mn,bt)))},[]).filter(Boolean)},Xt=Lt(Ne,Bt);return We?typeof Dt!="undefined"?Xt.slice(0,Dt):Xt:null},ie=de.createContext(null),ue=ie;function ne(Ae){var Ne=Ae.visible,Bt=Ae.values;if(!Ne)return null;var Dt=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Bt.slice(0,Dt).map(function(We){var Lt=We.label,Xt=We.value;return["number","string"].includes((0,Be.Z)(Lt))?Lt:Xt}).join(", ")),Bt.length>Dt?", ...":null)}var ge=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],ct=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],pt=function(Ne){return Ne==="tags"||Ne==="multiple"},Ct=de.forwardRef(function(Ae,Ne){var Bt,Dt=Ae.id,We=Ae.prefixCls,Lt=Ae.className,Xt=Ae.showSearch,tn=Ae.tagRender,hn=Ae.direction,_t=Ae.omitDomProps,qt=Ae.displayValues,At=Ae.onDisplayValuesChange,bt=Ae.emptyOptions,en=Ae.notFoundContent,vn=en===void 0?"Not Found":en,mn=Ae.onClear,xn=Ae.mode,Hn=Ae.disabled,Yn=Ae.loading,dn=Ae.getInputElement,Gt=Ae.getRawInputElement,gn=Ae.open,nn=Ae.defaultOpen,Wn=Ae.onDropdownVisibleChange,wr=Ae.activeValue,Qn=Ae.onActiveValueChange,Lr=Ae.activeDescendantId,Mr=Ae.searchValue,Cr=Ae.autoClearSearchValue,ir=Ae.onSearch,Rr=Ae.onSearchSplit,gr=Ae.tokenSeparators,or=Ae.allowClear,Er=Ae.prefix,Tr=Ae.suffixIcon,pr=Ae.clearIcon,qn=Ae.OptionList,jn=Ae.animation,Br=Ae.transitionName,Vr=Ae.dropdownStyle,Jr=Ae.dropdownClassName,Dr=Ae.dropdownMatchSelectWidth,Wr=Ae.dropdownRender,Nr=Ae.dropdownAlign,_r=Ae.placement,ii=Ae.builtinPlacements,Or=Ae.getPopupContainer,Rn=Ae.showAction,Ht=Rn===void 0?[]:Rn,Kt=Ae.onFocus,yn=Ae.onBlur,on=Ae.onKeyUp,Dn=Ae.onKeyDown,ar=Ae.onMouseDown,Vt=(0,Ye.Z)(Ae,ge),Ft=pt(xn),rn=(Xt!==void 0?Xt:Ft)||xn==="combobox",ln=(0,_e.Z)({},Vt);ct.forEach(function(lr){delete ln[lr]}),_t==null||_t.forEach(function(lr){delete ln[lr]});var Mn=de.useState(!1),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1];de.useEffect(function(){yr((0,Ue.Z)())},[]);var br=de.useRef(null),Sr=de.useRef(null),zr=de.useRef(null),Ar=de.useRef(null),Hr=de.useRef(null),ei=de.useRef(!1),Li=yt(),Oi=(0,me.Z)(Li,3),xi=Oi[0],vi=Oi[1],Xi=Oi[2];de.useImperativeHandle(Ne,function(){var lr,zn;return{focus:(lr=Ar.current)===null||lr===void 0?void 0:lr.focus,blur:(zn=Ar.current)===null||zn===void 0?void 0:zn.blur,scrollTo:function(fi){var Yr;return(Yr=Hr.current)===null||Yr===void 0?void 0:Yr.scrollTo(fi)},nativeElement:br.current||Sr.current}});var fr=de.useMemo(function(){var lr;if(xn!=="combobox")return Mr;var zn=(lr=qt[0])===null||lr===void 0?void 0:lr.value;return typeof zn=="string"||typeof zn=="number"?String(zn):""},[Mr,xn,qt]),to=xn==="combobox"&&typeof dn=="function"&&dn()||null,ti=typeof Gt=="function"&&Gt(),Ni=(0,Fe.x1)(Sr,ti==null||(Bt=ti.props)===null||Bt===void 0?void 0:Bt.ref),ao=de.useState(!1),Ji=(0,me.Z)(ao,2),mi=Ji[0],Ri=Ji[1];(0,ft.Z)(function(){Ri(!0)},[]);var Zr=(0,qe.Z)(!1,{defaultValue:nn,value:gn}),Hi=(0,me.Z)(Zr,2),so=Hi[0],_i=Hi[1],Qr=mi?so:!1,xo=!vn&&bt;(Hn||xo&&Qr&&xn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,Ln=de.useCallback(function(lr){var zn=lr!==void 0?lr:!Qr;Hn||(_i(zn),Qr!==zn&&(Wn==null||Wn(zn)))},[Hn,Qr,_i,Wn]),On=de.useMemo(function(){return(gr||[]).some(function(lr){return[` `,`\r `].includes(lr)})},[gr]),Pn=de.useContext(ue)||{},Nn=Pn.maxCount,vr=Pn.rawValues,Ir=function(zn,ci,fi){if(!(Ft&&Yt(Nn)&&(vr==null?void 0:vr.size)>=Nn)){var Yr=!0,ni=zn;Qn==null||Qn(null);var Vi=ee(zn,gr,Yt(Nn)?Nn-vr.size:void 0),Zi=fi?null:Vi;return xn!=="combobox"&&Zi&&(ni="",Rr==null||Rr(Zi),Ln(!1),Yr=!1),ir&&fr!==ni&&ir(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(zn){!zn||!zn.trim()||ir(zn,{source:"submit"})};de.useEffect(function(){!Qr&&!Ft&&xn!=="combobox"&&Ir("",!1,!1)},[Qr]),de.useEffect(function(){so&&Hn&&_i(!1),Hn&&!ei.current&&vi(!1)},[Hn]);var gi=vt(),ui=(0,me.Z)(gi,2),Kr=ui[0],Wi=ui[1],Qi=de.useRef(!1),Mi=function(zn){var ci=Kr(),fi=zn.key,Yr=fi==="Enter";if(Yr&&(xn!=="combobox"&&zn.preventDefault(),Qr||Ln(!0)),Wi(!!fr),fi==="Backspace"&&!ci&&Ft&&!fr&&qt.length){for(var ni=(0,gt.Z)(qt),Vi=null,Zi=ni.length-1;Zi>=0;Zi-=1){var ro=ni[Zi];if(!ro.disabled){ni.splice(Zi,1),Vi=ro;break}}Vi&&At(ni,{type:"remove",values:[Vi]})}for(var Ti=arguments.length,Ai=new Array(Ti>1?Ti-1:0),Ui=1;Ui1?ci-1:0),Yr=1;Yr1?Vi-1:0),ro=1;ro=vn},[tn,vn,Gt==null?void 0:Gt.size]),gr=function(Ht){Ht.preventDefault()},or=function(Ht){var Kt;(Kt=ir.current)===null||Kt===void 0||Kt.scrollTo(typeof Ht=="number"?{index:Ht}:Ht)},Er=de.useCallback(function(Rn){return hn==="combobox"?!1:Gt.has(Rn)},[hn,(0,gt.Z)(Gt).toString(),Gt.size]),Tr=function(Ht){for(var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,yn=Cr.length,on=0;on1&&arguments[1]!==void 0?arguments[1]:!1;Br(Ht);var yn={source:Kt?"keyboard":"mouse"},on=Cr[Ht];if(!on){xn(null,-1,yn);return}xn(on.value,Ht,yn)};(0,de.useEffect)(function(){Vr(Hn!==!1?Tr(0):-1)},[Cr.length,_t]);var Jr=de.useCallback(function(Rn){return hn==="combobox"?String(Rn).toLowerCase()===_t.toLowerCase():Gt.has(Rn)},[hn,_t,(0,gt.Z)(Gt).toString(),Gt.size]);(0,de.useEffect)(function(){var Rn=setTimeout(function(){if(!tn&&Xt&&Gt.size===1){var Kt=Array.from(Gt)[0],yn=Cr.findIndex(function(on){var Dn=on.data;return _t?String(Dn.value).startsWith(_t):Dn.value===Kt});yn!==-1&&(Vr(yn),or(yn))}});if(Xt){var Ht;(Ht=ir.current)===null||Ht===void 0||Ht.scrollTo(void 0)}return function(){return clearTimeout(Rn)}},[Xt,_t]);var Dr=function(Ht){Ht!==void 0&&Yn(Ht,{selected:!Gt.has(Ht)}),tn||qt(!1)};if(de.useImperativeHandle(Bt,function(){return{onKeyDown:function(Ht){var Kt=Ht.which,yn=Ht.ctrlKey;switch(Kt){case ht.Z.N:case ht.Z.P:case ht.Z.UP:case ht.Z.DOWN:{var on=0;if(Kt===ht.Z.UP?on=-1:Kt===ht.Z.DOWN?on=1:$n()&&yn&&(Kt===ht.Z.N?on=1:Kt===ht.Z.P&&(on=-1)),on!==0){var Dn=Tr(jn+on,on);or(Dn),Vr(Dn,!0)}break}case ht.Z.TAB:case ht.Z.ENTER:{var ar,Vt=Cr[jn];Vt&&!(Vt!=null&&(ar=Vt.data)!==null&&ar!==void 0&&ar.disabled)&&!Rr?Dr(Vt.value):Dr(void 0),Xt&&Ht.preventDefault();break}case ht.Z.ESC:qt(!1),Xt&&Ht.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ht){or(Ht)}}}),Cr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(Lt,"_list"),className:"".concat(Mr,"-empty"),onMouseDown:gr},At);var Wr=Object.keys(gn).map(function(Rn){return gn[Rn]}),Nr=function(Ht){return Ht.label};function _r(Rn,Ht){var Kt=Rn.group;return{role:Kt?"presentation":"option",id:"".concat(Lt,"_list_").concat(Ht)}}var ii=function(Ht){var Kt=Cr[Ht];if(!Kt)return null;var yn=Kt.data||{},on=yn.value,Dn=Kt.group,ar=(0,Se.Z)(yn,!0),Vt=Nr(Kt);return Kt?de.createElement("div",(0,se.Z)({"aria-label":typeof Vt=="string"&&!Dn?Vt:null},ar,{key:Ht},_r(Kt,Ht),{"aria-selected":Jr(on)}),on):null},Or={role:"listbox",id:"".concat(Lt,"_list")};return de.createElement(de.Fragment,null,nn&&de.createElement("div",(0,se.Z)({},Or,{style:{height:0,width:0,overflow:"hidden"}}),ii(jn-1),ii(jn),ii(jn+1)),de.createElement(wn.Z,{itemKey:"key",ref:ir,data:Cr,height:wr,itemHeight:Qn,fullHeight:!1,onMouseDown:gr,onScroll:bt,virtual:nn,direction:Wn,innerProps:nn?null:Or},function(Rn,Ht){var Kt=Rn.group,yn=Rn.groupOption,on=Rn.data,Dn=Rn.label,ar=Rn.value,Vt=on.key;if(Kt){var Ft,rn=(Ft=on.title)!==null&&Ft!==void 0?Ft:mr(Dn)?Dn.toString():void 0;return de.createElement("div",{className:ye()(Mr,"".concat(Mr,"-group"),on.className),title:rn},Dn!==void 0?Dn:Vt)}var ln=on.disabled,Mn=on.title,sr=on.children,Vn=on.style,yr=on.className,br=(0,Ye.Z)(on,Zn),Sr=(0,cn.Z)(br,Wr),zr=Er(ar),Ar=ln||!zr&&Rr,Hr="".concat(Mr,"-option"),ei=ye()(Mr,Hr,yr,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(Hr,"-grouped"),yn),"".concat(Hr,"-active"),jn===Ht&&!Ar),"".concat(Hr,"-disabled"),Ar),"".concat(Hr,"-selected"),zr)),Li=Nr(Rn),Oi=!dn||typeof dn=="function"||zr,xi=typeof Li=="number"?Li:Li||ar,vi=mr(xi)?xi.toString():void 0;return Mn!==void 0&&(vi=Mn),de.createElement("div",(0,se.Z)({},(0,Se.Z)(Sr),nn?{}:_r(Rn,Ht),{"aria-selected":Jr(ar),className:ei,title:vi,onMouseMove:function(){jn===Ht||Ar||Vr(Ht)},onClick:function(){Ar||Dr(ar)},style:Vn}),de.createElement("div",{className:"".concat(Hr,"-content")},typeof Lr=="function"?Lr(Rn,{index:Ht}):xi),de.isValidElement(dn)||zr,Oi&&de.createElement(Le,{className:"".concat(Mr,"-option-state"),customizeIcon:dn,customizeIconProps:{value:ar,disabled:Ar,isSelected:zr}},zr?"\u2713":null))}))},ur=de.forwardRef(er),nr=ur,In=function(Ae,Ne){var Bt=de.useRef({values:new Map,options:new Map}),Dt=de.useMemo(function(){var Lt=Bt.current,Xt=Lt.values,tn=Lt.options,hn=Ae.map(function(At){if(At.label===void 0){var bt;return(0,_e.Z)((0,_e.Z)({},At),{},{label:(bt=Xt.get(At.value))===null||bt===void 0?void 0:bt.label})}return At}),_t=new Map,qt=new Map;return hn.forEach(function(At){_t.set(At.value,At),qt.set(At.value,Ne.get(At.value)||tn.get(At.value))}),Bt.current.values=_t,Bt.current.options=qt,hn},[Ae,Ne]),We=de.useCallback(function(Lt){return Ne.get(Lt)||Bt.current.options.get(Lt)},[Ne]);return[Dt,We]};function rr(Ae,Ne){return ot(Ae).join("").toUpperCase().includes(Ne)}var cr=function(Ae,Ne,Bt,Dt,We){return de.useMemo(function(){if(!Bt||Dt===!1)return Ae;var Lt=Ne.options,Xt=Ne.label,tn=Ne.value,hn=[],_t=typeof Dt=="function",qt=Bt.toUpperCase(),At=_t?Dt:function(en,vn){return We?rr(vn[We],qt):vn[Lt]?rr(vn[Xt!=="children"?Xt:"label"],qt):rr(vn[tn],qt)},bt=_t?function(en){return te(en)}:function(en){return en};return Ae.forEach(function(en){if(en[Lt]){var vn=At(Bt,bt(en));if(vn)hn.push(en);else{var mn=en[Lt].filter(function(xn){return At(Bt,bt(xn))});mn.length&&hn.push((0,_e.Z)((0,_e.Z)({},en),{},(0,Ie.Z)({},Lt,mn)))}return}At(Bt,bt(en))&&hn.push(en)}),hn},[Ae,Dt,We,Bt,Ne])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],xr=["children"];function Ut(Ae){var Ne=Ae,Bt=Ne.key,Dt=Ne.props,We=Dt.children,Lt=Dt.value,Xt=(0,Ye.Z)(Dt,Kn);return(0,_e.Z)({key:Bt,value:Lt!==void 0?Lt:Bt,children:We},Xt)}function pn(Ae){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Ae).map(function(Bt,Dt){if(!de.isValidElement(Bt)||!Bt.type)return null;var We=Bt,Lt=We.type.isSelectOptGroup,Xt=We.key,tn=We.props,hn=tn.children,_t=(0,Ye.Z)(tn,xr);return Ne||!Lt?Ut(Bt):(0,_e.Z)((0,_e.Z)({key:"__RC_SELECT_GRP__".concat(Xt===null?Dt:Xt,"__"),label:Xt},_t),{},{options:pn(hn)})}).filter(function(Bt){return Bt})}var En=function(Ne,Bt,Dt,We,Lt){return de.useMemo(function(){var Xt=Ne,tn=!Ne;tn&&(Xt=pn(Bt));var hn=new Map,_t=new Map,qt=function(en,vn,mn){mn&&typeof mn=="string"&&en.set(vn[mn],vn)},At=function bt(en){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn=0;mn1&&arguments[1]!==void 0?arguments[1]:!1,Xt=0;Xt0?Ln(Nn.options):Nn.options}):Nn})},Oi=de.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Or]),xi=de.useMemo(function(){return ae(Oi,{fieldNames:Nr,childrenAsData:Dr})},[Oi,Nr,Dr]),vi=function(On){var Pn=Dn(On);if(rn(Pn),qn&&(Pn.length!==Vn.length||Pn.some(function(Ir,Gi){var gi;return((gi=Vn[Gi])===null||gi===void 0?void 0:gi.value)!==(Ir==null?void 0:Ir.value)}))){var Nn=pr?Pn:Pn.map(function(Ir){return Ir.value}),vr=Pn.map(function(Ir){return te(yr(Ir.value))});qn(Jr?Nn:Nn[0],Jr?vr:vr[0])}},Xi=de.useState(null),fr=(0,me.Z)(Xi,2),to=fr[0],ti=fr[1],Ni=de.useState(0),ao=(0,me.Z)(Ni,2),Ji=ao[0],mi=ao[1],Ri=wr!==void 0?wr:Dt!=="combobox",Zr=de.useCallback(function(Ln,On){var Pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nn=Pn.source,vr=Nn===void 0?"keyboard":Nn;mi(On),Xt&&Dt==="combobox"&&Ln!==null&&vr==="keyboard"&&ti(String(Ln))},[Xt,Dt]),Hi=function(On,Pn,Nn){var vr=function(){var no,ji=yr(On);return[pr?{label:ji==null?void 0:ji[Nr.label],value:On,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:On}:On,te(ji)]};if(Pn&&en){var Ir=vr(),Gi=(0,me.Z)(Ir,2),gi=Gi[0],ui=Gi[1];en(gi,ui)}else if(!Pn&&vn&&Nn!=="clear"){var Kr=vr(),Wi=(0,me.Z)(Kr,2),Qi=Wi[0],Mi=Wi[1];vn(Qi,Mi)}},so=Jn(function(Ln,On){var Pn,Nn=Jr?On.selected:!0;Nn?Pn=Jr?[].concat((0,gt.Z)(Vn),[Ln]):[Ln]:Pn=Vn.filter(function(vr){return vr.value!==Ln}),vi(Pn),Hi(Ln,Nn),Dt==="combobox"?ti(""):(!pt||bt)&&(Rn(""),ti(""))}),_i=function(On,Pn){vi(On);var Nn=Pn.type,vr=Pn.values;(Nn==="remove"||Nn==="clear")&&vr.forEach(function(Ir){Hi(Ir.value,!1,Nn)})},Qr=function(On,Pn){if(Rn(On),ti(null),Pn.source==="submit"){var Nn=(On||"").trim();if(Nn){var vr=Array.from(new Set([].concat((0,gt.Z)(Sr),[Nn])));vi(vr),Hi(Nn,!0),Rn("")}return}Pn.source!=="blur"&&(Dt==="combobox"&&vi(On),qt==null||qt(On))},xo=function(On){var Pn=On;Dt!=="tags"&&(Pn=On.map(function(vr){var Ir=yn.get(vr);return Ir==null?void 0:Ir.value}).filter(function(vr){return vr!==void 0}));var Nn=Array.from(new Set([].concat((0,gt.Z)(Sr),(0,gt.Z)(Pn))));vi(Nn),Nn.forEach(function(vr){Hi(vr,!0)})},lo=de.useMemo(function(){var Ln=Lr!==!1&&xn!==!1;return(0,_e.Z)((0,_e.Z)({},Ht),{},{flattenOptions:xi,onActiveValue:Zr,defaultActiveFirstOption:Ri,onSelect:so,menuItemSelectedIcon:Qn,rawValues:Sr,fieldNames:Nr,virtual:Ln,direction:Mr,listHeight:ir,listItemHeight:gr,childrenAsData:Dr,maxCount:jn,optionRender:nn})},[jn,Ht,xi,Zr,Ri,so,Qn,Sr,Nr,Lr,xn,Mr,ir,gr,Dr,nn]);return de.createElement(ue.Provider,{value:lo},de.createElement(Re,(0,se.Z)({},Br,{id:Vr,prefixCls:Lt,ref:Ne,omitDomProps:hr,mode:Dt,displayValues:br,onDisplayValuesChange:_i,direction:Mr,searchValue:Or,onSearch:Qr,autoClearSearchValue:bt,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:nr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Qt=at;Qt.Option=un,Qt.OptGroup=Rt;var Cn=Qt,Gn=Cn},63158:function(Ot,zt,fe){"use strict";var se=fe(54476),gt=fe(20068),Ie=fe(42978),_e=fe(75931),me=fe(59301),Ye=fe(92310),Be=fe.n(Ye),qe=fe(18929),ke=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Te=me.forwardRef(function(ye,ft){var Ue,Fe=ye.prefixCls,Oe=Fe===void 0?"rc-switch":Fe,Le=ye.className,st=ye.checked,ut=ye.defaultChecked,Et=ye.disabled,yt=ye.loadingIcon,vt=ye.checkedChildren,mt=ye.unCheckedChildren,ht=ye.onClick,$t=ye.onChange,Se=ye.onKeyDown,Ge=(0,_e.Z)(ye,de),rt=(0,qe.Z)(!1,{value:st,defaultValue:ut}),Pe=(0,Ie.Z)(rt,2),je=Pe[0],Ee=Pe[1];function ze(dt,pe){var ce=je;return Et||(ce=dt,Ee(ce),$t==null||$t(ce,pe)),ce}function Pt(dt){dt.which===ke.Z.LEFT?ze(!1,dt):dt.which===ke.Z.RIGHT&&ze(!0,dt),Se==null||Se(dt)}function ot(dt){var pe=ze(!je,dt);ht==null||ht(pe,dt)}var St=Be()(Oe,Le,(Ue={},(0,gt.Z)(Ue,"".concat(Oe,"-checked"),je),(0,gt.Z)(Ue,"".concat(Oe,"-disabled"),Et),Ue));return me.createElement("button",(0,se.Z)({},Ge,{type:"button",role:"switch","aria-checked":je,disabled:Et,className:St,ref:ft,onKeyDown:Pt,onClick:ot}),yt,me.createElement("span",{className:"".concat(Oe,"-inner")},me.createElement("span",{className:"".concat(Oe,"-inner-checked")},vt),me.createElement("span",{className:"".concat(Oe,"-inner-unchecked")},mt)))});Te.displayName="Switch",zt.Z=Te},22711:function(Ot,zt,fe){"use strict";fe.r(zt),fe.d(zt,{ResizableTextArea:function(){return Pe},default:function(){return Pt}});var se=fe(54476),gt=fe(20068),Ie=fe(33885),_e=fe(94480),me=fe(42978),Ye=fe(75931),Be=fe(92310),qe=fe.n(Be),ke=fe(36901),de=fe(66003),Te=fe(30292),ye=fe(18929),ft=fe(59301),Ue=fe(76190),Fe=fe(29301),Oe=fe(34280),Le=fe(16089),st=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,ut=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Et={},yt;function vt(ot){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=ot.getAttribute("id")||ot.getAttribute("data-reactid")||ot.getAttribute("name");if(St&&Et[dt])return Et[dt];var pe=window.getComputedStyle(ot),ce=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),wt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),lt=ut.map(function(Xe){return"".concat(Xe,":").concat(pe.getPropertyValue(Xe))}).join(";"),we={sizingStyle:lt,paddingSize:Ve,borderSize:wt,boxSizing:ce};return St&&dt&&(Et[dt]=we),we}function mt(ot){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;yt||(yt=document.createElement("textarea"),yt.setAttribute("tab-index","-1"),yt.setAttribute("aria-hidden","true"),yt.setAttribute("name","hiddenTextarea"),document.body.appendChild(yt)),ot.getAttribute("wrap")?yt.setAttribute("wrap",ot.getAttribute("wrap")):yt.removeAttribute("wrap");var ce=vt(ot,St),Ve=ce.paddingSize,wt=ce.borderSize,lt=ce.boxSizing,we=ce.sizingStyle;yt.setAttribute("style","".concat(we,";").concat(st)),yt.value=ot.value||ot.placeholder||"";var Xe=void 0,Ze=void 0,Mt,it=yt.scrollHeight;if(lt==="border-box"?it+=wt:lt==="content-box"&&(it-=Ve),dt!==null||pe!==null){yt.value=" ";var Ce=yt.scrollHeight-Ve;dt!==null&&(Xe=Ce*dt,lt==="border-box"&&(Xe=Xe+Ve+wt),it=Math.max(Xe,it)),pe!==null&&(Ze=Ce*pe,lt==="border-box"&&(Ze=Ze+Ve+wt),Mt=it>Ze?"":"hidden",it=Math.min(Ze,it))}var ve={height:it,overflowY:Mt,resize:"none"};return Xe&&(ve.minHeight=Xe),Ze&&(ve.maxHeight=Ze),ve}var ht=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],$t=0,Se=1,Ge=2,rt=ft.forwardRef(function(ot,St){var dt=ot,pe=dt.prefixCls,ce=dt.defaultValue,Ve=dt.value,wt=dt.autoSize,lt=dt.onResize,we=dt.className,Xe=dt.style,Ze=dt.disabled,Mt=dt.onChange,it=dt.onInternalAutoSize,Ce=(0,Ye.Z)(dt,ht),ve=(0,ye.Z)(ce,{value:Ve,postState:function(un){return un!=null?un:""}}),Me=(0,me.Z)(ve,2),$e=Me[0],xe=Me[1],He=function(un){xe(un.target.value),Mt==null||Mt(un)},Je=ft.useRef();ft.useImperativeHandle(St,function(){return{textArea:Je.current}});var et=ft.useMemo(function(){return wt&&(0,Ue.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),nt=(0,me.Z)(et,2),Ke=nt[0],xt=nt[1],kt=!!wt,Yt=function(){try{if(document.activeElement===Je.current){var un=Je.current,kn=un.selectionStart,cn=un.selectionEnd,wn=un.scrollTop;Je.current.setSelectionRange(kn,cn),Je.current.scrollTop=wn}}catch($n){}},Wt=ft.useState(Ge),ae=(0,me.Z)(Wt,2),te=ae[0],ee=ae[1],ie=ft.useState(),ue=(0,me.Z)(ie,2),ne=ue[0],ge=ue[1],ct=function(){ee($t)};(0,Oe.Z)(function(){kt&&ct()},[Ve,Ke,xt,kt]),(0,Oe.Z)(function(){if(te===$t)ee(Se);else if(te===Se){var It=mt(Je.current,!1,Ke,xt);ee(Ge),ge(It)}else Yt()},[te]);var pt=ft.useRef(),Ct=function(){Le.Z.cancel(pt.current)},Re=function(un){te===Ge&&(lt==null||lt(un),wt&&(Ct(),pt.current=(0,Le.Z)(function(){ct()})))};ft.useEffect(function(){return Ct},[]);var Zt=kt?ne:null,Rt=(0,Ie.Z)((0,Ie.Z)({},Xe),Zt);return(te===$t||te===Se)&&(Rt.overflowY="hidden",Rt.overflowX="hidden"),ft.createElement(Fe.Z,{onResize:Re,disabled:!(wt||lt)},ft.createElement("textarea",(0,se.Z)({},Ce,{ref:Je,style:Rt,className:qe()(pe,we,(0,gt.Z)({},"".concat(pe,"-disabled"),Ze)),disabled:Ze,value:$e,onChange:He})))}),Pe=rt,je=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ee=ft.forwardRef(function(ot,St){var dt,pe=ot.defaultValue,ce=ot.value,Ve=ot.onFocus,wt=ot.onBlur,lt=ot.onChange,we=ot.allowClear,Xe=ot.maxLength,Ze=ot.onCompositionStart,Mt=ot.onCompositionEnd,it=ot.suffix,Ce=ot.prefixCls,ve=Ce===void 0?"rc-textarea":Ce,Me=ot.showCount,$e=ot.count,xe=ot.className,He=ot.style,Je=ot.disabled,et=ot.hidden,nt=ot.classNames,Ke=ot.styles,xt=ot.onResize,kt=ot.onClear,Yt=ot.onPressEnter,Wt=ot.readOnly,ae=ot.autoSize,te=ot.onKeyDown,ee=(0,Ye.Z)(ot,je),ie=(0,ye.Z)(pe,{value:ce,defaultValue:pe}),ue=(0,me.Z)(ie,2),ne=ue[0],ge=ue[1],ct=ne==null?"":String(ne),pt=ft.useState(!1),Ct=(0,me.Z)(pt,2),Re=Ct[0],Zt=Ct[1],Rt=ft.useRef(!1),It=ft.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=(0,ft.useRef)(null),$n=(0,ft.useRef)(null),Zn=function(){var Qt;return(Qt=$n.current)===null||Qt===void 0?void 0:Qt.textArea},mr=function(){Zn().focus()};(0,ft.useImperativeHandle)(St,function(){var at;return{resizableTextArea:$n.current,focus:mr,blur:function(){Zn().blur()},nativeElement:((at=wn.current)===null||at===void 0?void 0:at.nativeElement)||Zn()}}),(0,ft.useEffect)(function(){Zt(function(at){return!Je&&at})},[Je]);var er=ft.useState(null),ur=(0,me.Z)(er,2),nr=ur[0],In=ur[1];ft.useEffect(function(){if(nr){var at;(at=Zn()).setSelectionRange.apply(at,(0,_e.Z)(nr))}},[nr]);var rr=(0,de.Z)($e,Me),cr=(dt=rr.max)!==null&&dt!==void 0?dt:Xe,Bn=Number(cr)>0,Xn=rr.strategy(ct),Kn=!!cr&&Xn>cr,xr=function(Qt,Cn){var Gn=Cn;!Rt.current&&rr.exceedFormatter&&rr.max&&rr.strategy(Cn)>rr.max&&(Gn=rr.exceedFormatter(Cn,{max:rr.max}),Cn!==Gn&&In([Zn().selectionStart||0,Zn().selectionEnd||0])),ge(Gn),(0,Te.rJ)(Qt.currentTarget,Qt,lt,Gn)},Ut=function(Qt){Rt.current=!0,Ze==null||Ze(Qt)},pn=function(Qt){Rt.current=!1,xr(Qt,Qt.currentTarget.value),Mt==null||Mt(Qt)},En=function(Qt){xr(Qt,Qt.target.value)},Tn=function(Qt){Qt.key==="Enter"&&Yt&&Yt(Qt),te==null||te(Qt)},Jn=function(Qt){Zt(!0),Ve==null||Ve(Qt)},tr=function(Qt){Zt(!1),wt==null||wt(Qt)},dr=function(Qt){ge(""),mr(),(0,Te.rJ)(Zn(),Qt,lt)},_n=it,Fn;rr.show&&(rr.showFormatter?Fn=rr.showFormatter({value:ct,count:Xn,maxLength:cr}):Fn="".concat(Xn).concat(Bn?" / ".concat(cr):""),_n=ft.createElement(ft.Fragment,null,_n,ft.createElement("span",{className:qe()("".concat(ve,"-data-count"),nt==null?void 0:nt.count),style:Ke==null?void 0:Ke.count},Fn)));var hr=function(Qt){var Cn;xt==null||xt(Qt),(Cn=Zn())!==null&&Cn!==void 0&&Cn.style.height&&cn(!0)},jt=!ae&&!Me&&!we;return ft.createElement(ke.BaseInput,{ref:wn,value:ct,allowClear:we,handleReset:dr,suffix:_n,prefixCls:ve,classNames:(0,Ie.Z)((0,Ie.Z)({},nt),{},{affixWrapper:qe()(nt==null?void 0:nt.affixWrapper,(0,gt.Z)((0,gt.Z)({},"".concat(ve,"-show-count"),Me),"".concat(ve,"-textarea-allow-clear"),we))}),disabled:Je,focused:Re,className:qe()(xe,Kn&&"".concat(ve,"-out-of-range")),style:(0,Ie.Z)((0,Ie.Z)({},He),kn&&!jt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fn=="string"?Fn:void 0}},hidden:et,readOnly:Wt,onClear:kt},ft.createElement(Pe,(0,se.Z)({},ee,{autoSize:ae,maxLength:Xe,onKeyDown:Tn,onChange:En,onFocus:Jn,onBlur:tr,onCompositionStart:Ut,onCompositionEnd:pn,className:qe()(nt==null?void 0:nt.textarea),style:(0,Ie.Z)((0,Ie.Z)({},Ke==null?void 0:Ke.textarea),{},{resize:He==null?void 0:He.resize}),disabled:Je,prefixCls:ve,onResize:hr,ref:$n,readOnly:Wt})))}),ze=Ee,Pt=ze},90472:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return ot}});var se=fe(54476),gt=fe(67732),Ie=fe(83652),_e=fe(31226),me=fe(42403),Ye=fe(158),Be=fe(20068),qe=fe(59301),ke=fe(33885),de=fe(75931),Te=fe(76190),ye=fe(75044),ft=fe(3202),Ue=fe(94480),Fe=fe(92310),Oe=fe.n(Fe),Le=fe(26112),st=fe(48736),ut=function(St,dt){if(St&&dt){var pe=Array.isArray(dt)?dt:dt.split(","),ce=St.name||"",Ve=St.type||"",wt=Ve.replace(/\/.*$/,"");return pe.some(function(lt){var we=lt.trim();if(/^\*(\/\*)?$/.test(lt))return!0;if(we.charAt(0)==="."){var Xe=ce.toLowerCase(),Ze=we.toLowerCase(),Mt=[Ze];return(Ze===".jpg"||Ze===".jpeg")&&(Mt=[".jpg",".jpeg"]),Mt.some(function(it){return Xe.endsWith(it)})}return/\/\*$/.test(we)?wt===we.replace(/\/.*$/,""):Ve===we?!0:/^\w+$/.test(we)?((0,st.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(we,"'.Skip for check.")),!0):!1})}return!0};function Et(St,dt){var pe="cannot ".concat(St.method," ").concat(St.action," ").concat(dt.status,"'"),ce=new Error(pe);return ce.status=dt.status,ce.method=St.method,ce.url=St.action,ce}function yt(St){var dt=St.responseText||St.response;if(!dt)return dt;try{return JSON.parse(dt)}catch(pe){return dt}}function vt(St){var dt=new XMLHttpRequest;St.onProgress&&dt.upload&&(dt.upload.onprogress=function(wt){wt.total>0&&(wt.percent=wt.loaded/wt.total*100),St.onProgress(wt)});var pe=new FormData;St.data&&Object.keys(St.data).forEach(function(Ve){var wt=St.data[Ve];if(Array.isArray(wt)){wt.forEach(function(lt){pe.append("".concat(Ve,"[]"),lt)});return}pe.append(Ve,wt)}),St.file instanceof Blob?pe.append(St.filename,St.file,St.file.name):pe.append(St.filename,St.file),dt.onerror=function(wt){St.onError(wt)},dt.onload=function(){return dt.status<200||dt.status>=300?St.onError(Et(St,dt),yt(dt)):St.onSuccess(yt(dt),dt)},dt.open(St.method,St.action,!0),St.withCredentials&&"withCredentials"in dt&&(dt.withCredentials=!0);var ce=St.headers||{};return ce["X-Requested-With"]!==null&&dt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ce).forEach(function(Ve){ce[Ve]!==null&&dt.setRequestHeader(Ve,ce[Ve])}),dt.send(pe),{abort:function(){dt.abort()}}}var mt=function(){var St=(0,ft.Z)((0,ye.Z)().mark(function dt(pe,ce){var Ve,wt,lt,we,Xe,Ze,Mt,it;return(0,ye.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Ze=function(){return Ze=(0,ft.Z)((0,ye.Z)().mark(function $e(xe){return(0,ye.Z)().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.abrupt("return",new Promise(function(et){xe.file(function(nt){ce(nt)?(xe.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=xe.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),et(nt)):et(null)})}));case 1:case"end":return Je.stop()}},$e)})),Ze.apply(this,arguments)},Xe=function($e){return Ze.apply(this,arguments)},we=function(){return we=(0,ft.Z)((0,ye.Z)().mark(function $e(xe){var He,Je,et,nt,Ke;return(0,ye.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:He=xe.createReader(),Je=[];case 2:return kt.next=5,new Promise(function(Yt){He.readEntries(Yt,function(){return Yt([])})});case 5:if(et=kt.sent,nt=et.length,nt){kt.next=9;break}return kt.abrupt("break",12);case 9:for(Ke=0;KeKe?Je-(et-Ke):Je+(et-nt)}function ut(xe,He,Je){var et=xe.length,nt=He.length,Ke,xt;if(et===0&&nt===0)return null;et2&&arguments[2]!==void 0?arguments[2]:!1,te=Yt?Wt<0&&kt.current.left||Wt>0&&kt.current.right:Wt<0&&kt.current.top||Wt>0&&kt.current.bottom;return ae&&te?(clearTimeout(Ke.current),nt.current=!1):(!te||nt.current)&&xt(),!nt.current&&te}};function $t(xe,He,Je,et,nt,Ke,xt){var kt=(0,ye.useRef)(0),Yt=(0,ye.useRef)(null),Wt=(0,ye.useRef)(null),ae=(0,ye.useRef)(!1),te=ht(He,Je,et,nt);function ee(pt,Ct){if(yt.Z.cancel(Yt.current),!te(!1,Ct)){var Re=pt;if(!Re._virtualHandled)Re._virtualHandled=!0;else return;kt.current+=Ct,Wt.current=Ct,mt||Re.preventDefault(),Yt.current=(0,yt.Z)(function(){var Zt=ae.current?10:1;xt(kt.current*Zt,!1),kt.current=0})}}function ie(pt,Ct){xt(Ct,!0),mt||pt.preventDefault()}var ue=(0,ye.useRef)(null),ne=(0,ye.useRef)(null);function ge(pt){if(xe){yt.Z.cancel(ne.current),ne.current=(0,yt.Z)(function(){ue.current=null},2);var Ct=pt.deltaX,Re=pt.deltaY,Zt=pt.shiftKey,Rt=Ct,It=Re;(ue.current==="sx"||!ue.current&&Zt&&Re&&!Ct)&&(Rt=Re,It=0,ue.current="sx");var un=Math.abs(Rt),kn=Math.abs(It);ue.current===null&&(ue.current=Ke&&un>kn?"x":"y"),ue.current==="y"?ee(pt,It):ie(pt,Rt)}}function ct(pt){xe&&(ae.current=pt.detail===Wt.current)}return[ge,ct]}function Se(xe,He,Je,et){var nt=ye.useMemo(function(){return[new Map,[]]},[xe,Je.id,et]),Ke=(0,me.Z)(nt,2),xt=Ke[0],kt=Ke[1],Yt=function(ae){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae,ee=xt.get(ae),ie=xt.get(te);if(ee===void 0||ie===void 0)for(var ue=xe.length,ne=kt.length;ne0&&arguments[0]!==void 0?arguments[0]:!1;ae();var ue=function(){var ct=!1;kt.current.forEach(function(pt,Ct){if(pt&&pt.offsetParent){var Re=pt.offsetHeight,Zt=getComputedStyle(pt),Rt=Zt.marginTop,It=Zt.marginBottom,un=Ee(Rt),kn=Ee(It),cn=Re+un+kn;Yt.current.get(Ct)!==cn&&(Yt.current.set(Ct,cn),ct=!0)}}),ct&&xt(function(pt){return pt+1})};if(ie)ue();else{Wt.current+=1;var ne=Wt.current;Promise.resolve().then(function(){ne===Wt.current&&ue()})}}function ee(ie,ue){var ne=xe(ie),ge=kt.current.get(ne);ue?(kt.current.set(ne,ue),te()):kt.current.delete(ne),!ge!=!ue&&(ue?He==null||He(ie):Je==null||Je(ie))}return(0,ye.useEffect)(function(){return ae},[]),[ee,te,Yt.current,Ke]}var Pt=14/15;function ot(xe,He,Je){var et=(0,ye.useRef)(!1),nt=(0,ye.useRef)(0),Ke=(0,ye.useRef)(0),xt=(0,ye.useRef)(null),kt=(0,ye.useRef)(null),Yt,Wt=function(ie){if(et.current){var ue=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),ge=nt.current-ue,ct=Ke.current-ne,pt=Math.abs(ge)>Math.abs(ct);pt?nt.current=ue:Ke.current=ne;var Ct=Je(pt,pt?ge:ct,!1,ie);Ct&&ie.preventDefault(),clearInterval(kt.current),Ct&&(kt.current=setInterval(function(){pt?ge*=Pt:ct*=Pt;var Re=Math.floor(pt?ge:ct);(!Je(pt,Re,!0)||Math.abs(Re)<=.1)&&clearInterval(kt.current)},16))}},ae=function(){et.current=!1,Yt()},te=function(ie){Yt(),ie.touches.length===1&&!et.current&&(et.current=!0,nt.current=Math.ceil(ie.touches[0].pageX),Ke.current=Math.ceil(ie.touches[0].pageY),xt.current=ie.target,xt.current.addEventListener("touchmove",Wt,{passive:!1}),xt.current.addEventListener("touchend",ae,{passive:!0}))};Yt=function(){xt.current&&(xt.current.removeEventListener("touchmove",Wt),xt.current.removeEventListener("touchend",ae))},(0,Te.Z)(function(){return xe&&He.current.addEventListener("touchstart",te,{passive:!0}),function(){var ee;(ee=He.current)===null||ee===void 0||ee.removeEventListener("touchstart",te),Yt(),clearInterval(kt.current)}},[xe])}function St(xe){return Math.floor(Math.pow(xe,.5))}function dt(xe,He){var Je="touches"in xe?xe.touches[0]:xe;return Je[He?"pageX":"pageY"]-window[He?"scrollX":"scrollY"]}function pe(xe,He,Je){ye.useEffect(function(){var et=He.current;if(xe&&et){var nt=!1,Ke,xt,kt=function(){yt.Z.cancel(Ke)},Yt=function ee(){kt(),Ke=(0,yt.Z)(function(){Je(xt),ee()})},Wt=function(){nt=!1,kt()},ae=function(ie){if(!(ie.target.draggable||ie.button!==0)){var ue=ie;ue._virtualHandled||(ue._virtualHandled=!0,nt=!0)}},te=function(ie){if(nt){var ue=dt(ie,!1),ne=et.getBoundingClientRect(),ge=ne.top,ct=ne.bottom;if(ue<=ge){var pt=ge-ue;xt=-St(pt),Yt()}else if(ue>=ct){var Ct=ue-ct;xt=St(Ct),Yt()}else kt()}};return et.addEventListener("mousedown",ae),et.ownerDocument.addEventListener("mouseup",Wt),et.ownerDocument.addEventListener("mousemove",te),et.ownerDocument.addEventListener("dragend",Wt),function(){et.removeEventListener("mousedown",ae),et.ownerDocument.removeEventListener("mouseup",Wt),et.ownerDocument.removeEventListener("mousemove",te),et.ownerDocument.removeEventListener("dragend",Wt),kt()}}},[xe])}var ce=10;function Ve(xe,He,Je,et,nt,Ke,xt,kt){var Yt=ye.useRef(),Wt=ye.useState(null),ae=(0,me.Z)(Wt,2),te=ae[0],ee=ae[1];return(0,Te.Z)(function(){if(te&&te.times=0;mr-=1){var er=nt(He[mr]),ur=Je.get(er);if(ur===void 0){pt=!0;break}if(Zn-=ur,Zn<=0)break}switch(Zt){case"top":Re=It-ge;break;case"bottom":Re=un-ct+ge;break;default:{var nr=xe.current.scrollTop,In=nr+ct;ItIn&&(Ct="bottom")}}Re!==null&&xt(Re),Re!==te.lastTop&&(pt=!0)}pt&&ee((0,Ie.Z)((0,Ie.Z)({},te),{},{times:te.times+1,targetAlign:Ct,lastTop:Re}))}},[te,xe.current]),function(ie){if(ie==null){kt();return}if(yt.Z.cancel(Yt.current),typeof ie=="number")xt(ie);else if(ie&&(0,gt.Z)(ie)==="object"){var ue,ne=ie.align;"index"in ie?ue=ie.index:ue=He.findIndex(function(pt){return nt(pt)===ie.key});var ge=ie.offset,ct=ge===void 0?0:ge;ee({times:0,index:ue,offset:ct,originAlign:ne})}}}var wt=ye.forwardRef(function(xe,He){var Je=xe.prefixCls,et=xe.rtl,nt=xe.scrollOffset,Ke=xe.scrollRange,xt=xe.onStartMove,kt=xe.onStopMove,Yt=xe.onScroll,Wt=xe.horizontal,ae=xe.spinSize,te=xe.containerSize,ee=xe.style,ie=xe.thumbStyle,ue=xe.showScrollBar,ne=ye.useState(!1),ge=(0,me.Z)(ne,2),ct=ge[0],pt=ge[1],Ct=ye.useState(null),Re=(0,me.Z)(Ct,2),Zt=Re[0],Rt=Re[1],It=ye.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=!et,$n=ye.useRef(),Zn=ye.useRef(),mr=ye.useState(ue),er=(0,me.Z)(mr,2),ur=er[0],nr=er[1],In=ye.useRef(),rr=function(){ue===!0||ue===!1||(clearTimeout(In.current),nr(!0),In.current=setTimeout(function(){nr(!1)},3e3))},cr=Ke-te||0,Bn=te-ae||0,Xn=ye.useMemo(function(){if(nt===0||cr===0)return 0;var dr=nt/cr;return dr*Bn},[nt,cr,Bn]),Kn=function(_n){_n.stopPropagation(),_n.preventDefault()},xr=ye.useRef({top:Xn,dragging:ct,pageY:Zt,startTop:kn});xr.current={top:Xn,dragging:ct,pageY:Zt,startTop:kn};var Ut=function(_n){pt(!0),Rt(dt(_n,Wt)),cn(xr.current.top),xt(),_n.stopPropagation(),_n.preventDefault()};ye.useEffect(function(){var dr=function(jt){jt.preventDefault()},_n=$n.current,Fn=Zn.current;return _n.addEventListener("touchstart",dr,{passive:!1}),Fn.addEventListener("touchstart",Ut,{passive:!1}),function(){_n.removeEventListener("touchstart",dr),Fn.removeEventListener("touchstart",Ut)}},[]);var pn=ye.useRef();pn.current=cr;var En=ye.useRef();En.current=Bn,ye.useEffect(function(){if(ct){var dr,_n=function(jt){var at=xr.current,Qt=at.dragging,Cn=at.pageY,Gn=at.startTop;yt.Z.cancel(dr);var Ae=$n.current.getBoundingClientRect(),Ne=te/(Wt?Ae.width:Ae.height);if(Qt){var Bt=(dt(jt,Wt)-Cn)*Ne,Dt=Gn;!wn&&Wt?Dt-=Bt:Dt+=Bt;var We=pn.current,Lt=En.current,Xt=Lt?Dt/Lt:0,tn=Math.ceil(Xt*We);tn=Math.max(tn,0),tn=Math.min(tn,We),dr=(0,yt.Z)(function(){Yt(tn,Wt)})}},Fn=function(){pt(!1),kt()};return window.addEventListener("mousemove",_n,{passive:!0}),window.addEventListener("touchmove",_n,{passive:!0}),window.addEventListener("mouseup",Fn,{passive:!0}),window.addEventListener("touchend",Fn,{passive:!0}),function(){window.removeEventListener("mousemove",_n),window.removeEventListener("touchmove",_n),window.removeEventListener("mouseup",Fn),window.removeEventListener("touchend",Fn),yt.Z.cancel(dr)}}},[ct]),ye.useEffect(function(){return rr(),function(){clearTimeout(In.current)}},[nt]),ye.useImperativeHandle(He,function(){return{delayHidden:rr}});var Tn="".concat(Je,"-scrollbar"),Jn={position:"absolute",visibility:ur?null:"hidden"},tr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Wt?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,_e.Z)({height:"100%",width:ae},wn?"left":"right",Xn))):(Object.assign(Jn,(0,_e.Z)({width:8,top:0,bottom:0},wn?"right":"left",0)),Object.assign(tr,{width:"100%",height:ae,top:Xn})),ye.createElement("div",{ref:$n,className:qe()(Tn,(0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(Tn,"-horizontal"),Wt),"".concat(Tn,"-vertical"),!Wt),"".concat(Tn,"-visible"),ur)),style:(0,Ie.Z)((0,Ie.Z)({},Jn),ee),onMouseDown:Kn,onMouseMove:rr},ye.createElement("div",{ref:Zn,className:qe()("".concat(Tn,"-thumb"),(0,_e.Z)({},"".concat(Tn,"-thumb-moving"),ct)),style:(0,Ie.Z)((0,Ie.Z)({},tr),ie),onMouseDown:Ut}))}),lt=wt,we=20;function Xe(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Je=xe/He*xe;return isNaN(Je)&&(Je=0),Je=Math.max(Je,we),Math.floor(Je)}var Ze=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Mt=[],it={overflowY:"auto",overflowAnchor:"none"};function Ce(xe,He){var Je=xe.prefixCls,et=Je===void 0?"rc-virtual-list":Je,nt=xe.className,Ke=xe.height,xt=xe.itemHeight,kt=xe.fullHeight,Yt=kt===void 0?!0:kt,Wt=xe.style,ae=xe.data,te=xe.children,ee=xe.itemKey,ie=xe.virtual,ue=xe.direction,ne=xe.scrollWidth,ge=xe.component,ct=ge===void 0?"div":ge,pt=xe.onScroll,Ct=xe.onVirtualScroll,Re=xe.onVisibleChange,Zt=xe.innerProps,Rt=xe.extraRender,It=xe.styles,un=xe.showScrollBar,kn=un===void 0?"optional":un,cn=(0,Ye.Z)(xe,Ze),wn=ye.useCallback(function(Ht){return typeof ee=="function"?ee(Ht):Ht==null?void 0:Ht[ee]},[ee]),$n=ze(wn,null,null),Zn=(0,me.Z)($n,4),mr=Zn[0],er=Zn[1],ur=Zn[2],nr=Zn[3],In=!!(ie!==!1&&Ke&&xt),rr=ye.useMemo(function(){return Object.values(ur.maps).reduce(function(Ht,Kt){return Ht+Kt},0)},[ur.id,ur.maps]),cr=In&&ae&&(Math.max(xt*ae.length,rr)>Ke||!!ne),Bn=ue==="rtl",Xn=qe()(et,(0,_e.Z)({},"".concat(et,"-rtl"),Bn),nt),Kn=ae||Mt,xr=(0,ye.useRef)(),Ut=(0,ye.useRef)(),pn=(0,ye.useRef)(),En=(0,ye.useState)(0),Tn=(0,me.Z)(En,2),Jn=Tn[0],tr=Tn[1],dr=(0,ye.useState)(0),_n=(0,me.Z)(dr,2),Fn=_n[0],hr=_n[1],jt=(0,ye.useState)(!1),at=(0,me.Z)(jt,2),Qt=at[0],Cn=at[1],Gn=function(){Cn(!0)},Ae=function(){Cn(!1)},Ne={getKey:wn};function Bt(Ht){tr(function(Kt){var yn;typeof Ht=="function"?yn=Ht(Kt):yn=Ht;var on=wr(yn);return xr.current.scrollTop=on,on})}var Dt=(0,ye.useRef)({start:0,end:Kn.length}),We=(0,ye.useRef)(),Lt=Et(Kn,wn),Xt=(0,me.Z)(Lt,1),tn=Xt[0];We.current=tn;var hn=ye.useMemo(function(){if(!In)return{scrollHeight:void 0,start:0,end:Kn.length-1,offset:void 0};if(!cr){var Ht;return{scrollHeight:((Ht=Ut.current)===null||Ht===void 0?void 0:Ht.offsetHeight)||0,start:0,end:Kn.length-1,offset:void 0}}for(var Kt=0,yn,on,Dn,ar=Kn.length,Vt=0;Vt=Jn&&yn===void 0&&(yn=Vt,on=Kt),Mn>Jn+Ke&&Dn===void 0&&(Dn=Vt),Kt=Mn}return yn===void 0&&(yn=0,on=0,Dn=Math.ceil(Ke/xt)),Dn===void 0&&(Dn=Kn.length-1),Dn=Math.min(Dn+1,Kn.length-1),{scrollHeight:Kt,start:yn,end:Dn,offset:on}},[cr,In,Jn,Kn,nr,Ke]),_t=hn.scrollHeight,qt=hn.start,At=hn.end,bt=hn.offset;Dt.current.start=qt,Dt.current.end=At,ye.useLayoutEffect(function(){var Ht=ur.getRecord();if(Ht.size===1){var Kt=Array.from(Ht.keys())[0],yn=Ht.get(Kt),on=Kn[qt];if(on&&yn===void 0){var Dn=wn(on);if(Dn===Kt){var ar=ur.get(Kt),Vt=ar-xt;Bt(function(Ft){return Ft+Vt})}}}ur.resetRecord()},[_t]);var en=ye.useState({width:0,height:Ke}),vn=(0,me.Z)(en,2),mn=vn[0],xn=vn[1],Hn=function(Kt){xn({width:Kt.offsetWidth,height:Kt.offsetHeight})},Yn=(0,ye.useRef)(),dn=(0,ye.useRef)(),Gt=ye.useMemo(function(){return Xe(mn.width,ne)},[mn.width,ne]),gn=ye.useMemo(function(){return Xe(mn.height,_t)},[mn.height,_t]),nn=_t-Ke,Wn=(0,ye.useRef)(nn);Wn.current=nn;function wr(Ht){var Kt=Ht;return Number.isNaN(Wn.current)||(Kt=Math.min(Kt,Wn.current)),Kt=Math.max(Kt,0),Kt}var Qn=Jn<=0,Lr=Jn>=nn,Mr=Fn<=0,Cr=Fn>=ne,ir=ht(Qn,Lr,Mr,Cr),Rr=function(){return{x:Bn?-Fn:Fn,y:Jn}},gr=(0,ye.useRef)(Rr()),or=(0,de.zX)(function(Ht){if(Ct){var Kt=(0,Ie.Z)((0,Ie.Z)({},Rr()),Ht);(gr.current.x!==Kt.x||gr.current.y!==Kt.y)&&(Ct(Kt),gr.current=Kt)}});function Er(Ht,Kt){var yn=Ht;Kt?((0,ft.flushSync)(function(){hr(yn)}),or()):Bt(yn)}function Tr(Ht){var Kt=Ht.currentTarget.scrollTop;Kt!==Jn&&Bt(Kt),pt==null||pt(Ht),or()}var pr=function(Kt){var yn=Kt,on=ne?ne-mn.width:0;return yn=Math.max(yn,0),yn=Math.min(yn,on),yn},qn=(0,de.zX)(function(Ht,Kt){Kt?((0,ft.flushSync)(function(){hr(function(yn){var on=yn+(Bn?-Ht:Ht);return pr(on)})}),or()):Bt(function(yn){var on=yn+Ht;return on})}),jn=$t(In,Qn,Lr,Mr,Cr,!!ne,qn),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1];ot(In,xr,function(Ht,Kt,yn,on){var Dn=on;return ir(Ht,Kt,yn)?!1:!Dn||!Dn._virtualHandled?(Dn&&(Dn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Ht?Kt:0,deltaY:Ht?0:Kt}),!0):!1}),pe(cr,xr,function(Ht){Bt(function(Kt){return Kt+Ht})}),(0,Te.Z)(function(){function Ht(yn){var on=Qn&&yn.detail<0,Dn=Lr&&yn.detail>0;In&&!on&&!Dn&&yn.preventDefault()}var Kt=xr.current;return Kt.addEventListener("wheel",Vr,{passive:!1}),Kt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),Kt.addEventListener("MozMousePixelScroll",Ht,{passive:!1}),function(){Kt.removeEventListener("wheel",Vr),Kt.removeEventListener("DOMMouseScroll",Jr),Kt.removeEventListener("MozMousePixelScroll",Ht)}},[In,Qn,Lr]),(0,Te.Z)(function(){if(ne){var Ht=pr(Fn);hr(Ht),or({x:Ht})}},[mn.width,ne]);var Dr=function(){var Kt,yn;(Kt=Yn.current)===null||Kt===void 0||Kt.delayHidden(),(yn=dn.current)===null||yn===void 0||yn.delayHidden()},Wr=Ve(xr,Kn,ur,xt,wn,function(){return er(!0)},Bt,Dr);ye.useImperativeHandle(He,function(){return{nativeElement:pn.current,getScrollInfo:Rr,scrollTo:function(Kt){function yn(on){return on&&(0,gt.Z)(on)==="object"&&("left"in on||"top"in on)}yn(Kt)?(Kt.left!==void 0&&hr(pr(Kt.left)),Wr(Kt.top)):Wr(Kt)}}}),(0,Te.Z)(function(){if(Re){var Ht=Kn.slice(qt,At+1);Re(Ht,Kn)}},[qt,At,Kn]);var Nr=Se(Kn,wn,ur,xt),_r=Rt==null?void 0:Rt({start:qt,end:At,virtual:cr,offsetX:Fn,offsetY:bt,rtl:Bn,getSize:Nr}),ii=Le(Kn,qt,At,ne,Fn,mr,te,Ne),Or=null;Ke&&(Or=(0,Ie.Z)((0,_e.Z)({},Yt?"height":"maxHeight",Ke),it),In&&(Or.overflowY="hidden",ne&&(Or.overflowX="hidden"),Qt&&(Or.pointerEvents="none")));var Rn={};return Bn&&(Rn.dir="rtl"),ye.createElement("div",(0,se.Z)({ref:pn,style:(0,Ie.Z)((0,Ie.Z)({},Wt),{},{position:"relative"}),className:Xn},Rn,cn),ye.createElement(ke.Z,{onResize:Hn},ye.createElement(ct,{className:"".concat(et,"-holder"),style:Or,ref:xr,onScroll:Tr,onMouseEnter:Dr},ye.createElement(Fe,{prefixCls:et,height:_t,offsetX:Fn,offsetY:bt,scrollWidth:ne,onInnerResize:er,ref:Ut,innerProps:Zt,rtl:Bn,extra:_r},ii))),cr&&_t>Ke&&ye.createElement(lt,{ref:Yn,prefixCls:et,scrollOffset:Jn,scrollRange:_t,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Ae,spinSize:gn,containerSize:mn.height,style:It==null?void 0:It.verticalScrollBar,thumbStyle:It==null?void 0:It.verticalScrollBarThumb,showScrollBar:kn}),cr&&ne>mn.width&&ye.createElement(lt,{ref:dn,prefixCls:et,scrollOffset:Fn,scrollRange:ne,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Ae,spinSize:Gt,containerSize:mn.width,horizontal:!0,style:It==null?void 0:It.horizontalScrollBar,thumbStyle:It==null?void 0:It.horizontalScrollBarThumb,showScrollBar:kn}))}var ve=ye.forwardRef(Ce);ve.displayName="List";var Me=ve,$e=Me},93314:function(Ot){"use strict";Ot.exports="data:image/png;base64,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"},16722:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return qe}});const se=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,gt=(ke,de)=>(!de||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",Ie=(ke,de)=>{if(ke.clientHeight{const ft=(Ue=>{if(!Ue.ownerDocument||!Ue.ownerDocument.defaultView)return null;try{return Ue.ownerDocument.defaultView.frameElement}catch(Fe){return null}})(ye);return!!ft&&(ft.clientHeightUede||Ue>ke&&Fe=de&&Oe>=Te?Ue-ke-ye:Fe>de&&OeTe?Fe-de+ft:0,me=ke=>{const de=ke.parentElement;return de==null?ke.getRootNode().host||null:de},Ye=(ke,de)=>{var Te,ye,ft,Ue;if(typeof document=="undefined")return[];const{scrollMode:Fe,block:Oe,inline:Le,boundary:st,skipOverflowHiddenElements:ut}=de,Et=typeof st=="function"?st:lt=>lt!==st;if(!se(ke))throw new TypeError("Invalid target");const yt=document.scrollingElement||document.documentElement,vt=[];let mt=ke;for(;se(mt)&&Et(mt);){if(mt=me(mt),mt===yt){vt.push(mt);break}mt!=null&&mt===document.body&&Ie(mt)&&!Ie(document.documentElement)||mt!=null&&Ie(mt,ut)&&vt.push(mt)}const ht=(ye=(Te=window.visualViewport)==null?void 0:Te.width)!=null?ye:innerWidth,$t=(Ue=(ft=window.visualViewport)==null?void 0:ft.height)!=null?Ue:innerHeight,{scrollX:Se,scrollY:Ge}=window,{height:rt,width:Pe,top:je,right:Ee,bottom:ze,left:Pt}=ke.getBoundingClientRect(),{top:ot,right:St,bottom:dt,left:pe}=(lt=>{const we=window.getComputedStyle(lt);return{top:parseFloat(we.scrollMarginTop)||0,right:parseFloat(we.scrollMarginRight)||0,bottom:parseFloat(we.scrollMarginBottom)||0,left:parseFloat(we.scrollMarginLeft)||0}})(ke);let ce=Oe==="start"||Oe==="nearest"?je-ot:Oe==="end"?ze+dt:je+rt/2-ot+dt,Ve=Le==="center"?Pt+Pe/2-pe+St:Le==="end"?Ee+St:Pt-pe;const wt=[];for(let lt=0;lt=0&&Pt>=0&&ze<=$t&&Ee<=ht&&(we===yt&&!Ie(we)||je>=Mt&&ze<=Ce&&Pt>=ve&&Ee<=it))return wt;const Me=getComputedStyle(we),$e=parseInt(Me.borderLeftWidth,10),xe=parseInt(Me.borderTopWidth,10),He=parseInt(Me.borderRightWidth,10),Je=parseInt(Me.borderBottomWidth,10);let et=0,nt=0;const Ke="offsetWidth"in we?we.offsetWidth-we.clientWidth-$e-He:0,xt="offsetHeight"in we?we.offsetHeight-we.clientHeight-xe-Je:0,kt="offsetWidth"in we?we.offsetWidth===0?0:Ze/we.offsetWidth:0,Yt="offsetHeight"in we?we.offsetHeight===0?0:Xe/we.offsetHeight:0;if(yt===we)et=Oe==="start"?ce:Oe==="end"?ce-$t:Oe==="nearest"?_e(Ge,Ge+$t,$t,xe,Je,Ge+ce,Ge+ce+rt,rt):ce-$t/2,nt=Le==="start"?Ve:Le==="center"?Ve-ht/2:Le==="end"?Ve-ht:_e(Se,Se+ht,ht,$e,He,Se+Ve,Se+Ve+Pe,Pe),et=Math.max(0,et+Ge),nt=Math.max(0,nt+Se);else{et=Oe==="start"?ce-Mt-xe:Oe==="end"?ce-Ce+Je+xt:Oe==="nearest"?_e(Mt,Ce,Xe,xe,Je+xt,ce,ce+rt,rt):ce-(Mt+Xe/2)+xt/2,nt=Le==="start"?Ve-ve-$e:Le==="center"?Ve-(ve+Ze/2)+Ke/2:Le==="end"?Ve-it+He+Ke:_e(ve,it,Ze,$e,He+Ke,Ve,Ve+Pe,Pe);const{scrollLeft:Wt,scrollTop:ae}=we;et=Yt===0?0:Math.max(0,Math.min(ae+et/Yt,we.scrollHeight-Xe/Yt+xt)),nt=kt===0?0:Math.max(0,Math.min(Wt+nt/kt,we.scrollWidth-Ze/kt+Ke)),ce+=ae-et,Ve+=Wt-nt}wt.push({el:we,top:et,left:nt})}return wt},Be=ke=>ke===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function qe(ke,de){if(!ke.isConnected||!(ft=>{let Ue=ft;for(;Ue&&Ue.parentNode;){if(Ue.parentNode===document)return!0;Ue=Ue.parentNode instanceof ShadowRoot?Ue.parentNode.host:Ue.parentNode}return!1})(ke))return;const Te=(ft=>{const Ue=window.getComputedStyle(ft);return{top:parseFloat(Ue.scrollMarginTop)||0,right:parseFloat(Ue.scrollMarginRight)||0,bottom:parseFloat(Ue.scrollMarginBottom)||0,left:parseFloat(Ue.scrollMarginLeft)||0}})(ke);if((ft=>typeof ft=="object"&&typeof ft.behavior=="function")(de))return de.behavior(Ye(ke,de));const ye=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:ft,top:Ue,left:Fe}of Ye(ke,Be(de))){const Oe=Ue-Te.top+Te.bottom,Le=Fe-Te.left+Te.right;ft.scroll({top:Oe,left:Le,behavior:ye})}}}}]);