(self.webpackChunk=self.webpackChunk||[]).push([[6904],{2018:function(){"use strict"},40862:function(Nt,Ht){"use strict";Ht.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},74947:function(){"use strict"},75544: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 Nt={},Ht="5.0",fe={},ae=null,gt=!1,He=!1,ze=null,me=!1,Xe=null,Le=null,Ke=0;Ke4?parseFloat(Ce):5};Nt.setHTML5Codebase=function(Ce,Je){Le=Ce,Ge(Ce,Je)},Nt.setJavaCodebase=Nt.setJavaCodebaseVersion=Nt.isCompiledInstalled=Nt.setPreCompiledScriptPath=Nt.setPreCompiledResourcePath=function(){},Nt.setHTML5CodebaseVersion=function(Ce,Je){var Se=parseFloat(Ce);if(Se!==NaN&&Se<5){console.log("The GeoGebra HTML5 codebase version "+Se+" is deprecated. Using version latest instead.");return}Xe=Ce,ue(Ce,Je)},Nt.getHTML5CodebaseVersion=function(){return je},Nt.getParameters=function(){return fe},Nt.setFontsCSSURL=function(Ce){St=Ce},Nt.setGiacJSURL=function(Ce){},Nt.setJNLPFile=function(Ce){de=Ce},Nt.setJNLPBaseDir=function(Ce){},Nt.inject=function(){function Ce(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Je="auto",Se=fe.id,rt,Ue=!1,xe=0;xe=5)return!0;var Ce=Nt.getAppletObject();return Ce&&typeof Ce.recalculateEnvironments=="function"?(Ce.recalculateEnvironments(),!0):!1},Nt.startAnimation=function(){var Ce=Nt.getAppletObject();return Ce&&typeof Ce.startAnimation=="function"?(Ce.startAnimation(),!0):!1},Nt.stopAnimation=function(){var Ce=Nt.getAppletObject();return Ce&&typeof Ce.stopAnimation=="function"?(Ce.stopAnimation(),!0):!1},Nt.getAppletObject=function(){var Ce=fe.id!==void 0?fe.id:"ggbApplet";return window[Ce]},Nt.resize=function(){};var Lt=function(Ce,Je,Se){var rt=document.createElement("param");rt.setAttribute("name",Je),rt.setAttribute("value",Se),Ce.appendChild(rt)},Fe=function(Ce){return Ce&&Ce!=="false"},Qe=function(Ce,Je,Se){ft(je)<=4.2&&(Se=!0);var rt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==je||ggbHTML5LoadedCodebaseIsWebSimple&&!Oe)&&(rt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ue=document.createElement("div");Ue.classList.add("appletParameters","notranslate");var xe=Je.width,ve=Je.height;if(Je.disableAutoScale=Je.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Je.disableAutoScale,Je.width!==void 0)if(ft(je)<=4.4)Fe(Je.showToolBar)&&(Je.height-=7),Fe(Je.showAlgebraInput)&&(Je.height-=37),Je.width<605&&Fe(Je.showToolBar)&&(Je.width=605,xe=605);else{var Ee=100;(Fe(Je.showToolBar)||Fe(Je.showMenuBar))&&(Je.hasOwnProperty("customToolBar")&&(Je.customToolbar=Je.customToolBar),Ee=Fe(Je.showMenuBar)?245:155),xe=5?(Je.appletOnLoad=function(z){var ie=Ce.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ne),window.GGBT_wsf_view&&$(window).trigger("resize"),we(z)},Ve||Ne.appendChild(et)):Ue.appendChild(et),Ne.appendChild(Ue),Ve||Ce.appendChild(Ne),setTimeout(function(){Nt.resize()},1)}else{var it=document.createElement("div");it.className="applet_scaler",it.style.position="relative",it.style.display="block",it.appendChild(Ue),Ce.appendChild(it),Je.appletOnLoad=function(z){Nt.resize(),we(z)}}function We(z,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(z,ie.appletOnLoad):renderGGBElement(z),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function mt(z,ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:z,params:ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ce){We(ce.article,ce.params)}),html5AppletsToProcess=null)},ft(je)<5&&(z.className+=" geogebraweb")):We(z,ie)}if(rt){scriptLoadStarted=!0;for(var ct=0;ct0?(qe.remove(),Ne.attr("id","fullscreencontent").show(),jQuery(we).append(Ne),window.dispatchEvent(new Event("resize"))):Qe(qe,Je,!1),window.GGBT_wsf_view.launchFullScreen(we)}else ut=rt,Qe(Ce,Je,!1);if(!window.GGBT_wsf_view)for(ve=0;veCe/4*3&&(qe=Ce/4*3),we=qe/5.8,Ee.setAttribute("src",ot),Ee.setAttribute("width",qe),Ee.setAttribute("height",we);var Ne=(Ce-qe)/2,Ve=(Je-we)/2;Ee.style.left=Ne+"px",Ee.style.top=Ve+"px",Ue.appendChild(Ee)}}return Ue.appendChild(ve),Ue},vt=function(Ce){return Ce=Ce.toLowerCase(),Ce==="html5"||Ce==="screenshot"?Ce:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ue=function(Ce,Je){if(je=Ce,Je){Ge(je,!0);return}var Se=!gt;if(Se){var rt=ft(je);!isNaN(rt)&&rt<4.4&&(Se=!1)}var Ue,xe;window.location.protocol.substr(0,4)==="http"?Ue=window.location.protocol:Ue="http:";var ve=je.indexOf("//");ve>0?xe=je:ve===0?xe=Ue+je:xe="https://www.geogebra.org/apps/5.2.814.0/";for(var Ee in pe)if(je.slice(pe[Ee].length*-1)===pe[Ee]||je.slice((pe[Ee].length+1)*-1)===pe[Ee]+"/"){Ge(xe,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Se&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Fe(fe.showToolBar)&&!Fe(fe.showMenuBar)&&!Fe(fe.showAlgebraInput)&&!Fe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?xe+="webSimple/":xe+="web3d/",Ge(xe,!1)},Ge=function(Ce,Je){if(Ce.requirejs){Ae=Ce;return}Ce.slice(-1)!=="/"&&(Ce+="/"),Ae=Ce,Je===null&&(Je=Ce.indexOf("http")===-1),ye=Je,Re="web.nocache.js",Oe=!1;var Se=Ae.split("/");Se.length>1&&(!Je&&Se[Se.length-2]==="webSimple"?(Re="webSimple.nocache.js",Oe=!0):pe.indexOf(Se[Se.length-2])>=0&&(Re=Se[Se.length-2]+".nocache.js")),Se=Ce.split("/"),je=Se[Se.length-3],je.substr(0,4)==="test"?je=je.substr(4,1)+"."+je.substr(5,1):(je.substr(0,3)==="war"||je.substr(0,4)==="beta")&&(je="5.0");var rt=parseFloat(je);rt!==NaN&&rt<5&&Ce.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+rt+" is deprecated. Using version latest instead."),ue("5.0",Je))},wt=function(Ce,Je){window.console&&window.console.log&&(!Je||typeof Je.showLogging=="undefined"||Je.showLogging&&Je.showLogging!=="false")&&console.log(Ce)};fe.material_id!==void 0?$t(lt):lt();function lt(){var Ce=Ht;Xe!==null?Ce=Xe:parseFloat(Ce)<5&&(Ce="5.0"),ue(Ce,!1),Le!==null&&Ge(Le,ye),me=!0}return Nt},GGBAppletUtils=function(){"use strict";function Nt(){return window.GGBT_wsf_edit!==void 0}function Ht(me,Xe){Xe!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+Xe+","+Xe+")",me.style.webkitTransform="scale("+Xe+","+Xe+")",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,Xe,Le,Ke,ke,de){var Ae=null;if(de!=null&&de!="")for(var ye=me.parentNode;ye!=null;)if((" "+ye.className+" ").indexOf(" "+de+" ")>-1){Ae=ye;break}else ye=ye.parentNode;var ut=0,je=0,Re=0,Oe=0,De=0,ot=0,st=0;if(Ae)ut=Ae.offsetWidth,je=Math.max(Ke?Ae.offsetWidth:0,Ae.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ut=Math.min(window.innerWidth,document.documentElement.clientWidth),je=Math.min(window.innerHeight,document.documentElement.clientHeight),Re=ut):(ut=window.innerWidth,je=window.innerHeight,Re=window.innerWidth),me){var St=me.getBoundingClientRect();St.left>0&&St.left<=ut&&(ke===void 0||!ke)&&(document.dir==="rtl"?(De=ut-St.width-St.left,ot=Re<=480?10:30):(ot=St.left,De=Re<=480?10:30),Oe=ot+De)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var bt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Oe=40,st=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Oe=0,st=40)}}return me&&((Le===void 0||!Le)&&Xe>0&&Xe+Oe1&&(de=!0)),Xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))ke=ae(me,Xe,de,Le,me.scaleContainerClass);else return Ke;return de&&(!me.hasOwnProperty("scale")||Ke===1)?ke:Math.min(Ke,ke)}function He(me){var Xe=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Ke=me.getBoundingClientRect(),ke=(Xe-Ke.width)/2,de=(Le-Ke.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 ze(me,Xe){var Le=me.querySelector(".appletParameters");if(Le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Xe.id!==Le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Le.parentElement&&/fullscreen/.test(Le.parentElement.className))return;var Ke=gt(Xe,me);Nt()&&Le.setAttribute("data-param-scale",Ke);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(Nt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Nt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Nt){var Ht=c[Nt];return Ht==null?null:Ht},r=d,webModule.__errFn=e}function B(){function Nt(me){var Xe=me.lastIndexOf(rb);Xe==-1&&(Xe=me.length);var Le=me.indexOf(sb);Le==-1&&(Le=me.length);var Ke=me.lastIndexOf(tb,Math.min(Le,Xe));return Ke>=O?me.substring(O,Ke+P):W}function Ht(me){if(!me.match(/^\w+:\/\//)){var Xe=o.createElement(ub);Xe.src=me+vb,me=Nt(Xe.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function ae(){for(var me=o.getElementsByTagName(_),Xe=O;XeO?me[me.length-P].href:W}function He(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var ze=fe();return ze==W&&(ze=ae()),ze==W&&(ze=gt()),ze==W&&He()&&(ze=Nt(o.location.href)),ze=Ht(ze),ze}function C(Nt){return Nt.match(/^\//)||Nt.match(/^[a-zA-Z]+:\/\//)?Nt:webModule.__moduleBase+Nt}function D(){var Nt=[],Ht=O,fe=[],ae=[];function gt(me){var Xe=ae[me](),Le=fe[me];if(Xe in Le)return Xe;var Ke=[];for(var ke in Le)Ke[Le[ke]]=ke;throw r&&r(me,Ke,Xe),null}if(__gwt_isKnownPropertyValue=function(me,Xe){return Xe in fe[me]},webModule.__getPropMap=function(){var me={};for(var Xe in fe)fe.hasOwnProperty(Xe)&&(me[Xe]=gt(Xe));return me},webModule.__computePropValue=gt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var He;try{He=Cb;var ze=He.indexOf(Db);ze!=-1&&(Ht=parseInt(He.substring(ze+P),$),He=He.substring(O,ze))}catch(me){}return webModule.__softPermutationId=Ht,C(He+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})()},52882:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Ax:function(){return ze},Ds:function(){return me},KI:function(){return Le},SI:function(){return He},f1:function(){return gt}});var ae=fe(26869);function gt(Ke){let ke=!0;if(Ke.length>0){for(let de=0;de0&&ce[ce.length-1])||Ie[0]!==6&&Ie[0]!==2)){ge=0;continue}if(Ie[0]===3&&(!ce||Ie[1]>ce[0]&&Ie[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=""+z.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){z.markerToolbarButtonClicked(ge,ne)}),z.buttons.push(ge),z.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 ce=document.createElement("div");ce.className=this.toolbarBlockStyleClass.name,ce.style.whiteSpace="nowrap",ce.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ce),this.addActionButton(ce,'',"render"),this.addActionButton(ce,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},se.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.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 z=0;z0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.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)},se.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},se.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){z.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},se}(),st=function(){function se(te,z,ie,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=ie,this.styles=ce,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new De("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 De("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new De("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new De("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new De("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 De("toolbox-panel-row_colors",` background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new De("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px; padding: `+z+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new De("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new De("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; `))},se.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(te){var z,ie,ce=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z: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=ce.uiStyleSettings;var ht=document.createElement("div");ht.className=ce.toolboxButtonStyleClass.name+" "+((ge=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ce.toolboxButtonStyleColorsClass.name),ht.innerHTML=ne.icon,ht.title=ne.title,ht.addEventListener("click",function(){ce.panelButtonClick(ne)}),ce.panelButtons.push(ht),ce.buttonRow.appendChild(ht)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(te){var z=this,ie=-1;if(te!==this.activePanel){ie=this.panels.indexOf(te),this.panelRow.innerHTML="";var ce=te.getUi();ce.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ce),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(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ge){var ht,yt;ne.className=z.toolboxButtonStyleClass.name+" "+(ge===ie?""+((ht=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ht!==void 0?ht:z.toolboxActiveButtonStyleColorsClass.name):""+((yt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&yt!==void 0?yt:z.toolboxButtonStyleColorsClass.name))})},se}(),St=function(se,te){this.title=se,this.icon=te},bt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'')||this;return ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=ie,ge.currentColor=ce,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var ne=z.getColorBox(ce);ie.appendChild(ne),z.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(z){var ie=this,ce=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ce,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=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){ie.setCurrentColor(z,ge)});var ht=document.createElement("div");return ht.style.display="inline-block",ht.style.width=ne-2+"px",ht.style.height=ne-2+"px",ht.style.backgroundColor=z,ht.style.borderRadius=ne/2+"px",z==="transparent"&&(ht.style.fill=this.uiStyleSettings.toolboxAccentColor,ht.innerHTML=` `),ge.appendChild(ht),ge},te.prototype.setCurrentColor=function(z,ie){var ce=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(St),ft=function(){function se(te,z,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(te){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(te,z){},se.prototype.dblClick=function(te,z){},se.prototype.manipulate=function(te){},se.prototype.pointerUp=function(te){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},se.prototype.scale=function(te,z){},se.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},se.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},se.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)}},se.typeName="MarkerBase",se}(),pt=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.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},se}(),dt=function(){function se(){this.GRIP_SIZE=10,this.visual=Ae.createGroup(),this.visual.appendChild(Ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},se}(),$t=function(){function se(){}return se.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},se.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},se}(),_e=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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(Ae.createTransform()),ne.setupControlBox(),ne}return Le(te,se),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(z){this._visual=z;var ie=Ae.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint(z);if(this.manipulationStartX=ce.x,this.manipulationStartY=ce.y,this.offsetX=ce.x-this.left,this.offsetY=ce.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(z){var ie=this.state;se.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var ie=this.unrotatePoint(z);this.state==="creating"?this.resize(z):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(z)},te.prototype.resize=function(z){var ie=this.manipulationStartLeft,ce=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+z.x-this.manipulationStartX,ce=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ce=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.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+z.y-this.manipulationStartY}ce>=0?(this.left=ie,this.width=ce):(this.left=ie+ce,this.width=-ce),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(z){if(Math.abs(z.x-this.centerX)>.1){var ie=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM(),ce=Ae.createPoint(z.x,z.y);return{x:(ce=ce.matrixTransform(ie)).x,y:ce.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var ie=this.container.getCTM();ie=ie.inverse();var ce=Ae.createPoint(z.x,z.y);return{x:(ce=ce.matrixTransform(ie)).x,y:ce.y}},te.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Ae.createGroup();var z=Ae.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=Ae.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=Ae.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 pt,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,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 z=new dt;return z.visual.transform.baseVal.appendItem(Ae.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,ie=-z/2,ce=ie,ne=(this.width+this.CB_DISTANCE)/2-z/2,ge=(this.height+this.CB_DISTANCE)/2-z/2,ht=this.height+this.CB_DISTANCE-z/2,yt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,ce),this.positionGrip(this.controlGrips.topCenter.visual,ne,ce),this.positionGrip(this.controlGrips.topRight.visual,yt,ce),this.positionGrip(this.controlGrips.centerLeft.visual,ie,ge),this.positionGrip(this.controlGrips.centerRight.visual,yt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,ht),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,ht),this.positionGrip(this.controlGrips.bottomRight.visual,yt,ht),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ce-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,ie,ce){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,ce),z.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)},se.prototype.getState.call(this))},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;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(z,ie){se.prototype.scale.call(this,z,ie);var ce=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ce.x*z,y:ce.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*ie,this.adjustControlBox()},te}(ft),tt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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 Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=Ae.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(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&Ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&Ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&Ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&Ae.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},se.prototype.getState.call(this))},te.prototype.restoreState=function(z){var ie=z;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize()},te.title="Rectangle marker",te}(_e),Lt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=ie,ge.currentWidth=ce,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(ce){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=ce===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=ce.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var ht=document.createElement("div");ht.style.minHeight="20px",ht.style.flexGrow="2",ht.style.display="flex",ht.style.alignItems="center";var yt=document.createElement("hr");yt.style.minWidth="20px",yt.style.border="0px",yt.style.borderTop=ce+"px solid "+z.uiStyleSettings.toolboxColor,yt.style.flexGrow="2",ht.appendChild(yt),ne.appendChild(ht),z.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(z,ie){var ce=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(St),Fe=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'')||this;return ge.styles=[],ge.styleBoxes=[],ge.styles=ie,ge.currentStyle=ce,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(ce){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/z.styles.length-5+"%",ne.style.borderColor=ce===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var ht=` `;ge.innerHTML=ht,ne.appendChild(ge),z.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(z,ie){var ce=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(St),Qe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new bt("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Le(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='',te}(tt),Pe=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"},Ye=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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 Le(te,se),te.prototype.ownsTarget=function(z){return!!se.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.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(z){var ie=this.state;se.prototype.pointerUp.call(this,z),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(z),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Ae.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 z=new dt;return z.visual.transform.baseVal.appendItem(Ae.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,ie,ce){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(ie,ce),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.x1=this.x1*z,this.y1=this.y1*ie,this.x2=this.x2*z,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(ft),zt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new bt("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.selectorLine=Ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ae.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(z,ie){se.prototype.pointerDown.call(this,z,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()),Ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,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 z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;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}(Ye),kt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'')||this;return ge.fonts=[],ge.fontBoxes=[],ge.fonts=ie,ge.currentFont=ce,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(ce){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/z.fonts.length-5+"%",ne.style.borderColor=ce===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=ce,ge.style.overflow="hidden";var ht=document.createElement("div");ht.style.whiteSpace="nowrap",ht.style.overflow="hidden",ht.style.textOverflow="ellipsis",ht.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(ht),ne.appendChild(ge),z.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(z,ie){var ce=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(St),Tt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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=ce.defaultColor,ne.fontFamily=ce.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 bt("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new kt("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Le(te,se),te.prototype.ownsTarget=function(z){if(se.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(ce){ce===z&&(ie=!0)}),ie},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.bgRectangle=Ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ae.createTransform()),this.textElement.transform.baseVal.appendItem(Ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=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){z.textElement.appendChild(Ae.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),ie=1;if(z.width>0&&z.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;ie=Math.min(ce,ne)}return ie},te.prototype.getTextPosition=function(z){var ie=this.textElement.getBBox(),ce=0,ne=0;return ie.width>0&&ie.height>0&&(ce=(this.width-ie.width*z)/2,ne=this.height/2-ie.height*z/2),{x:ce,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),ie=this.getTextScale(),ce=this.getTextPosition(ie);ce.y-=z.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ce.x+"px, "+ce.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ce.x,ce.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,z),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=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(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,z.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 ce=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ce)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.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 z=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),ne={x:ce.width*z,y:ce.height*z};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*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},te.prototype.dblClick=function(z,ie){se.prototype.dblClick.call(this,z,ie),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&Ae.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&Ae.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,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 z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var ie=z;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='',te}(_e),vt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ce.defaultColor,ne.lineWidth=ce.defaultStrokeWidth,ne.pixelRatio=ce.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 bt("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.drawingImage=Ae.createImage(),this.visual.appendChild(this.drawingImage);var z=Ae.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,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(z.x,z.y),this.drawing=!0):se.prototype.pointerDown.call(this,z,ie)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),Ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,z)},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(),se.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ce=ie[0],ne=ie[1],ge=ie[2],ht=ie[3],yt=!1,Ct=0;Ct0&&(yt=!0,Ctht&&(ht=Ct),Ie>ge&&(ge=Ie));if(yt){this.left=ce/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ce)/this.pixelRatio,this.height=(ht-ne)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=ge-ce,_t.height=ht-ne,_t.getContext("2d").putImageData(this.canvasContext.getImageData(ce,ne,ge-ce,ht-ne),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){Ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},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 z=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),se.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='',te}(_e),pe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ce||'')||this;return ne.typeBoxes=[],ne.currentType=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Le(te,se),te.prototype.getUi=function(){var z=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ce=function(ht){var yt="both";switch(ht){case 0:yt="both";break;case 1:yt="start";break;case 2:yt="end";break;case 3:yt="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=yt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){z.setCurrentType(yt,Ct)}),ie.appendChild(Ct),yt==="both"||yt==="start"){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.minHeight="20px",Ie.innerHTML=` `,Ie.style.marginLeft="5px",Ct.appendChild(Ie)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var Ft=document.createElement("hr");if(Ft.style.minWidth="20px",Ft.style.border="0px",Ft.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Ft.style.flexGrow="2",_t.appendChild(Ft),Ct.appendChild(_t),yt==="both"||yt==="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++)ce(ge);return ie},te.prototype.setCurrentType=function(z,ie){var ce=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings!==void 0?ce.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(St),ue=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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 Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,ie){var ce=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-ce/2+","+(ie+ne/2)+" "+z+","+(ie-ne/2)+" "+(z+ce/2)+","+(ie+ne/2)},te.prototype.createTips=function(){this.arrow1=Ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ae.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(se.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",Ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=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(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,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 z=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='',te}(zt),Ge=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.fillColor=ce.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new bt("Color",ce.defaultColorSet,ce.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Le(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='',te}(tt),wt=function(se){function te(z,ie,ce,ne){var ge=se.call(this,z,ne||'')||this;return ge.opacities=[],ge.opacityBoxes=[],ge.opacities=ie,ge.currentOpacity=ce,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return Le(te,se),te.prototype.getUi=function(){var z=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(ce){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=ce===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*ce+"%",ne.appendChild(ge),z.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(z,ie){var ce=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(St),lt=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ce.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ce.defaultHighlightOpacity,ne.fillPanel=new bt("Color",ce.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new wt("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Le(te,se),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&Ae.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 z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='',te}(Ge),Ce='',Je='',Se=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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=ce.defaultStrokeColor,ne.bgColor=ce.defaultFillColor,ne.fontFamily=ce.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 bt("Text color",ce.defaultColorSet,ne.color,Ce),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new bt("Fill color",ce.defaultColorSet,ne.bgColor,Je),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new kt("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new dt,ne.tipGrip.visual.transform.baseVal.appendItem(Ae.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Le(te,se),te.prototype.ownsTarget=function(z){return se.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){Ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,ie){this.state==="new"&&se.prototype.pointerDown.call(this,z,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,z,ie)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,z);else{var ie=this.state==="creating";se.prototype.pointerUp.call(this,z),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var ie=this.unrotatePoint(z);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(Ae.setAttributes(this.bgRectangle,[["fill",z]]),Ae.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},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(z){z===void 0&&(z=!1);var ie=Math.min(this.height/2,15),ce=this.height/5;z&&(this.tipPosition={x:ie+ce/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 z=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(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ce,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='',te}(zt),xe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||this;return ne.strokePanel.colors=ce.defaultColorSet,ne.fillColor="transparent",ne}return Le(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=se.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='',te}(rt),ve=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.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))},se.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.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}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),Ee=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new bt("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},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=Ae.createGroup(),this.selectorCurve=Ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ae.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(z,ie){se.prototype.pointerDown.call(this,z,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.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()),Ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=Ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ae.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,se.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/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(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),se.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),se.prototype.resize.call(this,z),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(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,ie){this.curveX=this.curveX*z,this.curveY=this.curveY*ie,se.prototype.scale.call(this,z,ie)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){se.prototype.restoreState.call(this,z);var ie=z;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}(Ye),qe=function(se){function te(z,ie,ce){var ne=se.call(this,z,ie,ce)||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=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.fillColor=ce.defaultFillColor,ne.textColor=ce.defaultStrokeColor,ne.fontFamily=ce.defaultFontFamily,ne.fontSize=ce.defaultCaptionFontSize,ne.captionText=ce.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 bt("Line color",de(ce.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new bt("Fill color",de(ce.defaultColorSet,["transparent"]),ne.fillColor,Je),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new kt("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new bt("Text color",ce.defaultColorSet,ne.textColor,Ce),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Le(te,se),te.prototype.ownsTarget=function(z){return!(!se.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=Ae.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ae.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ae.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=Ae.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(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,ie){se.prototype.pointerDown.call(this,z,ie),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){se.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){se.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ae.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')"]]),Ae.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 z=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"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.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(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&Ae.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&Ae.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Ae.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){se.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,ie){se.prototype.dblClick.call(this,z,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&Ae.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&Ae.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&Ae.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&Ae.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 z=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},se.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var ie=z;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(),se.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,ie){se.prototype.scale.call(this,z,ie),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='',te}(_e),we=function(){function se(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),Ne=function(se){function te(z,ie,ce){var ne=se.call(this,z,!1)||this;return ne.dataUrl=ie,ne.state=ce,ne}return Le(te,se),te}(we),Ve=function(se){function te(z,ie,ce){ce===void 0&&(ce=!1);var ne=se.call(this,z,ce)||this;return ne.marker=ie,ne}return Le(te,se),te}(we),et=function(){function se(){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 se.prototype.addEventListener=function(te,z){this[te].push(z)},se.prototype.removeEventListener=function(te,z){var ie=this[te].indexOf(z);ie>-1&&this[te].splice(ie,1)},se}(),it=function(){function se(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 Pe,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=se.instanceCounter++,this.styles=new Re(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(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[Qe,vt,ue,Tt,xe,rt,lt,Se,Ue,Ge,zt,Ee,qe]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Qe,vt,ue,Tt,rt,lt,Se]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Qe,vt,ue,Tt,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var ce=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});ce!==void 0&&z._availableMarkerTypes.push(ce)}else z._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.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},se.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&je.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=je.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new we(te))})},se.prototype.render=function(){return Ke(this,void 0,void 0,function(){var te;return ke(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new ut).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 z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},se.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var ie=!1;te||this.eventListeners.beforeclose.forEach(function(ce){var ne=new we(z,!0);ce(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(ce){return ce(new we(z))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var te,z=[],ie=0;iethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,ie=z',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()},se.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")},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.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 ot(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()},se.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())},se.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){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()}},se.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var ne=new Ve(te,te._currentMarker,!0);ce(ne),ne.defaultPrevented&&(z=!0)}),!z){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(ce){return ce(new Ve(te,ie))})}}},se.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var ht=new Ve(te,void 0,!0);ge(ht),ht.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var ie=function(ge){var ht=ce.markers[ge];ce.setCurrentMarker(ce.markers[ge]),ce._currentMarker.dispose(),ce.markerImage.removeChild(ce._currentMarker.container),ce.markers.splice(ce.markers.indexOf(ce._currentMarker),1),ce.eventListeners.markerdelete.forEach(function(yt){return yt(new Ve(te,ht))})},ce=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.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))},se.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)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===z.width&&ie.height===z.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),ce1&&this.panTo({x:te.clientX,y:te.clientY}))},se.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()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(te,z){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(z-ie.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.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()},se.prototype.addLicenseKey=function(te){ye.addKey(te)},se.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},se.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},se.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(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.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(z){return z(new we(te))}))},se.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new we(te))}))},se.instanceCounter=0,se}(),We=fe(97013),mt=fe(31735),ct=(se,te,z)=>new Promise((ie,ce)=>{var ne=yt=>{try{ht(z.next(yt))}catch(Ct){ce(Ct)}},ge=yt=>{try{ht(z.throw(yt))}catch(Ct){ce(Ct)}},ht=yt=>yt.done?ie(yt.value):Promise.resolve(yt.value).then(ne,ge);ht((z=z.apply(se,te)).next())}),Ot=({data:se,className:te,fullWidth:z,style:ie={},onClose:ce,onOk:ne,showFullTools:ge,noAssociationId:ht})=>{const yt=(0,ae.useRef)(null),Ct=(0,ae.useRef)(null),Ie=(0,ae.useRef)(null),_t=(0,ae.useRef)(null),[Ft,It]=(0,ae.useState)(!1),[un,kn]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(Ie.current||(Ie.current=document.createElement("style"),document.head.appendChild(Ie.current)),se!=null&&se.visible?(document.body.setAttribute("data-custom","y-hidden"),Ie.current.innerHTML=" html { overflow-y: hidden; }",se!=null&&se.src&&cn()):(document.body.removeAttribute("data-custom"),Ie.current&&(document.head.removeChild(Ie.current),Ie.current=null)),()=>{document.body.removeAttribute("data-custom"),Ie.current&&(document.head.removeChild(Ie.current),Ie.current=null)}),[se==null?void 0:se.visible]);const cn=()=>ct(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const mr=yield(0,mt.ZJ)(se==null?void 0:se.src);yt.current.src="",yt.current.src=mr,yt.current.onload=function(){_n()},It(!1),kn("")}),wn=mr=>ct(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const er=yield(0,We.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:se.title,file:mr.dataUrl}});er!=null&&er.id&&!ht?(yield(0,We.ZP)(`/api/attachments/${se.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)})},_n=()=>{Ct.current=new it(yt.current),Ct.current.targetRoot=_t.current,Ct.current.addEventListener("render",wn),Ct.current.addEventListener("beforeclose",ce),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(),se!=null&&se.snapshotData&&Ct.current.restoreState(se.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$n()},300)};return ae.createElement(ae.Fragment,null,(se==null?void 0:se.visible)&&ae.createElement(me.Z,{spinning:Ft,tip:un,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:_t,className:ze()(gt.imageDimensions,te,z?gt.fullWidth:""),style:ie},ae.createElement("img",{className:gt.img,ref:yt}))))}},50047:function(Nt,Ht,fe){"use strict";var ae=fe(59301),gt=fe(77019),He=fe(5269),ze=fe(20554),me=fe(7939),Xe=fe(59944),Le=fe(40862),Ke=fe(48136),ke=fe(59301);const de=(0,ae.forwardRef)(({callback:Ae,showSaveButton:ye,value:ut=""},je)=>{const Re=(0,ae.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 "}]}]}],De=[{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}`}]}]}],ot=bt=>{Re.current.setValue(Re.current.getValue()+" "+bt.value+" ")},st=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(gt.Z,{className:Le.Z.lists,gutter:[10,10]},Oe.map((bt,ft)=>ke.createElement(He.Z,{flex:"110px",className:Le.Z.item},ke.createElement("div",null,ke.createElement(Xe.Z,{value:`$$${bt.value}$$`}),bt.name),ke.createElement("div",{className:Le.Z.children},bt.children.map((pt,dt)=>ke.createElement("div",{key:dt},ke.createElement("h1",null,pt.name),ke.createElement(gt.Z,{gutter:[10,10]},pt.data.map(($t,_e)=>ke.createElement(He.Z,{key:_e,onClick:()=>ot($t),className:Le.Z.diamond},ke.createElement(Xe.Z,{value:"`$$"+$t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(gt.Z,{className:Le.Z.lists,gutter:[10,10]},De.map((bt,ft)=>ke.createElement(He.Z,{flex:"110px",className:Le.Z.item},ke.createElement("div",null,ke.createElement(Xe.Z,{value:"`$$"+bt.value+"$$`"}),bt.name),ke.createElement("div",{className:Le.Z.children},bt.children.map((pt,dt)=>ke.createElement("div",{key:dt},pt.name&&ke.createElement("h1",null,pt.name),ke.createElement(gt.Z,{gutter:[10,10]},pt.data.map(($t,_e)=>ke.createElement(He.Z,{key:_e,onClick:()=>ot($t),className:Le.Z.diamond},ke.createElement(Xe.Z,{value:"`$$"+$t.value+"$$`"}))))))))))}],St=()=>{var bt=document.createElement("div");bt.innerHTML=Re.current.getValue();var ft=bt.innerText;return Ae&&Ae(ft),ft};return(0,ae.useImperativeHandle)(je,()=>({getData:St})),ke.createElement("div",{className:Le.Z.mathWrap},ke.createElement(ze.default,{defaultActiveKey:"1",items:st}),ke.createElement("math-field",{locale:"zh_cn",className:Le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Re,style:{width:800,marginTop:30,fontSize:18}},ut||""),ye&&ke.createElement("div",{className:Le.Z.button},ke.createElement(me.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ht.Z=de},59243:function(Nt,Ht,fe){"use strict";var ae=fe(59301),gt=fe(93314),He=fe(7939),ze=Object.defineProperty,me=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,de=(je,Re,Oe)=>Re in je?ze(je,Re,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):je[Re]=Oe,Ae=(je,Re)=>{for(var Oe in Re||(Re={}))Ke.call(Re,Oe)&&de(je,Oe,Re[Oe]);if(Le)for(var Oe of Le(Re))ke.call(Re,Oe)&&de(je,Oe,Re[Oe]);return je},ye=(je,Re)=>me(je,Xe(Re));const ut=({img:je,buttonProps:Re={},styles:Oe={},customText:De,ButtonText:ot,ButtonClick:st,Buttonclass:St,ButtonTwo:bt,imgStyles:ft,loading:pt=!1,className:dt=""})=>ae.createElement("section",{className:`tc animated fadeIn ${dt}`,style:Ae({color:"#999",margin:"100px auto",visibility:pt?"hidden":"visible"},Oe)},ae.createElement("img",{src:je||gt,style:ye(Ae({},ft),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ot&&ae.createElement(He.ZP,Ae({className:St,onClick:st},Re),ot),bt&&bt);Ht.Z=ut},47199:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return St}});var ae=fe(59301),gt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},He=fe(7939),ze=fe(70557),me=fe(58478),Xe=fe(25399),Le=fe(31735),Ke=fe(22167),ke=fe(59243),de=fe(26869),Ae=fe(38609),ye=fe(59301),ut=Object.defineProperty,je=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,De=(bt,ft,pt)=>ft in bt?ut(bt,ft,{enumerable:!0,configurable:!0,writable:!0,value:pt}):bt[ft]=pt,ot=(bt,ft)=>{for(var pt in ft||(ft={}))Re.call(ft,pt)&&De(bt,pt,ft[pt]);if(je)for(var pt of je(ft))Oe.call(ft,pt)&&De(bt,pt,ft[pt]);return bt},st=(bt,ft,pt)=>new Promise((dt,$t)=>{var _e=Fe=>{try{Lt(pt.next(Fe))}catch(Qe){$t(Qe)}},tt=Fe=>{try{Lt(pt.throw(Fe))}catch(Qe){$t(Qe)}},Lt=Fe=>Fe.done?dt(Fe.value):Promise.resolve(Fe.value).then(_e,tt);Lt((pt=pt.apply(bt,ft)).next())}),St=({editOffice:bt="view",data:ft,issaver:pt,onSaver:dt,theme:$t,type:_e,filename:tt,monacoEditor:Lt,className:Fe,style:Qe,close:Pe,onClose:Ye,hasMask:zt,disabledDownload:kt,onImgDimensions:Tt,showNodata:vt,recordInfo:pe})=>{const[ue,Ge]=(0,ae.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,ae.useState)(""),[Ce,Je]=(0,ae.useState)(),Se=window.ENV==="build"?"/react/build":"",rt=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,xe=10*(1024*1024),ve=(0,ae.useRef)();ft!=null&&ft.startsWith("/api")&&_e!=="txt"&&(ft=de.Z.API_SERVER+ft);const Ee=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();tt&&Lt&&(Lt.filename=tt),(0,ae.useEffect)(()=>{var et,it;const We=(it=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:it.split(";");We==null||We.map(mt=>{let ct=mt.split("=");ct[0]==="_educoder_session"&<(ct[1])})},[]),(0,ae.useEffect)(()=>{_e==="office"&&(ft.indexOf("bigfilescdn.")>-1||ft.indexOf("bigfiles1")>-1?Je({url:ft,fileType:Ee(ft),model:ft.indexOf("model=edit")?"edit":"view"}):we())},[_e,ft]);function qe(et){return st(this,null,function*(){et.data.type==="pdfdata"&&(dt(et.data.data),window.removeEventListener("message",qe,!1)),console.log("mess---:",et.data)})}const we=()=>st(void 0,null,function*(){console.log("data:",ft);let et=ft;ft.startsWith("http")||(et=location.origin+et);let it=new URL(et).pathname.split("/").pop();const We=yield(0,Ke.gJ)({attachment_id:it});We.url=rt+We.url,Je(We)}),Ne=()=>{if(ft.startsWith("http")||ft.startsWith("blob:")){Ve();return}(0,Le.Sv)(tt||"educoder",ft,tt)},Ve=()=>{pe&&(0,Ae.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Le.Nd)(tt||"educoder",decodeURIComponent(ft))};return ye.createElement("div",{style:ot({},Qe||{}),className:`${zt&>.bgBlack} ${_e?gt.wrp:"hide"}`},Pe&&ye.createElement("div",{className:gt.close,ref:ve},!!Tt&&ye.createElement(Xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:()=>{Ye(),Tt()}},ye.createElement("i",{className:"icon-yulanpizhu"}))),!kt&&ye.createElement(Xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:Ve},ye.createElement("i",{className:"icon-quxiaozhiding"}))),pt&&ye.createElement(Xe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",qe,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},ye.createElement("i",{className:"icon-baocun"}))),ye.createElement(Xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{Ye()}},ye.createElement("i",{className:"icon-guanbi1"})))),ye.createElement("div",{className:`${gt[Fe]} ${Fe} ${gt.monaco} ${_e==="txt"?"show":"hide"}`},_e==="txt"&&ye.createElement(ye.Fragment,null,ye.createElement(me.ZP,ot({},Lt)))),_e==="audio"&&ye.createElement("audio",{src:`${(ft==null?void 0:ft.indexOf("http://"))>-1||(ft==null?void 0:ft.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ft}`,autoPlay:!0}),_e==="video"&&ye.createElement(ye.Fragment,null,(ft==null?void 0:ft.indexOf("http"))>-1?ye.createElement("video",{controls:!0,src:`${ft}`,autoPlay:!0}):ye.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ft}`,autoPlay:!0})),_e==="office"&&Ce&&ye.createElement("iframe",{src:`${Se}/office.html?key=${Ce.key}&url=${btoa(Ce.url)}&callbackUrl=${rt+(Ce.callbackUrl||"")}&fileType=${Ce.fileType}&title=${Ce.title||""}&model=${bt}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!kt}`}),_e==="html"&&ye.createElement("iframe",{src:ft+"&disposition=inline"}),_e==="pdf"&&pt&&ye.createElement("iframe",{id:"pdfiframe",src:`${Se}/js/pdfview/index.html?filename=${tt||"educoder.pdf"}&url=${encodeURIComponent(ft)}&disabledDownload=${!!kt}&model=${bt}`}),_e==="pdf"&&!pt&&ye.createElement("embed",{className:gt.embed,src:ft+"#toolbar=0&statusbar=0&navpanes=0&scrollbars=0"}),_e==="image"&&ye.createElement("img",{src:`${(ft==null?void 0:ft.indexOf("http://"))>-1||(ft==null?void 0:ft.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ft}`}),(_e==="other"||_e==="download")&&ye.createElement(ye.Fragment,null,vt?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(He.ZP,{icon:ye.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ne,disabled:kt},"\u4E0B\u8F7D")}):ye.createElement(He.ZP,{type:"primary",size:"middle",onClick:Ne,disabled:kt},ye.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),_e==="flowChart"&&ye.createElement("div",{className:"embed"},ye.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${ft||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},59944:function(Nt,Ht,fe){"use strict";fe.d(Ht,{z:function(){return Lt},Z:function(){return Fe}});var ae=fe(59301),gt=fe(54196),He=fe(58489),ze=fe(64018),me=fe(80360),Xe=fe(26869),Le=fe(31735),Ke=fe(15342),ke=fe(44104),de=fe(7939),Ae=fe(1012),ye=fe(47199),ut=fe(59301),Re=({html:Qe})=>{const Pe=(0,ae.useRef)(null),Ye=(0,ae.useRef)(null),zt=`.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,ae.useEffect)(()=>{const kt=Pe.current.attachShadow({mode:"open"});Ye.current=document.createElement("div"),Ye.current.className="markdown-body",Ye.current.innerHTML=Qe,kt.appendChild(Ye.current);const Tt=document.createElement("style");return Tt.textContent=zt,kt.appendChild(Tt),()=>{kt.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Ye.current&&(Ye.current.innerHTML=Qe)},[Qe]),ut.createElement("div",{ref:Pe})};function Oe(Qe){const Pe=["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"],Ye=new RegExp(`\\b(${Pe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Qe.replace(Ye,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ot=Object.defineProperty,st=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,ft=(Qe,Pe,Ye)=>Pe in Qe?ot(Qe,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Qe[Pe]=Ye,pt=(Qe,Pe)=>{for(var Ye in Pe||(Pe={}))St.call(Pe,Ye)&&ft(Qe,Ye,Pe[Ye]);if(st)for(var Ye of st(Pe))bt.call(Pe,Ye)&&ft(Qe,Ye,Pe[Ye]);return Qe};const dt="@\u2581\u2581@",$t="@\u2581@",_e=/]*>/g;function tt(Qe){let Pe=document.createElement("div");return Pe.innerHTML=Qe,Pe.childNodes.length===0?"":Pe.childNodes[0].nodeValue}const Lt=(Qe,Pe)=>{Qe=Qe||"";const Ye=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,zt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,kt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Tt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Pe?Qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ye,(vt,pe,ue,Ge,wt,lt,Ce)=>{const Je=pe||Ge||lt,Se=ue||wt||Ce||"?";return Xe.Z.API_SERVER+"/api/attachments/"+Je+Se+"&t="+(0,Le.Jn)(Je,Date.now())+(vt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qe=Qe.replace(Tt,(vt,pe,ue,Ge,wt,lt,Ce)=>{const Je=pe||Ge||lt,Se=ue||wt||Ce||"?";return Xe.Z.API_SERVER+"/attachments/download/"+Je+Se+"&t="+(0,Le.Jn)(Je,Date.now())+(vt.indexOf(")")>-1?")":"&")}).replace(Ye,(vt,pe,ue,Ge,wt,lt,Ce)=>{const Je=pe||Ge||lt,Se=ue||wt||Ce||"?";return Xe.Z.API_SERVER+"/api/attachments/"+Je+Se+"&t="+(0,Le.Jn)(Je,Date.now())+(vt.indexOf(")")>-1?")":"&")}).replace(zt,(vt,pe,ue,Ge,wt)=>{const lt=pe||Ge,Ce=ue||wt||"";return'"'+Xe.Z.API_SERVER+"/api/attachments/"+lt+Ce+lt+Ce+"&t="+(0,Le.Jn)(lt,Date.now())}).replace(kt,(vt,pe,ue,Ge,wt)=>{const lt=pe||Ge,Ce=ue||wt||"";return"("+Xe.Z.API_SERVER+"/files/uploads/"+lt+Ce+lt+Ce+"&t="+(0,Le.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,` `),Qe)};var Fe=({value:Qe="",edit:Pe=!1,className:Ye,showTextOnly:zt,showLines:kt,style:Tt={},stylesPrev:vt={},highlightKeywords:pe,showProgramFill:ue,isProgramFill:Ge,disabledFill:wt=!1,programFillValue:lt,openEditor:Ce=()=>{},onFillChange:Je=Ue=>{},onFillBlur:Se=()=>{},onFillFocus:rt=()=>{}})=>{let Ue=Oe(String(Qe||""));const xe=(0,ae.useRef)(),ve=(0,ae.useRef)(),[Ee,qe]=(0,ae.useState)(""),[we,Ne]=(0,ae.useState)("office"),[Ve,et]=(0,ae.useState)([]),it=(0,ae.useRef)("a"+(0,Ae.Z)()),We={},mt=Ie=>//i.test(Ie||""),ct=(Ie,_t,Ft)=>{const It=document.createElement(Ie===$t?"input":"textarea");It.style.width="100%",It.style.height=Ie===$t?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=_t;const un=Object.keys(We).length;return We[un]=It,`${It.outerHTML}`};function jt(Ie){return Ie=Ie.replace(/!\[.*?\]\(.*?\)/g,""),Ie=Ie.replace(/\[.*?\]\(.*?\)/g,""),Ie=Ie.replace(new RegExp("","gs"),""),Ie=Ie.replace(//g,""),Ie=Ie.replace(//g,""),Ie=Ie.replace(new RegExp(".*?<\\/video>","gs"),""),Ie=Ie.replace(new RegExp(".*?<\\/audio>","gs"),""),Ie=Ie.replace(new RegExp(".*?<\\/style>","gs"),""),Ie=Ie.replace(new RegExp(".*?<\\/script>","gs"),""),Ie}const Ot=Ie=>!zt&&mt(Ue)?Ie:Ie.replace(/([\s\S]+?)<\/style>/gim,function(_t,Ft){let It=Ft.replace(/(\n|\r)/g,"").split("}"),un=[];return It.map(kn=>{kn!=""&&un.push(`.${it.current} ${kn}`)}),``}),se=(0,ae.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;Ue=Ue.replace(cn,"("+Xe.Z.API_SERVER+"/attachments/download/").replace(It,"("+Xe.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Xe.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Xe.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,` `),xe.current.style.display="none"}catch(It){}if(ue){let It=-1;return Ue=Ue.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(un,kn,cn){var wn;return++It,ct(un,It,(wn=lt==null?void 0:lt[It])==null?void 0:wn.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Ot(Ue||"")}
`}let Ie=Ot(Ue);Ie=(0,He.ZP)(Ie);const _t=(0,He.ez)();Ue.match(/\[TOC\]/)&&(Ie=Ie.replace("

[TOC]

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

${Sr||

`):xt.replaceSelection(`${Sr||`):((Vn=fr==null?void 0:fr.type)==null?void 0:Vn.indexOf("video"))>-1?xt.replaceSelection(``):((yr=fr==null?void 0:fr.type)==null?void 0:yr.indexOf("pdf"))>-1?xt.replaceSelection(`${fr.name}`):In.includes(to)?xt.replaceSelection(`${fr.name}`):xt.replaceSelection(`[${fr.name}](${br})`),xt.focus();case Ft:const{row:ti,col:Fi,align:ao}=Ut;let Ji=` `;for(let mi=0;mi{switch(Gt){case ge:return ae.createElement(wt,{callback:Hr,onCancel:Zr});case _t:return ae.createElement(lt.Z,{callback:Hr,onCancel:Zr});case ht:return ae.createElement(Ce.Z,{callback:Hr,onCancel:Zr});case yt:return ae.createElement(et,{editImgId:qn.current,callback:Hr,onCancel:Zr});case Ft:return ae.createElement(Ot,{callback:Hr,onCancel:Zr});case"maths-latex":return ae.createElement(ce,{showSaveButton:!0,callback:Hr});case"inline-latex":return ae.createElement(ne.Z,{showSaveButton:!0,callback:Hr});default:return null}},[Gt]);function Zr(){gn("")}(0,ae.useEffect)(()=>{if(Ar.current){let Ut=function(Vn){Mn=!0,sr=Vn.pageY},Rt=function(){Mn=!1},rn=function(Vn){if(Mn){let yr=Vn.pageY-sr;yr<0&&(yr=0),yr>300&&(yr=300);let br=An+yr+"px";Qn(br)}},ln=Ar.current,Mn=!1,sr=0;return ln.addEventListener("mousedown",Ut),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",Rt),()=>{ln.removeEventListener("mousedown",Ut),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",Rt)}}},[xt,Ar]),(0,ae.useEffect)(()=>{Qn(An)},[An]);const ii=rr(En),Or=rr(wr),Nn={width:ii,height:Or},Wt=(0,ae.useMemo)(()=>{if(nn){let Ut=new Date(nn),Rt=Ut.getHours(),rn=Ut.getMinutes(),ln=Ut.getSeconds();return Rt=Rt<10?"0"+Rt:Rt,rn=rn<10?"0"+rn:rn,ln=ln<10?"0"+ln:ln,`${Rt}:${rn}:${ln}`}return 0},[nn]),Yt=Ut=>{const Rt=[];if(Cn){let rn=-1;Ut=Ut.replace(/(@▁▁@|@▁@)/g,function(ln,Mn,sr){Rt.push({multiLine:ln!==ur})})}return Rt};function yn(){window.sessionStorage.removeItem(hr),Mr(!1),Hn(0)}function on(){Mr(!1),Hn(0),xt.setValue(window.sessionStorage.getItem(hr))}(0,ae.useEffect)(()=>{Kn[Gt]&&Gt!==Ct&&Gt!==yt&&setTimeout(()=>{const Ut=document.getElementsByClassName("markdown-popup-form")[0],Rt=window.innerWidth/2-Ut.offsetWidth/2,rn=window.innerHeight/2-Ut.offsetHeight/2;ir(Rt),gr(rn)},0)},[Gt]);const Dn=Ut=>{Ut.preventDefault();const Rt=Ut.clientX-Cr,rn=Ut.clientY-Nr;document.body.onmousemove=ln=>{let Mn=ln.clientX-Rt,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,Rt,rn)&&(ir(Mn),gr(sr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ar=(Ut,Rt,rn,ln)=>{const Mn=document.body.clientHeight,sr=document.body.clientWidth;return Ut<20&&rn>Ut||Ut>sr-20&&rnRt||Rt>Mn-20&&ln{var Rt;qn.current=Ut,(Rt=jn.current)==null||Rt.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),Vt?ae.createElement("a",{ref:Ar,className:"editor-resize"}):null,Gt===Ct&&ae.createElement(xe,{callback:Hr,onCancel:Zr}),Gt===yt&&ae.createElement(et,{ref:jn,editImgId:qn.current,callback:Hr,onCancel:Zr}),ae.createElement(_e.Z,null,Kn[Gt]&&Gt!==Ct&&Gt!==yt?ae.createElement(Je.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Nr},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:Dn},Kn[Gt]),open:!0,onCancel:Zr,footer:null,destroyOnClose:!0,width:Gt===yt?"1200px":null,height:Gt===yt?"80vh":null,className:"markdown-popup-form"},Fr):null))}},82441:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return pt},I:function(){return $t}});var ae=fe(28284),gt=fe(6767),He=fe(37568),ze=fe(44104),me=fe(71051),Xe=fe(47889),Le=fe(7939),Ke=fe(52882),ke=fe(59301),de=fe(59301),Ae=Object.defineProperty,ye=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,De=(_e,tt,Lt)=>tt in _e?Ae(_e,tt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):_e[tt]=Lt,ot=(_e,tt)=>{for(var Lt in tt||(tt={}))Re.call(tt,Lt)&&De(_e,Lt,tt[Lt]);if(je)for(var Lt of je(tt))Oe.call(tt,Lt)&&De(_e,Lt,tt[Lt]);return _e},st=(_e,tt)=>ye(_e,ut(tt));const{useForm:St}=ae.default,bt={width:280,marginRight:10},ft={labelCol:{span:5},wrapperCol:{span:19}};var pt=({callback:_e,onCancel:tt})=>{const[Lt]=St();let Fe=(0,ke.useRef)();function Qe(zt){Fe.current.width=Lt.getFieldValue("width"),Fe.current.align=Lt.getFieldValue("align"),_e(zt,Fe.current)}function Pe(zt,kt){if(zt.status===-1){gt.ZP.error(zt.message);return}Lt.setFieldsValue({src:`/api/attachments/${zt.id}`,type:kt.type})}function Ye(zt){let kt=zt.target.files[0];Fe.current=kt,$t(kt,Pe)}return de.createElement(ae.default,st(ot({form:Lt},ft),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(He.default,{style:bt})),de.createElement(dt,{onFileChange:Ye}))),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(He.default,{style:{width:264}})),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(ze.Z,null,de.createElement(ae.default.Item,{name:"width",style:{margin:0}},de.createElement(me.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(Xe.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(ae.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Le.ZP,{type:"default",onClick:tt},"\u53D6\u6D88"))))};function dt({onFileChange:_e}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:_e}))}function $t(_e,tt){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");let Lt=new FormData;Lt.append("editormd-image-file",_e),Lt.append("file_param_name","editormd-image-file"),Lt.append("byxhr","true");var Fe=new window.XMLHttpRequest;Fe.withCredentials=!0,Fe.addEventListener("load",function(Qe){tt(JSON.parse(Qe.target.responseText),_e)},!1),Fe.addEventListener("error",function(Qe){console.error(Qe)},!1),Fe.open("POST",`${Ke.KI}/api/attachments.json`),Fe.send(Lt)}},35990:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return He}});var ae=fe(59301),gt=fe(4676);class He extends ae.Component{constructor(me){super(me);const Xe=window.document;this.node=Xe.createElement("div"),Xe.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,gt.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58478:function(Nt,Ht,fe){"use strict";fe.d(Ht,{SV:function(){return xe},ZP:function(){return Ue}});var ae=fe(59301),gt=fe(76374);const He={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"]},ze={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(` `)}]},Xe={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(` `)}]},Le={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 Ke=fe(53184),ke=fe.n(Ke),de=(ve,Ee,qe)=>new Promise((we,Ne)=>{var Ve=We=>{try{it(qe.next(We))}catch(mt){Ne(mt)}},et=We=>{try{it(qe.throw(We))}catch(mt){Ne(mt)}},it=We=>We.done?we(We.value):Promise.resolve(We.value).then(Ve,et);it((qe=qe.apply(ve,Ee)).next())});const Ae={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,Ee,qe,we)=>{const Ne=Ee.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:qe.lineNumber,endColumn:qe.column});return Array.from(new Set(Ne.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:ve.languages.CompletionItemKind.Text,insertText:et,range:we}))},ut=(ve,Ee,qe,we)=>{ve.languages.registerCompletionItemProvider(Ee,{provideCompletionItems(Ne,Ve){const et=Ne.getWordUntilPosition(Ve),it={startLineNumber:Ve.lineNumber,endLineNumber:Ve.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},We=Ne.getLineContent(Ve.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...ye(ve,Ne,Ve,it),...qe.map(ct=>({label:ct,kind:ve.languages.CompletionItemKind.Keyword,documentation:ct,insertText:ct,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it})),...we.map(ct=>({label:ct.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:ct.content,insertText:We.startsWith("#")?ct.content.replace(/#/,""):ct.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}})};var je=ve=>{Ae.languages.forEach(Ee=>{ve.languages.registerDocumentFormattingEditProvider(Ee,{provideDocumentFormattingEdits(qe){return de(this,null,function*(){const we=ke()(qe.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:qe.getFullModelRange(),text:we}]})}})}),ut(ve,"java",ze.keywords,ze.quickKey),ut(ve,"cpp",me.keywords,me.quickKey),ut(ve,"c",He.keywords,[]),ut(ve,"python",Xe.keywords,Xe.quickKey),ut(ve,"scala",Le.keywords,Le.quickKey)};const Re="\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,De=(ve,Ee,qe)=>Ee in ve?Oe(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:qe}):ve[Ee]=qe,ot=(ve,Ee,qe)=>De(ve,typeof Ee!="symbol"?Ee+"":Ee,qe);const st=class Wl{constructor(Ee,qe,we){this.placeholder=Ee,this.editor=qe,this.monaco=we,qe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Wl.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)}};ot(st,"ID","editor.widget.placeholderHint");var bt=st,ft=fe(96236),pt=fe(6767),dt=fe(25399),$t=fe(89392),_e=fe(94276),tt=fe(56102),Lt=Object.defineProperty,Fe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,kt=(ve,Ee,qe)=>Ee in ve?Lt(ve,Ee,{enumerable:!0,configurable:!0,writable:!0,value:qe}):ve[Ee]=qe,Tt=(ve,Ee)=>{for(var qe in Ee||(Ee={}))Ye.call(Ee,qe)&&kt(ve,qe,Ee[qe]);if(Pe)for(var qe of Pe(Ee))zt.call(Ee,qe)&&kt(ve,qe,Ee[qe]);return ve},vt=(ve,Ee)=>Fe(ve,Qe(Ee)),pe=(ve,Ee)=>{var qe={};for(var we in ve)Ye.call(ve,we)&&Ee.indexOf(we)<0&&(qe[we]=ve[we]);if(ve!=null&&Pe)for(var we of Pe(ve))Ee.indexOf(we)<0&&zt.call(ve,we)&&(qe[we]=ve[we]);return qe},ue=(ve,Ee,qe)=>new Promise((we,Ne)=>{var Ve=We=>{try{it(qe.next(We))}catch(mt){Ne(mt)}},et=We=>{try{it(qe.throw(We))}catch(mt){Ne(mt)}},it=We=>We.done?we(We.value):Promise.resolve(We.value).then(Ve,et);it((qe=qe.apply(ve,Ee)).next())});function Ge(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function wt(){}let lt=!1;const Ce={"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 Je(ve=[]){let Ee=ve;if(Array.isArray(ve)){for(let qe=0;qeue(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 Ue=ve=>{var Ee=ve,{width:qe="100%",height:we="100%",value:Ne,language:Ve="javascript",style:et={},options:it={},overrideServices:We={},theme:mt="vs-dark",onEditBlur:ct,isCopy:jt=!1,onSave:Ot,autoHeight:se=!1,forbidCopy:te=!1,onChange:z=wt,editorDidMount:ie=wt,onFocus:ce=wt,onBreakPoint:ne=wt,breakPointValue:ge=[],filename:ht="educoder.txt",errorLine:yt,errorContent:Ct="",highlightLine:Ie,openBreakPoint:_t=!1,placeholder:Ft="",showMiniMap:It=!0}=Ee,un=pe(Ee,["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,ae.useRef)(),cn=(0,ae.useRef)({}),wn=(0,ae.useRef)(),$n=(0,ae.useRef)(),_n=(0,ae.useRef)([]),mr=(0,ae.useRef)(!1),er=(0,ae.useRef)(),ur=(0,ae.useRef)(),nr=(0,ae.useRef)(!1),[In,rr]=(0,ae.useState)(!1);function cr(){let Vt;return kn.current&&(Vt=new gt.Z(at=>{for(let Qt of at)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&cn.current.instance.layout()}),Vt.observe(kn.current)),Vt}function Bn(){pt.ZP.warning({content:decodeURIComponent(Re),key:"monaco-editor-tip"})}const Xn=()=>{let Vt=cn.current.instance;if(Ne!=null&&Vt&&In){const at=Vt.getModel();at&&Ne!==at.getValue()&&(lt=!0,at.setValue(Ne),Vt.layout(),lt=!1)}};(0,ae.useEffect)(()=>{const Vt=_e.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=>{z(at)},Vt},[]),(0,ae.useEffect)(()=>{var Vt;let at=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{Xn()},500),Ne&&(Ne!=null&&Ne.length)&&((Vt=at==null?void 0:at.updateOptions)==null||Vt.call(at,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ne,In,cn.current]),(0,ae.useEffect)(()=>{if(yt&&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:yt||11,heightInLines:3,domNode:Cn})});var Vt={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(Vt),at.revealPositionInCenter({lineNumber:20,column:1})}},[yt,cn.current,In]);const Kn=(Vt="",at)=>{if(!Vt||Vt.trim()==="")return!0;const Cn=cn.current.instance.getModel().getLineTokens(at);let Gn=!1;for(let Te=0;Te<2;Te++)Cn.getStandardTokenType(Te)===1&&(Gn=!0);return Gn};(0,ae.useEffect)(()=>{var Vt;const at=(Vt=cn.current)==null?void 0:Vt.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,ae.useEffect)(()=>{var Vt;if((Vt=cn.current)!=null&&Vt.instance&&In&&_t){let at=cn.current.instance,Qt=at.getModel();if(!Qt)return;(()=>{var Zt;let qt=[],At=[];const xt=Qt.getAllDecorations();for(let vn of xt)vn.options.className==="highlighted-line"&&(qt.push((Zt=vn==null?void 0:vn.range)==null?void 0:Zt.startLineNumber),At.push(vn==null?void 0:vn.id));if(Ie===qt[0])return;Qt.deltaDecorations(At,[]);const en=Qt.getLineCount();Ie&&Ie<=en&&(at.deltaDecorations([],[{range:new Se.Range(Ie,1,Ie,Qt.getLineMaxColumn(Ie)),options:{isWholeLine:!0,className:"highlighted-line"}}]),at.revealLineInCenter(Ie))})();const Gn=(Zt=!1)=>{var qt;let At=[],xt=[];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),xt.push(vn==null?void 0:vn.id));if(Zt)return{lines:At,ids:xt};ne(At)},Te=Zt=>ue(void 0,null,function*(){let qt={range:new Se.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[qt]),Gn()}),Be=Zt=>ue(void 0,null,function*(){let qt=[];const At=at.getLineDecorations(Zt);for(let xt of At)xt.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(xt.id);yield Qt.deltaDecorations(qt,[]),Gn()}),Pt=Zt=>{let qt=at.getLineDecorations(Zt);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 Zt=ge.map(qt=>({range:new Se.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],Zt)}const Et=at.onDidChangeModelContent(Zt=>{let qt=at.getPosition();if(qt){let At=qt.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Kn(Qt.getLineContent(At),At)?Be(At):Pt(At)?(Be(At),Te(At)):Gn()},100)}}),Ze=at.onMouseDown(Zt=>{var qt,At,xt;if(Zt.target.detail&&((xt=(At=(qt=Zt.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&xt.includes("line-numbers"))){let en=Zt.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Pt(en)?Be(en):Te(en)}}),Dt=Zt=>{let qt={range:new Se.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};_n.current=at.deltaDecorations(_n.current,[qt])},Xt=()=>{_n.current=at.deltaDecorations(_n.current,[])},tn=at.onMouseMove(Zt=>{var qt,At,xt;if(Xt(),Zt.target.detail&&((xt=(At=(qt=Zt.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&xt.includes("line-numbers"))){let en=Zt.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Dt(en)}}),hn=at.onMouseLeave(()=>{Xt()});return()=>{Et.dispose(),Ze.dispose(),tn.dispose(),hn.dispose()}}},[cn.current,In,ge,Ie,_t,Ve]),(0,ae.useEffect)(()=>{var Vt;(Vt=cn.current)!=null&&Vt.instance&&_t&&cn.current.instance.setPosition({lineNumber:0,column:0})},[Ie]);function xr(){let Vt=cn.current.instance;if(Vt){const at=Vt.getSelection(),Qt=cn.current.pastePos||{},Cn=new Se.Range(Qt.startLineNumber||at.endLineNumber,Qt.startColumn||at.endColumn,Qt.endLineNumber||at.endLineNumber,Qt.endColumn||at.endColumn);setTimeout(()=>{Vt.executeEdits("",[{range:Cn,text:""}])},300)}}function Kt(Vt){(window.navigator.platform.match("Mac")?Vt.metaKey:Vt.ctrlKey)&&Vt.keyCode==83&&(Vt.preventDefault(),Ot())}const pn=()=>{if(se&&cn.current.instance){const Vt=cn.current.instance.getContentHeight();Rn(Vt{if(!nr.current)return;const{keyCode:at,ctrlKey:Qt,metaKey:Cn,target:Gn,type:Te}=Vt;return(Te==="paste"||(at===67||at===86)&&(Cn||Qt))&&Gn.nodeName==="TEXTAREA"&&(Bn(),Vt.preventDefault()),!1};function Jn(Vt,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=Vt,En(Gn)}(0,ae.useEffect)(()=>{pn()},[pn]),(0,ae.useEffect)(()=>{kn.current&&!In&&Promise.all([fe.e(8909),fe.e(4474)]).then(fe.bind(fe,71448)).then(Vt=>{try{Se=Vt,cn.current.instance=Se.editor.create(kn.current,{value:Ne,language:Je(Ve),theme:mt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:It||!1}},We);const at=cn.current.instance;let Gn=[...ft.BH._menuItems].find(Et=>Et[0]._debugName=="EditorContext")[1],Te=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Be=(Et,Ze)=>{var Dt,Xt;let tn=Et._first;do Ze.includes((Xt=(Dt=tn.element)==null?void 0:Dt.command)==null?void 0:Xt.id)&&Et._remove(tn);while(tn=tn.next)};if(ie(at,Se),setTimeout(()=>{pn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(ht||"educoder.txt",at.getValue())}})},500),cn.current.subscription=at.onDidChangeModelContent(Et=>{mr.current?clearTimeout(er.current):(pn(),z(at.getValue(),Et)),er.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||je(Se,Je(Ve)),te&&(Be(Gn,Te),kn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",An),window.removeEventListener("paste",An),window.addEventListener("keydown",An),window.addEventListener("paste",An)),window.Monaco=Se,ct&&at.onDidBlurEditorWidget(()=>{ct(at.getValue())}),ce&&at.onDidFocusEditorText(()=>{te&&rt(),ce(at.getValue())}),te){rt();try{at.onDidPaste(Et=>{const Ze=at.getSelection(),Dt=cn.current.pastePos||{},Xt=new Se.Range(Dt.startLineNumber||Ze.endLineNumber,Dt.startColumn||Ze.endColumn,Dt.endLineNumber||Ze.endLineNumber,Dt.endColumn||Ze.endColumn);at.executeEdits("",[{range:Et.range,text:""}])})}catch(Et){}}let Pt=cr();return Ft&&typeof Ft=="string"&&new bt(Ft,at,Se),rr(!0),()=>{const Et=cn.current.instance;Et.dispose();const Ze=Et.getModel();Ze&&Ze.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Pt.unobserve(kn.current)}}catch(at){}})},[]),(0,ae.useEffect)(()=>{if(cn.current.instance&&In)return document.addEventListener("keydown",Kt,!1),()=>{document.removeEventListener("keydown",Kt)}},[Ot,In]),(0,ae.useEffect)(()=>{let Vt=cn.current.instance;if(Vt&&In){let at=Je(Ve);Se.editor.setModelLanguage(Vt.getModel(),at)}},[Ve,In]),(0,ae.useEffect)(()=>{cn.current.instance&&In&&Se.editor.setTheme(mt)},[mt,In]),(0,ae.useEffect)(()=>{let Vt=cn.current.instance;wn.current=it,Vt&&In&&(Vt.updateOptions(Tt({},it)),setTimeout(()=>{Vt.getModel().updateOptions(Tt({},it))},200))},[JSON.stringify(it),In]),(0,ae.useEffect)(()=>{let Vt=cn.current.instance;Vt&&In&&Vt.layout()},[qe,we,In]);const[tr,dr]=(0,ae.useState)(Ge(qe)),[Zn,Rn]=(0,ae.useState)(Ge(we)),hr=vt(Tt({},et),{width:tr,height:Zn,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:kn,style:hr,onFocus:()=>{te&&rt()}},jt&&ae.createElement(tt.CopyToClipboard,{text:Ne,onCopy:()=>pt.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(dt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ae.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ae.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function xe({width:ve="100%",height:Ee="100%",original:qe,modified:we,language:Ne,options:Ve={}}){const et=(0,ae.useRef)(),[it,We]=(0,ae.useState)(null);function mt(se){let te;return et.current&&(te=new gt.Z(z=>{for(let ie of z)(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&se.layout()}),te.observe(et.current)),te}(0,ae.useEffect)(()=>(et.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(se=>{Se=se;const te=Se.editor.createDiffEditor(et.current,vt(Tt({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},Ve),{wordWrap:!0}));We(te);let z=mt(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),z.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{it&&it.setModel({original:Se.editor.createModel(qe,Ne),modified:Se.editor.createModel(we,Ne)})},[qe,we,Ne,it]);const ct=Ge(ve),jt=Ge(Ee),Ot={width:ct,height:jt};return ae.createElement("div",{className:"my-diff-editor",ref:et,style:Ot})}},61904:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return gt}});var ae=fe(59301);function gt(He,ze){const me=(0,ae.useRef)();(0,ae.useEffect)(()=>{me.current=He}),(0,ae.useEffect)(()=>{function Xe(){me.current()}if(ze!==null){let Le=setInterval(Xe,ze);return()=>clearInterval(Le)}},[ze])}},35375:function(Nt,Ht,fe){"use strict";fe.r(Ht),fe.d(Ht,{default:function(){return Je}});var ae=fe(59301),gt=fe(29787),He=fe(74947),ze=fe(58106),me=fe(62673),Xe=fe(14566),Le=fe(28284),Ke=fe(6767),ke=fe(62957),de=fe(37568),Ae=fe(7939),ye=fe(61481),ut=fe(26869),je=fe(77834),Re=Object.defineProperty,Oe=Object.defineProperties,De=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,bt=(Se,rt,Ue)=>rt in Se?Re(Se,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Se[rt]=Ue,ft=(Se,rt)=>{for(var Ue in rt||(rt={}))st.call(rt,Ue)&&bt(Se,Ue,rt[Ue]);if(ot)for(var Ue of ot(rt))St.call(rt,Ue)&&bt(Se,Ue,rt[Ue]);return Se},pt=(Se,rt)=>Oe(Se,De(rt)),dt=(Se,rt)=>{var Ue={};for(var xe in Se)st.call(Se,xe)&&rt.indexOf(xe)<0&&(Ue[xe]=Se[xe]);if(Se!=null&&ot)for(var xe of ot(Se))rt.indexOf(xe)<0&&St.call(Se,xe)&&(Ue[xe]=Se[xe]);return Ue};const $t=me.default.Group,{Dragger:_e}=Xe.default;function tt(Se,rt){const Ue=new FileReader;Ue.addEventListener("load",()=>rt(Ue.result)),Ue.readAsDataURL(Se)}var Lt=({callback:Se,tags:rt=[],initialValues:Ue={},removeAttachment:xe})=>{const[ve,Ee]=(0,ae.useState)(""),[qe]=Le.default.useForm();function we(We){const mt=We,{cover_id:ct,attachment_ids:jt}=mt,Ot=dt(mt,["cover_id","attachment_ids"]);Se(pt(ft({},Ot),{cover_id:ct==null?void 0:ct.map(se=>se.response?se.response.id:se.uid)[(ct==null?void 0:ct.length)-1],attachment_ids:jt?jt==null?void 0:jt.map(se=>se.response?se.response.id:se.uid):[]}))}function Ne(We){return Array.isArray(We)?We:We&&We.fileList}const Ve={multiple:!0,beforeUpload:We=>{const mt=We.size/1024/1024<100;if(!mt)return Ke.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),mt},action:`${ut.Z.API_SERVER}/api/attachments.json`,onRemove:We=>{ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:()=>xe(We.response?We.response.id:We.uid),onCancel:()=>!1})}};function et(We){We.file.status==="done"&&tt(We.file.originFileObj,mt=>Ee(mt))}const it={showUploadList:!1,withCredentials:!0,action:`${ut.Z.API_SERVER}/api/attachments.json`,onChange:et};return(0,ae.useEffect)(()=>{Ue.title&&(qe.setFieldsValue(Ue),Ue.cover_id.length>0&&Ee(ut.Z.IMG_SERVER+Ue.cover_id[0].url))},[Ue]),ae.createElement(Le.default,{form:qe,initialValues:Ue,className:"moop-panel",style:{marginBottom:20},onFinish:we},ae.createElement(Le.default.Item,{label:"\u6807\u9898",name:"title",extra:ae.createElement("div",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},ae.createElement(de.default,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),ae.createElement("div",{className:"flex-container"},ae.createElement(Le.default.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},ae.createElement(de.default,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),ae.createElement(Le.default.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},ae.createElement(de.default,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),ae.createElement(Le.default.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},ae.createElement($t,null,rt.map(We=>ae.createElement(me.default,{key:We.id,value:We.id}," ",We.name," ")))),ae.createElement(Le.default.Item,{name:"publish",valuePropName:"checked"},ae.createElement(me.default,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),ae.createElement(Le.default.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ae.createElement(je.Z,{id:"moop_cases_content",height:400})),ae.createElement(Le.default.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:Ne},ae.createElement(_e,ft({},Ve),ae.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),ae.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),ae.createElement(Le.default.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:Ne,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},ae.createElement(Xe.default,ft({},it),ve?ae.createElement("img",{src:ve,width:120}):ae.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",ae.createElement(ye.Z,null)," "))),ae.createElement("div",{className:"desc"},ae.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),ae.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),ae.createElement("div",{className:"desc"},ae.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),ae.createElement("ul",{style:{padding:0}},ae.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),ae.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",ae.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",ae.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),ae.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),ae.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),ae.createElement(Le.default.Item,{style:{marginTop:10}},ae.createElement(Ae.ZP,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},Fe=fe(91554),Qe=Object.defineProperty,Pe=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,vt=(Se,rt,Ue)=>rt in Se?Qe(Se,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Se[rt]=Ue,pe=(Se,rt)=>{for(var Ue in rt||(rt={}))kt.call(rt,Ue)&&vt(Se,Ue,rt[Ue]);if(zt)for(var Ue of zt(rt))Tt.call(rt,Ue)&&vt(Se,Ue,rt[Ue]);return Se},ue=(Se,rt)=>Pe(Se,Ye(rt)),Ge=(Se,rt,Ue)=>new Promise((xe,ve)=>{var Ee=Ne=>{try{we(Ue.next(Ne))}catch(Ve){ve(Ve)}},qe=Ne=>{try{we(Ue.throw(Ne))}catch(Ve){ve(Ve)}},we=Ne=>Ne.done?xe(Ne.value):Promise.resolve(Ne.value).then(Ee,qe);we((Ue=Ue.apply(Se,rt)).next())});const wt={loading:!1,data:{},tags:[]};var lt=(Se=>(Se[Se.GET_DATA=0]="GET_DATA",Se[Se.SET_LOADING=1]="SET_LOADING",Se[Se.GET_TAGS=2]="GET_TAGS",Se))(lt||{});function Ce(Se,rt){switch(rt.type){case 0:return pe(pe({},Se),rt.payload);case 2:return ue(pe({},Se),{tags:rt.payload});case 1:return ue(pe({},Se),{loading:rt.payload});default:throw new Error}}var Je=()=>{const{caseId:Se}=(0,ze.useParams)(),[rt,Ue]=(0,ae.useReducer)(Ce,wt),{loading:xe,tags:ve,data:Ee}=rt;(0,ae.useEffect)(()=>{function Ne(){return Ge(this,null,function*(){const Ve=yield(0,Fe.rO)();Ue({type:2,payload:Ve.library_tags})})}Ne()},[]),(0,ae.useEffect)(()=>{let Ne=!1;function Ve(){return Ge(this,null,function*(){Ue({type:1,payload:!1});let et=yield(0,Fe.$J)(Se);const{author_name:it,author_school_name:We,content:mt,cover:ct,attachments:jt,status:Ot,title:se,tags:te}=et;Ne||(et.status===404?ze.history.push("/moop_cases"):Ue({type:0,payload:{data:{title:se,author_name:it,author_school_name:We,content:mt,tag_ids:te.map(z=>z.id),publish:Ot==="published",attachment_ids:jt.map(z=>({uid:z.id,id:z.id,name:z.title,url:z.url,filesize:z.filesize,status:"done"})),cover_id:ct!=null&&ct.id?[{uid:ct==null?void 0:ct.id,id:ct==null?void 0:ct.id,name:ct==null?void 0:ct.title,url:ct==null?void 0:ct.url,filesize:ct==null?void 0:ct.filesize,status:"done"}]:[]},loading:!1}}))})}return!Ne&&Se&&Ve(),()=>{Ne=!0}},[Se]);function qe(Ne){return Ge(this,null,function*(){if(Se)yield(0,Fe.bN)(Se,Ne),ze.history.push(`/moop_cases/${Se}/publish-success`);else{const{id:Ve}=yield(0,Fe.jP)(Ne);Ve&&ze.history.push(`/moop_cases/${Ve}/publish-success`)}})}const we={initialValues:Ee,tags:ve,removeAttachment:Fe.JZ,callback:qe};return ae.createElement(gt.Z,{spinning:xe,delay:500},ae.createElement("div",{className:"moop-info"},ae.createElement("div",{className:"crumb"},ae.createElement(ze.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),ae.createElement("span",null,"\u65B0\u5EFA")),ae.createElement("div",{className:"title"},ae.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),ae.createElement(ze.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),ae.createElement(Lt,pe({},we))))}},91554:function(Nt,Ht,fe){"use strict";fe.d(Ht,{$J:function(){return He},JZ:function(){return me},bN:function(){return Le},jP:function(){return Xe},rO:function(){return ze}});var ae=fe(97013),gt=(Ke,ke,de)=>new Promise((Ae,ye)=>{var ut=Oe=>{try{Re(de.next(Oe))}catch(De){ye(De)}},je=Oe=>{try{Re(de.throw(Oe))}catch(De){ye(De)}},Re=Oe=>Oe.done?Ae(Oe.value):Promise.resolve(Oe.value).then(ut,je);Re((de=de.apply(Ke,ke)).next())});function He(Ke){return(0,ae.U2)(`libraries/${Ke}.json`)}function ze(){return(0,ae.U2)("library_tags.json")}function me(Ke){return gt(this,null,function*(){return(yield(0,ae.IV)(`attachments/${Ke}.json`)).status===0})}function Xe(Ke){return(0,ae.v_)("libraries.json",Ke)}function Le(Ke,ke){return(0,ae.gz)(`libraries/${Ke}.json`,ke)}},58489:function(Nt,Ht,fe){"use strict";fe.d(Ht,{AL:function(){return bt},Iy:function(){return Ae},Qv:function(){return je},ez:function(){return St},jb:function(){return ye}});var ae=fe(32834),gt=fe.n(ae),He=fe(11690),ze=fe.n(He);let me=1;function Xe(_e,tt){const Lt=_e.match(/^(\s+)(?:```)/);if(Lt===null)return tt;const Fe=Lt[1];return tt.split(` `).map(Qe=>{const Pe=Qe.match(/^\s+/);if(Pe===null)return Qe;const[Ye]=Pe;return Ye.length>=Fe.length?Qe.slice(Fe.length):Qe}).join(` `)}let Le=[],Ke=["
    "];const ke=new(gt()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ae(){Le.length=0,Ke=["
      "]}const ye={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ut(_e,tt,Lt,Fe){if(tt>=_e.length||_e[tt].level<=Lt)return tt;var Qe=_e[tt];Fe.push("
    • "+Qe.text+""),tt++;var Pe=[];return tt=ut(_e,tt,Qe.level,Pe),Pe.length>0&&(Fe.push("
        "),Pe.forEach(function(Ye){Fe.push(Ye)}),Fe.push("
      ")),Fe.push("
    • "),tt=ut(_e,tt,Lt,Fe),tt}function je(){return ut(Le,0,0,Ke),Ke.push("
    "),Ke.join("")}const Re={heading(_e){const tt=de.exec(_e);if(me+=1,tt)return{type:"heading",raw:tt[0],depth:tt[1].length,text:tt[2]}},fences(_e){const tt=this.rules.block.fences.exec(_e);if(tt){const Lt=tt[0];let Fe=Xe(Lt,tt[3]||"");const Qe=tt[2]?tt[2].trim():tt[2];if(["latex","katex","math"].indexOf(Qe)>=0){const Pe=ot(),Ye=Fe;Fe=Pe,st[Pe]={type:"block",expression:Ye}}return{type:"code",raw:Lt,lang:Qe,text:Fe}}}},Oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const ot=()=>`__special_katext_id_${De++}__`;let st={};function St(){return st}function bt(){De=0,st={}}function ft(_e){return _e=_e.replace(Oe,(tt,Lt)=>{const Fe=ot();return st[Fe]={type:"inline",expression:Lt},Fe}),_e}const pt=ke.listitem;ke.listitem=function(_e){return pt(ft(_e))};const dt=ke.paragraph;ke.paragraph=function(_e){return dt(ft(_e))};const $t=ke.tablecell;ke.tablecell=function(_e,tt){return $t(ft(_e),tt)},ke.code=function(_e,tt,Lt){const Fe=(tt||"").match(/\S*/)[0];return Fe?["latex","katex","math"].indexOf(Fe)>=0?`

    ${_e}

    `:`
    ${Lt?_e:(0,He.escape)(_e,!0)}
    `:'
    '+(Lt?_e:(0,He.escape)(_e,!0))+"
    "},ke.heading=function(_e,tt,Lt){let Fe=this.options.headerPrefix+Lt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Le.push({anchor:Fe,level:tt,text:_e}),"'+_e+""},gt().setOptions({silent:!0,gfm:!0,pedantic:!1}),gt().use({tokenizer:Re,renderer:ke}),Ht.ZP=gt()},99498:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){ae.defineOption("placeholder","",function(Ke,ke,de){var Ae=de&&de!=ae.Init;if(ke&&!Ae)Ke.on("blur",me),Ke.on("change",Xe),Ke.on("swapDoc",Xe),ae.on(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose=function(){ze(Ke)}),Xe(Ke);else if(!ke&&Ae){Ke.off("blur",me),Ke.off("change",Xe),Ke.off("swapDoc",Xe),ae.off(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose),gt(Ke);var ye=Ke.getWrapperElement();ye.className=ye.className.replace(" CodeMirror-empty","")}ke&&!Ke.hasFocus()&&me(Ke)});function gt(Ke){Ke.state.placeholder&&(Ke.state.placeholder.parentNode.removeChild(Ke.state.placeholder),Ke.state.placeholder=null)}function He(Ke){gt(Ke);var ke=Ke.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=Ke.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var de=Ke.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),ke.appendChild(de),Ke.display.lineSpace.insertBefore(ke,Ke.display.lineSpace.firstChild)}function ze(Ke){setTimeout(function(){var ke=!1,de=Ke.getInputField();de.nodeName=="TEXTAREA"?ke=!de.value:Ke.lineCount()==1&&(ke=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),ke?He(Ke):gt(Ke)},20)}function me(Ke){Le(Ke)&&He(Ke)}function Xe(Ke){var ke=Ke.getWrapperElement(),de=Le(Ke);ke.className=ke.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?He(Ke):gt(Ke)}function Le(Ke){return Ke.lineCount()===1&&Ke.getLine(0)===""}})},25717:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){var gt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},He=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(Re,Oe,De){De&&De!=ae.Init&&(Re.removeKeyMap(me),Re.state.closeBrackets=null),Oe&&(Xe(ze(Oe,"pairs")),Re.state.closeBrackets=Oe,Re.addKeyMap(me))});function ze(Re,Oe){return Oe=="pairs"&&typeof Re=="string"?Re:typeof Re=="object"&&Re[Oe]!=null?Re[Oe]:gt[Oe]}var me={Backspace:ke,Enter:de};function Xe(Re){for(var Oe=0;Oe=0;st--){var bt=ot[st].head;Re.replaceRange("",He(bt.line,bt.ch-1),He(bt.line,bt.ch+1),"+delete")}}function de(Re){var Oe=Ke(Re),De=Oe&&ze(Oe,"explode");if(!De||Re.getOption("disableInput"))return ae.Pass;for(var ot=Re.listSelections(),st=0;st0;return{anchor:new He(Re.anchor.line,Re.anchor.ch+(Oe?-1:1)),head:new He(Re.head.line,Re.head.ch+(Oe?1:-1))}}function ye(Re,Oe){var De=Ke(Re);if(!De||Re.getOption("disableInput"))return ae.Pass;var ot=ze(De,"pairs"),st=ot.indexOf(Oe);if(st==-1)return ae.Pass;for(var St=ze(De,"closeBefore"),bt=ze(De,"triples"),ft=ot.charAt(st+1)==Oe,pt=Re.listSelections(),dt=st%2==0,$t,_e=0;_e=0&&Re.getRange(Lt,He(Lt.line,Lt.ch+3))==Oe+Oe+Oe?Fe="skipThree":Fe="skip";else if(ft&&Lt.ch>1&&bt.indexOf(Oe)>=0&&Re.getRange(He(Lt.line,Lt.ch-2),Lt)==Oe+Oe){if(Lt.ch>2&&/\bstring/.test(Re.getTokenTypeAt(He(Lt.line,Lt.ch-2))))return ae.Pass;Fe="addFour"}else if(ft){var Pe=Lt.ch==0?" ":Re.getRange(He(Lt.line,Lt.ch-1),Lt);if(!ae.isWordChar(Qe)&&Pe!=Oe&&!ae.isWordChar(Pe))Fe="both";else return ae.Pass}else if(dt&&(Qe.length===0||/\s/.test(Qe)||St.indexOf(Qe)>-1))Fe="both";else return ae.Pass;if(!$t)$t=Fe;else if($t!=Fe)return ae.Pass}var Ye=st%2?ot.charAt(st-1):Oe,zt=st%2?Oe:ot.charAt(st+1);Re.operation(function(){if($t=="skip")Re.execCommand("goCharRight");else if($t=="skipThree")for(var kt=0;kt<3;kt++)Re.execCommand("goCharRight");else if($t=="surround"){for(var Tt=Re.getSelections(),kt=0;kt'"]=function(ut){return ze(ut)}),ke.addKeyMap(ye)}});var gt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],He=["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 ze(ke){if(ke.getOption("disableInput"))return ae.Pass;for(var de=ke.listSelections(),Ae=[],ye=ke.getOption("autoCloseTags"),ut=0;utje.ch&&(st=st.slice(0,st.length-Re.end+je.ch));var pt=st.toLowerCase();if(!st||Re.type=="string"&&(Re.end!=je.ch||!/[\"\']/.test(Re.string.charAt(Re.string.length-1))||Re.string.length==1)||Re.type=="tag"&&ot.close||Re.string.indexOf("/")==je.ch-Re.start-1||bt&&Le(bt,pt)>-1||Ke(ke,Oe.mode.xmlCurrentContext&&Oe.mode.xmlCurrentContext(De)||[],st,je,!0))return ae.Pass;var dt=typeof ye=="object"&&ye.emptyTags;if(dt&&Le(dt,st)>-1){Ae[ut]={text:"/>",newPos:ae.Pos(je.line,je.ch+2)};continue}var $t=ft&&Le(ft,pt)>-1;Ae[ut]={indent:$t,text:">"+($t?` `:"")+"",newPos:$t?ae.Pos(je.line+1,0):ae.Pos(je.line,je.ch+1)}}for(var _e=typeof ye=="object"&&ye.dontIndentOnAutoClose,ut=de.length-1;ut>=0;ut--){var tt=Ae[ut];ke.replaceRange(tt.text,de[ut].head,de[ut].anchor,"+insert");var Lt=ke.listSelections().slice(0);Lt[ut]={head:tt.newPos,anchor:tt.newPos},ke.setSelections(Lt),!_e&&tt.indent&&(ke.indentLine(tt.newPos.line,null,!0),ke.indentLine(tt.newPos.line+1,null,!0))}}function me(ke,de){for(var Ae=ke.listSelections(),ye=[],ut=de?"/":""&&(bt+=">"),ye[Oe]=bt}if(ke.replaceSelections(ye),Ae=ke.listSelections(),!Re)for(var Oe=0;Oe=0&&de[De]==Ae;De--)++Oe;ye=Re.to;for(var De=1;De=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function de(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function Ae(De){for(;;){var ot=De.text.indexOf(">",De.ch);if(ot==-1){if(ke(De))continue;return}if(!Ke(De,ot+1)){De.ch=ot+1;continue}var st=De.text.lastIndexOf("/",ot),St=st>-1&&!/\S/.test(De.text.slice(st+1,ot));return De.ch=ot+1,St?"selfClose":"regular"}}function ye(De){for(;;){var ot=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if(ot==-1){if(de(De))continue;return}if(!Ke(De,ot+1)){De.ch=ot;continue}Xe.lastIndex=ot,De.ch=ot;var st=Xe.exec(De.text);if(st&&st.index==ot)return st}}function ut(De){for(;;){Xe.lastIndex=De.ch;var ot=Xe.exec(De.text);if(!ot){if(ke(De))continue;return}if(!Ke(De,ot.index+1)){De.ch=ot.index+1;continue}return De.ch=ot.index+ot[0].length,ot}}function je(De){for(;;){var ot=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if(ot==-1){if(de(De))continue;return}if(!Ke(De,ot+1)){De.ch=ot;continue}var st=De.text.lastIndexOf("/",ot),St=st>-1&&!/\S/.test(De.text.slice(st+1,ot));return De.ch=ot+1,St?"selfClose":"regular"}}function Re(De,ot){for(var st=[];;){var St=ut(De),bt,ft=De.line,pt=De.ch-(St?St[0].length:0);if(!St||!(bt=Ae(De)))return;if(bt!="selfClose")if(St[1]){for(var dt=st.length-1;dt>=0;--dt)if(st[dt]==St[2]){st.length=dt;break}if(dt<0&&(!ot||ot==St[2]))return{tag:St[2],from:gt(ft,pt),to:gt(De.line,De.ch)}}else st.push(St[2])}}function Oe(De,ot){for(var st=[];;){var St=je(De);if(!St)return;if(St=="selfClose"){ye(De);continue}var bt=De.line,ft=De.ch,pt=ye(De);if(!pt)return;if(pt[1])st.push(pt[2]);else{for(var dt=st.length-1;dt>=0;--dt)if(st[dt]==pt[2]){st.length=dt;break}if(dt<0&&(!ot||ot==pt[2]))return{tag:pt[2],from:gt(De.line,De.ch),to:gt(bt,ft)}}}}ae.registerHelper("fold","xml",function(De,ot){for(var st=new Le(De,ot.line,0);;){var St=ut(st);if(!St||st.line!=ot.line)return;var bt=Ae(st);if(!bt)return;if(!St[1]&&bt!="selfClose"){var ft=gt(st.line,st.ch),pt=Re(st,St[2]);return pt&&He(pt.from,ft)>0?{from:ft,to:pt.from}:null}}}),ae.findMatchingTag=function(De,ot,st){var St=new Le(De,ot.line,ot.ch,st);if(!(St.text.indexOf(">")==-1&&St.text.indexOf("<")==-1)){var bt=Ae(St),ft=bt&>(St.line,St.ch),pt=bt&&ye(St);if(!(!bt||!pt||He(St,ot)>0)){var dt={from:gt(St.line,St.ch),to:ft,tag:pt[2]};return bt=="selfClose"?{open:dt,close:null,at:"open"}:pt[1]?{open:Oe(St,pt[2]),close:dt,at:"close"}:(St=new Le(De,ft.line,ft.ch,st),{open:dt,close:Re(St,pt[2]),at:"open"})}}},ae.findEnclosingTag=function(De,ot,st,St){for(var bt=new Le(De,ot.line,ot.ch,st);;){var ft=Oe(bt,St);if(!ft)break;var pt=new Le(De,ot.line,ot.ch,st),dt=Re(pt,ft.tag);if(dt)return{open:ft,close:dt}}},ae.scanForClosingTag=function(De,ot,st,St){var bt=new Le(De,ot.line,ot.ch,St?{from:0,to:St}:null);return Re(bt,st)}})},89780:function(Nt){(function(Ht,fe){Nt.exports=fe()})(this,function(){"use strict";var Ht=navigator.userAgent,fe=navigator.platform,ae=/gecko\/\d/i.test(Ht),gt=/MSIE \d/.test(Ht),He=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ht),ze=/Edge\/(\d+)/.exec(Ht),me=gt||He||ze,Xe=me&&(gt?document.documentMode||6:+(ze||He)[1]),Le=!ze&&/WebKit\//.test(Ht),Ke=Le&&/Qt\/\d+\.\d+/.test(Ht),ke=!ze&&/Chrome\//.test(Ht),de=/Opera\//.test(Ht),Ae=/Apple Computer/.test(navigator.vendor),ye=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ht),ut=/PhantomJS/.test(Ht),je=!ze&&/AppleWebKit/.test(Ht)&&/Mobile\/\w+/.test(Ht),Re=/Android/.test(Ht),Oe=je||Re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ht),De=je||/Mac/.test(fe),ot=/\bCrOS\b/.test(Ht),st=/win/i.test(fe),St=de&&Ht.match(/Version\/(\d*\.\d*)/);St&&(St=Number(St[1])),St&&St>=15&&(de=!1,Le=!0);var bt=De&&(Ke||de&&(St==null||St<12.11)),ft=ae||me&&Xe>=9;function pt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var dt=function(a,y){var x=a.className,b=pt(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 _e(a,y){return $t(a).appendChild(y)}function tt(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 ee=0;ee=y)return re+(y-ee);re+=oe-ee,re+=x-re%x,ee=oe+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=Tt(this.onTimeout,this)};ue.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ue.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+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var Ue=[""];function xe(a){for(;Ue.length<=a;)Ue.push(ve(Ue)+" ");return Ue[a]}function ve(a){return a[a.length-1]}function Ee(a,y){for(var x=[],b=0;b"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Ve.test(a))}function it(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function We(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var mt=/[\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 ct(a){return a.charCodeAt(0)>=768&&mt.test(a)}function jt(a,y,x){for(;(x<0?y>0:yx?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function se(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;eey||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var te=null;function z(a,y,x){var b;te=null;for(var E=0;Ey)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:te=E),ee.from==y&&(ee.from!=ee.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]/,ee=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function le(he,be,Me){this.level=he,this.from=be,this.to=Me}return function(he,be){var Me=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var nt=he.length,$e=[],Mt=0;Mt-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function Ct(a,y){var x=ht(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){yt(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 _n(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var mr=function(){if(me&&Xe<9)return!1;var a=tt("div");return"draggable"in a||"dragDrop"in a}(),er;function ur(a){if(er==null){var y=tt("span","\u200B");_e(a,tt("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(er=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&Xe<8))}var x=er?tt("span","\u200B"):tt("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=_e(a,document.createTextNode("A\u062EA")),x=Fe(y,0,1).getBoundingClientRect(),b=Fe(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 ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=ee.indexOf("\r");re!=-1?(x.push(ee.slice(0,re)),y+=re+1):(x.push(ee),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=tt("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=_e(a,tt("span","x")),x=y.getBoundingClientRect(),b=Fe(y,0,1).getBoundingClientRect();return Xn=Math.abs(x.left-b.left)>1}var xr={},Kt={};function pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),xr[a]=y}function En(a,y){Kt[a]=y}function An(a){if(typeof a=="string"&&Kt.hasOwnProperty(a))a=Kt[a];else if(a&&typeof a.name=="string"&&Kt.hasOwnProperty(a.name)){var y=Kt[a.name];typeof y=="string"&&(y={name:y}),a=Ne(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return An("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return An("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Jn(a,y){y=An(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 ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}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]={};vt(y,x)}function Zn(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 Rn(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 Vt=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};Vt.prototype.eol=function(){return this.pos>=this.string.length},Vt.prototype.sol=function(){return this.pos==this.lineStart},Vt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vt.prototype.next=function(){if(this.posy},Vt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Vt.prototype.skipToEnd=function(){this.pos=this.string.length},Vt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Vt.prototype.backUp=function(a){this.pos-=a},Vt.prototype.column=function(){return this.lastColumnPos0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},Vt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Vt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Vt.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],ee=E.chunkSize();if(y=a.first&&yx?Ze(x,at(a,x).text.length):xt(y,at(a,y.line).text.length)}function xt(a,y){var x=a.ch;return x==null||x>y?Ze(a.line,y):x<0?Ze(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,Zn(a.mode,y.state),x,y.lookAhead):new mn(a,Zn(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?Zn(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],ee={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},ee,b);for(var re=x.state,oe=function(he){x.baseTokens=E;var be=a.state.overlays[he],Me=1,nt=0;x.state=!0,Qn(a,y.text,be.mode,x,function($e,Mt){for(var Bt=Me;nt<$e;){var Jt=E[Me];Jt>$e&&E.splice(Me,1,$e,E[Me+1],Jt),Me+=2,nt=Math.min($e,Jt)}if(Mt)if(be.opaque)E.splice(Bt,Me-Bt,$e,"overlay "+Mt),Me=Bt+2;else for(;Bta.options.maxHighlightLength&&Zn(a.doc.mode,b.state),ee=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.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 ee=Lr(a,y,x),re=ee>b.first&&at(b,ee-1).stateAfter,oe=re?mn.fromSaved(b,re,ee):new mn(b,hr(b.mode),ee);return b.iter(ee,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 ee}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 Hn(a,y,x,b){var E=a.doc,ee=E.mode,re;y=At(E,y);var oe=at(E,y.line),le=Yn(a,y.line,x),he=new Vt(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,Me=null):Me=wr(gn(x,be,b.state,nt),ee),nt){var $e=nt[0].name;$e&&(Me="m-"+(Me?$e+" "+Me:$e))}if(!oe||he!=Me){for(;lere;--oe){if(oe<=ee.first)return ee.first;var le=at(ee,oe-1),he=le.stateAfter;if(he&&(!x||oe+(he instanceof vn?he.lookAhead:0)<=ee.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:ee.to>y);(b||(b=[])).push(new or(re,ee.from,le?null:ee.to))}}return b}function jn(a,y,x){var b;if(a)for(var E=0;E=y:ee.to>y);if(oe||ee.from==y&&re.type=="bookmark"&&(!x||ee.marker.insertLeft)){var le=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from0&&oe)for(var bn=0;bn0)){var be=[le,1],Me=Dt(he.from,oe.from),nt=Dt(he.to,oe.to);(Me<0||!re.inclusiveLeft&&!Me)&&be.push({from:he.from,to:oe.from}),(nt>0||!re.inclusiveRight&&!nt)&&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,ee.marker)<0)&&(b=ee.marker)}return b}function yn(a,y,x,b,E){var ee=at(a,y),re=ir&&ee.markedSpans;if(re)for(var oe=0;oe=0&&Me<=0||be<=0&&Me>=0)&&(be<=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Dt(he.to,x)>=0:Dt(he.to,x)>0)||be>=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Dt(he.from,b)<=0:Dt(he.from,b)<0)))return!0}}}function on(a){for(var y;y=Nn(a);)a=y.find(-1,!0).line;return a}function Dn(a){for(var y;y=Wt(a);)a=y.find(1,!0).line;return a}function ar(a){for(var y,x;y=Wt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Ut(a,y){var x=at(a,y),b=on(x);return x==b?y:Te(b)}function Rt(a,y){if(y>a.lastLine())return y;var x=at(a,y),b;if(!rn(a,x))return y;for(;b=Wt(x);)x=b.find(1,!0).line;return Te(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,Hr(this,y),this.height=x?x(this):1};yr.prototype.lineNo=function(){return Te(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),Hr(a,x);var E=b?b(a):1;E!=a.height&&Gn(a,E)}function Sr(a){a.parent=null,Dr(a)}var zr={},Tr={};function Wr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Tr:zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=Lt("span",null,null,Le?"padding-right: .1px":null),b={pre:Lt("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 ee=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Oi,In(a.display.measure)&&(re=ce(ee,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&Te(ee);fr(ee,b,Wn(a,ee,oe)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=zt(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=zt(ee.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(Le){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=zt(b.pre.className,b.textClass||"")),b}function Li(a){var y=tt("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,ee,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&&Xe<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var Me=0;;){le.lastIndex=Me;var nt=le.exec(y),$e=nt?nt.index-Me:y.length-Me;if($e){var Mt=document.createTextNode(oe.slice(Me,Me+$e));me&&Xe<9?be.appendChild(tt("span",[Mt])):be.appendChild(Mt),a.map.push(a.pos,a.pos+$e,Mt),a.col+=$e,a.pos+=$e}if(!nt)break;Me+=$e+1;var Bt=void 0;if(nt[0]==" "){var Jt=a.cm.options.tabSize,an=Jt-a.col%Jt;Bt=be.appendChild(tt("span",xe(an),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),a.col+=an}else nt[0]=="\r"||nt[0]==` `?(Bt=be.appendChild(tt("span",nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",nt[0]),a.col+=1):(Bt=a.cm.options.specialCharPlaceholder(nt[0]),Bt.setAttribute("cm-text",nt[0]),me&&Xe<9?be.appendChild(tt("span",[Bt])):be.appendChild(Bt),a.col+=1);a.map.push(a.pos,a.pos+1,Bt),a.pos++}}if(a.trailingSpace=oe.charCodeAt(y.length-1)==32,x||b||E||he||ee||re){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var sn=tt("span",[be],fn,ee);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&&Me.from<=he));nt++);if(Me.to>=be)return a(x,b,E,ee,re,oe,le);a(x,b.slice(0,Me.to-he),E,ee,null,oe,le),ee=null,b=b.slice(Me.to-he),he=Me.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,ee=0;if(!b){for(var re=1;rele||Un.collapsed&&Sn.to==le&&Sn.from==le)){if(Sn.to!=null&&Sn.to!=le&&$e>Sn.to&&($e=Sn.to,Bt=""),Un.className&&(Mt+=" "+Un.className),Un.css&&(nt=(nt?nt+";":"")+Un.css),Un.startStyle&&Sn.from==le&&(Jt+=" "+Un.startStyle),Un.endStyle&&Sn.to==$e&&(bn||(bn=[])).push(Un.endStyle,Sn.to),Un.title&&((fn||(fn={})).title=Un.title),Un.attributes)for(var Rr in Un.attributes)(fn||(fn={}))[Rr]=Un.attributes[Rr];Un.collapsed&&(!an||ii(an.marker,Un)<0)&&(an=Sn)}else Sn.from>le&&$e>Sn.from&&($e=Sn.from)}if(bn)for(var si=0;si=oe)break;for(var Bi=Math.min(oe,$e);;){if(be){var ki=le+be.length;if(!an){var qr=ki>Bi?be.slice(0,Bi-le):be;y.addToken(y,qr,Me?Me+Mt:Mt,Jt,le+qr.length==$e?Bt:"",nt,fn)}if(ki>=Bi){be=be.slice(Bi-le),le=Bi;break}le=ki,Jt=""}be=E.slice(ee,ee=x[he++]),Me=Wr(x[he++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=ar(y),this.size=this.rest?Te(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,ee=y;ee2&&ee.push((le.bottom+he.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function To(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=Te(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,_e(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)&&(ee=le-oe,E=ee-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),ee=E.node,re=E.start,oe=E.end,le=E.collapse,he;if(ee.nodeType==3){for(var be=0;be<4;be++){for(;re&&ct(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe0&&(le=b="right");var Me;a.options.lineWrapping&&(Me=ee.getClientRects()).length>1?he=Me[b=="right"?Me.length-1:0]:he=ee.getBoundingClientRect()}if(me&&Xe<9&&!re&&(!he||!he.left&&!he.right)){var nt=ee.parentNode.getClientRects()[0];nt?he={left:nt.left,right:nt.left+Ui(a.display),top:nt.top,bottom:nt.bottom}:he=ba}for(var $e=he.top-y.rect.top,Mt=he.bottom-y.rect.top,Bt=($e+Mt)/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(Mt,Bt,Jt){var an=oe[Bt],fn=an.level==1;return re(Jt?Mt-1:Mt,fn!=Jt)}var Me=z(oe,le,he),nt=te,$e=be(le,Me,he=="before");return nt!=null&&($e.other=be(le,nt,he!="before")),$e}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 ee=Ze(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}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=Be(b,x),ee=b.first+b.size-1;if(E>ee)return zn(b.first+b.size-1,at(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=at(b,E);;){var oe=Vi(a,re,E,y,x),le=Yt(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,ee=Ot(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=Ot(function(re){return zi(a,x,re).top>b},ee,E),{begin:ee,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 ee=uo(a,y),re=Jo(y),oe=0,le=y.text.length,he=!0,be=ce(y,a.doc.direction);if(be){var Me=(a.options.lineWrapping?ro:_i)(a,y,x,ee,be,b,E);he=Me.level!=1,oe=he?Me.from:Me.to-1,le=he?Me.to:Me.from-1}var nt=null,$e=null,Mt=Ot(function(Tn){var Sn=zi(a,ee,Tn);return Sn.top+=re,Sn.bottom+=re,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(nt=Tn,$e=Sn),!0):!1},oe,le),Bt,Jt,an=!1;if($e){var fn=b-$e.left<$e.right-b,sn=fn==he;Mt=nt+(sn?0:1),Jt=sn?"after":"before",Bt=fn?$e.left:$e.right}else{!he&&(Mt==le||Mt==oe)&&Mt++,Jt=Mt==0?"after":Mt==y.text.length?"before":zi(a,ee,Mt-(he?1:0)).bottom+re<=E==he?"after":"before";var bn=wi(a,Ze(x,Mt,Jt),"line",y,ee);Bt=bn.left,an=E=bn.bottom?1:0}return Mt=jt(y.text,Mt,1),zn(x,Mt,Jt,an,b-Bt)}function _i(a,y,x,b,E,ee,re){var oe=Ot(function(Me){var nt=E[Me],$e=nt.level!=1;return ni(wi(a,Ze(x,$e?nt.to:nt.from,$e?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),le=E[oe];if(oe>0){var he=le.level!=1,be=wi(a,Ze(x,he?le.from:le.to,he?"after":"before"),"line",y,b);ni(be,ee,re,!0)&&be.top>re&&(le=E[oe-1])}return le}function ro(a,y,x,b,E,ee,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,Me=null,nt=0;nt=he||$e.to<=le)){var Mt=$e.level!=1,Bt=zi(a,b,Mt?Math.min(he,$e.to)-1:Math.max(le,$e.from)).right,Jt=BtJt)&&(be=$e,Me=Jt)}}return be||(be=E[E.length-1]),be.fromhe&&(be={from:be.from,to:he,level:be.level}),be}var Ai;function Ti(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ai==null){Ai=tt("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ai.appendChild(document.createTextNode("x")),Ai.appendChild(tt("br"));Ai.appendChild(document.createTextNode("x"))}_e(a.measure,Ai);var x=Ai.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=tt("span","xxxxxxxxxx"),x=tt("pre",[y],"CodeMirror-line-like");_e(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,ee=y.gutters.firstChild,re=0;ee;ee=ee.nextSibling,++re){var oe=a.display.gutterSpecs[re].className;x[oe]=ee.offsetLeft+ee.clientLeft+E,b[oe]=ee.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=Ti(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 ee=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=Ze(le.line,Math.max(0,Math.round((ee-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&&Ut(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 ee=ka(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.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 ee=b.view[So(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);Ge(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),ee,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;ee=oe+re[E].size-y,E++}else ee=oe-y;y+=ee,x+=ee}for(;Ut(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 Hl(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()||Fo(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,Fo(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,Ye(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Le&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Fo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ct(a,"blur",a,y),a.state.focused=!1,dt(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 Me=0;Mea.display.sizerWidth){var nt=Math.ceil(oe/Ui(a.display));nt>a.display.maxLineLength&&(a.display.maxLineLength=nt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ls(a){if(a.widgets)for(var y=0;y=re&&(ee=Be(y,Mn(at(y,le))-a.wrapper.clientHeight),re=le)}return{from:ee,to:Math.max(re,ee+1)}}function _l(a,y){if(!Ie(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&&!ut){var ee=tt("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(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ze(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ze(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){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,Me=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-Me)>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=Ti(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=no(a),re={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var oe=a.doc.height+Hi(x),le=y.topoe-b;if(y.topE+ee){var be=Math.min(y.top,(he?oe:y.bottom)-ee);be!=E&&(re.scrollTop=be)}var Me=a.options.fixedGutter?0:x.gutters.offsetWidth,nt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Me,$e=qi(a)-x.gutters.offsetWidth,Mt=y.right-y.left>$e;return Mt&&(y.right=y.left+$e),y.left<10?re.scrollLeft=0:y.left$e+nt-3&&(re.scrollLeft=y.right+(Mt?0:10)-$e),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function No(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||(ae||es(a,{top:y}),As(a,y,!0),ae&&es(a),na(a,100))}function As(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,Ns(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+Hi(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=tt("div",[tt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=tt("div",[tt("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&&Xe<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 ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"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=De&&!ye?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ue,this.disableVert=new ue},Eo.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=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;Ts(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),Ts(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ts(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&&dt(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&&Ye(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 Aa(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(ee){if(b.line>=a.display.viewFrom){var re=ee.styles,oe=ee.text.length>a.options.maxHighlightLength?Zn(y.mode,b.state):null,le=xn(a,ee,b,!0);oe&&(b.state=oe),ee.styles=le.styles;var he=ee.styleClasses,be=le.classes;be?ee.styleClasses=be:he&&(ee.styleClasses=null);for(var Me=!re||re.length!=ee.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),nt=0;!Me&&ntx)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 ee=0;ee=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,ee=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&&(ee=Ut(a.doc,ee),re=Rt(a.doc,re));var oe=ee!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ee,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 Fs(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+Hi(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 Aa(a,y);if($a(a,x)){Da(a),Fs(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,ee=b.lineDiv,re=ee.firstChild;function oe(Mt){var Bt=Mt.nextSibling;return Le&&De&&a.display.currentWheelTarget==Mt?Mt.style.display="none":Mt.parentNode.removeChild(Mt),Bt}for(var le=b.view,he=b.viewFrom,be=0;be-1&&($e=!1),so(a,Me,he,x)),$e&&($t(Me.lineNumber),Me.lineNumber.appendChild(document.createTextNode(Et(a.options,he)))),re=Me.node.nextSibling}he+=Me.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 Ns(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,ee=b+"px",re=0;rere.clientWidth,le=re.scrollHeight>re.clientHeight;if(b&&oe||E&&le){if(E&&De&&Le){e:for(var he=y.target,be=ee.view;he!=re;he=he.parentNode)for(var Me=0;Me=0&&Dt(a,b.to())<=0)return x}return-1};var kr=function(a,y){this.anchor=a,this.head=y};kr.prototype.from=function(){return Zt(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(nt,$e){return Dt(nt.from(),$e.from())}),x=Ge(y,E);for(var ee=1;ee0:le>=0){var he=Zt(oe.from(),re.from()),be=hn(oe.to(),re.to()),Me=oe.empty()?re.from()==re.head:oe.from()==oe.head;ee<=x&&--x,y.splice(--ee,2,new kr(Me?be:he,Me?he:be))}}return new Ri(y,x)}function po(a,y){return new Ri([new kr(a,y||a)],0)}function vo(a){return a.text?Ze(a.from.line+a.text.length-1,ve(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(Dt(a,y.from)<0)return a;if(Dt(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),Ze(x,b)}function is(a,y){for(var x=[],b=0;b1&&a.remove(oe.line+1,Mt-1),a.insert(oe.line+1,an)}_r(a,"change",a,y)}function mo(a,y,x){function b(E,ee,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 ee=+new Date,re,oe;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=su(E,E.lastOp==b)))oe=ve(re.changes),Dt(y.from,y.to)==0&&Dt(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=ee,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,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||lu(a,ee,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,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],ee=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]={}))[ee]=re.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x-1&&(ve(oe)[Me]=he[Me],delete he[Me])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=Dt(y,E)<0;ee!=Dt(x,E)<0?(E=y,y=x):ee!=Dt(y,x)<0&&(y=x)}return new kr(E,y)}else return new kr(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(a,new Ri([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),ee=0;ee=y.ch:oe.to>y.ch))){if(E&&(Ct(le,"beforeCursorEnter"),le.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!le.atomic)continue;if(x){var Me=le.find(b<0?1:-1),nt=void 0;if((b<0?be:he)&&(Me=el(a,Me,-b,Me&&Me.line==y.line?ee:null)),Me&&Me.line==y.line&&(nt=Dt(Me,x))&&(b<0?nt<0:nt>0))return Oo(a,Me,y,b,E)}var $e=le.find(b<0?-1:1);return(b<0?he:be)&&($e=el(a,$e,b,$e.line==y.line?ee:null)),$e?Oo(a,$e,y,b,E):null}}return y}function Ia(a,y,x,b,E){var ee=b||1,re=Oo(a,y,x,ee,E)||!E&&Oo(a,y,x,ee,!0)||Oo(a,y,x,-ee,E)||!E&&Oo(a,y,x,-ee,!0);return re||(a.cantEdit=!0,Ze(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?At(a,Ze(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]==""&&Dt(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,ee){!ee&&Ge(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Br(E,y))})}}function Ra(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,re=a.sel,oe=y=="undo"?E.done:E.undone,le=y=="undo"?E.undone:E.done,he=0;he=0;--$e){var Mt=nt($e);if(Mt)return Mt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(Ee(a.sel.ranges,function(E){return new kr(Ze(E.anchor.line+y,E.anchor.ch),Ze(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.lineee&&(y={from:y.from,to:Ze(ee,at(a,ee).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),Na(a,x,Ce),a.cantEdit&&Ia(a,Ze(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,x){var b=a.doc,E=a.display,ee=y.from,re=y.to,oe=!1,le=ee.line;a.options.lineWrapping||(le=Te(on(at(b,ee.line))),b.iter(le,re.line+1,function($e){if($e==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&_t(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(le,ee.line+y.text.length,function($e){var Mt=sr($e);Mt>E.maxLineLength&&(E.maxLine=$e,E.maxLineLength=Mt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),Mr(b,ee.line),na(a,400);var he=y.text.length-(re.line-ee.line)-1;y.full?Ci(a):ee.line==re.line&&y.text.length==1&&!_s(a.doc,y)?ho(a,ee.line,"text"):Ci(a,ee.line,re.line+1,he);var be=Ft(a,"changes"),Me=Ft(a,"change");if(Me||be){var nt={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};Me&&_r(a,"change",a,nt),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(nt)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var ee;b||(b=x),Dt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Wo(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&&_r(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&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=Lt("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(yn(a,y.line,y,x,ee)||y.line!=x.line&&yn(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");gr()}ee.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(Me){le&&ee.collapsed&&!le.options.lineWrapping&&on(Me)==le.display.maxLine&&(he=!0),ee.collapsed&&oe!=y.line&&Gn(Me,0),pr(Me,new or(ee,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),ee.collapsed&&a.iter(y.line,x.line+1,function(Me){rn(a,Me)&&Gn(Me,0)}),ee.clearOnEnter&&ge(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Nr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++ul,ee.atomic=!0),le){if(he&&(le.curOp.updateMaxLine=!0),ee.collapsed)Ci(le,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var be=y.line;be<=x.line;be++)ho(le,be,"text");ee.atomic&&qs(le.doc),_r(le,"markerAdded",le,ee)}return ee}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x=0;le--)Wo(this,b[le]);oe?Js(this,oe):this.cm&&No(this.cm)}),undo:ai(function(){Ra(this,"undo")}),redo:ai(function(){Ra(this,"redo")}),undoSelection:ai(function(){Ra(this,"undo",!0)}),redoSelection:ai(function(){Ra(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(ee){var re=ee.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-=ee,++x}),At(this,Ze(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 Me;if(y.state.draggingText&&!y.state.draggingText.copy&&(Me=y.listSelections()),Na(y.doc,po(x,x)),Me)for(var nt=0;nt=0;oe--)Ho(a.doc,"",b[oe].from,b[oe].to,"+delete");No(a)})}function cs(a,y,x){var b=jt(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 Ze(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=ce(x,y.doc.direction);if(ee){var re=E<0?ve(ee):ee[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 Me=zi(y,be,he).top;he=Ot(function(nt){return zi(y,be,nt).top==Me},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 Ze(b,he,le)}}return new Ze(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=ce(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 ee=z(E,x.ch,x.sticky),re=E[ee];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from=re.from&&nt>=be.begin)){var $e=Me?"before":"after";return new Ze(x.line,nt,$e)}}var Mt=function(an,fn,sn){for(var bn=function(Rr,si){return si?new Ze(x.line,oe(Rr,1),"before"):new Ze(x.line,Rr,"after")};an>=0&&an0==(Tn.level!=1),Un=Sn?sn.begin:oe(sn.end,-1);if(Tn.from<=Un&&Un0?be.end:oe(be.begin,-1);return Jt!=null&&!(b>0&&Jt==y.text.length)&&(Bt=Mt(b>0?0:E.length-1,b,he(Jt)),Bt)?Bt:null}var da={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ce)},killLine:function(a){return Zo(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 Ze(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Ze(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 Ze(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Ze(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&&Dt(y,this.pos)==0&&x==this.button};var va,ma;function Nu(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(!(Ie(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Le||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=_n(a),ee=b?Nu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,ee,a))&&(E==1?b?Ou(y,b,ee,a):$n(a)==x.scroller&&un(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(ft?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ml(ee,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 Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=ot?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"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=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout(Tt(Es,a),0):a.curOp.focus=Pe();var E=Ru(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&mr&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(Dt((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(Dt(re.to(),y)>0||y.xRel<0)?Wu(a,b,y,E):Hu(a,b,y,E)}function Wu(a,y,x,b){var E=a.display,ee=!1,re=oi(a,function(he){Le&&(E.scroller.draggable=!1),a.state.draggingText=!1,yt(E.wrapper.ownerDocument,"mouseup",re),yt(E.wrapper.ownerDocument,"mousemove",oe),yt(E.scroller,"dragstart",le),yt(E.scroller,"drop",re),ee||(un(he),b.addNew||Fa(a.doc,x,null,null,b.extend),Le&&!Ae||me&&Xe==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),oe=function(he){ee=ee||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},le=function(){return ee=!0};Le&&(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(Ze(y.line,0),At(a.doc,Ze(y.line+1,0)));var b=x(a,y);return new kr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;un(y);var re,oe,le=ee.sel,he=le.ranges;if(b.addNew&&!b.extend?(oe=ee.sel.contains(x),oe>-1?re=he[oe]:re=new kr(x,x)):(re=ee.sel.primary(),oe=ee.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(ee,Ki(a,he.concat([re]),oe),{scroll:!1,origin:"*mouse"})):he.length>1&&he[oe].empty()&&b.unit=="char"&&!b.extend?(di(ee,Ki(a,he.slice(0,oe).concat(he.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),le=ee.sel):us(ee,oe,re,Je):(oe=0,di(ee,new Ri([re],0),Je),le=ee.sel);var Me=x;function nt(sn){if(Dt(Me,sn)!=0)if(Me=sn,b.unit=="rectangle"){for(var bn=[],Tn=a.options.tabSize,Sn=pe(at(ee,x.line).text,x.ch,Tn),Un=pe(at(ee,sn.line).text,sn.ch,Tn),Rr=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(ee,jr).text,qr=rt(ki,Rr,Tn);Rr==si?bn.push(new kr(Ze(jr,qr),Ze(jr,qr))):ki.length>qr&&bn.push(new kr(Ze(jr,qr),Ze(jr,rt(ki,si,Tn))))}bn.length||bn.push(new kr(x,x)),di(ee,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;Dt(hi.anchor,ri)>0?($r=hi.head,ri=Zt(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(ee,ri),$r)),di(ee,Ki(a,Ur,oe),Je)}}var $e=E.wrapper.getBoundingClientRect(),Mt=0;function Bt(sn){var bn=++Mt,Tn=Co(a,sn,!0,b.unit=="rectangle");if(Tn)if(Dt(Tn,Me)!=0){a.curOp.focus=Pe(),nt(Tn);var Sn=La(E,ee);(Tn.line>=Sn.to||Tn.line$e.bottom?20:0;Un&&setTimeout(oi(a,function(){Mt==bn&&(E.scroller.scrollTop+=Un,Bt(sn))}),50)}}function Jt(sn){a.state.selectingText=!1,Mt=1/0,sn&&(un(sn),E.input.focus()),yt(E.wrapper.ownerDocument,"mousemove",an),yt(E.wrapper.ownerDocument,"mouseup",fn),ee.history.lastSelOrigin=null}var an=oi(a,function(sn){sn.buttons===0||!_n(sn)?Jt(sn):Bt(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(Dt(x,b)==0&&x.sticky==b.sticky)return y;var ee=ce(E);if(!ee)return y;var re=z(ee,x.ch,x.sticky),oe=ee[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==ee.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=z(ee,b.ch,b.sticky),Me=be-re||(b.ch-x.ch)*(oe.level==1?-1:1);be==le-1||be==le?he=Me<0:he=Me>0}var nt=ee[le+(he?-1:0)],$e=he==(nt.level==1),Mt=$e?nt.from:nt.to,Bt=$e?"after":"before";return x.ch==Mt&&x.sticky==Bt?y:new kr(new Ze(x.line,Mt,Bt),b)}function Ll(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(nt){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(ee>oe.bottom||!Ft(a,x))return cn(y);ee-=oe.top-re.viewOffset;for(var le=0;le=E){var be=Be(a.doc,ee),Me=a.display.gutterSpecs[le];return Ct(a,x,a,be,Me.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||_u(a,y)||Ie(a,y,"contextmenu")||ft||a.display.input.onContextMenu(y)}function _u(a,y){return Ft(a,"gutterContextMenu")?Ll(a,y,"gutterContextMenu",!1):!1}function Al(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"}},Tl={},za={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,re){a.defaults[b]=E,ee&&(y[b]=re?function(oe,le,he){he!=Go&&ee(oe,le,he)}:ee)}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 ee=[],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,ee.push(Ze(re,be))}re++});for(var oe=ee.length-1;oe>=0;oe--)Ho(b.doc,E,ee[oe],Ze(ee[oe].line,ee[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,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=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",!st),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Al(b),ra(b)},!0),x("keyMap","default",function(b,E,ee){var re=Wa(E),oe=ee!=Go&&Wa(ee);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"&&(Fo(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,ee=y?ge:yt;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(Ye(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(dt(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?vt(y):{},vt(Tl,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),ee=this.display=new ru(a,b,E,y);ee.wrapper.CodeMirror=this,Al(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 ue,keySeq:null,specialChars:null},y.autofocus&&!Oe&&ee.input.focus(),me&&Xe<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Oe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Fo(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(!Ie(a,le)&&!ee(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"),Me;!he.prev||re(he,he.prev)?Me=new kr(be,be):!he.prev.prev||re(he,he.prev.prev)?Me=a.findWordAt(be):Me=new kr(Ze(be.line,0),At(a.doc,Ze(be.line+1,0))),a.setSelection(Me.anchor,Me.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 Ws(a,le)}),ge(y.scroller,"DOMMouseScroll",function(le){return Ws(a,le)}),ge(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(le){Ie(a,le)||wn(le)},over:function(le){Ie(a,le)||(wu(a,le),wn(le))},start:function(le){return xu(a,le)},drop:oi(a,bu),leave:function(le){Ie(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 Fo(a,le)})}var ms=[];Gr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=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(ee,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 Me="",nt=0;if(a.options.indentWithTabs)for(var $e=Math.floor(be/re);$e;--$e)nt+=re,Me+=" ";if(ntre,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;nt--){var $e=b.ranges[nt],Mt=$e.from(),Bt=$e.to();$e.empty()&&(x&&x>0?Mt=Ze(Mt.line,Mt.ch-x):a.state.overwrite&&!oe?Bt=Ze(Bt.line,Math.min(at(ee,Bt.line).text.length,Bt.ch+ve(le).length)):oe&&Yi&&Yi.lineWise&&Yi.text.join(` `)==le.join(` `)&&(Mt=Bt=Ze(Mt.line,0)));var Jt={from:Mt,to:Bt,text:he?he[nt%he.length]:le,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Wo(a.doc,Jt),_r(a,"inputRead",a,Jt)}y&&!oe&&Bl(a,y),No(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Me),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 ee=a.getModeAt(E.head),re=!1;if(ee.electricChars){for(var oe=0;oe-1){re=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(at(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&_r(a,"electricInput",a,E.head.line)}}}function Fl(a){for(var y=[],x=[],b=0;bee&&(ga(this,oe.head.line,b,!0),ee=oe.head.line,re==this.doc.sel.primIndex&&No(this));else{var le=oe.from(),he=oe.to(),be=Math.max(ee,le.line);ee=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Me=be;Me0&&us(this.doc,re,new kr(le,nt[re].to()),Ce)}}}),getTokenAt:function(b,E){return Hn(this,b,E)},getLineTokens:function(b,E){return Hn(this,Ze(b),E,!0)},getTokenTypeAt:function(b){b=At(this.doc,b);var E=Wn(this,at(this.doc,b.line)),ee=0,re=(E.length-1)/2,oe=b.ch,le;if(oe==0)le=E[2];else for(;;){var he=ee+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",ee||re).top+(re?this.doc.height-Mn(oe):0)},defaultTextHeight:function(){return Ti(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,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 Me=Math.max(le.wrapper.clientHeight,this.doc.height),nt=Math.max(le.sizer.clientWidth,le.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Me)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Me&&(he=b.bottom),be+E.offsetWidth>nt&&(be=nt-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"),ee&&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,ee,re){var oe=1;E<0&&(oe=-1,E=-E);for(var le=At(this.doc,b),he=0;he0&&be(ee.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(),Zs(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,_r(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,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,re){a.registerHelper(b,E,re),x[b]._global.push({pred:ee,val:re})}}function ys(a,y,x,b,E){var ee=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 Ze(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 Ze(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 Me=null,nt=b=="group",$e=a.cm&&a.cm.getHelper(y,"wordChars"),Mt=!0;!(x<0&&!be(!Mt));Mt=!1){var Bt=oe.text.charAt(y.ch)||` `,Jt=it(Bt,$e)?"w":nt&&Bt==` `?"n":!nt||/\s/.test(Bt)?null:"p";if(nt&&!Mt&&!Jt&&(Jt="s"),Me&&Me!=Jt){x<0&&(x=1,be(),y.sticky="after");break}if(Jt&&(Me=Jt),x>0&&!be(!Mt))break}var an=Ia(a,y,ee,re,!0);return Xt(ee,an)&&(an.hitSide=!0),an}function Rl(a,y,x,b){var E=a.doc,ee=y.left,re;if(b=="page"){var oe=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),le=Math.max(oe-.5*Ti(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,ee,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 ue,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;Nl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(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){!ee(oe)||Ie(b,oe)||Pl(oe,b)||Xe<=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(!(!ee(oe)||Ie(b,oe))){if(b.somethingSelected())_a({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var le=Fl(b);_a({lineWise:!0,text:le.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(le.ranges,0,Ce),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(),Me=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),Me.value=Yi.text.join(` `);var nt=document.activeElement;kt(Me),setTimeout(function(){b.display.lineSpace.removeChild(be),nt.focus(),nt==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=Ze(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 ee,re,oe;b.line==y.viewFrom||(ee=So(a,b.line))==0?(re=Te(y.view[0].line),oe=y.view[0].node):(re=Te(y.view[ee].line),oe=y.view[ee-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=Te(y.view[le+1].line)-1,be=y.view[le+1].node.previousSibling),!oe)return!1;for(var Me=a.doc.splitLines(Yu(a,oe,be,re,he)),nt=Qt(a.doc,Ze(re,0),Ze(he,at(a.doc,he).text.length));Me.length>1&&nt.length>1;)if(ve(Me)==ve(nt))Me.pop(),nt.pop(),he--;else if(Me[0]==nt[0])Me.shift(),nt.shift(),re++;else break;for(var $e=0,Mt=0,Bt=Me[0],Jt=nt[0],an=Math.min(Bt.length,Jt.length);$eb.ch&&fn.charCodeAt(fn.length-Mt-1)==sn.charCodeAt(sn.length-Mt-1);)$e--,Mt++;Me[Me.length-1]=fn.slice(0,fn.length-Mt).replace(/^\u200b+/,""),Me[0]=Me[0].slice($e).replace(/\u200b+$/,"");var Tn=Ze(re,$e),Sn=Ze(he,nt.length?ve(nt).length-Mt:0);if(Me.length>1||Me[0]||Dt(Tn,Sn))return Ho(a.doc,Me,Tn,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=To(x,b,y.line),ee=ce(b,a.doc.direction),re="left";if(ee){var oe=z(ee,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 ee="",re=!1,oe=a.doc.lineSeparator(),le=!1;function he($e){return function(Mt){return Mt.id==$e}}function be(){re&&(ee+=oe,le&&(ee+=oe),re=le=!1)}function Me($e){$e&&(be(),ee+=$e)}function nt($e){if($e.nodeType==1){var Mt=$e.getAttribute("cm-text");if(Mt){Me(Mt);return}var Bt=$e.getAttribute("cm-marker"),Jt;if(Bt){var an=a.findMarks(Ze(b,0),Ze(E+1,0),he(+Bt));an.length&&(Jt=an[0].find(0))&&Me(Qt(a.doc,Jt.from,Jt.to).join(oe));return}if($e.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test($e.nodeName);if(!/^br$/i.test($e.nodeName)&&$e.textContent.length==0)return;fn&&be();for(var sn=0;sn<$e.childNodes.length;sn++)nt($e.childNodes[sn]);/^(pre|p)$/i.test($e.nodeName)&&(le=!0),fn&&(re=!0)}else $e.nodeType==3&&Me($e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;nt(y),y!=x;)y=y.nextSibling,le=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(Ze(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ge(E,"paste",function(re){Ie(b,re)||Pl(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!Ie(b,re)){if(b.somethingSelected())_a({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var oe=Fl(b);_a({lineWise:!0,text:oe.text}),re.type=="cut"?b.setSelections(oe.ranges,null,Ce):(x.prevInput="",E.value=oe.text.join(` `),kt(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ge(E,"cut",ee),ge(E,"copy",ee),ge(a.scroller,"paste",function(re){if(!(ui(a,re)||Ie(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"),ee=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-ee.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;_e(x.cursorDiv,a.cursors),_e(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&&kt(this.textarea),me&&Xe>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&Xe>=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||Pe()!=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&&Xe>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==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&&Xe>=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 ee=Co(x,a),re=b.scroller.scrollTop;if(!ee||de)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(ee)==-1&&oi(x,di)(x.doc,po(ee),Ce);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 Me;Le&&(Me=window.scrollY),b.input.focus(),Le&&window.scrollTo(null,Me),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=$e,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function nt(){if(E.selectionStart!=null){var Bt=x.somethingSelected(),Jt="\u200B"+(Bt?E.value:"");E.value="\u21DA",E.value=Jt,y.prevInput=Bt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Jt.length,b.selForContextMenu=x.doc.sel}}function $e(){if(y.contextMenuPending==$e&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=le,me&&Xe<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&Xe<9)&&nt();var Bt=0,Jt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Bt++<10?b.detectingSelectAll=setTimeout(Jt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Jt,200)}}if(me&&Xe>=9&&nt(),ft){wn(a);var Mt=function(){yt(window,"mouseup",Mt),setTimeout($e,20)};ge(window,"mouseup",Mt)}else setTimeout($e,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?vt(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=Pe();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 ee=a.form;E=ee.submit;try{var re=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.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&&(yt(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=yt,a.on=ge,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=rr,a.countColumn=pe,a.findColumn=rt,a.isWordChar=et,a.Pass=lt,a.signal=Ct,a.Line=yr,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=Ze,a.cmpPos=Dt,a.modes=xr,a.mimeModes=Kt,a.resolveMode=An,a.getMode=Jn,a.modeExtensions=tr,a.extendMode=dr,a.copyState=Zn,a.startState=hr,a.innerMode=Rn,a.commands=da,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=_o,a.normalizeKeyMap=Du,a.StringStream=Vt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=un,a.e_stopPropagation=kn,a.e_stop=wn,a.addClass=Ye,a.contains=Qe,a.rmClass=dt,a.keyNames=yo}Zu(Gr),Uu(Gr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&Ge(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(Nt,Ht,fe){(function(ae){ae(fe(89780),fe(15525),fe(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(gt,He){var ze=ae.getMode(gt,"text/html"),me=ze.name=="null";function Xe(pe){if(ae.findModeByName){var ue=ae.findModeByName(pe);ue&&(pe=ue.mime||ue.mimes[0])}var Ge=ae.getMode(gt,pe);return Ge.name=="null"?null:Ge}He.highlightFormatting===void 0&&(He.highlightFormatting=!1),He.maxBlockquoteDepth===void 0&&(He.maxBlockquoteDepth=0),He.taskLists===void 0&&(He.taskLists=!1),He.strikethrough===void 0&&(He.strikethrough=!1),He.emoji===void 0&&(He.emoji=!1),He.fencedCodeBlockHighlighting===void 0&&(He.fencedCodeBlockHighlighting=!0),He.fencedCodeBlockDefaultMode===void 0&&(He.fencedCodeBlockDefaultMode="text/plain"),He.xml===void 0&&(He.xml=!0),He.tokenTypeOverrides===void 0&&(He.tokenTypeOverrides={});var Le={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 Ke in Le)Le.hasOwnProperty(Ke)&&He.tokenTypeOverrides[Ke]&&(Le[Ke]=He.tokenTypeOverrides[Ke]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ae=/^\[(x| )\](?=\s)/i,ye=He.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ut=/^ {0,3}(?:\={1,}|-{2,})\s*$/,je=/^[^#!\[\]*_\\<>` "'(~:]+/,Re=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Oe=/^\s*\[[^\]]+?\]:.*$/,De=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ot=" ";function st(pe,ue,Ge){return ue.f=ue.inline=Ge,Ge(pe,ue)}function St(pe,ue,Ge){return ue.f=ue.block=Ge,Ge(pe,ue)}function bt(pe){return!pe||!/\S/.test(pe.string)}function ft(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==dt){var ue=me;if(!ue){var Ge=ae.innerMode(ze,pe.htmlState);ue=Ge.mode.name=="xml"&&Ge.state.tagStart===null&&!Ge.state.context&&Ge.state.tokenize.isInText}ue&&(pe.f=Lt,pe.block=pt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function pt(pe,ue){var Ge=pe.column()===ue.indentation,wt=bt(ue.prevLine.stream),lt=ue.indentedCode,Ce=ue.prevLine.hr,Je=ue.list!==!1,Se=(ue.listStack[ue.listStack.length-1]||0)+3;ue.indentedCode=!1;var rt=ue.indentation;if(ue.indentationDiff===null&&(ue.indentationDiff=ue.indentation,Je)){for(ue.list=null;rt=4&&(lt||ue.prevLine.fencedCodeEnd||ue.prevLine.header||wt))return pe.skipToEnd(),ue.indentedCode=!0,Le.code;if(pe.eatSpace())return null;if(Ge&&ue.indentation<=Se&&(ve=pe.match(ye))&&ve[1].length<=6)return ue.quote=0,ue.header=ve[1].length,ue.thisLine.header=!0,He.highlightFormatting&&(ue.formatting="header"),ue.f=ue.inline,_e(ue);if(ue.indentation<=Se&&pe.eat(">"))return ue.quote=Ge?1:ue.quote+1,He.highlightFormatting&&(ue.formatting="quote"),pe.eatSpace(),_e(ue);if(!xe&&!ue.setext&&Ge&&ue.indentation<=Se&&(ve=pe.match(de))){var Ee=ve[1]?"ol":"ul";return ue.indentation=rt+pe.current().length,ue.list=!0,ue.quote=0,ue.listStack.push(ue.indentation),ue.em=!1,ue.strong=!1,ue.code=!1,ue.strikethrough=!1,He.taskLists&&pe.match(Ae,!1)&&(ue.taskList=!0),ue.f=ue.inline,He.highlightFormatting&&(ue.formatting=["list","list-"+Ee]),_e(ue)}else{if(Ge&&ue.indentation<=Se&&(ve=pe.match(Re,!0)))return ue.quote=0,ue.fencedEndRE=new RegExp(ve[1]+"+ *$"),ue.localMode=He.fencedCodeBlockHighlighting&&Xe(ve[2]||He.fencedCodeBlockDefaultMode),ue.localMode&&(ue.localState=ae.startState(ue.localMode)),ue.f=ue.block=$t,He.highlightFormatting&&(ue.formatting="code-block"),ue.code=-1,_e(ue);if(ue.setext||(!Ue||!Je)&&!ue.quote&&ue.list===!1&&!ue.code&&!xe&&!Oe.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(ut)))return ue.setext?(ue.header=ue.setext,ue.setext=0,pe.skipToEnd(),He.highlightFormatting&&(ue.formatting="header")):(ue.header=ve[0].charAt(0)=="="?1:2,ue.setext=ue.header),ue.thisLine.header=!0,ue.f=ue.inline,_e(ue);if(xe)return pe.skipToEnd(),ue.hr=!0,ue.thisLine.hr=!0,Le.hr;if(pe.peek()==="[")return st(pe,ue,zt)}return st(pe,ue,ue.inline)}function dt(pe,ue){var Ge=ze.token(pe,ue.htmlState);if(!me){var wt=ae.innerMode(ze,ue.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||ue.md_inside&&pe.current().indexOf(">")>-1)&&(ue.f=Lt,ue.block=pt,ue.htmlState=null)}return Ge}function $t(pe,ue){var Ge=ue.listStack[ue.listStack.length-1]||0,wt=ue.indentation=pe.quote?ue.push(Le.formatting+"-"+pe.formatting[Ge]+"-"+pe.quote):ue.push("error"))}if(pe.taskOpen)return ue.push("meta"),ue.length?ue.join(" "):null;if(pe.taskClosed)return ue.push("property"),ue.length?ue.join(" "):null;if(pe.linkHref?ue.push(Le.linkHref,"url"):(pe.strong&&ue.push(Le.strong),pe.em&&ue.push(Le.em),pe.strikethrough&&ue.push(Le.strikethrough),pe.emoji&&ue.push(Le.emoji),pe.linkText&&ue.push(Le.linkText),pe.code&&ue.push(Le.code),pe.image&&ue.push(Le.image),pe.imageAltText&&ue.push(Le.imageAltText,"link"),pe.imageMarker&&ue.push(Le.imageMarker)),pe.header&&ue.push(Le.header,Le.header+"-"+pe.header),pe.quote&&(ue.push(Le.quote),!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=pe.quote?ue.push(Le.quote+"-"+pe.quote):ue.push(Le.quote+"-"+He.maxBlockquoteDepth)),pe.list!==!1){var wt=(pe.listStack.length-1)%3;wt?wt===1?ue.push(Le.list2):ue.push(Le.list3):ue.push(Le.list1)}return pe.trailingSpaceNewLine?ue.push("trailing-space-new-line"):pe.trailingSpace&&ue.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ue.length?ue.join(" "):null}function tt(pe,ue){if(pe.match(je,!0))return _e(ue)}function Lt(pe,ue){var Ge=ue.text(pe,ue);if(typeof Ge!="undefined")return Ge;if(ue.list)return ue.list=null,_e(ue);if(ue.taskList){var wt=pe.match(Ae,!0)[1]===" ";return wt?ue.taskOpen=!0:ue.taskClosed=!0,He.highlightFormatting&&(ue.formatting="task"),ue.taskList=!1,_e(ue)}if(ue.taskOpen=!1,ue.taskClosed=!1,ue.header&&pe.match(/^#+$/,!0))return He.highlightFormatting&&(ue.formatting="header"),_e(ue);var lt=pe.next();if(ue.linkTitle){ue.linkTitle=!1;var Ce=lt;lt==="("&&(Ce=")"),Ce=(Ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Je="^\\s*(?:[^"+Ce+"\\\\]+|\\\\\\\\|\\\\.)"+Ce;if(pe.match(new RegExp(Je),!0))return Le.linkHref}if(lt==="`"){var Se=ue.formatting;He.highlightFormatting&&(ue.formatting="code"),pe.eatWhile("`");var rt=pe.current().length;if(ue.code==0&&(!ue.quote||rt==1))return ue.code=rt,_e(ue);if(rt==ue.code){var Ue=_e(ue);return ue.code=0,Ue}else return ue.formatting=Se,_e(ue)}else if(ue.code)return _e(ue);if(lt==="\\"&&(pe.next(),He.highlightFormatting)){var xe=_e(ue),ve=Le.formatting+"-escape";return xe?xe+" "+ve:ve}if(lt==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ue.imageMarker=!0,ue.image=!0,He.highlightFormatting&&(ue.formatting="image"),_e(ue);if(lt==="["&&ue.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ue.imageMarker=!1,ue.imageAltText=!0,He.highlightFormatting&&(ue.formatting="image"),_e(ue);if(lt==="]"&&ue.imageAltText){He.highlightFormatting&&(ue.formatting="image");var xe=_e(ue);return ue.imageAltText=!1,ue.image=!1,ue.inline=ue.f=Qe,xe}if(lt==="["&&!ue.image)return ue.linkText&&pe.match(/^.*?\]/)||(ue.linkText=!0,He.highlightFormatting&&(ue.formatting="link")),_e(ue);if(lt==="]"&&ue.linkText){He.highlightFormatting&&(ue.formatting="link");var xe=_e(ue);return ue.linkText=!1,ue.inline=ue.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:Lt,xe}if(lt==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Fe,He.highlightFormatting&&(ue.formatting="link");var xe=_e(ue);return xe?xe+=" ":xe="",xe+Le.linkInline}if(lt==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Fe,He.highlightFormatting&&(ue.formatting="link");var xe=_e(ue);return xe?xe+=" ":xe="",xe+Le.linkEmail}if(He.xml&<==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ee=pe.string.indexOf(">",pe.pos);if(Ee!=-1){var qe=pe.string.substring(pe.start,Ee);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(qe)&&(ue.md_inside=!0)}return pe.backUp(1),ue.htmlState=ae.startState(ze),St(pe,ue,dt)}if(He.xml&<==="<"&&pe.match(/^\/\w*?>/))return ue.md_inside=!1,"tag";if(lt==="*"||lt==="_"){for(var we=1,Ne=pe.pos==1?" ":pe.string.charAt(pe.pos-2);we<3&&pe.eat(lt);)we++;var Ve=pe.peek()||" ",et=!/\s/.test(Ve)&&(!De.test(Ve)||/\s/.test(Ne)||De.test(Ne)),it=!/\s/.test(Ne)&&(!De.test(Ne)||/\s/.test(Ve)||De.test(Ve)),We=null,mt=null;if(we%2&&(!ue.em&&et&&(lt==="*"||!it||De.test(Ne))?We=!0:ue.em==lt&&it&&(lt==="*"||!et||De.test(Ve))&&(We=!1)),we>1&&(!ue.strong&&et&&(lt==="*"||!it||De.test(Ne))?mt=!0:ue.strong==lt&&it&&(lt==="*"||!et||De.test(Ve))&&(mt=!1)),mt!=null||We!=null){He.highlightFormatting&&(ue.formatting=We==null?"strong":mt==null?"em":"strong em"),We===!0&&(ue.em=lt),mt===!0&&(ue.strong=lt);var Ue=_e(ue);return We===!1&&(ue.em=!1),mt===!1&&(ue.strong=!1),Ue}}else if(lt===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return _e(ue);pe.backUp(1)}if(He.strikethrough){if(lt==="~"&&pe.eatWhile(lt)){if(ue.strikethrough){He.highlightFormatting&&(ue.formatting="strikethrough");var Ue=_e(ue);return ue.strikethrough=!1,Ue}else if(pe.match(/^[^\s]/,!1))return ue.strikethrough=!0,He.highlightFormatting&&(ue.formatting="strikethrough"),_e(ue)}else if(lt===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return _e(ue);pe.backUp(2)}}if(He.emoji&<===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ue.emoji=!0,He.highlightFormatting&&(ue.formatting="emoji");var ct=_e(ue);return ue.emoji=!1,ct}return lt===" "&&(pe.match(/^ +$/,!1)?ue.trailingSpace++:ue.trailingSpace&&(ue.trailingSpaceNewLine=!0)),_e(ue)}function Fe(pe,ue){var Ge=pe.next();if(Ge===">"){ue.f=ue.inline=Lt,He.highlightFormatting&&(ue.formatting="link");var wt=_e(ue);return wt?wt+=" ":wt="",wt+Le.linkInline}return pe.match(/^[^>]+/,!0),Le.linkInline}function Qe(pe,ue){if(pe.eatSpace())return null;var Ge=pe.next();return Ge==="("||Ge==="["?(ue.f=ue.inline=Ye(Ge==="("?")":"]"),He.highlightFormatting&&(ue.formatting="link-string"),ue.linkHref=!0,_e(ue)):"error"}var Pe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ye(pe){return function(ue,Ge){var wt=ue.next();if(wt===pe){Ge.f=Ge.inline=Lt,He.highlightFormatting&&(Ge.formatting="link-string");var lt=_e(Ge);return Ge.linkHref=!1,lt}return ue.match(Pe[pe]),Ge.linkHref=!0,_e(Ge)}}function zt(pe,ue){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ue.f=kt,pe.next(),He.highlightFormatting&&(ue.formatting="link"),ue.linkText=!0,_e(ue)):st(pe,ue,Lt)}function kt(pe,ue){if(pe.match(/^\]:/,!0)){ue.f=ue.inline=Tt,He.highlightFormatting&&(ue.formatting="link");var Ge=_e(ue);return ue.linkText=!1,Ge}return pe.match(/^([^\]\\]|\\.)+/,!0),Le.linkText}function Tt(pe,ue){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ue.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ue.f=ue.inline=Lt,Le.linkHref+" url")}var vt={startState:function(){return{f:pt,prevLine:{stream:null},thisLine:{stream:null},block:pt,htmlState:null,indentation:0,inline:Lt,text:tt,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&&ae.copyState(ze,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?ae.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,ue){if(ue.formatting=!1,pe!=ue.thisLine.stream){if(ue.header=0,ue.hr=!1,pe.match(/^\s*$/,!0))return ft(ue),null;if(ue.prevLine=ue.thisLine,ue.thisLine={stream:pe},ue.taskList=!1,ue.trailingSpace=0,ue.trailingSpaceNewLine=!1,!ue.localState&&(ue.f=ue.block,ue.f!=dt)){var Ge=pe.match(/^\s*/,!0)[0].replace(/\t/g,ot).length;if(ue.indentation=Ge,ue.indentationDiff=null,Ge>0)return null}}return ue.f(pe,ue)},innerMode:function(pe){return pe.block==dt?{state:pe.htmlState,mode:ze}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:vt}},indent:function(pe,ue,Ge){return pe.block==dt&&ze.indent?ze.indent(pe.htmlState,ue,Ge):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ue,Ge):ae.Pass},blankLine:ft,getType:_e,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return vt},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";ae.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&&ze.substring(Le+1,ze.length);if(Ke)return ae.findModeByExtension(Ke)},ae.findModeByName=function(ze){ze=ze.toLowerCase();for(var me=0;me0?je.cmdState[je.cmdState.length-1]:null}function Xe(je){var Re=je.cmdState.pop();Re&&Re.closeBracket()}function Le(je){for(var Re=je.cmdState,Oe=Re.length-1;Oe>=0;Oe--){var De=Re[Oe];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Ke(je,Re,Oe){return function(){this.name=je,this.bracketNo=0,this.style=Re,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=Ke("importmodule","tag",["string","builtin"]),ke.documentclass=Ke("documentclass","tag",["","atom"]),ke.usepackage=Ke("usepackage","tag",["atom"]),ke.begin=Ke("begin","tag",["atom"]),ke.end=Ke("end","tag",["atom"]),ke.label=Ke("label","tag",["atom"]),ke.ref=Ke("ref","tag",["atom"]),ke.eqref=Ke("eqref","tag",["atom"]),ke.cite=Ke("cite","tag",["atom"]),ke.bibitem=Ke("bibitem","tag",["atom"]),ke.Bibitem=Ke("Bibitem","tag",["atom"]),ke.RBibitem=Ke("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(je,Re){je.f=Re}function Ae(je,Re){var Oe;if(je.match(/^\\[a-zA-Z@]+/)){var De=je.current().slice(1);return Oe=ke.hasOwnProperty(De)?ke[De]:ke.DEFAULT,Oe=new Oe,ze(Re,Oe),de(Re,ut),Oe.style}if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/\\]/))return"tag";if(je.match("\\["))return de(Re,function(st,St){return ye(st,St,"\\]")}),"keyword";if(je.match("\\("))return de(Re,function(st,St){return ye(st,St,"\\)")}),"keyword";if(je.match("$$"))return de(Re,function(st,St){return ye(st,St,"$$")}),"keyword";if(je.match("$"))return de(Re,function(st,St){return ye(st,St,"$")}),"keyword";var ot=je.next();if(ot=="%")return je.skipToEnd(),"comment";if(ot=="}"||ot=="]"){if(Oe=me(Re),Oe)Oe.closeBracket(ot),de(Re,ut);else return"error";return"bracket"}else return ot=="{"||ot=="["?(Oe=ke.DEFAULT,Oe=new Oe,ze(Re,Oe),"bracket"):/\d/.test(ot)?(je.eatWhile(/[\w.%]/),"atom"):(je.eatWhile(/[\w\-_]/),Oe=Le(Re),Oe.name=="begin"&&(Oe.argument=je.current()),Oe.styleIdentifier())}function ye(je,Re,Oe){if(je.eatSpace())return null;if(Oe&&je.match(Oe))return de(Re,Ae),"keyword";if(je.match(/^\\[a-zA-Z@]+/))return"tag";if(je.match(/^[a-zA-Z]+/))return"variable-2";if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/]/)||je.match(/^[\^_&]/))return"tag";if(je.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(je.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=je.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(je.skipToEnd(),"comment"):"error"}function ut(je,Re){var Oe=je.peek(),De;return Oe=="{"||Oe=="["?(De=me(Re),De.openBracket(Oe),je.eat(Oe),de(Re,Ae),"bracket"):/[ \t\r]/.test(Oe)?(je.eat(Oe),null):(de(Re,Ae),Xe(Re),Ae(je,Re))}return{startState:function(){var je=He.inMathMode?function(Re,Oe){return ye(Re,Oe)}:Ae;return{cmdState:[],f:je}},copyState:function(je){return{cmdState:je.cmdState.slice(),f:je.f}},token:function(je,Re){return Re.f(je,Re)},blankLine:function(je){je.f=Ae,je.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(Nt,Ht,fe){(function(ae){ae(fe(89780))})(function(ae){"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},He={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(ze,me){var Xe=ze.indentUnit,Le={},Ke=me.htmlMode?gt:He;for(var ke in Ke)Le[ke]=Ke[ke];for(var ke in me)Le[ke]=me[ke];var de,Ae;function ye(Fe,Qe){function Pe(kt){return Qe.tokenize=kt,kt(Fe,Qe)}var Ye=Fe.next();if(Ye=="<")return Fe.eat("!")?Fe.eat("[")?Fe.match("CDATA[")?Pe(Re("atom","]]>")):null:Fe.match("--")?Pe(Re("comment","-->")):Fe.match("DOCTYPE",!0,!0)?(Fe.eatWhile(/[\w\._\-]/),Pe(Oe(1))):null:Fe.eat("?")?(Fe.eatWhile(/[\w\._\-]/),Qe.tokenize=Re("meta","?>"),"meta"):(de=Fe.eat("/")?"closeTag":"openTag",Qe.tokenize=ut,"tag bracket");if(Ye=="&"){var zt;return Fe.eat("#")?Fe.eat("x")?zt=Fe.eatWhile(/[a-fA-F\d]/)&&Fe.eat(";"):zt=Fe.eatWhile(/[\d]/)&&Fe.eat(";"):zt=Fe.eatWhile(/[\w\.\-:]/)&&Fe.eat(";"),zt?"atom":"error"}else return Fe.eatWhile(/[^&<]/),null}ye.isInText=!0;function ut(Fe,Qe){var Pe=Fe.next();if(Pe==">"||Pe=="/"&&Fe.eat(">"))return Qe.tokenize=ye,de=Pe==">"?"endTag":"selfcloseTag","tag bracket";if(Pe=="=")return de="equals",null;if(Pe=="<"){Qe.tokenize=ye,Qe.state=St,Qe.tagName=Qe.tagStart=null;var Ye=Qe.tokenize(Fe,Qe);return Ye?Ye+" tag error":"tag error"}else return/[\'\"]/.test(Pe)?(Qe.tokenize=je(Pe),Qe.stringStartCol=Fe.column(),Qe.tokenize(Fe,Qe)):(Fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function je(Fe){var Qe=function(Pe,Ye){for(;!Pe.eol();)if(Pe.next()==Fe){Ye.tokenize=ut;break}return"string"};return Qe.isInAttribute=!0,Qe}function Re(Fe,Qe){return function(Pe,Ye){for(;!Pe.eol();){if(Pe.match(Qe)){Ye.tokenize=ye;break}Pe.next()}return Fe}}function Oe(Fe){return function(Qe,Pe){for(var Ye;(Ye=Qe.next())!=null;){if(Ye=="<")return Pe.tokenize=Oe(Fe+1),Pe.tokenize(Qe,Pe);if(Ye==">")if(Fe==1){Pe.tokenize=ye;break}else return Pe.tokenize=Oe(Fe-1),Pe.tokenize(Qe,Pe)}return"meta"}}function De(Fe,Qe,Pe){this.prev=Fe.context,this.tagName=Qe,this.indent=Fe.indented,this.startOfLine=Pe,(Le.doNotIndent.hasOwnProperty(Qe)||Fe.context&&Fe.context.noIndent)&&(this.noIndent=!0)}function ot(Fe){Fe.context&&(Fe.context=Fe.context.prev)}function st(Fe,Qe){for(var Pe;;){if(!Fe.context||(Pe=Fe.context.tagName,!Le.contextGrabbers.hasOwnProperty(Pe)||!Le.contextGrabbers[Pe].hasOwnProperty(Qe)))return;ot(Fe)}}function St(Fe,Qe,Pe){return Fe=="openTag"?(Pe.tagStart=Qe.column(),bt):Fe=="closeTag"?ft:St}function bt(Fe,Qe,Pe){return Fe=="word"?(Pe.tagName=Qe.current(),Ae="tag",$t):Le.allowMissingTagName&&Fe=="endTag"?(Ae="tag bracket",$t(Fe,Qe,Pe)):(Ae="error",bt)}function ft(Fe,Qe,Pe){if(Fe=="word"){var Ye=Qe.current();return Pe.context&&Pe.context.tagName!=Ye&&Le.implicitlyClosed.hasOwnProperty(Pe.context.tagName)&&ot(Pe),Pe.context&&Pe.context.tagName==Ye||Le.matchClosing===!1?(Ae="tag",pt):(Ae="tag error",dt)}else return Le.allowMissingTagName&&Fe=="endTag"?(Ae="tag bracket",pt(Fe,Qe,Pe)):(Ae="error",dt)}function pt(Fe,Qe,Pe){return Fe!="endTag"?(Ae="error",pt):(ot(Pe),St)}function dt(Fe,Qe,Pe){return Ae="error",pt(Fe,Qe,Pe)}function $t(Fe,Qe,Pe){if(Fe=="word")return Ae="attribute",_e;if(Fe=="endTag"||Fe=="selfcloseTag"){var Ye=Pe.tagName,zt=Pe.tagStart;return Pe.tagName=Pe.tagStart=null,Fe=="selfcloseTag"||Le.autoSelfClosers.hasOwnProperty(Ye)?st(Pe,Ye):(st(Pe,Ye),Pe.context=new De(Pe,Ye,zt==Pe.indented)),St}return Ae="error",$t}function _e(Fe,Qe,Pe){return Fe=="equals"?tt:(Le.allowMissing||(Ae="error"),$t(Fe,Qe,Pe))}function tt(Fe,Qe,Pe){return Fe=="string"?Lt:Fe=="word"&&Le.allowUnquoted?(Ae="string",$t):(Ae="error",$t(Fe,Qe,Pe))}function Lt(Fe,Qe,Pe){return Fe=="string"?Lt:$t(Fe,Qe,Pe)}return{startState:function(Fe){var Qe={tokenize:ye,state:St,indented:Fe||0,tagName:null,tagStart:null,context:null};return Fe!=null&&(Qe.baseIndent=Fe),Qe},token:function(Fe,Qe){if(!Qe.tagName&&Fe.sol()&&(Qe.indented=Fe.indentation()),Fe.eatSpace())return null;de=null;var Pe=Qe.tokenize(Fe,Qe);return(Pe||de)&&Pe!="comment"&&(Ae=null,Qe.state=Qe.state(de||Pe,Fe,Qe),Ae&&(Pe=Ae=="error"?Pe+" error":Ae)),Pe},indent:function(Fe,Qe,Pe){var Ye=Fe.context;if(Fe.tokenize.isInAttribute)return Fe.tagStart==Fe.indented?Fe.stringStartCol+1:Fe.indented+Xe;if(Ye&&Ye.noIndent)return ae.Pass;if(Fe.tokenize!=ut&&Fe.tokenize!=ye)return Pe?Pe.match(/^(\s*)/)[0].length:0;if(Fe.tagName)return Le.multilineTagIndentPastTag!==!1?Fe.tagStart+Fe.tagName.length+2:Fe.tagStart+Xe*(Le.multilineTagIndentFactor||1);if(Le.alignCDATA&&/$/,blockCommentStart:"",configuration:Le.htmlMode?"html":"xml",helperType:Le.htmlMode?"html":"xml",skipAttribute:function(Fe){Fe.state==tt&&(Fe.state=$t)},xmlCurrentTag:function(Fe){return Fe.tagName?{name:Fe.tagName,close:Fe.type=="closeTag"}:null},xmlCurrentContext:function(Fe){for(var Qe=[],Pe=Fe.context;Pe;Pe=Pe.prev)Pe.tagName&&Qe.push(Pe.tagName);return Qe.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Qe}});var ae=fe(33885),gt=fe(42978),He=fe(43403),ze=fe(34280),me=fe(59301),Xe=me.createContext(null),Le=me.createContext({}),Ke=Xe,ke=fe(20068),de=fe(54476),Ae=fe(92310),ye=fe.n(Ae),ut=fe(77900),je=fe(10228),Re=fe(26112),Oe=fe(75931),De=fe(8654),ot=["prefixCls","className","containerRef"],st=function(Ye){var zt=Ye.prefixCls,kt=Ye.className,Tt=Ye.containerRef,vt=(0,Oe.Z)(Ye,ot),pe=me.useContext(Le),ue=pe.panel,Ge=(0,De.x1)(ue,Tt);return me.createElement("div",(0,de.Z)({className:ye()("".concat(zt,"-content"),kt),role:"dialog",ref:Ge},(0,Re.Z)(Ye,{aria:!0}),{"aria-modal":"true"},vt))},St=st,bt=fe(48736);function ft(Pe){return typeof Pe=="string"&&String(Number(Pe))===Pe?((0,bt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Pe)):Pe}function pt(Pe){warning(!("wrapperClassName"in Pe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Pe.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var dt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function $t(Pe,Ye){var zt,kt,Tt,vt=Pe.prefixCls,pe=Pe.open,ue=Pe.placement,Ge=Pe.inline,wt=Pe.push,lt=Pe.forceRender,Ce=Pe.autoFocus,Je=Pe.keyboard,Se=Pe.classNames,rt=Pe.rootClassName,Ue=Pe.rootStyle,xe=Pe.zIndex,ve=Pe.className,Ee=Pe.id,qe=Pe.style,we=Pe.motion,Ne=Pe.width,Ve=Pe.height,et=Pe.children,it=Pe.mask,We=Pe.maskClosable,mt=Pe.maskMotion,ct=Pe.maskClassName,jt=Pe.maskStyle,Ot=Pe.afterOpenChange,se=Pe.onClose,te=Pe.onMouseEnter,z=Pe.onMouseOver,ie=Pe.onMouseLeave,ce=Pe.onClick,ne=Pe.onKeyDown,ge=Pe.onKeyUp,ht=Pe.styles,yt=Pe.drawerRender,Ct=me.useRef(),Ie=me.useRef(),_t=me.useRef();me.useImperativeHandle(Ye,function(){return Ct.current});var Ft=function(Xn){var Kn=Xn.keyCode,xr=Xn.shiftKey;switch(Kn){case je.Z.TAB:{if(Kn===je.Z.TAB){if(!xr&&document.activeElement===_t.current){var Kt;(Kt=Ie.current)===null||Kt===void 0||Kt.focus({preventScroll:!0})}else if(xr&&document.activeElement===Ie.current){var pn;(pn=_t.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case je.Z.ESC:{se&&Je&&(Xn.stopPropagation(),se(Xn));break}}};me.useEffect(function(){if(pe&&Ce){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(Ke),$n;typeof wt=="boolean"?$n=wt?{}:{distance:0}:$n=wt||{};var _n=(zt=(kt=(Tt=$n)===null||Tt===void 0?void 0:Tt.distance)!==null&&kt!==void 0?kt:wn==null?void 0:wn.pushDistance)!==null&&zt!==void 0?zt:180,mr=me.useMemo(function(){return{pushDistance:_n,push:function(){cn(!0)},pull:function(){cn(!1)}}},[_n]);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=it&&me.createElement(ut.default,(0,de.Z)({key:"mask"},mt,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style;return me.createElement("div",{className:ye()("".concat(vt,"-mask"),Kn,Se==null?void 0:Se.mask,ct),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},xr),jt),ht==null?void 0:ht.mask),onClick:We&&pe?se:void 0,ref:Xn})}),ur=typeof we=="function"?we(ue):we,nr={};if(kn&&_n)switch(ue){case"top":nr.transform="translateY(".concat(_n,"px)");break;case"bottom":nr.transform="translateY(".concat(-_n,"px)");break;case"left":nr.transform="translateX(".concat(_n,"px)");break;default:nr.transform="translateX(".concat(-_n,"px)");break}ue==="left"||ue==="right"?nr.width=ft(Ne):nr.height=ft(Ve);var In={onMouseEnter:te,onMouseOver:z,onMouseLeave:ie,onClick:ce,onKeyDown:ne,onKeyUp:ge},rr=me.createElement(ut.default,(0,de.Z)({key:"panel"},ur,{visible:pe,forceRender:lt,onVisibleChanged:function(Xn){Ot==null||Ot(Xn)},removeOnLeave:!1,leavedClassName:"".concat(vt,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style,Kt=me.createElement(St,(0,de.Z)({id:Ee,containerRef:Xn,prefixCls:vt,className:ye()(ve,Se==null?void 0:Se.content),style:(0,ae.Z)((0,ae.Z)({},qe),ht==null?void 0:ht.content)},(0,Re.Z)(Pe,{aria:!0}),In),et);return me.createElement("div",(0,de.Z)({className:ye()("".concat(vt,"-content-wrapper"),Se==null?void 0:Se.wrapper,Kn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},nr),xr),ht==null?void 0:ht.wrapper)},(0,Re.Z)(Pe,{data:!0})),yt?yt(Kt):Kt)}),cr=(0,ae.Z)({},Ue);return xe&&(cr.zIndex=xe),me.createElement(Ke.Provider,{value:mr},me.createElement("div",{className:ye()(vt,"".concat(vt,"-").concat(ue),rt,(0,ke.Z)((0,ke.Z)({},"".concat(vt,"-open"),pe),"".concat(vt,"-inline"),Ge)),style:cr,tabIndex:-1,ref:Ct,onKeyDown:Ft},er,me.createElement("div",{tabIndex:0,ref:Ie,style:dt,"aria-hidden":"true","data-sentinel":"start"}),rr,me.createElement("div",{tabIndex:0,ref:_t,style:dt,"aria-hidden":"true","data-sentinel":"end"})))}var _e=me.forwardRef($t),tt=_e,Lt=function(Ye){var zt=Ye.open,kt=zt===void 0?!1:zt,Tt=Ye.prefixCls,vt=Tt===void 0?"rc-drawer":Tt,pe=Ye.placement,ue=pe===void 0?"right":pe,Ge=Ye.autoFocus,wt=Ge===void 0?!0:Ge,lt=Ye.keyboard,Ce=lt===void 0?!0:lt,Je=Ye.width,Se=Je===void 0?378:Je,rt=Ye.mask,Ue=rt===void 0?!0:rt,xe=Ye.maskClosable,ve=xe===void 0?!0:xe,Ee=Ye.getContainer,qe=Ye.forceRender,we=Ye.afterOpenChange,Ne=Ye.destroyOnClose,Ve=Ye.onMouseEnter,et=Ye.onMouseOver,it=Ye.onMouseLeave,We=Ye.onClick,mt=Ye.onKeyDown,ct=Ye.onKeyUp,jt=Ye.panelRef,Ot=me.useState(!1),se=(0,gt.Z)(Ot,2),te=se[0],z=se[1],ie=me.useState(!1),ce=(0,gt.Z)(ie,2),ne=ce[0],ge=ce[1];(0,ze.Z)(function(){ge(!0)},[]);var ht=ne?kt:!1,yt=me.useRef(),Ct=me.useRef();(0,ze.Z)(function(){ht&&(Ct.current=document.activeElement)},[ht]);var Ie=function(kn){var cn;if(z(kn),we==null||we(kn),!kn&&Ct.current&&!((cn=yt.current)!==null&&cn!==void 0&&cn.contains(Ct.current))){var wn;(wn=Ct.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},_t=me.useMemo(function(){return{panel:jt}},[jt]);if(!qe&&!te&&!ht&&Ne)return null;var Ft={onMouseEnter:Ve,onMouseOver:et,onMouseLeave:it,onClick:We,onKeyDown:mt,onKeyUp:ct},It=(0,ae.Z)((0,ae.Z)({},Ye),{},{open:ht,prefixCls:vt,placement:ue,autoFocus:wt,keyboard:Ce,width:Se,mask:Ue,maskClosable:ve,inline:Ee===!1,afterOpenChange:Ie,ref:yt},Ft);return me.createElement(Le.Provider,{value:_t},me.createElement(He.Z,{open:ht||qe||te,autoDestroy:!1,getContainer:Ee,autoLock:Ue&&(ht||te)},me.createElement(tt,It)))},Fe=Lt,Qe=Fe},20922:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Ue}});var ae=fe(54476),gt=fe(20068),He=fe(76190),ze=fe(42978),me=fe(75931),Xe=fe(67732),Le=fe(83652);function Ke(){return typeof BigInt=="function"}function ke(xe){return!xe&&xe!==0&&!Number.isNaN(xe)||!String(xe).trim()}function de(xe){var ve=xe.trim(),Ee=ve.startsWith("-");Ee&&(ve=ve.slice(1)),ve=ve.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ve.startsWith(".")&&(ve="0".concat(ve));var qe=ve||"0",we=qe.split("."),Ne=we[0]||"0",Ve=we[1]||"0";Ne==="0"&&Ve==="0"&&(Ee=!1);var et=Ee?"-":"";return{negative:Ee,negativeStr:et,trimStr:qe,integerStr:Ne,decimalStr:Ve,fullStr:"".concat(et).concat(qe)}}function Ae(xe){var ve=String(xe);return!Number.isNaN(Number(ve))&&ve.includes("e")}function ye(xe){var ve=String(xe);if(Ae(xe)){var Ee=Number(ve.slice(ve.indexOf("e-")+2)),qe=ve.match(/\.(\d+)/);return qe!=null&&qe[1]&&(Ee+=qe[1].length),Ee}return ve.includes(".")&&je(ve)?ve.length-ve.indexOf(".")-1:0}function ut(xe){var ve=String(xe);if(Ae(xe)){if(xe>Number.MAX_SAFE_INTEGER)return String(Ke()?BigInt(xe).toString():Number.MAX_SAFE_INTEGER);if(xe0&&arguments[0]!==void 0?arguments[0]:!0;return Ee?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),xe}(),Oe=function(){function xe(ve){if((0,Xe.Z)(this,xe),(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,Le.Z)(xe,[{key:"negate",value:function(){return new xe(-this.toNumber())}},{key:"add",value:function(Ee){if(this.isInvalidate())return new xe(Ee);var qe=Number(Ee);if(Number.isNaN(qe))return this;var we=this.number+qe;if(we>Number.MAX_SAFE_INTEGER)return new xe(Number.MAX_SAFE_INTEGER);if(weNumber.MAX_SAFE_INTEGER)return new xe(Number.MAX_SAFE_INTEGER);if(we0&&arguments[0]!==void 0?arguments[0]:!0;return Ee?this.isInvalidate()?"":ut(this.number):this.origin}}]),xe}();function De(xe){return Ke()?new Re(xe):new Oe(xe)}function ot(xe,ve,Ee){var qe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(xe==="")return"";var we=de(xe),Ne=we.negativeStr,Ve=we.integerStr,et=we.decimalStr,it="".concat(ve).concat(et),We="".concat(Ne).concat(Ve);if(Ee>=0){var mt=Number(et[Ee]);if(mt>=5&&!qe){var ct=De(xe).add("".concat(Ne,"0.").concat("0".repeat(Ee)).concat(10-mt));return ot(ct.toString(),ve,Ee,qe)}return Ee===0?We:"".concat(We).concat(ve).concat(et.padEnd(Ee,"0").slice(0,Ee))}return it===".0"?We:"".concat(We).concat(it)}var st=De,St=fe(92310),bt=fe.n(St),ft=fe(36901),pt=fe(34280);function dt(xe,ve){return typeof Proxy!="undefined"&&xe?new Proxy(xe,{get:function(qe,we){if(ve[we])return ve[we];var Ne=qe[we];return typeof Ne=="function"?Ne.bind(qe):Ne}}):xe}var $t=fe(8654),_e=fe(59301),tt=fe(48736);function Lt(xe,ve){var Ee=(0,_e.useRef)(null);function qe(){try{var Ne=xe.selectionStart,Ve=xe.selectionEnd,et=xe.value,it=et.substring(0,Ne),We=et.substring(Ve);Ee.current={start:Ne,end:Ve,value:et,beforeTxt:it,afterTxt:We}}catch(mt){}}function we(){if(xe&&Ee.current&&ve)try{var Ne=xe.value,Ve=Ee.current,et=Ve.beforeTxt,it=Ve.afterTxt,We=Ve.start,mt=Ne.length;if(Ne.startsWith(et))mt=et.length;else if(Ne.endsWith(it))mt=Ne.length-Ee.current.afterTxt.length;else{var ct=et[We-1],jt=Ne.indexOf(ct,We-1);jt!==-1&&(mt=jt+1)}xe.setSelectionRange(mt,mt)}catch(Ot){(0,tt.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Ot.message))}}return[qe,we]}var Fe=fe(49658),Qe=function(){var ve=(0,_e.useState)(!1),Ee=(0,ze.Z)(ve,2),qe=Ee[0],we=Ee[1];return(0,pt.Z)(function(){we((0,Fe.Z)())},[]),qe},Pe=Qe,Ye=fe(16089),zt=200,kt=600;function Tt(xe){var ve=xe.prefixCls,Ee=xe.upNode,qe=xe.downNode,we=xe.upDisabled,Ne=xe.downDisabled,Ve=xe.onStep,et=_e.useRef(),it=_e.useRef([]),We=_e.useRef();We.current=Ve;var mt=function(){clearTimeout(et.current)},ct=function(ne,ge){ne.preventDefault(),mt(),We.current(ge);function ht(){We.current(ge),et.current=setTimeout(ht,zt)}et.current=setTimeout(ht,kt)};_e.useEffect(function(){return function(){mt(),it.current.forEach(function(ce){return Ye.Z.cancel(ce)})}},[]);var jt=Pe();if(jt)return null;var Ot="".concat(ve,"-handler"),se=bt()(Ot,"".concat(Ot,"-up"),(0,gt.Z)({},"".concat(Ot,"-up-disabled"),we)),te=bt()(Ot,"".concat(Ot,"-down"),(0,gt.Z)({},"".concat(Ot,"-down-disabled"),Ne)),z=function(){return it.current.push((0,Ye.Z)(mt))},ie={unselectable:"on",role:"button",onMouseUp:z,onMouseLeave:z};return _e.createElement("div",{className:"".concat(Ot,"-wrap")},_e.createElement("span",(0,ae.Z)({},ie,{onMouseDown:function(ne){ct(ne,!0)},"aria-label":"Increase Value","aria-disabled":we,className:se}),Ee||_e.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),_e.createElement("span",(0,ae.Z)({},ie,{onMouseDown:function(ne){ct(ne,!1)},"aria-label":"Decrease Value","aria-disabled":Ne,className:te}),qe||_e.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function vt(xe){var ve=typeof xe=="number"?ut(xe):de(xe).fullStr,Ee=ve.includes(".");return Ee?de(ve.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:xe+"0"}var pe=fe(30292),ue=function(){var xe=(0,_e.useRef)(0),ve=function(){Ye.Z.cancel(xe.current)};return(0,_e.useEffect)(function(){return ve},[]),function(Ee){ve(),xe.current=(0,Ye.Z)(function(){Ee()})}},Ge=["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,Ee){return ve||Ee.isEmpty()?Ee.toString():Ee.toNumber()},Ce=function(ve){var Ee=st(ve);return Ee.isInvalidate()?null:Ee},Je=_e.forwardRef(function(xe,ve){var Ee=xe.prefixCls,qe=xe.className,we=xe.style,Ne=xe.min,Ve=xe.max,et=xe.step,it=et===void 0?1:et,We=xe.defaultValue,mt=xe.value,ct=xe.disabled,jt=xe.readOnly,Ot=xe.upHandler,se=xe.downHandler,te=xe.keyboard,z=xe.changeOnWheel,ie=z===void 0?!1:z,ce=xe.controls,ne=ce===void 0?!0:ce,ge=xe.classNames,ht=xe.stringMode,yt=xe.parser,Ct=xe.formatter,Ie=xe.precision,_t=xe.decimalSeparator,Ft=xe.onChange,It=xe.onInput,un=xe.onPressEnter,kn=xe.onStep,cn=xe.changeOnBlur,wn=cn===void 0?!0:cn,$n=xe.domRef,_n=(0,me.Z)(xe,Ge),mr="".concat(Ee,"-input"),er=_e.useRef(null),ur=_e.useState(!1),nr=(0,ze.Z)(ur,2),In=nr[0],rr=nr[1],cr=_e.useRef(!1),Bn=_e.useRef(!1),Xn=_e.useRef(!1),Kn=_e.useState(function(){return st(mt!=null?mt:We)}),xr=(0,ze.Z)(Kn,2),Kt=xr[0],pn=xr[1];function En(dn){mt===void 0&&pn(dn)}var An=_e.useCallback(function(dn,Gt){if(!Gt)return Ie>=0?Ie:Math.max(ye(dn),ye(it))},[Ie,it]),Jn=_e.useCallback(function(dn){var Gt=String(dn);if(yt)return yt(Gt);var gn=Gt;return _t&&(gn=gn.replace(_t,".")),gn.replace(/[^\w.-]+/g,"")},[yt,_t]),tr=_e.useRef(""),dr=_e.useCallback(function(dn,Gt){if(Ct)return Ct(dn,{userTyping:Gt,input:String(tr.current)});var gn=typeof dn=="number"?ut(dn):dn;if(!Gt){var nn=An(gn,Gt);if(je(gn)&&(_t||nn>=0)){var Hn=_t||".";gn=ot(gn,Hn,nn)}}return gn},[Ct,An,_t]),Zn=_e.useState(function(){var dn=We!=null?We:mt;return Kt.isInvalidate()&&["string","number"].includes((0,He.Z)(dn))?Number.isNaN(dn)?"":dn:dr(Kt.toString(),!1)}),Rn=(0,ze.Z)(Zn,2),hr=Rn[0],Vt=Rn[1];tr.current=hr;function at(dn,Gt){Vt(dr(dn.isInvalidate()?dn.toString(!1):dn.toString(!Gt),Gt))}var Qt=_e.useMemo(function(){return Ce(Ve)},[Ve,Ie]),Cn=_e.useMemo(function(){return Ce(Ne)},[Ne,Ie]),Gn=_e.useMemo(function(){return!Qt||!Kt||Kt.isInvalidate()?!1:Qt.lessEquals(Kt)},[Qt,Kt]),Te=_e.useMemo(function(){return!Cn||!Kt||Kt.isInvalidate()?!1:Kt.lessEquals(Cn)},[Cn,Kt]),Be=Lt(er.current,In),Pt=(0,ze.Z)(Be,2),Et=Pt[0],Ze=Pt[1],Dt=function(Gt){return Qt&&!Gt.lessEquals(Qt)?Qt:Cn&&!Cn.lessEquals(Gt)?Cn:null},Xt=function(Gt){return!Dt(Gt)},tn=function(Gt,gn){var nn=Gt,Hn=Xt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!gn&&(nn=Dt(nn)||nn,Hn=!0),!jt&&!ct&&Hn){var wr=nn.toString(),Qn=An(wr,gn);return Qn>=0&&(nn=st(ot(wr,".",Qn)),Xt(nn)||(nn=st(ot(wr,".",Qn,!0)))),nn.equals(Kt)||(En(nn),Ft==null||Ft(nn.isEmpty()?null:lt(ht,nn)),mt===void 0&&at(nn,gn)),nn}return Kt},hn=ue(),Zt=function dn(Gt){if(Et(),tr.current=Gt,Vt(Gt),!Bn.current){var gn=Jn(Gt),nn=st(gn);nn.isNaN()||tn(nn,!0)}It==null||It(Gt),hn(function(){var Hn=Gt;yt||(Hn=Gt.replace(/。/g,".")),Hn!==Gt&&dn(Hn)})},qt=function(){Bn.current=!0},At=function(){Bn.current=!1,Zt(er.current.value)},xt=function(Gt){Zt(Gt.target.value)},en=function(Gt){var gn;if(!(Gt&&Gn||!Gt&&Te)){cr.current=!1;var nn=st(Xn.current?vt(it):it);Gt||(nn=nn.negate());var Hn=(Kt||st(0)).add(nn.toString()),wr=tn(Hn,!1);kn==null||kn(lt(ht,wr),{offset:Xn.current?vt(it):it,type:Gt?"up":"down"}),(gn=er.current)===null||gn===void 0||gn.focus()}},vn=function(Gt){var gn=st(Jn(hr)),nn;gn.isNaN()?nn=tn(Kt,Gt):nn=tn(gn,Gt),mt!==void 0?at(Kt,!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())},Wn=function(){cr.current=!1,Xn.current=!1};_e.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,pt.o)(function(){Kt.isInvalidate()||at(Kt,!1)},[Ie,Ct]),(0,pt.o)(function(){var dn=st(mt);pn(dn);var Gt=st(Jn(hr));(!dn.equals(Gt)||!cr.current||Ct)&&at(dn,cr.current)},[mt]),(0,pt.o)(function(){Ct&&Ze()},[hr]),_e.createElement("div",{ref:$n,className:bt()(Ee,qe,(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},"".concat(Ee,"-focused"),In),"".concat(Ee,"-disabled"),ct),"".concat(Ee,"-readonly"),jt),"".concat(Ee,"-not-a-number"),Kt.isNaN()),"".concat(Ee,"-out-of-range"),!Kt.isInvalidate()&&!Xt(Kt))),style:we,onFocus:function(){rr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:Wn,onCompositionStart:qt,onCompositionEnd:At,onBeforeInput:mn},ne&&_e.createElement(Tt,{prefixCls:Ee,upNode:Ot,downNode:se,upDisabled:Gn,downDisabled:Te,onStep:en}),_e.createElement("div",{className:"".concat(mr,"-wrap")},_e.createElement("input",(0,ae.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ne,"aria-valuemax":Ve,"aria-valuenow":Kt.isInvalidate()?null:Kt.toString(),step:it},_n,{ref:(0,$t.sQ)(er,ve),className:mr,value:hr,onChange:xt,disabled:ct,readOnly:jt}))))}),Se=_e.forwardRef(function(xe,ve){var Ee=xe.disabled,qe=xe.style,we=xe.prefixCls,Ne=we===void 0?"rc-input-number":we,Ve=xe.value,et=xe.prefix,it=xe.suffix,We=xe.addonBefore,mt=xe.addonAfter,ct=xe.className,jt=xe.classNames,Ot=(0,me.Z)(xe,wt),se=_e.useRef(null),te=_e.useRef(null),z=_e.useRef(null),ie=function(ne){z.current&&(0,pe.nH)(z.current,ne)};return _e.useImperativeHandle(ve,function(){return dt(z.current,{focus:ie,nativeElement:se.current.nativeElement||te.current})}),_e.createElement(ft.BaseInput,{className:ct,triggerFocus:ie,prefixCls:Ne,value:Ve,disabled:Ee,style:qe,prefix:et,suffix:it,addonAfter:mt,addonBefore:We,classNames:jt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:se},_e.createElement(Je,(0,ae.Z)({prefixCls:Ne,disabled:Ee,ref:z,domRef:te,className:jt==null?void 0:jt.input},Ot)))}),rt=Se,Ue=rt},25930:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Cd:function(){return Lt}});var ae=fe(54476),gt=fe(33885),He=fe(75931),ze=fe(59301),me=fe(92310),Xe=fe.n(me),Le={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ke=function(){var Pe=(0,ze.useRef)([]),Ye=(0,ze.useRef)(null);return(0,ze.useEffect)(function(){var zt=Date.now(),kt=!1;Pe.current.forEach(function(Tt){if(Tt){kt=!0;var vt=Tt.style;vt.transitionDuration=".3s, .3s, .3s, .06s",Ye.current&&zt-Ye.current<100&&(vt.transitionDuration="0s, 0s")}}),kt&&(Ye.current=Date.now())}),Pe.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(Pe){var Ye=(0,gt.Z)((0,gt.Z)({},Le),Pe),zt=Ye.className,kt=Ye.percent,Tt=Ye.prefixCls,vt=Ye.strokeColor,pe=Ye.strokeLinecap,ue=Ye.strokeWidth,Ge=Ye.style,wt=Ye.trailColor,lt=Ye.trailWidth,Ce=Ye.transition,Je=(0,He.Z)(Ye,ke);delete Je.gapPosition;var Se=Array.isArray(kt)?kt:[kt],rt=Array.isArray(vt)?vt:[vt],Ue=Ke(),xe=ue/2,ve=100-ue/2,Ee="M ".concat(pe==="round"?xe:0,",").concat(xe,` L `).concat(pe==="round"?ve:100,",").concat(xe),qe="0 0 100 ".concat(ue),we=0;return ze.createElement("svg",(0,ae.Z)({className:Xe()("".concat(Tt,"-line"),zt),viewBox:qe,preserveAspectRatio:"none",style:Ge},Je),ze.createElement("path",{className:"".concat(Tt,"-line-trail"),d:Ee,strokeLinecap:pe,stroke:wt,strokeWidth:lt||ue,fillOpacity:"0"}),Se.map(function(Ne,Ve){var et=1;switch(pe){case"round":et=1-ue/100;break;case"square":et=1-ue/2/100;break;default:et=1;break}var it={strokeDasharray:"".concat(Ne*et,"px, 100px"),strokeDashoffset:"-".concat(we,"px"),transition:Ce||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},We=rt[Ve]||rt[rt.length-1];return we+=Ne,ze.createElement("path",{key:Ve,className:"".concat(Tt,"-line-path"),d:Ee,strokeLinecap:pe,stroke:We,strokeWidth:ue,fillOpacity:"0",ref:function(ct){Ue[Ve]=ct},style:it})}))},Ae=de,ye=fe(76190),ut=fe(42978),je=fe(47273),Re=0,Oe=(0,je.Z)();function De(){var Qe;return Oe?(Qe=Re,Re+=1):Qe="TEST_OR_SSR",Qe}var ot=function(Qe){var Pe=ze.useState(),Ye=(0,ut.Z)(Pe,2),zt=Ye[0],kt=Ye[1];return ze.useEffect(function(){kt("rc_progress_".concat(De()))},[]),Qe||zt},st=function(Pe){var Ye=Pe.bg,zt=Pe.children;return ze.createElement("div",{style:{width:"100%",height:"100%",background:Ye}},zt)};function St(Qe,Pe){return Object.keys(Qe).map(function(Ye){var zt=parseFloat(Ye),kt="".concat(Math.floor(zt*Pe),"%");return"".concat(Qe[Ye]," ").concat(kt)})}var bt=ze.forwardRef(function(Qe,Pe){var Ye=Qe.prefixCls,zt=Qe.color,kt=Qe.gradientId,Tt=Qe.radius,vt=Qe.style,pe=Qe.ptg,ue=Qe.strokeLinecap,Ge=Qe.strokeWidth,wt=Qe.size,lt=Qe.gapDegree,Ce=zt&&(0,ye.Z)(zt)==="object",Je=Ce?"#FFF":void 0,Se=wt/2,rt=ze.createElement("circle",{className:"".concat(Ye,"-circle-path"),r:Tt,cx:Se,cy:Se,stroke:Je,strokeLinecap:ue,strokeWidth:Ge,opacity:pe===0?0:1,style:vt,ref:Pe});if(!Ce)return rt;var Ue="".concat(kt,"-conic"),xe=lt?"".concat(180+lt/2,"deg"):"0deg",ve=St(zt,(360-lt)/360),Ee=St(zt,1),qe="conic-gradient(from ".concat(xe,", ").concat(ve.join(", "),")"),we="linear-gradient(to ".concat(lt?"bottom":"top",", ").concat(Ee.join(", "),")");return ze.createElement(ze.Fragment,null,ze.createElement("mask",{id:Ue},rt),ze.createElement("foreignObject",{x:0,y:0,width:wt,height:wt,mask:"url(#".concat(Ue,")")},ze.createElement(st,{bg:we},ze.createElement(st,{bg:qe}))))}),ft=bt,pt=100,dt=function(Pe,Ye,zt,kt,Tt,vt,pe,ue,Ge,wt){var lt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ce=zt/100*360*((360-vt)/360),Je=vt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Se=(100-kt)/100*Ye;Ge==="round"&&kt!==100&&(Se+=wt/2,Se>=Ye&&(Se=Ye-.01));var rt=pt/2;return{stroke:typeof ue=="string"?ue:void 0,strokeDasharray:"".concat(Ye,"px ").concat(Pe),strokeDashoffset:Se+lt,transform:"rotate(".concat(Tt+Ce+Je,"deg)"),transformOrigin:"".concat(rt,"px ").concat(rt,"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 _e(Qe){var Pe=Qe!=null?Qe:[];return Array.isArray(Pe)?Pe:[Pe]}var tt=function(Pe){var Ye=(0,gt.Z)((0,gt.Z)({},Le),Pe),zt=Ye.id,kt=Ye.prefixCls,Tt=Ye.steps,vt=Ye.strokeWidth,pe=Ye.trailWidth,ue=Ye.gapDegree,Ge=ue===void 0?0:ue,wt=Ye.gapPosition,lt=Ye.trailColor,Ce=Ye.strokeLinecap,Je=Ye.style,Se=Ye.className,rt=Ye.strokeColor,Ue=Ye.percent,xe=(0,He.Z)(Ye,$t),ve=pt/2,Ee=ot(zt),qe="".concat(Ee,"-gradient"),we=ve-vt/2,Ne=Math.PI*2*we,Ve=Ge>0?90+Ge/2:-90,et=Ne*((360-Ge)/360),it=(0,ye.Z)(Tt)==="object"?Tt:{count:Tt,gap:2},We=it.count,mt=it.gap,ct=_e(Ue),jt=_e(rt),Ot=jt.find(function(ge){return ge&&(0,ye.Z)(ge)==="object"}),se=Ot&&(0,ye.Z)(Ot)==="object",te=se?"butt":Ce,z=dt(Ne,et,0,100,Ve,Ge,wt,lt,te,vt),ie=Ke(),ce=function(){var ht=0;return ct.map(function(yt,Ct){var Ie=jt[Ct]||jt[jt.length-1],_t=dt(Ne,et,ht,yt,Ve,Ge,wt,Ie,te,vt);return ht+=yt,ze.createElement(ft,{key:Ct,color:Ie,ptg:yt,radius:we,prefixCls:kt,gradientId:qe,style:_t,strokeLinecap:te,strokeWidth:vt,gapDegree:Ge,ref:function(It){ie[Ct]=It},size:pt})}).reverse()},ne=function(){var ht=Math.round(We*(ct[0]/100)),yt=100/We,Ct=0;return new Array(We).fill(null).map(function(Ie,_t){var Ft=_t<=ht-1?jt[0]:lt,It=Ft&&(0,ye.Z)(Ft)==="object"?"url(#".concat(qe,")"):void 0,un=dt(Ne,et,Ct,yt,Ve,Ge,wt,Ft,"butt",vt,mt);return Ct+=(et-un.strokeDashoffset+mt)*100/et,ze.createElement("circle",{key:_t,className:"".concat(kt,"-circle-path"),r:we,cx:ve,cy:ve,stroke:It,strokeWidth:vt,opacity:1,style:un,ref:function(cn){ie[_t]=cn}})})};return ze.createElement("svg",(0,ae.Z)({className:Xe()("".concat(kt,"-circle"),Se),viewBox:"0 0 ".concat(pt," ").concat(pt),style:Je,id:zt,role:"presentation"},xe),!We&&ze.createElement("circle",{className:"".concat(kt,"-circle-trail"),r:we,cx:ve,cy:ve,stroke:lt,strokeLinecap:te,strokeWidth:pe||vt,style:z}),We?ne():ce())},Lt=tt,Fe={Line:Ae,Circle:Lt}},6551:function(Nt,Ht,fe){"use strict";fe.d(Ht,{ZP:function(){return Le}});var ae=fe(42978),gt=fe(59301),He=fe(47273),ze=0,me=(0,He.Z)();function Xe(){var Ke;return me?(Ke=ze,ze+=1):Ke="TEST_OR_SSR",Ke}function Le(Ke){var ke=gt.useState(),de=(0,ae.Z)(ke,2),Ae=de[0],ye=de[1];return gt.useEffect(function(){ye("rc_select_".concat(Xe()))},[]),Ke||Ae}},37463:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Ac:function(){return Ie},Xo:function(){return Ft},Wx:function(){return un},ZP:function(){return Gn},lk:function(){return St}});var ae=fe(54476),gt=fe(94480),He=fe(20068),ze=fe(33885),me=fe(42978),Xe=fe(75931),Le=fe(76190),Ke=fe(18929),ke=fe(48736),de=fe(59301),Ae=fe(92310),ye=fe.n(Ae),ut=fe(34280),je=fe(49658),Re=fe(8654),Oe=function(Be){var Pt=Be.className,Et=Be.customizeIcon,Ze=Be.customizeIconProps,Dt=Be.children,Xt=Be.onMouseDown,tn=Be.onClick,hn=typeof Et=="function"?Et(Ze):Et;return de.createElement("span",{className:Pt,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()(Pt.split(/\s+/).map(function(Zt){return"".concat(Zt,"-icon")}))},Dt))},De=Oe,ot=function(Be,Pt,Et,Ze,Dt){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,Zt=de.useMemo(function(){if((0,Le.Z)(Ze)==="object")return Ze.clearIcon;if(Dt)return Dt},[Ze,Dt]),qt=de.useMemo(function(){return!!(!Xt&&Ze&&(Et.length||tn)&&!(hn==="combobox"&&tn===""))},[Ze,Xt,Et.length,tn,hn]);return{allowClear:qt,clearIcon:de.createElement(De,{className:"".concat(Be,"-clear"),onMouseDown:Pt,customizeIcon:Zt},"\xD7")}},st=de.createContext(null);function St(){return de.useContext(st)}function bt(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Be=de.useState(!1),Pt=(0,me.Z)(Be,2),Et=Pt[0],Ze=Pt[1],Dt=de.useRef(null),Xt=function(){window.clearTimeout(Dt.current)};de.useEffect(function(){return Xt},[]);var tn=function(Zt,qt){Xt(),Dt.current=window.setTimeout(function(){Ze(Zt),qt&&qt()},Te)};return[Et,tn,Xt]}function ft(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Be=de.useRef(null),Pt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Pt.current)}},[]);function Et(Ze){(Ze||Be.current===null)&&(Be.current=Ze),window.clearTimeout(Pt.current),Pt.current=window.setTimeout(function(){Be.current=null},Te)}return[function(){return Be.current},Et]}function pt(Te,Be,Pt,Et){var Ze=de.useRef(null);Ze.current={open:Be,triggerOpen:Pt,customizedTrigger:Et},de.useEffect(function(){function Dt(Xt){var tn;if(!((tn=Ze.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var hn=Xt.target;hn.shadowRoot&&Xt.composed&&(hn=Xt.composedPath()[0]||hn),Ze.current.open&&Te().filter(function(Zt){return Zt}).every(function(Zt){return!Zt.contains(hn)&&Zt!==hn})&&Ze.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Dt),function(){return window.removeEventListener("mousedown",Dt)}},[])}var dt=fe(10228);function $t(Te){return Te&&![dt.Z.ESC,dt.Z.SHIFT,dt.Z.BACKSPACE,dt.Z.TAB,dt.Z.WIN_KEY,dt.Z.ALT,dt.Z.META,dt.Z.WIN_KEY_RIGHT,dt.Z.CTRL,dt.Z.SEMICOLON,dt.Z.EQUALS,dt.Z.CAPS_LOCK,dt.Z.CONTEXT_MENU,dt.Z.F1,dt.Z.F2,dt.Z.F3,dt.Z.F4,dt.Z.F5,dt.Z.F6,dt.Z.F7,dt.Z.F8,dt.Z.F9,dt.Z.F10,dt.Z.F11,dt.Z.F12].includes(Te)}var _e=fe(26112),tt=fe(11780);function Lt(Te,Be,Pt){var Et=(0,ze.Z)((0,ze.Z)({},Te),Pt?Be:{});return Object.keys(Be).forEach(function(Ze){var Dt=Be[Ze];typeof Dt=="function"&&(Et[Ze]=function(){for(var Xt,tn=arguments.length,hn=new Array(tn),Zt=0;Ztdn&&(rn="".concat(ln.slice(0,dn),"..."))}var Mn=function(Vn){Vn&&Vn.stopPropagation(),wr(on)};return typeof nn=="function"?ii(Ut,rn,Dn,Rt,Mn):Zr(on,rn,Dn,Rt,Mn)},Nn=function(on){if(!Ze.length)return null;var Dn=typeof gn=="function"?gn(on):gn;return typeof nn=="function"?ii(void 0,Dn,!1,!1,void 0,!0):Zr({title:Dn},Dn,!1)},Wt=de.createElement("div",{className:"".concat(Dr,"-search"),style:{width:pr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},de.createElement(zt,{ref:hn,open:Dt,prefixCls:Et,id:Pt,inputElement:null,disabled:qt,autoFocus:en,autoComplete:vn,editable:Fr,activeDescendantId:mn,value:Hr,onKeyDown:Mr,onMouseDown:Cr,onChange:Qn,onPaste:Lr,onCompositionStart:ir,onCompositionEnd:Nr,onBlur:gr,tabIndex:xn,attrs:(0,_e.Z)(Be,!0)}),de.createElement("span",{ref:or,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Hr,"\xA0")),Yt=de.createElement(tt.Z,{prefixCls:"".concat(Dr,"-overflow"),data:Ze,renderItem:Or,renderRest:Nn,suffix:Wt,itemKey:Ce,maxCount:Yn});return de.createElement("span",{className:"".concat(Dr,"-wrap")},Yt,!Ze.length&&!Hr&&de.createElement("span",{className:"".concat(Dr,"-placeholder")},Zt))},rt=Se,Ue=function(Be){var Pt=Be.inputElement,Et=Be.prefixCls,Ze=Be.id,Dt=Be.inputRef,Xt=Be.disabled,tn=Be.autoFocus,hn=Be.autoComplete,Zt=Be.activeDescendantId,qt=Be.mode,At=Be.open,xt=Be.values,en=Be.placeholder,vn=Be.tabIndex,mn=Be.showSearch,xn=Be.searchValue,Wn=Be.activeValue,Yn=Be.maxLength,dn=Be.onInputKeyDown,Gt=Be.onInputMouseDown,gn=Be.onInputChange,nn=Be.onInputPaste,Hn=Be.onInputCompositionStart,wr=Be.onInputCompositionEnd,Qn=Be.onInputBlur,Lr=Be.title,Mr=de.useState(!1),Cr=(0,me.Z)(Mr,2),ir=Cr[0],Nr=Cr[1],gr=qt==="combobox",or=gr||mn,Er=xt[0],Ar=xn||"";gr&&Wn&&!ir&&(Ar=Wn),de.useEffect(function(){gr&&Nr(!1)},[gr,Wn]);var pr=qt!=="combobox"&&!At&&!mn?!1:!!Ar,qn=Lr===void 0?wt(Er):Lr,jn=de.useMemo(function(){return Er?null:de.createElement("span",{className:"".concat(Et,"-selection-placeholder"),style:pr?{visibility:"hidden"}:void 0},en)},[Er,pr,en,Et]);return de.createElement("span",{className:"".concat(Et,"-selection-wrap")},de.createElement("span",{className:"".concat(Et,"-selection-search")},de.createElement(zt,{ref:Dt,prefixCls:Et,id:Ze,open:At,inputElement:Pt,disabled:Xt,autoFocus:tn,autoComplete:hn,editable:or,activeDescendantId:Zt,value:Ar,onKeyDown:dn,onMouseDown:Gt,onChange:function(Vr){Nr(!0),gn(Vr)},onPaste:nn,onCompositionStart:Hn,onCompositionEnd:wr,onBlur:Qn,tabIndex:vn,attrs:(0,_e.Z)(Be,!0),maxLength:gr?Yn:void 0})),!gr&&Er?de.createElement("span",{className:"".concat(Et,"-selection-item"),title:qn,style:pr?{visibility:"hidden"}:void 0},Er.label):null,jn)},xe=Ue,ve=function(Be,Pt){var Et=(0,de.useRef)(null),Ze=(0,de.useRef)(!1),Dt=Be.prefixCls,Xt=Be.open,tn=Be.mode,hn=Be.showSearch,Zt=Be.tokenWithEnter,qt=Be.disabled,At=Be.prefix,xt=Be.autoClearSearchValue,en=Be.onSearch,vn=Be.onSearchSubmit,mn=Be.onToggleOpen,xn=Be.onInputKeyDown,Wn=Be.onInputBlur,Yn=Be.domRef;de.useImperativeHandle(Pt,function(){return{focus:function(qn){Et.current.focus(qn)},blur:function(){Et.current.blur()}}});var dn=ft(0),Gt=(0,me.Z)(dn,2),gn=Gt[0],nn=Gt[1],Hn=function(qn){var jn=qn.which,Br=Et.current instanceof HTMLTextAreaElement;!Br&&Xt&&(jn===dt.Z.UP||jn===dt.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),jn===dt.Z.ENTER&&tn==="tags"&&!Ze.current&&!Xt&&(vn==null||vn(qn.target.value)),!(Br&&!Xt&&~[dt.Z.UP,dt.Z.DOWN,dt.Z.LEFT,dt.Z.RIGHT].indexOf(jn))&&$t(jn)&&mn(!0)},wr=function(){nn(!0)},Qn=(0,de.useRef)(null),Lr=function(qn){en(qn,!0,Ze.current)!==!1&&mn(!0)},Mr=function(){Ze.current=!0},Cr=function(qn){Ze.current=!1,tn!=="combobox"&&Lr(qn.target.value)},ir=function(qn){var jn=qn.target.value;if(Zt&&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)},Nr=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!==Et.current){var Br=document.body.style.msTouchAction!==void 0;Br?setTimeout(function(){Et.current.focus()}):Et.current.focus()}},or=function(qn){var jn=gn();qn.target!==Et.current&&!jn&&!(tn==="combobox"&&qt)&&qn.preventDefault(),(tn!=="combobox"&&(!hn||!jn)||!Xt)&&(Xt&&xt!==!1&&en("",!0,!1),mn())},Er={inputRef:Et,onInputKeyDown:Hn,onInputMouseDown:wr,onInputChange:ir,onInputPaste:Nr,onInputCompositionStart:Mr,onInputCompositionEnd:Cr,onInputBlur:Wn},Ar=tn==="multiple"||tn==="tags"?de.createElement(rt,(0,ae.Z)({},Be,Er)):de.createElement(xe,(0,ae.Z)({},Be,Er));return de.createElement("div",{ref:Yn,className:"".concat(Dt,"-selector"),onClick:gr,onMouseDown:or},At&&de.createElement("div",{className:"".concat(Dt,"-prefix")},At),Ar)},Ee=de.forwardRef(ve),qe=Ee,we=fe(65030),Ne=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ve=function(Be){var Pt=Be===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"}}},et=function(Be,Pt){var Et=Be.prefixCls,Ze=Be.disabled,Dt=Be.visible,Xt=Be.children,tn=Be.popupElement,hn=Be.animation,Zt=Be.transitionName,qt=Be.dropdownStyle,At=Be.dropdownClassName,xt=Be.direction,en=xt===void 0?"ltr":xt,vn=Be.placement,mn=Be.builtinPlacements,xn=Be.dropdownMatchSelectWidth,Wn=Be.dropdownRender,Yn=Be.dropdownAlign,dn=Be.getPopupContainer,Gt=Be.empty,gn=Be.getTriggerDOMNode,nn=Be.onPopupVisibleChange,Hn=Be.onPopupMouseEnter,wr=(0,Xe.Z)(Be,Ne),Qn="".concat(Et,"-dropdown"),Lr=tn;Wn&&(Lr=Wn(tn));var Mr=de.useMemo(function(){return mn||Ve(xn)},[mn,xn]),Cr=hn?"".concat(Qn,"-").concat(hn):Zt,ir=typeof xn=="number",Nr=de.useMemo(function(){return ir?null:xn===!1?"minWidth":"width"},[xn,ir]),gr=qt;ir&&(gr=(0,ze.Z)((0,ze.Z)({},gr),{},{width:xn}));var or=de.useRef(null);return de.useImperativeHandle(Pt,function(){return{getPopupElement:function(){var Ar;return(Ar=or.current)===null||Ar===void 0?void 0:Ar.popupElement}}}),de.createElement(we.Z,(0,ae.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:Hn},Lr),ref:or,stretch:Nr,popupAlign:Yn,popupVisible:Dt,getPopupContainer:dn,popupClassName:ye()(At,(0,He.Z)({},"".concat(Qn,"-empty"),Gt)),popupStyle:gr,getTriggerDOMNode:gn,onPopupVisibleChange:nn}),Xt)},it=de.forwardRef(et),We=it,mt=fe(66712);function ct(Te,Be){var Pt=Te.key,Et;return"value"in Te&&(Et=Te.value),Pt!=null?Pt:Et!==void 0?Et:"rc-index-key-".concat(Be)}function jt(Te){return typeof Te!="undefined"&&!Number.isNaN(Te)}function Ot(Te,Be){var Pt=Te||{},Et=Pt.label,Ze=Pt.value,Dt=Pt.options,Xt=Pt.groupLabel,tn=Et||(Be?"children":"label");return{label:tn,value:Ze||"value",options:Dt||"options",groupLabel:Xt||tn}}function se(Te){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=Be.fieldNames,Et=Be.childrenAsData,Ze=[],Dt=Ot(Pt,!1),Xt=Dt.label,tn=Dt.value,hn=Dt.options,Zt=Dt.groupLabel;function qt(At,xt){Array.isArray(At)&&At.forEach(function(en){if(xt||!(hn in en)){var vn=en[tn];Ze.push({key:ct(en,Ze.length),groupOption:xt,data:en,label:en[Xt],value:vn})}else{var mn=en[Zt];mn===void 0&&Et&&(mn=en.label),Ze.push({key:ct(en,Ze.length),group:!0,data:en,label:mn}),qt(en[hn],!0)}})}return qt(Te,!1),Ze}function te(Te){var Be=(0,ze.Z)({},Te);return"props"in Be||Object.defineProperty(Be,"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`."),Be}}),Be}var z=function(Be,Pt,Et){if(!Pt||!Pt.length)return null;var Ze=!1,Dt=function tn(hn,Zt){var qt=(0,mt.Z)(Zt),At=qt[0],xt=qt.slice(1);if(!At)return[hn];var en=hn.split(At);return Ze=Ze||en.length>1,en.reduce(function(vn,mn){return[].concat((0,gt.Z)(vn),(0,gt.Z)(tn(mn,xt)))},[]).filter(Boolean)},Xt=Dt(Be,Pt);return Ze?typeof Et!="undefined"?Xt.slice(0,Et):Xt:null},ie=de.createContext(null),ce=ie;function ne(Te){var Be=Te.visible,Pt=Te.values;if(!Be)return null;var Et=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Pt.slice(0,Et).map(function(Ze){var Dt=Ze.label,Xt=Ze.value;return["number","string"].includes((0,Le.Z)(Dt))?Dt:Xt}).join(", ")),Pt.length>Et?", ...":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"],ht=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],yt=function(Be){return Be==="tags"||Be==="multiple"},Ct=de.forwardRef(function(Te,Be){var Pt,Et=Te.id,Ze=Te.prefixCls,Dt=Te.className,Xt=Te.showSearch,tn=Te.tagRender,hn=Te.direction,Zt=Te.omitDomProps,qt=Te.displayValues,At=Te.onDisplayValuesChange,xt=Te.emptyOptions,en=Te.notFoundContent,vn=en===void 0?"Not Found":en,mn=Te.onClear,xn=Te.mode,Wn=Te.disabled,Yn=Te.loading,dn=Te.getInputElement,Gt=Te.getRawInputElement,gn=Te.open,nn=Te.defaultOpen,Hn=Te.onDropdownVisibleChange,wr=Te.activeValue,Qn=Te.onActiveValueChange,Lr=Te.activeDescendantId,Mr=Te.searchValue,Cr=Te.autoClearSearchValue,ir=Te.onSearch,Nr=Te.onSearchSplit,gr=Te.tokenSeparators,or=Te.allowClear,Er=Te.prefix,Ar=Te.suffixIcon,pr=Te.clearIcon,qn=Te.OptionList,jn=Te.animation,Br=Te.transitionName,Vr=Te.dropdownStyle,Jr=Te.dropdownClassName,Dr=Te.dropdownMatchSelectWidth,Hr=Te.dropdownRender,Fr=Te.dropdownAlign,Zr=Te.placement,ii=Te.builtinPlacements,Or=Te.getPopupContainer,Nn=Te.showAction,Wt=Nn===void 0?[]:Nn,Yt=Te.onFocus,yn=Te.onBlur,on=Te.onKeyUp,Dn=Te.onKeyDown,ar=Te.onMouseDown,Ut=(0,Xe.Z)(Te,ge),Rt=yt(xn),rn=(Xt!==void 0?Xt:Rt)||xn==="combobox",ln=(0,ze.Z)({},Ut);ht.forEach(function(lr){delete ln[lr]}),Zt==null||Zt.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,je.Z)())},[]);var br=de.useRef(null),Sr=de.useRef(null),zr=de.useRef(null),Tr=de.useRef(null),Wr=de.useRef(null),ei=de.useRef(!1),Li=bt(),Oi=(0,me.Z)(Li,3),xi=Oi[0],vi=Oi[1],Xi=Oi[2];de.useImperativeHandle(Be,function(){var lr,zn;return{focus:(lr=Tr.current)===null||lr===void 0?void 0:lr.focus,blur:(zn=Tr.current)===null||zn===void 0?void 0:zn.blur,scrollTo:function(fi){var Yr;return(Yr=Wr.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(),Fi=(0,Re.x1)(Sr,ti==null||(Pt=ti.props)===null||Pt===void 0?void 0:Pt.ref),ao=de.useState(!1),Ji=(0,me.Z)(ao,2),mi=Ji[0],Ni=Ji[1];(0,ut.Z)(function(){Ni(!0)},[]);var _r=(0,Ke.Z)(!1,{defaultValue:nn,value:gn}),Wi=(0,me.Z)(_r,2),so=Wi[0],Zi=Wi[1],Qr=mi?so:!1,xo=!vn&&xt;(Wn||xo&&Qr&&xn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,Ln=de.useCallback(function(lr){var zn=lr!==void 0?lr:!Qr;Wn||(Zi(zn),Qr!==zn&&(Hn==null||Hn(zn)))},[Wn,Qr,Zi,Hn]),On=de.useMemo(function(){return(gr||[]).some(function(lr){return[` `,`\r `].includes(lr)})},[gr]),Pn=de.useContext(ce)||{},Fn=Pn.maxCount,vr=Pn.rawValues,Ir=function(zn,ci,fi){if(!(Rt&&jt(Fn)&&(vr==null?void 0:vr.size)>=Fn)){var Yr=!0,ni=zn;Qn==null||Qn(null);var Vi=z(zn,gr,jt(Fn)?Fn-vr.size:void 0),_i=fi?null:Vi;return xn!=="combobox"&&_i&&(ni="",Nr==null||Nr(_i),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&&!Rt&&xn!=="combobox"&&Ir("",!1,!1)},[Qr]),de.useEffect(function(){so&&Wn&&Zi(!1),Wn&&!ei.current&&vi(!1)},[Wn]);var gi=ft(),ui=(0,me.Z)(gi,2),Kr=ui[0],Hi=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)),Hi(!!fr),fi==="Backspace"&&!ci&&Rt&&!fr&&qt.length){for(var ni=(0,gt.Z)(qt),Vi=null,_i=ni.length-1;_i>=0;_i-=1){var ro=ni[_i];if(!ro.disabled){ni.splice(_i,1),Vi=ro;break}}Vi&&At(ni,{type:"remove",values:[Vi]})}for(var Ai=arguments.length,Ti=new Array(Ai>1?Ai-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(Wt){Wt.preventDefault()},or=function(Wt){var Yt;(Yt=ir.current)===null||Yt===void 0||Yt.scrollTo(typeof Wt=="number"?{index:Wt}:Wt)},Er=de.useCallback(function(Nn){return hn==="combobox"?!1:Gt.has(Nn)},[hn,(0,gt.Z)(Gt).toString(),Gt.size]),Ar=function(Wt){for(var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,yn=Cr.length,on=0;on1&&arguments[1]!==void 0?arguments[1]:!1;Br(Wt);var yn={source:Yt?"keyboard":"mouse"},on=Cr[Wt];if(!on){xn(null,-1,yn);return}xn(on.value,Wt,yn)};(0,de.useEffect)(function(){Vr(Wn!==!1?Ar(0):-1)},[Cr.length,Zt]);var Jr=de.useCallback(function(Nn){return hn==="combobox"?String(Nn).toLowerCase()===Zt.toLowerCase():Gt.has(Nn)},[hn,Zt,(0,gt.Z)(Gt).toString(),Gt.size]);(0,de.useEffect)(function(){var Nn=setTimeout(function(){if(!tn&&Xt&&Gt.size===1){var Yt=Array.from(Gt)[0],yn=Cr.findIndex(function(on){var Dn=on.data;return Zt?String(Dn.value).startsWith(Zt):Dn.value===Yt});yn!==-1&&(Vr(yn),or(yn))}});if(Xt){var Wt;(Wt=ir.current)===null||Wt===void 0||Wt.scrollTo(void 0)}return function(){return clearTimeout(Nn)}},[Xt,Zt]);var Dr=function(Wt){Wt!==void 0&&Yn(Wt,{selected:!Gt.has(Wt)}),tn||qt(!1)};if(de.useImperativeHandle(Pt,function(){return{onKeyDown:function(Wt){var Yt=Wt.which,yn=Wt.ctrlKey;switch(Yt){case dt.Z.N:case dt.Z.P:case dt.Z.UP:case dt.Z.DOWN:{var on=0;if(Yt===dt.Z.UP?on=-1:Yt===dt.Z.DOWN?on=1:$n()&&yn&&(Yt===dt.Z.N?on=1:Yt===dt.Z.P&&(on=-1)),on!==0){var Dn=Ar(jn+on,on);or(Dn),Vr(Dn,!0)}break}case dt.Z.TAB:case dt.Z.ENTER:{var ar,Ut=Cr[jn];Ut&&!(Ut!=null&&(ar=Ut.data)!==null&&ar!==void 0&&ar.disabled)&&!Nr?Dr(Ut.value):Dr(void 0),Xt&&Wt.preventDefault();break}case dt.Z.ESC:qt(!1),Xt&&Wt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Wt){or(Wt)}}}),Cr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(Dt,"_list"),className:"".concat(Mr,"-empty"),onMouseDown:gr},At);var Hr=Object.keys(gn).map(function(Nn){return gn[Nn]}),Fr=function(Wt){return Wt.label};function Zr(Nn,Wt){var Yt=Nn.group;return{role:Yt?"presentation":"option",id:"".concat(Dt,"_list_").concat(Wt)}}var ii=function(Wt){var Yt=Cr[Wt];if(!Yt)return null;var yn=Yt.data||{},on=yn.value,Dn=Yt.group,ar=(0,_e.Z)(yn,!0),Ut=Fr(Yt);return Yt?de.createElement("div",(0,ae.Z)({"aria-label":typeof Ut=="string"&&!Dn?Ut:null},ar,{key:Wt},Zr(Yt,Wt),{"aria-selected":Jr(on)}),on):null},Or={role:"listbox",id:"".concat(Dt,"_list")};return de.createElement(de.Fragment,null,nn&&de.createElement("div",(0,ae.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:xt,virtual:nn,direction:Hn,innerProps:nn?null:Or},function(Nn,Wt){var Yt=Nn.group,yn=Nn.groupOption,on=Nn.data,Dn=Nn.label,ar=Nn.value,Ut=on.key;if(Yt){var Rt,rn=(Rt=on.title)!==null&&Rt!==void 0?Rt:mr(Dn)?Dn.toString():void 0;return de.createElement("div",{className:ye()(Mr,"".concat(Mr,"-group"),on.className),title:rn},Dn!==void 0?Dn:Ut)}var ln=on.disabled,Mn=on.title,sr=on.children,Vn=on.style,yr=on.className,br=(0,Xe.Z)(on,_n),Sr=(0,cn.Z)(br,Hr),zr=Er(ar),Tr=ln||!zr&&Nr,Wr="".concat(Mr,"-option"),ei=ye()(Mr,Wr,yr,(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Wr,"-grouped"),yn),"".concat(Wr,"-active"),jn===Wt&&!Tr),"".concat(Wr,"-disabled"),Tr),"".concat(Wr,"-selected"),zr)),Li=Fr(Nn),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,ae.Z)({},(0,_e.Z)(Sr),nn?{}:Zr(Nn,Wt),{"aria-selected":Jr(ar),className:ei,title:vi,onMouseMove:function(){jn===Wt||Tr||Vr(Wt)},onClick:function(){Tr||Dr(ar)},style:Vn}),de.createElement("div",{className:"".concat(Wr,"-content")},typeof Lr=="function"?Lr(Nn,{index:Wt}):xi),de.isValidElement(dn)||zr,Oi&&de.createElement(De,{className:"".concat(Mr,"-option-state"),customizeIcon:dn,customizeIconProps:{value:ar,disabled:Tr,isSelected:zr}},zr?"\u2713":null))}))},ur=de.forwardRef(er),nr=ur,In=function(Te,Be){var Pt=de.useRef({values:new Map,options:new Map}),Et=de.useMemo(function(){var Dt=Pt.current,Xt=Dt.values,tn=Dt.options,hn=Te.map(function(At){if(At.label===void 0){var xt;return(0,ze.Z)((0,ze.Z)({},At),{},{label:(xt=Xt.get(At.value))===null||xt===void 0?void 0:xt.label})}return At}),Zt=new Map,qt=new Map;return hn.forEach(function(At){Zt.set(At.value,At),qt.set(At.value,Be.get(At.value)||tn.get(At.value))}),Pt.current.values=Zt,Pt.current.options=qt,hn},[Te,Be]),Ze=de.useCallback(function(Dt){return Be.get(Dt)||Pt.current.options.get(Dt)},[Be]);return[Et,Ze]};function rr(Te,Be){return kt(Te).join("").toUpperCase().includes(Be)}var cr=function(Te,Be,Pt,Et,Ze){return de.useMemo(function(){if(!Pt||Et===!1)return Te;var Dt=Be.options,Xt=Be.label,tn=Be.value,hn=[],Zt=typeof Et=="function",qt=Pt.toUpperCase(),At=Zt?Et:function(en,vn){return Ze?rr(vn[Ze],qt):vn[Dt]?rr(vn[Xt!=="children"?Xt:"label"],qt):rr(vn[tn],qt)},xt=Zt?function(en){return te(en)}:function(en){return en};return Te.forEach(function(en){if(en[Dt]){var vn=At(Pt,xt(en));if(vn)hn.push(en);else{var mn=en[Dt].filter(function(xn){return At(Pt,xt(xn))});mn.length&&hn.push((0,ze.Z)((0,ze.Z)({},en),{},(0,He.Z)({},Dt,mn)))}return}At(Pt,xt(en))&&hn.push(en)}),hn},[Te,Et,Ze,Pt,Be])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],xr=["children"];function Kt(Te){var Be=Te,Pt=Be.key,Et=Be.props,Ze=Et.children,Dt=Et.value,Xt=(0,Xe.Z)(Et,Kn);return(0,ze.Z)({key:Pt,value:Dt!==void 0?Dt:Pt,children:Ze},Xt)}function pn(Te){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Te).map(function(Pt,Et){if(!de.isValidElement(Pt)||!Pt.type)return null;var Ze=Pt,Dt=Ze.type.isSelectOptGroup,Xt=Ze.key,tn=Ze.props,hn=tn.children,Zt=(0,Xe.Z)(tn,xr);return Be||!Dt?Kt(Pt):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(Xt===null?Et:Xt,"__"),label:Xt},Zt),{},{options:pn(hn)})}).filter(function(Pt){return Pt})}var En=function(Be,Pt,Et,Ze,Dt){return de.useMemo(function(){var Xt=Be,tn=!Be;tn&&(Xt=pn(Pt));var hn=new Map,Zt=new Map,qt=function(en,vn,mn){mn&&typeof mn=="string"&&en.set(vn[mn],vn)},At=function xt(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(Fn.options):Fn.options}):Fn})},Oi=de.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Or]),xi=de.useMemo(function(){return se(Oi,{fieldNames:Fr,childrenAsData:Dr})},[Oi,Fr,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 Fn=pr?Pn:Pn.map(function(Ir){return Ir.value}),vr=Pn.map(function(Ir){return te(yr(Ir.value))});qn(Jr?Fn:Fn[0],Jr?vr:vr[0])}},Xi=de.useState(null),fr=(0,me.Z)(Xi,2),to=fr[0],ti=fr[1],Fi=de.useState(0),ao=(0,me.Z)(Fi,2),Ji=ao[0],mi=ao[1],Ni=wr!==void 0?wr:Et!=="combobox",_r=de.useCallback(function(Ln,On){var Pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Fn=Pn.source,vr=Fn===void 0?"keyboard":Fn;mi(On),Xt&&Et==="combobox"&&Ln!==null&&vr==="keyboard"&&ti(String(Ln))},[Xt,Et]),Wi=function(On,Pn,Fn){var vr=function(){var no,ji=yr(On);return[pr?{label:ji==null?void 0:ji[Fr.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&&Fn!=="clear"){var Kr=vr(),Hi=(0,me.Z)(Kr,2),Qi=Hi[0],Mi=Hi[1];vn(Qi,Mi)}},so=Jn(function(Ln,On){var Pn,Fn=Jr?On.selected:!0;Fn?Pn=Jr?[].concat((0,gt.Z)(Vn),[Ln]):[Ln]:Pn=Vn.filter(function(vr){return vr.value!==Ln}),vi(Pn),Wi(Ln,Fn),Et==="combobox"?ti(""):(!yt||xt)&&(Nn(""),ti(""))}),Zi=function(On,Pn){vi(On);var Fn=Pn.type,vr=Pn.values;(Fn==="remove"||Fn==="clear")&&vr.forEach(function(Ir){Wi(Ir.value,!1,Fn)})},Qr=function(On,Pn){if(Nn(On),ti(null),Pn.source==="submit"){var Fn=(On||"").trim();if(Fn){var vr=Array.from(new Set([].concat((0,gt.Z)(Sr),[Fn])));vi(vr),Wi(Fn,!0),Nn("")}return}Pn.source!=="blur"&&(Et==="combobox"&&vi(On),qt==null||qt(On))},xo=function(On){var Pn=On;Et!=="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 Fn=Array.from(new Set([].concat((0,gt.Z)(Sr),(0,gt.Z)(Pn))));vi(Fn),Fn.forEach(function(vr){Wi(vr,!0)})},lo=de.useMemo(function(){var Ln=Lr!==!1&&xn!==!1;return(0,ze.Z)((0,ze.Z)({},Wt),{},{flattenOptions:xi,onActiveValue:_r,defaultActiveFirstOption:Ni,onSelect:so,menuItemSelectedIcon:Qn,rawValues:Sr,fieldNames:Fr,virtual:Ln,direction:Mr,listHeight:ir,listItemHeight:gr,childrenAsData:Dr,maxCount:jn,optionRender:nn})},[jn,Wt,xi,_r,Ni,so,Qn,Sr,Fr,Lr,xn,Mr,ir,gr,Dr,nn]);return de.createElement(ce.Provider,{value:lo},de.createElement(Ie,(0,ae.Z)({},Br,{id:Vr,prefixCls:Dt,ref:Be,omitDomProps:hr,mode:Et,displayValues:br,onDisplayValuesChange:Zi,direction:Mr,searchValue:Or,onSearch:Qr,autoClearSearchValue:xt,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:nr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Qt=at;Qt.Option=un,Qt.OptGroup=Ft;var Cn=Qt,Gn=Cn},63158:function(Nt,Ht,fe){"use strict";var ae=fe(54476),gt=fe(20068),He=fe(42978),ze=fe(75931),me=fe(59301),Xe=fe(92310),Le=fe.n(Xe),Ke=fe(18929),ke=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ae=me.forwardRef(function(ye,ut){var je,Re=ye.prefixCls,Oe=Re===void 0?"rc-switch":Re,De=ye.className,ot=ye.checked,st=ye.defaultChecked,St=ye.disabled,bt=ye.loadingIcon,ft=ye.checkedChildren,pt=ye.unCheckedChildren,dt=ye.onClick,$t=ye.onChange,_e=ye.onKeyDown,tt=(0,ze.Z)(ye,de),Lt=(0,Ke.Z)(!1,{value:ot,defaultValue:st}),Fe=(0,He.Z)(Lt,2),Qe=Fe[0],Pe=Fe[1];function Ye(vt,pe){var ue=Qe;return St||(ue=vt,Pe(ue),$t==null||$t(ue,pe)),ue}function zt(vt){vt.which===ke.Z.LEFT?Ye(!1,vt):vt.which===ke.Z.RIGHT&&Ye(!0,vt),_e==null||_e(vt)}function kt(vt){var pe=Ye(!Qe,vt);dt==null||dt(pe,vt)}var Tt=Le()(Oe,De,(je={},(0,gt.Z)(je,"".concat(Oe,"-checked"),Qe),(0,gt.Z)(je,"".concat(Oe,"-disabled"),St),je));return me.createElement("button",(0,ae.Z)({},tt,{type:"button",role:"switch","aria-checked":Qe,disabled:St,className:Tt,ref:ut,onKeyDown:zt,onClick:kt}),bt,me.createElement("span",{className:"".concat(Oe,"-inner")},me.createElement("span",{className:"".concat(Oe,"-inner-checked")},ft),me.createElement("span",{className:"".concat(Oe,"-inner-unchecked")},pt)))});Ae.displayName="Switch",Ht.Z=Ae},22711:function(Nt,Ht,fe){"use strict";fe.r(Ht),fe.d(Ht,{ResizableTextArea:function(){return Fe},default:function(){return zt}});var ae=fe(54476),gt=fe(20068),He=fe(33885),ze=fe(94480),me=fe(42978),Xe=fe(75931),Le=fe(92310),Ke=fe.n(Le),ke=fe(36901),de=fe(66003),Ae=fe(30292),ye=fe(18929),ut=fe(59301),je=fe(76190),Re=fe(29301),Oe=fe(34280),De=fe(16089),ot=` 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; `,st=["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"],St={},bt;function ft(kt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=kt.getAttribute("id")||kt.getAttribute("data-reactid")||kt.getAttribute("name");if(Tt&&St[vt])return St[vt];var pe=window.getComputedStyle(kt),ue=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Ge=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),wt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),lt=st.map(function(Je){return"".concat(Je,":").concat(pe.getPropertyValue(Je))}).join(";"),Ce={sizingStyle:lt,paddingSize:Ge,borderSize:wt,boxSizing:ue};return Tt&&vt&&(St[vt]=Ce),Ce}function pt(kt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;bt||(bt=document.createElement("textarea"),bt.setAttribute("tab-index","-1"),bt.setAttribute("aria-hidden","true"),bt.setAttribute("name","hiddenTextarea"),document.body.appendChild(bt)),kt.getAttribute("wrap")?bt.setAttribute("wrap",kt.getAttribute("wrap")):bt.removeAttribute("wrap");var ue=ft(kt,Tt),Ge=ue.paddingSize,wt=ue.borderSize,lt=ue.boxSizing,Ce=ue.sizingStyle;bt.setAttribute("style","".concat(Ce,";").concat(ot)),bt.value=kt.value||kt.placeholder||"";var Je=void 0,Se=void 0,rt,Ue=bt.scrollHeight;if(lt==="border-box"?Ue+=wt:lt==="content-box"&&(Ue-=Ge),vt!==null||pe!==null){bt.value=" ";var xe=bt.scrollHeight-Ge;vt!==null&&(Je=xe*vt,lt==="border-box"&&(Je=Je+Ge+wt),Ue=Math.max(Je,Ue)),pe!==null&&(Se=xe*pe,lt==="border-box"&&(Se=Se+Ge+wt),rt=Ue>Se?"":"hidden",Ue=Math.min(Se,Ue))}var ve={height:Ue,overflowY:rt,resize:"none"};return Je&&(ve.minHeight=Je),Se&&(ve.maxHeight=Se),ve}var dt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],$t=0,_e=1,tt=2,Lt=ut.forwardRef(function(kt,Tt){var vt=kt,pe=vt.prefixCls,ue=vt.defaultValue,Ge=vt.value,wt=vt.autoSize,lt=vt.onResize,Ce=vt.className,Je=vt.style,Se=vt.disabled,rt=vt.onChange,Ue=vt.onInternalAutoSize,xe=(0,Xe.Z)(vt,dt),ve=(0,ye.Z)(ue,{value:Ge,postState:function(un){return un!=null?un:""}}),Ee=(0,me.Z)(ve,2),qe=Ee[0],we=Ee[1],Ne=function(un){we(un.target.value),rt==null||rt(un)},Ve=ut.useRef();ut.useImperativeHandle(Tt,function(){return{textArea:Ve.current}});var et=ut.useMemo(function(){return wt&&(0,je.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),it=(0,me.Z)(et,2),We=it[0],mt=it[1],ct=!!wt,jt=function(){try{if(document.activeElement===Ve.current){var un=Ve.current,kn=un.selectionStart,cn=un.selectionEnd,wn=un.scrollTop;Ve.current.setSelectionRange(kn,cn),Ve.current.scrollTop=wn}}catch($n){}},Ot=ut.useState(tt),se=(0,me.Z)(Ot,2),te=se[0],z=se[1],ie=ut.useState(),ce=(0,me.Z)(ie,2),ne=ce[0],ge=ce[1],ht=function(){z($t)};(0,Oe.Z)(function(){ct&&ht()},[Ge,We,mt,ct]),(0,Oe.Z)(function(){if(te===$t)z(_e);else if(te===_e){var It=pt(Ve.current,!1,We,mt);z(tt),ge(It)}else jt()},[te]);var yt=ut.useRef(),Ct=function(){De.Z.cancel(yt.current)},Ie=function(un){te===tt&&(lt==null||lt(un),wt&&(Ct(),yt.current=(0,De.Z)(function(){ht()})))};ut.useEffect(function(){return Ct},[]);var _t=ct?ne:null,Ft=(0,He.Z)((0,He.Z)({},Je),_t);return(te===$t||te===_e)&&(Ft.overflowY="hidden",Ft.overflowX="hidden"),ut.createElement(Re.Z,{onResize:Ie,disabled:!(wt||lt)},ut.createElement("textarea",(0,ae.Z)({},xe,{ref:Ve,style:Ft,className:Ke()(pe,Ce,(0,gt.Z)({},"".concat(pe,"-disabled"),Se)),disabled:Se,value:qe,onChange:Ne})))}),Fe=Lt,Qe=["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"],Pe=ut.forwardRef(function(kt,Tt){var vt,pe=kt.defaultValue,ue=kt.value,Ge=kt.onFocus,wt=kt.onBlur,lt=kt.onChange,Ce=kt.allowClear,Je=kt.maxLength,Se=kt.onCompositionStart,rt=kt.onCompositionEnd,Ue=kt.suffix,xe=kt.prefixCls,ve=xe===void 0?"rc-textarea":xe,Ee=kt.showCount,qe=kt.count,we=kt.className,Ne=kt.style,Ve=kt.disabled,et=kt.hidden,it=kt.classNames,We=kt.styles,mt=kt.onResize,ct=kt.onClear,jt=kt.onPressEnter,Ot=kt.readOnly,se=kt.autoSize,te=kt.onKeyDown,z=(0,Xe.Z)(kt,Qe),ie=(0,ye.Z)(pe,{value:ue,defaultValue:pe}),ce=(0,me.Z)(ie,2),ne=ce[0],ge=ce[1],ht=ne==null?"":String(ne),yt=ut.useState(!1),Ct=(0,me.Z)(yt,2),Ie=Ct[0],_t=Ct[1],Ft=ut.useRef(!1),It=ut.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=(0,ut.useRef)(null),$n=(0,ut.useRef)(null),_n=function(){var Qt;return(Qt=$n.current)===null||Qt===void 0?void 0:Qt.textArea},mr=function(){_n().focus()};(0,ut.useImperativeHandle)(Tt,function(){var at;return{resizableTextArea:$n.current,focus:mr,blur:function(){_n().blur()},nativeElement:((at=wn.current)===null||at===void 0?void 0:at.nativeElement)||_n()}}),(0,ut.useEffect)(function(){_t(function(at){return!Ve&&at})},[Ve]);var er=ut.useState(null),ur=(0,me.Z)(er,2),nr=ur[0],In=ur[1];ut.useEffect(function(){if(nr){var at;(at=_n()).setSelectionRange.apply(at,(0,ze.Z)(nr))}},[nr]);var rr=(0,de.Z)(qe,Ee),cr=(vt=rr.max)!==null&&vt!==void 0?vt:Je,Bn=Number(cr)>0,Xn=rr.strategy(ht),Kn=!!cr&&Xn>cr,xr=function(Qt,Cn){var Gn=Cn;!Ft.current&&rr.exceedFormatter&&rr.max&&rr.strategy(Cn)>rr.max&&(Gn=rr.exceedFormatter(Cn,{max:rr.max}),Cn!==Gn&&In([_n().selectionStart||0,_n().selectionEnd||0])),ge(Gn),(0,Ae.rJ)(Qt.currentTarget,Qt,lt,Gn)},Kt=function(Qt){Ft.current=!0,Se==null||Se(Qt)},pn=function(Qt){Ft.current=!1,xr(Qt,Qt.currentTarget.value),rt==null||rt(Qt)},En=function(Qt){xr(Qt,Qt.target.value)},An=function(Qt){Qt.key==="Enter"&&jt&&jt(Qt),te==null||te(Qt)},Jn=function(Qt){_t(!0),Ge==null||Ge(Qt)},tr=function(Qt){_t(!1),wt==null||wt(Qt)},dr=function(Qt){ge(""),mr(),(0,Ae.rJ)(_n(),Qt,lt)},Zn=Ue,Rn;rr.show&&(rr.showFormatter?Rn=rr.showFormatter({value:ht,count:Xn,maxLength:cr}):Rn="".concat(Xn).concat(Bn?" / ".concat(cr):""),Zn=ut.createElement(ut.Fragment,null,Zn,ut.createElement("span",{className:Ke()("".concat(ve,"-data-count"),it==null?void 0:it.count),style:We==null?void 0:We.count},Rn)));var hr=function(Qt){var Cn;mt==null||mt(Qt),(Cn=_n())!==null&&Cn!==void 0&&Cn.style.height&&cn(!0)},Vt=!se&&!Ee&&!Ce;return ut.createElement(ke.BaseInput,{ref:wn,value:ht,allowClear:Ce,handleReset:dr,suffix:Zn,prefixCls:ve,classNames:(0,He.Z)((0,He.Z)({},it),{},{affixWrapper:Ke()(it==null?void 0:it.affixWrapper,(0,gt.Z)((0,gt.Z)({},"".concat(ve,"-show-count"),Ee),"".concat(ve,"-textarea-allow-clear"),Ce))}),disabled:Ve,focused:Ie,className:Ke()(we,Kn&&"".concat(ve,"-out-of-range")),style:(0,He.Z)((0,He.Z)({},Ne),kn&&!Vt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Rn=="string"?Rn:void 0}},hidden:et,readOnly:Ot,onClear:ct},ut.createElement(Fe,(0,ae.Z)({},z,{autoSize:se,maxLength:Je,onKeyDown:An,onChange:En,onFocus:Jn,onBlur:tr,onCompositionStart:Kt,onCompositionEnd:pn,className:Ke()(it==null?void 0:it.textarea),style:(0,He.Z)((0,He.Z)({},We==null?void 0:We.textarea),{},{resize:Ne==null?void 0:Ne.resize}),disabled:Ve,prefixCls:ve,onResize:hr,ref:$n,readOnly:Ot})))}),Ye=Pe,zt=Ye},90472:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return kt}});var ae=fe(54476),gt=fe(67732),He=fe(83652),ze=fe(31226),me=fe(42403),Xe=fe(158),Le=fe(20068),Ke=fe(59301),ke=fe(33885),de=fe(75931),Ae=fe(76190),ye=fe(75044),ut=fe(3202),je=fe(94480),Re=fe(92310),Oe=fe.n(Re),De=fe(26112),ot=fe(48736),st=function(Tt,vt){if(Tt&&vt){var pe=Array.isArray(vt)?vt:vt.split(","),ue=Tt.name||"",Ge=Tt.type||"",wt=Ge.replace(/\/.*$/,"");return pe.some(function(lt){var Ce=lt.trim();if(/^\*(\/\*)?$/.test(lt))return!0;if(Ce.charAt(0)==="."){var Je=ue.toLowerCase(),Se=Ce.toLowerCase(),rt=[Se];return(Se===".jpg"||Se===".jpeg")&&(rt=[".jpg",".jpeg"]),rt.some(function(Ue){return Je.endsWith(Ue)})}return/\/\*$/.test(Ce)?wt===Ce.replace(/\/.*$/,""):Ge===Ce?!0:/^\w+$/.test(Ce)?((0,ot.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(Ce,"'.Skip for check.")),!0):!1})}return!0};function St(Tt,vt){var pe="cannot ".concat(Tt.method," ").concat(Tt.action," ").concat(vt.status,"'"),ue=new Error(pe);return ue.status=vt.status,ue.method=Tt.method,ue.url=Tt.action,ue}function bt(Tt){var vt=Tt.responseText||Tt.response;if(!vt)return vt;try{return JSON.parse(vt)}catch(pe){return vt}}function ft(Tt){var vt=new XMLHttpRequest;Tt.onProgress&&vt.upload&&(vt.upload.onprogress=function(wt){wt.total>0&&(wt.percent=wt.loaded/wt.total*100),Tt.onProgress(wt)});var pe=new FormData;Tt.data&&Object.keys(Tt.data).forEach(function(Ge){var wt=Tt.data[Ge];if(Array.isArray(wt)){wt.forEach(function(lt){pe.append("".concat(Ge,"[]"),lt)});return}pe.append(Ge,wt)}),Tt.file instanceof Blob?pe.append(Tt.filename,Tt.file,Tt.file.name):pe.append(Tt.filename,Tt.file),vt.onerror=function(wt){Tt.onError(wt)},vt.onload=function(){return vt.status<200||vt.status>=300?Tt.onError(St(Tt,vt),bt(vt)):Tt.onSuccess(bt(vt),vt)},vt.open(Tt.method,Tt.action,!0),Tt.withCredentials&&"withCredentials"in vt&&(vt.withCredentials=!0);var ue=Tt.headers||{};return ue["X-Requested-With"]!==null&&vt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ue).forEach(function(Ge){ue[Ge]!==null&&vt.setRequestHeader(Ge,ue[Ge])}),vt.send(pe),{abort:function(){vt.abort()}}}var pt=function(){var Tt=(0,ut.Z)((0,ye.Z)().mark(function vt(pe,ue){var Ge,wt,lt,Ce,Je,Se,rt,Ue;return(0,ye.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Se=function(){return Se=(0,ut.Z)((0,ye.Z)().mark(function qe(we){return(0,ye.Z)().wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.abrupt("return",new Promise(function(et){we.file(function(it){ue(it)?(we.fullPath&&!it.webkitRelativePath&&(Object.defineProperties(it,{webkitRelativePath:{writable:!0}}),it.webkitRelativePath=we.fullPath.replace(/^\//,""),Object.defineProperties(it,{webkitRelativePath:{writable:!1}})),et(it)):et(null)})}));case 1:case"end":return Ve.stop()}},qe)})),Se.apply(this,arguments)},Je=function(qe){return Se.apply(this,arguments)},Ce=function(){return Ce=(0,ut.Z)((0,ye.Z)().mark(function qe(we){var Ne,Ve,et,it,We;return(0,ye.Z)().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:Ne=we.createReader(),Ve=[];case 2:return ct.next=5,new Promise(function(jt){Ne.readEntries(jt,function(){return jt([])})});case 5:if(et=ct.sent,it=et.length,it){ct.next=9;break}return ct.abrupt("break",12);case 9:for(We=0;WeWe?Ve-(et-We):Ve+(et-it)}function st(we,Ne,Ve){var et=we.length,it=Ne.length,We,mt;if(et===0&&it===0)return null;et2&&arguments[2]!==void 0?arguments[2]:!1,te=jt?Ot<0&&ct.current.left||Ot>0&&ct.current.right:Ot<0&&ct.current.top||Ot>0&&ct.current.bottom;return se&&te?(clearTimeout(We.current),it.current=!1):(!te||it.current)&&mt(),!it.current&&te}};function $t(we,Ne,Ve,et,it,We,mt){var ct=(0,ye.useRef)(0),jt=(0,ye.useRef)(null),Ot=(0,ye.useRef)(null),se=(0,ye.useRef)(!1),te=dt(Ne,Ve,et,it);function z(yt,Ct){if(bt.Z.cancel(jt.current),!te(!1,Ct)){var Ie=yt;if(!Ie._virtualHandled)Ie._virtualHandled=!0;else return;ct.current+=Ct,Ot.current=Ct,pt||Ie.preventDefault(),jt.current=(0,bt.Z)(function(){var _t=se.current?10:1;mt(ct.current*_t,!1),ct.current=0})}}function ie(yt,Ct){mt(Ct,!0),pt||yt.preventDefault()}var ce=(0,ye.useRef)(null),ne=(0,ye.useRef)(null);function ge(yt){if(we){bt.Z.cancel(ne.current),ne.current=(0,bt.Z)(function(){ce.current=null},2);var Ct=yt.deltaX,Ie=yt.deltaY,_t=yt.shiftKey,Ft=Ct,It=Ie;(ce.current==="sx"||!ce.current&&_t&&Ie&&!Ct)&&(Ft=Ie,It=0,ce.current="sx");var un=Math.abs(Ft),kn=Math.abs(It);ce.current===null&&(ce.current=We&&un>kn?"x":"y"),ce.current==="y"?z(yt,It):ie(yt,Ft)}}function ht(yt){we&&(se.current=yt.detail===Ot.current)}return[ge,ht]}function _e(we,Ne,Ve,et){var it=ye.useMemo(function(){return[new Map,[]]},[we,Ve.id,et]),We=(0,me.Z)(it,2),mt=We[0],ct=We[1],jt=function(se){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se,z=mt.get(se),ie=mt.get(te);if(z===void 0||ie===void 0)for(var ce=we.length,ne=ct.length;ne0&&arguments[0]!==void 0?arguments[0]:!1;se();var ce=function(){var ht=!1;ct.current.forEach(function(yt,Ct){if(yt&&yt.offsetParent){var Ie=yt.offsetHeight,_t=getComputedStyle(yt),Ft=_t.marginTop,It=_t.marginBottom,un=Pe(Ft),kn=Pe(It),cn=Ie+un+kn;jt.current.get(Ct)!==cn&&(jt.current.set(Ct,cn),ht=!0)}}),ht&&mt(function(yt){return yt+1})};if(ie)ce();else{Ot.current+=1;var ne=Ot.current;Promise.resolve().then(function(){ne===Ot.current&&ce()})}}function z(ie,ce){var ne=we(ie),ge=ct.current.get(ne);ce?(ct.current.set(ne,ce),te()):ct.current.delete(ne),!ge!=!ce&&(ce?Ne==null||Ne(ie):Ve==null||Ve(ie))}return(0,ye.useEffect)(function(){return se},[]),[z,te,jt.current,We]}var zt=14/15;function kt(we,Ne,Ve){var et=(0,ye.useRef)(!1),it=(0,ye.useRef)(0),We=(0,ye.useRef)(0),mt=(0,ye.useRef)(null),ct=(0,ye.useRef)(null),jt,Ot=function(ie){if(et.current){var ce=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),ge=it.current-ce,ht=We.current-ne,yt=Math.abs(ge)>Math.abs(ht);yt?it.current=ce:We.current=ne;var Ct=Ve(yt,yt?ge:ht,!1,ie);Ct&&ie.preventDefault(),clearInterval(ct.current),Ct&&(ct.current=setInterval(function(){yt?ge*=zt:ht*=zt;var Ie=Math.floor(yt?ge:ht);(!Ve(yt,Ie,!0)||Math.abs(Ie)<=.1)&&clearInterval(ct.current)},16))}},se=function(){et.current=!1,jt()},te=function(ie){jt(),ie.touches.length===1&&!et.current&&(et.current=!0,it.current=Math.ceil(ie.touches[0].pageX),We.current=Math.ceil(ie.touches[0].pageY),mt.current=ie.target,mt.current.addEventListener("touchmove",Ot,{passive:!1}),mt.current.addEventListener("touchend",se,{passive:!0}))};jt=function(){mt.current&&(mt.current.removeEventListener("touchmove",Ot),mt.current.removeEventListener("touchend",se))},(0,Ae.Z)(function(){return we&&Ne.current.addEventListener("touchstart",te,{passive:!0}),function(){var z;(z=Ne.current)===null||z===void 0||z.removeEventListener("touchstart",te),jt(),clearInterval(ct.current)}},[we])}function Tt(we){return Math.floor(Math.pow(we,.5))}function vt(we,Ne){var Ve="touches"in we?we.touches[0]:we;return Ve[Ne?"pageX":"pageY"]-window[Ne?"scrollX":"scrollY"]}function pe(we,Ne,Ve){ye.useEffect(function(){var et=Ne.current;if(we&&et){var it=!1,We,mt,ct=function(){bt.Z.cancel(We)},jt=function z(){ct(),We=(0,bt.Z)(function(){Ve(mt),z()})},Ot=function(){it=!1,ct()},se=function(ie){if(!(ie.target.draggable||ie.button!==0)){var ce=ie;ce._virtualHandled||(ce._virtualHandled=!0,it=!0)}},te=function(ie){if(it){var ce=vt(ie,!1),ne=et.getBoundingClientRect(),ge=ne.top,ht=ne.bottom;if(ce<=ge){var yt=ge-ce;mt=-Tt(yt),jt()}else if(ce>=ht){var Ct=ce-ht;mt=Tt(Ct),jt()}else ct()}};return et.addEventListener("mousedown",se),et.ownerDocument.addEventListener("mouseup",Ot),et.ownerDocument.addEventListener("mousemove",te),et.ownerDocument.addEventListener("dragend",Ot),function(){et.removeEventListener("mousedown",se),et.ownerDocument.removeEventListener("mouseup",Ot),et.ownerDocument.removeEventListener("mousemove",te),et.ownerDocument.removeEventListener("dragend",Ot),ct()}}},[we])}var ue=10;function Ge(we,Ne,Ve,et,it,We,mt,ct){var jt=ye.useRef(),Ot=ye.useState(null),se=(0,me.Z)(Ot,2),te=se[0],z=se[1];return(0,Ae.Z)(function(){if(te&&te.times=0;mr-=1){var er=it(Ne[mr]),ur=Ve.get(er);if(ur===void 0){yt=!0;break}if(_n-=ur,_n<=0)break}switch(_t){case"top":Ie=It-ge;break;case"bottom":Ie=un-ht+ge;break;default:{var nr=we.current.scrollTop,In=nr+ht;ItIn&&(Ct="bottom")}}Ie!==null&&mt(Ie),Ie!==te.lastTop&&(yt=!0)}yt&&z((0,He.Z)((0,He.Z)({},te),{},{times:te.times+1,targetAlign:Ct,lastTop:Ie}))}},[te,we.current]),function(ie){if(ie==null){ct();return}if(bt.Z.cancel(jt.current),typeof ie=="number")mt(ie);else if(ie&&(0,gt.Z)(ie)==="object"){var ce,ne=ie.align;"index"in ie?ce=ie.index:ce=Ne.findIndex(function(yt){return it(yt)===ie.key});var ge=ie.offset,ht=ge===void 0?0:ge;z({times:0,index:ce,offset:ht,originAlign:ne})}}}var wt=ye.forwardRef(function(we,Ne){var Ve=we.prefixCls,et=we.rtl,it=we.scrollOffset,We=we.scrollRange,mt=we.onStartMove,ct=we.onStopMove,jt=we.onScroll,Ot=we.horizontal,se=we.spinSize,te=we.containerSize,z=we.style,ie=we.thumbStyle,ce=we.showScrollBar,ne=ye.useState(!1),ge=(0,me.Z)(ne,2),ht=ge[0],yt=ge[1],Ct=ye.useState(null),Ie=(0,me.Z)(Ct,2),_t=Ie[0],Ft=Ie[1],It=ye.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=!et,$n=ye.useRef(),_n=ye.useRef(),mr=ye.useState(ce),er=(0,me.Z)(mr,2),ur=er[0],nr=er[1],In=ye.useRef(),rr=function(){ce===!0||ce===!1||(clearTimeout(In.current),nr(!0),In.current=setTimeout(function(){nr(!1)},3e3))},cr=We-te||0,Bn=te-se||0,Xn=ye.useMemo(function(){if(it===0||cr===0)return 0;var dr=it/cr;return dr*Bn},[it,cr,Bn]),Kn=function(Zn){Zn.stopPropagation(),Zn.preventDefault()},xr=ye.useRef({top:Xn,dragging:ht,pageY:_t,startTop:kn});xr.current={top:Xn,dragging:ht,pageY:_t,startTop:kn};var Kt=function(Zn){yt(!0),Ft(vt(Zn,Ot)),cn(xr.current.top),mt(),Zn.stopPropagation(),Zn.preventDefault()};ye.useEffect(function(){var dr=function(Vt){Vt.preventDefault()},Zn=$n.current,Rn=_n.current;return Zn.addEventListener("touchstart",dr,{passive:!1}),Rn.addEventListener("touchstart",Kt,{passive:!1}),function(){Zn.removeEventListener("touchstart",dr),Rn.removeEventListener("touchstart",Kt)}},[]);var pn=ye.useRef();pn.current=cr;var En=ye.useRef();En.current=Bn,ye.useEffect(function(){if(ht){var dr,Zn=function(Vt){var at=xr.current,Qt=at.dragging,Cn=at.pageY,Gn=at.startTop;bt.Z.cancel(dr);var Te=$n.current.getBoundingClientRect(),Be=te/(Ot?Te.width:Te.height);if(Qt){var Pt=(vt(Vt,Ot)-Cn)*Be,Et=Gn;!wn&&Ot?Et-=Pt:Et+=Pt;var Ze=pn.current,Dt=En.current,Xt=Dt?Et/Dt:0,tn=Math.ceil(Xt*Ze);tn=Math.max(tn,0),tn=Math.min(tn,Ze),dr=(0,bt.Z)(function(){jt(tn,Ot)})}},Rn=function(){yt(!1),ct()};return window.addEventListener("mousemove",Zn,{passive:!0}),window.addEventListener("touchmove",Zn,{passive:!0}),window.addEventListener("mouseup",Rn,{passive:!0}),window.addEventListener("touchend",Rn,{passive:!0}),function(){window.removeEventListener("mousemove",Zn),window.removeEventListener("touchmove",Zn),window.removeEventListener("mouseup",Rn),window.removeEventListener("touchend",Rn),bt.Z.cancel(dr)}}},[ht]),ye.useEffect(function(){return rr(),function(){clearTimeout(In.current)}},[it]),ye.useImperativeHandle(Ne,function(){return{delayHidden:rr}});var An="".concat(Ve,"-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 Ot?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,ze.Z)({height:"100%",width:se},wn?"left":"right",Xn))):(Object.assign(Jn,(0,ze.Z)({width:8,top:0,bottom:0},wn?"right":"left",0)),Object.assign(tr,{width:"100%",height:se,top:Xn})),ye.createElement("div",{ref:$n,className:Ke()(An,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(An,"-horizontal"),Ot),"".concat(An,"-vertical"),!Ot),"".concat(An,"-visible"),ur)),style:(0,He.Z)((0,He.Z)({},Jn),z),onMouseDown:Kn,onMouseMove:rr},ye.createElement("div",{ref:_n,className:Ke()("".concat(An,"-thumb"),(0,ze.Z)({},"".concat(An,"-thumb-moving"),ht)),style:(0,He.Z)((0,He.Z)({},tr),ie),onMouseDown:Kt}))}),lt=wt,Ce=20;function Je(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ve=we/Ne*we;return isNaN(Ve)&&(Ve=0),Ve=Math.max(Ve,Ce),Math.floor(Ve)}var Se=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],rt=[],Ue={overflowY:"auto",overflowAnchor:"none"};function xe(we,Ne){var Ve=we.prefixCls,et=Ve===void 0?"rc-virtual-list":Ve,it=we.className,We=we.height,mt=we.itemHeight,ct=we.fullHeight,jt=ct===void 0?!0:ct,Ot=we.style,se=we.data,te=we.children,z=we.itemKey,ie=we.virtual,ce=we.direction,ne=we.scrollWidth,ge=we.component,ht=ge===void 0?"div":ge,yt=we.onScroll,Ct=we.onVirtualScroll,Ie=we.onVisibleChange,_t=we.innerProps,Ft=we.extraRender,It=we.styles,un=we.showScrollBar,kn=un===void 0?"optional":un,cn=(0,Xe.Z)(we,Se),wn=ye.useCallback(function(Wt){return typeof z=="function"?z(Wt):Wt==null?void 0:Wt[z]},[z]),$n=Ye(wn,null,null),_n=(0,me.Z)($n,4),mr=_n[0],er=_n[1],ur=_n[2],nr=_n[3],In=!!(ie!==!1&&We&&mt),rr=ye.useMemo(function(){return Object.values(ur.maps).reduce(function(Wt,Yt){return Wt+Yt},0)},[ur.id,ur.maps]),cr=In&&se&&(Math.max(mt*se.length,rr)>We||!!ne),Bn=ce==="rtl",Xn=Ke()(et,(0,ze.Z)({},"".concat(et,"-rtl"),Bn),it),Kn=se||rt,xr=(0,ye.useRef)(),Kt=(0,ye.useRef)(),pn=(0,ye.useRef)(),En=(0,ye.useState)(0),An=(0,me.Z)(En,2),Jn=An[0],tr=An[1],dr=(0,ye.useState)(0),Zn=(0,me.Z)(dr,2),Rn=Zn[0],hr=Zn[1],Vt=(0,ye.useState)(!1),at=(0,me.Z)(Vt,2),Qt=at[0],Cn=at[1],Gn=function(){Cn(!0)},Te=function(){Cn(!1)},Be={getKey:wn};function Pt(Wt){tr(function(Yt){var yn;typeof Wt=="function"?yn=Wt(Yt):yn=Wt;var on=wr(yn);return xr.current.scrollTop=on,on})}var Et=(0,ye.useRef)({start:0,end:Kn.length}),Ze=(0,ye.useRef)(),Dt=St(Kn,wn),Xt=(0,me.Z)(Dt,1),tn=Xt[0];Ze.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 Wt;return{scrollHeight:((Wt=Kt.current)===null||Wt===void 0?void 0:Wt.offsetHeight)||0,start:0,end:Kn.length-1,offset:void 0}}for(var Yt=0,yn,on,Dn,ar=Kn.length,Ut=0;Ut=Jn&&yn===void 0&&(yn=Ut,on=Yt),Mn>Jn+We&&Dn===void 0&&(Dn=Ut),Yt=Mn}return yn===void 0&&(yn=0,on=0,Dn=Math.ceil(We/mt)),Dn===void 0&&(Dn=Kn.length-1),Dn=Math.min(Dn+1,Kn.length-1),{scrollHeight:Yt,start:yn,end:Dn,offset:on}},[cr,In,Jn,Kn,nr,We]),Zt=hn.scrollHeight,qt=hn.start,At=hn.end,xt=hn.offset;Et.current.start=qt,Et.current.end=At,ye.useLayoutEffect(function(){var Wt=ur.getRecord();if(Wt.size===1){var Yt=Array.from(Wt.keys())[0],yn=Wt.get(Yt),on=Kn[qt];if(on&&yn===void 0){var Dn=wn(on);if(Dn===Yt){var ar=ur.get(Yt),Ut=ar-mt;Pt(function(Rt){return Rt+Ut})}}}ur.resetRecord()},[Zt]);var en=ye.useState({width:0,height:We}),vn=(0,me.Z)(en,2),mn=vn[0],xn=vn[1],Wn=function(Yt){xn({width:Yt.offsetWidth,height:Yt.offsetHeight})},Yn=(0,ye.useRef)(),dn=(0,ye.useRef)(),Gt=ye.useMemo(function(){return Je(mn.width,ne)},[mn.width,ne]),gn=ye.useMemo(function(){return Je(mn.height,Zt)},[mn.height,Zt]),nn=Zt-We,Hn=(0,ye.useRef)(nn);Hn.current=nn;function wr(Wt){var Yt=Wt;return Number.isNaN(Hn.current)||(Yt=Math.min(Yt,Hn.current)),Yt=Math.max(Yt,0),Yt}var Qn=Jn<=0,Lr=Jn>=nn,Mr=Rn<=0,Cr=Rn>=ne,ir=dt(Qn,Lr,Mr,Cr),Nr=function(){return{x:Bn?-Rn:Rn,y:Jn}},gr=(0,ye.useRef)(Nr()),or=(0,de.zX)(function(Wt){if(Ct){var Yt=(0,He.Z)((0,He.Z)({},Nr()),Wt);(gr.current.x!==Yt.x||gr.current.y!==Yt.y)&&(Ct(Yt),gr.current=Yt)}});function Er(Wt,Yt){var yn=Wt;Yt?((0,ut.flushSync)(function(){hr(yn)}),or()):Pt(yn)}function Ar(Wt){var Yt=Wt.currentTarget.scrollTop;Yt!==Jn&&Pt(Yt),yt==null||yt(Wt),or()}var pr=function(Yt){var yn=Yt,on=ne?ne-mn.width:0;return yn=Math.max(yn,0),yn=Math.min(yn,on),yn},qn=(0,de.zX)(function(Wt,Yt){Yt?((0,ut.flushSync)(function(){hr(function(yn){var on=yn+(Bn?-Wt:Wt);return pr(on)})}),or()):Pt(function(yn){var on=yn+Wt;return on})}),jn=$t(In,Qn,Lr,Mr,Cr,!!ne,qn),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1];kt(In,xr,function(Wt,Yt,yn,on){var Dn=on;return ir(Wt,Yt,yn)?!1:!Dn||!Dn._virtualHandled?(Dn&&(Dn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Wt?Yt:0,deltaY:Wt?0:Yt}),!0):!1}),pe(cr,xr,function(Wt){Pt(function(Yt){return Yt+Wt})}),(0,Ae.Z)(function(){function Wt(yn){var on=Qn&&yn.detail<0,Dn=Lr&&yn.detail>0;In&&!on&&!Dn&&yn.preventDefault()}var Yt=xr.current;return Yt.addEventListener("wheel",Vr,{passive:!1}),Yt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),Yt.addEventListener("MozMousePixelScroll",Wt,{passive:!1}),function(){Yt.removeEventListener("wheel",Vr),Yt.removeEventListener("DOMMouseScroll",Jr),Yt.removeEventListener("MozMousePixelScroll",Wt)}},[In,Qn,Lr]),(0,Ae.Z)(function(){if(ne){var Wt=pr(Rn);hr(Wt),or({x:Wt})}},[mn.width,ne]);var Dr=function(){var Yt,yn;(Yt=Yn.current)===null||Yt===void 0||Yt.delayHidden(),(yn=dn.current)===null||yn===void 0||yn.delayHidden()},Hr=Ge(xr,Kn,ur,mt,wn,function(){return er(!0)},Pt,Dr);ye.useImperativeHandle(Ne,function(){return{nativeElement:pn.current,getScrollInfo:Nr,scrollTo:function(Yt){function yn(on){return on&&(0,gt.Z)(on)==="object"&&("left"in on||"top"in on)}yn(Yt)?(Yt.left!==void 0&&hr(pr(Yt.left)),Hr(Yt.top)):Hr(Yt)}}}),(0,Ae.Z)(function(){if(Ie){var Wt=Kn.slice(qt,At+1);Ie(Wt,Kn)}},[qt,At,Kn]);var Fr=_e(Kn,wn,ur,mt),Zr=Ft==null?void 0:Ft({start:qt,end:At,virtual:cr,offsetX:Rn,offsetY:xt,rtl:Bn,getSize:Fr}),ii=De(Kn,qt,At,ne,Rn,mr,te,Be),Or=null;We&&(Or=(0,He.Z)((0,ze.Z)({},jt?"height":"maxHeight",We),Ue),In&&(Or.overflowY="hidden",ne&&(Or.overflowX="hidden"),Qt&&(Or.pointerEvents="none")));var Nn={};return Bn&&(Nn.dir="rtl"),ye.createElement("div",(0,ae.Z)({ref:pn,style:(0,He.Z)((0,He.Z)({},Ot),{},{position:"relative"}),className:Xn},Nn,cn),ye.createElement(ke.Z,{onResize:Wn},ye.createElement(ht,{className:"".concat(et,"-holder"),style:Or,ref:xr,onScroll:Ar,onMouseEnter:Dr},ye.createElement(Re,{prefixCls:et,height:Zt,offsetX:Rn,offsetY:xt,scrollWidth:ne,onInnerResize:er,ref:Kt,innerProps:_t,rtl:Bn,extra:Zr},ii))),cr&&Zt>We&&ye.createElement(lt,{ref:Yn,prefixCls:et,scrollOffset:Jn,scrollRange:Zt,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Te,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:Rn,scrollRange:ne,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Te,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(xe);ve.displayName="List";var Ee=ve,qe=Ee},93314:function(Nt){"use strict";Nt.exports="data:image/png;base64,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"},16722:function(Nt,Ht,fe){"use strict";fe.d(Ht,{Z:function(){return Ke}});const ae=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,gt=(ke,de)=>(!de||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",He=(ke,de)=>{if(ke.clientHeight{const ut=(je=>{if(!je.ownerDocument||!je.ownerDocument.defaultView)return null;try{return je.ownerDocument.defaultView.frameElement}catch(Re){return null}})(ye);return!!ut&&(ut.clientHeightjede||je>ke&&Re=de&&Oe>=Ae?je-ke-ye:Re>de&&OeAe?Re-de+ut:0,me=ke=>{const de=ke.parentElement;return de==null?ke.getRootNode().host||null:de},Xe=(ke,de)=>{var Ae,ye,ut,je;if(typeof document=="undefined")return[];const{scrollMode:Re,block:Oe,inline:De,boundary:ot,skipOverflowHiddenElements:st}=de,St=typeof ot=="function"?ot:lt=>lt!==ot;if(!ae(ke))throw new TypeError("Invalid target");const bt=document.scrollingElement||document.documentElement,ft=[];let pt=ke;for(;ae(pt)&&St(pt);){if(pt=me(pt),pt===bt){ft.push(pt);break}pt!=null&&pt===document.body&&He(pt)&&!He(document.documentElement)||pt!=null&&He(pt,st)&&ft.push(pt)}const dt=(ye=(Ae=window.visualViewport)==null?void 0:Ae.width)!=null?ye:innerWidth,$t=(je=(ut=window.visualViewport)==null?void 0:ut.height)!=null?je:innerHeight,{scrollX:_e,scrollY:tt}=window,{height:Lt,width:Fe,top:Qe,right:Pe,bottom:Ye,left:zt}=ke.getBoundingClientRect(),{top:kt,right:Tt,bottom:vt,left:pe}=(lt=>{const Ce=window.getComputedStyle(lt);return{top:parseFloat(Ce.scrollMarginTop)||0,right:parseFloat(Ce.scrollMarginRight)||0,bottom:parseFloat(Ce.scrollMarginBottom)||0,left:parseFloat(Ce.scrollMarginLeft)||0}})(ke);let ue=Oe==="start"||Oe==="nearest"?Qe-kt:Oe==="end"?Ye+vt:Qe+Lt/2-kt+vt,Ge=De==="center"?zt+Fe/2-pe+Tt:De==="end"?Pe+Tt:zt-pe;const wt=[];for(let lt=0;lt=0&&zt>=0&&Ye<=$t&&Pe<=dt&&(Ce===bt&&!He(Ce)||Qe>=rt&&Ye<=xe&&zt>=ve&&Pe<=Ue))return wt;const Ee=getComputedStyle(Ce),qe=parseInt(Ee.borderLeftWidth,10),we=parseInt(Ee.borderTopWidth,10),Ne=parseInt(Ee.borderRightWidth,10),Ve=parseInt(Ee.borderBottomWidth,10);let et=0,it=0;const We="offsetWidth"in Ce?Ce.offsetWidth-Ce.clientWidth-qe-Ne:0,mt="offsetHeight"in Ce?Ce.offsetHeight-Ce.clientHeight-we-Ve:0,ct="offsetWidth"in Ce?Ce.offsetWidth===0?0:Se/Ce.offsetWidth:0,jt="offsetHeight"in Ce?Ce.offsetHeight===0?0:Je/Ce.offsetHeight:0;if(bt===Ce)et=Oe==="start"?ue:Oe==="end"?ue-$t:Oe==="nearest"?ze(tt,tt+$t,$t,we,Ve,tt+ue,tt+ue+Lt,Lt):ue-$t/2,it=De==="start"?Ge:De==="center"?Ge-dt/2:De==="end"?Ge-dt:ze(_e,_e+dt,dt,qe,Ne,_e+Ge,_e+Ge+Fe,Fe),et=Math.max(0,et+tt),it=Math.max(0,it+_e);else{et=Oe==="start"?ue-rt-we:Oe==="end"?ue-xe+Ve+mt:Oe==="nearest"?ze(rt,xe,Je,we,Ve+mt,ue,ue+Lt,Lt):ue-(rt+Je/2)+mt/2,it=De==="start"?Ge-ve-qe:De==="center"?Ge-(ve+Se/2)+We/2:De==="end"?Ge-Ue+Ne+We:ze(ve,Ue,Se,qe,Ne+We,Ge,Ge+Fe,Fe);const{scrollLeft:Ot,scrollTop:se}=Ce;et=jt===0?0:Math.max(0,Math.min(se+et/jt,Ce.scrollHeight-Je/jt+mt)),it=ct===0?0:Math.max(0,Math.min(Ot+it/ct,Ce.scrollWidth-Se/ct+We)),ue+=se-et,Ge+=Ot-it}wt.push({el:Ce,top:et,left:it})}return wt},Le=ke=>ke===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function Ke(ke,de){if(!ke.isConnected||!(ut=>{let je=ut;for(;je&&je.parentNode;){if(je.parentNode===document)return!0;je=je.parentNode instanceof ShadowRoot?je.parentNode.host:je.parentNode}return!1})(ke))return;const Ae=(ut=>{const je=window.getComputedStyle(ut);return{top:parseFloat(je.scrollMarginTop)||0,right:parseFloat(je.scrollMarginRight)||0,bottom:parseFloat(je.scrollMarginBottom)||0,left:parseFloat(je.scrollMarginLeft)||0}})(ke);if((ut=>typeof ut=="object"&&typeof ut.behavior=="function")(de))return de.behavior(Xe(ke,de));const ye=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:ut,top:je,left:Re}of Xe(ke,Le(de))){const Oe=je-Ae.top+Ae.bottom,De=Re-Ae.left+Ae.right;ut.scroll({top:Oe,left:De,behavior:ye})}}}}]);