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

1106 lines
648 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[8517],{2018:function(){"use strict"},40862:function(Rt,zt){"use strict";zt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},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 Rt={},zt="5.0",fe={},ae=null,ft=!1,Ne=!1,ze=null,me=!1,Je=null,Ae=null,Qe=0;Qe<arguments.length;Qe++){var Se=arguments[Qe];if(Se!==null)switch(typeof Se){case"number":zt=Se.toFixed(1);break;case"string":Se.match(new RegExp("^[0-9]\\.[0-9]+$"))?zt=Se:ze=Se;break;case"object":typeof Se.is3D!="undefined"?ae=Se:fe=Se;break;case"boolean":ft=Se,Ne=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},fe.material_id!==void 0&&!Ne&&(ft=!0)),ze!==null&&fe.id===void 0&&(fe.id=ze);var de="",Me="",ye=!1,ht=null,je=null,Ie=null,Re=!1,De=null,ot=null,lt=null,wt=null,mt=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var pt=function(we){return parseFloat(we)>4?parseFloat(we):5};Rt.setHTML5Codebase=function(we,Xe){Ae=we,_e(we,Xe)},Rt.setJavaCodebase=Rt.setJavaCodebaseVersion=Rt.isCompiledInstalled=Rt.setPreCompiledScriptPath=Rt.setPreCompiledResourcePath=function(){},Rt.setHTML5CodebaseVersion=function(we,Xe){var Ge=parseFloat(we);if(Ge!==NaN&&Ge<5){console.log("The GeoGebra HTML5 codebase version "+Ge+" is deprecated. Using version latest instead.");return}Je=we,ue(we,Xe)},Rt.getHTML5CodebaseVersion=function(){return je},Rt.getParameters=function(){return fe},Rt.setFontsCSSURL=function(we){wt=we},Rt.setGiacJSURL=function(we){},Rt.setJNLPFile=function(we){de=we},Rt.setJNLPBaseDir=function(we){},Rt.inject=function(){function we(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Xe="auto",Ge=fe.id,Mt,ut=!1,Ce=0;Ce<arguments.length;Ce++){var ve=arguments[Ce];typeof ve=="string"?(ve=ve.toLowerCase(),ve.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Xe=ve:Ge=arguments[Ce]):typeof ve=="boolean"?ut=ve:ve instanceof HTMLElement&&(Mt=ve)}Le();function Le(){if(!me){setTimeout(Le,200);return}Xe=at(Xe);var Ve=Mt||document.getElementById(Ge);if(!Ve){console.log("possibly bug on ajax loading? ");return}if(Rt.removeExistingApplet(Ve,!1),fe.width===void 0&&Ve.clientWidth&&(fe.width=Ve.clientWidth),fe.height===void 0&&Ve.clientHeight&&(fe.height=Ve.clientHeight),!(fe.width&&fe.height)&&Xe==="html5"&&(delete fe.width,delete fe.height),ht=Xe,Xe==="screenshot")ke(Ve,fe);else{var xe=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?xe=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(xe=(!dt()||we())&&rt()),xe?(ht="screenshot",Ht(Ve,fe,ut,Xe)):Ze(Ve,fe,ut)}}};function dt(){try{return window.self!==window.top}catch(we){return!0}}function rt(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Rt.getViews=function(){return ae},Rt.isJavaInstalled=function(){return!1};var Qt=function(we){var Xe=function(Ce){var ve=JSON.parse(Ce),Le=function(We){return We.type=="G"||We.type=="E"},Ve=ve.elements?ve.elements.filter(Le)[0]:ve;if(!Ve||!Ve.url){Ge();return}fe.fileName=Ve.url,Oe(Ve.settings||{}),ae.is3D=!0;var xe="https://www.geogebra.org/images/";Rt.setPreviewImage(De||Ve.previewUrl,xe+"GeoGebra_loading.png",xe+"applet_play.png"),we()},Ge=function(){fe.onError&&fe.onError(),yt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},Mt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",ut="/materials/"+fe.material_id+"?scope=basic";$e("https://"+Mt+"/api/proxy.php?path="+encodeURIComponent(ut),Xe,Ge)};function Oe(we){var Xe=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ge){we[Ge]=!!we[Ge]}),Xe.forEach(function(Ge){fe[Ge]===void 0&&we[Ge]!==void 0&&(fe[Ge]=we[Ge])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function $e(we,Xe,Ge){var Mt=new XMLHttpRequest;Mt.open("GET",we),Mt.onload=function(){Xe(Mt.responseText)},Mt.onerror=Ge,Mt.send()}Rt.isHTML5Installed=function(){return!0},Rt.getLoadedAppletType=function(){return ht},Rt.setPreviewImage=function(we,Xe,Ge){De=we,ot=Xe,lt=Ge},Rt.removeExistingApplet=function(we,Xe){var Ge;typeof we=="string"&&(we=document.getElementById(we)),ht=null;var Mt=null;for(Ge=0;Ge<we.childNodes.length;Ge++){var ut=we.childNodes[Ge],Ce=ut.className;Ce==="applet_screenshot"?Xe?(ut.style.display="block",ht="screenshot"):ut.style.display="none":Ce!=="applet_scaler prerender"&&(we.removeChild(ut),Mt=Ce&&Ce.indexOf("appletParameters")!=-1?ut.id:null,Ge--)}var ve=fe.id!==void 0?fe.id:Mt,Le=window[ve];Le&&typeof Le.getBase64=="function"&&(Le.remove(),window[ve]=null)},Rt.refreshHitPoints=function(){if(pt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var we=Rt.getAppletObject();return we&&typeof we.recalculateEnvironments=="function"?(we.recalculateEnvironments(),!0):!1},Rt.startAnimation=function(){var we=Rt.getAppletObject();return we&&typeof we.startAnimation=="function"?(we.startAnimation(),!0):!1},Rt.stopAnimation=function(){var we=Rt.getAppletObject();return we&&typeof we.stopAnimation=="function"?(we.stopAnimation(),!0):!1},Rt.getAppletObject=function(){var we=fe.id!==void 0?fe.id:"ggbApplet";return window[we]},Rt.resize=function(){};var Lt=function(we,Xe,Ge){var Mt=document.createElement("param");Mt.setAttribute("name",Xe),Mt.setAttribute("value",Ge),we.appendChild(Mt)},Pe=function(we){return we&&we!=="false"},Ze=function(we,Xe,Ge){pt(je)<=4.2&&(Ge=!0);var Mt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==je||ggbHTML5LoadedCodebaseIsWebSimple&&!Re)&&(Mt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var ut=document.createElement("div");ut.classList.add("appletParameters","notranslate");var Ce=Xe.width,ve=Xe.height;if(Xe.disableAutoScale=Xe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Xe.disableAutoScale,Xe.width!==void 0)if(pt(je)<=4.4)Pe(Xe.showToolBar)&&(Xe.height-=7),Pe(Xe.showAlgebraInput)&&(Xe.height-=37),Xe.width<605&&Pe(Xe.showToolBar)&&(Xe.width=605,Ce=605);else{var Le=100;(Pe(Xe.showToolBar)||Pe(Xe.showMenuBar))&&(Xe.hasOwnProperty("customToolBar")&&(Xe.customToolbar=Xe.customToolBar),Le=Pe(Xe.showMenuBar)?245:155),Ce<Le&&(Xe.width=Le,Ce=Le)}ut.style.border="none",ut.style.display="inline-block";for(var Ve in Xe)Xe.hasOwnProperty(Ve)&&Ve!=="appletOnLoad"&&ut.setAttribute("data-param-"+Ve,Xe[Ve]);wt&&ut.setAttribute("data-param-fontscssurl",wt),Rt.resize=function(){GGBAppletUtils.responsiveResize(we,Xe)},window.addEventListener("resize",function(ee){Rt.resize()});var xe=typeof Xe.appletOnLoad=="function"?Xe.appletOnLoad:function(){};if(!Ge&&Xe.width!==void 0){Xe.hasOwnProperty("showSplash")||ut.setAttribute("data-param-showSplash","false");var We=we.querySelector(".applet_scaler.prerender"),Ke=We!==null;if(Ke)var et=We.querySelector(".ggb_preview");else{var et=Ct(Ce,ve,Xe.borderColor,!1);We=document.createElement("div"),We.className="applet_scaler",We.style.position="relative",We.style.display="block",We.style.width=Ce+"px",We.style.height=ve+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(We,"66%"),pt(je)>=5?(Xe.appletOnLoad=function(ee){var ie=we.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(We),window.GGBT_wsf_view&&$(window).trigger("resize"),xe(ee)},Ke||We.appendChild(et)):ut.appendChild(et),We.appendChild(ut),Ke||we.appendChild(We),setTimeout(function(){Rt.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(ut),we.appendChild(nt),Xe.appletOnLoad=function(ee){Rt.resize(),xe(ee)}}function Ye(ee,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,ie.appletOnLoad):renderGGBElement(ee),yt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function bt(ee,ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ee,params:ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ce){Ye(ce.article,ce.params)}),html5AppletsToProcess=null)},pt(je)<5&&(ee.className+=" geogebraweb")):Ye(ee,ie)}if(Mt){scriptLoadStarted=!0;for(var kt=0;kt<ut.childNodes.length;kt++){var Jt=ut.childNodes[kt].tagName;Jt==="TABLE"&&(ut.removeChild(ut.childNodes[kt]),kt--)}if(ggbHTML5LoadedScript!==null){var Wt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Wt!=null&&Wt.parentNode.removeChild(Wt)}var se=document.createElement("script"),te=function(){bt(ut,Xe)};se.src=Me+Ie,ggbHTML5LoadedCodebaseIsWebSimple=Re,ggbHTML5LoadedCodebaseVersion=je,ggbHTML5LoadedScript=se.src,yt("GeoGebra HTML5 codebase loaded: '"+Me+"'.",Xe),!Ae&&(!Je||Je=="5.0")?(Re?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),te()):Me.requirejs?__webpack_require__.e(7989).then(function(){var ee=[__webpack_require__(87989)];te.apply(null,ee)}.bind(this)).catch(__webpack_require__.oe):(se.onload=te,we.appendChild(se))}else bt(ut,Xe);Xe.height=ve,Xe.width=Ce},ke=function(we,Xe,Ge){var Mt=Ct(Xe.width,Xe.height,Xe.borderColor,Ge),ut=document.createElement("div");ut.style.position="relative",ut.style.display="block",ut.style.width=Xe.width+"px",ut.style.height=Xe.height+"px",ut.className="applet_screenshot applet_scaler"+(Ge?" applet_screenshot_play":""),ut.appendChild(Mt);var Ce=GGBAppletUtils.getScale(Xe,we,Ge);Ge?(we.appendChild(St()),window.GGBT_wsf_view||(we.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ut,"66%"),we.appendChild(ut),Ce!==1&&!isNaN(Ce)&&(GGBAppletUtils.scaleElement(ut,Ce),ut.style.width=Xe.width+"px",ut.style.height=Xe.height+"px",ut.parentNode.style.width=Xe.width*Ce+"px",ut.parentNode.style.height=Xe.height*Ce+"px"),Rt.resize=function(){Ue(we,Mt,ut,Ge)},window.addEventListener("resize",function(ve){Rt.resize()}),Rt.resize()};function Ue(we,Xe,Ge,Mt){if(we.contains(Xe)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(we)}var ut=GGBAppletUtils.getScale(fe,we,Mt);Ge.parentNode!==null&&(!isNaN(ut)&&ut!==1?(GGBAppletUtils.scaleElement(Ge,ut),Ge.parentNode.style.width=fe.width*ut+"px",Ge.parentNode.style.height=fe.height*ut+"px"):(GGBAppletUtils.scaleElement(Ge,1),Ge.parentNode.style.width=fe.width+"px",Ge.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(we),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Rt.onExitFullscreen=function(we,Xe){Xe.appendChild(we)};var Ht=function(we,Xe,Ge,Mt){ke(we,Xe,!0);for(var ut=function(){var Le=[];for(ve=0;ve<we.childNodes.length;ve++)Le.push(we.childNodes[ve]);if(window.GGBT_wsf_view){var Ve=window.GGBT_wsf_view.renderFullScreen(we,Xe.id),xe=document.getElementById("fullscreencontainer"),We=jQuery(we).find(".fullscreencontent");We.length>0?(Ve.remove(),We.attr("id","fullscreencontent").show(),jQuery(xe).append(We),window.dispatchEvent(new Event("resize"))):Ze(Ve,Xe,!1),window.GGBT_wsf_view.launchFullScreen(xe)}else ht=Mt,Ze(we,Xe,!1);if(!window.GGBT_wsf_view)for(ve=0;ve<Le.length;ve++)we.removeChild(Le[ve])},Ce=we.getElementsByClassName("ggb_preview_play"),ve=0;ve<Ce.length;ve++)Ce[ve].addEventListener("click",ut,!1),Ce[ve].addEventListener("ontouchstart",ut,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(we),rt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},St=function(){var we=document.createElement("div");if(we.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Xe='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Ge=document.createElement("style");Ge.styleSheet?Ge.styleSheet.cssText=Xe:Ge.appendChild(document.createTextNode(Xe)),document.getElementsByTagName("head")[0].appendChild(Ge)}return we},Ct=function(we,Xe,Ge,Mt){var ut=document.createElement("div");ut.className="ggb_preview",ut.style.position="absolute",ut.style.zIndex="90",ut.style.width=we-2+"px",ut.style.height=Xe-2+"px",ut.style.top="0px",ut.style.left="0px",ut.style.overflow="hidden",ut.style.backgroundColor="white";var Ce="lightgrey";Ge!==void 0&&(Ge==="none"?Ce="transparent":Ce=Ge),ut.style.border="1px solid "+Ce;var ve=document.createElement("img");if(ve.style.position="relative",ve.style.zIndex="1000",ve.style.top="-1px",ve.style.left="-1px",De!==null&&ve.setAttribute("src",De),ve.style.opacity=.7,ot!==null){var Le,Ve,xe;if(!Mt){Le=document.createElement("img"),Le.style.position="absolute",Le.style.zIndex="1001",Le.style.opacity=1,ve.style.opacity=.3,Ve=360,Ve>we/4*3&&(Ve=we/4*3),xe=Ve/5.8,Le.setAttribute("src",ot),Le.setAttribute("width",Ve),Le.setAttribute("height",xe);var We=(we-Ve)/2,Ke=(Xe-xe)/2;Le.style.left=We+"px",Le.style.top=Ke+"px",ut.appendChild(Le)}}return ut.appendChild(ve),ut},at=function(we){return we=we.toLowerCase(),we==="html5"||we==="screenshot"?we:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ue=function(we,Xe){if(je=we,Xe){_e(je,!0);return}var Ge=!ft;if(Ge){var Mt=pt(je);!isNaN(Mt)&&Mt<4.4&&(Ge=!1)}var ut,Ce;window.location.protocol.substr(0,4)==="http"?ut=window.location.protocol:ut="http:";var ve=je.indexOf("//");ve>0?Ce=je:ve===0?Ce=ut+je:Ce="https://www.geogebra.org/apps/5.2.814.0/";for(var Le in pe)if(je.slice(pe[Le].length*-1)===pe[Le]||je.slice((pe[Le].length+1)*-1)===pe[Le]+"/"){_e(Ce,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ge&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Pe(fe.showToolBar)&&!Pe(fe.showMenuBar)&&!Pe(fe.showAlgebraInput)&&!Pe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Ce+="webSimple/":Ce+="web3d/",_e(Ce,!1)},_e=function(we,Xe){if(we.requirejs){Me=we;return}we.slice(-1)!=="/"&&(we+="/"),Me=we,Xe===null&&(Xe=we.indexOf("http")===-1),ye=Xe,Ie="web.nocache.js",Re=!1;var Ge=Me.split("/");Ge.length>1&&(!Xe&&Ge[Ge.length-2]==="webSimple"?(Ie="webSimple.nocache.js",Re=!0):pe.indexOf(Ge[Ge.length-2])>=0&&(Ie=Ge[Ge.length-2]+".nocache.js")),Ge=we.split("/"),je=Ge[Ge.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 Mt=parseFloat(je);Mt!==NaN&&Mt<5&&we.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Mt+" is deprecated. Using version latest instead."),ue("5.0",Xe))},yt=function(we,Xe){window.console&&window.console.log&&(!Xe||typeof Xe.showLogging=="undefined"||Xe.showLogging&&Xe.showLogging!=="false")&&console.log(we)};fe.material_id!==void 0?Qt(st):st();function st(){var we=zt;Je!==null?we=Je:parseFloat(we)<5&&(we="5.0"),ue(we,!1),Ae!==null&&_e(Ae,ye),me=!0}return Rt},GGBAppletUtils=function(){"use strict";function Rt(){return window.GGBT_wsf_edit!==void 0}function zt(me,Je){Je!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+Je+","+Je+")",me.style.webkitTransform="scale("+Je+","+Je+")",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,Je,Ae,Qe,Se,de){var Me=null;if(de!=null&&de!="")for(var ye=me.parentNode;ye!=null;)if((" "+ye.className+" ").indexOf(" "+de+" ")>-1){Me=ye;break}else ye=ye.parentNode;var ht=0,je=0,Ie=0,Re=0,De=0,ot=0,lt=0;if(Me)ht=Me.offsetWidth,je=Math.max(Qe?Me.offsetWidth:0,Me.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ht=Math.min(window.innerWidth,document.documentElement.clientWidth),je=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=ht):(ht=window.innerWidth,je=window.innerHeight,Ie=window.innerWidth),me){var wt=me.getBoundingClientRect();wt.left>0&&wt.left<=ht&&(Se===void 0||!Se)&&(document.dir==="rtl"?(De=ht-wt.width-wt.left,ot=Ie<=480?10:30):(ot=wt.left,De=Ie<=480?10:30),Re=ot+De)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var mt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Re=40,lt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Re=0,lt=40)}}return me&&((Ae===void 0||!Ae)&&Je>0&&Je+Re<ht?ht=Je:ht-=Re,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ae===void 0||!Ae)&&(je-=lt)),{width:ht,height:je}}function ae(me,Je,Ae,Qe,Se){if(me.isScreenshoGenerator)return 1;var de=Qe!==void 0&&Qe,Me=me.noScaleMargin!=null&&me.noScaleMargin,ye=function(mt){return mt&&mt!=="false"},ht=ye(me.autoHeight),je=fe(Je,me.width,Ae,ht,de&&window.GGBT_wsf_view||Me,Se),Ie=parseInt(je.width),Re=me.width,De=me.height;if(Re===void 0){var ot=Je.querySelector(".appletParameters");ot&&(Re=ot.offsetWidth,De=ot.offsetHeight)}var lt=Ie/Re,wt=de?1:je.height/De;return Ae!==void 0&&!Ae&&(lt=Math.min(1,lt),wt=Math.min(1,wt)),Math.min(lt,wt)}function ft(me,Je,Ae){var Qe=1,Se,de=!1;if(me.hasOwnProperty("allowUpscale")&&(de=me.allowUpscale),me.hasOwnProperty("scale")&&(Qe=parseFloat(me.scale),(isNaN(Qe)||Qe===null||Qe===0)&&(Qe=1),Qe>1&&(de=!0)),Je&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))Se=ae(me,Je,de,Ae,me.scaleContainerClass);else return Qe;return de&&(!me.hasOwnProperty("scale")||Qe===1)?Se:Math.min(Qe,Se)}function Ne(me){var Je=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),Qe=me.getBoundingClientRect(),Se=(Je-Qe.width)/2,de=(Ae-Qe.height)/2;de<0&&(de=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Se<40?me.style.left="40px":me.style.left=Se+"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=Se+"px")}function ze(me,Je){var Ae=me.querySelector(".appletParameters");if(Ae){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Je.id!==Ae.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Ae.parentElement&&/fullscreen/.test(Ae.parentElement.className))return;var Qe=ft(Je,me);Rt()&&Ae.setAttribute("data-param-scale",Qe);for(var Se=null,de=0;de<me.childNodes.length;de++)if(me.childNodes[de].className!==void 0&&me.childNodes[de].className.match(/^applet_scaler/)){Se=me.childNodes[de];break}if(Se!==null&&Se.querySelector(".noscale")!==null)return;var Me=Je.id!==void 0?Je.id:"ggbApplet",ye=window[Me];(ye==null||!ye.recalculateEnvironments)&&Se!==null&&!Se.className.match(/fullscreen/)&&(Se.parentNode.style.transform="",!isNaN(Qe)&&Qe!==1?(Se.parentNode.style.width=Je.width*Qe+"px",Se.parentNode.style.height=Je.height*Qe+"px",zt(Se,Qe)):(zt(Se,1),Se.parentNode.style.width=Je.width+"px",Se.parentNode.style.height=Je.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ne(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ae).parents(".content-added-content"))}}return{responsiveResize:ze,isFlexibleWorksheetEditor:Rt,positionCenter:Ne,getScale:ft,scaleElement:zt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Rt=n.location.search;return Rt.indexOf(J)!=-1||Rt.indexOf(K)!=-1}function q(Rt,zt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Rt){var zt=s[L].bindings;s[L].bindings=function(){for(var fe=zt?zt():{},ae=Rt[webModule.__softPermutationId],ft=O;ft<ae.length;ft++){var Ne=ae[ft];fe[Ne[O]]=Ne[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Rt=o.createElement(Q);if(Rt.id=L,Rt.style.cssText=R+S,Rt.tabIndex=-1,o.body.appendChild(Rt),t=Rt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var zt=document.compatMode==U?V:W;t.write(zt+X),t.close()}}}function w(Rt){function zt(ae){function ft(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ne=ft();if(Ne){ae();return}function ze(){if(!Ne){if(!ft())return;Ne=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,ze,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,ze,!1);var me=setInterval(function(){ze()},$)}function fe(ae){var ft=u(),Ne=ft.body,ze=ft.createElement(_);ze.language=ab,ze.crossOrigin=W,ze.src=ae,webModule.__errFn&&(ze.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),Ne.appendChild(ze)}zt(function(){fe(Rt)})}webModule.__startLoadingFragment=function(Rt){return C(Rt)},webModule.__installRunAsyncCode=function(Rt){var zt=u(),fe=zt.body,ae=zt.createElement(_);ae.language=ab,ae.text=Rt,fe.appendChild(ae),fe.removeChild(ae)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=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(Rt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Rt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Rt){var zt=c[Rt];return zt==null?null:zt},r=d,webModule.__errFn=e}function B(){function Rt(me){var Je=me.lastIndexOf(rb);Je==-1&&(Je=me.length);var Ae=me.indexOf(sb);Ae==-1&&(Ae=me.length);var Qe=me.lastIndexOf(tb,Math.min(Ae,Je));return Qe>=O?me.substring(O,Qe+P):W}function zt(me){if(!me.match(/^\w+:\/\//)){var Je=o.createElement(ub);Je.src=me+vb,me=Rt(Je.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function ae(){for(var me=o.getElementsByTagName(_),Je=O;Je<me.length;++Je)if(me[Je].src.indexOf(xb)!=-1)return Rt(me[Je].src);return W}function ft(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Ne(){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=ft()),ze==W&&Ne()&&(ze=Rt(o.location.href)),ze=zt(ze),ze}function C(Rt){return Rt.match(/^\//)||Rt.match(/^[a-zA-Z]+:\/\//)?Rt:webModule.__moduleBase+Rt}function D(){var Rt=[],zt=O,fe=[],ae=[];function ft(me){var Je=ae[me](),Ae=fe[me];if(Je in Ae)return Je;var Qe=[];for(var Se in Ae)Qe[Ae[Se]]=Se;throw r&&r(me,Qe,Je),null}if(__gwt_isKnownPropertyValue=function(me,Je){return Je in fe[me]},webModule.__getPropMap=function(){var me={};for(var Je in fe)fe.hasOwnProperty(Je)&&(me[Je]=ft(Je));return me},webModule.__computePropValue=ft,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var ze=Ne.indexOf(Db);ze!=-1&&(zt=parseInt(Ne.substring(ze+P),$),Ne=Ne.substring(O,ze))}catch(me){}return webModule.__softPermutationId=zt,C(Ne+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(Rt,zt,fe){"use strict";fe.d(zt,{Ax:function(){return ze},Ds:function(){return me},KI:function(){return Ae},SI:function(){return Ne},f1:function(){return ft}});var ae=fe(26869);function ft(Qe){let Se=!0;if(Qe.length>0){for(let de=0;de<Qe.length;de++)if(Qe[de].compile_success==0||!Qe[de].compile_success){Se=!1;break}}else Se=!1;return Se}function Ne(Qe,Se=""){let de=[];for(let Me=0;Me<Qe.length;Me++){let ye=Qe[Me],ht=Se?`${Se}/${ye.name}`:`${ye.name}`;de.push({title:ye.name,type:ye.type,isLeaf:ye.type!=="tree",key:ht})}return de}function ze(Qe,Se,de){for(let Me=0;Me<Qe.length;Me++){let ye=Qe[Me];if(ye.key===Se){ye.children=de;break}ye.children&&ze(ye.children,Se,de)}return Qe}function me(Qe,Se,de){let Me;return function(){let ye=this,ht=arguments,je=function(){Me=null,de||Qe.apply(ye,ht)},Ie=de&&!Me;clearTimeout(Me),Me=setTimeout(je,Se),Ie&&Qe.apply(ye,ht)}}const Je=!0,Ae=ae.Z.API_SERVER},1986:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return Wt}});var ae=fe(59301),ft={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=fe(92310),ze=fe.n(Ne),me=fe(29787);var Je=function(se,te){return(Je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ie){ee.__proto__=ie}||function(ee,ie){for(var ce in ie)Object.prototype.hasOwnProperty.call(ie,ce)&&(ee[ce]=ie[ce])})(se,te)};function Ae(se,te){function ee(){this.constructor=se}Je(se,te),se.prototype=te===null?Object.create(te):(ee.prototype=te.prototype,new ee)}function Qe(se,te,ee,ie){return new(ee||(ee=Promise))(function(ce,ne){function ge(xt){try{vt(ie.next(xt))}catch(Fe){ne(Fe)}}function ct(xt){try{vt(ie.throw(xt))}catch(Fe){ne(Fe)}}function vt(xt){var Fe;xt.done?ce(xt.value):(Fe=xt.value,Fe instanceof ee?Fe:new ee(function(Zt){Zt(Fe)})).then(ge,ct)}vt((ie=ie.apply(se,te||[])).next())})}function Se(se,te){var ee,ie,ce,ne,ge={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return ne={next:ct(0),throw:ct(1),return:ct(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function ct(vt){return function(xt){return function(Fe){if(ee)throw new TypeError("Generator is already executing.");for(;ge;)try{if(ee=1,ie&&(ce=2&Fe[0]?ie.return:Fe[0]?ie.throw||((ce=ie.return)&&ce.call(ie),0):ie.next)&&!(ce=ce.call(ie,Fe[1])).done)return ce;switch(ie=0,ce&&(Fe=[2&Fe[0],ce.value]),Fe[0]){case 0:case 1:ce=Fe;break;case 4:return ge.label++,{value:Fe[1],done:!1};case 5:ge.label++,ie=Fe[1],Fe=[0];continue;case 7:Fe=ge.ops.pop(),ge.trys.pop();continue;default:if(ce=ge.trys,!((ce=ce.length>0&&ce[ce.length-1])||Fe[0]!==6&&Fe[0]!==2)){ge=0;continue}if(Fe[0]===3&&(!ce||Fe[1]>ce[0]&&Fe[1]<ce[3])){ge.label=Fe[1];break}if(Fe[0]===6&&ge.label<ce[1]){ge.label=ce[1],ce=Fe;break}if(ce&&ge.label<ce[2]){ge.label=ce[2],ge.ops.push(Fe);break}ce[2]&&ge.ops.pop(),ge.trys.pop();continue}Fe=te.call(se,ge)}catch(Zt){Fe=[6,Zt],ie=0}finally{ee=ce=0}if(5&Fe[0])throw Fe[1];return{value:Fe[0]?Fe[1]:void 0,done:!0}}([vt,xt])}}}function de(){for(var se=0,te=0,ee=arguments.length;te<ee;te++)se+=arguments[te].length;var ie=Array(se),ce=0;for(te=0;te<ee;te++)for(var ne=arguments[te],ge=0,ct=ne.length;ge<ct;ge++,ce++)ie[ce]=ne[ge];return ie}var Me=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(te,ee){for(var ie=0,ce=ee;ie<ce.length;ie++){var ne=ce[ie],ge=ne[0],ct=ne[1];te.setAttribute(ge,ct)}},se.createRect=function(te,ee,ie){var ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return ce.setAttribute("width",te.toString()),ce.setAttribute("height",ee.toString()),ie&&se.setAttributes(ce,ie),ce},se.createLine=function(te,ee,ie,ce,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",te.toString()),ge.setAttribute("y1",ee.toString()),ge.setAttribute("x2",ie.toString()),ge.setAttribute("y2",ce.toString()),ne&&se.setAttributes(ge,ne),ge},se.createPolygon=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",te),ee&&se.setAttributes(ie,ee),ie},se.createCircle=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(te/2).toString()),ie.setAttribute("cy",(te/2).toString()),ie.setAttribute("r",te.toString()),ee&&se.setAttributes(ie,ee),ie},se.createEllipse=function(te,ee,ie){var ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ce.setAttribute("cx",(te/2).toString()),ce.setAttribute("cy",(ee/2).toString()),ce.setAttribute("rx",(te/2).toString()),ce.setAttribute("ry",(ee/2).toString()),ie&&se.setAttributes(ce,ie),ce},se.createGroup=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&se.setAttributes(ee,te),ee},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(te,ee,ie,ce,ne,ge,ct){var vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(vt,[["id",te],["orient",ee],["markerWidth",ie.toString()],["markerHeight",ce.toString()],["refX",ne.toString()],["refY",ge.toString()]]),vt.appendChild(ct),vt},se.createText=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),te&&se.setAttributes(ee,te),ee},se.createTSpan=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=te,ee&&se.setAttributes(ie,ee),ie},se.createImage=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&se.setAttributes(ee,te),ee},se.createPoint=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=te,ie.y=ee,ie},se.createPath=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",te),ee&&se.setAttributes(ie,ee),ie},se}(),ye=function(){function se(){}return se.addKey=function(te){se.key=te},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),ht=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(te,ee,ie){var ce=this;return new Promise(function(ne){var ge=ie!==void 0?ie:document.createElement("canvas");te===null&&(ce.markersOnly=!0,ce.naturalSize=!1);var ct=document.createElementNS("http://www.w3.org/2000/svg","svg");ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),ct.setAttribute("width",ee.width.baseVal.valueAsString),ct.setAttribute("height",ee.height.baseVal.valueAsString),ct.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),ct.innerHTML=ee.innerHTML,ce.naturalSize===!0?(ct.width.baseVal.value=te.naturalWidth,ct.height.baseVal.value=te.naturalHeight):ce.width!==void 0&&ce.height!==void 0&&(ct.width.baseVal.value=ce.width,ct.height.baseVal.value=ce.height),ge.width=ct.width.baseVal.value,ge.height=ct.height.baseVal.value;var vt=ct.outerHTML,xt=ge.getContext("2d");ce.markersOnly!==!0&&xt.drawImage(te,0,0,ge.width,ge.height);var Fe=window.URL,Zt=new Image(ge.width,ge.height);Zt.setAttribute("crossOrigin","anonymous");var Nt=new Blob([vt],{type:"image/svg+xml"}),Ft=Fe.createObjectURL(Nt);Zt.onload=function(){xt.drawImage(Zt,0,0),Fe.revokeObjectURL(Ft);var un=ge.toDataURL(ce.imageType,ce.imageQuality);ne(un)},Zt.src=Ft})},se}(),je=function(){},Ie=function(){function se(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},se.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},se.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new Re("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Re("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Re("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new De("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new De("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},se.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),Re=function(se,te){this.selector=se,this.style=te},De=function(se,te){this.localName=se,this.style=te},ot=function(){function se(te,ee,ie,ce,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=ee,this.markerItems=ie,this.uiStyleSettings=ce,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(te){var ee=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ne){var ge=document.createElement("div");ge.className=""+ee.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){ee.markerToolbarButtonClicked(ge,ne)}),ee.buttons.push(ge),ee.markerButtons.push(ge)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var 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,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ce,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},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 ee=0;ee<this.markerButtons.length;ee++)ee<te||ee===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},se.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},se.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(ee){ee.className=ee.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},se.prototype.addActionButton=function(te,ee,ie){var ce=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=ee,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){ce.actionToolbarButtonClicked(ne,ie)}),ie){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new De("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new De("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new De("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new De("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new De("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new De("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
padding: `+te+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new De("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new De("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Re("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Re("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},se.prototype.markerToolbarButtonClicked=function(te,ee){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(te,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},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 ee=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},se.prototype.setCurrentMarker=function(te){var ee=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){ee.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},se}(),lt=function(){function se(te,ee,ie,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=ee,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 ee=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*ee)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
padding: `+ee+`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 Re("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Re("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(te){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(te){var ee,ie,ce=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ge;ne.uiStyleSettings=ce.uiStyleSettings;var ct=document.createElement("div");ct.className=ce.toolboxButtonStyleClass.name+" "+((ge=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ce.toolboxButtonStyleColorsClass.name),ct.innerHTML=ne.icon,ct.title=ne.title,ct.addEventListener("click",function(){ce.panelButtonClick(ne)}),ce.panelButtons.push(ct),ce.buttonRow.appendChild(ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(te){var ee=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(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ge){var ct,vt;ne.className=ee.toolboxButtonStyleClass.name+" "+(ge===ie?""+((ct=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ct!==void 0?ct:ee.toolboxActiveButtonStyleColorsClass.name):""+((vt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&vt!==void 0?vt:ee.toolboxButtonStyleColorsClass.name))})},se}(),wt=function(se,te){this.title=se,this.icon=te},mt=function(se){function te(ee,ie,ce,ne){var ge=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return 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 Ae(te,se),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var ne=ee.getColorBox(ce);ie.appendChild(ne),ee.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(ee){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=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){ie.setCurrentColor(ee,ge)});var ct=document.createElement("div");return ct.style.display="inline-block",ct.style.width=ne-2+"px",ct.style.height=ne-2+"px",ct.style.backgroundColor=ee,ct.style.borderRadius=ne/2+"px",ee==="transparent"&&(ct.style.fill=this.uiStyleSettings.toolboxAccentColor,ct.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),ge.appendChild(ct),ge},te.prototype.setCurrentColor=function(ee,ie){var ce=this;this.currentColor=ee,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},te}(wt),pt=function(){function se(te,ee,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=ee,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(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,ee){},se.prototype.dblClick=function(te,ee){},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,ee){},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}(),dt=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}(),rt=function(){function se(){this.GRIP_SIZE=10,this.visual=Me.createGroup(),this.visual.appendChild(Me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Me.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}(),Qt=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,ee){return te.a=ee.a,te.b=ee.b,te.c=ee.c,te.d=ee.d,te.e=ee.e,te.f=ee.f,te},se}(),Oe=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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(Me.createTransform()),ne.setupControlBox(),ne}return Ae(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(ee){this._visual=ee;var ie=Me.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!se.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint(ee);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(ee){var ie=this.state;se.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},te.prototype.manipulate=function(ee){var ie=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(ee)},te.prototype.resize=function(ee){var ie=this.manipulationStartLeft,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+ee.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+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+ee.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+ee.y-this.manipulationStartY}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(ee){if(Math.abs(ee.x-this.centerX)>.1){var ie=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},te.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},te.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM(),ce=Me.createPoint(ee.x,ee.y);return{x:(ce=ce.matrixTransform(ie)).x,y:ce.y}},te.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM();ie=ie.inverse();var ce=Me.createPoint(ee.x,ee.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=Me.createGroup();var ee=Me.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=Me.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=Me.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 dt,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var ee=new rt;return ee.visual.transform.baseVal.appendItem(Me.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,ie=-ee/2,ce=ie,ne=(this.width+this.CB_DISTANCE)/2-ee/2,ge=(this.height+this.CB_DISTANCE)/2-ee/2,ct=this.height+this.CB_DISTANCE-ee/2,vt=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,ce),this.positionGrip(this.controlGrips.topCenter.visual,ne,ce),this.positionGrip(this.controlGrips.topRight.visual,vt,ce),this.positionGrip(this.controlGrips.centerLeft.visual,ie,ge),this.positionGrip(this.controlGrips.centerRight.visual,vt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,ct),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,ct),this.positionGrip(this.controlGrips.bottomRight.visual,vt,ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ce-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(ee,ie,ce){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,ce),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Qt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Qt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var ie=ee;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Qt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Qt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie);var ce=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ce.x*ee,y:ce.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*ee,this.height=this.height*ie,this.adjustControlBox()},te}(pt),$e=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Me.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){se.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Me.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(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.setSize()},te.title="Rectangle marker",te}(Oe),Lt=function(se){function te(ee,ie,ce,ne){var ge=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=ie,ge.currentWidth=ce,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return Ae(te,se),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(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===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentWidth(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=ce.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.display="flex",ct.style.alignItems="center";var vt=document.createElement("hr");vt.style.minWidth="20px",vt.style.border="0px",vt.style.borderTop=ce+"px solid "+ee.uiStyleSettings.toolboxColor,vt.style.flexGrow="2",ct.appendChild(vt),ne.appendChild(ct),ee.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(ee,ie){var ce=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(wt),Pe=function(se){function te(ee,ie,ce,ne){var ge=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ge.styles=[],ge.styleBoxes=[],ge.styles=ie,ge.currentStyle=ce,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return Ae(te,se),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(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/ee.styles.length-5+"%",ne.style.borderColor=ce===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentStyle(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var ct=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ce!==""?'stroke-dasharray="'+ce+'"':"")+` />
</svg>`;ge.innerHTML=ct,ne.appendChild(ge),ee.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(ee,ie){var ce=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(wt),Ze=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,ie,ce)||this;return ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new mt("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 Pe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ae(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 ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}($e),ke=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"},Ue=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 Ae(te,se),te.prototype.ownsTarget=function(ee){return!!se.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(ee){var ie=this.state;se.prototype.pointerUp.call(this,ee),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},te.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){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=Me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var ee=new rt;return ee.visual.transform.baseVal.appendItem(Me.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},te.prototype.positionGrip=function(ee,ie,ce){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,ce),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var ie=ee;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.x1=this.x1*ee,this.y1=this.y1*ie,this.x2=this.x2*ee,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(pt),Ht=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 mt("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 Pe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=Me.createGroup(),this.selectorLine=Me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var ie=ee;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(Ue),St=function(se){function te(ee,ie,ce,ne){var ge=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ge.fonts=[],ge.fontBoxes=[],ge.fonts=ie,ge.currentFont=ce,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return Ae(te,se),te.prototype.getUi=function(){var ee=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/ee.fonts.length-5+"%",ne.style.borderColor=ce===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.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 ct=document.createElement("div");ct.style.whiteSpace="nowrap",ct.style.overflow="hidden",ct.style.textOverflow="ellipsis",ct.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(ct),ne.appendChild(ge),ee.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(ee,ie){var ce=this;this.currentFont=ee,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(wt),Ct=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 mt("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new St("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Ae(te,se),te.prototype.ownsTarget=function(ee){if(se.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(ce){ce===ee&&(ie=!0)}),ie},te.prototype.createVisual=function(){this.visual=Me.createGroup(),this.bgRectangle=Me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Me.createTransform()),this.textElement.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.renderText=function(){var ee=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ie){ee.textElement.appendChild(Me.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),ie=1;if(ee.width>0&&ee.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/ee.width,ne=(1*this.height-this.height*this.padding*2/100)/ee.height;ie=Math.min(ce,ne)}return ie},te.prototype.getTextPosition=function(ee){var ie=this.textElement.getBBox(),ce=0,ne=0;return ie.width>0&&ie.height>0&&(ce=(this.width-ie.width*ee)/2,ne=this.height/2-ie.height*ee/2),{x:ce,y:ne}},te.prototype.sizeText=function(){var ee=this.textElement.getBBox(),ie=this.getTextScale(),ce=this.getTextPosition(ie);ce.y-=ee.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(ee){se.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(ee){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,ee),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,ee.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var 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(){ee.textEditDivClicked(ee.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ee=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),ne={x:ce.width*ee,y:ce.height*ee};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*ee,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){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(ee,ie){se.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&Me.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},te.prototype.setFont=function(ee){this.textElement&&Me.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',te}(Oe),at=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 mt("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 Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=Me.createGroup(),this.drawingImage=Me.createImage(),this.visual.appendChild(this.drawingImage);var ee=Me.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(ee.x,ee.y),this.drawing=!0):se.prototype.pointerDown.call(this,ee,ie)},te.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),Me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,ee)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),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 ee=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],ct=ie[3],vt=!1,xt=0;xt<this.canvasElement.height;xt++)for(var Fe=0;Fe<this.canvasElement.width;Fe++)ee.data[xt*this.canvasElement.width*4+4*Fe+3]>0&&(vt=!0,xt<ne&&(ne=xt),Fe<ce&&(ce=Fe),xt>ct&&(ct=xt),Fe>ge&&(ge=Fe));if(vt){this.left=ce/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ce)/this.pixelRatio,this.height=(ct-ne)/this.pixelRatio;var Zt=document.createElement("canvas");Zt.width=ge-ce,Zt.height=ct-ne,Zt.getContext("2d").putImageData(this.canvasContext.getImageData(ce,ne,ge-ce,ct-ne),0,0),this.drawingImgUrl=Zt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){Me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},te.prototype.setLineWidth=function(ee){this.lineWidth=ee},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),se.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',te}(Oe),pe=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,ce||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Ae(te,se),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ce=function(ct){var vt="both";switch(ct){case 0:vt="both";break;case 1:vt="start";break;case 2:vt="end";break;case 3:vt="none"}var xt=document.createElement("div");if(xt.style.display="flex",xt.style.flexGrow="2",xt.style.alignItems="center",xt.style.justifyContent="space-between",xt.style.padding="5px",xt.style.borderWidth="2px",xt.style.borderStyle="solid",xt.style.borderColor=vt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",xt.addEventListener("click",function(){ee.setCurrentType(vt,xt)}),ie.appendChild(xt),vt==="both"||vt==="start"){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.minHeight="20px",Fe.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Fe.style.marginLeft="5px",xt.appendChild(Fe)}var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.style.flexGrow="2";var Nt=document.createElement("hr");if(Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Nt.style.flexGrow="2",Zt.appendChild(Nt),xt.appendChild(Zt),vt==="both"||vt==="end"){var Ft=document.createElement("div");Ft.style.display="flex",Ft.style.alignItems="center",Ft.style.minHeight="20px",Ft.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ft.style.marginRight="5px",xt.appendChild(Ft)}ne.typeBoxes.push(xt)},ne=this,ge=0;ge<4;ge++)ce(ge);return ie},te.prototype.setCurrentType=function(ee,ie){var ce=this;this.currentType=ee,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}(wt),ue=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},te.prototype.getArrowPoints=function(ee,ie){var ce=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return ee-ce/2+","+(ie+ne/2)+" "+ee+","+(ie-ne/2)+" "+(ee+ce/2)+","+(ie+ne/2)},te.prototype.createTips=function(){this.arrow1=Me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,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",Me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},te.prototype.setArrowType=function(ee){this.arrowType=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var ie=ee;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(Ht),_e=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,ie,ce)||this;return ne.fillColor=ce.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new mt("Color",ce.defaultColorSet,ce.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Ae(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}($e),yt=function(se){function te(ee,ie,ce,ne){var ge=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ge.opacities=[],ge.opacityBoxes=[],ge.opacities=ie,ge.currentOpacity=ce,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return Ae(te,se),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(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===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentOpacity(ce,ne)}),ie.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*ce+"%",ne.appendChild(ge),ee.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(ee,ie){var ce=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(wt),st=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,ie,ce)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ce.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ce.defaultHighlightOpacity,ne.fillPanel=new mt("Color",ce.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new yt("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Ae(te,se),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',te}(_e),we='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Xe='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ge=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 mt("Text color",ce.defaultColorSet,ne.color,we),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new mt("Fill color",ce.defaultColorSet,ne.bgColor,Xe),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new St("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new rt,ne.tipGrip.visual.transform.baseVal.appendItem(Me.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Ae(te,se),te.prototype.ownsTarget=function(ee){return se.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.prototype.createTip=function(){Me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(ee,ie){this.state==="new"&&se.prototype.pointerDown.call(this,ee,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,ee,ie)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,ee);else{var ie=this.state==="creating";se.prototype.pointerUp.call(this,ee),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(ee){if(this.tipMoving){var ie=this.unrotatePoint(ee);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(Me.setAttributes(this.bgRectangle,[["fill",ee]]),Me.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(ee){ee===void 0&&(ee=!1);var ie=Math.min(this.height/2,15),ce=this.height/5;ee&&(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.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+ce,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+ce}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ce,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+ce}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ce,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-ce},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+ce,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-ce})},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.positionTip()},te.prototype.positionTip=function(){Me.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),se.prototype.select.call(this)},te.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,se.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.tipPosition={x:this.tipPosition.x*ee,y:this.tipPosition.y*ie},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',te}(Ct),Mt=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,ie,ce)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.fillColor=ce.defaultFillColor,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.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new mt("Line color",de(ce.defaultColorSet,["transparent"]),ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new mt("Fill color",de(ce.defaultColorSet,["transparent"]),ne.fillColor,Xe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new yt("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Me.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Me.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(ee){se.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(Oe),ut=function(se){function te(ee,ie,ce){return se.call(this,ee,ie,ce)||this}return Ae(te,se),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},te.prototype.createTips=function(){this.tip1=Me.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Me.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Me.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Me.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Me.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate(ee+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 ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',te}(Ht),Ce=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,ie,ce)||this;return ne.strokePanel.colors=ce.defaultColorSet,ne.fillColor="transparent",ne}return Ae(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 ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(Mt),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}(),Le=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 mt("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 Pe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=Me.createGroup(),this.selectorCurve=Me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Me.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=Me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Me.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 ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),se.prototype.resize.call(this,ee),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},te.prototype.scale=function(ee,ie){this.curveX=this.curveX*ee,this.curveY=this.curveY*ie,se.prototype.scale.call(this,ee,ie)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var ie=ee;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',te}(Ue),Ve=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,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 mt("Line color",de(ce.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new mt("Fill color",de(ce.defaultColorSet,["transparent"]),ne.fillColor,Xe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Lt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new St("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new mt("Text color",ce.defaultColorSet,ne.textColor,we),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Ae(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.prototype.createVisual=function(){this.visual=Me.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Me.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Me.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=Me.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,ie){se.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.setSize()},te.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Me.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')"]]),Me.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(ee){this.captionElement&&Me.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(ee){this.captionElement&&Me.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){se.prototype.setSize.call(this),Me.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){se.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(ee,ie){se.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&Me.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&Me.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&Me.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&Me.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},se.prototype.getState.call(this));return ee.typeName=this.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){se.prototype.scale.call(this,ee,ie),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',te}(Oe),xe=function(){function se(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),We=function(se){function te(ee,ie,ce){var ne=se.call(this,ee,!1)||this;return ne.dataUrl=ie,ne.state=ce,ne}return Ae(te,se),te}(xe),Ke=function(se){function te(ee,ie,ce){ce===void 0&&(ce=!1);var ne=se.call(this,ee,ce)||this;return ne.marker=ie,ne}return Ae(te,se),te}(xe),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,ee){this[te].push(ee)},se.prototype.removeEventListener=function(te,ee){var ie=this[te].indexOf(ee);ie>-1&&this[te].splice(ie,1)},se}(),nt=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 ke,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 Ie(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[Ze,at,ue,Ct,Ce,Mt,st,Ge,ut,_e,Ht,Le,Ve]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ze,at,ue,Ct,Mt,st,Ge]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ze,at,ue,Ct,st]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var ee=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var ce=ee.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});ce!==void 0&&ee._availableMarkerTypes.push(ce)}else ee._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(ee){return ee(new xe(te))})},se.prototype.render=function(){return Qe(this,void 0,void 0,function(){var te;return Se(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(te=new ht).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ee.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},se.prototype.close=function(te){var ee=this;if(te===void 0&&(te=!1),this.isOpen){var ie=!1;te||this.eventListeners.beforeclose.forEach(function(ce){var ne=new xe(ee,!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 xe(ee))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];(te=this._availableMarkerTypes).push.apply(te,ee)},se.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(ee){te(ee.dataUrl,ee.state)})},se.prototype.removeRenderEventListener=function(te){},se.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},se.prototype.removeCloseEventListener=function(te){},se.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,ee=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,ie=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(ee,ie)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(te,ee){this._isResizing=!0;var ie=te/this.imageWidth,ce=ee/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(ee),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ie,ce),this._isResizing=!1},se.prototype.scaleMarkers=function(te,ee){var ie,ce=this;this._currentMarker&&this._currentMarker instanceof Ct?this._currentMarker.scale(te,ee):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ce._currentMarker&&ne.scale(te,ee)}),ie!==void 0&&this.setCurrentMarker(ie)},se.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},se.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=te.left-ee.left,this.top=te.top-ee.top},se.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},se.prototype.addDefs=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];this.defs=Me.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,ee)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},se.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',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<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new lt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-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,ee){if(te==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(te==="action")switch(ee){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var ne=new Ke(te,te._currentMarker,!0);ce(ne),ne.defaultPrevented&&(ee=!0)}),!ee){var ie=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ce){return ce(new Ke(te,ie))})}}},se.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var ct=new Ke(te,void 0,!0);ge(ct),ct.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var ie=function(ge){var ct=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(vt){return vt(new Ke(te,ct))})},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 ee=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===ee.width&&ie.height===ee.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),ce<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new xe(te))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ne){return ne(new xe(te))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.prototype.undoStep=function(){var te=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new xe(te))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.prototype.redoStep=function(){var te=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new xe(te))}))},se.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},se.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},se.prototype.startRenderAndClose=function(){return Qe(this,void 0,void 0,function(){var te,ee,ie=this;return Se(this,function(ce){switch(ce.label){case 0:return[4,this.render()];case 1:return te=ce.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new We(ie,te,ee))}),this.close(!0),[2]}})})},se.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return ee.markers.push(ie.getState())}),ee},se.prototype.restoreState=function(te){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(ie){var ce=ee._availableMarkerTypes.find(function(ge){return ge.typeName===ie.typeName});if(ce!==void 0){var ne=ee.addNewMarker(ce);ne.restoreState(ie),ee.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new xe(ee))})},se.prototype.addNewMarker=function(te){var ee=Me.createGroup();return this.markerImage.appendChild(ee),new te(ee,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(te){var ee,ie=this;(ee=typeof te=="string"?this._availableMarkerTypes.find(function(ce){return ce.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ce){return ce(new Ke(ie,ie._currentMarker))}))},se.prototype.markerCreated=function(te){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof at&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(at):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new Ke(ee,ee._currentMarker))})},se.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},se.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},se.prototype.markerStateChanged=function(te){var ee=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new Ke(ee,te))})},se.prototype.setCurrentMarker=function(te){var ee=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new Ke(ee,ee._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ie){return ie(new Ke(ee,ee._currentMarker))}))},se.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ee=this.markers.find(function(ie){return ie.ownsTarget(te.target)});ee!==void 0?(this.setCurrentMarker(ee),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},se.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var ee=this.markers.find(function(ie){return ie.ownsTarget(te.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},se.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&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,ee){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(ee-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,ee){this.eventListeners.addEventListener(te,ee)},se.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},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(ee){return ee(new xe(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(ee){return ee(new xe(te))}))},se.instanceCounter=0,se}(),Ye=fe(97013),bt=fe(31735),kt=(se,te,ee)=>new Promise((ie,ce)=>{var ne=vt=>{try{ct(ee.next(vt))}catch(xt){ce(xt)}},ge=vt=>{try{ct(ee.throw(vt))}catch(xt){ce(xt)}},ct=vt=>vt.done?ie(vt.value):Promise.resolve(vt.value).then(ne,ge);ct((ee=ee.apply(se,te)).next())}),Wt=({data:se,className:te,fullWidth:ee,style:ie={},onClose:ce,onOk:ne,showFullTools:ge,noAssociationId:ct})=>{const vt=(0,ae.useRef)(null),xt=(0,ae.useRef)(null),Fe=(0,ae.useRef)(null),Zt=(0,ae.useRef)(null),[Nt,Ft]=(0,ae.useState)(!1),[un,kn]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(Fe.current||(Fe.current=document.createElement("style"),document.head.appendChild(Fe.current)),se!=null&&se.visible?(document.body.setAttribute("data-custom","y-hidden"),Fe.current.innerHTML=" html { overflow-y: hidden; }",se!=null&&se.src&&cn()):(document.body.removeAttribute("data-custom"),Fe.current&&(document.head.removeChild(Fe.current),Fe.current=null)),()=>{document.body.removeAttribute("data-custom"),Fe.current&&(document.head.removeChild(Fe.current),Fe.current=null)}),[se==null?void 0:se.visible]);const cn=()=>kt(void 0,null,function*(){Ft(!0),kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const mr=yield(0,bt.ZJ)(se==null?void 0:se.src);vt.current.src="",vt.current.src=mr,vt.current.onload=function(){Zn()},Ft(!1),kn("")}),wn=mr=>kt(void 0,null,function*(){Ft(!0),kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const er=yield(0,Ye.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:se.title,file:mr.dataUrl}});er!=null&&er.id&&!ct?(yield(0,Ye.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),Ft(!1),kn("")}),$n=()=>{const mr=document.querySelector('a[href="https://markerjs.com/"]');mr&&mr.parentNode&&(mr.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(ur=>{const nr=document.querySelector(ur.name);nr&&nr.setAttribute("title",ur.title)})},Zn=()=>{xt.current=new nt(vt.current),xt.current.targetRoot=Zt.current,xt.current.addEventListener("render",wn),xt.current.addEventListener("beforeclose",ce),ge&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),se!=null&&se.snapshotData&&xt.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:Nt,tip:un,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:Zt,className:ze()(ft.imageDimensions,te,ee?ft.fullWidth:""),style:ie},ae.createElement("img",{className:ft.img,ref:vt}))))}},50047:function(Rt,zt,fe){"use strict";var ae=fe(59301),ft=fe(77019),Ne=fe(5269),ze=fe(20554),me=fe(7939),Je=fe(59944),Ae=fe(40862),Qe=fe(48136),Se=fe(59301);const de=(0,ae.forwardRef)(({callback:Me,showSaveButton:ye,value:ht=""},je)=>{const Ie=(0,ae.useRef)(),Re=[{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=mt=>{Ie.current.setValue(Ie.current.getValue()+" "+mt.value+" ")},lt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Se.createElement(ft.Z,{className:Ae.Z.lists,gutter:[10,10]},Re.map((mt,pt)=>Se.createElement(Ne.Z,{flex:"110px",className:Ae.Z.item},Se.createElement("div",null,Se.createElement(Je.Z,{value:`$$${mt.value}$$`}),mt.name),Se.createElement("div",{className:Ae.Z.children},mt.children.map((dt,rt)=>Se.createElement("div",{key:rt},Se.createElement("h1",null,dt.name),Se.createElement(ft.Z,{gutter:[10,10]},dt.data.map((Qt,Oe)=>Se.createElement(Ne.Z,{key:Oe,onClick:()=>ot(Qt),className:Ae.Z.diamond},Se.createElement(Je.Z,{value:"`$$"+Qt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Se.createElement(ft.Z,{className:Ae.Z.lists,gutter:[10,10]},De.map((mt,pt)=>Se.createElement(Ne.Z,{flex:"110px",className:Ae.Z.item},Se.createElement("div",null,Se.createElement(Je.Z,{value:"`$$"+mt.value+"$$`"}),mt.name),Se.createElement("div",{className:Ae.Z.children},mt.children.map((dt,rt)=>Se.createElement("div",{key:rt},dt.name&&Se.createElement("h1",null,dt.name),Se.createElement(ft.Z,{gutter:[10,10]},dt.data.map((Qt,Oe)=>Se.createElement(Ne.Z,{key:Oe,onClick:()=>ot(Qt),className:Ae.Z.diamond},Se.createElement(Je.Z,{value:"`$$"+Qt.value+"$$`"}))))))))))}],wt=()=>{var mt=document.createElement("div");mt.innerHTML=Ie.current.getValue();var pt=mt.innerText;return Me&&Me(pt),pt};return(0,ae.useImperativeHandle)(je,()=>({getData:wt})),Se.createElement("div",{className:Ae.Z.mathWrap},Se.createElement(ze.default,{defaultActiveKey:"1",items:lt}),Se.createElement("math-field",{locale:"zh_cn",className:Ae.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ie,style:{width:800,marginTop:30,fontSize:18}},ht||""),ye&&Se.createElement("div",{className:Ae.Z.button},Se.createElement(me.ZP,{size:"large",onClick:wt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});zt.Z=de},59243:function(Rt,zt,fe){"use strict";var ae=fe(59301),ft=fe(93314),Ne=fe(7939),ze=Object.defineProperty,me=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(je,Ie,Re)=>Ie in je?ze(je,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Re}):je[Ie]=Re,Me=(je,Ie)=>{for(var Re in Ie||(Ie={}))Qe.call(Ie,Re)&&de(je,Re,Ie[Re]);if(Ae)for(var Re of Ae(Ie))Se.call(Ie,Re)&&de(je,Re,Ie[Re]);return je},ye=(je,Ie)=>me(je,Je(Ie));const ht=({img:je,buttonProps:Ie={},styles:Re={},customText:De,ButtonText:ot,ButtonClick:lt,Buttonclass:wt,ButtonTwo:mt,imgStyles:pt,loading:dt=!1,className:rt=""})=>ae.createElement("section",{className:`tc animated fadeIn ${rt}`,style:Me({color:"#999",margin:"100px auto",visibility:dt?"hidden":"visible"},Re)},ae.createElement("img",{src:je||ft,style:ye(Me({},pt),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ot&&ae.createElement(Ne.ZP,Me({className:wt,onClick:lt},Ie),ot),mt&&mt);zt.Z=ht},47199:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return wt}});var ae=fe(59301),ft={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ne=fe(7939),ze=fe(70557),me=fe(58478),Je=fe(25399),Ae=fe(31735),Qe=fe(22167),Se=fe(59243),de=fe(26869),Me=fe(38609),ye=fe(59301),ht=Object.defineProperty,je=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,De=(mt,pt,dt)=>pt in mt?ht(mt,pt,{enumerable:!0,configurable:!0,writable:!0,value:dt}):mt[pt]=dt,ot=(mt,pt)=>{for(var dt in pt||(pt={}))Ie.call(pt,dt)&&De(mt,dt,pt[dt]);if(je)for(var dt of je(pt))Re.call(pt,dt)&&De(mt,dt,pt[dt]);return mt},lt=(mt,pt,dt)=>new Promise((rt,Qt)=>{var Oe=Pe=>{try{Lt(dt.next(Pe))}catch(Ze){Qt(Ze)}},$e=Pe=>{try{Lt(dt.throw(Pe))}catch(Ze){Qt(Ze)}},Lt=Pe=>Pe.done?rt(Pe.value):Promise.resolve(Pe.value).then(Oe,$e);Lt((dt=dt.apply(mt,pt)).next())}),wt=({editOffice:mt="view",data:pt,issaver:dt,onSaver:rt,theme:Qt,type:Oe,filename:$e,monacoEditor:Lt,className:Pe,style:Ze,close:ke,onClose:Ue,hasMask:Ht,disabledDownload:St,onImgDimensions:Ct,showNodata:at,recordInfo:pe})=>{const[ue,_e]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[yt,st]=(0,ae.useState)(""),[we,Xe]=(0,ae.useState)(),Ge=window.ENV==="build"?"/react/build":"",Mt=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Ce=10*(1024*1024),ve=(0,ae.useRef)();pt!=null&&pt.startsWith("/api")&&Oe!=="txt"&&(pt=de.Z.API_SERVER+pt);const Le=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();$e&&Lt&&(Lt.filename=$e),(0,ae.useEffect)(()=>{var et,nt;const Ye=(nt=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:nt.split(";");Ye==null||Ye.map(bt=>{let kt=bt.split("=");kt[0]==="_educoder_session"&&st(kt[1])})},[]),(0,ae.useEffect)(()=>{Oe==="office"&&(pt.indexOf("bigfilescdn.")>-1||pt.indexOf("bigfiles1")>-1?Xe({url:pt,fileType:Le(pt),model:pt.indexOf("model=edit")?"edit":"view"}):xe())},[Oe,pt]);function Ve(et){return lt(this,null,function*(){et.data.type==="pdfdata"&&(rt(et.data.data),window.removeEventListener("message",Ve,!1)),console.log("mess---:",et.data)})}const xe=()=>lt(void 0,null,function*(){console.log("data:",pt);let et=pt;pt.startsWith("http")||(et=location.origin+et);let nt=new URL(et).pathname.split("/").pop();const Ye=yield(0,Qe.gJ)({attachment_id:nt});Ye.url=Mt+Ye.url,Xe(Ye)}),We=()=>{if(pt.startsWith("http")||pt.startsWith("blob:")){Ke();return}(0,Ae.Sv)($e||"educoder",pt,$e)},Ke=()=>{pe&&(0,Me.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Ae.Nd)($e||"educoder",decodeURIComponent(pt))};return ye.createElement("div",{style:ot({},Ze||{}),className:`${Ht&&ft.bgBlack} ${Oe?ft.wrp:"hide"}`},ke&&ye.createElement("div",{className:ft.close,ref:ve},!!Ct&&ye.createElement(Je.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:()=>{Ue(),Ct()}},ye.createElement("i",{className:"icon-yulanpizhu"}))),!St&&ye.createElement(Je.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:Ke},ye.createElement("i",{className:"icon-quxiaozhiding"}))),dt&&ye.createElement(Je.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",Ve,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},ye.createElement("i",{className:"icon-baocun"}))),ye.createElement(Je.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{Ue()}},ye.createElement("i",{className:"icon-guanbi1"})))),ye.createElement("div",{className:`${ft[Pe]} ${Pe} ${ft.monaco} ${Oe==="txt"?"show":"hide"}`},Oe==="txt"&&ye.createElement(ye.Fragment,null,ye.createElement(me.ZP,ot({},Lt)))),Oe==="audio"&&ye.createElement("audio",{src:`${(pt==null?void 0:pt.indexOf("http://"))>-1||(pt==null?void 0:pt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${pt}`,autoPlay:!0}),Oe==="video"&&ye.createElement(ye.Fragment,null,(pt==null?void 0:pt.indexOf("http"))>-1?ye.createElement("video",{controls:!0,src:`${pt}`,autoPlay:!0}):ye.createElement("video",{controls:!0,src:`data:video/mp4;base64,${pt}`,autoPlay:!0})),Oe==="office"&&we&&ye.createElement("iframe",{src:`${Ge}/office.html?key=${we.key}&url=${btoa(we.url)}&callbackUrl=${Mt+(we.callbackUrl||"")}&fileType=${we.fileType}&title=${we.title||""}&model=${mt}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!St}`}),Oe==="html"&&ye.createElement("iframe",{src:pt+"&disposition=inline"}),Oe==="pdf"&&dt&&ye.createElement("iframe",{id:"pdfiframe",src:`${Ge}/js/pdfview/index.html?filename=${$e||"educoder.pdf"}&url=${encodeURIComponent(pt)}&disabledDownload=${!!St}&model=${mt}`}),Oe==="pdf"&&!dt&&ye.createElement("embed",{className:ft.embed,src:pt+"#toolbar=0&statusbar=0&navpanes=0&scrollbars=0"}),Oe==="image"&&ye.createElement("img",{src:`${(pt==null?void 0:pt.indexOf("http://"))>-1||(pt==null?void 0:pt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${pt}`}),(Oe==="other"||Oe==="download")&&ye.createElement(ye.Fragment,null,at?ye.createElement(Se.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ye.createElement(Ne.ZP,{icon:ye.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:We,disabled:St},"\u4E0B\u8F7D")}):ye.createElement(Ne.ZP,{type:"primary",size:"middle",onClick:We,disabled:St},ye.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Oe==="flowChart"&&ye.createElement("div",{className:"embed"},ye.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${pt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},59944:function(Rt,zt,fe){"use strict";fe.d(zt,{z:function(){return Lt},Z:function(){return Pe}});var ae=fe(59301),ft=fe(54196),Ne=fe(58489),ze=fe(64018),me=fe(80360),Je=fe(26869),Ae=fe(31735),Qe=fe(15342),Se=fe(44104),de=fe(7939),Me=fe(1012),ye=fe(47199),ht=fe(59301),Ie=({html:Ze})=>{const ke=(0,ae.useRef)(null),Ue=(0,ae.useRef)(null),Ht=`.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 St=ke.current.attachShadow({mode:"open"});Ue.current=document.createElement("div"),Ue.current.className="markdown-body",Ue.current.innerHTML=Ze,St.appendChild(Ue.current);const Ct=document.createElement("style");return Ct.textContent=Ht,St.appendChild(Ct),()=>{St.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Ue.current&&(Ue.current.innerHTML=Ze)},[Ze]),ht.createElement("div",{ref:ke})};function Re(Ze){const ke=["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"],Ue=new RegExp(`\\b(${ke.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ze.replace(Ue,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ot=Object.defineProperty,lt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,pt=(Ze,ke,Ue)=>ke in Ze?ot(Ze,ke,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Ze[ke]=Ue,dt=(Ze,ke)=>{for(var Ue in ke||(ke={}))wt.call(ke,Ue)&&pt(Ze,Ue,ke[Ue]);if(lt)for(var Ue of lt(ke))mt.call(ke,Ue)&&pt(Ze,Ue,ke[Ue]);return Ze};const rt="@\u2581\u2581@",Qt="@\u2581@",Oe=/<pre[^>]*>/g;function $e(Ze){let ke=document.createElement("div");return ke.innerHTML=Ze,ke.childNodes.length===0?"":ke.childNodes[0].nodeValue}const Lt=(Ze,ke)=>{Ze=Ze||"";const Ue=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ht=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,St=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ct=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ke?Ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ue,(at,pe,ue,_e,yt,st,we)=>{const Xe=pe||_e||st,Ge=ue||yt||we||"?";return Je.Z.API_SERVER+"/api/attachments/"+Xe+Ge+"&t="+(0,Ae.Jn)(Xe,Date.now())+(at.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ze=Ze.replace(Ct,(at,pe,ue,_e,yt,st,we)=>{const Xe=pe||_e||st,Ge=ue||yt||we||"?";return Je.Z.API_SERVER+"/attachments/download/"+Xe+Ge+"&t="+(0,Ae.Jn)(Xe,Date.now())+(at.indexOf(")")>-1?")":"&")}).replace(Ue,(at,pe,ue,_e,yt,st,we)=>{const Xe=pe||_e||st,Ge=ue||yt||we||"?";return Je.Z.API_SERVER+"/api/attachments/"+Xe+Ge+"&t="+(0,Ae.Jn)(Xe,Date.now())+(at.indexOf(")")>-1?")":"&")}).replace(Ht,(at,pe,ue,_e,yt)=>{const st=pe||_e,we=ue||yt||"";return'"'+Je.Z.API_SERVER+"/api/attachments/"+st+we+st+we+"&t="+(0,Ae.Jn)(st,Date.now())}).replace(St,(at,pe,ue,_e,yt)=>{const st=pe||_e,we=ue||yt||"";return"("+Je.Z.API_SERVER+"/files/uploads/"+st+we+st+we+"&t="+(0,Ae.Jn)(st,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,`
`),Ze)};var Pe=({value:Ze="",edit:ke=!1,className:Ue,showTextOnly:Ht,showLines:St,style:Ct={},stylesPrev:at={},highlightKeywords:pe,showProgramFill:ue,isProgramFill:_e,disabledFill:yt=!1,programFillValue:st,openEditor:we=()=>{},onFillChange:Xe=ut=>{},onFillBlur:Ge=()=>{},onFillFocus:Mt=()=>{}})=>{let ut=Re(String(Ze||""));const Ce=(0,ae.useRef)(),ve=(0,ae.useRef)(),[Le,Ve]=(0,ae.useState)(""),[xe,We]=(0,ae.useState)("office"),[Ke,et]=(0,ae.useState)([]),nt=(0,ae.useRef)("a"+(0,Me.Z)()),Ye={},bt=Fe=>/<style[\s\S]*?>/i.test(Fe||""),kt=(Fe,Zt,Nt)=>{const Ft=document.createElement(Fe===Qt?"input":"textarea");Ft.style.width="100%",Ft.style.height=Fe===Qt?"40px":"151px",Ft.rows=5,Ft.spellcheck=!1,Ft.name="edu-program-fill",Ft.placeholder="\u8BF7\u8F93\u5165",Ft.dataset.id=Zt;const un=Object.keys(Ye).length;return Ye[un]=Ft,`<span class="edu-program-fill-wrap ${Fe===Qt?"":"show"}" style="width:${Fe===Qt?"600px":"100%"}" title=${Nt||""}><span>${Ft.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Jt(Fe){return Fe=Fe.replace(/!\[.*?\]\(.*?\)/g,""),Fe=Fe.replace(/\[.*?\]\(.*?\)/g,""),Fe=Fe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Fe=Fe.replace(/<embed.*?>/g,""),Fe=Fe.replace(/<img.*?>/g,""),Fe=Fe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Fe=Fe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Fe=Fe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Fe=Fe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Fe}const Wt=Fe=>!Ht&&bt(ut)?Fe:Fe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Zt,Nt){let Ft=Nt.replace(/(\n|\r)/g,"").split("}"),un=[];return Ft.map(kn=>{kn!=""&&un.push(`.${nt.current} ${kn}`)}),`<style>${un.join("}")}</style>`}),se=(0,ae.useMemo)(()=>{try{const Ft=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;ut=ut.replace(cn,"("+Je.Z.API_SERVER+"/attachments/download/").replace(Ft,"("+Je.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Je.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Je.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Ce.current.style.display="none"}catch(Ft){}if(ue){let Ft=-1;return ut=ut.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(un,kn,cn){var wn;return++Ft,kt(un,Ft,(wn=st==null?void 0:st[Ft])==null?void 0:wn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Wt(ut||"")}</pre>`}let Fe=Wt(ut);Fe=(0,Ne.ZP)(Fe);const Zt=(0,Ne.ez)();ut.match(/\[TOC\]/)&&(Fe=Fe.replace("<p>[TOC]</p>",(0,Ne.Qv)()),(0,Ne.Iy)()),Fe=Fe.replace(/(__special_katext_id_\d+__)/g,(Ft,un)=>{const{type:kn,expression:cn}=Zt[un];return(0,Qe.renderToString)($e(cn)||"",{displayMode:kn==="block",throwOnError:!1,output:"html"})}),Fe=Fe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ne.AL)();const Nt=document.createElement("div");if(Nt.innerHTML=Fe,Ht)return Nt.innerText;if(pe){const Ft=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ce(Nt,Ft),Nt.innerHTML}return setTimeout(()=>ct(),500),Nt.innerHTML},[ut,pe]);(0,ae.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(Zt=>{Zt.oninput=te,Zt.onblur=ee,Zt.onfocus=ie})},[Ke]),(0,ae.useEffect)(()=>{var Fe,Zt,Nt,Ft,un;if(st!=null&&st.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=((Fe=st==null?void 0:st[wn])==null?void 0:Fe.value)||"",((Zt=st==null?void 0:st[wn])==null?void 0:Zt.type)==="warning"?$n.className="program-fill-warning":((Nt=st==null?void 0:st[wn])==null?void 0:Nt.type)==="success"?$n.className="program-fill-success":$n.className="";for(const[wn,$n]of kn.entries())$n.innerHTML=(Ft=st==null?void 0:st[wn])!=null&&Ft.score?`${(un=st==null?void 0:st[wn])==null?void 0:un.score}\u5206`:"";et(st)}catch(kn){console.log(kn,"error")}},[st]);const te=Fe=>{Ke[Fe.target.dataset.id]=Ke[Fe.target.dataset.id]||{},Ke[Fe.target.dataset.id].value=Fe.target.value,et([...Ke]),Xe(Ke,Fe.target.dataset.id)},ee=Fe=>{Ke[Fe.target.dataset.id]=Ke[Fe.target.dataset.id]||{},Ke[Fe.target.dataset.id].value=Fe.target.value,et([...Ke]),Ge(Ke,Fe.target.dataset.id)},ie=Fe=>{Ke[Fe.target.dataset.id]=Ke[Fe.target.dataset.id]||{},Ke[Fe.target.dataset.id].value=Fe.target.value,et([...Ke]),Mt(Ke,Fe.target.dataset.id)};function ce(Fe,Zt){return Fe.childNodes.forEach(Nt=>{var Ft;if(Nt.childNodes.length>0)ce(Nt,Zt);else if(Nt.nodeName!=="IMG")if(Nt.innerHTML)Nt.innerHTML=(Ft=Nt.innerHTML)==null?void 0:Ft.replace(new RegExp(Zt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=Nt.textContent.replace(new RegExp(Zt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Nt.replaceWith(un)}})}const ne=(0,ae.useRef)();Ne.jb.WebkitLineClamp=St,St&&(Ct=dt(dt({},Ct),Ne.jb));function ge(Fe){let Zt=Fe.target;if(Zt.tagName.toUpperCase()==="A"){let Nt=Zt.getAttribute("href");if(Nt.indexOf("office")>-1)Fe.preventDefault(),Ve(Nt),We("office");else if(Nt.indexOf("application/pdf")>-1)Fe.preventDefault(),Ve(Nt),We("pdf");else if(Nt.indexOf("text/html")>-1)Fe.preventDefault(),Ve(Nt),We("html");else if(Nt.startsWith("#")){Fe.preventDefault();let Ft=document.getElementById(Nt.replace("#",""));Ft&&Ft.scrollIntoView(!0)}}}const ct=()=>{var Fe;const Zt=(Fe=ne.current)==null?void 0:Fe.querySelectorAll("video");Zt==null||Zt.forEach(Nt=>{if(Nt.oncontextmenu=()=>!1,Nt.src.indexOf(".m3u8")>-1&&!Nt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var Ft=new me.ZP;Ft.loadSource(Nt.src),Ft.attachMedia(Nt)}}})};(0,ae.useEffect)(()=>{if(ne.current&&se&&se.match(Oe)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",ge),()=>{var Fe;(Fe=ne.current)==null||Fe.removeEventListener("click",ge),(0,Ne.AL)(),(0,Ne.Iy)()}},[se,ne.current,ge]);const vt=Fe=>{Fe.target.nodeName==="IMG"&&Fe.target.className.indexOf("draw-flowchart")>-1?(Ce.current.style.zIndex=1,Ce.current.style.display="flex",Ce.current.style.width=Fe.target.clientWidth+"px",Ce.current.style.height=Fe.target.clientHeight+"px",Ce.current.style.top=Fe.target.offsetTop+"px",Ce.current.style.left=Fe.target.offsetLeft+"px",Fe.target.id&&(ve.current=Fe.target.id)):Ce.current.style.display="none"},xt=()=>{Ce.current.style.display="none"};return(0,ae.useEffect)(()=>{var Fe;const Zt=Nt=>{Nt.preventDefault(),Nt.clipboardData.setData("text",window.getSelection().toString())};return(Fe=ne.current)==null||Fe.addEventListener("copy",Zt),()=>{var Nt;(Nt=ne.current)==null||Nt.removeEventListener("copy",Zt)}},[ne.current]),ae.createElement("div",{style:{position:"relative"},onMouseLeave:xt},Ht&&ae.createElement("div",{ref:ne,className:`${De.mdBody} `},se),!Ht&&!bt(se)&&ae.createElement("div",{ref:ne,style:dt({},Ct),onMouseOver:vt,className:`${Ue||""} ${yt?"disabled-fill":""} markdown-body ${De.mdBody} ${nt.current}`,dangerouslySetInnerHTML:{__html:se}}),!Ht&&bt(se)&&ae.createElement(Ie,{html:se}),ae.createElement("div",{ref:Ce,className:`${De.button} ${ke?"":De.previewFlowChart}`},ae.createElement(Se.Z,null,ae.createElement(de.ZP,{onClick:()=>{ke?we(ve.current):(Ve(ve.current),We("flowChart"))}},ke?"\u7F16\u8F91":"\u9884\u89C8"))),ae.createElement(ye.Z,{close:!0,data:Le,type:Le!=null&&Le.length?xe:"",style:dt({},at),onClose:()=>Ve("")}))}},52504:function(Rt,zt,fe){"use strict";fe.d(zt,{h:function(){return mt},Z:function(){return wt}});var ae=fe(59301),ft=fe(82326),Ne=fe(28284),ze=fe(7939),me=fe(89780),Je=fe.n(me),Ae=fe(2018),Qe=Object.defineProperty,Se=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,je=(pt,dt,rt)=>dt in pt?Qe(pt,dt,{enumerable:!0,configurable:!0,writable:!0,value:rt}):pt[dt]=rt,Ie=(pt,dt)=>{for(var rt in dt||(dt={}))ye.call(dt,rt)&&je(pt,rt,dt[rt]);if(Me)for(var rt of Me(dt))ht.call(dt,rt)&&je(pt,rt,dt[rt]);return pt},Re=(pt,dt)=>Se(pt,de(dt));const De=ft.default.Option,ot={labelCol:{span:4},wrapperCol:{span:20}},lt={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 wt=({callback:pt,onCancel:dt})=>{const[rt,Qt]=(0,ae.useState)("python");function Oe(Lt){Qt(lt[Lt][1])}function $e(Lt){pt(Lt)}return ae.createElement(Ne.default,Re(Ie({},ot),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$e,style:{width:500}}),ae.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ae.createElement(ft.default,{getPopupContainer:Lt=>Lt.parentNode,onChange:Oe},Object.keys(lt).map(Lt=>ae.createElement(De,{key:Lt,value:Lt},lt[Lt][0])))),ae.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ae.createElement(mt,{mode:rt})),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:dt},"\u53D6\u6D88")))};function mt({value:pt,onChange:dt,mode:rt,options:Qt={}}){const Oe=(0,ae.useRef)(),[$e,Lt]=(0,ae.useState)();return(0,ae.useEffect)(()=>{if($e){let Pe=function(Ze){const ke=Ze.getValue();dt&&dt(ke)};return $e.on("change",Pe),()=>{$e.off("change",Pe)}}},[$e,dt]),(0,ae.useEffect)(()=>{$e&&$e.setOption("mode",rt)},[$e,rt]),(0,ae.useEffect)(()=>{$e&&(pt!==$e.getValue()||pt==="")&&setTimeout(()=>{$e.setValue(pt||"")},300)},[$e,pt]),(0,ae.useEffect)(()=>{if(Oe.current&&!$e){const Pe=Je().fromTextArea(Oe.current,Ie({mode:rt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Qt));Lt(Pe)}},[Oe.current,$e]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:Oe}))}},77834:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return xr}});var ae=fe(59301),ft=fe(58106),Ne=fe(89780),ze=fe.n(Ne),me=fe(76374),Je=fe(2018),Ae=fe(6313),Qe=fe(25717),Se=fe(99498),de=fe(25419),Me=fe(67549),ye=fe(59944),ht=({value:Ut="",className:pn,showTextOnly:En,showLines:Tn,style:Jn={}})=>{const tr=(0,ae.useMemo)(()=>"",[Ut]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:tr}}))},je=Object.defineProperty,Ie=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,wt=(Ut,pn,En)=>pn in Ut?je(Ut,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Ut[pn]=En,mt=(Ut,pn)=>{for(var En in pn||(pn={}))ot.call(pn,En)&&wt(Ut,En,pn[En]);if(De)for(var En of De(pn))lt.call(pn,En)&&wt(Ut,En,pn[En]);return Ut},pt=(Ut,pn)=>Ie(Ut,Re(pn));let dt=[{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 rt({onActionCallback:Ut,title:pn,icon:En,actionName:Tn,className:Jn="",children:tr}){function dr(){Ut(Tn)}return ae.createElement("a",{title:pn,className:Jn,onClick:dr},ae.createElement("i",{className:`${En}`}),tr)}var Qt=({watch:Ut,showNullButton:pn,showNullProgramButton:En,onActionCallback:Tn,fullScreen:Jn,insertTemp:tr,hidetoolBar:dr,extraUse:_n})=>{const Rn=[...dt,{title:`${Ut?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ut?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ae.createElement("ul",{className:"markdown-toolbar-container"},!dr&&Rn.map((hr,jt)=>ae.createElement("li",{key:jt},hr.actionName?ae.createElement(rt,pt(mt({},hr),{onActionCallback:Tn})):ae.createElement("span",{className:"v-line"}))),pn?ae.createElement("li",null,ae.createElement(rt,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Tn},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(rt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Tn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ae.createElement("li",null,ae.createElement(rt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Tn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,tr&&ae.createElement("li",null,ae.createElement(rt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${tr}`,onActionCallback:Tn},ae.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&ae.createElement("li",null,_n),ae.createElement("li",{className:"btn-full-screen"},ae.createElement(rt,{icon:`${Jn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Jn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Tn})))},Oe=fe(35990),$e=fe(28284),Lt=fe(37568),Pe=fe(7939),Ze=Object.defineProperty,ke=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,at=(Ut,pn,En)=>pn in Ut?Ze(Ut,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Ut[pn]=En,pe=(Ut,pn)=>{for(var En in pn||(pn={}))St.call(pn,En)&&at(Ut,En,pn[En]);if(Ht)for(var En of Ht(pn))Ct.call(pn,En)&&at(Ut,En,pn[En]);return Ut},ue=(Ut,pn)=>ke(Ut,Ue(pn));const _e={labelCol:{span:4},wrapperCol:{span:20}};var yt=({callback:Ut,onCancel:pn})=>{function En(Tn){Ut(Tn)}return ae.createElement($e.default,ue(pe({},_e),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:En,style:{width:500}}),ae.createElement($e.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($e.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(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Pe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},st=fe(52504),we=fe(82441),Xe=fe(62957),Ge=fe(77019),Mt=fe(1986),ut=fe(59301),Ce=({callback:Ut,onCancel:pn})=>{const En=document.createElement("canvas"),Tn=En.getContext("2d");En.width=1e3,En.height=800,Tn.fillStyle="#ffffff",Tn.fillRect(0,0,En.width,En.height);const Jn=En.toDataURL("image/png");return ut.createElement(Xe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},ut.createElement(Ge.Z,{style:{height:"100vh"}},ut.createElement(Mt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Jn,visible:!0,title:String(Date.now())},onOk:tr=>{Ut({src:tr.url})},onClose:pn})))},ve=fe(30641),Le=fe(5269),Ve=fe(6767),xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},We=fe(59301),et=(0,ae.forwardRef)(({onCancel:Ut,editImgId:pn,callback:En},Tn)=>{let Jn=(0,ae.useRef)(),tr=(0,ae.useRef)(),dr=(0,ae.useRef)(),_n=(0,ae.useRef)(!1);const Rn=(0,ae.useRef)(!1);console.log("ref:",Tn);const[hr,jt]=(0,ae.useState)(0),[it,qt]=(0,ae.useState)("100vh");return(0,ae.useEffect)(()=>{jt(1)},[]),(0,ae.useImperativeHandle)(Tn,()=>({setHeight:qt})),We.createElement("div",{ref:Rn,className:"body-overflow-initial"},We.createElement(ve.Z,{width:"100vw",height:it,footer:null,closable:!0,placement:"bottom",open:!!hr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${xe.drawerWrap}`,onClose:()=>{window.saveDrawData(Cn=>{En({src:`/api/attachments/${Cn}`,id:Cn})})},title:We.createElement(Ge.Z,{align:"middle"},We.createElement(Le.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),We.createElement(Le.Z,{onClick:()=>{qt(it==="60px"?"100vh":"60px")}},We.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),We.createElement(Le.Z,{onClick:()=>{window.saveDrawData(Cn=>{if(Cn===null){Ve.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Ve.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),En({src:`/api/attachments/${Cn}`,id:Cn,disabledClose:!0})})}},We.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},We.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${pn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:tr})))}),nt=fe(26869),Ye=fe(47889),bt=fe(71051);const kt=Ye.ZP.Group,Jt={margin:"0 8px"};var Wt=({callback:Ut,onCancel:pn})=>{function En(Tn){Ut(Tn)}return ae.createElement($e.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($e.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(bt.Z,null)),ae.createElement("span",{style:Jt},"\u5217\u6570"),ae.createElement($e.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(bt.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($e.default.Item,{name:"align"},ae.createElement(kt,null,ae.createElement(Ye.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement(Ye.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement(Ye.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement(Ye.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Pe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},se=fe(71411),te=fe(75544),ee=fe.n(te),ce=(0,ae.forwardRef)(({use3d:Ut,width:pn,height:En,callback:Tn,showSaveButton:Jn},tr)=>{const dr=(0,ae.useRef)(),_n=(0,ae.useRef)(),[Rn,hr]=(0,ae.useState)(!1),jt=(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)(()=>{_n.current=new(ee())(jt.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const it=()=>{var qt=window.ggbApplet.getPNGBase64(1,!0,72);return Tn&&Tn(qt),qt};return(0,ae.useEffect)(()=>{jt.current.appName=Rn?"3D":"graphing",_n.current.inject("applet_container")},[Rn]),(0,ae.useEffect)(()=>{hr(Ut)},[Ut]),(0,ae.useImperativeHandle)(tr,()=>({getImgData:it})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:dr}),ae.createElement(Ge.Z,{align:"middle"},ae.createElement(Le.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(Le.Z,null,ae.createElement(Pe.ZP,{size:"large",onClick:it,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=fe(50047);const ge="link",ct="upload-image",vt="add-flowchart",xt="draw-image",Fe="add-flowchart",Zt="code-block",Nt="add-table",Ft="------------",un={default:Ft,left:`:${Ft}`,center:`:${Ft}:`,right:`${Ft}:`};var kn=fe(61904),cn=fe(31735);function wn(){}let $n=0;const Zn=1e4,mr="\u2581",er="@\u2581\u2581@",ur="@\u2581@",nr=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,In=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function rr(Ut){return/^\d+$/.test(Ut)?`${Ut}px`:Ut}const Bn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xn={[Bn+"-B"]:"bold",[Bn+"-I"]:"italic"},Kn={[ge]:"\u6DFB\u52A0\u94FE\u63A5",[Zt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ct]:"\u6DFB\u52A0\u56FE\u7247",[xt]:"\u6DFB\u52A0\u753B\u56FE",[vt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Nt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var xr=({defaultValue:Ut="",onChange:pn,width:En="100%",height:Tn=400,miniToolbar:Jn=!1,isFocus:tr=!1,watch:dr,insertTemp:_n,mode:Rn="markdown",id:hr="markdown-editor-id",showResizeBar:jt=!1,noStorage:it=!1,showNullButton:qt=!1,showNullProgramButton:Cn=!1,hidetoolBar:Gn=!1,fullScreen:Te=!1,onBlur:Be,onCMBeforeChange:Pt,onFullScreen:Et,className:He="",disablePaste:Dt=!1,disabled:Yt=!1,disabledFill:tn=!1,placeholder:hn="",values:_t="",extraUse:$t,onAddBlank:At})=>{const[gt,en]=(0,ae.useState)(null),[vn,mn]=(0,ae.useState)(Ut),[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)(Tn),[Lr,Mr]=(0,ae.useState)(!1),[Cr,ir]=(0,ae.useState)(0),[Fr,gr]=(0,ae.useState)(0),or=(0,ae.useRef)(),Er=(0,ae.useRef)(),Tr=(0,ae.useRef)(),pr=(0,ae.useRef)(),qn=(0,ae.useRef)(),jn=(0,ae.useRef)(),Br=(0,ft.useDispatch)();(0,ae.useEffect)(()=>{const Vt=window.scrollY||window.pageYOffset;mn(_t),gt==null||gt.setValue(_t),window.scrollTo(0,Vt)},[_t]),(0,ae.useEffect)(()=>{Et==null||Et(Yn)},[Yn]),(0,ae.useEffect)(()=>{if(or.current){let Vt=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,we.I)(Sr,Ar=>{var Wr,ei,Li;Ar.id?((Wr=Sr==null?void 0:Sr.type)==null?void 0:Wr.indexOf("image"))>-1?It.replaceSelection(`<img width="100%" src="/api/attachments/${Ar.id}?type=${Ar.content_type})" alt="" />`):((ei=Sr==null?void 0:Sr.type)==null?void 0:ei.indexOf("video"))>-1?It.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ar.id}"></video>`):((Li=Sr==null?void 0:Sr.type)==null?void 0:Li.indexOf("pdf"))>-1?It.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=${Sr.type}&disposition=inline" target="_blank">${Sr.name}</a>`):In.includes(zr)?It.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=office&disposition=inline" target="_blank">${Sr.name}</a>`):It.replaceSelection(`[${Sr.name}](/api/attachments/${Ar.id}?type=${Ar.content_type})`):(Ar==null?void 0:Ar.status)===401&&(document.location.href="/user/login")})}catch(br){Ve.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const It=ze().fromTextArea(or.current,{mode:Rn,lineNumbers:!Jn,lineWrapping:!0,value:Ut,autoCloseTags:!0,autoCloseBrackets:!0});return It.on("keyup",function(rn,ln){ln.keyCode===8&&(rn.getValue()==""?It.setOption("placeholder",hn):It.setOption("placeholder",null))}),It.on("keydown",function(rn,ln){if(ln.keyCode===8){var Mn=Jr(rn);Mn&&ln.preventDefault()}}),tr&&It.focus(),It.on("paste",Vt),Yt&&It.on("beforeChange",function(rn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),en(It),()=>{It.off("paste",Vt)}}},[]);const Vr=(0,ae.useCallback)(()=>{if(Er.current)try{}catch(Vt){console.log(Vt,"---- to set md editor body height")}},[wr,Er,Yn]);(0,ae.useEffect)(()=>{function Vt(){let It=new me.Z(rn=>{for(let ln of rn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Vr(),gt.setSize("100%","100%"),gt.refresh())});return It.observe(or.current.parentElement),It}if(gt){const It=Vt();return()=>{var rn,ln;(rn=or.current)!=null&&rn.parentElement&&It.unobserve((ln=or.current)==null?void 0:ln.parentElement)}}},[gt,Vr]),(0,ae.useEffect)(()=>{if(gt){let Vt=[];for(const[It,rn]of Object.entries(Xn)){let ln={[It]:()=>{Dr(rn)}};Vt.push(ln),gt.addKeyMap(ln)}return()=>{for(let It of Vt)gt.removeKeyMap(It)}}},[gt]),(0,ae.useEffect)(()=>{Te!==Yn&&dn(Te)},[Te]),(0,kn.Z)(()=>{if(!it&&nn>0){let Vt=new Date().getTime(),It=window.sessionStorage.getItem(hr);Vt>=nn+Zn&&(!It||It!==vn)&&(window.sessionStorage.setItem(hr,vn),Mr(!0))}},Zn),(0,ae.useEffect)(()=>{Wn(dr)},[gt,dr]),(0,ae.useEffect)(()=>{gt&&tr&&gt.focus()},[gt,tr]),(0,ae.useEffect)(()=>{if(xn&&gt){let Vt=function(rn){let ln=rn.target;if(pr.current){let Mn=ln.scrollTop/ln.scrollHeight;pr.current.scrollTop=pr.current.scrollHeight*Mn}};const It=gt.getScrollerElement();return It.addEventListener("scroll",Vt),()=>{It.removeEventListener("scroll",Vt)}}},[gt,xn]),(0,ae.useEffect)(()=>{if(gt&&Pt){let Vt=function(It,rn){Pt(It,rn)};return gt.on("beforeChange",Vt),()=>{gt.off("beforeChange",Vt)}}},[gt,Pt]),(0,ae.useEffect)(()=>{if(gt&&Be){let Vt=function(){Be(gt.getValue())};return gt.on("blur",Vt),()=>{gt.off("blur",Vt)}}},[gt,Be]);function Jr(Vt,It){var rn=Vt.getDoc(),ln=rn.getCursor(),Mn=rn.getLine(ln.line),sr=Mn.charAt(ln.ch-1),Vn=Mn.lastIndexOf("@\u2581@",ln.ch),yr=Mn.lastIndexOf("@\u2581\u2581@",ln.ch),br=Vn>yr?Vn:yr,Sr=Vn>yr?3:4;if(er.indexOf(sr)===-1)return null;if(console.log("change1:",It,Vt,Mn,ln,br,Vn,yr,sr),br>=0&&ln.ch-br<5){var zr=br+Sr;return rn.replaceRange("",{line:ln.line,ch:br},{line:ln.line,ch:zr}),{line:ln.line,ch:zr}}return null}(0,ae.useEffect)(()=>{if(gt){let Vt=function(It,rn){const ln=It.getValue();mn(ln),Hn(new Date().getTime()),It.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pn&&(Cn?pn(ln,Kt(ln)):pn(ln))};return gt.on("change",Vt),()=>{gt.off("change",Vt)}}},[gt,pn]),(0,ae.useEffect)(()=>{if(gt)if(Ut==null)gt.setValue(""),mn("");else{const Vt=window.scrollY||window.pageYOffset;Ut!==gt.getValue()&&(gt.setValue(Ut),mn(Ut),gt.setCursor(Yt?1:gt.lineCount(),0),window.scrollTo(0,Vt))}},[gt,Ut]);const Dr=(0,ae.useCallback)(Vt=>{const It=gt.getCursor(),rn=gt.getSelection();let ln=rn.split(`
`);switch(Vt){case"bold":return gt.replaceSelection("**"+rn+"**"),rn===""&&gt.setCursor(It.line,It.ch+2),gt.focus();case"italic":return gt.replaceSelection("*"+rn+"*"),rn===""&&gt.setCursor(It.line,It.ch+1),gt.focus();case"code":return gt.replaceSelection("`"+rn+"`"),rn===""&&gt.setCursor(It.line,It.ch+1),gt.focus();case"inline-latex":return(0,cn.Ye)(Br)?void 0:(gn("inline-latex"),gt.focus());case"latex":return gt.replaceSelection("```latex\n"+rn+"\n```"),gt.setCursor(It.line+1,rn.length+1),gt.focus();case"line-break":return gt.replaceSelection(`<br/>
`),gt.focus();case"list-ul":return rn===""?gt.replaceSelection("- "+rn):gt.replaceSelection(ln.map(Mn=>Mn===""?"":`- ${Mn}`).join(`
`)),gt.focus();case"list-ol":return rn===""?gt.replaceSelection("1. "+rn):gt.replaceSelection(ln.map((Mn,sr)=>Mn===""?"":`${sr+1}. ${Mn}`).join(`
`)),gt.focus();case"add-null-ch":At==null||At();return;case"add-signal":return rn===""&&gt.setCursor(It.line,It.ch),gt.replaceSelection(ur),gt.focus();case"add-multiple":return rn===""&&gt.setCursor(It.line,It.ch),gt.replaceSelection(er),gt.focus();case"inster-template-1":return rn===""&&gt.setCursor(It.line,It.ch),gt.replaceSelection(nr),gt.focus();case"eraser":return gt.setValue(""),gt.focus();case"trigger-watch":return Wn(!xn),gt.focus();case"trigger-full-screen":return dn(!Yn),gt.focus();case ge:gn(ge);return;case Zt:gn(Zt);return;case ct:gn(ct);return;case xt:gn(xt);return;case"maths-latex":if((0,cn.Ye)(Br))return;gn("maths-latex");return;case vt:qn.current="",sessionStorage.removeItem("file_id"),gn(vt);return;case Nt:gn(Nt);return;default:throw new Error}},[gt,xn,Yn]),Hr=(0,ae.useCallback)((Vt,It)=>{var rn,ln,Mn,sr,Vn,yr;Vt!=null&&Vt.disabledClose||gn("");const{src:br,alt:Sr,id:zr}=Vt||{};switch(Gt){case ge:const{title:Oi,link:xi}=Vt;return gt.replaceSelection(`[${Oi}](${xi})`),gt.focus();case Zt:const{language:vi,content:Xi}=Vt;return gt.replaceSelection(["```"+vi,Xi,"```"].join(`
`)),gt.focus();case"maths-latex":for(var Ar=atob(Vt),Wr=new Uint8Array(Ar.length),ei=0;ei<Ar.length;ei++)Wr[ei]=Ar.charCodeAt(ei);var Li=new Blob([Wr],{type:"image/png"});(0,we.I)(Li,mi=>{mi.id?gt.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;gt.replaceSelection("`$$"+Vt+"$$`");break;case Fe:if(!zr)return;gt.getValue().indexOf(br)===-1?gt.replaceSelection(`<center><img id="${zr}" width="80%" src="${br}" class="draw-flowchart" alt="${Sr||""}" /></center>`):document.getElementById(zr).src=nt.Z.API_SERVER+br+"?t="+Date.now();break;case ct:case xt:const fr=It,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?gt.replaceSelection(`<p style="text-align:${fr.align||"initial"}"><img width="${fr.width?fr.width+"%":"initial"}" src="${br}" alt="${Sr||""}" /></p>`):gt.replaceSelection(`<img width="100%" src="${br}" alt="${Sr||""}" />`):((Vn=fr==null?void 0:fr.type)==null?void 0:Vn.indexOf("video"))>-1?gt.replaceSelection(`<video width="100%" controls src="${br}"></video>`):((yr=fr==null?void 0:fr.type)==null?void 0:yr.indexOf("pdf"))>-1?gt.replaceSelection(`<a href="${br}?type=${fr.type}&disposition=inline" target="_blank">${fr.name}</a>`):In.includes(to)?gt.replaceSelection(`<a href="${br}?type=office&disposition=inline" target="_blank">${fr.name}</a>`):gt.replaceSelection(`[${fr.name}](${br})`),gt.focus();case Nt:const{row:ti,col:Ni,align:ao}=Vt;let Ji=`
`;for(let mi=0;mi<ti;mi++){let Fi=[],Zr=[];for(let Wi=0;Wi<Ni;Wi++)mi===1&&Zr.push(un[ao]),Fi.push(" ");mi===1&&(Ji+=`| ${Zr.join(" | ")} |
`),Ji+=`| ${Fi.join(Ni===1?"":" | ")} |
`}return gt.replaceSelection(Ji+`
`),gt.focus();default:throw new Error}},[gt,Gt]),Nr=(0,ae.useMemo)(()=>{switch(Gt){case ge:return ae.createElement(yt,{callback:Hr,onCancel:_r});case Zt:return ae.createElement(st.Z,{callback:Hr,onCancel:_r});case ct:return ae.createElement(we.Z,{callback:Hr,onCancel:_r});case vt:return ae.createElement(et,{editImgId:qn.current,callback:Hr,onCancel:_r});case Nt:return ae.createElement(Wt,{callback:Hr,onCancel:_r});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 _r(){gn("")}(0,ae.useEffect)(()=>{if(Tr.current){let Vt=function(Vn){Mn=!0,sr=Vn.pageY},It=function(){Mn=!1},rn=function(Vn){if(Mn){let yr=Vn.pageY-sr;yr<0&&(yr=0),yr>300&&(yr=300);let br=Tn+yr+"px";Qn(br)}},ln=Tr.current,Mn=!1,sr=0;return ln.addEventListener("mousedown",Vt),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",It),()=>{ln.removeEventListener("mousedown",Vt),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",It)}}},[gt,Tr]),(0,ae.useEffect)(()=>{Qn(Tn)},[Tn]);const ii=rr(En),Or=rr(wr),Fn={width:ii,height:Or},Ot=(0,ae.useMemo)(()=>{if(nn){let Vt=new Date(nn),It=Vt.getHours(),rn=Vt.getMinutes(),ln=Vt.getSeconds();return It=It<10?"0"+It:It,rn=rn<10?"0"+rn:rn,ln=ln<10?"0"+ln:ln,`${It}:${rn}:${ln}`}return 0},[nn]),Kt=Vt=>{const It=[];if(Cn){let rn=-1;Vt=Vt.replace(/(@▁▁@|@▁@)/g,function(ln,Mn,sr){It.push({multiLine:ln!==ur})})}return It};function yn(){window.sessionStorage.removeItem(hr),Mr(!1),Hn(0)}function on(){Mr(!1),Hn(0),gt.setValue(window.sessionStorage.getItem(hr))}(0,ae.useEffect)(()=>{Kn[Gt]&&Gt!==xt&&Gt!==vt&&setTimeout(()=>{const Vt=document.getElementsByClassName("markdown-popup-form")[0],It=window.innerWidth/2-Vt.offsetWidth/2,rn=window.innerHeight/2-Vt.offsetHeight/2;ir(It),gr(rn)},0)},[Gt]);const Dn=Vt=>{Vt.preventDefault();const It=Vt.clientX-Cr,rn=Vt.clientY-Fr;document.body.onmousemove=ln=>{let Mn=ln.clientX-It,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,It,rn)&&(ir(Mn),gr(sr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ar=(Vt,It,rn,ln)=>{const Mn=document.body.clientHeight,sr=document.body.clientWidth;return Vt<20&&rn>Vt||Vt>sr-20&&rn<Vt||It<20&&ln>It||It>Mn-20&&ln<It?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:Er},ae.createElement("div",{className:`markdown-editor-container ${He} ${xn?"on-preview":""} ${Jn?"mini":""} ${Yn?"full-screen":""}`,style:Fn},ae.createElement(Qt,{insertTemp:_n,watch:xn,fullScreen:Yn,showNullButton:qt,showNullProgramButton:Cn,onActionCallback:Dr,hidetoolBar:Gn,extraUse:$t}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:or,placeholder:hn})),xn?ae.createElement("div",{ref:pr,className:"preview-container"},Rn==="stex"&&ae.createElement(ht,{value:vn}),Rn!=="stex"&&ae.createElement(ye.Z,{edit:!0,disabledFill:tn,showProgramFill:Cn,value:vn,openEditor:Vt=>{var It;qn.current=Vt,(It=jn.current)==null||It.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),jt?ae.createElement("a",{ref:Tr,className:"editor-resize"}):null,Gt===xt&&ae.createElement(Ce,{callback:Hr,onCancel:_r}),Gt===vt&&ae.createElement(et,{ref:jn,editImgId:qn.current,callback:Hr,onCancel:_r}),ae.createElement(Oe.Z,null,Kn[Gt]&&Gt!==xt&&Gt!==vt?ae.createElement(Xe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Fr},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:Dn},Kn[Gt]),open:!0,onCancel:_r,footer:null,destroyOnClose:!0,width:Gt===vt?"1200px":null,height:Gt===vt?"80vh":null,className:"markdown-popup-form"},Nr):null))}},82441:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return dt},I:function(){return Qt}});var ae=fe(28284),ft=fe(6767),Ne=fe(37568),ze=fe(44104),me=fe(71051),Je=fe(47889),Ae=fe(7939),Qe=fe(52882),Se=fe(59301),de=fe(59301),Me=Object.defineProperty,ye=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,De=(Oe,$e,Lt)=>$e in Oe?Me(Oe,$e,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):Oe[$e]=Lt,ot=(Oe,$e)=>{for(var Lt in $e||($e={}))Ie.call($e,Lt)&&De(Oe,Lt,$e[Lt]);if(je)for(var Lt of je($e))Re.call($e,Lt)&&De(Oe,Lt,$e[Lt]);return Oe},lt=(Oe,$e)=>ye(Oe,ht($e));const{useForm:wt}=ae.default,mt={width:280,marginRight:10},pt={labelCol:{span:5},wrapperCol:{span:19}};var dt=({callback:Oe,onCancel:$e})=>{const[Lt]=wt();let Pe=(0,Se.useRef)();function Ze(Ht){Pe.current.width=Lt.getFieldValue("width"),Pe.current.align=Lt.getFieldValue("align"),Oe(Ht,Pe.current)}function ke(Ht,St){if(Ht.status===-1){ft.ZP.error(Ht.message);return}Lt.setFieldsValue({src:`/api/attachments/${Ht.id}`,type:St.type})}function Ue(Ht){let St=Ht.target.files[0];Pe.current=St,Qt(St,ke)}return de.createElement(ae.default,lt(ot({form:Lt},pt),{className:"upload-image-panel",onFinish:Ze,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(Ne.default,{style:mt})),de.createElement(rt,{onFileChange:Ue}))),de.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(Ne.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(Je.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(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Ae.ZP,{type:"default",onClick:$e},"\u53D6\u6D88"))))};function rt({onFileChange:Oe}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:Oe}))}function Qt(Oe,$e){if(!Oe)throw new String("\u6CA1\u6709\u6587\u4EF6");let Lt=new FormData;Lt.append("editormd-image-file",Oe),Lt.append("file_param_name","editormd-image-file"),Lt.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(Ze){$e(JSON.parse(Ze.target.responseText),Oe)},!1),Pe.addEventListener("error",function(Ze){console.error(Ze)},!1),Pe.open("POST",`${Qe.KI}/api/attachments.json`),Pe.send(Lt)}},35990:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ne}});var ae=fe(59301),ft=fe(4676);class Ne extends ae.Component{constructor(me){super(me);const Je=window.document;this.node=Je.createElement("div"),Je.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,ft.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58478:function(Rt,zt,fe){"use strict";fe.d(zt,{SV:function(){return Ce},ZP:function(){return ut}});var ae=fe(59301),ft=fe(76374);const Ne={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 <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},Je={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(`
`)}]},Ae={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
`)}]};var Qe=fe(53184),Se=fe.n(Qe),de=(ve,Le,Ve)=>new Promise((xe,We)=>{var Ke=Ye=>{try{nt(Ve.next(Ye))}catch(bt){We(bt)}},et=Ye=>{try{nt(Ve.throw(Ye))}catch(bt){We(bt)}},nt=Ye=>Ye.done?xe(Ye.value):Promise.resolve(Ye.value).then(Ke,et);nt((Ve=Ve.apply(ve,Le)).next())});const Me={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,Le,Ve,xe)=>{const We=Le.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ve.lineNumber,endColumn:Ve.column});return Array.from(new Set(We.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:ve.languages.CompletionItemKind.Text,insertText:et,range:xe}))},ht=(ve,Le,Ve,xe)=>{ve.languages.registerCompletionItemProvider(Le,{provideCompletionItems(We,Ke){const et=We.getWordUntilPosition(Ke),nt={startLineNumber:Ke.lineNumber,endLineNumber:Ke.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},Ye=We.getLineContent(Ke.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...ye(ve,We,Ke,nt),...Ve.map(kt=>({label:kt,kind:ve.languages.CompletionItemKind.Keyword,documentation:kt,insertText:kt,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...xe.map(kt=>({label:kt.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:kt.content,insertText:Ye.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}})};var je=ve=>{Me.languages.forEach(Le=>{ve.languages.registerDocumentFormattingEditProvider(Le,{provideDocumentFormattingEdits(Ve){return de(this,null,function*(){const xe=Se()(Ve.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:Ve.getFullModelRange(),text:xe}]})}})}),ht(ve,"java",ze.keywords,ze.quickKey),ht(ve,"cpp",me.keywords,me.quickKey),ht(ve,"c",Ne.keywords,[]),ht(ve,"python",Je.keywords,Je.quickKey),ht(ve,"scala",Ae.keywords,Ae.quickKey)};const Ie="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Re=Object.defineProperty,De=(ve,Le,Ve)=>Le in ve?Re(ve,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):ve[Le]=Ve,ot=(ve,Le,Ve)=>De(ve,typeof Le!="symbol"?Le+"":Le,Ve);const lt=class Wl{constructor(Le,Ve,xe){this.placeholder=Le,this.editor=Ve,this.monaco=xe,Ve.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(lt,"ID","editor.widget.placeholderHint");var mt=lt,pt=fe(96236),dt=fe(6767),rt=fe(25399),Qt=fe(89392),Oe=fe(94276),$e=fe(56102),Lt=Object.defineProperty,Pe=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,St=(ve,Le,Ve)=>Le in ve?Lt(ve,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):ve[Le]=Ve,Ct=(ve,Le)=>{for(var Ve in Le||(Le={}))Ue.call(Le,Ve)&&St(ve,Ve,Le[Ve]);if(ke)for(var Ve of ke(Le))Ht.call(Le,Ve)&&St(ve,Ve,Le[Ve]);return ve},at=(ve,Le)=>Pe(ve,Ze(Le)),pe=(ve,Le)=>{var Ve={};for(var xe in ve)Ue.call(ve,xe)&&Le.indexOf(xe)<0&&(Ve[xe]=ve[xe]);if(ve!=null&&ke)for(var xe of ke(ve))Le.indexOf(xe)<0&&Ht.call(ve,xe)&&(Ve[xe]=ve[xe]);return Ve},ue=(ve,Le,Ve)=>new Promise((xe,We)=>{var Ke=Ye=>{try{nt(Ve.next(Ye))}catch(bt){We(bt)}},et=Ye=>{try{nt(Ve.throw(Ye))}catch(bt){We(bt)}},nt=Ye=>Ye.done?xe(Ye.value):Promise.resolve(Ye.value).then(Ke,et);nt((Ve=Ve.apply(ve,Le)).next())});function _e(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function yt(){}let st=!1;const we={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Xe(ve=[]){let Le=ve;if(Array.isArray(ve)){for(let Ve=0;Ve<ve.length;Ve++){let xe=we[ve[Ve]];if(xe)return xe}return Le[0]}return we[Le]||Le}let Ge=null;const Mt=()=>ue(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 ut=ve=>{var Le=ve,{width:Ve="100%",height:xe="100%",value:We,language:Ke="javascript",style:et={},options:nt={},overrideServices:Ye={},theme:bt="vs-dark",onEditBlur:kt,isCopy:Jt=!1,onSave:Wt,autoHeight:se=!1,forbidCopy:te=!1,onChange:ee=yt,editorDidMount:ie=yt,onFocus:ce=yt,onBreakPoint:ne=yt,breakPointValue:ge=[],filename:ct="educoder.txt",errorLine:vt,errorContent:xt="",highlightLine:Fe,openBreakPoint:Zt=!1,placeholder:Nt="",showMiniMap:Ft=!0}=Le,un=pe(Le,["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)(),Zn=(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 jt;return kn.current&&(jt=new ft.Z(it=>{for(let qt of it)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&cn.current.instance.layout()}),jt.observe(kn.current)),jt}function Bn(){dt.ZP.warning({content:decodeURIComponent(Ie),key:"monaco-editor-tip"})}const Xn=()=>{let jt=cn.current.instance;if(We!=null&&jt&&In){const it=jt.getModel();it&&We!==it.getValue()&&(st=!0,it.setValue(We),jt.layout(),st=!1)}};(0,ae.useEffect)(()=>{const jt=Oe.Z.subscribe("formatDocument",it=>{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=it=>{ee(it)},jt},[]),(0,ae.useEffect)(()=>{var jt;let it=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{Xn()},500),We&&(We!=null&&We.length)&&((jt=it==null?void 0:it.updateOptions)==null||jt.call(it,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(We.split(/\r\n|\r|\n/g).length))+3,5)}))},[We,In,cn.current]),(0,ae.useEffect)(()=>{if(vt&&cn.current&&cn.current.instance){let it=cn.current.instance;it.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=xt,qt.addZone({afterLineNumber:vt||11,heightInLines:3,domNode:Cn})});var jt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};it.addOverlayWidget(jt),it.revealPositionInCenter({lineNumber:20,column:1})}},[vt,cn.current,In]);const Kn=(jt="",it)=>{if(!jt||jt.trim()==="")return!0;const Cn=cn.current.instance.getModel().getLineTokens(it);let Gn=!1;for(let Te=0;Te<2;Te++)Cn.getStandardTokenType(Te)===1&&(Gn=!0);return Gn};(0,ae.useEffect)(()=>{var jt;const it=(jt=cn.current)==null?void 0:jt.instance;if(it&&In&&te){const qt=it.onDidBlurEditorWidget(()=>{nr.current=!1}),Cn=it.onDidFocusEditorText(()=>{nr.current=!0});return()=>{qt.dispose(),Cn.dispose()}}},[cn.current,In,te]),(0,ae.useEffect)(()=>{var jt;if((jt=cn.current)!=null&&jt.instance&&In&&Zt){let it=cn.current.instance,qt=it.getModel();if(!qt)return;(()=>{var _t;let $t=[],At=[];const gt=qt.getAllDecorations();for(let vn of gt)vn.options.className==="highlighted-line"&&($t.push((_t=vn==null?void 0:vn.range)==null?void 0:_t.startLineNumber),At.push(vn==null?void 0:vn.id));if(Fe===$t[0])return;qt.deltaDecorations(At,[]);const en=qt.getLineCount();Fe&&Fe<=en&&(it.deltaDecorations([],[{range:new Ge.Range(Fe,1,Fe,qt.getLineMaxColumn(Fe)),options:{isWholeLine:!0,className:"highlighted-line"}}]),it.revealLineInCenter(Fe))})();const Gn=(_t=!1)=>{var $t;let At=[],gt=[];const en=qt.getAllDecorations();for(let vn of en)vn.options.linesDecorationsClassName==="breakpoints-select"&&(At.push(($t=vn==null?void 0:vn.range)==null?void 0:$t.startLineNumber),gt.push(vn==null?void 0:vn.id));if(_t)return{lines:At,ids:gt};ne(At)},Te=_t=>ue(void 0,null,function*(){let $t={range:new Ge.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[$t]),Gn()}),Be=_t=>ue(void 0,null,function*(){let $t=[];const At=it.getLineDecorations(_t);for(let gt of At)gt.options.linesDecorationsClassName==="breakpoints-select"&&$t.push(gt.id);yield qt.deltaDecorations($t,[]),Gn()}),Pt=_t=>{let $t=it.getLineDecorations(_t);for(let At of $t)if(At.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Qt.isEqual)(ge,Gn(!0).lines)){qt.deltaDecorations(Gn(!0).ids,[]);const _t=ge.map($t=>({range:new Ge.Range($t,1,$t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],_t)}const Et=it.onDidChangeModelContent(_t=>{let $t=it.getPosition();if($t){let At=$t.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Kn(qt.getLineContent(At),At)?Be(At):Pt(At)?(Be(At),Te(At)):Gn()},100)}}),He=it.onMouseDown(_t=>{var $t,At,gt;if(_t.target.detail&&((gt=(At=($t=_t.target)==null?void 0:$t.element)==null?void 0:At.className)!=null&&gt.includes("line-numbers"))){let en=_t.target.position.lineNumber;if(Kn(qt.getLineContent(en),en))return;Pt(en)?Be(en):Te(en)}}),Dt=_t=>{let $t={range:new Ge.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Zn.current=it.deltaDecorations(Zn.current,[$t])},Yt=()=>{Zn.current=it.deltaDecorations(Zn.current,[])},tn=it.onMouseMove(_t=>{var $t,At,gt;if(Yt(),_t.target.detail&&((gt=(At=($t=_t.target)==null?void 0:$t.element)==null?void 0:At.className)!=null&&gt.includes("line-numbers"))){let en=_t.target.position.lineNumber;if(Kn(qt.getLineContent(en),en))return;Dt(en)}}),hn=it.onMouseLeave(()=>{Yt()});return()=>{Et.dispose(),He.dispose(),tn.dispose(),hn.dispose()}}},[cn.current,In,ge,Fe,Zt,Ke]),(0,ae.useEffect)(()=>{var jt;(jt=cn.current)!=null&&jt.instance&&Zt&&cn.current.instance.setPosition({lineNumber:0,column:0})},[Fe]);function xr(){let jt=cn.current.instance;if(jt){const it=jt.getSelection(),qt=cn.current.pastePos||{},Cn=new Ge.Range(qt.startLineNumber||it.endLineNumber,qt.startColumn||it.endColumn,qt.endLineNumber||it.endLineNumber,qt.endColumn||it.endColumn);setTimeout(()=>{jt.executeEdits("",[{range:Cn,text:""}])},300)}}function Ut(jt){(window.navigator.platform.match("Mac")?jt.metaKey:jt.ctrlKey)&&jt.keyCode==83&&(jt.preventDefault(),Wt())}const pn=()=>{if(se&&cn.current.instance){const jt=cn.current.instance.getContentHeight();Rn(jt<xe?xe:jt)}else Rn(xe)};function En(jt){var it=document.createEvent("MouseEvents");it.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),jt.dispatchEvent(it)}const Tn=jt=>{if(!nr.current)return;const{keyCode:it,ctrlKey:qt,metaKey:Cn,target:Gn,type:Te}=jt;return(Te==="paste"||(it===67||it===86)&&(Cn||qt))&&Gn.nodeName==="TEXTAREA"&&(Bn(),jt.preventDefault()),!1};function Jn(jt,it){var qt=window.URL||window.webkitURL||window,Cn=new Blob([it]),Gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gn.href=qt.createObjectURL(Cn),Gn.download=jt,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(jt=>{try{Ge=jt,cn.current.instance=Ge.editor.create(kn.current,{value:We,language:Xe(Ke),theme:bt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ft||!1}},Ye);const it=cn.current.instance;let Gn=[...pt.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,He)=>{var Dt,Yt;let tn=Et._first;do He.includes((Yt=(Dt=tn.element)==null?void 0:Dt.command)==null?void 0:Yt.id)&&Et._remove(tn);while(tn=tn.next)};if(ie(it,Ge),setTimeout(()=>{pn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(ct||"educoder.txt",it.getValue())}})},500),cn.current.subscription=it.onDidChangeModelContent(Et=>{mr.current?clearTimeout(er.current):(pn(),ee(it.getValue(),Et)),er.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||je(Ge,Xe(Ke)),te&&(Be(Gn,Te),kn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Tn),window.removeEventListener("paste",Tn),window.addEventListener("keydown",Tn),window.addEventListener("paste",Tn)),window.Monaco=Ge,kt&&it.onDidBlurEditorWidget(()=>{kt(it.getValue())}),ce&&it.onDidFocusEditorText(()=>{te&&Mt(),ce(it.getValue())}),te){Mt();try{it.onDidPaste(Et=>{const He=it.getSelection(),Dt=cn.current.pastePos||{},Yt=new Ge.Range(Dt.startLineNumber||He.endLineNumber,Dt.startColumn||He.endColumn,Dt.endLineNumber||He.endLineNumber,Dt.endColumn||He.endColumn);it.executeEdits("",[{range:Et.range,text:""}])})}catch(Et){}}let Pt=cr();return Nt&&typeof Nt=="string"&&new mt(Nt,it,Ge),rr(!0),()=>{const Et=cn.current.instance;Et.dispose();const He=Et.getModel();He&&He.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Pt.unobserve(kn.current)}}catch(it){}})},[]),(0,ae.useEffect)(()=>{if(cn.current.instance&&In)return document.addEventListener("keydown",Ut,!1),()=>{document.removeEventListener("keydown",Ut)}},[Wt,In]),(0,ae.useEffect)(()=>{let jt=cn.current.instance;if(jt&&In){let it=Xe(Ke);Ge.editor.setModelLanguage(jt.getModel(),it)}},[Ke,In]),(0,ae.useEffect)(()=>{cn.current.instance&&In&&Ge.editor.setTheme(bt)},[bt,In]),(0,ae.useEffect)(()=>{let jt=cn.current.instance;wn.current=nt,jt&&In&&(jt.updateOptions(Ct({},nt)),setTimeout(()=>{jt.getModel().updateOptions(Ct({},nt))},200))},[JSON.stringify(nt),In]),(0,ae.useEffect)(()=>{let jt=cn.current.instance;jt&&In&&jt.layout()},[Ve,xe,In]);const[tr,dr]=(0,ae.useState)(_e(Ve)),[_n,Rn]=(0,ae.useState)(_e(xe)),hr=at(Ct({},et),{width:tr,height:_n,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:kn,style:hr,onFocus:()=>{te&&Mt()}},Jt&&ae.createElement($e.CopyToClipboard,{text:We,onCopy:()=>dt.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(rt.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 Ce({width:ve="100%",height:Le="100%",original:Ve,modified:xe,language:We,options:Ke={}}){const et=(0,ae.useRef)(),[nt,Ye]=(0,ae.useState)(null);function bt(se){let te;return et.current&&(te=new ft.Z(ee=>{for(let ie of ee)(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=>{Ge=se;const te=Ge.editor.createDiffEditor(et.current,at(Ct({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},Ke),{wordWrap:!0}));Ye(te);let ee=bt(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),ee.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{nt&&nt.setModel({original:Ge.editor.createModel(Ve,We),modified:Ge.editor.createModel(xe,We)})},[Ve,xe,We,nt]);const kt=_e(ve),Jt=_e(Le),Wt={width:kt,height:Jt};return ae.createElement("div",{className:"my-diff-editor",ref:et,style:Wt})}},61904:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return ft}});var ae=fe(59301);function ft(Ne,ze){const me=(0,ae.useRef)();(0,ae.useEffect)(()=>{me.current=Ne}),(0,ae.useEffect)(()=>{function Je(){me.current()}if(ze!==null){let Ae=setInterval(Je,ze);return()=>clearInterval(Ae)}},[ze])}},73199:function(Rt,zt,fe){"use strict";fe.r(zt),fe.d(zt,{default:function(){return Lt}});var ae=fe(59301),ft=fe(58106),Ne=fe(28284),ze=fe(6767),me=fe(91882),Je=fe(37568),Ae=fe(14566),Qe=fe(77019),Se=fe(5269),de=fe(71051),Me=fe(62673),ye=fe(7939),ht=fe(77834),je=fe(9726),Ie=fe(26869),Re={bg:"bg___iB8eB",flexRow:"flexRow___rWsOs",flexJustifyCenter:"flexJustifyCenter___GenLk",flexAlignEnd:"flexAlignEnd___AMfei",flexAlignCenter:"flexAlignCenter___rQos5",flexColumn:"flexColumn___fJhyT",formWrap:"formWrap___pNpQ9",titleWrap:"titleWrap____VSL0",fieldWrap:"fieldWrap___ACUG9",mdWrap:"mdWrap___xFqQa",backgroundFa:"backgroundFa___MuFzN",button:"button___tzh3S"},De=Object.defineProperty,ot=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,dt=(Pe,Ze,ke)=>Ze in Pe?De(Pe,Ze,{enumerable:!0,configurable:!0,writable:!0,value:ke}):Pe[Ze]=ke,rt=(Pe,Ze)=>{for(var ke in Ze||(Ze={}))mt.call(Ze,ke)&&dt(Pe,ke,Ze[ke]);if(wt)for(var ke of wt(Ze))pt.call(Ze,ke)&&dt(Pe,ke,Ze[ke]);return Pe},Qt=(Pe,Ze)=>ot(Pe,lt(Ze)),Oe=(Pe,Ze,ke)=>new Promise((Ue,Ht)=>{var St=pe=>{try{at(ke.next(pe))}catch(ue){Ht(ue)}},Ct=pe=>{try{at(ke.throw(pe))}catch(ue){Ht(ue)}},at=pe=>pe.done?Ue(pe.value):Promise.resolve(pe.value).then(St,Ct);at((ke=ke.apply(Pe,Ze)).next())});const $e=({shixunHomeworks:Pe,newCourse:Ze,globalSetting:ke,loading:Ue,dispatch:Ht})=>{var St;const Ct=(0,ft.useParams)(),[at]=Ne.default.useForm(),[pe,ue]=(0,ae.useState)({}),[_e,yt]=(0,ae.useState)(!1),[st,we]=(0,ae.useState)([]),[Xe,Ge]=(0,ae.useState)([]),{commonHomeWorkEditDefaultData:Mt}=Pe,ut={name:"file",multiple:!0,action:Ie.Z.API_SERVER+"/api/attachments.json",defaultFileList:st,onChange(Ve){const{status:xe}=Ve.file;xe==="done"?ze.ZP.success(`${Ve.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`):xe==="error"&&ze.ZP.error(`${Ve.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)}};(0,ae.useEffect)(()=>{ve()},[Ct.topicId]);const Ce=Ve=>Ve==null?void 0:Ve.map(xe=>({uid:xe.id,response:{id:xe.id},name:xe.title,status:"done",url:xe.url})),ve=()=>Oe(void 0,null,function*(){const Ve=yield Ht({type:"shixunHomeworks/editCommonHomeWorkDefaultBankData",payload:{id:Ct.topicId}});Ve&&(at.setFieldsValue({name:Ve.name}),at.setFieldsValue({description:Ve.description}),at.setFieldsValue(rt({},Ve)),ue(rt({},Ve)),we([...Ce(Ve.attachments)]),Ge([...Ce(Ve.reference_attachments)]),yt(!0))}),Le=Ve=>Oe(void 0,null,function*(){var xe,We;const Ke=rt({},Ve);Ke.attachment_ids&&(Ke.attachment_ids=(xe=Ke==null?void 0:Ke.attachment_ids.fileList)==null?void 0:xe.map(nt=>nt.response.id)),Ke.reference_attachment_ids&&(Ke.reference_attachment_ids=(We=Ke==null?void 0:Ke.reference_attachment_ids.fileList)==null?void 0:We.map(nt=>nt.response.id)),(yield(0,je.yT)(Qt(rt(rt({id:Ct.topicId},Ct),Ke),{type:3})))&&ft.history.push(`/users/${Ct.username}/topics/${Ct.topicId}/${Ct.topictype}/group/detail`)});return ae.createElement("section",{className:Re.bg},ae.createElement("section",{className:"animated fadeIn"},ae.createElement("aside",{className:"mt10"},ae.createElement(me.Z,{separator:">"},ae.createElement(me.Z.Item,null,ae.createElement(ft.Link,{to:`/users/${Ct.username}/${Ct.topictype==="personal"?"topics":"topicbank"}/${Ct.topictype}`},Ct.topictype==="personal"?"\u6211\u7684\u8BFE\u5802\u8D44\u6E90":"\u516C\u5171\u9898\u5E93")),ae.createElement(me.Z.Item,null,ae.createElement(ft.Link,{to:`/users/${Ct.username}/topics/${Ct.topicId}/${Ct.topictype}/group/detail`},"\u8BE6\u60C5")),ae.createElement(me.Z.Item,null,"\u7F16\u8F91")))),ae.createElement("aside",{className:"font24 bold mt20 mb20"},"\u7F16\u8F91\u666E\u901A\u4F5C\u4E1A"),ae.createElement(Ne.default,{form:at,className:Re.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:()=>{ue(rt({},at.getFieldsValue()))},onFinish:Le},ae.createElement("div",{className:Re.fieldWrap},ae.createElement(Ne.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},ae.createElement(Je.default,{maxLength:60,suffix:`${((St=pe.name)==null?void 0:St.length)||0}/60`,placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),ae.createElement("div",{className:Re.mdWrap},ae.createElement(Ne.default.Item,{name:"description",label:"\u7B80\u4ECB:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:5e3,message:"\u4F5C\u4E1A\u7B80\u4ECB\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"}]},ae.createElement(ht.Z,{watch:!0,defaultValue:Mt.description})),ae.createElement("div",null,ae.createElement(Ne.default.Item,{name:"attachment_ids"},_e&&ae.createElement(Ae.default,rt({defaultFileList:st},ut),ae.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09"))),ae.createElement(Qe.Z,{gutter:[20,20]},ae.createElement(Se.Z,{flex:"230px"},ae.createElement(Ne.default.Item,{name:"min_num",label:"\u5206\u7EC4\u8BBE\u7F6E",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}]},ae.createElement(de.Z,{style:{width:200},min:1,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5C0F\u4EBA\u6570"}))),ae.createElement(Se.Z,{flex:"230px"},ae.createElement(Ne.default.Item,{name:"max_num",label:ae.createElement("div",null,"\xA0"),rules:[{required:!0,message:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}]},ae.createElement(de.Z,{style:{width:200},max:10,placeholder:"\u8BF7\u586B\u5199\u6BCF\u7EC4\u6700\u5927\u4EBA\u6570"}))),ae.createElement(Se.Z,null,ae.createElement("div",{className:"mt30"},"\uFF08\u5B66\u751F\u63D0\u4EA4\u4F5C\u54C1\u65F6\u9700\u8981\u5173\u8054\u540C\u7EC4\u6210\u5458\uFF0C\u7EC4\u5185\u6210\u5458\u4F5C\u54C1\u5171\u4EAB\uFF09"))),ae.createElement(Qe.Z,null,ae.createElement(Se.Z,null,ae.createElement(Ne.default.Item,{name:"base_on_project",valuePropName:"checked"},ae.createElement(Me.default,{value:1,defaultChecked:!0},"\u57FA\u4E8E\u9879\u76EE\u5B9E\u65BD")),ae.createElement("span",{className:"c-light-black"},"\uFF08\u9009\u4E2D\uFF0C\u5219\u5FC5\u987B\u5728\u672C\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u9879\u76EE\u7BA1\u7406\u5458\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF1B\u4E0D\u9009\u4E2D\uFF0C\u65E0\u9700\u5728\u5E73\u53F0\u521B\u5EFA\u9879\u76EE\uFF0C\u4EFB\u610F\u5C0F\u7EC4\u6210\u5458\u5747\u53EF\u4EE5\u63D0\u4EA4\u4F5C\u54C1\uFF09")))),ae.createElement("div",{className:Re.mdWrap},ae.createElement(Ne.default.Item,{name:"reference_answer",label:"\u53C2\u8003\u7B54\u6848:"},ae.createElement(ht.Z,{defaultValue:Mt.reference_answer,watch:!0})),ae.createElement("div",null,ae.createElement(Ne.default.Item,{name:"reference_attachment_ids"},_e&&ae.createElement(Ae.default,Qt(rt({},ut),{defaultFileList:Xe}),ae.createElement("span",{className:"c-blue"},"\u4E0A\u4F20\u9644\u4EF6")," \uFF08\u5355\u4E2A\u6587\u4EF6150MB\u4EE5\u5185\uFF09")))),ae.createElement("div",{className:Re.backgroundFa},ae.createElement("div",{className:"pt40 mb30"},ae.createElement(Ne.default.Item,null,ae.createElement(ye.ZP,{size:"middle",type:"primary",className:`${Re.button} mr20`,htmlType:"submit"},"\u63D0\u4EA4"),ae.createElement(ye.ZP,{size:"middle",type:"primary",ghost:!0,className:Re.button,onClick:()=>ft.history.push(`/users/${Ct.username}/topics/${Ct.topicId}/${Ct.topictype}/group/detail`)},"\u53D6\u6D88"))))))};var Lt=(0,ft.connect)(({shixunHomeworks:Pe,newCourse:Ze,loading:ke,globalSetting:Ue})=>({shixunHomeworks:Pe,newCourse:Ze,globalSetting:Ue,loading:ke.effects}))($e)},58489:function(Rt,zt,fe){"use strict";fe.d(zt,{AL:function(){return mt},Iy:function(){return Me},Qv:function(){return je},ez:function(){return wt},jb:function(){return ye}});var ae=fe(32834),ft=fe.n(ae),Ne=fe(11690),ze=fe.n(Ne);let me=1;function Je(Oe,$e){const Lt=Oe.match(/^(\s+)(?:```)/);if(Lt===null)return $e;const Pe=Lt[1];return $e.split(`
`).map(Ze=>{const ke=Ze.match(/^\s+/);if(ke===null)return Ze;const[Ue]=ke;return Ue.length>=Pe.length?Ze.slice(Pe.length):Ze}).join(`
`)}let Ae=[],Qe=["<ul>"];const Se=new(ft()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Me(){Ae.length=0,Qe=["<ul>"]}const ye={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ht(Oe,$e,Lt,Pe){if($e>=Oe.length||Oe[$e].level<=Lt)return $e;var Ze=Oe[$e];Pe.push("<li><a href='#"+me+Ze.anchor+"'>"+Ze.text+"</a>"),$e++;var ke=[];return $e=ht(Oe,$e,Ze.level,ke),ke.length>0&&(Pe.push("<ul>"),ke.forEach(function(Ue){Pe.push(Ue)}),Pe.push("</ul>")),Pe.push("</li>"),$e=ht(Oe,$e,Lt,Pe),$e}function je(){return ht(Ae,0,0,Qe),Qe.push("</ul>"),Qe.join("")}const Ie={heading(Oe){const $e=de.exec(Oe);if(me+=1,$e)return{type:"heading",raw:$e[0],depth:$e[1].length,text:$e[2]}},fences(Oe){const $e=this.rules.block.fences.exec(Oe);if($e){const Lt=$e[0];let Pe=Je(Lt,$e[3]||"");const Ze=$e[2]?$e[2].trim():$e[2];if(["latex","katex","math"].indexOf(Ze)>=0){const ke=ot(),Ue=Pe;Pe=ke,lt[ke]={type:"block",expression:Ue}}return{type:"code",raw:Lt,lang:Ze,text:Pe}}}},Re=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const ot=()=>`__special_katext_id_${De++}__`;let lt={};function wt(){return lt}function mt(){De=0,lt={}}function pt(Oe){return Oe=Oe.replace(Re,($e,Lt)=>{const Pe=ot();return lt[Pe]={type:"inline",expression:Lt},Pe}),Oe}const dt=Se.listitem;Se.listitem=function(Oe){return dt(pt(Oe))};const rt=Se.paragraph;Se.paragraph=function(Oe){return rt(pt(Oe))};const Qt=Se.tablecell;Se.tablecell=function(Oe,$e){return Qt(pt(Oe),$e)},Se.code=function(Oe,$e,Lt){const Pe=($e||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${Oe}</p>`:`<pre class="prettyprint linenums"><code class="language-${$e}">${Lt?Oe:(0,Ne.escape)(Oe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Lt?Oe:(0,Ne.escape)(Oe,!0))+"</code></pre>"},Se.heading=function(Oe,$e,Lt){let Pe=this.options.headerPrefix+Lt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ae.push({anchor:Pe,level:$e,text:Oe}),"<h"+$e+' id="'+me+Pe+'">'+Oe+"</h"+$e+">"},ft().setOptions({silent:!0,gfm:!0,pedantic:!1}),ft().use({tokenizer:Ie,renderer:Se}),zt.ZP=ft()},99498:function(Rt,zt,fe){(function(ae){ae(fe(89780))})(function(ae){ae.defineOption("placeholder","",function(Qe,Se,de){var Me=de&&de!=ae.Init;if(Se&&!Me)Qe.on("blur",me),Qe.on("change",Je),Qe.on("swapDoc",Je),ae.on(Qe.getInputField(),"compositionupdate",Qe.state.placeholderCompose=function(){ze(Qe)}),Je(Qe);else if(!Se&&Me){Qe.off("blur",me),Qe.off("change",Je),Qe.off("swapDoc",Je),ae.off(Qe.getInputField(),"compositionupdate",Qe.state.placeholderCompose),ft(Qe);var ye=Qe.getWrapperElement();ye.className=ye.className.replace(" CodeMirror-empty","")}Se&&!Qe.hasFocus()&&me(Qe)});function ft(Qe){Qe.state.placeholder&&(Qe.state.placeholder.parentNode.removeChild(Qe.state.placeholder),Qe.state.placeholder=null)}function Ne(Qe){ft(Qe);var Se=Qe.state.placeholder=document.createElement("pre");Se.style.cssText="height: 0; overflow: visible",Se.style.direction=Qe.getOption("direction"),Se.className="CodeMirror-placeholder CodeMirror-line-like";var de=Qe.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),Se.appendChild(de),Qe.display.lineSpace.insertBefore(Se,Qe.display.lineSpace.firstChild)}function ze(Qe){setTimeout(function(){var Se=!1,de=Qe.getInputField();de.nodeName=="TEXTAREA"?Se=!de.value:Qe.lineCount()==1&&(Se=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),Se?Ne(Qe):ft(Qe)},20)}function me(Qe){Ae(Qe)&&Ne(Qe)}function Je(Qe){var Se=Qe.getWrapperElement(),de=Ae(Qe);Se.className=Se.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Ne(Qe):ft(Qe)}function Ae(Qe){return Qe.lineCount()===1&&Qe.getLine(0)===""}})},25717:function(Rt,zt,fe){(function(ae){ae(fe(89780))})(function(ae){var ft={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(Ie,Re,De){De&&De!=ae.Init&&(Ie.removeKeyMap(me),Ie.state.closeBrackets=null),Re&&(Je(ze(Re,"pairs")),Ie.state.closeBrackets=Re,Ie.addKeyMap(me))});function ze(Ie,Re){return Re=="pairs"&&typeof Ie=="string"?Ie:typeof Ie=="object"&&Ie[Re]!=null?Ie[Re]:ft[Re]}var me={Backspace:Se,Enter:de};function Je(Ie){for(var Re=0;Re<Ie.length;Re++){var De=Ie.charAt(Re),ot="'"+De+"'";me[ot]||(me[ot]=Ae(De))}}Je(ft.pairs+"`");function Ae(Ie){return function(Re){return ye(Re,Ie)}}function Qe(Ie){var Re=Ie.state.closeBrackets;if(!Re||Re.override)return Re;var De=Ie.getModeAt(Ie.getCursor());return De.closeBrackets||Re}function Se(Ie){var Re=Qe(Ie);if(!Re||Ie.getOption("disableInput"))return ae.Pass;for(var De=ze(Re,"pairs"),ot=Ie.listSelections(),lt=0;lt<ot.length;lt++){if(!ot[lt].empty())return ae.Pass;var wt=ht(Ie,ot[lt].head);if(!wt||De.indexOf(wt)%2!=0)return ae.Pass}for(var lt=ot.length-1;lt>=0;lt--){var mt=ot[lt].head;Ie.replaceRange("",Ne(mt.line,mt.ch-1),Ne(mt.line,mt.ch+1),"+delete")}}function de(Ie){var Re=Qe(Ie),De=Re&&ze(Re,"explode");if(!De||Ie.getOption("disableInput"))return ae.Pass;for(var ot=Ie.listSelections(),lt=0;lt<ot.length;lt++){if(!ot[lt].empty())return ae.Pass;var wt=ht(Ie,ot[lt].head);if(!wt||De.indexOf(wt)%2!=0)return ae.Pass}Ie.operation(function(){var mt=Ie.lineSeparator()||`
`;Ie.replaceSelection(mt+mt,null),Ie.execCommand("goCharLeft"),ot=Ie.listSelections();for(var pt=0;pt<ot.length;pt++){var dt=ot[pt].head.line;Ie.indentLine(dt,null,!0),Ie.indentLine(dt+1,null,!0)}})}function Me(Ie){var Re=ae.cmpPos(Ie.anchor,Ie.head)>0;return{anchor:new Ne(Ie.anchor.line,Ie.anchor.ch+(Re?-1:1)),head:new Ne(Ie.head.line,Ie.head.ch+(Re?1:-1))}}function ye(Ie,Re){var De=Qe(Ie);if(!De||Ie.getOption("disableInput"))return ae.Pass;var ot=ze(De,"pairs"),lt=ot.indexOf(Re);if(lt==-1)return ae.Pass;for(var wt=ze(De,"closeBefore"),mt=ze(De,"triples"),pt=ot.charAt(lt+1)==Re,dt=Ie.listSelections(),rt=lt%2==0,Qt,Oe=0;Oe<dt.length;Oe++){var $e=dt[Oe],Lt=$e.head,Pe,Ze=Ie.getRange(Lt,Ne(Lt.line,Lt.ch+1));if(rt&&!$e.empty())Pe="surround";else if((pt||!rt)&&Ze==Re)pt&&je(Ie,Lt)?Pe="both":mt.indexOf(Re)>=0&&Ie.getRange(Lt,Ne(Lt.line,Lt.ch+3))==Re+Re+Re?Pe="skipThree":Pe="skip";else if(pt&&Lt.ch>1&&mt.indexOf(Re)>=0&&Ie.getRange(Ne(Lt.line,Lt.ch-2),Lt)==Re+Re){if(Lt.ch>2&&/\bstring/.test(Ie.getTokenTypeAt(Ne(Lt.line,Lt.ch-2))))return ae.Pass;Pe="addFour"}else if(pt){var ke=Lt.ch==0?" ":Ie.getRange(Ne(Lt.line,Lt.ch-1),Lt);if(!ae.isWordChar(Ze)&&ke!=Re&&!ae.isWordChar(ke))Pe="both";else return ae.Pass}else if(rt&&(Ze.length===0||/\s/.test(Ze)||wt.indexOf(Ze)>-1))Pe="both";else return ae.Pass;if(!Qt)Qt=Pe;else if(Qt!=Pe)return ae.Pass}var Ue=lt%2?ot.charAt(lt-1):Re,Ht=lt%2?Re:ot.charAt(lt+1);Ie.operation(function(){if(Qt=="skip")Ie.execCommand("goCharRight");else if(Qt=="skipThree")for(var St=0;St<3;St++)Ie.execCommand("goCharRight");else if(Qt=="surround"){for(var Ct=Ie.getSelections(),St=0;St<Ct.length;St++)Ct[St]=Ue+Ct[St]+Ht;Ie.replaceSelections(Ct,"around"),Ct=Ie.listSelections().slice();for(var St=0;St<Ct.length;St++)Ct[St]=Me(Ct[St]);Ie.setSelections(Ct)}else Qt=="both"?(Ie.replaceSelection(Ue+Ht,null),Ie.triggerElectric(Ue+Ht),Ie.execCommand("goCharLeft")):Qt=="addFour"&&(Ie.replaceSelection(Ue+Ue+Ue+Ue,"before"),Ie.execCommand("goCharRight"))})}function ht(Ie,Re){var De=Ie.getRange(Ne(Re.line,Re.ch-1),Ne(Re.line,Re.ch+1));return De.length==2?De:null}function je(Ie,Re){var De=Ie.getTokenAt(Ne(Re.line,Re.ch+1));return/\bstring/.test(De.type)&&De.start==Re.ch&&(Re.ch==0||!/\bstring/.test(Ie.getTokenTypeAt(Re)))}})},6313:function(Rt,zt,fe){(function(ae){ae(fe(89780),fe(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(Se,de,Me){if(Me!=ae.Init&&Me&&Se.removeKeyMap("autoCloseTags"),!!de){var ye={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(ye["'/'"]=function(ht){return Je(ht)}),(typeof de!="object"||de.whenOpening!==!1)&&(ye["'>'"]=function(ht){return ze(ht)}),Se.addKeyMap(ye)}});var ft=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ne=["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(Se){if(Se.getOption("disableInput"))return ae.Pass;for(var de=Se.listSelections(),Me=[],ye=Se.getOption("autoCloseTags"),ht=0;ht<de.length;ht++){if(!de[ht].empty())return ae.Pass;var je=de[ht].head,Ie=Se.getTokenAt(je),Re=ae.innerMode(Se.getMode(),Ie.state),De=Re.state,ot=Re.mode.xmlCurrentTag&&Re.mode.xmlCurrentTag(De),lt=ot&&ot.name;if(!lt)return ae.Pass;var wt=Re.mode.configuration=="html",mt=typeof ye=="object"&&ye.dontCloseTags||wt&&ft,pt=typeof ye=="object"&&ye.indentTags||wt&&Ne;Ie.end>je.ch&&(lt=lt.slice(0,lt.length-Ie.end+je.ch));var dt=lt.toLowerCase();if(!lt||Ie.type=="string"&&(Ie.end!=je.ch||!/[\"\']/.test(Ie.string.charAt(Ie.string.length-1))||Ie.string.length==1)||Ie.type=="tag"&&ot.close||Ie.string.indexOf("/")==je.ch-Ie.start-1||mt&&Ae(mt,dt)>-1||Qe(Se,Re.mode.xmlCurrentContext&&Re.mode.xmlCurrentContext(De)||[],lt,je,!0))return ae.Pass;var rt=typeof ye=="object"&&ye.emptyTags;if(rt&&Ae(rt,lt)>-1){Me[ht]={text:"/>",newPos:ae.Pos(je.line,je.ch+2)};continue}var Qt=pt&&Ae(pt,dt)>-1;Me[ht]={indent:Qt,text:">"+(Qt?`
`:"")+"</"+lt+">",newPos:Qt?ae.Pos(je.line+1,0):ae.Pos(je.line,je.ch+1)}}for(var Oe=typeof ye=="object"&&ye.dontIndentOnAutoClose,ht=de.length-1;ht>=0;ht--){var $e=Me[ht];Se.replaceRange($e.text,de[ht].head,de[ht].anchor,"+insert");var Lt=Se.listSelections().slice(0);Lt[ht]={head:$e.newPos,anchor:$e.newPos},Se.setSelections(Lt),!Oe&&$e.indent&&(Se.indentLine($e.newPos.line,null,!0),Se.indentLine($e.newPos.line+1,null,!0))}}function me(Se,de){for(var Me=Se.listSelections(),ye=[],ht=de?"/":"</",je=Se.getOption("autoCloseTags"),Ie=typeof je=="object"&&je.dontIndentOnSlash,Re=0;Re<Me.length;Re++){if(!Me[Re].empty())return ae.Pass;var De=Me[Re].head,ot=Se.getTokenAt(De),lt=ae.innerMode(Se.getMode(),ot.state),wt=lt.state;if(de&&(ot.type=="string"||ot.string.charAt(0)!="<"||ot.start!=De.ch-1))return ae.Pass;var mt,pt=lt.mode.name!="xml"&&Se.getMode().name=="htmlmixed";if(pt&&lt.mode.name=="javascript")mt=ht+"script";else if(pt&&lt.mode.name=="css")mt=ht+"style";else{var dt=lt.mode.xmlCurrentContext&&lt.mode.xmlCurrentContext(wt);if(!dt||dt.length&&Qe(Se,dt,dt[dt.length-1],De))return ae.Pass;mt=ht+dt[dt.length-1]}Se.getLine(De.line).charAt(ot.end)!=">"&&(mt+=">"),ye[Re]=mt}if(Se.replaceSelections(ye),Me=Se.listSelections(),!Ie)for(var Re=0;Re<Me.length;Re++)(Re==Me.length-1||Me[Re].head.line<Me[Re+1].head.line)&&Se.indentLine(Me[Re].head.line)}function Je(Se){return Se.getOption("disableInput")?ae.Pass:me(Se,!0)}ae.commands.closeTag=function(Se){return me(Se)};function Ae(Se,de){if(Se.indexOf)return Se.indexOf(de);for(var Me=0,ye=Se.length;Me<ye;++Me)if(Se[Me]==de)return Me;return-1}function Qe(Se,de,Me,ye,ht){if(!ae.scanForClosingTag)return!1;var je=Math.min(Se.lastLine()+1,ye.line+500),Ie=ae.scanForClosingTag(Se,ye,null,je);if(!Ie||Ie.tag!=Me)return!1;for(var Re=ht?1:0,De=de.length-1;De>=0&&de[De]==Me;De--)++Re;ye=Ie.to;for(var De=1;De<Re;De++){var ot=ae.scanForClosingTag(Se,ye,null,je);if(!ot||ot.tag!=Me)return!1;ye=ot.to}return!0}})},32855:function(Rt,zt,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";var ft=ae.Pos;function Ne(De,ot){return De.line-ot.line||De.ch-ot.ch}var ze="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",me=ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Je=new RegExp("<(/?)(["+ze+"]["+me+"]*)","g");function Ae(De,ot,lt,wt){this.line=ot,this.ch=lt,this.cm=De,this.text=De.getLine(ot),this.min=wt?Math.max(wt.from,De.firstLine()):De.firstLine(),this.max=wt?Math.min(wt.to-1,De.lastLine()):De.lastLine()}function Qe(De,ot){var lt=De.cm.getTokenTypeAt(ft(De.line,ot));return lt&&/\btag\b/.test(lt)}function Se(De){if(!(De.line>=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 Me(De){for(;;){var ot=De.text.indexOf(">",De.ch);if(ot==-1){if(Se(De))continue;return}if(!Qe(De,ot+1)){De.ch=ot+1;continue}var lt=De.text.lastIndexOf("/",ot),wt=lt>-1&&!/\S/.test(De.text.slice(lt+1,ot));return De.ch=ot+1,wt?"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(!Qe(De,ot+1)){De.ch=ot;continue}Je.lastIndex=ot,De.ch=ot;var lt=Je.exec(De.text);if(lt&&lt.index==ot)return lt}}function ht(De){for(;;){Je.lastIndex=De.ch;var ot=Je.exec(De.text);if(!ot){if(Se(De))continue;return}if(!Qe(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(!Qe(De,ot+1)){De.ch=ot;continue}var lt=De.text.lastIndexOf("/",ot),wt=lt>-1&&!/\S/.test(De.text.slice(lt+1,ot));return De.ch=ot+1,wt?"selfClose":"regular"}}function Ie(De,ot){for(var lt=[];;){var wt=ht(De),mt,pt=De.line,dt=De.ch-(wt?wt[0].length:0);if(!wt||!(mt=Me(De)))return;if(mt!="selfClose")if(wt[1]){for(var rt=lt.length-1;rt>=0;--rt)if(lt[rt]==wt[2]){lt.length=rt;break}if(rt<0&&(!ot||ot==wt[2]))return{tag:wt[2],from:ft(pt,dt),to:ft(De.line,De.ch)}}else lt.push(wt[2])}}function Re(De,ot){for(var lt=[];;){var wt=je(De);if(!wt)return;if(wt=="selfClose"){ye(De);continue}var mt=De.line,pt=De.ch,dt=ye(De);if(!dt)return;if(dt[1])lt.push(dt[2]);else{for(var rt=lt.length-1;rt>=0;--rt)if(lt[rt]==dt[2]){lt.length=rt;break}if(rt<0&&(!ot||ot==dt[2]))return{tag:dt[2],from:ft(De.line,De.ch),to:ft(mt,pt)}}}}ae.registerHelper("fold","xml",function(De,ot){for(var lt=new Ae(De,ot.line,0);;){var wt=ht(lt);if(!wt||lt.line!=ot.line)return;var mt=Me(lt);if(!mt)return;if(!wt[1]&&mt!="selfClose"){var pt=ft(lt.line,lt.ch),dt=Ie(lt,wt[2]);return dt&&Ne(dt.from,pt)>0?{from:pt,to:dt.from}:null}}}),ae.findMatchingTag=function(De,ot,lt){var wt=new Ae(De,ot.line,ot.ch,lt);if(!(wt.text.indexOf(">")==-1&&wt.text.indexOf("<")==-1)){var mt=Me(wt),pt=mt&&ft(wt.line,wt.ch),dt=mt&&ye(wt);if(!(!mt||!dt||Ne(wt,ot)>0)){var rt={from:ft(wt.line,wt.ch),to:pt,tag:dt[2]};return mt=="selfClose"?{open:rt,close:null,at:"open"}:dt[1]?{open:Re(wt,dt[2]),close:rt,at:"close"}:(wt=new Ae(De,pt.line,pt.ch,lt),{open:rt,close:Ie(wt,dt[2]),at:"open"})}}},ae.findEnclosingTag=function(De,ot,lt,wt){for(var mt=new Ae(De,ot.line,ot.ch,lt);;){var pt=Re(mt,wt);if(!pt)break;var dt=new Ae(De,ot.line,ot.ch,lt),rt=Ie(dt,pt.tag);if(rt)return{open:pt,close:rt}}},ae.scanForClosingTag=function(De,ot,lt,wt){var mt=new Ae(De,ot.line,ot.ch,wt?{from:0,to:wt}:null);return Ie(mt,lt)}})},89780:function(Rt){(function(zt,fe){Rt.exports=fe()})(this,function(){"use strict";var zt=navigator.userAgent,fe=navigator.platform,ae=/gecko\/\d/i.test(zt),ft=/MSIE \d/.test(zt),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zt),ze=/Edge\/(\d+)/.exec(zt),me=ft||Ne||ze,Je=me&&(ft?document.documentMode||6:+(ze||Ne)[1]),Ae=!ze&&/WebKit\//.test(zt),Qe=Ae&&/Qt\/\d+\.\d+/.test(zt),Se=!ze&&/Chrome\//.test(zt),de=/Opera\//.test(zt),Me=/Apple Computer/.test(navigator.vendor),ye=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(zt),ht=/PhantomJS/.test(zt),je=!ze&&/AppleWebKit/.test(zt)&&/Mobile\/\w+/.test(zt),Ie=/Android/.test(zt),Re=je||Ie||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(zt),De=je||/Mac/.test(fe),ot=/\bCrOS\b/.test(zt),lt=/win/i.test(fe),wt=de&&zt.match(/Version\/(\d*\.\d*)/);wt&&(wt=Number(wt[1])),wt&&wt>=15&&(de=!1,Ae=!0);var mt=De&&(Qe||de&&(wt==null||wt<12.11)),pt=ae||me&&Je>=9;function dt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var rt=function(a,y){var x=a.className,b=dt(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 Qt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Oe(a,y){return Qt(a).appendChild(y)}function $e(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var z=0;z<y.length;++z)E.appendChild(y[z]);return E}function Lt(a,y,x,b){var E=$e(a,y,x,b);return E.setAttribute("role","presentation"),E}var Pe;document.createRange?Pe=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Pe=function(a,y,x){var b=document.body.createTextRange();try{b.moveToElementText(a.parentNode)}catch(E){return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",y),b};function Ze(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function ke(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function Ue(a,y){var x=a.className;dt(y).test(x)||(a.className+=(x?" ":"")+y)}function Ht(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!dt(x[b]).test(y)&&(y+=" "+x[b]);return y}var St=function(a){a.select()};je?St=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(St=function(a){try{a.select()}catch(y){}});function Ct(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function at(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function pe(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var z=b||0,re=E||0;;){var oe=a.indexOf(" ",z);if(oe<0||oe>=y)return re+(y-z);re+=oe-z,re+=x-re%x,z=oe+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=Ct(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<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function _e(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var yt=50,st={toString:function(){return"CodeMirror.Pass"}},we={scroll:!1},Xe={origin:"*mouse"},Ge={origin:"+move"};function Mt(a,y,x){for(var b=0,E=0;;){var z=a.indexOf(" ",b);z==-1&&(z=a.length);var re=z-b;if(z==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=z-b,E+=x-E%x,b=z+1,E>=y)return b}}var ut=[""];function Ce(a){for(;ut.length<=a;)ut.push(ve(ut)+" ");return ut[a]}function ve(a){return a[a.length-1]}function Le(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function Ve(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function xe(){}function We(a,y){var x;return Object.create?x=Object.create(a):(xe.prototype=a,x=new xe),y&&at(y,x),x}var Ke=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Ke.test(a))}function nt(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function Ye(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var bt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function kt(a){return a.charCodeAt(0)>=768&&bt.test(a)}function Jt(a,y,x){for(;(x<0?y>0:y<a.length)&&kt(a.charAt(y));)y+=x;return y}function Wt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,z=b<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:x;a(z)?x=z:y=z+b}}function se(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,z=0;z<a.length;++z){var re=a[z];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",z),E=!0)}E||b(y,x,"ltr")}var te=null;function ee(a,y,x){var b;te=null;for(var E=0;E<a.length;++E){var z=a[E];if(z.from<y&&z.to>y)return E;z.to==y&&(z.from!=z.to&&x=="before"?b=E:te=E),z.from==y&&(z.from!=z.to&&x!="before"?b=E:te=E)}return b!=null?b:te}var ie=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function le(he,be,Ee){this.level=he,this.from=be,this.to=Ee}return function(he,be){var Ee=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var tt=he.length,qe=[],Tt=0;Tt<tt;++Tt)qe.push(x(he.charCodeAt(Tt)));for(var Bt=0,Xt=Ee;Bt<tt;++Bt){var an=qe[Bt];an=="m"?qe[Bt]=Xt:Xt=an}for(var fn=0,sn=Ee;fn<tt;++fn){var bn=qe[fn];bn=="1"&&sn=="r"?qe[fn]="n":z.test(bn)&&(sn=bn,bn=="r"&&(qe[fn]="R"))}for(var An=1,Sn=qe[0];An<tt-1;++An){var Un=qe[An];Un=="+"&&Sn=="1"&&qe[An+1]=="1"?qe[An]="1":Un==","&&Sn==qe[An+1]&&(Sn=="1"||Sn=="n")&&(qe[An]=Sn),Sn=Un}for(var Rr=0;Rr<tt;++Rr){var si=qe[Rr];if(si==",")qe[Rr]="N";else if(si=="%"){var jr=void 0;for(jr=Rr+1;jr<tt&&qe[jr]=="%";++jr);for(var Bi=Rr&&qe[Rr-1]=="!"||jr<tt&&qe[jr]=="1"?"1":"N",ki=Rr;ki<jr;++ki)qe[ki]=Bi;Rr=jr-1}}for(var qr=0,Ei=Ee;qr<tt;++qr){var hi=qe[qr];Ei=="L"&&hi=="1"?qe[qr]="L":z.test(hi)&&(Ei=hi)}for(var ri=0;ri<tt;++ri)if(E.test(qe[ri])){var $r=void 0;for($r=ri+1;$r<tt&&E.test(qe[$r]);++$r);for(var Ur=(ri?qe[ri-1]:Ee)=="L",Di=($r<tt?qe[$r]:Ee)=="L",Vo=Ur==Di?Ur?"L":"R":Ee,bo=ri;bo<$r;++bo)qe[bo]=Vo;ri=$r-1}for(var pi=[],eo,li=0;li<tt;)if(re.test(qe[li])){var bs=li;for(++li;li<tt&&re.test(qe[li]);++li);pi.push(new le(0,bs,li))}else{var oo=li,Mo=pi.length,To=be=="rtl"?1:0;for(++li;li<tt&&qe[li]!="L";++li);for(var bi=oo;bi<li;)if(oe.test(qe[bi])){oo<bi&&(pi.splice(Mo,0,new le(1,oo,bi)),Mo+=To);var Uo=bi;for(++bi;bi<li&&oe.test(qe[bi]);++bi);pi.splice(Mo,0,new le(2,Uo,bi)),Mo+=To,oo=bi}else++bi;oo<li&&pi.splice(Mo,0,new le(1,oo,li))}return be=="ltr"&&(pi[0].level==1&&(eo=he.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new le(0,0,eo[0].length))),ve(pi).level==1&&(eo=he.match(/\s+$/))&&(ve(pi).to-=eo[0].length,pi.push(new le(0,tt-eo[0].length,tt)))),be=="rtl"?pi.reverse():pi}}();function ce(a,y){var x=a.order;return x==null&&(x=a.order=ie(a.text,y)),x}var ne=[],ge=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||ne).concat(x)}};function ct(a,y){return a._handlers&&a._handlers[y]||ne}function vt(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var z=_e(E,x);z>-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function xt(a,y){var x=ct(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function Fe(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),xt(a,x||y.type,a,y),cn(y)||y.codemirrorIgnore}function Zt(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var x=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),b=0;b<y.length;++b)_e(x,y[b])==-1&&x.push(y[b])}function Nt(a,y){return ct(a,y).length>0}function Ft(a){a.prototype.on=function(y,x){ge(this,y,x)},a.prototype.off=function(y,x){vt(this,y,x)}}function un(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function kn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function wn(a){un(a),kn(a)}function $n(a){return a.target||a.srcElement}function Zn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var mr=function(){if(me&&Je<9)return!1;var a=$e("div");return"draggable"in a||"dragDrop"in a}(),er;function ur(a){if(er==null){var y=$e("span","\u200B");Oe(a,$e("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(er=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&Je<8))}var x=er?$e("span","\u200B"):$e("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=Oe(a,document.createTextNode("A\u062EA")),x=Pe(y,0,1).getBoundingClientRect(),b=Pe(y,1,2).getBoundingClientRect();return Qt(a),!x||x.left==x.right?!1:nr=b.right-x.right<3}var rr=`
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
`,y);E==-1&&(E=a.length);var z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(x.push(z.slice(0,re)),y+=re+1):(x.push(z),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},cr=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Bn=function(){var a=$e("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=Oe(a,$e("span","x")),x=y.getBoundingClientRect(),b=Pe(y,0,1).getBoundingClientRect();return Xn=Math.abs(x.left-b.left)>1}var xr={},Ut={};function pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),xr[a]=y}function En(a,y){Ut[a]=y}function Tn(a){if(typeof a=="string"&&Ut.hasOwnProperty(a))a=Ut[a];else if(a&&typeof a.name=="string"&&Ut.hasOwnProperty(a.name)){var y=Ut[a.name];typeof y=="string"&&(y={name:y}),a=We(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Tn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Tn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Jn(a,y){y=Tn(y);var x=xr[y.name];if(!x)return Jn(a,"text/plain");var b=x(a,y);if(tr.hasOwnProperty(y.name)){var E=tr[y.name];for(var z in E)E.hasOwnProperty(z)&&(b.hasOwnProperty(z)&&(b["_"+z]=b[z]),b[z]=E[z])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var tr={};function dr(a,y){var x=tr.hasOwnProperty(a)?tr[a]:tr[a]={};at(y,x)}function _n(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function 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 jt=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};jt.prototype.eol=function(){return this.pos>=this.string.length},jt.prototype.sol=function(){return this.pos==this.lineStart},jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},jt.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},jt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},jt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},jt.prototype.skipToEnd=function(){this.pos=this.string.length},jt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},jt.prototype.backUp=function(a){this.pos-=a},jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},jt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},jt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var z=this.string.slice(this.pos).match(a);return z&&z.index>0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},jt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},jt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},jt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function it(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],z=E.chunkSize();if(y<z){x=E;break}y-=z}return x.lines[y]}function qt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(z){var re=z.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function Cn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Gn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Te(a){if(a.parent==null)return null;for(var y=a.parent,x=_e(y.lines,a),b=y.parent;b;y=b,b=b.parent)for(var E=0;b.children[E]!=y;++E)x+=b.children[E].chunkSize();return x+y.first}function Be(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],z=E.height;if(y<z){a=E;continue e}y-=z,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var oe=a.lines[re],le=oe.height;if(y<le)break;y-=le}return x+re}function Pt(a,y){return y>=a.first&&y<a.first+a.size}function Et(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function He(a,y,x){if(x===void 0&&(x=null),!(this instanceof He))return new He(a,y,x);this.line=a,this.ch=y,this.sticky=x}function Dt(a,y){return a.line-y.line||a.ch-y.ch}function Yt(a,y){return a.sticky==y.sticky&&Dt(a,y)==0}function tn(a){return He(a.line,a.ch)}function hn(a,y){return Dt(a,y)<0?y:a}function _t(a,y){return Dt(a,y)<0?a:y}function $t(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function At(a,y){if(y.line<a.first)return He(a.first,0);var x=a.first+a.size-1;return y.line>x?He(x,it(a,x).text.length):gt(y,it(a,y.line).text.length)}function gt(a,y){var x=a.ch;return x==null||x>y?He(a.line,y):x<0?He(a.line,0):a}function en(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=At(a,y[b]);return x}var vn=function(a,y){this.state=a,this.lookAhead=y},mn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};mn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},mn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mn.fromSaved=function(a,y,x){return y instanceof vn?new mn(a,_n(a.mode,y.state),x,y.lookAhead):new mn(a,_n(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vn(y,this.maxLookAhead):y};function xn(a,y,x,b){var E=[a.state.modeGen],z={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},z,b);for(var re=x.state,oe=function(he){x.baseTokens=E;var be=a.state.overlays[he],Ee=1,tt=0;x.state=!0,Qn(a,y.text,be.mode,x,function(qe,Tt){for(var Bt=Ee;tt<qe;){var Xt=E[Ee];Xt>qe&&E.splice(Ee,1,qe,E[Ee+1],Xt),Ee+=2,tt=Math.min(qe,Xt)}if(Tt)if(be.opaque)E.splice(Bt,Ee-Bt,qe,"overlay "+Tt),Ee=Bt+2;else for(;Bt<Ee;Bt+=2){var an=E[Bt+1];E[Bt+1]=(an?an+" ":"")+"overlay "+Tt}},z),x.state=re,x.baseTokens=null,x.baseTokenPos=1},le=0;le<a.state.overlays.length;++le)oe(le);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function Wn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Yn(a,Te(y)),E=y.text.length>a.options.maxHighlightLength&&_n(a.doc.mode,b.state),z=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Yn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new mn(b,!0,y);var z=Lr(a,y,x),re=z>b.first&&it(b,z-1).stateAfter,oe=re?mn.fromSaved(b,re,z):new mn(b,hr(b.mode),z);return b.iter(z,y,function(le){dn(a,le.text,oe);var he=oe.line;le.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?oe.save():null,oe.nextLine()}),x&&(b.modeFrontier=oe.line),oe}function dn(a,y,x,b){var E=a.doc.mode,z=new jt(y,a.options.tabSize,x);for(z.start=z.pos=b||0,y==""&&Gt(E,x.state);!z.eol();)gn(E,z,x.state),z.start=z.pos}function Gt(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Rn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function gn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Rn(a,x).mode);var z=a.token(y,x);if(y.pos>y.start)return z}throw new Error("Mode "+a.name+" failed to advance stream.")}var nn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Hn(a,y,x,b){var E=a.doc,z=E.mode,re;y=At(E,y);var oe=it(E,y.line),le=Yn(a,y.line,x),he=new jt(oe.text,a.options.tabSize,le),be;for(b&&(be=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,re=gn(z,he,le.state),b&&be.push(new nn(he,re,_n(E.mode,le.state)));return b?be:new nn(he,re,le.state)}function wr(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function Qn(a,y,x,b,E,z,re){var oe=x.flattenSpans;oe==null&&(oe=a.options.flattenSpans);var le=0,he=null,be=new jt(y,a.options.tabSize,b),Ee,tt=a.options.addModeClass&&[null];for(y==""&&wr(Gt(x,b.state),z);!be.eol();){if(be.pos>a.options.maxHighlightLength?(oe=!1,re&&dn(a,y,b,be.pos),be.pos=y.length,Ee=null):Ee=wr(gn(x,be,b.state,tt),z),tt){var qe=tt[0].name;qe&&(Ee="m-"+(Ee?qe+" "+Ee:qe))}if(!oe||he!=Ee){for(;le<be.start;)le=Math.min(be.start,le+5e3),E(le,he);he=Ee}be.start=be.pos}for(;le<be.pos;){var Tt=Math.min(be.pos,le+5e3);E(Tt,he),le=Tt}}function Lr(a,y,x){for(var b,E,z=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),oe=y;oe>re;--oe){if(oe<=z.first)return z.first;var le=it(z,oe-1),he=le.stateAfter;if(he&&(!x||oe+(he instanceof vn?he.lookAhead:0)<=z.modeFrontier))return oe;var be=pe(le.text,null,a.options.tabSize);(E==null||b>be)&&(E=oe-1,b=be)}return E}function Mr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var x=a.first,b=y-1;b>x;b--){var E=it(a,b).stateAfter;if(E&&(!(E instanceof vn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var Cr=!1,ir=!1;function Fr(){Cr=!0}function gr(){ir=!0}function or(a,y,x){this.marker=a,this.from=y,this.to=x}function Er(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Tr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function pr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,oe=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(oe||z.from==y&&re.type=="bookmark"&&(!x||!z.marker.insertLeft)){var le=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(b||(b=[])).push(new or(re,z.from,le?null:z.to))}}return b}function jn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,oe=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(oe||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var le=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(b||(b=[])).push(new or(re,le?null:z.from-y,z.to==null?null:z.to-y))}}return b}function Br(a,y){if(y.full)return null;var x=Pt(a,y.from.line)&&it(a,y.from.line).markedSpans,b=Pt(a,y.to.line)&&it(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,z=y.to.ch,re=Dt(y.from,y.to)==0,oe=qn(x,E,re),le=jn(b,z,re),he=y.text.length==1,be=ve(y.text).length+(he?E:0);if(oe)for(var Ee=0;Ee<oe.length;++Ee){var tt=oe[Ee];if(tt.to==null){var qe=Er(le,tt.marker);qe?he&&(tt.to=qe.to==null?null:qe.to+be):tt.to=E}}if(le)for(var Tt=0;Tt<le.length;++Tt){var Bt=le[Tt];if(Bt.to!=null&&(Bt.to+=be),Bt.from==null){var Xt=Er(oe,Bt.marker);Xt||(Bt.from=be,he&&(oe||(oe=[])).push(Bt))}else Bt.from+=be,he&&(oe||(oe=[])).push(Bt)}oe&&(oe=Vr(oe)),le&&le!=oe&&(le=Vr(le));var an=[oe];if(!he){var fn=y.text.length-2,sn;if(fn>0&&oe)for(var bn=0;bn<oe.length;++bn)oe[bn].to==null&&(sn||(sn=[])).push(new or(oe[bn].marker,null,null));for(var An=0;An<fn;++An)an.push(sn);an.push(le)}return an}function Vr(a){for(var y=0;y<a.length;++y){var x=a[y];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Jr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(qe){if(qe.markedSpans)for(var Tt=0;Tt<qe.markedSpans.length;++Tt){var Bt=qe.markedSpans[Tt].marker;Bt.readOnly&&(!b||_e(b,Bt)==-1)&&(b||(b=[])).push(Bt)}}),!b)return null;for(var E=[{from:y,to:x}],z=0;z<b.length;++z)for(var re=b[z],oe=re.find(0),le=0;le<E.length;++le){var he=E[le];if(!(Dt(he.to,oe.from)<0||Dt(he.from,oe.to)>0)){var be=[le,1],Ee=Dt(he.from,oe.from),tt=Dt(he.to,oe.to);(Ee<0||!re.inclusiveLeft&&!Ee)&&be.push({from:he.from,to:oe.from}),(tt>0||!re.inclusiveRight&&!tt)&&be.push({from:oe.to,to:he.to}),E.splice.apply(E,be),le+=be.length-3}}return E}function Dr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function Hr(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Nr(a){return a.inclusiveLeft?-1:0}function _r(a){return a.inclusiveRight?1:0}function ii(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),z=Dt(b.from,E.from)||Nr(a)-Nr(y);if(z)return-z;var re=Dt(b.to,E.to)||_r(a)-_r(y);return re||y.id-a.id}function Or(a,y){var x=ir&&a.markedSpans,b;if(x)for(var E=void 0,z=0;z<x.length;++z)E=x[z],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function Fn(a){return Or(a,!0)}function Ot(a){return Or(a,!1)}function Kt(a,y){var x=ir&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var z=x[E];z.marker.collapsed&&(z.from==null||z.from<y)&&(z.to==null||z.to>y)&&(!b||ii(b,z.marker)<0)&&(b=z.marker)}return b}function yn(a,y,x,b,E){var z=it(a,y),re=ir&&z.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var le=re[oe];if(le.marker.collapsed){var he=le.marker.find(0),be=Dt(he.from,x)||Nr(le.marker)-Nr(E),Ee=Dt(he.to,b)||_r(le.marker)-_r(E);if(!(be>=0&&Ee<=0||be<=0&&Ee>=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=Fn(a);)a=y.find(-1,!0).line;return a}function Dn(a){for(var y;y=Ot(a);)a=y.find(1,!0).line;return a}function ar(a){for(var y,x;y=Ot(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Vt(a,y){var x=it(a,y),b=on(x);return x==b?y:Te(b)}function It(a,y){if(y>a.lastLine())return y;var x=it(a,y),b;if(!rn(a,x))return y;for(;b=Ot(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;E<x.length;++E)if(b=x[E],!!b.marker.collapsed){if(b.from==null)return!0;if(!b.marker.widgetNode&&b.from==0&&b.marker.inclusiveLeft&&ln(a,y,b))return!0}}}function ln(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return ln(a,b.line,Er(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,z=0;z<y.markedSpans.length;++z)if(E=y.markedSpans[z],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&ln(a,y,E))return!0}function Mn(a){a=on(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var z=x.parent;z;x=z,z=x.parent)for(var re=0;re<z.children.length;++re){var oe=z.children[re];if(oe==x)break;y+=oe.height}return y}function sr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Fn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Ot(b);){var z=x.find(0,!0);y-=b.text.length-z.from.ch,b=z.to.line,y+=b.text.length-z.to.ch}return y}function Vn(a){var y=a.display,x=a.doc;y.maxLine=it(x,x.first),y.maxLineLength=sr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=sr(b);E>y.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)},Ft(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={},Ar={};function Wr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Ar:zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=Lt("span",null,null,Ae?"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 z=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Oi,In(a.display.measure)&&(re=ce(z,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&Te(z);fr(z,b,Wn(a,z,oe)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=Ht(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=Ht(z.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(ur(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(Ae){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 xt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Ht(b.pre.className,b.textClass||"")),b}function Li(a){var y=$e("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Oi(a,y,x,b,E,z,re){if(y){var oe=a.splitSpaces?xi(y,a.trailingSpace):y,le=a.cm.state.specialChars,he=!1,be;if(!le.test(y))a.col+=y.length,be=document.createTextNode(oe),a.map.push(a.pos,a.pos+y.length,be),me&&Je<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var Ee=0;;){le.lastIndex=Ee;var tt=le.exec(y),qe=tt?tt.index-Ee:y.length-Ee;if(qe){var Tt=document.createTextNode(oe.slice(Ee,Ee+qe));me&&Je<9?be.appendChild($e("span",[Tt])):be.appendChild(Tt),a.map.push(a.pos,a.pos+qe,Tt),a.col+=qe,a.pos+=qe}if(!tt)break;Ee+=qe+1;var Bt=void 0;if(tt[0]==" "){var Xt=a.cm.options.tabSize,an=Xt-a.col%Xt;Bt=be.appendChild($e("span",Ce(an),"cm-tab")),Bt.setAttribute("role","presentation"),Bt.setAttribute("cm-text"," "),a.col+=an}else tt[0]=="\r"||tt[0]==`
`?(Bt=be.appendChild($e("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Bt.setAttribute("cm-text",tt[0]),a.col+=1):(Bt=a.cm.options.specialCharPlaceholder(tt[0]),Bt.setAttribute("cm-text",tt[0]),me&&Je<9?be.appendChild($e("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||z||re){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var sn=$e("span",[be],fn,z);if(re)for(var bn in re)re.hasOwnProperty(bn)&&bn!="style"&&bn!="class"&&sn.setAttribute(bn,re[bn]);return a.content.appendChild(sn)}a.content.appendChild(be)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var z=a.charAt(E);z==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(z="\xA0"),b+=z,x=z==" "}return b}function vi(a,y){return function(x,b,E,z,re,oe,le){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,be=he+b.length;;){for(var Ee=void 0,tt=0;tt<y.length&&(Ee=y[tt],!(Ee.to>he&&Ee.from<=he));tt++);if(Ee.to>=be)return a(x,b,E,z,re,oe,le);a(x,b.slice(0,Ee.to-he),E,z,null,oe,le),z=null,b=b.slice(Ee.to-he),he=Ee.to}}}function Xi(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function fr(a,y,x){var b=a.markedSpans,E=a.text,z=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(z,z=x[re]),Wr(x[re+1],y.cm.options));return}for(var oe=E.length,le=0,he=1,be="",Ee,tt,qe=0,Tt,Bt,Xt,an,fn;;){if(qe==le){Tt=Bt=Xt=tt="",fn=null,an=null,qe=1/0;for(var sn=[],bn=void 0,An=0;An<b.length;++An){var Sn=b[An],Un=Sn.marker;if(Un.type=="bookmark"&&Sn.from==le&&Un.widgetNode)sn.push(Un);else if(Sn.from<=le&&(Sn.to==null||Sn.to>le||Un.collapsed&&Sn.to==le&&Sn.from==le)){if(Sn.to!=null&&Sn.to!=le&&qe>Sn.to&&(qe=Sn.to,Bt=""),Un.className&&(Tt+=" "+Un.className),Un.css&&(tt=(tt?tt+";":"")+Un.css),Un.startStyle&&Sn.from==le&&(Xt+=" "+Un.startStyle),Un.endStyle&&Sn.to==qe&&(bn||(bn=[])).push(Un.endStyle,Sn.to),Un.title&&((fn||(fn={})).title=Un.title),Un.attributes)for(var Rr in Un.attributes)(fn||(fn={}))[Rr]=Un.attributes[Rr];Un.collapsed&&(!an||ii(an.marker,Un)<0)&&(an=Sn)}else Sn.from>le&&qe>Sn.from&&(qe=Sn.from)}if(bn)for(var si=0;si<bn.length;si+=2)bn[si+1]==qe&&(Bt+=" "+bn[si]);if(!an||an.from==le)for(var jr=0;jr<sn.length;++jr)Xi(y,0,sn[jr]);if(an&&(an.from||0)==le){if(Xi(y,(an.to==null?oe+1:an.to)-le,an.marker,an.from==null),an.to==null)return;an.to==le&&(an=!1)}}if(le>=oe)break;for(var Bi=Math.min(oe,qe);;){if(be){var ki=le+be.length;if(!an){var qr=ki>Bi?be.slice(0,Bi-le):be;y.addToken(y,qr,Ee?Ee+Tt:Tt,Xt,le+qr.length==qe?Bt:"",tt,fn)}if(ki>=Bi){be=be.slice(Bi-le),le=Bi;break}le=ki,Xt=""}be=E.slice(z,z=x[he++]),Ee=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,z=y;z<x;z=E){var re=new to(a.doc,it(a.doc,z),z);E=z+re.size,b.push(re)}return b}var Ni=null;function ao(a){Ni?Ni.ops.push(a):a.ownsGroup=Ni={ops:[a],delayedCallbacks:[]}}function Ji(a){var y=a.delayedCallbacks,x=0;do{for(;x<y.length;x++)y[x].call(null);for(var b=0;b<a.ops.length;b++){var E=a.ops[b];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(x<y.length)}function mi(a,y){var x=a.ownsGroup;if(x)try{Ji(x)}finally{Ni=null,y(x)}}var Fi=null;function Zr(a,y){var x=ct(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ni?E=Ni.delayedCallbacks:Fi?E=Fi:(E=Fi=[],setTimeout(Wi,0));for(var z=function(oe){E.push(function(){return x[oe].apply(null,b)})},re=0;re<x.length;++re)z(re)}}function Wi(){var a=Fi;Fi=null;for(var y=0;y<a.length;++y)a[y]()}function so(a,y,x,b){for(var E=0;E<y.changes.length;E++){var z=y.changes[E];z=="text"?lo(a,y):z=="gutter"?On(a,y,x,b):z=="class"?Ln(a,y):z=="widget"&&Pn(a,y,b)}y.changes=null}function _i(a){return a.node==a.text&&(a.node=$e("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&Je<8&&(a.node.style.zIndex=2)),a.node}function Qr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=_i(y);y.background=b.insertBefore($e("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ei(a,y)}function lo(a,y){var x=y.text.className,b=xo(a,y);y.text==y.node&&(y.node=b.pre),y.text.parentNode.replaceChild(b.pre,y.text),y.text=b.pre,b.bgClass!=y.bgClass||b.textClass!=y.textClass?(y.bgClass=b.bgClass,y.textClass=b.textClass,Ln(a,y)):x&&(y.text.className=x)}function Ln(a,y){Qr(a,y),y.line.wrapClass?_i(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function On(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=_i(y);y.gutterBackground=$e("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var z=y.line.gutterMarkers;if(a.options.lineNumbers||z){var re=_i(y),oe=y.gutter=$e("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(oe),re.insertBefore(oe,y.text),y.line.gutterClass&&(oe.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=oe.appendChild($e("div",Et(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var le=0;le<a.display.gutterSpecs.length;++le){var he=a.display.gutterSpecs[le].className,be=z.hasOwnProperty(he)&&z[he];be&&oe.appendChild($e("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function Pn(a,y,x){y.alignable&&(y.alignable=null);for(var b=dt("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);vr(a,y,x)}function Nn(a,y,x,b){var E=xo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Ln(a,y),On(a,y,x,b),vr(a,y,b),y.node}function vr(a,y,x){if(Ir(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Ir(a,y.rest[b],y,x,!1)}function Ir(a,y,x,b,E){if(y.widgets)for(var z=_i(x),re=0,oe=y.widgets;re<oe.length;++re){var le=oe[re],he=$e("div",[le.node],"CodeMirror-linewidget"+(le.className?" "+le.className:""));le.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Gi(le,he,x,b),a.display.input.setUneditable(he),E&&le.above?z.insertBefore(he,x.gutter||x.text):z.appendChild(he),Zr(le,"redraw")}}function Gi(a,y,x,b){if(a.noHScroll){(x.alignable||(x.alignable=[])).push(y);var E=b.wrapperWidth;y.style.left=b.fixedPos+"px",a.coverGutter||(E-=b.gutterTotalWidth,y.style.paddingLeft=b.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-b.gutterTotalWidth+"px"))}function gi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Ze(document.body,a.node)){var x="position: relative;";a.coverGutter&&(x+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(x+="width: "+y.display.wrapper.clientWidth+"px;"),Oe(y.display.measure,$e("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=$n(y);x!=a.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==a.sizer&&x!=a.mover)return!0}function Kr(a){return a.lineSpace.offsetTop}function Hi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Oe(a.measure,$e("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Mi(a){return yt-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Mi(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Mi(a)-a.display.barHeight}function ji(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var z=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),oe=0;oe<re.length-1;oe++){var le=re[oe],he=re[oe+1];Math.abs(le.bottom-he.bottom)>2&&z.push((le.bottom+he.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Ao(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(Te(a.rest[E])>x)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,Oe(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<a.display.viewTo)return a.display.view[So(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function uo(a,y){var x=Te(y),b=$i(a,x);b&&!b.text?b=null:b&&b.changes&&(so(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=Ao(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function zi(a,y,x,b,E){y.before&&(x=-1);var z=x+(b||""),re;return y.cache.hasOwnProperty(z)?re=y.cache[z]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(ji(a,y.view,y.rect),y.hasHeights=!0),re=wa(a,y,x,b),re.bogus||(y.cache[z]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,z,re,oe,le,he=0;he<a.length;he+=3)if(oe=a[he],le=a[he+1],y<oe?(E=0,z=1,re="left"):y<le?(E=y-oe,z=E+1):(he==a.length-3||y==le&&a[he+3]>y)&&(z=le-oe,E=z-1,y>=le&&(re="right")),E!=null){if(b=a[he+2],oe==le&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],re="left";if(x=="right"&&E==le-oe)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],re="right";break}return{node:b,start:E,end:z,collapse:re,coverStart:oe,coverEnd:le}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),z=E.node,re=E.start,oe=E.end,le=E.collapse,he;if(z.nodeType==3){for(var be=0;be<4;be++){for(;re&&kt(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe<E.coverEnd&&kt(y.line.text.charAt(E.coverStart+oe));)++oe;if(me&&Je<9&&re==0&&oe==E.coverEnd-E.coverStart?he=z.parentNode.getBoundingClientRect():he=Va(Pe(z,re,oe).getClientRects(),b),he.left||he.right||re==0)break;oe=re,re=re-1,le="right"}me&&Je<11&&(he=Ua(a.display.measure,he))}else{re>0&&(le=b="right");var Ee;a.options.lineWrapping&&(Ee=z.getClientRects()).length>1?he=Ee[b=="right"?Ee.length-1:0]:he=z.getBoundingClientRect()}if(me&&Je<9&&!re&&(!he||!he.left&&!he.right)){var tt=z.parentNode.getClientRects()[0];tt?he={left:tt.left,right:tt.left+Ui(a.display),top:tt.top,bottom:tt.bottom}:he=ba}for(var qe=he.top-y.rect.top,Tt=he.bottom-y.rect.top,Bt=(qe+Tt)/2,Xt=y.view.measure.heights,an=0;an<Xt.length-1&&!(Bt<Xt[an]);an++);var fn=an?Xt[an-1]:0,sn=Xt[an],bn={left:(le=="right"?he.right:he.left)-y.rect.left,right:(le=="left"?he.left:he.right)-y.rect.left,top:fn,bottom:sn};return!he.left&&!he.right&&(bn.bogus=!0),a.options.singleCursorHeightPerLine||(bn.rtop=qe,bn.rbottom=Tt),bn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Kn(a))return y;var x=screen.logicalXDPI/screen.deviceXDPI,b=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*x,right:y.right*x,top:y.top*b,bottom:y.bottom*b}}function Ko(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var y=0;y<a.rest.length;y++)a.measure.caches[y]={}}function Yo(a){a.display.externalMeasure=null,Qt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function wo(a){Yo(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Xo(){return Se&&Ie?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Se&&Ie?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Jo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=gi(a.widgets[x]));return y}function Po(a,y,x,b,E){if(!E){var z=Jo(y);x.top+=z,x.bottom+=z}if(b=="line")return x;b||(b="local");var re=Mn(y);if(b=="local"?re+=Kr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var oe=a.display.lineSpace.getBoundingClientRect();re+=oe.top+(b=="window"?0:Ca());var le=oe.left+(b=="window"?0:Xo());x.left+=le,x.right+=le}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var z=a.display.sizer.getBoundingClientRect();b+=z.left,E+=z.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function Bo(a,y,x,b,E){return b||(b=it(a.doc,y.line)),Po(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,z){b=b||it(a.doc,y.line),E||(E=uo(a,b));function re(Tt,Bt){var Xt=zi(a,E,Tt,Bt?"right":"left",z);return Bt?Xt.left=Xt.right:Xt.right=Xt.left,Po(a,b,Xt,x)}var oe=ce(b,a.doc.direction),le=y.ch,he=y.sticky;if(le>=b.text.length?(le=b.text.length,he="before"):le<=0&&(le=0,he="after"),!oe)return re(he=="before"?le-1:le,he=="before");function be(Tt,Bt,Xt){var an=oe[Bt],fn=an.level==1;return re(Xt?Tt-1:Tt,fn!=Xt)}var Ee=ee(oe,le,he),tt=te,qe=be(le,Ee,he=="before");return tt!=null&&(qe.other=be(le,tt,he!="before")),qe}function lr(a,y){var x=0;y=At(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=it(a.doc,y.line),E=Mn(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function zn(a,y,x,b,E){var z=He(a,y,x);return z.xRel=E,b&&(z.outside=b),z}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return zn(b.first,0,null,-1,-1);var E=Be(b,x),z=b.first+b.size-1;if(E>z)return zn(b.first+b.size-1,it(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=it(b,E);;){var oe=Vi(a,re,E,y,x),le=Kt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!le)return oe;var he=le.find(1);if(he.line==E)return he;re=it(b,E=he.line)}}function fi(a,y,x,b){b-=Jo(y);var E=y.text.length,z=Wt(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=Wt(function(re){return zi(a,x,re).top>b},z,E),{begin:z,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,zi(a,x,b),"line").top;return fi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vi(a,y,x,b,E){E-=Mn(y);var z=uo(a,y),re=Jo(y),oe=0,le=y.text.length,he=!0,be=ce(y,a.doc.direction);if(be){var Ee=(a.options.lineWrapping?ro:Zi)(a,y,x,z,be,b,E);he=Ee.level!=1,oe=he?Ee.from:Ee.to-1,le=he?Ee.to:Ee.from-1}var tt=null,qe=null,Tt=Wt(function(An){var Sn=zi(a,z,An);return Sn.top+=re,Sn.bottom+=re,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(tt=An,qe=Sn),!0):!1},oe,le),Bt,Xt,an=!1;if(qe){var fn=b-qe.left<qe.right-b,sn=fn==he;Tt=tt+(sn?0:1),Xt=sn?"after":"before",Bt=fn?qe.left:qe.right}else{!he&&(Tt==le||Tt==oe)&&Tt++,Xt=Tt==0?"after":Tt==y.text.length?"before":zi(a,z,Tt-(he?1:0)).bottom+re<=E==he?"after":"before";var bn=wi(a,He(x,Tt,Xt),"line",y,z);Bt=bn.left,an=E<bn.top?-1:E>=bn.bottom?1:0}return Tt=Jt(y.text,Tt,1),zn(x,Tt,Xt,an,b-Bt)}function Zi(a,y,x,b,E,z,re){var oe=Wt(function(Ee){var tt=E[Ee],qe=tt.level!=1;return ni(wi(a,He(x,qe?tt.to:tt.from,qe?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),le=E[oe];if(oe>0){var he=le.level!=1,be=wi(a,He(x,he?le.from:le.to,he?"after":"before"),"line",y,b);ni(be,z,re,!0)&&be.top>re&&(le=E[oe-1])}return le}function ro(a,y,x,b,E,z,re){var oe=fi(a,y,b,re),le=oe.begin,he=oe.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,Ee=null,tt=0;tt<E.length;tt++){var qe=E[tt];if(!(qe.from>=he||qe.to<=le)){var Tt=qe.level!=1,Bt=zi(a,b,Tt?Math.min(he,qe.to)-1:Math.max(le,qe.from)).right,Xt=Bt<z?z-Bt+1e9:Bt-z;(!be||Ee>Xt)&&(be=qe,Ee=Xt)}}return be||(be=E[E.length-1]),be.from<le&&(be={from:le,to:be.to,level:be.level}),be.to>he&&(be={from:be.from,to:he,level:be.level}),be}var Ti;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=$e("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild($e("br"));Ti.appendChild(document.createTextNode("x"))}Oe(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Qt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=$e("span","xxxxxxxxxx"),x=$e("pre",[y],"CodeMirror-line-like");Oe(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var oe=a.display.gutterSpecs[re].className;x[oe]=z.offsetLeft+z.clientLeft+E,b[oe]=z.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ai(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(rn(a.doc,E))return 0;var z=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(z+=E.widgets[re].height);return x?z+(Math.ceil(E.text.length/b)||1)*y:z+y}}function Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&Gn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&$n(y).getAttribute("cm-not-content")=="true")return null;var z,re,oe=E.lineSpace.getBoundingClientRect();try{z=y.clientX-oe.left,re=y.clientY-oe.top}catch(Ee){return null}var le=ci(a,z,re),he;if(b&&le.xRel>0&&(he=it(a.doc,le.line).text).length==le.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;le=He(le.line,Math.max(0,Math.round((z-Qi(a.display).left)/Ui(a.display))-be))}return le}function So(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function Ci(a,y,x,b){y==null&&(y=a.doc.first),x==null&&(x=a.doc.first+a.doc.size),b||(b=0);var E=a.display;if(b&&x<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)ir&&Vt(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)ir&&It(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var z=ka(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var re=ka(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):fo(a)}else{var oe=ka(a,y,y,-1),le=ka(a,x,x+b,1);oe&&le?(E.view=E.view.slice(0,oe.index).concat(ti(a,oe.lineN,le.lineN)).concat(E.view.slice(le.index)),E.viewTo+=b):fo(a)}var he=E.externalMeasured;he&&(x<he.lineN?he.lineN+=b:y<he.lineN+he.size&&(E.externalMeasured=null))}function ho(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var z=b.view[So(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);_e(re,x)==-1&&re.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=So(a,y),z,re=a.display.view;if(!ir||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var oe=a.display.viewFrom,le=0;le<E;le++)oe+=re[le].size;if(oe!=y){if(b>0){if(E==re.length-1)return null;z=oe+re[E].size-y,E++}else z=oe-y;y+=z,x+=z}for(;Vt(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function 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.viewFrom<y&&(b.view=b.view.slice(So(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(ti(a,b.viewTo,x)):b.viewTo>x&&(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<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Qo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ss(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),z=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var oe=x.sel.ranges[re];if(!(oe.from().line>=a.display.viewTo||oe.to().line<a.display.viewFrom)){var le=oe.empty();(le||a.options.showCursorWhenSelecting)&&ks(a,oe.head,E),le||zl(a,oe,z)}}return b}function ks(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild($e("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var z=x.appendChild($e("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=b.other.left+"px",z.style.top=b.other.top+"px",z.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function zl(a,y,x){var b=a.display,E=a.doc,z=document.createDocumentFragment(),re=Qi(a.display),oe=re.left,le=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,he=E.direction=="ltr";function be(sn,bn,An,Sn){bn<0&&(bn=0),bn=Math.round(bn),Sn=Math.round(Sn),z.appendChild($e("div",null,"CodeMirror-selected","position: absolute; left: "+sn+`px;
top: `+bn+"px; width: "+(An==null?le-sn:An)+`px;
height: `+(Sn-bn)+"px"))}function Ee(sn,bn,An){var Sn=it(E,sn),Un=Sn.text.length,Rr,si;function jr(qr,Ei){return Bo(a,He(sn,qr),"div",Sn,Ei)}function Bi(qr,Ei,hi){var ri=Yr(a,Sn,null,qr),$r=Ei=="ltr"==(hi=="after")?"left":"right",Ur=hi=="after"?ri.begin:ri.end-(/\s/.test(Sn.text.charAt(ri.end-1))?2:1);return jr(Ur,$r)[$r]}var ki=ce(Sn,E.direction);return se(ki,bn||0,An==null?Un:An,function(qr,Ei,hi,ri){var $r=hi=="ltr",Ur=jr(qr,$r?"left":"right"),Di=jr(Ei-1,$r?"right":"left"),Vo=bn==null&&qr==0,bo=An==null&&Ei==Un,pi=ri==0,eo=!ki||ri==ki.length-1;if(Di.top-Ur.top<=3){var li=(he?Vo:bo)&&pi,bs=(he?bo:Vo)&&eo,oo=li?oe:($r?Ur:Di).left,Mo=bs?le:($r?Di:Ur).right;be(oo,Ur.top,Mo-oo,Ur.bottom)}else{var To,bi,Uo,xs;$r?(To=he&&Vo&&pi?oe:Ur.left,bi=he?le:Bi(qr,hi,"before"),Uo=he?oe:Bi(Ei,hi,"after"),xs=he&&bo&&eo?le:Di.right):(To=he?Bi(qr,hi,"before"):oe,bi=!he&&Vo&&pi?le:Ur.right,Uo=!he&&bo&&eo?oe:Di.left,xs=he?Bi(Ei,hi,"after"):le),be(To,Ur.top,bi-To,Ur.bottom),Ur.bottom<Di.top&&be(oe,Ur.bottom,null,Di.top),be(Uo,Di.top,xs-Uo,Di.bottom)}(!Rr||Ea(Ur,Rr)<0)&&(Rr=Ur),Ea(Di,Rr)<0&&(Rr=Di),(!si||Ea(Ur,si)<0)&&(si=Ur),Ea(Di,si)<0&&(si=Di)}),{start:Rr,end:si}}var tt=y.from(),qe=y.to();if(tt.line==qe.line)Ee(tt.line,tt.ch,qe.ch);else{var Tt=it(E,tt.line),Bt=it(E,qe.line),Xt=on(Tt)==on(Bt),an=Ee(tt.line,tt.ch,Xt?Tt.text.length+1:null).end,fn=Ee(qe.line,Xt?0:null,qe.ch).start;Xt&&(an.top<fn.top-2?(be(an.right,an.top,null,an.bottom),be(oe,fn.top,fn.left,fn.bottom)):be(an.right,an.top,fn.left-an.right,an.bottom)),an.bottom<fn.top&&be(oe,an.bottom,null,fn.top)}x.appendChild(z)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||No(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Ds(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,No(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(xt(a,"focus",a,y),a.state.focused=!0,Ue(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Ae&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function No(a,y){a.state.delayingBlurEvent||(a.state.focused&&(xt(a,"blur",a,y),a.state.focused=!1,rt(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<y.view.length;b++){var E=y.view[b],z=a.options.lineWrapping,re=void 0,oe=0;if(!E.hidden){if(me&&Je<8){var le=E.node.offsetTop+E.node.offsetHeight;re=le-x,x=le}else{var he=E.node.getBoundingClientRect();re=he.bottom-he.top,!z&&E.text.firstChild&&(oe=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var be=E.line.height-re;if((be>.005||be<-.005)&&(Gn(E.line,re),Ls(E.line),E.rest))for(var Ee=0;Ee<E.rest.length;Ee++)Ls(E.rest[Ee]);if(oe>a.display.sizerWidth){var tt=Math.ceil(oe/Ui(a.display));tt>a.display.maxLineLength&&(a.display.maxLineLength=tt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ls(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function La(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Kr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,z=Be(y,b),re=Be(y,E);if(x&&x.ensure){var oe=x.ensure.from.line,le=x.ensure.to.line;oe<z?(z=oe,re=Be(y,Mn(it(y,oe))+a.wrapper.clientHeight)):Math.min(le,y.lastLine())>=re&&(z=Be(y,Mn(it(y,le))-a.wrapper.clientHeight),re=le)}return{from:z,to:Math.max(re,z+1)}}function Zl(a,y){if(!Fe(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&&!ht){var z=$e("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Kr(a.display))+`px;
height: `+(y.bottom-y.top+Mi(a)+x.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function _l(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?He(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?He(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,oe=wi(a,y),le=!x||x==y?oe:wi(a,x);E={left:Math.min(oe.left,le.left),top:Math.min(oe.top,le.top)-b,right:Math.max(oe.left,le.left),bottom:Math.max(oe.bottom,le.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,Ee=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-Ee)>1&&(re=!0)),!re)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&ko(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=no(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var oe=a.doc.height+Hi(x),le=y.top<b,he=y.bottom>oe-b;if(y.top<E)re.scrollTop=le?0:y.top;else if(y.bottom>E+z){var be=Math.min(y.top,(he?oe:y.bottom)-z);be!=E&&(re.scrollTop=be)}var Ee=a.options.fixedGutter?0:x.gutters.offsetWidth,tt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Ee,qe=qi(a)-x.gutters.offsetWidth,Tt=y.right-y.left>qe;return Tt&&(y.right=y.left+qe),y.left<10?re.scrollLeft=0:y.left<tt?re.scrollLeft=Math.max(0,y.left+Ee-(Tt?0:10)):y.right>qe+tt-3&&(re.scrollLeft=y.right+(Tt?0:10)-qe),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Fo(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}),Ts(a,y,!0),ae&&es(a),na(a,100))}function Ts(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ko(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Fs(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=$e("div",[$e("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=$e("div",[$e("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&&Je<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var z=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=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(),z=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function Io(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;As(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Da(a),As(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function As(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ps={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&rt(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&&Ue(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.ops.length;b++)x.ops[b].cm.curOp=null;Ul(x)})}function Ul(a){for(var y=a.ops,x=0;x<y.length;x++)Kl(y[x]);for(var b=0;b<y.length;b++)Yl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var z=0;z<y.length;z++)Jl(y[z]);for(var re=0;re<y.length;re++)Ql(y[re])}function Kl(a){var y=a.cm,x=y.display;$l(y),a.updateMaxLine&&Vn(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Ta(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&Da(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Mi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ko(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==ke();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Io(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&Es(a.cm)}function Ql(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Ns(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ts(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ko(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=_l(y,At(b,a.scrollToPos.from),At(b,a.scrollToPos.to),a.scrollToPos.margin);Zl(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var oe=0;oe<z.length;++oe)z[oe].lines.length||xt(z[oe],"hide");if(re)for(var le=0;le<re.length;++le)re[le].lines.length&&xt(re[le],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&xt(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Pi(a,y){if(a.curOp)return y();Do(a);try{return y()}finally{Lo(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Do(a);try{return y.apply(a,arguments)}finally{Lo(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Do(this);try{return a.apply(this,arguments)}finally{Lo(this)}}}function ai(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Do(y);try{return a.apply(this,arguments)}finally{Lo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Ct(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Yn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(z){if(b.line>=a.display.viewFrom){var re=z.styles,oe=z.text.length>a.options.maxHighlightLength?_n(y.mode,b.state):null,le=xn(a,z,b,!0);oe&&(b.state=oe),z.styles=le.styles;var he=z.styleClasses,be=le.classes;be?z.styleClasses=be:he&&(z.styleClasses=null);for(var Ee=!re||re.length!=z.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),tt=0;!Ee&&tt<re.length;++tt)Ee=re[tt]!=z.styles[tt];Ee&&E.push(b.line),z.stateAfter=b.save(),b.nextLine()}else z.text.length<=a.options.maxHighlightLength&&dn(a,z.text,b),z.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Pi(a,function(){for(var z=0;z<E.length;z++)ho(a,E[z],"text")})}}var Ta=function(a,y,x){var b=a.display;this.viewport=y,this.visible=La(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=qi(a),this.force=x,this.dims=co(a),this.events=[]};Ta.prototype.signal=function(a,y){Nt(a,y)&&this.events.push(arguments)},Ta.prototype.finish=function(){for(var a=0;a<this.events.length;a++)xt.apply(null,this.events[a])};function $l(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Mi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Mi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=ke();if(!y||!Ze(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ze(a.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function tu(a){if(!(!a||!a.activeElt||a.activeElt==ke())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ze(document.body,a.anchorNode)&&Ze(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cs(a)==0)return!1;Is(a)&&(fo(a),y.dims=co(a));var E=b.first+b.size,z=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<z&&z-x.viewFrom<20&&(z=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),ir&&(z=Vt(a.doc,z),re=It(a.doc,re));var oe=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,z,re),x.viewOffset=Mn(it(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),Qt(x.cursorDiv),Qt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,oe&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Ns(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==qi(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+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 Ta(a,y);if($a(a,x)){Da(a),Ns(a,x);var b=ea(a);Qo(a),Io(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function oe(Tt){var Bt=Tt.nextSibling;return Ae&&De&&a.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),Bt}for(var le=b.view,he=b.viewFrom,be=0;be<le.length;be++){var Ee=le[be];if(!Ee.hidden)if(!Ee.node||Ee.node.parentNode!=z){var tt=Nn(a,Ee,he,x);z.insertBefore(tt,re)}else{for(;re!=Ee.node;)re=oe(re);var qe=E&&y!=null&&y<=he&&Ee.lineNumber;Ee.changes&&(_e(Ee.changes,"gutter")>-1&&(qe=!1),so(a,Ee,he,x)),qe&&(Qt(Ee.lineNumber),Ee.lineNumber.appendChild(document.createTextNode(Et(a.options,he)))),re=Ee.node.nextSibling}he+=Ee.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 Fs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,z=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=z),x[re].gutterBackground&&(x[re].gutterBackground.style.left=z));var oe=x[re].alignable;if(oe)for(var le=0;le<oe.length;le++)oe[le].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Is(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Et(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild($e("div",[$e("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=E.firstChild.offsetWidth,re=E.offsetWidth-z;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(z,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function rs(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var z=a[E],re=null;if(typeof z!="string"&&(re=z.style,z=z.className),z=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:z,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rs(a){var y=a.gutters,x=a.gutterSpecs;Qt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],z=E.className,re=E.style,oe=y.appendChild($e("div",null,"CodeMirror-gutter "+z));re&&(oe.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=oe,oe.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Rs(a.display),Ci(a),Fs(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=$e("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=$e("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Lt("div",null,"CodeMirror-code"),E.selectionDiv=$e("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=$e("div",null,"CodeMirror-cursors"),E.measure=$e("div",null,"CodeMirror-measure"),E.lineMeasure=$e("div",null,"CodeMirror-measure"),E.lineSpace=Lt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=Lt("div",[E.lineSpace],"CodeMirror-lines");E.mover=$e("div",[z],null,"position: relative"),E.sizer=$e("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=$e("div",null,null,"position: absolute; height: "+yt+"px; width: 1px;"),E.gutters=$e("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=$e("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=$e("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&Je<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Ae&&!(ae&&Re)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rs(b.gutters,b.lineNumbers),Rs(E),x.init(E)}var Aa=0,Ii=null;me?Ii=-.53:ae?Ii=15:Se?Ii=-.7:Me&&(Ii=-1/3);function Os(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Os(a);return y.x*=Ii,y.y*=Ii,y}function Ws(a,y){var x=Os(y),b=x.x,E=x.y,z=a.display,re=z.scroller,oe=re.scrollWidth>re.clientWidth,le=re.scrollHeight>re.clientHeight;if(b&&oe||E&&le){if(E&&De&&Ae){e:for(var he=y.target,be=z.view;he!=re;he=he.parentNode)for(var Ee=0;Ee<be.length;Ee++)if(be[Ee].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!ae&&!de&&Ii!=null){E&&le&&$o(a,Math.max(0,re.scrollTop+E*Ii)),ko(a,Math.max(0,re.scrollLeft+b*Ii)),(!E||E&&le)&&un(y),z.wheelStartX=null;return}if(E&&Ii!=null){var tt=E*Ii,qe=a.doc.scrollTop,Tt=qe+z.wrapper.clientHeight;tt<0?qe=Math.max(0,qe+tt-50):Tt=Math.min(a.doc.height,Tt+tt+50),es(a,{top:qe,bottom:Tt})}Aa<20&&(z.wheelStartX==null?(z.wheelStartX=re.scrollLeft,z.wheelStartY=re.scrollTop,z.wheelDX=b,z.wheelDY=E,setTimeout(function(){if(z.wheelStartX!=null){var Bt=re.scrollLeft-z.wheelStartX,Xt=re.scrollTop-z.wheelStartY,an=Xt&&z.wheelDY&&Xt/z.wheelDY||Bt&&z.wheelDX&&Bt/z.wheelDX;z.wheelStartX=z.wheelStartY=null,an&&(Ii=(Ii*Aa+an)/(Aa+1),++Aa)}},200)):(z.wheelDX+=b,z.wheelDY+=E))}}var Ri=function(a,y){this.ranges=a,this.primIndex=y};Ri.prototype.primary=function(){return this.ranges[this.primIndex]},Ri.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var x=this.ranges[y],b=a.ranges[y];if(!Yt(x.anchor,b.anchor)||!Yt(x.head,b.head))return!1}return!0},Ri.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new kr(tn(this.ranges[y].anchor),tn(this.ranges[y].head));return new Ri(a,this.primIndex)},Ri.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ri.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(Dt(y,b.from())>=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 _t(this.anchor,this.head)},kr.prototype.to=function(){return hn(this.anchor,this.head)},kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(tt,qe){return Dt(tt.from(),qe.from())}),x=_e(y,E);for(var z=1;z<y.length;z++){var re=y[z],oe=y[z-1],le=Dt(oe.to(),re.from());if(b&&!re.empty()?le>0:le>=0){var he=_t(oe.from(),re.from()),be=hn(oe.to(),re.to()),Ee=oe.empty()?re.from()==re.head:oe.from()==oe.head;z<=x&&--x,y.splice(--z,2,new kr(Ee?be:he,Ee?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?He(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),He(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new kr(Hs(E.anchor,y),Hs(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function zs(a,y,x){return a.line==y.line?He(x.line,a.ch-y.ch+x.ch):He(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=He(a.first,0),z=E,re=0;re<y.length;re++){var oe=y[re],le=zs(oe.from,E,z),he=zs(vo(oe),E,z);if(E=oe.to,z=he,x=="around"){var be=a.sel.ranges[re],Ee=Dt(be.head,be.anchor)<0;b[re]=new kr(Ee?he:le,Ee?le:he)}else b[re]=new kr(le,le)}return new Ri(b,a.sel.primIndex)}function os(a){a.doc.mode=Jn(a.options,a.doc.modeOption),ia(a)}function ia(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,na(a,100),a.state.modeGen++,a.curOp&&Ci(a)}function Zs(a,y){return y.from.ch==0&&y.to.ch==0&&ve(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(fn){return x?x[fn]:null}function z(fn,sn,bn){br(fn,sn,bn,b),Zr(fn,"change",fn,y)}function re(fn,sn){for(var bn=[],An=fn;An<sn;++An)bn.push(new yr(he[An],E(An),b));return bn}var oe=y.from,le=y.to,he=y.text,be=it(a,oe.line),Ee=it(a,le.line),tt=ve(he),qe=E(he.length-1),Tt=le.line-oe.line;if(y.full)a.insert(0,re(0,he.length)),a.remove(he.length,a.size-he.length);else if(Zs(a,y)){var Bt=re(0,he.length-1);z(Ee,Ee.text,qe),Tt&&a.remove(oe.line,Tt),Bt.length&&a.insert(oe.line,Bt)}else if(be==Ee)if(he.length==1)z(be,be.text.slice(0,oe.ch)+tt+be.text.slice(le.ch),qe);else{var Xt=re(1,he.length-1);Xt.push(new yr(tt+be.text.slice(le.ch),qe,b)),z(be,be.text.slice(0,oe.ch)+he[0],E(0)),a.insert(oe.line+1,Xt)}else if(he.length==1)z(be,be.text.slice(0,oe.ch)+he[0]+Ee.text.slice(le.ch),E(0)),a.remove(oe.line+1,Tt);else{z(be,be.text.slice(0,oe.ch)+he[0],E(0)),z(Ee,tt+Ee.text.slice(le.ch),qe);var an=re(1,he.length-1);Tt>1&&a.remove(oe.line+1,Tt-1),a.insert(oe.line+1,an)}Zr(a,"change",a,y)}function mo(a,y,x){function b(E,z,re){if(E.linked)for(var oe=0;oe<E.linked.length;++oe){var le=E.linked[oe];if(le.doc!=z){var he=re&&le.sharedHist;x&&!he||(y(le.doc,he),b(le.doc,E,he))}}}b(a,null,!0)}function _s(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),os(a),Gs(a),a.options.lineWrapping||Vn(a),a.options.mode=y.modeOption,Ci(a)}function Gs(a){(a.doc.direction=="rtl"?Ue:rt)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Pi(a,function(){Gs(a),Ci(a)})}function Pa(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ss(a,y){var x={from:tn(y.from),to:vo(y),text:qt(a,y.from,y.to)};return Us(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Us(b,x,y.from.line,y.to.line+1)},!0),x}function js(a){for(;a.length;){var y=ve(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return js(a.done),ve(a.done);if(a.done.length&&!ve(a.done).ranges)return ve(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ve(a.done)}function Vs(a,y,x,b){var E=a.history;E.undone.length=0;var z=+new Date,re,oe;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=su(E,E.lastOp==b)))oe=ve(re.changes),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=z,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,oe||xt(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,z=b&&b.origin;x==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||lu(a,z,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=ve(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Us(a,y,x,b){var E=y["spans_"+a.id],z=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[z]=re.markedSpans),++z})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function hu(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Ks(a,y){var x=hu(a,y),b=Br(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var z=x[E],re=b[E];if(z&&re)e:for(var oe=0;oe<re.length;++oe){for(var le=re[oe],he=0;he<z.length;++he)if(z[he].marker==le.marker)continue e;z.push(le)}else re&&(x[E]=re)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){b.push(x?Ri.prototype.deepCopy.call(z):z);continue}var re=z.changes,oe=[];b.push({changes:oe});for(var le=0;le<re.length;++le){var he=re[le],be=void 0;if(oe.push({from:he.from,to:he.to,text:he.text}),y)for(var Ee in he)(be=Ee.match(/^spans_(\d+)$/))&&_e(y,Number(be[1]))>-1&&(ve(oe)[Ee]=he[Ee],delete he[Ee])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var z=Dt(y,E)<0;z!=Dt(x,E)<0?(E=y,y=x):z!=Dt(y,x)<0&&(y=x)}return new kr(E,y)}else return new kr(x||y,y)}function Na(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(a,new 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),z=0;z<a.sel.ranges.length;z++)b[z]=ls(a.sel.ranges[z],y[z],null,E);var re=Ki(a.cm,b,a.sel.primIndex);di(a,re,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,di(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){di(a,po(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var z=0;z<E.length;z++)this.ranges[z]=new kr(At(a,E[z].anchor),At(a,E[z].head))},origin:x&&x.origin};return xt(a,"beforeSelectionChange",a,b),a.cm&&xt(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=ve(b);E&&E.ranges?(b[b.length-1]=y,Fa(a,y,x)):di(a,y,x)}function di(a,y,x){Fa(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Fa(a,y,x){(Nt(a,"beforeSelectionChange")||a.cm&&Nt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(Dt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Fo(a.cm)}function Qs(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Zt(a.cm)),Zr(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],oe=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],le=Ia(a,re.anchor,oe&&oe.anchor,x,b),he=Ia(a,re.head,oe&&oe.head,x,b);(E||le!=re.anchor||he!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new kr(le,he))}return E?Ki(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var z=it(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var oe=z.markedSpans[re],le=oe.marker,he="selectLeft"in le?!le.selectLeft:le.inclusiveLeft,be="selectRight"in le?!le.selectRight:le.inclusiveRight;if((oe.from==null||(he?oe.from<=y.ch:oe.from<y.ch))&&(oe.to==null||(be?oe.to>=y.ch:oe.to>y.ch))){if(E&&(xt(le,"beforeCursorEnter"),le.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!le.atomic)continue;if(x){var Ee=le.find(b<0?1:-1),tt=void 0;if((b<0?be:he)&&(Ee=el(a,Ee,-b,Ee&&Ee.line==y.line?z:null)),Ee&&Ee.line==y.line&&(tt=Dt(Ee,x))&&(b<0?tt<0:tt>0))return Oo(a,Ee,y,b,E)}var qe=le.find(b<0?-1:1);return(b<0?he:be)&&(qe=el(a,qe,b,qe.line==y.line?z:null)),qe?Oo(a,qe,y,b,E):null}}return y}function Ia(a,y,x,b,E){var z=b||1,re=Oo(a,y,x,z,E)||!E&&Oo(a,y,x,z,!0)||Oo(a,y,x,-z,E)||!E&&Oo(a,y,x,-z,!0);return re||(a.cantEdit=!0,He(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?At(a,He(y.line-1)):null:x>0&&y.ch==(b||it(a,y.line)).text.length?y.line<a.first+a.size-1?He(y.line+1,0):null:new He(y.line,y.ch+x)}function tl(a){a.setSelection(He(a.firstLine(),0),He(a.lastLine()),we)}function nl(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,z,re,oe){E&&(b.from=At(a,E)),z&&(b.to=At(a,z)),re&&(b.text=re),oe!==void 0&&(b.origin=oe)}),xt(a,"beforeChange",a,b),a.cm&&xt(a.cm,"beforeChange",a.cm,b),b.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:b.from,to:b.to,text:b.text,origin:b.origin}}function Wo(a,y,x){if(a.cm){if(!a.cm.curOp)return oi(a.cm,Wo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Nt(a,"beforeChange")||a.cm&&Nt(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=Cr&&!x&&Jr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=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,z){!z&&_e(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,z,re=a.sel,oe=y=="undo"?E.done:E.undone,le=y=="undo"?E.undone:E.done,he=0;he<oe.length&&(z=oe[he],!(x?z.ranges&&!z.equals(a.sel):!z.ranges));he++);if(he!=oe.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=oe.pop(),z.ranges){if(Ba(z,le),x&&!z.equals(a.sel)){di(a,z,{clearRedo:!1});return}re=z}else if(b){oe.push(z);return}else break;var be=[];Ba(re,le),le.push({changes:be,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var Ee=Nt(a,"beforeChange")||a.cm&&Nt(a.cm,"beforeChange"),tt=function(Bt){var Xt=z.changes[Bt];if(Xt.origin=y,Ee&&!nl(a,Xt,!1))return oe.length=0,{};be.push(ss(a,Xt));var an=Bt?is(a,Xt):ve(oe);oa(a,Xt,an,Ks(a,Xt)),!Bt&&a.cm&&a.cm.scrollIntoView({from:Xt.from,to:vo(Xt)});var fn=[];mo(a,function(sn,bn){!bn&&_e(fn,sn.history)==-1&&(sl(sn.history,Xt),fn.push(sn.history)),oa(sn,Xt,null,Ks(sn,Xt))})},qe=z.changes.length-1;qe>=0;--qe){var Tt=tt(qe);if(Tt)return Tt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(Le(a.sel.ranges,function(E){return new kr(He(E.anchor.line+y,E.anchor.ch),He(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;b<x.viewTo;b++)ho(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return oi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);il(a,E),y={from:He(a.first,0),to:He(y.to.line+E,y.to.ch),text:[ve(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:He(z,it(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=qt(a,y.from,y.to),x||(x=is(a,y)),a.cm?du(a.cm,y,b):as(a,y,b),Fa(a,x,we),a.cantEdit&&Ia(a,He(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,oe=!1,le=z.line;a.options.lineWrapping||(le=Te(on(it(b,z.line))),b.iter(le,re.line+1,function(qe){if(qe==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Zt(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(le,z.line+y.text.length,function(qe){var Tt=sr(qe);Tt>E.maxLineLength&&(E.maxLine=qe,E.maxLineLength=Tt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),Mr(b,z.line),na(a,400);var he=y.text.length-(re.line-z.line)-1;y.full?Ci(a):z.line==re.line&&y.text.length==1&&!Zs(a.doc,y)?ho(a,z.line,"text"):Ci(a,z.line,re.line+1,he);var be=Nt(a,"changes"),Ee=Nt(a,"change");if(Ee||be){var tt={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};Ee&&Zr(a,"change",a,tt),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(tt)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var z;b||(b=x),Dt(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),Wo(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(a,y,x,b){for(var E=0;E<a.length;++E){var z=a[E],re=!0;if(z.ranges){z.copied||(z=a[E]=z.deepCopy(),z.copied=!0);for(var oe=0;oe<z.ranges.length;oe++)ol(z.ranges[oe].anchor,y,x,b),ol(z.ranges[oe].head,y,x,b);continue}for(var le=0;le<z.changes.length;++le){var he=z.changes[le];if(x<he.from.line)he.from=He(he.from.line+b,he.from.ch),he.to=He(he.to.line+b,he.to.ch);else if(y<=he.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,z=y;return typeof y=="number"?z=it(a,$t(a,y)):E=Te(y),E==null?null:(b(z,E)&&a.cm&&ho(a.cm,E,x),z)}function sa(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Sr(E),Zr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function la(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}la.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var z=Math.min(y,E-a),re=b.height;if(b.removeInner(a,z),this.height-=re-b.height,E==z&&(this.children.splice(x--,1),b.parent=null),(y-=z)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(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;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<=z){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,oe=re;oe<E.lines.length;){var le=new sa(E.lines.slice(oe,oe+=25));E.height-=le.height,this.children.splice(++b,0,le),le.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=z}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=_e(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<z){var re=Math.min(y,z-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=z}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Te(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var z=gi(this);Gn(x,Math.max(0,x.height-z)),a&&(Pi(a,function(){ll(a,x,-z),ho(a,b,"widget")}),Zr(a,"lineWidgetCleared",a,this,b))}},ua.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(rn(this.doc,b)||Gn(b,b.height+E),x&&Pi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Zr(x,"lineWidgetChanged",x,a,Te(b))}))},Ft(ua);function ll(a,y,x){Mn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),aa(a,y,"widget",function(re){var oe=re.widgets||(re.widgets=[]);if(E.insertAt==null?oe.push(E):oe.splice(Math.min(oe.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!rn(a,re)){var le=Mn(re)<a.scrollTop;Gn(re,re.height+gi(E)),le&&qa(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Zr(z,"lineWidgetAdded",z,E,typeof y=="number"?y:Te(y)),E}var ul=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Do(a),Nt(this,"clear")){var x=this.find();x&&Zr(this,"clear",x.from,x.to)}for(var b=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],oe=Er(re.markedSpans,this);a&&!this.collapsed?ho(a,Te(re),"text"):a&&(oe.to!=null&&(E=Te(re)),oe.from!=null&&(b=Te(re))),re.markedSpans=Tr(re.markedSpans,oe),oe.from==null&&this.collapsed&&!rn(this.doc,re)&&a&&Gn(re,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var le=0;le<this.lines.length;++le){var he=on(this.lines[le]),be=sr(he);be>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Ci(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&Zr(a,"markerCleared",a,this,b,E),y&&Lo(a),this.parent&&this.parent.clear()}},go.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var z=this.lines[E],re=Er(z.markedSpans,this);if(re.from!=null&&(x=He(y?z:Te(z),re.from),a==-1))return x;if(re.to!=null&&(b=He(y?z:Te(z),re.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Pi(b,function(){var E=y.line,z=Te(y.line),re=$i(b,z);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!rn(x.doc,E)&&x.height!=null){var oe=x.height;x.height=null;var le=gi(x)-oe;le&&Gn(E,E.height+le)}Zr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||_e(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(_e(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Ft(go);function zo(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return oi(a.cm,zo)(a,y,x,b,E);var z=new go(a,E),re=Dt(y,x);if(b&&at(b,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=Lt("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(yn(a,y.line,y,x,z)||y.line!=x.line&&yn(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");gr()}z.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var oe=y.line,le=a.cm,he;if(a.iter(oe,x.line+1,function(Ee){le&&z.collapsed&&!le.options.lineWrapping&&on(Ee)==le.display.maxLine&&(he=!0),z.collapsed&&oe!=y.line&&Gn(Ee,0),pr(Ee,new or(z,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),z.collapsed&&a.iter(y.line,x.line+1,function(Ee){rn(a,Ee)&&Gn(Ee,0)}),z.clearOnEnter&&ge(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(Fr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++ul,z.atomic=!0),le){if(he&&(le.curOp.updateMaxLine=!0),z.collapsed)Ci(le,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var be=y.line;be<=x.line;be++)ho(le,be,"text");z.atomic&&qs(le.doc),Zr(le,"markerAdded",le,z)}return z}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Zr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Ft(ca);function vu(a,y,x,b,E){b=at(b),b.shared=!1;var z=[zo(a,y,x,b,E)],re=z[0],oe=b.widgetNode;return mo(a,function(le){oe&&(b.widgetNode=oe.cloneNode(!0)),z.push(zo(le,At(le,y),At(le,x),b,E));for(var he=0;he<le.linked.length;++he)if(le.linked[he].isParent)return;re=ve(z)}),new ca(z,re)}function cl(a){return a.findMarks(He(a.first,0),a.clipPos(He(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),z=a.clipPos(E.from),re=a.clipPos(E.to);if(Dt(z,re)){var oe=zo(a,z,re,b.primary,b.primary.type);b.markers.push(oe),oe.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],z=[E.primary.doc];mo(E.primary.doc,function(le){return z.push(le)});for(var re=0;re<E.markers.length;re++){var oe=E.markers[re];_e(z,oe.doc)==-1&&(oe.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Si=function(a,y,x,b,E){if(!(this instanceof Si))return new Si(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new yr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var z=He(x,0);this.sel=po(z),this.history=new Pa(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),as(this,{from:z,to:z,text:a}),di(this,po(z),we)};Si.prototype=We(la.prototype,{constructor:Si,iter:function(a,y,x){x?this.iterN(a-this.first,y-a,x):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var x=0,b=0;b<y.length;++b)x+=y[b].height;this.insertInner(a-this.first,y,x)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=Cn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=He(this.first,0),x=this.first+this.size-1;Wo(this,{from:y,to:He(x,it(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),di(this,po(y),we)}),replaceRange:function(a,y,x,b){y=At(this,y),x=x?At(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=qt(this,At(this,a),At(this,y));return x===!1?b:b.join(x||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(Pt(this,a))return it(this,a)},getLineNumber:function(a){return Te(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=it(this,a)),on(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return At(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ai(function(a,y,x){Xs(this,At(this,typeof a=="number"?He(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xs(this,At(this,a),At(this,y||a),x)}),extendSelection:ai(function(a,y,x){Na(this,At(this,a),y&&At(this,y),x)}),extendSelections:ai(function(a,y){Ys(this,en(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Le(this.sel.ranges,a);Ys(this,en(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new kr(At(this,a[E].anchor),At(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),di(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new kr(At(this,a),At(this,y||a))),di(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=qt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=qt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ai(function(a,y,x){for(var b=[],E=this.sel,z=0;z<E.ranges.length;z++){var re=E.ranges[z];b[z]={from:re.from(),to:re.to(),text:this.splitLines(a[z]),origin:x}}for(var oe=y&&y!="end"&&ou(this,b,y),le=b.length-1;le>=0;le--)Wo(this,b[le]);oe?Js(this,oe):this.cm&&Fo(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.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Pa(this.history.maxGeneration),mo(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Ro(this.history.done),undone:Ro(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=Ro(a.done.slice(0),null,!0),y.undone=Ro(a.undone.slice(0),null,!0)},setGutterMarker:ai(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&Ye(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ai(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,Ye(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Pt(this,a)||(y=a,a=it(this,a),!a))return null}else if(y=Te(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:ai(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!b[E])b[E]=x;else{if(dt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ai(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",z=b[E];if(z)if(x==null)b[E]=null;else{var re=z.match(dt(x));if(!re)return!1;var oe=re.index+re[0].length;b[E]=z.slice(0,re.index)+(!re.index||oe==z.length?"":" ")+z.slice(oe)||null}else return!1;return!0})}),addLineWidget:ai(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return zo(this,At(this,a),At(this,y),x,x&&x.type||"range")},setBookmark:function(a,y){var x={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=At(this,a),zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=At(this,a);var y=[],x=it(this,a.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var E=x[b];(E.from==null||E.from<=a.ch)&&(E.to==null||E.to>=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=At(this,a),y=At(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var oe=0;oe<re.length;oe++){var le=re[oe];!(le.to!=null&&E==a.line&&a.ch>=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;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var z=E.text.length+b;if(z>a)return y=a,!0;a-=z,++x}),At(this,He(x,y))},indexFromPos:function(a){a=At(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,a.line,function(b){y+=b.text.length+x}),y},copy:function(a){var y=new Si(Cn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,x=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<x&&(x=a.to);var b=new Si(Cn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cl(this)),b},unlinkDoc:function(a){if(a instanceof Gr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cl(this));break}}if(a.history==this.history){var b=[a.id];mo(a,function(E){return b.push(E.id)},!0),a.history=new Pa(null),a.history.done=Ro(this.history.done,b),a.history.undone=Ro(this.history.undone,b)}},iterLinkedDocs:function(a){mo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):rr(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ai(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&au(this.cm))})}),Si.prototype.eachLine=Si.prototype.iter;var hl=0;function bu(a){var y=this;if(fl(y),!(Fe(y,a)||ui(y.display,a))){un(a),me&&(hl=+new Date);var x=Co(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,z=Array(E),re=0,oe=function(){++re==E&&oi(y,function(){x=At(y.doc,x);var qe={from:x,to:x,text:y.doc.splitLines(z.filter(function(Tt){return Tt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Wo(y.doc,qe),Js(y.doc,po(At(y.doc,x),At(y.doc,vo(qe))))})()},le=function(qe,Tt){if(y.options.allowDropFileTypes&&_e(y.options.allowDropFileTypes,qe.type)==-1){oe();return}var Bt=new FileReader;Bt.onerror=function(){return oe()},Bt.onload=function(){var Xt=Bt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Xt)){oe();return}z[Tt]=Xt,oe()},Bt.readAsText(qe)},he=0;he<b.length;he++)le(b[he],he);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var be=a.dataTransfer.getData("Text");if(be){var Ee;if(y.state.draggingText&&!y.state.draggingText.copy&&(Ee=y.listSelections()),Fa(y.doc,po(x,x)),Ee)for(var tt=0;tt<Ee.length;++tt)Ho(y.doc,"",Ee[tt].anchor,Ee[tt].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(qe){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-hl<100)){wn(y);return}if(!(Fe(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Me)){var x=$e("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),de&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();ks(a,x,b),a.display.dragCursor||(a.display.dragCursor=$e("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Oe(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function dl(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var z=0;z<x.length;z++)a(x[z])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;ge(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,dl(ku)},100))}),ge(window,"blur",function(){return dl(No)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var yo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ha=0;ha<10;ha++)yo[ha+48]=yo[ha+96]=String(ha);for(var Oa=65;Oa<=90;Oa++)yo[Oa]=String.fromCharCode(Oa);for(var fa=1;fa<=12;fa++)yo[fa+111]=yo[fa+63235]="F"+fa;var io={};io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},io.default=De?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,z,re=0;re<y.length-1;re++){var oe=y[re];if(/^(cmd|meta|m)$/i.test(oe))z=!0;else if(/^a(lt)?$/i.test(oe))x=!0;else if(/^(c|ctrl|control)$/i.test(oe))b=!0;else if(/^s(hift)?$/i.test(oe))E=!0;else throw new Error("Unrecognized modifier name: "+oe)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),z&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=Le(x.split(" "),Eu),z=0;z<E.length;z++){var re=void 0,oe=void 0;z==E.length-1?(oe=E.join(" "),re=b):(oe=E.slice(0,z+1).join(" "),re="...");var le=y[oe];if(!le)y[oe]=re;else if(le!=re)throw new Error("Inconsistent bindings for "+oe)}delete a[x]}for(var he in y)a[he]=y[he];return a}function Zo(a,y,x,b){y=Wa(y);var E=y.call?y.call(a,b):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&x(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return Zo(a,y.fallthrough,x,b);for(var z=0;z<y.fallthrough.length;z++){var re=Zo(a,y.fallthrough[z],x,b);if(re)return re}}}function vl(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ml(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(mt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(mt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(de&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ml(x,a,y))}function Wa(a){return typeof a=="string"?io[a]:a}function _o(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var z=y(x[E]);b.length&&Dt(z.from,ve(b).to)<=0;){var re=b.pop();if(Dt(re.from,z.from)<0){z.from=re.from;break}}b.push(z)}Pi(a,function(){for(var oe=b.length-1;oe>=0;oe--)Ho(a.doc,"",b[oe].from,b[oe].to,"+delete");Fo(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 He(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=ce(x,y.doc.direction);if(z){var re=E<0?ve(z):z[0],oe=E<0==(re.level==1),le=oe?"after":"before",he;if(re.level>0||y.doc.direction=="rtl"){var be=uo(y,x);he=E<0?x.text.length-1:0;var Ee=zi(y,be,he).top;he=Wt(function(tt){return zi(y,be,tt).top==Ee},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 He(b,he,le)}}return new He(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 z=ee(E,x.ch,x.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return hs(y,x,b);var oe=function(an,fn){return cs(y,an instanceof He?an.ch:an,fn)},le,he=function(an){return a.options.lineWrapping?(le=le||uo(a,y),Yr(a,y,le,an)):{begin:0,end:y.text.length}},be=he(x.sticky=="before"?oe(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var Ee=re.level==1==b<0,tt=oe(x,Ee?1:-1);if(tt!=null&&(Ee?tt<=re.to&&tt<=be.end:tt>=re.from&&tt>=be.begin)){var qe=Ee?"before":"after";return new He(x.line,tt,qe)}}var Tt=function(an,fn,sn){for(var bn=function(Rr,si){return si?new He(x.line,oe(Rr,1),"before"):new He(x.line,Rr,"after")};an>=0&&an<E.length;an+=fn){var An=E[an],Sn=fn>0==(An.level!=1),Un=Sn?sn.begin:oe(sn.end,-1);if(An.from<=Un&&Un<An.to||(Un=Sn?An.from:oe(An.to,-1),sn.begin<=Un&&Un<sn.end))return bn(Un,Sn)}},Bt=Tt(z+b,b,be);if(Bt)return Bt;var Xt=b>0?be.end:oe(be.begin,-1);return Xt!=null&&!(b>0&&Xt==y.text.length)&&(Bt=Tt(b>0?0:E.length-1,b,he(Xt)),Bt)?Bt:null}var da={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),we)},killLine:function(a){return _o(a,function(y){if(y.empty()){var x=it(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:He(y.head.line+1,0)}:{from:y.head,to:He(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return _o(a,function(y){return{from:He(y.from().line,0),to:At(a.doc,He(y.to().line+1,0))}})},delLineLeft:function(a){return _o(a,function(y){return{from:He(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return _o(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return{from:b,to:y.from()}})},delWrappedLineRight:function(a){return _o(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div");return{from:y.from(),to:b}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(He(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(He(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Mu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},Ge)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:x},"div")},Ge)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bl(a,y.head):b},Ge)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var z=x[E].from(),re=pe(a.getLine(z.line),z.ch,b);y.push(Ce(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Pi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,z=it(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new He(E.line,E.ch-1)),E.ch>0)E=new He(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),He(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=it(a.doc,E.line-1).text;re&&(E=new He(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),He(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;b<y.length;b++)a.indentLine(y[b].from().line,null,!0);Fo(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=it(a.doc,y),b=on(x);return b!=x&&(y=Te(b)),fs(!0,a,b,y,1)}function Mu(a,y){var x=it(a.doc,y),b=Dn(x);return b!=x&&(y=Te(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=it(a.doc,x.line),E=ce(b,a.doc.direction);if(!E||E[0].level==0){var z=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=z&&y.ch;return He(x.line,re?0:z,x.sticky)}return x}function Ha(a,y,x){if(typeof y=="string"&&(y=da[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=st}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Tu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Zo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Zo(y,a.options.extraKeys,x,a)||Zo(y,a.options.keyMap,x,a)}var Au=new ue;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Au.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Tu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Zr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(un(x),Xa(a)),!!E}function wl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var ds=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=ke(),!Fe(y,a))){me&&Je<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);de&&(ds=b?x:null,!b&&x==88&&!Bn&&(De?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ae&&!De&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Bu(y)}}function Bu(a){var y=a.display.lineDiv;Ue(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(rt(y,"CodeMirror-crosshair"),vt(document,"keyup",x),vt(document,"mouseover",x))}ge(document,"keyup",x),ge(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),Fe(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||Fe(y,a)||a.ctrlKey&&!a.altKey||De&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(de&&x==ds){ds=null,un(a);return}if(!(de&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Nu=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Nu>a&&Dt(y,this.pos)==0&&x==this.button};var va,ma;function Fu(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(!(Fe(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Ae||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Zn(a),z=b?Fu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,z,a))&&(E==1?b?Ou(y,b,z,a):$n(a)==x.scroller&&un(a):E==2?(b&&Na(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(pt?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(a,y,x,b,E){var z="Click";return b=="double"?z="Double"+z:b=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,pa(a,ml(z,E),E,function(re){if(typeof re=="string"&&(re=da[re]),!re)return!1;var oe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),oe=re(a,x)!=st}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 z=ot?x.shiftKey&&x.metaKey:x.altKey;E.unit=z?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout(Ct(Es,a),0):a.curOp.focus=ke();var E=Ru(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&mr&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(Dt((re=z.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,z=!1,re=oi(a,function(he){Ae&&(E.scroller.draggable=!1),a.state.draggingText=!1,vt(E.wrapper.ownerDocument,"mouseup",re),vt(E.wrapper.ownerDocument,"mousemove",oe),vt(E.scroller,"dragstart",le),vt(E.scroller,"drop",re),z||(un(he),b.addNew||Na(a.doc,x,null,null,b.extend),Ae&&!Me||me&&Je==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),oe=function(he){z=z||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},le=function(){return z=!0};Ae&&(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(He(y.line,0),At(a.doc,He(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,z=a.doc;un(y);var re,oe,le=z.sel,he=le.ranges;if(b.addNew&&!b.extend?(oe=z.sel.contains(x),oe>-1?re=he[oe]:re=new kr(x,x)):(re=z.sel.primary(),oe=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new kr(x,x)),x=Co(a,y,!0,!0),oe=-1;else{var be=Dl(a,x,b.unit);b.extend?re=ls(re,be.anchor,be.head,b.extend):re=be}b.addNew?oe==-1?(oe=he.length,di(z,Ki(a,he.concat([re]),oe),{scroll:!1,origin:"*mouse"})):he.length>1&&he[oe].empty()&&b.unit=="char"&&!b.extend?(di(z,Ki(a,he.slice(0,oe).concat(he.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),le=z.sel):us(z,oe,re,Xe):(oe=0,di(z,new Ri([re],0),Xe),le=z.sel);var Ee=x;function tt(sn){if(Dt(Ee,sn)!=0)if(Ee=sn,b.unit=="rectangle"){for(var bn=[],An=a.options.tabSize,Sn=pe(it(z,x.line).text,x.ch,An),Un=pe(it(z,sn.line).text,sn.ch,An),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=it(z,jr).text,qr=Mt(ki,Rr,An);Rr==si?bn.push(new kr(He(jr,qr),He(jr,qr))):ki.length>qr&&bn.push(new kr(He(jr,qr),He(jr,Mt(ki,si,An))))}bn.length||bn.push(new kr(x,x)),di(z,Ki(a,le.ranges.slice(0,oe).concat(bn),oe),{origin:"*mouse",scroll:!1}),a.scrollIntoView(sn)}else{var Ei=re,hi=Dl(a,sn,b.unit),ri=Ei.anchor,$r;Dt(hi.anchor,ri)>0?($r=hi.head,ri=_t(Ei.from(),hi.anchor)):($r=hi.anchor,ri=hn(Ei.to(),hi.head));var Ur=le.ranges.slice(0);Ur[oe]=zu(a,new kr(At(z,ri),$r)),di(z,Ki(a,Ur,oe),Xe)}}var qe=E.wrapper.getBoundingClientRect(),Tt=0;function Bt(sn){var bn=++Tt,An=Co(a,sn,!0,b.unit=="rectangle");if(An)if(Dt(An,Ee)!=0){a.curOp.focus=ke(),tt(An);var Sn=La(E,z);(An.line>=Sn.to||An.line<Sn.from)&&setTimeout(oi(a,function(){Tt==bn&&Bt(sn)}),150)}else{var Un=sn.clientY<qe.top?-20:sn.clientY>qe.bottom?20:0;Un&&setTimeout(oi(a,function(){Tt==bn&&(E.scroller.scrollTop+=Un,Bt(sn))}),50)}}function Xt(sn){a.state.selectingText=!1,Tt=1/0,sn&&(un(sn),E.input.focus()),vt(E.wrapper.ownerDocument,"mousemove",an),vt(E.wrapper.ownerDocument,"mouseup",fn),z.history.lastSelOrigin=null}var an=oi(a,function(sn){sn.buttons===0||!Zn(sn)?Xt(sn):Bt(sn)}),fn=oi(a,Xt);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=it(a.doc,x.line);if(Dt(x,b)==0&&x.sticky==b.sticky)return y;var z=ce(E);if(!z)return y;var re=ee(z,x.ch,x.sticky),oe=z[re];if(oe.from!=x.ch&&oe.to!=x.ch)return y;var le=re+(oe.from==x.ch==(oe.level!=1)?0:1);if(le==0||le==z.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=ee(z,b.ch,b.sticky),Ee=be-re||(b.ch-x.ch)*(oe.level==1?-1:1);be==le-1||be==le?he=Ee<0:he=Ee>0}var tt=z[le+(he?-1:0)],qe=he==(tt.level==1),Tt=qe?tt.from:tt.to,Bt=qe?"after":"before";return x.ch==Tt&&x.sticky==Bt?y:new kr(new He(x.line,Tt,Bt),b)}function Ll(a,y,x,b){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch(tt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&un(y);var re=a.display,oe=re.lineDiv.getBoundingClientRect();if(z>oe.bottom||!Nt(a,x))return cn(y);z-=oe.top-re.viewOffset;for(var le=0;le<a.display.gutterSpecs.length;++le){var he=re.gutters.childNodes[le];if(he&&he.getBoundingClientRect().right>=E){var be=Be(a.doc,z),Ee=a.display.gutterSpecs[le];return xt(a,x,a,be,Ee.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||Zu(a,y)||Fe(a,y,"contextmenu")||pt||a.display.input.onContextMenu(y)}function Zu(a,y){return Nt(a,"gutterContextMenu")?Ll(a,y,"gutterContextMenu",!1):!1}function Tl(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var Go={toString:function(){return"CodeMirror.Init"}},Al={},za={};function _u(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(oe,le,he){he!=Go&&z(oe,le,he)}:z)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),wo(b),Ci(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var z=[],re=b.doc.first;b.doc.iter(function(le){for(var he=0;;){var be=le.text.indexOf(E,he);if(be==-1)break;he=be+E.length,z.push(He(re,be))}re++});for(var oe=z.length-1;oe>=0;oe--)Ho(b.doc,E,z[oe],He(z[oe].line,z[oe].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,z){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=Go&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Re?"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",!lt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ra(b)},!0),x("keyMap","default",function(b,E,z){var re=Wa(E),oe=z!=Go&&Wa(z);oe&&oe.detach&&oe.detach(b,re),re.attach&&re.attach(b,oe||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Io(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Io(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(No(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Go;if(!y!=!b){var E=a.display.dragFunctions,z=y?ge:vt;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(Ue(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(rt(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?at(y):{},at(Al,y,!1);var b=y.value;typeof b=="string"?b=new Si(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Gr.inputStyles[y.inputStyle](this),z=this.display=new ru(a,b,E,y);z.wrapper.CodeMirror=this,Tl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ue,keySeq:null,specialChars:null},y.autofocus&&!Re&&z.input.focus(),me&&Je<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,_s(this,b),y.autofocus&&!Re||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):No(this);for(var re in za)za.hasOwnProperty(re)&&za[re](this,y[re],Go);Is(this),y.finishInit&&y.finishInit(this);for(var oe=0;oe<ms.length;++oe)ms[oe](this);Lo(this),Ae&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}Gr.defaults=Al,Gr.optionHandlers=za;function Vu(a){var y=a.display;ge(y.scroller,"mousedown",oi(a,El)),me&&Je<11?ge(y.scroller,"dblclick",oi(a,function(le){if(!Fe(a,le)){var he=Co(a,le);if(!(!he||vs(a,le)||ui(a.display,le))){un(le);var be=a.findWordAt(he);Na(a.doc,be.anchor,be.head)}}})):ge(y.scroller,"dblclick",function(le){return Fe(a,le)||un(le)}),ge(y.scroller,"contextmenu",function(le){return Ml(a,le)}),ge(y.input.getField(),"contextmenu",function(le){y.scroller.contains(le.target)||Ml(a,le)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function z(le){if(le.touches.length!=1)return!1;var he=le.touches[0];return he.radiusX<=1&&he.radiusY<=1}function re(le,he){if(he.left==null)return!0;var be=he.left-le.left,Ee=he.top-le.top;return be*be+Ee*Ee>20*20}ge(y.scroller,"touchstart",function(le){if(!Fe(a,le)&&!z(le)&&!vs(a,le)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},le.touches.length==1&&(y.activeTouch.left=le.touches[0].pageX,y.activeTouch.top=le.touches[0].pageY)}}),ge(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ge(y.scroller,"touchend",function(le){var he=y.activeTouch;if(he&&!ui(y,le)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),Ee;!he.prev||re(he,he.prev)?Ee=new kr(be,be):!he.prev.prev||re(he,he.prev.prev)?Ee=a.findWordAt(be):Ee=new kr(He(be.line,0),At(a.doc,He(be.line+1,0))),a.setSelection(Ee.anchor,Ee.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),xt(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){Fe(a,le)||wn(le)},over:function(le){Fe(a,le)||(wu(a,le),wn(le))},start:function(le){return xu(a,le)},drop:oi(a,bu),leave:function(le){Fe(a,le)||fl(a)}};var oe=y.input.getField();ge(oe,"keyup",function(le){return Sl.call(a,le)}),ge(oe,"keydown",oi(a,Cl)),ge(oe,"keypress",oi(a,kl)),ge(oe,"focus",function(le){return Ja(a,le)}),ge(oe,"blur",function(le){return No(a,le)})}var ms=[];Gr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=Yn(a,y).state:x="prev");var re=a.options.tabSize,oe=it(E,y),le=pe(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var he=oe.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(oe.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(z,oe.text.slice(he.length),oe.text),be==st||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe(it(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 Ee="",tt=0;if(a.options.indentWithTabs)for(var qe=Math.floor(be/re);qe;--qe)tt+=re,Ee+=" ";if(tt<be&&(Ee+=Ce(be-tt)),Ee!=he)return Ho(E,Ee,He(y,0),He(y,he.length),"+input"),oe.stateAfter=null,!0;for(var Tt=0;Tt<E.sel.ranges.length;Tt++){var Bt=E.sel.ranges[Tt];if(Bt.head.line==y&&Bt.head.ch<he.length){var Xt=He(y,he.length);us(E,Tt,new kr(Xt,Xt));break}}}var Yi=null;function Za(a){Yi=a}function gs(a,y,x,b,E){var z=a.doc;a.display.shift=!1,b||(b=z.sel);var re=+new Date-200,oe=E=="paste"||a.state.pasteIncoming>re,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<Yi.text.length;be++)he.push(z.splitLines(Yi.text[be]))}}else le.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Le(le,function(an){return[an]}));for(var Ee=a.curOp.updateInput,tt=b.ranges.length-1;tt>=0;tt--){var qe=b.ranges[tt],Tt=qe.from(),Bt=qe.to();qe.empty()&&(x&&x>0?Tt=He(Tt.line,Tt.ch-x):a.state.overwrite&&!oe?Bt=He(Bt.line,Math.min(it(z,Bt.line).text.length,Bt.ch+ve(le).length)):oe&&Yi&&Yi.lineWise&&Yi.text.join(`
`)==le.join(`
`)&&(Tt=Bt=He(Tt.line,0)));var Xt={from:Tt,to:Bt,text:he?he[tt%he.length]:le,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Wo(a.doc,Xt),Zr(a,"inputRead",a,Xt)}y&&!oe&&Bl(a,y),Fo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ee),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Pi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Bl(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var oe=0;oe<z.electricChars.length;oe++)if(y.indexOf(z.electricChars.charAt(oe))>-1){re=ga(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(it(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Zr(a,"electricInput",a,E.head.line)}}}function Nl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,z={anchor:He(E,0),head:He(E+1,0)};x.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:x}}function Fl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Il(){var a=$e("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=$e("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ae?a.style.width="1000px":a.setAttribute("wrap","off"),je&&(a.style.border="1px solid black"),Fl(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var z=this.options,re=z[b];z[b]==E&&b!="mode"||(z[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,re),xt(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](Wa(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,z=0;z<E.length;++z)if(E[z]==b||E[z].name==b)return E.splice(z,1),!0},addOverlay:yi(function(b,E){var z=b.token?b:a.getMode(this.options,b);if(z.startState)throw new Error("Overlays may not be stateful.");Ve(this.state.overlays,{mode:z,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Ci(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,z=0;z<E.length;++z){var re=E[z].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(z,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,z){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Pt(this.doc,b)&&ga(this,b,E,z)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var oe=E[re];if(oe.empty())oe.head.line>z&&(ga(this,oe.head.line,b,!0),z=oe.head.line,re==this.doc.sel.primIndex&&Fo(this));else{var le=oe.from(),he=oe.to(),be=Math.max(z,le.line);z=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Ee=be;Ee<z;++Ee)ga(this,Ee,b);var tt=this.doc.sel.ranges;le.ch==0&&E.length==tt.length&&tt[re].from().ch>0&&us(this.doc,re,new kr(le,tt[re].to()),we)}}}),getTokenAt:function(b,E){return Hn(this,b,E)},getLineTokens:function(b,E){return Hn(this,He(b),E,!0)},getTokenTypeAt:function(b){b=At(this.doc,b);var E=Wn(this,it(this.doc,b.line)),z=0,re=(E.length-1)/2,oe=b.ch,le;if(oe==0)le=E[2];else for(;;){var he=z+re>>1;if((he?E[he*2-1]:0)>=oe)re=he;else if(E[he*2+1]<oe)z=he+1;else{le=E[he*2+2];break}}var be=le?le.indexOf("overlay "):-1;return be<0?le:be==0?null:le.slice(0,be-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var z=[];if(!x.hasOwnProperty(E))return z;var re=x[E],oe=this.getModeAt(b);if(typeof oe[E]=="string")re[oe[E]]&&z.push(re[oe[E]]);else if(oe[E])for(var le=0;le<oe[E].length;le++){var he=re[oe[E][le]];he&&z.push(he)}else oe.helperType&&re[oe.helperType]?z.push(re[oe.helperType]):re[oe.name]&&z.push(re[oe.name]);for(var be=0;be<re._global.length;be++){var Ee=re._global[be];Ee.pred(oe,this)&&_e(z,Ee.val)==-1&&z.push(Ee.val)}return z},getStateAfter:function(b,E){var z=this.doc;return b=$t(z,b==null?z.first+z.size-1:b),Yn(this,b+1,E).state},cursorCoords:function(b,E){var z,re=this.doc.sel.primary();return b==null?z=re.head:typeof b=="object"?z=At(this.doc,b):z=b?re.from():re.to(),wi(this,z,E||"page")},charCoords:function(b,E){return Bo(this,At(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ci(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Be(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,z){var re=!1,oe;if(typeof b=="number"){var le=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>le&&(b=le,re=!0),oe=it(this.doc,b)}else oe=b;return Po(this,oe,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-Mn(oe):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,z,re,oe){var le=this.display;b=wi(this,At(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),le.sizer.appendChild(E),re=="over")he=b.top;else if(re=="above"||re=="near"){var Ee=Math.max(le.wrapper.clientHeight,this.doc.height),tt=Math.max(le.sizer.clientWidth,le.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Ee)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Ee&&(he=b.bottom),be+E.offsetWidth>tt&&(be=tt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",oe=="right"?(be=le.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(oe=="left"?be=0:oe=="middle"&&(be=(le.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),z&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(da.hasOwnProperty(b))return da[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,z,re){var oe=1;E<0&&(oe=-1,E=-E);for(var le=At(this.doc,b),he=0;he<E&&(le=ys(this.doc,le,oe,z,re),!le.hitSide);++he);return le},moveH:yi(function(b,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?ys(z.doc,re.head,b,E,z.options.rtlMoveVisually):b<0?re.from():re.to()},Ge)}),deleteH:yi(function(b,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):_o(this,function(oe){var le=ys(re,oe.head,b,E,!1);return b<0?{from:le,to:oe.head}:{from:oe.head,to:le}})}),findPosV:function(b,E,z,re){var oe=1,le=re;E<0&&(oe=-1,E=-E);for(var he=At(this.doc,b),be=0;be<E;++be){var Ee=wi(this,he,"div");if(le==null?le=Ee.left:Ee.left=le,he=Rl(this,Ee,oe,z),he.hitSide)break}return he},moveV:yi(function(b,E){var z=this,re=this.doc,oe=[],le=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(be){if(le)return b<0?be.from():be.to();var Ee=wi(z,be.head,"div");be.goalColumn!=null&&(Ee.left=be.goalColumn),oe.push(Ee.left);var tt=Rl(z,Ee,b,E);return E=="page"&&be==re.sel.primary()&&qa(z,Bo(z,tt,"div").top-Ee.top),tt},Ge),oe.length)for(var he=0;he<re.sel.ranges.length;he++)re.sel.ranges[he].goalColumn=oe[he]}),findWordAt:function(b){var E=this.doc,z=it(E,b.line).text,re=b.ch,oe=b.ch;if(z){var le=this.getHelper(b,"wordChars");(b.sticky=="before"||oe==z.length)&&re?--re:++oe;for(var he=z.charAt(re),be=nt(he,le)?function(Ee){return nt(Ee,le)}:/\s/.test(he)?function(Ee){return/\s/.test(Ee)}:function(Ee){return!/\s/.test(Ee)&&!nt(Ee)};re>0&&be(z.charAt(re-1));)--re;for(;oe<z.length&&be(z.charAt(oe));)++oe}return new kr(He(b.line,re),He(b.line,oe))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):rt(this.display.cursorDiv,"CodeMirror-overwrite"),xt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ke()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Mi(this)-this.display.barHeight,width:b.scrollWidth-Mi(this)-this.display.barWidth,clientHeight:no(this),clientWidth:qi(this)}},scrollIntoView:yi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:He(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?jl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var z=this,re=function(le){return typeof le=="number"||/^\d+$/.test(String(le))?le+"px":le};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(le){if(le.widgets){for(var he=0;he<le.widgets.length;he++)if(le.widgets[he].noHScroll){ho(z,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,xt(this,"refresh",this)}),operation:function(b){return Pi(this,b)},startOperation:function(){return Do(this)},endOperation:function(){return Lo(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;Ci(this),this.curOp.forceUpdate=!0,wo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Ai(this.display))>.5||this.options.lineWrapping)&&Ya(this),xt(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),_s(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Zr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ft(a),a.registerHelper=function(b,E,z){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=z},a.registerGlobalHelper=function(b,E,z,re){a.registerHelper(b,E,re),x[b]._global.push({pred:z,val:re})}}function ys(a,y,x,b,E){var z=y,re=x,oe=it(a,y.line),le=E&&a.direction=="rtl"?-x:x;function he(){var fn=y.line+le;return fn<a.first||fn>=a.first+a.size?!1:(y=new He(fn,y.ch,y.sticky),oe=it(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 He(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 Ee=null,tt=b=="group",qe=a.cm&&a.cm.getHelper(y,"wordChars"),Tt=!0;!(x<0&&!be(!Tt));Tt=!1){var Bt=oe.text.charAt(y.ch)||`
`,Xt=nt(Bt,qe)?"w":tt&&Bt==`
`?"n":!tt||/\s/.test(Bt)?null:"p";if(tt&&!Tt&&!Xt&&(Xt="s"),Ee&&Ee!=Xt){x<0&&(x=1,be(),y.sticky="after");break}if(Xt&&(Ee=Xt),x>0&&!be(!Tt))break}var an=Ia(a,y,z,re,!0);return Yt(z,an)&&(an.hitSide=!0),an}function Rl(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var oe=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),le=Math.max(oe-.5*Ai(a.display),3);re=(x>0?y.bottom:y.top)+x*le}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var he;he=ci(a,z,re),!!he.outside;){if(x<0?re<=0:re>=E.height){he.hitSide=!0;break}re+=x*5}return he}var Pr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new 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;Fl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(oe){for(var le=oe.target;le;le=le.parentNode){if(le==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(le.className))break}return!1}ge(E,"paste",function(oe){!z(oe)||Fe(b,oe)||Pl(oe,b)||Je<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),ge(E,"compositionstart",function(oe){y.composing={data:oe.data,done:!1}}),ge(E,"compositionupdate",function(oe){y.composing||(y.composing={data:oe.data,done:!1})}),ge(E,"compositionend",function(oe){y.composing&&(oe.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ge(E,"touchstart",function(){return x.forceCompositionEnd()}),ge(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(oe){if(!(!z(oe)||Fe(b,oe))){if(b.somethingSelected())Za({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var le=Nl(b);Za({lineWise:!0,text:le.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(le.ranges,0,we),b.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var he=Yi.text.join(`
`);if(oe.clipboardData.setData("Text",he),oe.clipboardData.getData("Text")==he){oe.preventDefault();return}}var be=Il(),Ee=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),Ee.value=Yi.text.join(`
`);var tt=document.activeElement;St(Ee),setTimeout(function(){b.display.lineSpace.removeChild(be),tt.focus(),tt==E&&x.showPrimarySelection()},50)}}ge(E,"copy",re),ge(E,"cut",re)},Pr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Pr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Pr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Pr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Pr.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var z=_a(y,a.anchorNode,a.anchorOffset),re=_a(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&Dt(_t(z,re),b)==0&&Dt(hn(z,re),E)==0)){var oe=y.display.view,le=b.line>=y.display.viewFrom&&Ol(y,b)||{node:oe[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Ol(y,E);if(!he){var be=oe[oe.length-1].measure,Ee=be.maps?be.maps[be.maps.length-1]:be.map;he={node:Ee[Ee.length-1],offset:Ee[Ee.length-2]-Ee[Ee.length-3]}}if(!le||!he){a.removeAllRanges();return}var tt=a.rangeCount&&a.getRangeAt(0),qe;try{qe=Pe(le.node,le.offset,he.offset,he.node)}catch(Tt){}qe&&(!ae&&y.state.focused?(a.collapse(le.node,le.offset),qe.collapsed||(a.removeAllRanges(),a.addRange(qe))):(a.removeAllRanges(),a.addRange(qe)),tt&&a.anchorNode==null?a.addRange(tt):ae&&this.startGracePeriod()),this.rememberSelection()}},Pr.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Pr.prototype.showMultipleSelections=function(a){Oe(this.cm.display.cursorDiv,a.cursors),Oe(this.cm.display.selectionDiv,a.selection)},Pr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Pr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ze(this.div,y)},Pr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Pr.prototype.blur=function(){this.div.blur()},Pr.prototype.getField=function(){return this.div},Pr.prototype.supportsTouch=function(){return!0},Pr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Pi(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},Pr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Pr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ie&&Se&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=_a(y,a.anchorNode,a.anchorOffset),b=_a(y,a.focusNode,a.focusOffset);x&&b&&Pi(y,function(){di(y.doc,po(x,b),we),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Pr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=He(b.line-1,it(a.doc,b.line-1).length)),E.ch==it(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=He(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,oe;b.line==y.viewFrom||(z=So(a,b.line))==0?(re=Te(y.view[0].line),oe=y.view[0].node):(re=Te(y.view[z].line),oe=y.view[z-1].node.nextSibling);var le=So(a,E.line),he,be;if(le==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=Te(y.view[le+1].line)-1,be=y.view[le+1].node.previousSibling),!oe)return!1;for(var Ee=a.doc.splitLines(Yu(a,oe,be,re,he)),tt=qt(a.doc,He(re,0),He(he,it(a.doc,he).text.length));Ee.length>1&&tt.length>1;)if(ve(Ee)==ve(tt))Ee.pop(),tt.pop(),he--;else if(Ee[0]==tt[0])Ee.shift(),tt.shift(),re++;else break;for(var qe=0,Tt=0,Bt=Ee[0],Xt=tt[0],an=Math.min(Bt.length,Xt.length);qe<an&&Bt.charCodeAt(qe)==Xt.charCodeAt(qe);)++qe;for(var fn=ve(Ee),sn=ve(tt),bn=Math.min(fn.length-(Ee.length==1?qe:0),sn.length-(tt.length==1?qe:0));Tt<bn&&fn.charCodeAt(fn.length-Tt-1)==sn.charCodeAt(sn.length-Tt-1);)++Tt;if(Ee.length==1&&tt.length==1&&re==b.line)for(;qe&&qe>b.ch&&fn.charCodeAt(fn.length-Tt-1)==sn.charCodeAt(sn.length-Tt-1);)qe--,Tt++;Ee[Ee.length-1]=fn.slice(0,fn.length-Tt).replace(/^\u200b+/,""),Ee[0]=Ee[0].slice(qe).replace(/\u200b+$/,"");var An=He(re,qe),Sn=He(he,tt.length?ve(tt).length-Tt:0);if(Ee.length>1||Ee[0]||Dt(An,Sn))return Ho(a.doc,Ee,An,Sn,"+input"),!0},Pr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Pr.prototype.reset=function(){this.forceCompositionEnd()},Pr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Pr.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Pr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return Ci(a.cm)})},Pr.prototype.setUneditable=function(a){a.contentEditable="false"},Pr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||oi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Pr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Pr.prototype.onContextMenu=function(){},Pr.prototype.resetPosition=function(){},Pr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=it(a.doc,y.line),E=Ao(x,b,y.line),z=ce(b,a.doc.direction),re="left";if(z){var oe=ee(z,y.ch);re=oe%2?"right":"left"}var le=xa(E.map,y.ch,re);return le.offset=le.collapse=="right"?le.end:le.start,le}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,oe=a.doc.lineSeparator(),le=!1;function he(qe){return function(Tt){return Tt.id==qe}}function be(){re&&(z+=oe,le&&(z+=oe),re=le=!1)}function Ee(qe){qe&&(be(),z+=qe)}function tt(qe){if(qe.nodeType==1){var Tt=qe.getAttribute("cm-text");if(Tt){Ee(Tt);return}var Bt=qe.getAttribute("cm-marker"),Xt;if(Bt){var an=a.findMarks(He(b,0),He(E+1,0),he(+Bt));an.length&&(Xt=an[0].find(0))&&Ee(qt(a.doc,Xt.from,Xt.to).join(oe));return}if(qe.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test(qe.nodeName);if(!/^br$/i.test(qe.nodeName)&&qe.textContent.length==0)return;fn&&be();for(var sn=0;sn<qe.childNodes.length;sn++)tt(qe.childNodes[sn]);/^(pre|p)$/i.test(qe.nodeName)&&(le=!0),fn&&(re=!0)}else qe.nodeType==3&&Ee(qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;tt(y),y!=x;)y=y.nextSibling,le=!1;return z}function _a(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(He(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<a.display.view.length;E++){var z=a.display.view[E];if(z.node==b)return Xu(z,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Ze(b,y))return jo(He(Te(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var z=a.rest?ve(a.rest):a.line;return jo(He(Te(z),z.text.length),E)}var re=y.nodeType==3?y:null,oe=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));oe.parentNode!=b;)oe=oe.parentNode;var le=a.measure,he=le.maps;function be(Xt,an,fn){for(var sn=-1;sn<(he?he.length:0);sn++)for(var bn=sn<0?le.map:he[sn],An=0;An<bn.length;An+=3){var Sn=bn[An+2];if(Sn==Xt||Sn==an){var Un=Te(sn<0?a.line:a.rest[sn]),Rr=bn[An]+fn;return(fn<0||Sn!=Xt)&&(Rr=bn[An+(fn?1:0)]),He(Un,Rr)}}}var Ee=be(re,oe,x);if(Ee)return jo(Ee,E);for(var tt=oe.nextSibling,qe=re?re.nodeValue.length-x:0;tt;tt=tt.nextSibling){if(Ee=be(tt,tt.firstChild,0),Ee)return jo(He(Ee.line,Ee.ch-qe),E);qe+=tt.textContent.length}for(var Tt=oe.previousSibling,Bt=x;Tt;Tt=Tt.previousSibling){if(Ee=be(Tt,Tt.firstChild,-1),Ee)return jo(He(Ee.line,Ee.ch+Bt),E);Bt+=Tt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ue,this.hasSelection=!1,this.composing=null};Xr.prototype.init=function(a){var y=this,x=this,b=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),je&&(E.style.width="0px"),ge(E,"input",function(){me&&Je>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ge(E,"paste",function(re){Fe(b,re)||Pl(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!Fe(b,re)){if(b.somethingSelected())Za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var oe=Nl(b);Za({lineWise:!0,text:oe.text}),re.type=="cut"?b.setSelections(oe.ranges,null,we):(x.prevInput="",E.value=oe.text.join(`
`),St(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ge(E,"cut",z),ge(E,"copy",z),ge(a.scroller,"paste",function(re){if(!(ui(a,re)||Fe(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,E.dispatchEvent(oe)}}),ge(a.lineSpace,"selectstart",function(re){ui(a,re)||un(re)}),ge(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),ge(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Xr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=wi(a,x.sel.primary().head,"div"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return b},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Oe(x.cursorDiv,a.cursors),Oe(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&&St(this.textarea),me&&Je>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&Je>=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"&&(!Re||ke()!=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&&Je>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!b&&(b="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,oe=Math.min(b.length,E.length);re<oe&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Pi(y,function(){gs(y,E.slice(re),b.length-re,null,a.composing?"*compose":null),E.length>1e3||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&&Je>=9&&(this.hasSelection=null),this.fastPoll()},Xr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=Co(x,a),re=b.scroller.scrollTop;if(!z||de)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(z)==-1&&oi(x,di)(x.doc,po(z),we);var le=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px;
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ee;Ae&&(Ee=window.scrollY),b.input.focus(),Ae&&window.scrollTo(null,Ee),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=qe,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function tt(){if(E.selectionStart!=null){var Bt=x.somethingSelected(),Xt="\u200B"+(Bt?E.value:"");E.value="\u21DA",E.value=Xt,y.prevInput=Bt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Xt.length,b.selForContextMenu=x.doc.sel}}function qe(){if(y.contextMenuPending==qe&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=le,me&&Je<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&Je<9)&&tt();var Bt=0,Xt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Bt++<10?b.detectingSelectAll=setTimeout(Xt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Xt,200)}}if(me&&Je>=9&&tt(),pt){wn(a);var Tt=function(){vt(window,"mouseup",Tt),setTimeout(qe,20)};ge(window,"mouseup",Tt)}else setTimeout(qe,50)},Xr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xr.prototype.setUneditable=function(){},Xr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?at(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=ke();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=oe.getValue()}var E;if(a.form&&(ge(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){b(),z.submit=E,z.submit(),z.submit=re}}catch(le){}}y.finishInit=function(le){le.save=b,le.getTextArea=function(){return a},le.toTextArea=function(){le.toTextArea=isNaN,b(),a.parentNode.removeChild(le.getWrapperElement()),a.style.display="",a.form&&(vt(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=vt,a.on=ge,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=rr,a.countColumn=pe,a.findColumn=Mt,a.isWordChar=et,a.Pass=st,a.signal=xt,a.Line=yr,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=He,a.cmpPos=Dt,a.modes=xr,a.mimeModes=Ut,a.resolveMode=Tn,a.getMode=Jn,a.modeExtensions=tr,a.extendMode=dr,a.copyState=_n,a.startState=hr,a.innerMode=Rn,a.commands=da,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=Zo,a.normalizeKeyMap=Du,a.StringStream=jt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=un,a.e_stopPropagation=kn,a.e_stop=wn,a.addClass=Ue,a.contains=Ze,a.rmClass=rt,a.keyNames=yo}_u(Gr),Uu(Gr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&_e(qu,Ga)<0&&(Gr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return Ft(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(Rt,zt,fe){(function(ae){ae(fe(89780),fe(15525),fe(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(ft,Ne){var ze=ae.getMode(ft,"text/html"),me=ze.name=="null";function Je(pe){if(ae.findModeByName){var ue=ae.findModeByName(pe);ue&&(pe=ue.mime||ue.mimes[0])}var _e=ae.getMode(ft,pe);return _e.name=="null"?null:_e}Ne.highlightFormatting===void 0&&(Ne.highlightFormatting=!1),Ne.maxBlockquoteDepth===void 0&&(Ne.maxBlockquoteDepth=0),Ne.taskLists===void 0&&(Ne.taskLists=!1),Ne.strikethrough===void 0&&(Ne.strikethrough=!1),Ne.emoji===void 0&&(Ne.emoji=!1),Ne.fencedCodeBlockHighlighting===void 0&&(Ne.fencedCodeBlockHighlighting=!0),Ne.fencedCodeBlockDefaultMode===void 0&&(Ne.fencedCodeBlockDefaultMode="text/plain"),Ne.xml===void 0&&(Ne.xml=!0),Ne.tokenTypeOverrides===void 0&&(Ne.tokenTypeOverrides={});var Ae={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Qe in Ae)Ae.hasOwnProperty(Qe)&&Ne.tokenTypeOverrides[Qe]&&(Ae[Qe]=Ne.tokenTypeOverrides[Qe]);var Se=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Me=/^\[(x| )\](?=\s)/i,ye=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ht=/^ {0,3}(?:\={1,}|-{2,})\s*$/,je=/^[^#!\[\]*_\\<>` "'(~:]+/,Ie=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Re=/^\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 lt(pe,ue,_e){return ue.f=ue.inline=_e,_e(pe,ue)}function wt(pe,ue,_e){return ue.f=ue.block=_e,_e(pe,ue)}function mt(pe){return!pe||!/\S/.test(pe.string)}function pt(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==rt){var ue=me;if(!ue){var _e=ae.innerMode(ze,pe.htmlState);ue=_e.mode.name=="xml"&&_e.state.tagStart===null&&!_e.state.context&&_e.state.tokenize.isInText}ue&&(pe.f=Lt,pe.block=dt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function dt(pe,ue){var _e=pe.column()===ue.indentation,yt=mt(ue.prevLine.stream),st=ue.indentedCode,we=ue.prevLine.hr,Xe=ue.list!==!1,Ge=(ue.listStack[ue.listStack.length-1]||0)+3;ue.indentedCode=!1;var Mt=ue.indentation;if(ue.indentationDiff===null&&(ue.indentationDiff=ue.indentation,Xe)){for(ue.list=null;Mt<ue.listStack[ue.listStack.length-1];)ue.listStack.pop(),ue.listStack.length?ue.indentation=ue.listStack[ue.listStack.length-1]:ue.list=!1;ue.list!==!1&&(ue.indentationDiff=Mt-ue.listStack[ue.listStack.length-1])}var ut=!yt&&!we&&!ue.prevLine.header&&(!Xe||!st)&&!ue.prevLine.fencedCodeEnd,Ce=(ue.list===!1||we||yt)&&ue.indentation<=Ge&&pe.match(Se),ve=null;if(ue.indentationDiff>=4&&(st||ue.prevLine.fencedCodeEnd||ue.prevLine.header||yt))return pe.skipToEnd(),ue.indentedCode=!0,Ae.code;if(pe.eatSpace())return null;if(_e&&ue.indentation<=Ge&&(ve=pe.match(ye))&&ve[1].length<=6)return ue.quote=0,ue.header=ve[1].length,ue.thisLine.header=!0,Ne.highlightFormatting&&(ue.formatting="header"),ue.f=ue.inline,Oe(ue);if(ue.indentation<=Ge&&pe.eat(">"))return ue.quote=_e?1:ue.quote+1,Ne.highlightFormatting&&(ue.formatting="quote"),pe.eatSpace(),Oe(ue);if(!Ce&&!ue.setext&&_e&&ue.indentation<=Ge&&(ve=pe.match(de))){var Le=ve[1]?"ol":"ul";return ue.indentation=Mt+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,Ne.taskLists&&pe.match(Me,!1)&&(ue.taskList=!0),ue.f=ue.inline,Ne.highlightFormatting&&(ue.formatting=["list","list-"+Le]),Oe(ue)}else{if(_e&&ue.indentation<=Ge&&(ve=pe.match(Ie,!0)))return ue.quote=0,ue.fencedEndRE=new RegExp(ve[1]+"+ *$"),ue.localMode=Ne.fencedCodeBlockHighlighting&&Je(ve[2]||Ne.fencedCodeBlockDefaultMode),ue.localMode&&(ue.localState=ae.startState(ue.localMode)),ue.f=ue.block=Qt,Ne.highlightFormatting&&(ue.formatting="code-block"),ue.code=-1,Oe(ue);if(ue.setext||(!ut||!Xe)&&!ue.quote&&ue.list===!1&&!ue.code&&!Ce&&!Re.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(ht)))return ue.setext?(ue.header=ue.setext,ue.setext=0,pe.skipToEnd(),Ne.highlightFormatting&&(ue.formatting="header")):(ue.header=ve[0].charAt(0)=="="?1:2,ue.setext=ue.header),ue.thisLine.header=!0,ue.f=ue.inline,Oe(ue);if(Ce)return pe.skipToEnd(),ue.hr=!0,ue.thisLine.hr=!0,Ae.hr;if(pe.peek()==="[")return lt(pe,ue,Ht)}return lt(pe,ue,ue.inline)}function rt(pe,ue){var _e=ze.token(pe,ue.htmlState);if(!me){var yt=ae.innerMode(ze,ue.htmlState);(yt.mode.name=="xml"&&yt.state.tagStart===null&&!yt.state.context&&yt.state.tokenize.isInText||ue.md_inside&&pe.current().indexOf(">")>-1)&&(ue.f=Lt,ue.block=dt,ue.htmlState=null)}return _e}function Qt(pe,ue){var _e=ue.listStack[ue.listStack.length-1]||0,yt=ue.indentation<_e,st=_e+3;if(ue.fencedEndRE&&ue.indentation<=st&&(yt||pe.match(ue.fencedEndRE))){Ne.highlightFormatting&&(ue.formatting="code-block");var we;return yt||(we=Oe(ue)),ue.localMode=ue.localState=null,ue.block=dt,ue.f=Lt,ue.fencedEndRE=null,ue.code=0,ue.thisLine.fencedCodeEnd=!0,yt?wt(pe,ue,ue.block):we}else return ue.localMode?ue.localMode.token(pe,ue.localState):(pe.skipToEnd(),Ae.code)}function Oe(pe){var ue=[];if(pe.formatting){ue.push(Ae.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var _e=0;_e<pe.formatting.length;_e++)ue.push(Ae.formatting+"-"+pe.formatting[_e]),pe.formatting[_e]==="header"&&ue.push(Ae.formatting+"-"+pe.formatting[_e]+"-"+pe.header),pe.formatting[_e]==="quote"&&(!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=pe.quote?ue.push(Ae.formatting+"-"+pe.formatting[_e]+"-"+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(Ae.linkHref,"url"):(pe.strong&&ue.push(Ae.strong),pe.em&&ue.push(Ae.em),pe.strikethrough&&ue.push(Ae.strikethrough),pe.emoji&&ue.push(Ae.emoji),pe.linkText&&ue.push(Ae.linkText),pe.code&&ue.push(Ae.code),pe.image&&ue.push(Ae.image),pe.imageAltText&&ue.push(Ae.imageAltText,"link"),pe.imageMarker&&ue.push(Ae.imageMarker)),pe.header&&ue.push(Ae.header,Ae.header+"-"+pe.header),pe.quote&&(ue.push(Ae.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=pe.quote?ue.push(Ae.quote+"-"+pe.quote):ue.push(Ae.quote+"-"+Ne.maxBlockquoteDepth)),pe.list!==!1){var yt=(pe.listStack.length-1)%3;yt?yt===1?ue.push(Ae.list2):ue.push(Ae.list3):ue.push(Ae.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 $e(pe,ue){if(pe.match(je,!0))return Oe(ue)}function Lt(pe,ue){var _e=ue.text(pe,ue);if(typeof _e!="undefined")return _e;if(ue.list)return ue.list=null,Oe(ue);if(ue.taskList){var yt=pe.match(Me,!0)[1]===" ";return yt?ue.taskOpen=!0:ue.taskClosed=!0,Ne.highlightFormatting&&(ue.formatting="task"),ue.taskList=!1,Oe(ue)}if(ue.taskOpen=!1,ue.taskClosed=!1,ue.header&&pe.match(/^#+$/,!0))return Ne.highlightFormatting&&(ue.formatting="header"),Oe(ue);var st=pe.next();if(ue.linkTitle){ue.linkTitle=!1;var we=st;st==="("&&(we=")"),we=(we+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Xe="^\\s*(?:[^"+we+"\\\\]+|\\\\\\\\|\\\\.)"+we;if(pe.match(new RegExp(Xe),!0))return Ae.linkHref}if(st==="`"){var Ge=ue.formatting;Ne.highlightFormatting&&(ue.formatting="code"),pe.eatWhile("`");var Mt=pe.current().length;if(ue.code==0&&(!ue.quote||Mt==1))return ue.code=Mt,Oe(ue);if(Mt==ue.code){var ut=Oe(ue);return ue.code=0,ut}else return ue.formatting=Ge,Oe(ue)}else if(ue.code)return Oe(ue);if(st==="\\"&&(pe.next(),Ne.highlightFormatting)){var Ce=Oe(ue),ve=Ae.formatting+"-escape";return Ce?Ce+" "+ve:ve}if(st==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ue.imageMarker=!0,ue.image=!0,Ne.highlightFormatting&&(ue.formatting="image"),Oe(ue);if(st==="["&&ue.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ue.imageMarker=!1,ue.imageAltText=!0,Ne.highlightFormatting&&(ue.formatting="image"),Oe(ue);if(st==="]"&&ue.imageAltText){Ne.highlightFormatting&&(ue.formatting="image");var Ce=Oe(ue);return ue.imageAltText=!1,ue.image=!1,ue.inline=ue.f=Ze,Ce}if(st==="["&&!ue.image)return ue.linkText&&pe.match(/^.*?\]/)||(ue.linkText=!0,Ne.highlightFormatting&&(ue.formatting="link")),Oe(ue);if(st==="]"&&ue.linkText){Ne.highlightFormatting&&(ue.formatting="link");var Ce=Oe(ue);return ue.linkText=!1,ue.inline=ue.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ze:Lt,Ce}if(st==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Pe,Ne.highlightFormatting&&(ue.formatting="link");var Ce=Oe(ue);return Ce?Ce+=" ":Ce="",Ce+Ae.linkInline}if(st==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Pe,Ne.highlightFormatting&&(ue.formatting="link");var Ce=Oe(ue);return Ce?Ce+=" ":Ce="",Ce+Ae.linkEmail}if(Ne.xml&&st==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Le=pe.string.indexOf(">",pe.pos);if(Le!=-1){var Ve=pe.string.substring(pe.start,Le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ve)&&(ue.md_inside=!0)}return pe.backUp(1),ue.htmlState=ae.startState(ze),wt(pe,ue,rt)}if(Ne.xml&&st==="<"&&pe.match(/^\/\w*?>/))return ue.md_inside=!1,"tag";if(st==="*"||st==="_"){for(var xe=1,We=pe.pos==1?" ":pe.string.charAt(pe.pos-2);xe<3&&pe.eat(st);)xe++;var Ke=pe.peek()||" ",et=!/\s/.test(Ke)&&(!De.test(Ke)||/\s/.test(We)||De.test(We)),nt=!/\s/.test(We)&&(!De.test(We)||/\s/.test(Ke)||De.test(Ke)),Ye=null,bt=null;if(xe%2&&(!ue.em&&et&&(st==="*"||!nt||De.test(We))?Ye=!0:ue.em==st&&nt&&(st==="*"||!et||De.test(Ke))&&(Ye=!1)),xe>1&&(!ue.strong&&et&&(st==="*"||!nt||De.test(We))?bt=!0:ue.strong==st&&nt&&(st==="*"||!et||De.test(Ke))&&(bt=!1)),bt!=null||Ye!=null){Ne.highlightFormatting&&(ue.formatting=Ye==null?"strong":bt==null?"em":"strong em"),Ye===!0&&(ue.em=st),bt===!0&&(ue.strong=st);var ut=Oe(ue);return Ye===!1&&(ue.em=!1),bt===!1&&(ue.strong=!1),ut}}else if(st===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Oe(ue);pe.backUp(1)}if(Ne.strikethrough){if(st==="~"&&pe.eatWhile(st)){if(ue.strikethrough){Ne.highlightFormatting&&(ue.formatting="strikethrough");var ut=Oe(ue);return ue.strikethrough=!1,ut}else if(pe.match(/^[^\s]/,!1))return ue.strikethrough=!0,Ne.highlightFormatting&&(ue.formatting="strikethrough"),Oe(ue)}else if(st===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Oe(ue);pe.backUp(2)}}if(Ne.emoji&&st===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ue.emoji=!0,Ne.highlightFormatting&&(ue.formatting="emoji");var kt=Oe(ue);return ue.emoji=!1,kt}return st===" "&&(pe.match(/^ +$/,!1)?ue.trailingSpace++:ue.trailingSpace&&(ue.trailingSpaceNewLine=!0)),Oe(ue)}function Pe(pe,ue){var _e=pe.next();if(_e===">"){ue.f=ue.inline=Lt,Ne.highlightFormatting&&(ue.formatting="link");var yt=Oe(ue);return yt?yt+=" ":yt="",yt+Ae.linkInline}return pe.match(/^[^>]+/,!0),Ae.linkInline}function Ze(pe,ue){if(pe.eatSpace())return null;var _e=pe.next();return _e==="("||_e==="["?(ue.f=ue.inline=Ue(_e==="("?")":"]"),Ne.highlightFormatting&&(ue.formatting="link-string"),ue.linkHref=!0,Oe(ue)):"error"}var ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ue(pe){return function(ue,_e){var yt=ue.next();if(yt===pe){_e.f=_e.inline=Lt,Ne.highlightFormatting&&(_e.formatting="link-string");var st=Oe(_e);return _e.linkHref=!1,st}return ue.match(ke[pe]),_e.linkHref=!0,Oe(_e)}}function Ht(pe,ue){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ue.f=St,pe.next(),Ne.highlightFormatting&&(ue.formatting="link"),ue.linkText=!0,Oe(ue)):lt(pe,ue,Lt)}function St(pe,ue){if(pe.match(/^\]:/,!0)){ue.f=ue.inline=Ct,Ne.highlightFormatting&&(ue.formatting="link");var _e=Oe(ue);return ue.linkText=!1,_e}return pe.match(/^([^\]\\]|\\.)+/,!0),Ae.linkText}function Ct(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,Ae.linkHref+" url")}var at={startState:function(){return{f:dt,prevLine:{stream:null},thisLine:{stream:null},block:dt,htmlState:null,indentation:0,inline:Lt,text:$e,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 pt(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!=rt)){var _e=pe.match(/^\s*/,!0)[0].replace(/\t/g,ot).length;if(ue.indentation=_e,ue.indentationDiff=null,_e>0)return null}}return ue.f(pe,ue)},innerMode:function(pe){return pe.block==rt?{state:pe.htmlState,mode:ze}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:at}},indent:function(pe,ue,_e){return pe.block==rt&&ze.indent?ze.indent(pe.htmlState,ue,_e):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ue,_e):ae.Pass},blankLine:pt,getType:Oe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return at},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(Rt,zt,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 ft=0;ft<ae.modeInfo.length;ft++){var Ne=ae.modeInfo[ft];Ne.mimes&&(Ne.mime=Ne.mimes[0])}ae.findModeByMIME=function(ze){ze=ze.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var Je=ae.modeInfo[me];if(Je.mime==ze)return Je;if(Je.mimes){for(var Ae=0;Ae<Je.mimes.length;Ae++)if(Je.mimes[Ae]==ze)return Je}}if(/\+xml$/.test(ze))return ae.findModeByMIME("application/xml");if(/\+json$/.test(ze))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(ze){ze=ze.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var Je=ae.modeInfo[me];if(Je.ext){for(var Ae=0;Ae<Je.ext.length;Ae++)if(Je.ext[Ae]==ze)return Je}}},ae.findModeByFileName=function(ze){for(var me=0;me<ae.modeInfo.length;me++){var Je=ae.modeInfo[me];if(Je.file&&Je.file.test(ze))return Je}var Ae=ze.lastIndexOf("."),Qe=Ae>-1&&ze.substring(Ae+1,ze.length);if(Qe)return ae.findModeByExtension(Qe)},ae.findModeByName=function(ze){ze=ze.toLowerCase();for(var me=0;me<ae.modeInfo.length;me++){var Je=ae.modeInfo[me];if(Je.name.toLowerCase()==ze)return Je;if(Je.alias){for(var Ae=0;Ae<Je.alias.length;Ae++)if(Je.alias[Ae].toLowerCase()==ze)return Je}}}})},67549:function(Rt,zt,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";ae.defineMode("stex",function(ft,Ne){"use strict";function ze(je,Ie){je.cmdState.push(Ie)}function me(je){return je.cmdState.length>0?je.cmdState[je.cmdState.length-1]:null}function Je(je){var Ie=je.cmdState.pop();Ie&&Ie.closeBracket()}function Ae(je){for(var Ie=je.cmdState,Re=Ie.length-1;Re>=0;Re--){var De=Ie[Re];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Qe(je,Ie,Re){return function(){this.name=je,this.bracketNo=0,this.style=Ie,this.styles=Re,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Se={};Se.importmodule=Qe("importmodule","tag",["string","builtin"]),Se.documentclass=Qe("documentclass","tag",["","atom"]),Se.usepackage=Qe("usepackage","tag",["atom"]),Se.begin=Qe("begin","tag",["atom"]),Se.end=Qe("end","tag",["atom"]),Se.label=Qe("label","tag",["atom"]),Se.ref=Qe("ref","tag",["atom"]),Se.eqref=Qe("eqref","tag",["atom"]),Se.cite=Qe("cite","tag",["atom"]),Se.bibitem=Qe("bibitem","tag",["atom"]),Se.Bibitem=Qe("Bibitem","tag",["atom"]),Se.RBibitem=Qe("RBibitem","tag",["atom"]),Se.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(je,Ie){je.f=Ie}function Me(je,Ie){var Re;if(je.match(/^\\[a-zA-Z@]+/)){var De=je.current().slice(1);return Re=Se.hasOwnProperty(De)?Se[De]:Se.DEFAULT,Re=new Re,ze(Ie,Re),de(Ie,ht),Re.style}if(je.match(/^\\[$&%#{}_]/)||je.match(/^\\[,;!\/\\]/))return"tag";if(je.match("\\["))return de(Ie,function(lt,wt){return ye(lt,wt,"\\]")}),"keyword";if(je.match("\\("))return de(Ie,function(lt,wt){return ye(lt,wt,"\\)")}),"keyword";if(je.match("$$"))return de(Ie,function(lt,wt){return ye(lt,wt,"$$")}),"keyword";if(je.match("$"))return de(Ie,function(lt,wt){return ye(lt,wt,"$")}),"keyword";var ot=je.next();if(ot=="%")return je.skipToEnd(),"comment";if(ot=="}"||ot=="]"){if(Re=me(Ie),Re)Re.closeBracket(ot),de(Ie,ht);else return"error";return"bracket"}else return ot=="{"||ot=="["?(Re=Se.DEFAULT,Re=new Re,ze(Ie,Re),"bracket"):/\d/.test(ot)?(je.eatWhile(/[\w.%]/),"atom"):(je.eatWhile(/[\w\-_]/),Re=Ae(Ie),Re.name=="begin"&&(Re.argument=je.current()),Re.styleIdentifier())}function ye(je,Ie,Re){if(je.eatSpace())return null;if(Re&&je.match(Re))return de(Ie,Me),"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 ht(je,Ie){var Re=je.peek(),De;return Re=="{"||Re=="["?(De=me(Ie),De.openBracket(Re),je.eat(Re),de(Ie,Me),"bracket"):/[ \t\r]/.test(Re)?(je.eat(Re),null):(de(Ie,Me),Je(Ie),Me(je,Ie))}return{startState:function(){var je=Ne.inMathMode?function(Ie,Re){return ye(Ie,Re)}:Me;return{cmdState:[],f:je}},copyState:function(je){return{cmdState:je.cmdState.slice(),f:je.f}},token:function(je,Ie){return Ie.f(je,Ie)},blankLine:function(je){je.f=Me,je.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(Rt,zt,fe){(function(ae){ae(fe(89780))})(function(ae){"use strict";var ft={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},Ne={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(ze,me){var Je=ze.indentUnit,Ae={},Qe=me.htmlMode?ft:Ne;for(var Se in Qe)Ae[Se]=Qe[Se];for(var Se in me)Ae[Se]=me[Se];var de,Me;function ye(Pe,Ze){function ke(St){return Ze.tokenize=St,St(Pe,Ze)}var Ue=Pe.next();if(Ue=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?ke(Ie("atom","]]>")):null:Pe.match("--")?ke(Ie("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),ke(Re(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),Ze.tokenize=Ie("meta","?>"),"meta"):(de=Pe.eat("/")?"closeTag":"openTag",Ze.tokenize=ht,"tag bracket");if(Ue=="&"){var Ht;return Pe.eat("#")?Pe.eat("x")?Ht=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):Ht=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):Ht=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),Ht?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}ye.isInText=!0;function ht(Pe,Ze){var ke=Pe.next();if(ke==">"||ke=="/"&&Pe.eat(">"))return Ze.tokenize=ye,de=ke==">"?"endTag":"selfcloseTag","tag bracket";if(ke=="=")return de="equals",null;if(ke=="<"){Ze.tokenize=ye,Ze.state=wt,Ze.tagName=Ze.tagStart=null;var Ue=Ze.tokenize(Pe,Ze);return Ue?Ue+" tag error":"tag error"}else return/[\'\"]/.test(ke)?(Ze.tokenize=je(ke),Ze.stringStartCol=Pe.column(),Ze.tokenize(Pe,Ze)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function je(Pe){var Ze=function(ke,Ue){for(;!ke.eol();)if(ke.next()==Pe){Ue.tokenize=ht;break}return"string"};return Ze.isInAttribute=!0,Ze}function Ie(Pe,Ze){return function(ke,Ue){for(;!ke.eol();){if(ke.match(Ze)){Ue.tokenize=ye;break}ke.next()}return Pe}}function Re(Pe){return function(Ze,ke){for(var Ue;(Ue=Ze.next())!=null;){if(Ue=="<")return ke.tokenize=Re(Pe+1),ke.tokenize(Ze,ke);if(Ue==">")if(Pe==1){ke.tokenize=ye;break}else return ke.tokenize=Re(Pe-1),ke.tokenize(Ze,ke)}return"meta"}}function De(Pe,Ze,ke){this.prev=Pe.context,this.tagName=Ze,this.indent=Pe.indented,this.startOfLine=ke,(Ae.doNotIndent.hasOwnProperty(Ze)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function ot(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function lt(Pe,Ze){for(var ke;;){if(!Pe.context||(ke=Pe.context.tagName,!Ae.contextGrabbers.hasOwnProperty(ke)||!Ae.contextGrabbers[ke].hasOwnProperty(Ze)))return;ot(Pe)}}function wt(Pe,Ze,ke){return Pe=="openTag"?(ke.tagStart=Ze.column(),mt):Pe=="closeTag"?pt:wt}function mt(Pe,Ze,ke){return Pe=="word"?(ke.tagName=Ze.current(),Me="tag",Qt):Ae.allowMissingTagName&&Pe=="endTag"?(Me="tag bracket",Qt(Pe,Ze,ke)):(Me="error",mt)}function pt(Pe,Ze,ke){if(Pe=="word"){var Ue=Ze.current();return ke.context&&ke.context.tagName!=Ue&&Ae.implicitlyClosed.hasOwnProperty(ke.context.tagName)&&ot(ke),ke.context&&ke.context.tagName==Ue||Ae.matchClosing===!1?(Me="tag",dt):(Me="tag error",rt)}else return Ae.allowMissingTagName&&Pe=="endTag"?(Me="tag bracket",dt(Pe,Ze,ke)):(Me="error",rt)}function dt(Pe,Ze,ke){return Pe!="endTag"?(Me="error",dt):(ot(ke),wt)}function rt(Pe,Ze,ke){return Me="error",dt(Pe,Ze,ke)}function Qt(Pe,Ze,ke){if(Pe=="word")return Me="attribute",Oe;if(Pe=="endTag"||Pe=="selfcloseTag"){var Ue=ke.tagName,Ht=ke.tagStart;return ke.tagName=ke.tagStart=null,Pe=="selfcloseTag"||Ae.autoSelfClosers.hasOwnProperty(Ue)?lt(ke,Ue):(lt(ke,Ue),ke.context=new De(ke,Ue,Ht==ke.indented)),wt}return Me="error",Qt}function Oe(Pe,Ze,ke){return Pe=="equals"?$e:(Ae.allowMissing||(Me="error"),Qt(Pe,Ze,ke))}function $e(Pe,Ze,ke){return Pe=="string"?Lt:Pe=="word"&&Ae.allowUnquoted?(Me="string",Qt):(Me="error",Qt(Pe,Ze,ke))}function Lt(Pe,Ze,ke){return Pe=="string"?Lt:Qt(Pe,Ze,ke)}return{startState:function(Pe){var Ze={tokenize:ye,state:wt,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(Ze.baseIndent=Pe),Ze},token:function(Pe,Ze){if(!Ze.tagName&&Pe.sol()&&(Ze.indented=Pe.indentation()),Pe.eatSpace())return null;de=null;var ke=Ze.tokenize(Pe,Ze);return(ke||de)&&ke!="comment"&&(Me=null,Ze.state=Ze.state(de||ke,Pe,Ze),Me&&(ke=Me=="error"?ke+" error":Me)),ke},indent:function(Pe,Ze,ke){var Ue=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+Je;if(Ue&&Ue.noIndent)return ae.Pass;if(Pe.tokenize!=ht&&Pe.tokenize!=ye)return ke?ke.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return Ae.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+Je*(Ae.multilineTagIndentFactor||1);if(Ae.alignCDATA&&/<!\[CDATA\[/.test(Ze))return 0;var Ht=Ze&&/^<(\/)?([\w_:\.-]*)/.exec(Ze);if(Ht&&Ht[1])for(;Ue;)if(Ue.tagName==Ht[2]){Ue=Ue.prev;break}else if(Ae.implicitlyClosed.hasOwnProperty(Ue.tagName))Ue=Ue.prev;else break;else if(Ht)for(;Ue;){var St=Ae.contextGrabbers[Ue.tagName];if(St&&St.hasOwnProperty(Ht[2]))Ue=Ue.prev;else break}for(;Ue&&Ue.prev&&!Ue.startOfLine;)Ue=Ue.prev;return Ue?Ue.indent+Je:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ae.htmlMode?"html":"xml",helperType:Ae.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==$e&&(Pe.state=Qt)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var Ze=[],ke=Pe.context;ke;ke=ke.prev)ke.tagName&&Ze.push(ke.tagName);return Ze.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(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ze}});var ae=fe(33885),ft=fe(42978),Ne=fe(43403),ze=fe(34280),me=fe(59301),Je=me.createContext(null),Ae=me.createContext({}),Qe=Je,Se=fe(20068),de=fe(54476),Me=fe(92310),ye=fe.n(Me),ht=fe(77900),je=fe(10228),Ie=fe(26112),Re=fe(75931),De=fe(8654),ot=["prefixCls","className","containerRef"],lt=function(Ue){var Ht=Ue.prefixCls,St=Ue.className,Ct=Ue.containerRef,at=(0,Re.Z)(Ue,ot),pe=me.useContext(Ae),ue=pe.panel,_e=(0,De.x1)(ue,Ct);return me.createElement("div",(0,de.Z)({className:ye()("".concat(Ht,"-content"),St),role:"dialog",ref:_e},(0,Ie.Z)(Ue,{aria:!0}),{"aria-modal":"true"},at))},wt=lt,mt=fe(48736);function pt(ke){return typeof ke=="string"&&String(Number(ke))===ke?((0,mt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(ke)):ke}function dt(ke){warning(!("wrapperClassName"in ke),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!ke.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var rt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Qt(ke,Ue){var Ht,St,Ct,at=ke.prefixCls,pe=ke.open,ue=ke.placement,_e=ke.inline,yt=ke.push,st=ke.forceRender,we=ke.autoFocus,Xe=ke.keyboard,Ge=ke.classNames,Mt=ke.rootClassName,ut=ke.rootStyle,Ce=ke.zIndex,ve=ke.className,Le=ke.id,Ve=ke.style,xe=ke.motion,We=ke.width,Ke=ke.height,et=ke.children,nt=ke.mask,Ye=ke.maskClosable,bt=ke.maskMotion,kt=ke.maskClassName,Jt=ke.maskStyle,Wt=ke.afterOpenChange,se=ke.onClose,te=ke.onMouseEnter,ee=ke.onMouseOver,ie=ke.onMouseLeave,ce=ke.onClick,ne=ke.onKeyDown,ge=ke.onKeyUp,ct=ke.styles,vt=ke.drawerRender,xt=me.useRef(),Fe=me.useRef(),Zt=me.useRef();me.useImperativeHandle(Ue,function(){return xt.current});var Nt=function(Xn){var Kn=Xn.keyCode,xr=Xn.shiftKey;switch(Kn){case je.Z.TAB:{if(Kn===je.Z.TAB){if(!xr&&document.activeElement===Zt.current){var Ut;(Ut=Fe.current)===null||Ut===void 0||Ut.focus({preventScroll:!0})}else if(xr&&document.activeElement===Fe.current){var pn;(pn=Zt.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case je.Z.ESC:{se&&Xe&&(Xn.stopPropagation(),se(Xn));break}}};me.useEffect(function(){if(pe&&we){var Bn;(Bn=xt.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[pe]);var Ft=me.useState(!1),un=(0,ft.Z)(Ft,2),kn=un[0],cn=un[1],wn=me.useContext(Qe),$n;typeof yt=="boolean"?$n=yt?{}:{distance:0}:$n=yt||{};var Zn=(Ht=(St=(Ct=$n)===null||Ct===void 0?void 0:Ct.distance)!==null&&St!==void 0?St:wn==null?void 0:wn.pushDistance)!==null&&Ht!==void 0?Ht:180,mr=me.useMemo(function(){return{pushDistance:Zn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[Zn]);me.useEffect(function(){if(pe){var Bn;wn==null||(Bn=wn.push)===null||Bn===void 0||Bn.call(wn)}else{var Xn;wn==null||(Xn=wn.pull)===null||Xn===void 0||Xn.call(wn)}},[pe]),me.useEffect(function(){return function(){var Bn;wn==null||(Bn=wn.pull)===null||Bn===void 0||Bn.call(wn)}},[]);var er=nt&&me.createElement(ht.default,(0,de.Z)({key:"mask"},bt,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style;return me.createElement("div",{className:ye()("".concat(at,"-mask"),Kn,Ge==null?void 0:Ge.mask,kt),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},xr),Jt),ct==null?void 0:ct.mask),onClick:Ye&&pe?se:void 0,ref:Xn})}),ur=typeof xe=="function"?xe(ue):xe,nr={};if(kn&&Zn)switch(ue){case"top":nr.transform="translateY(".concat(Zn,"px)");break;case"bottom":nr.transform="translateY(".concat(-Zn,"px)");break;case"left":nr.transform="translateX(".concat(Zn,"px)");break;default:nr.transform="translateX(".concat(-Zn,"px)");break}ue==="left"||ue==="right"?nr.width=pt(We):nr.height=pt(Ke);var In={onMouseEnter:te,onMouseOver:ee,onMouseLeave:ie,onClick:ce,onKeyDown:ne,onKeyUp:ge},rr=me.createElement(ht.default,(0,de.Z)({key:"panel"},ur,{visible:pe,forceRender:st,onVisibleChanged:function(Xn){Wt==null||Wt(Xn)},removeOnLeave:!1,leavedClassName:"".concat(at,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style,Ut=me.createElement(wt,(0,de.Z)({id:Le,containerRef:Xn,prefixCls:at,className:ye()(ve,Ge==null?void 0:Ge.content),style:(0,ae.Z)((0,ae.Z)({},Ve),ct==null?void 0:ct.content)},(0,Ie.Z)(ke,{aria:!0}),In),et);return me.createElement("div",(0,de.Z)({className:ye()("".concat(at,"-content-wrapper"),Ge==null?void 0:Ge.wrapper,Kn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},nr),xr),ct==null?void 0:ct.wrapper)},(0,Ie.Z)(ke,{data:!0})),vt?vt(Ut):Ut)}),cr=(0,ae.Z)({},ut);return Ce&&(cr.zIndex=Ce),me.createElement(Qe.Provider,{value:mr},me.createElement("div",{className:ye()(at,"".concat(at,"-").concat(ue),Mt,(0,Se.Z)((0,Se.Z)({},"".concat(at,"-open"),pe),"".concat(at,"-inline"),_e)),style:cr,tabIndex:-1,ref:xt,onKeyDown:Nt},er,me.createElement("div",{tabIndex:0,ref:Fe,style:rt,"aria-hidden":"true","data-sentinel":"start"}),rr,me.createElement("div",{tabIndex:0,ref:Zt,style:rt,"aria-hidden":"true","data-sentinel":"end"})))}var Oe=me.forwardRef(Qt),$e=Oe,Lt=function(Ue){var Ht=Ue.open,St=Ht===void 0?!1:Ht,Ct=Ue.prefixCls,at=Ct===void 0?"rc-drawer":Ct,pe=Ue.placement,ue=pe===void 0?"right":pe,_e=Ue.autoFocus,yt=_e===void 0?!0:_e,st=Ue.keyboard,we=st===void 0?!0:st,Xe=Ue.width,Ge=Xe===void 0?378:Xe,Mt=Ue.mask,ut=Mt===void 0?!0:Mt,Ce=Ue.maskClosable,ve=Ce===void 0?!0:Ce,Le=Ue.getContainer,Ve=Ue.forceRender,xe=Ue.afterOpenChange,We=Ue.destroyOnClose,Ke=Ue.onMouseEnter,et=Ue.onMouseOver,nt=Ue.onMouseLeave,Ye=Ue.onClick,bt=Ue.onKeyDown,kt=Ue.onKeyUp,Jt=Ue.panelRef,Wt=me.useState(!1),se=(0,ft.Z)(Wt,2),te=se[0],ee=se[1],ie=me.useState(!1),ce=(0,ft.Z)(ie,2),ne=ce[0],ge=ce[1];(0,ze.Z)(function(){ge(!0)},[]);var ct=ne?St:!1,vt=me.useRef(),xt=me.useRef();(0,ze.Z)(function(){ct&&(xt.current=document.activeElement)},[ct]);var Fe=function(kn){var cn;if(ee(kn),xe==null||xe(kn),!kn&&xt.current&&!((cn=vt.current)!==null&&cn!==void 0&&cn.contains(xt.current))){var wn;(wn=xt.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},Zt=me.useMemo(function(){return{panel:Jt}},[Jt]);if(!Ve&&!te&&!ct&&We)return null;var Nt={onMouseEnter:Ke,onMouseOver:et,onMouseLeave:nt,onClick:Ye,onKeyDown:bt,onKeyUp:kt},Ft=(0,ae.Z)((0,ae.Z)({},Ue),{},{open:ct,prefixCls:at,placement:ue,autoFocus:yt,keyboard:we,width:Ge,mask:ut,maskClosable:ve,inline:Le===!1,afterOpenChange:Fe,ref:vt},Nt);return me.createElement(Ae.Provider,{value:Zt},me.createElement(Ne.Z,{open:ct||Ve||te,autoDestroy:!1,getContainer:Le,autoLock:ut&&(ct||te)},me.createElement($e,Ft)))},Pe=Lt,Ze=Pe},20922:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return ut}});var ae=fe(54476),ft=fe(20068),Ne=fe(76190),ze=fe(42978),me=fe(75931),Je=fe(67732),Ae=fe(83652);function Qe(){return typeof BigInt=="function"}function Se(Ce){return!Ce&&Ce!==0&&!Number.isNaN(Ce)||!String(Ce).trim()}function de(Ce){var ve=Ce.trim(),Le=ve.startsWith("-");Le&&(ve=ve.slice(1)),ve=ve.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ve.startsWith(".")&&(ve="0".concat(ve));var Ve=ve||"0",xe=Ve.split("."),We=xe[0]||"0",Ke=xe[1]||"0";We==="0"&&Ke==="0"&&(Le=!1);var et=Le?"-":"";return{negative:Le,negativeStr:et,trimStr:Ve,integerStr:We,decimalStr:Ke,fullStr:"".concat(et).concat(Ve)}}function Me(Ce){var ve=String(Ce);return!Number.isNaN(Number(ve))&&ve.includes("e")}function ye(Ce){var ve=String(Ce);if(Me(Ce)){var Le=Number(ve.slice(ve.indexOf("e-")+2)),Ve=ve.match(/\.(\d+)/);return Ve!=null&&Ve[1]&&(Le+=Ve[1].length),Le}return ve.includes(".")&&je(ve)?ve.length-ve.indexOf(".")-1:0}function ht(Ce){var ve=String(Ce);if(Me(Ce)){if(Ce>Number.MAX_SAFE_INTEGER)return String(Qe()?BigInt(Ce).toString():Number.MAX_SAFE_INTEGER);if(Ce<Number.MIN_SAFE_INTEGER)return String(Qe()?BigInt(Ce).toString():Number.MIN_SAFE_INTEGER);ve=Ce.toFixed(ye(ve))}return de(ve).fullStr}function je(Ce){return typeof Ce=="number"?!Number.isNaN(Ce):Ce?/^\s*-?\d+(\.\d+)?\s*$/.test(Ce)||/^\s*-?\d+\.\s*$/.test(Ce)||/^\s*-?\.\d+\s*$/.test(Ce):!1}var Ie=function(){function Ce(ve){if((0,Je.Z)(this,Ce),(0,ft.Z)(this,"origin",""),(0,ft.Z)(this,"negative",void 0),(0,ft.Z)(this,"integer",void 0),(0,ft.Z)(this,"decimal",void 0),(0,ft.Z)(this,"decimalLen",void 0),(0,ft.Z)(this,"empty",void 0),(0,ft.Z)(this,"nan",void 0),Se(ve)){this.empty=!0;return}if(this.origin=String(ve),ve==="-"||Number.isNaN(ve)){this.nan=!0;return}var Le=ve;if(Me(Le)&&(Le=Number(Le)),Le=typeof Le=="string"?Le:ht(Le),je(Le)){var Ve=de(Le);this.negative=Ve.negative;var xe=Ve.trimStr.split(".");this.integer=BigInt(xe[0]);var We=xe[1]||"0";this.decimal=BigInt(We),this.decimalLen=We.length}else this.nan=!0}return(0,Ae.Z)(Ce,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Le){var Ve="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Le,"0"));return BigInt(Ve)}},{key:"negate",value:function(){var Le=new Ce(this.toString());return Le.negative=!Le.negative,Le}},{key:"cal",value:function(Le,Ve,xe){var We=Math.max(this.getDecimalStr().length,Le.getDecimalStr().length),Ke=this.alignDecimal(We),et=Le.alignDecimal(We),nt=Ve(Ke,et).toString(),Ye=xe(We),bt=de(nt),kt=bt.negativeStr,Jt=bt.trimStr,Wt="".concat(kt).concat(Jt.padStart(Ye+1,"0"));return new Ce("".concat(Wt.slice(0,-Ye),".").concat(Wt.slice(-Ye)))}},{key:"add",value:function(Le){if(this.isInvalidate())return new Ce(Le);var Ve=new Ce(Le);return Ve.isInvalidate()?this:this.cal(Ve,function(xe,We){return xe+We},function(xe){return xe})}},{key:"multi",value:function(Le){var Ve=new Ce(Le);return this.isInvalidate()||Ve.isInvalidate()?new Ce(NaN):this.cal(Ve,function(xe,We){return xe*We},function(xe){return xe*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Le){return this.toString()===(Le==null?void 0:Le.toString())}},{key:"lessEquals",value:function(Le){return this.add(Le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Le?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Ce}(),Re=function(){function Ce(ve){if((0,Je.Z)(this,Ce),(0,ft.Z)(this,"origin",""),(0,ft.Z)(this,"number",void 0),(0,ft.Z)(this,"empty",void 0),Se(ve)){this.empty=!0;return}this.origin=String(ve),this.number=Number(ve)}return(0,Ae.Z)(Ce,[{key:"negate",value:function(){return new Ce(-this.toNumber())}},{key:"add",value:function(Le){if(this.isInvalidate())return new Ce(Le);var Ve=Number(Le);if(Number.isNaN(Ve))return this;var xe=this.number+Ve;if(xe>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new Ce(Number.MIN_SAFE_INTEGER);var We=Math.max(ye(this.number),ye(Ve));return new Ce(xe.toFixed(We))}},{key:"multi",value:function(Le){var Ve=Number(Le);if(this.isInvalidate()||Number.isNaN(Ve))return new Ce(NaN);var xe=this.number*Ve;if(xe>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new Ce(Number.MIN_SAFE_INTEGER);var We=Math.max(ye(this.number),ye(Ve));return new Ce(xe.toFixed(We))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Le){return this.toNumber()===(Le==null?void 0:Le.toNumber())}},{key:"lessEquals",value:function(Le){return this.add(Le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Le?this.isInvalidate()?"":ht(this.number):this.origin}}]),Ce}();function De(Ce){return Qe()?new Ie(Ce):new Re(Ce)}function ot(Ce,ve,Le){var Ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ce==="")return"";var xe=de(Ce),We=xe.negativeStr,Ke=xe.integerStr,et=xe.decimalStr,nt="".concat(ve).concat(et),Ye="".concat(We).concat(Ke);if(Le>=0){var bt=Number(et[Le]);if(bt>=5&&!Ve){var kt=De(Ce).add("".concat(We,"0.").concat("0".repeat(Le)).concat(10-bt));return ot(kt.toString(),ve,Le,Ve)}return Le===0?Ye:"".concat(Ye).concat(ve).concat(et.padEnd(Le,"0").slice(0,Le))}return nt===".0"?Ye:"".concat(Ye).concat(nt)}var lt=De,wt=fe(92310),mt=fe.n(wt),pt=fe(36901),dt=fe(34280);function rt(Ce,ve){return typeof Proxy!="undefined"&&Ce?new Proxy(Ce,{get:function(Ve,xe){if(ve[xe])return ve[xe];var We=Ve[xe];return typeof We=="function"?We.bind(Ve):We}}):Ce}var Qt=fe(8654),Oe=fe(59301),$e=fe(48736);function Lt(Ce,ve){var Le=(0,Oe.useRef)(null);function Ve(){try{var We=Ce.selectionStart,Ke=Ce.selectionEnd,et=Ce.value,nt=et.substring(0,We),Ye=et.substring(Ke);Le.current={start:We,end:Ke,value:et,beforeTxt:nt,afterTxt:Ye}}catch(bt){}}function xe(){if(Ce&&Le.current&&ve)try{var We=Ce.value,Ke=Le.current,et=Ke.beforeTxt,nt=Ke.afterTxt,Ye=Ke.start,bt=We.length;if(We.startsWith(et))bt=et.length;else if(We.endsWith(nt))bt=We.length-Le.current.afterTxt.length;else{var kt=et[Ye-1],Jt=We.indexOf(kt,Ye-1);Jt!==-1&&(bt=Jt+1)}Ce.setSelectionRange(bt,bt)}catch(Wt){(0,$e.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Wt.message))}}return[Ve,xe]}var Pe=fe(49658),Ze=function(){var ve=(0,Oe.useState)(!1),Le=(0,ze.Z)(ve,2),Ve=Le[0],xe=Le[1];return(0,dt.Z)(function(){xe((0,Pe.Z)())},[]),Ve},ke=Ze,Ue=fe(16089),Ht=200,St=600;function Ct(Ce){var ve=Ce.prefixCls,Le=Ce.upNode,Ve=Ce.downNode,xe=Ce.upDisabled,We=Ce.downDisabled,Ke=Ce.onStep,et=Oe.useRef(),nt=Oe.useRef([]),Ye=Oe.useRef();Ye.current=Ke;var bt=function(){clearTimeout(et.current)},kt=function(ne,ge){ne.preventDefault(),bt(),Ye.current(ge);function ct(){Ye.current(ge),et.current=setTimeout(ct,Ht)}et.current=setTimeout(ct,St)};Oe.useEffect(function(){return function(){bt(),nt.current.forEach(function(ce){return Ue.Z.cancel(ce)})}},[]);var Jt=ke();if(Jt)return null;var Wt="".concat(ve,"-handler"),se=mt()(Wt,"".concat(Wt,"-up"),(0,ft.Z)({},"".concat(Wt,"-up-disabled"),xe)),te=mt()(Wt,"".concat(Wt,"-down"),(0,ft.Z)({},"".concat(Wt,"-down-disabled"),We)),ee=function(){return nt.current.push((0,Ue.Z)(bt))},ie={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Oe.createElement("div",{className:"".concat(Wt,"-wrap")},Oe.createElement("span",(0,ae.Z)({},ie,{onMouseDown:function(ne){kt(ne,!0)},"aria-label":"Increase Value","aria-disabled":xe,className:se}),Le||Oe.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),Oe.createElement("span",(0,ae.Z)({},ie,{onMouseDown:function(ne){kt(ne,!1)},"aria-label":"Decrease Value","aria-disabled":We,className:te}),Ve||Oe.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function at(Ce){var ve=typeof Ce=="number"?ht(Ce):de(Ce).fullStr,Le=ve.includes(".");return Le?de(ve.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Ce+"0"}var pe=fe(30292),ue=function(){var Ce=(0,Oe.useRef)(0),ve=function(){Ue.Z.cancel(Ce.current)};return(0,Oe.useEffect)(function(){return ve},[]),function(Le){ve(),Ce.current=(0,Ue.Z)(function(){Le()})}},_e=["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"],yt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],st=function(ve,Le){return ve||Le.isEmpty()?Le.toString():Le.toNumber()},we=function(ve){var Le=lt(ve);return Le.isInvalidate()?null:Le},Xe=Oe.forwardRef(function(Ce,ve){var Le=Ce.prefixCls,Ve=Ce.className,xe=Ce.style,We=Ce.min,Ke=Ce.max,et=Ce.step,nt=et===void 0?1:et,Ye=Ce.defaultValue,bt=Ce.value,kt=Ce.disabled,Jt=Ce.readOnly,Wt=Ce.upHandler,se=Ce.downHandler,te=Ce.keyboard,ee=Ce.changeOnWheel,ie=ee===void 0?!1:ee,ce=Ce.controls,ne=ce===void 0?!0:ce,ge=Ce.classNames,ct=Ce.stringMode,vt=Ce.parser,xt=Ce.formatter,Fe=Ce.precision,Zt=Ce.decimalSeparator,Nt=Ce.onChange,Ft=Ce.onInput,un=Ce.onPressEnter,kn=Ce.onStep,cn=Ce.changeOnBlur,wn=cn===void 0?!0:cn,$n=Ce.domRef,Zn=(0,me.Z)(Ce,_e),mr="".concat(Le,"-input"),er=Oe.useRef(null),ur=Oe.useState(!1),nr=(0,ze.Z)(ur,2),In=nr[0],rr=nr[1],cr=Oe.useRef(!1),Bn=Oe.useRef(!1),Xn=Oe.useRef(!1),Kn=Oe.useState(function(){return lt(bt!=null?bt:Ye)}),xr=(0,ze.Z)(Kn,2),Ut=xr[0],pn=xr[1];function En(dn){bt===void 0&&pn(dn)}var Tn=Oe.useCallback(function(dn,Gt){if(!Gt)return Fe>=0?Fe:Math.max(ye(dn),ye(nt))},[Fe,nt]),Jn=Oe.useCallback(function(dn){var Gt=String(dn);if(vt)return vt(Gt);var gn=Gt;return Zt&&(gn=gn.replace(Zt,".")),gn.replace(/[^\w.-]+/g,"")},[vt,Zt]),tr=Oe.useRef(""),dr=Oe.useCallback(function(dn,Gt){if(xt)return xt(dn,{userTyping:Gt,input:String(tr.current)});var gn=typeof dn=="number"?ht(dn):dn;if(!Gt){var nn=Tn(gn,Gt);if(je(gn)&&(Zt||nn>=0)){var Hn=Zt||".";gn=ot(gn,Hn,nn)}}return gn},[xt,Tn,Zt]),_n=Oe.useState(function(){var dn=Ye!=null?Ye:bt;return Ut.isInvalidate()&&["string","number"].includes((0,Ne.Z)(dn))?Number.isNaN(dn)?"":dn:dr(Ut.toString(),!1)}),Rn=(0,ze.Z)(_n,2),hr=Rn[0],jt=Rn[1];tr.current=hr;function it(dn,Gt){jt(dr(dn.isInvalidate()?dn.toString(!1):dn.toString(!Gt),Gt))}var qt=Oe.useMemo(function(){return we(Ke)},[Ke,Fe]),Cn=Oe.useMemo(function(){return we(We)},[We,Fe]),Gn=Oe.useMemo(function(){return!qt||!Ut||Ut.isInvalidate()?!1:qt.lessEquals(Ut)},[qt,Ut]),Te=Oe.useMemo(function(){return!Cn||!Ut||Ut.isInvalidate()?!1:Ut.lessEquals(Cn)},[Cn,Ut]),Be=Lt(er.current,In),Pt=(0,ze.Z)(Be,2),Et=Pt[0],He=Pt[1],Dt=function(Gt){return qt&&!Gt.lessEquals(qt)?qt:Cn&&!Cn.lessEquals(Gt)?Cn:null},Yt=function(Gt){return!Dt(Gt)},tn=function(Gt,gn){var nn=Gt,Hn=Yt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!gn&&(nn=Dt(nn)||nn,Hn=!0),!Jt&&!kt&&Hn){var wr=nn.toString(),Qn=Tn(wr,gn);return Qn>=0&&(nn=lt(ot(wr,".",Qn)),Yt(nn)||(nn=lt(ot(wr,".",Qn,!0)))),nn.equals(Ut)||(En(nn),Nt==null||Nt(nn.isEmpty()?null:st(ct,nn)),bt===void 0&&it(nn,gn)),nn}return Ut},hn=ue(),_t=function dn(Gt){if(Et(),tr.current=Gt,jt(Gt),!Bn.current){var gn=Jn(Gt),nn=lt(gn);nn.isNaN()||tn(nn,!0)}Ft==null||Ft(Gt),hn(function(){var Hn=Gt;vt||(Hn=Gt.replace(/。/g,".")),Hn!==Gt&&dn(Hn)})},$t=function(){Bn.current=!0},At=function(){Bn.current=!1,_t(er.current.value)},gt=function(Gt){_t(Gt.target.value)},en=function(Gt){var gn;if(!(Gt&&Gn||!Gt&&Te)){cr.current=!1;var nn=lt(Xn.current?at(nt):nt);Gt||(nn=nn.negate());var Hn=(Ut||lt(0)).add(nn.toString()),wr=tn(Hn,!1);kn==null||kn(st(ct,wr),{offset:Xn.current?at(nt):nt,type:Gt?"up":"down"}),(gn=er.current)===null||gn===void 0||gn.focus()}},vn=function(Gt){var gn=lt(Jn(hr)),nn;gn.isNaN()?nn=tn(Ut,Gt):nn=tn(gn,Gt),bt!==void 0?it(Ut,!1):nn.isNaN()||it(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};Oe.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,dt.o)(function(){Ut.isInvalidate()||it(Ut,!1)},[Fe,xt]),(0,dt.o)(function(){var dn=lt(bt);pn(dn);var Gt=lt(Jn(hr));(!dn.equals(Gt)||!cr.current||xt)&&it(dn,cr.current)},[bt]),(0,dt.o)(function(){xt&&He()},[hr]),Oe.createElement("div",{ref:$n,className:mt()(Le,Ve,(0,ft.Z)((0,ft.Z)((0,ft.Z)((0,ft.Z)((0,ft.Z)({},"".concat(Le,"-focused"),In),"".concat(Le,"-disabled"),kt),"".concat(Le,"-readonly"),Jt),"".concat(Le,"-not-a-number"),Ut.isNaN()),"".concat(Le,"-out-of-range"),!Ut.isInvalidate()&&!Yt(Ut))),style:xe,onFocus:function(){rr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:Wn,onCompositionStart:$t,onCompositionEnd:At,onBeforeInput:mn},ne&&Oe.createElement(Ct,{prefixCls:Le,upNode:Wt,downNode:se,upDisabled:Gn,downDisabled:Te,onStep:en}),Oe.createElement("div",{className:"".concat(mr,"-wrap")},Oe.createElement("input",(0,ae.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":We,"aria-valuemax":Ke,"aria-valuenow":Ut.isInvalidate()?null:Ut.toString(),step:nt},Zn,{ref:(0,Qt.sQ)(er,ve),className:mr,value:hr,onChange:gt,disabled:kt,readOnly:Jt}))))}),Ge=Oe.forwardRef(function(Ce,ve){var Le=Ce.disabled,Ve=Ce.style,xe=Ce.prefixCls,We=xe===void 0?"rc-input-number":xe,Ke=Ce.value,et=Ce.prefix,nt=Ce.suffix,Ye=Ce.addonBefore,bt=Ce.addonAfter,kt=Ce.className,Jt=Ce.classNames,Wt=(0,me.Z)(Ce,yt),se=Oe.useRef(null),te=Oe.useRef(null),ee=Oe.useRef(null),ie=function(ne){ee.current&&(0,pe.nH)(ee.current,ne)};return Oe.useImperativeHandle(ve,function(){return rt(ee.current,{focus:ie,nativeElement:se.current.nativeElement||te.current})}),Oe.createElement(pt.BaseInput,{className:kt,triggerFocus:ie,prefixCls:We,value:Ke,disabled:Le,style:Ve,prefix:et,suffix:nt,addonAfter:bt,addonBefore:Ye,classNames:Jt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:se},Oe.createElement(Xe,(0,ae.Z)({prefixCls:We,disabled:Le,ref:ee,domRef:te,className:Jt==null?void 0:Jt.input},Wt)))}),Mt=Ge,ut=Mt},25930:function(Rt,zt,fe){"use strict";fe.d(zt,{Cd:function(){return Lt}});var ae=fe(54476),ft=fe(33885),Ne=fe(75931),ze=fe(59301),me=fe(92310),Je=fe.n(me),Ae={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Qe=function(){var ke=(0,ze.useRef)([]),Ue=(0,ze.useRef)(null);return(0,ze.useEffect)(function(){var Ht=Date.now(),St=!1;ke.current.forEach(function(Ct){if(Ct){St=!0;var at=Ct.style;at.transitionDuration=".3s, .3s, .3s, .06s",Ue.current&&Ht-Ue.current<100&&(at.transitionDuration="0s, 0s")}}),St&&(Ue.current=Date.now())}),ke.current},Se=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(ke){var Ue=(0,ft.Z)((0,ft.Z)({},Ae),ke),Ht=Ue.className,St=Ue.percent,Ct=Ue.prefixCls,at=Ue.strokeColor,pe=Ue.strokeLinecap,ue=Ue.strokeWidth,_e=Ue.style,yt=Ue.trailColor,st=Ue.trailWidth,we=Ue.transition,Xe=(0,Ne.Z)(Ue,Se);delete Xe.gapPosition;var Ge=Array.isArray(St)?St:[St],Mt=Array.isArray(at)?at:[at],ut=Qe(),Ce=ue/2,ve=100-ue/2,Le="M ".concat(pe==="round"?Ce:0,",").concat(Ce,`
L `).concat(pe==="round"?ve:100,",").concat(Ce),Ve="0 0 100 ".concat(ue),xe=0;return ze.createElement("svg",(0,ae.Z)({className:Je()("".concat(Ct,"-line"),Ht),viewBox:Ve,preserveAspectRatio:"none",style:_e},Xe),ze.createElement("path",{className:"".concat(Ct,"-line-trail"),d:Le,strokeLinecap:pe,stroke:yt,strokeWidth:st||ue,fillOpacity:"0"}),Ge.map(function(We,Ke){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 nt={strokeDasharray:"".concat(We*et,"px, 100px"),strokeDashoffset:"-".concat(xe,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ye=Mt[Ke]||Mt[Mt.length-1];return xe+=We,ze.createElement("path",{key:Ke,className:"".concat(Ct,"-line-path"),d:Le,strokeLinecap:pe,stroke:Ye,strokeWidth:ue,fillOpacity:"0",ref:function(kt){ut[Ke]=kt},style:nt})}))},Me=de,ye=fe(76190),ht=fe(42978),je=fe(47273),Ie=0,Re=(0,je.Z)();function De(){var Ze;return Re?(Ze=Ie,Ie+=1):Ze="TEST_OR_SSR",Ze}var ot=function(Ze){var ke=ze.useState(),Ue=(0,ht.Z)(ke,2),Ht=Ue[0],St=Ue[1];return ze.useEffect(function(){St("rc_progress_".concat(De()))},[]),Ze||Ht},lt=function(ke){var Ue=ke.bg,Ht=ke.children;return ze.createElement("div",{style:{width:"100%",height:"100%",background:Ue}},Ht)};function wt(Ze,ke){return Object.keys(Ze).map(function(Ue){var Ht=parseFloat(Ue),St="".concat(Math.floor(Ht*ke),"%");return"".concat(Ze[Ue]," ").concat(St)})}var mt=ze.forwardRef(function(Ze,ke){var Ue=Ze.prefixCls,Ht=Ze.color,St=Ze.gradientId,Ct=Ze.radius,at=Ze.style,pe=Ze.ptg,ue=Ze.strokeLinecap,_e=Ze.strokeWidth,yt=Ze.size,st=Ze.gapDegree,we=Ht&&(0,ye.Z)(Ht)==="object",Xe=we?"#FFF":void 0,Ge=yt/2,Mt=ze.createElement("circle",{className:"".concat(Ue,"-circle-path"),r:Ct,cx:Ge,cy:Ge,stroke:Xe,strokeLinecap:ue,strokeWidth:_e,opacity:pe===0?0:1,style:at,ref:ke});if(!we)return Mt;var ut="".concat(St,"-conic"),Ce=st?"".concat(180+st/2,"deg"):"0deg",ve=wt(Ht,(360-st)/360),Le=wt(Ht,1),Ve="conic-gradient(from ".concat(Ce,", ").concat(ve.join(", "),")"),xe="linear-gradient(to ".concat(st?"bottom":"top",", ").concat(Le.join(", "),")");return ze.createElement(ze.Fragment,null,ze.createElement("mask",{id:ut},Mt),ze.createElement("foreignObject",{x:0,y:0,width:yt,height:yt,mask:"url(#".concat(ut,")")},ze.createElement(lt,{bg:xe},ze.createElement(lt,{bg:Ve}))))}),pt=mt,dt=100,rt=function(ke,Ue,Ht,St,Ct,at,pe,ue,_e,yt){var st=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,we=Ht/100*360*((360-at)/360),Xe=at===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ge=(100-St)/100*Ue;_e==="round"&&St!==100&&(Ge+=yt/2,Ge>=Ue&&(Ge=Ue-.01));var Mt=dt/2;return{stroke:typeof ue=="string"?ue:void 0,strokeDasharray:"".concat(Ue,"px ").concat(ke),strokeDashoffset:Ge+st,transform:"rotate(".concat(Ct+we+Xe,"deg)"),transformOrigin:"".concat(Mt,"px ").concat(Mt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Qt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Oe(Ze){var ke=Ze!=null?Ze:[];return Array.isArray(ke)?ke:[ke]}var $e=function(ke){var Ue=(0,ft.Z)((0,ft.Z)({},Ae),ke),Ht=Ue.id,St=Ue.prefixCls,Ct=Ue.steps,at=Ue.strokeWidth,pe=Ue.trailWidth,ue=Ue.gapDegree,_e=ue===void 0?0:ue,yt=Ue.gapPosition,st=Ue.trailColor,we=Ue.strokeLinecap,Xe=Ue.style,Ge=Ue.className,Mt=Ue.strokeColor,ut=Ue.percent,Ce=(0,Ne.Z)(Ue,Qt),ve=dt/2,Le=ot(Ht),Ve="".concat(Le,"-gradient"),xe=ve-at/2,We=Math.PI*2*xe,Ke=_e>0?90+_e/2:-90,et=We*((360-_e)/360),nt=(0,ye.Z)(Ct)==="object"?Ct:{count:Ct,gap:2},Ye=nt.count,bt=nt.gap,kt=Oe(ut),Jt=Oe(Mt),Wt=Jt.find(function(ge){return ge&&(0,ye.Z)(ge)==="object"}),se=Wt&&(0,ye.Z)(Wt)==="object",te=se?"butt":we,ee=rt(We,et,0,100,Ke,_e,yt,st,te,at),ie=Qe(),ce=function(){var ct=0;return kt.map(function(vt,xt){var Fe=Jt[xt]||Jt[Jt.length-1],Zt=rt(We,et,ct,vt,Ke,_e,yt,Fe,te,at);return ct+=vt,ze.createElement(pt,{key:xt,color:Fe,ptg:vt,radius:xe,prefixCls:St,gradientId:Ve,style:Zt,strokeLinecap:te,strokeWidth:at,gapDegree:_e,ref:function(Ft){ie[xt]=Ft},size:dt})}).reverse()},ne=function(){var ct=Math.round(Ye*(kt[0]/100)),vt=100/Ye,xt=0;return new Array(Ye).fill(null).map(function(Fe,Zt){var Nt=Zt<=ct-1?Jt[0]:st,Ft=Nt&&(0,ye.Z)(Nt)==="object"?"url(#".concat(Ve,")"):void 0,un=rt(We,et,xt,vt,Ke,_e,yt,Nt,"butt",at,bt);return xt+=(et-un.strokeDashoffset+bt)*100/et,ze.createElement("circle",{key:Zt,className:"".concat(St,"-circle-path"),r:xe,cx:ve,cy:ve,stroke:Ft,strokeWidth:at,opacity:1,style:un,ref:function(cn){ie[Zt]=cn}})})};return ze.createElement("svg",(0,ae.Z)({className:Je()("".concat(St,"-circle"),Ge),viewBox:"0 0 ".concat(dt," ").concat(dt),style:Xe,id:Ht,role:"presentation"},Ce),!Ye&&ze.createElement("circle",{className:"".concat(St,"-circle-trail"),r:xe,cx:ve,cy:ve,stroke:st,strokeLinecap:te,strokeWidth:pe||at,style:ee}),Ye?ne():ce())},Lt=$e,Pe={Line:Me,Circle:Lt}},6551:function(Rt,zt,fe){"use strict";fe.d(zt,{ZP:function(){return Ae}});var ae=fe(42978),ft=fe(59301),Ne=fe(47273),ze=0,me=(0,Ne.Z)();function Je(){var Qe;return me?(Qe=ze,ze+=1):Qe="TEST_OR_SSR",Qe}function Ae(Qe){var Se=ft.useState(),de=(0,ae.Z)(Se,2),Me=de[0],ye=de[1];return ft.useEffect(function(){ye("rc_select_".concat(Je()))},[]),Qe||Me}},37463:function(Rt,zt,fe){"use strict";fe.d(zt,{Ac:function(){return Fe},Xo:function(){return Nt},Wx:function(){return un},ZP:function(){return Gn},lk:function(){return wt}});var ae=fe(54476),ft=fe(94480),Ne=fe(20068),ze=fe(33885),me=fe(42978),Je=fe(75931),Ae=fe(76190),Qe=fe(18929),Se=fe(48736),de=fe(59301),Me=fe(92310),ye=fe.n(Me),ht=fe(34280),je=fe(49658),Ie=fe(8654),Re=function(Be){var Pt=Be.className,Et=Be.customizeIcon,He=Be.customizeIconProps,Dt=Be.children,Yt=Be.onMouseDown,tn=Be.onClick,hn=typeof Et=="function"?Et(He):Et;return de.createElement("span",{className:Pt,onMouseDown:function($t){$t.preventDefault(),Yt==null||Yt($t)},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(_t){return"".concat(_t,"-icon")}))},Dt))},De=Re,ot=function(Be,Pt,Et,He,Dt){var Yt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,tn=arguments.length>6?arguments[6]:void 0,hn=arguments.length>7?arguments[7]:void 0,_t=de.useMemo(function(){if((0,Ae.Z)(He)==="object")return He.clearIcon;if(Dt)return Dt},[He,Dt]),$t=de.useMemo(function(){return!!(!Yt&&He&&(Et.length||tn)&&!(hn==="combobox"&&tn===""))},[He,Yt,Et.length,tn,hn]);return{allowClear:$t,clearIcon:de.createElement(De,{className:"".concat(Be,"-clear"),onMouseDown:Pt,customizeIcon:_t},"\xD7")}},lt=de.createContext(null);function wt(){return de.useContext(lt)}function mt(){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],He=Pt[1],Dt=de.useRef(null),Yt=function(){window.clearTimeout(Dt.current)};de.useEffect(function(){return Yt},[]);var tn=function(_t,$t){Yt(),Dt.current=window.setTimeout(function(){He(_t),$t&&$t()},Te)};return[Et,tn,Yt]}function pt(){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(He){(He||Be.current===null)&&(Be.current=He),window.clearTimeout(Pt.current),Pt.current=window.setTimeout(function(){Be.current=null},Te)}return[function(){return Be.current},Et]}function dt(Te,Be,Pt,Et){var He=de.useRef(null);He.current={open:Be,triggerOpen:Pt,customizedTrigger:Et},de.useEffect(function(){function Dt(Yt){var tn;if(!((tn=He.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var hn=Yt.target;hn.shadowRoot&&Yt.composed&&(hn=Yt.composedPath()[0]||hn),He.current.open&&Te().filter(function(_t){return _t}).every(function(_t){return!_t.contains(hn)&&_t!==hn})&&He.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Dt),function(){return window.removeEventListener("mousedown",Dt)}},[])}var rt=fe(10228);function Qt(Te){return Te&&![rt.Z.ESC,rt.Z.SHIFT,rt.Z.BACKSPACE,rt.Z.TAB,rt.Z.WIN_KEY,rt.Z.ALT,rt.Z.META,rt.Z.WIN_KEY_RIGHT,rt.Z.CTRL,rt.Z.SEMICOLON,rt.Z.EQUALS,rt.Z.CAPS_LOCK,rt.Z.CONTEXT_MENU,rt.Z.F1,rt.Z.F2,rt.Z.F3,rt.Z.F4,rt.Z.F5,rt.Z.F6,rt.Z.F7,rt.Z.F8,rt.Z.F9,rt.Z.F10,rt.Z.F11,rt.Z.F12].includes(Te)}var Oe=fe(26112),$e=fe(11780);function Lt(Te,Be,Pt){var Et=(0,ze.Z)((0,ze.Z)({},Te),Pt?Be:{});return Object.keys(Be).forEach(function(He){var Dt=Be[He];typeof Dt=="function"&&(Et[He]=function(){for(var Yt,tn=arguments.length,hn=new Array(tn),_t=0;_t<tn;_t++)hn[_t]=arguments[_t];return Dt.apply(void 0,hn),(Yt=Te[He])===null||Yt===void 0?void 0:Yt.call.apply(Yt,[Te].concat(hn))})}),Et}var Pe=Lt,Ze=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],ke=function(Be,Pt){var Et=Be.prefixCls,He=Be.id,Dt=Be.inputElement,Yt=Be.autoFocus,tn=Be.autoComplete,hn=Be.editable,_t=Be.activeDescendantId,$t=Be.value,At=Be.open,gt=Be.attrs,en=(0,Je.Z)(Be,Ze),vn=Dt||de.createElement("input",null),mn=vn,xn=mn.ref,Wn=mn.props;return(0,Se.Kp)(!("maxLength"in vn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),vn=de.cloneElement(vn,(0,ze.Z)((0,ze.Z)((0,ze.Z)({type:"search"},Pe(en,Wn,!0)),{},{id:He,ref:(0,Ie.sQ)(Pt,xn),autoComplete:tn||"off",autoFocus:Yt,className:ye()("".concat(Et,"-selection-search-input"),Wn==null?void 0:Wn.className),role:"combobox","aria-expanded":At||!1,"aria-haspopup":"listbox","aria-owns":"".concat(He,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(He,"_list"),"aria-activedescendant":At?_t:void 0},gt),{},{value:hn?$t:"",readOnly:!hn,unselectable:hn?null:"on",style:(0,ze.Z)((0,ze.Z)({},Wn.style),{},{opacity:hn?null:0})})),vn},Ue=de.forwardRef(ke),Ht=Ue;function St(Te){return Array.isArray(Te)?Te:Te!==void 0?[Te]:[]}var Ct=typeof window!="undefined"&&window.document&&window.document.documentElement,at=Ct;function pe(Te){return Te!=null}function ue(Te){return!Te&&Te!==0}function _e(Te){return["string","number"].includes((0,Ae.Z)(Te))}function yt(Te){var Be=void 0;return Te&&(_e(Te.title)?Be=Te.title.toString():_e(Te.label)&&(Be=Te.label.toString())),Be}function st(Te,Be){at?de.useLayoutEffect(Te,Be):de.useEffect(Te,Be)}function we(Te){var Be;return(Be=Te.key)!==null&&Be!==void 0?Be:Te.value}var Xe=function(Be){Be.preventDefault(),Be.stopPropagation()},Ge=function(Be){var Pt=Be.id,Et=Be.prefixCls,He=Be.values,Dt=Be.open,Yt=Be.searchValue,tn=Be.autoClearSearchValue,hn=Be.inputRef,_t=Be.placeholder,$t=Be.disabled,At=Be.mode,gt=Be.showSearch,en=Be.autoFocus,vn=Be.autoComplete,mn=Be.activeDescendantId,xn=Be.tabIndex,Wn=Be.removeIcon,Yn=Be.maxTagCount,dn=Be.maxTagTextLength,Gt=Be.maxTagPlaceholder,gn=Gt===void 0?function(yn){return"+ ".concat(yn.length," ...")}:Gt,nn=Be.tagRender,Hn=Be.onToggleOpen,wr=Be.onRemove,Qn=Be.onInputChange,Lr=Be.onInputPaste,Mr=Be.onInputKeyDown,Cr=Be.onInputMouseDown,ir=Be.onInputCompositionStart,Fr=Be.onInputCompositionEnd,gr=Be.onInputBlur,or=de.useRef(null),Er=(0,de.useState)(0),Tr=(0,me.Z)(Er,2),pr=Tr[0],qn=Tr[1],jn=(0,de.useState)(!1),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1],Dr="".concat(Et,"-selection"),Hr=Dt||At==="multiple"&&tn===!1||At==="tags"?Yt:"",Nr=At==="tags"||At==="multiple"&&tn===!1||gt&&(Dt||Vr);st(function(){qn(or.current.scrollWidth)},[Hr]);var _r=function(on,Dn,ar,Vt,It){return de.createElement("span",{title:yt(on),className:ye()("".concat(Dr,"-item"),(0,Ne.Z)({},"".concat(Dr,"-item-disabled"),ar))},de.createElement("span",{className:"".concat(Dr,"-item-content")},Dn),Vt&&de.createElement(De,{className:"".concat(Dr,"-item-remove"),onMouseDown:Xe,onClick:It,customizeIcon:Wn},"\xD7"))},ii=function(on,Dn,ar,Vt,It,rn){var ln=function(sr){Xe(sr),Hn(!Dt)};return de.createElement("span",{onMouseDown:ln},nn({label:Dn,value:on,disabled:ar,closable:Vt,onClose:It,isMaxTag:!!rn}))},Or=function(on){var Dn=on.disabled,ar=on.label,Vt=on.value,It=!$t&&!Dn,rn=ar;if(typeof dn=="number"&&(typeof ar=="string"||typeof ar=="number")){var ln=String(rn);ln.length>dn&&(rn="".concat(ln.slice(0,dn),"..."))}var Mn=function(Vn){Vn&&Vn.stopPropagation(),wr(on)};return typeof nn=="function"?ii(Vt,rn,Dn,It,Mn):_r(on,rn,Dn,It,Mn)},Fn=function(on){if(!He.length)return null;var Dn=typeof gn=="function"?gn(on):gn;return typeof nn=="function"?ii(void 0,Dn,!1,!1,void 0,!0):_r({title:Dn},Dn,!1)},Ot=de.createElement("div",{className:"".concat(Dr,"-search"),style:{width:pr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},de.createElement(Ht,{ref:hn,open:Dt,prefixCls:Et,id:Pt,inputElement:null,disabled:$t,autoFocus:en,autoComplete:vn,editable:Nr,activeDescendantId:mn,value:Hr,onKeyDown:Mr,onMouseDown:Cr,onChange:Qn,onPaste:Lr,onCompositionStart:ir,onCompositionEnd:Fr,onBlur:gr,tabIndex:xn,attrs:(0,Oe.Z)(Be,!0)}),de.createElement("span",{ref:or,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Hr,"\xA0")),Kt=de.createElement($e.Z,{prefixCls:"".concat(Dr,"-overflow"),data:He,renderItem:Or,renderRest:Fn,suffix:Ot,itemKey:we,maxCount:Yn});return de.createElement("span",{className:"".concat(Dr,"-wrap")},Kt,!He.length&&!Hr&&de.createElement("span",{className:"".concat(Dr,"-placeholder")},_t))},Mt=Ge,ut=function(Be){var Pt=Be.inputElement,Et=Be.prefixCls,He=Be.id,Dt=Be.inputRef,Yt=Be.disabled,tn=Be.autoFocus,hn=Be.autoComplete,_t=Be.activeDescendantId,$t=Be.mode,At=Be.open,gt=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],Fr=Cr[1],gr=$t==="combobox",or=gr||mn,Er=gt[0],Tr=xn||"";gr&&Wn&&!ir&&(Tr=Wn),de.useEffect(function(){gr&&Fr(!1)},[gr,Wn]);var pr=$t!=="combobox"&&!At&&!mn?!1:!!Tr,qn=Lr===void 0?yt(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(Ht,{ref:Dt,prefixCls:Et,id:He,open:At,inputElement:Pt,disabled:Yt,autoFocus:tn,autoComplete:hn,editable:or,activeDescendantId:_t,value:Tr,onKeyDown:dn,onMouseDown:Gt,onChange:function(Vr){Fr(!0),gn(Vr)},onPaste:nn,onCompositionStart:Hn,onCompositionEnd:wr,onBlur:Qn,tabIndex:vn,attrs:(0,Oe.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)},Ce=ut,ve=function(Be,Pt){var Et=(0,de.useRef)(null),He=(0,de.useRef)(!1),Dt=Be.prefixCls,Yt=Be.open,tn=Be.mode,hn=Be.showSearch,_t=Be.tokenWithEnter,$t=Be.disabled,At=Be.prefix,gt=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=pt(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&&Yt&&(jn===rt.Z.UP||jn===rt.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),jn===rt.Z.ENTER&&tn==="tags"&&!He.current&&!Yt&&(vn==null||vn(qn.target.value)),!(Br&&!Yt&&~[rt.Z.UP,rt.Z.DOWN,rt.Z.LEFT,rt.Z.RIGHT].indexOf(jn))&&Qt(jn)&&mn(!0)},wr=function(){nn(!0)},Qn=(0,de.useRef)(null),Lr=function(qn){en(qn,!0,He.current)!==!1&&mn(!0)},Mr=function(){He.current=!0},Cr=function(qn){He.current=!1,tn!=="combobox"&&Lr(qn.target.value)},ir=function(qn){var jn=qn.target.value;if(_t&&Qn.current&&/[\r\n]/.test(Qn.current)){var Br=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");jn=jn.replace(Br,Qn.current)}Qn.current=null,Lr(jn)},Fr=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"&&$t)&&qn.preventDefault(),(tn!=="combobox"&&(!hn||!jn)||!Yt)&&(Yt&&gt!==!1&&en("",!0,!1),mn())},Er={inputRef:Et,onInputKeyDown:Hn,onInputMouseDown:wr,onInputChange:ir,onInputPaste:Fr,onInputCompositionStart:Mr,onInputCompositionEnd:Cr,onInputBlur:Wn},Tr=tn==="multiple"||tn==="tags"?de.createElement(Mt,(0,ae.Z)({},Be,Er)):de.createElement(Ce,(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),Tr)},Le=de.forwardRef(ve),Ve=Le,xe=fe(65030),We=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ke=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,He=Be.disabled,Dt=Be.visible,Yt=Be.children,tn=Be.popupElement,hn=Be.animation,_t=Be.transitionName,$t=Be.dropdownStyle,At=Be.dropdownClassName,gt=Be.direction,en=gt===void 0?"ltr":gt,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,Je.Z)(Be,We),Qn="".concat(Et,"-dropdown"),Lr=tn;Wn&&(Lr=Wn(tn));var Mr=de.useMemo(function(){return mn||Ke(xn)},[mn,xn]),Cr=hn?"".concat(Qn,"-").concat(hn):_t,ir=typeof xn=="number",Fr=de.useMemo(function(){return ir?null:xn===!1?"minWidth":"width"},[xn,ir]),gr=$t;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 Tr;return(Tr=or.current)===null||Tr===void 0?void 0:Tr.popupElement}}}),de.createElement(xe.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:Fr,popupAlign:Yn,popupVisible:Dt,getPopupContainer:dn,popupClassName:ye()(At,(0,Ne.Z)({},"".concat(Qn,"-empty"),Gt)),popupStyle:gr,getTriggerDOMNode:gn,onPopupVisibleChange:nn}),Yt)},nt=de.forwardRef(et),Ye=nt,bt=fe(66712);function kt(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 Wt(Te,Be){var Pt=Te||{},Et=Pt.label,He=Pt.value,Dt=Pt.options,Yt=Pt.groupLabel,tn=Et||(Be?"children":"label");return{label:tn,value:He||"value",options:Dt||"options",groupLabel:Yt||tn}}function se(Te){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=Be.fieldNames,Et=Be.childrenAsData,He=[],Dt=Wt(Pt,!1),Yt=Dt.label,tn=Dt.value,hn=Dt.options,_t=Dt.groupLabel;function $t(At,gt){Array.isArray(At)&&At.forEach(function(en){if(gt||!(hn in en)){var vn=en[tn];He.push({key:kt(en,He.length),groupOption:gt,data:en,label:en[Yt],value:vn})}else{var mn=en[_t];mn===void 0&&Et&&(mn=en.label),He.push({key:kt(en,He.length),group:!0,data:en,label:mn}),$t(en[hn],!0)}})}return $t(Te,!1),He}function te(Te){var Be=(0,ze.Z)({},Te);return"props"in Be||Object.defineProperty(Be,"props",{get:function(){return(0,Se.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Be}}),Be}var ee=function(Be,Pt,Et){if(!Pt||!Pt.length)return null;var He=!1,Dt=function tn(hn,_t){var $t=(0,bt.Z)(_t),At=$t[0],gt=$t.slice(1);if(!At)return[hn];var en=hn.split(At);return He=He||en.length>1,en.reduce(function(vn,mn){return[].concat((0,ft.Z)(vn),(0,ft.Z)(tn(mn,gt)))},[]).filter(Boolean)},Yt=Dt(Be,Pt);return He?typeof Et!="undefined"?Yt.slice(0,Et):Yt: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(He){var Dt=He.label,Yt=He.value;return["number","string"].includes((0,Ae.Z)(Dt))?Dt:Yt}).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"],ct=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],vt=function(Be){return Be==="tags"||Be==="multiple"},xt=de.forwardRef(function(Te,Be){var Pt,Et=Te.id,He=Te.prefixCls,Dt=Te.className,Yt=Te.showSearch,tn=Te.tagRender,hn=Te.direction,_t=Te.omitDomProps,$t=Te.displayValues,At=Te.onDisplayValuesChange,gt=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,Fr=Te.onSearchSplit,gr=Te.tokenSeparators,or=Te.allowClear,Er=Te.prefix,Tr=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,Nr=Te.dropdownAlign,_r=Te.placement,ii=Te.builtinPlacements,Or=Te.getPopupContainer,Fn=Te.showAction,Ot=Fn===void 0?[]:Fn,Kt=Te.onFocus,yn=Te.onBlur,on=Te.onKeyUp,Dn=Te.onKeyDown,ar=Te.onMouseDown,Vt=(0,Je.Z)(Te,ge),It=vt(xn),rn=(Yt!==void 0?Yt:It)||xn==="combobox",ln=(0,ze.Z)({},Vt);ct.forEach(function(lr){delete ln[lr]}),_t==null||_t.forEach(function(lr){delete ln[lr]});var Mn=de.useState(!1),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1];de.useEffect(function(){yr((0,je.Z)())},[]);var br=de.useRef(null),Sr=de.useRef(null),zr=de.useRef(null),Ar=de.useRef(null),Wr=de.useRef(null),ei=de.useRef(!1),Li=mt(),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=Ar.current)===null||lr===void 0?void 0:lr.focus,blur:(zn=Ar.current)===null||zn===void 0?void 0:zn.blur,scrollTo:function(fi){var Yr;return(Yr=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=$t[0])===null||lr===void 0?void 0:lr.value;return typeof zn=="string"||typeof zn=="number"?String(zn):""},[Mr,xn,$t]),to=xn==="combobox"&&typeof dn=="function"&&dn()||null,ti=typeof Gt=="function"&&Gt(),Ni=(0,Ie.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],Fi=Ji[1];(0,ht.Z)(function(){Fi(!0)},[]);var Zr=(0,Qe.Z)(!1,{defaultValue:nn,value:gn}),Wi=(0,me.Z)(Zr,2),so=Wi[0],_i=Wi[1],Qr=mi?so:!1,xo=!vn&&gt;(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||(_i(zn),Qr!==zn&&(Hn==null||Hn(zn)))},[Wn,Qr,_i,Hn]),On=de.useMemo(function(){return(gr||[]).some(function(lr){return[`
`,`\r
`].includes(lr)})},[gr]),Pn=de.useContext(ce)||{},Nn=Pn.maxCount,vr=Pn.rawValues,Ir=function(zn,ci,fi){if(!(It&&Jt(Nn)&&(vr==null?void 0:vr.size)>=Nn)){var Yr=!0,ni=zn;Qn==null||Qn(null);var Vi=ee(zn,gr,Jt(Nn)?Nn-vr.size:void 0),Zi=fi?null:Vi;return xn!=="combobox"&&Zi&&(ni="",Fr==null||Fr(Zi),Ln(!1),Yr=!1),ir&&fr!==ni&&ir(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(zn){!zn||!zn.trim()||ir(zn,{source:"submit"})};de.useEffect(function(){!Qr&&!It&&xn!=="combobox"&&Ir("",!1,!1)},[Qr]),de.useEffect(function(){so&&Wn&&_i(!1),Wn&&!ei.current&&vi(!1)},[Wn]);var gi=pt(),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&&It&&!fr&&$t.length){for(var ni=(0,ft.Z)($t),Vi=null,Zi=ni.length-1;Zi>=0;Zi-=1){var ro=ni[Zi];if(!ro.disabled){ni.splice(Zi,1),Vi=ro;break}}Vi&&At(ni,{type:"remove",values:[Vi]})}for(var Ti=arguments.length,Ai=new Array(Ti>1?Ti-1:0),Ui=1;Ui<Ti;Ui++)Ai[Ui-1]=arguments[Ui];if(Qr&&(!Yr||!Qi.current)){var co;Yr&&(Qi.current=!0),(co=Wr.current)===null||co===void 0||co.onKeyDown.apply(co,[zn].concat(Ai))}Dn==null||Dn.apply(void 0,[zn].concat(Ai))},qi=function(zn){for(var ci=arguments.length,fi=new Array(ci>1?ci-1:0),Yr=1;Yr<ci;Yr++)fi[Yr-1]=arguments[Yr];if(Qr){var ni;(ni=Wr.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[zn].concat(fi))}zn.key==="Enter"&&(Qi.current=!1),on==null||on.apply(void 0,[zn].concat(fi))},no=function(zn){var ci=$t.filter(function(fi){return fi!==zn});At(ci,{type:"remove",values:[zn]})},ji=function(){Qi.current=!1},Ao=de.useRef(!1),ja=function(){vi(!0),Wn||(Kt&&!Ao.current&&Kt.apply(void 0,arguments),Ot.includes("focus")&&Ln(!0)),Ao.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Ao.current=!1,ei.current=!1,Ln(!1)}),!Wn&&(fr&&(xn==="tags"?ir(fr,{source:"submit"}):xn==="multiple"&&ir("",{source:"blur"})),yn&&yn.apply(void 0,arguments))},$i=[];de.useEffect(function(){return function(){$i.forEach(function(lr){return clearTimeout(lr)}),$i.splice(0,$i.length)}},[]);var uo=function(zn){var ci,fi=zn.target,Yr=(ci=zr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Yr&&Yr.contains(fi)){var ni=setTimeout(function(){var Ti=$i.indexOf(ni);if(Ti!==-1&&$i.splice(Ti,1),Xi(),!Vn&&!Yr.contains(document.activeElement)){var Ai;(Ai=Ar.current)===null||Ai===void 0||Ai.focus()}});$i.push(ni)}for(var Vi=arguments.length,Zi=new Array(Vi>1?Vi-1:0),ro=1;ro<Vi;ro++)Zi[ro-1]=arguments[ro];ar==null||ar.apply(void 0,[zn].concat(Zi))},zi=de.useState({}),ba=(0,me.Z)(zi,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(zn){Ln(zn)}),dt(function(){var lr;return[br.current,(lr=zr.current)===null||lr===void 0?void 0:lr.getPopupElement()]},lo,Ln,!!ti);var Ua=de.useMemo(function(){return(0,ze.Z)((0,ze.Z)({},Te),{},{notFoundContent:vn,open:Qr,triggerOpen:lo,id:Et,showSearch:rn,multiple:It,toggleOpen:Ln})},[Te,vn,lo,Qr,Et,rn,It,Ln]),Ko=!!Tr||Yn,Yo;Ko&&(Yo=de.createElement(De,{className:ye()("".concat(He,"-arrow"),(0,Ne.Z)({},"".concat(He,"-arrow-loading"),Yn)),customizeIcon:Tr,customizeIconProps:{loading:Yn,searchValue:fr,open:Qr,focused:xi,showSearch:rn}}));var wo=function(){var zn;mn==null||mn(),(zn=Ar.current)===null||zn===void 0||zn.focus(),At([],{type:"clear",values:$t}),Ir("",!1,!1)},Xo=ot(He,wo,$t,or,pr,Wn,fr,xn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Po=de.createElement(qn,{ref:Wr}),Sa=ye()(He,Dt,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(He,"-focused"),xi),"".concat(He,"-multiple"),It),"".concat(He,"-single"),!It),"".concat(He,"-allow-clear"),or),"".concat(He,"-show-arrow"),Ko),"".concat(He,"-disabled"),Wn),"".concat(He,"-loading"),Yn),"".concat(He,"-open"),Qr),"".concat(He,"-customize-input"),to),"".concat(He,"-show-search"),rn)),Bo=de.createElement(Ye,{ref:zr,disabled:Wn,prefixCls:He,visible:lo,popupElement:Po,animation:jn,transitionName:Br,dropdownStyle:Vr,dropdownClassName:Jr,direction:hn,dropdownMatchSelectWidth:Dr,dropdownRender:Hr,dropdownAlign:Nr,placement:_r,builtinPlacements:ii,getPopupContainer:Or,empty:gt,getTriggerDOMNode:function(zn){return Sr.current||zn},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?de.cloneElement(ti,{ref:Ni}):de.createElement(Ve,(0,ae.Z)({},Te,{domRef:Sr,prefixCls:He,inputElement:to,ref:Ar,id:Et,prefix:Er,showSearch:rn,autoClearSearchValue:Cr,mode:xn,activeDescendantId:Lr,tagRender:tn,values:$t,open:Qr,onToggleOpen:Ln,activeValue:wr,searchValue:fr,onSearch:Ir,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:On,onInputBlur:ji}))),wi;return ti?wi=Bo:wi=de.createElement("div",(0,ae.Z)({className:Sa},ln,{ref:br,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:ja,onBlur:ya}),de.createElement(ne,{visible:xi&&!Qr,values:$t}),Bo,Yo,Ca&&Jo),de.createElement(lt.Provider,{value:Ua},wi)}),Fe=xt,Zt=function(){return null};Zt.isSelectOptGroup=!0;var Nt=Zt,Ft=function(){return null};Ft.isSelectOption=!0;var un=Ft,kn=fe(80547),cn=fe(2738),wn=fe(48911);function $n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Zn=["disabled","title","children","style","className"];function mr(Te){return typeof Te=="string"||typeof Te=="number"}var er=function(Be,Pt){var Et=wt(),He=Et.prefixCls,Dt=Et.id,Yt=Et.open,tn=Et.multiple,hn=Et.mode,_t=Et.searchValue,$t=Et.toggleOpen,At=Et.notFoundContent,gt=Et.onPopupScroll,en=de.useContext(ce),vn=en.maxCount,mn=en.flattenOptions,xn=en.onActiveValue,Wn=en.defaultActiveFirstOption,Yn=en.onSelect,dn=en.menuItemSelectedIcon,Gt=en.rawValues,gn=en.fieldNames,nn=en.virtual,Hn=en.direction,wr=en.listHeight,Qn=en.listItemHeight,Lr=en.optionRender,Mr="".concat(He,"-item"),Cr=(0,kn.Z)(function(){return mn},[Yt,mn],function(Fn,Ot){return Ot[0]&&Fn[1]!==Ot[1]}),ir=de.useRef(null),Fr=de.useMemo(function(){return tn&&Jt(vn)&&(Gt==null?void 0:Gt.size)>=vn},[tn,vn,Gt==null?void 0:Gt.size]),gr=function(Ot){Ot.preventDefault()},or=function(Ot){var Kt;(Kt=ir.current)===null||Kt===void 0||Kt.scrollTo(typeof Ot=="number"?{index:Ot}:Ot)},Er=de.useCallback(function(Fn){return hn==="combobox"?!1:Gt.has(Fn)},[hn,(0,ft.Z)(Gt).toString(),Gt.size]),Tr=function(Ot){for(var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,yn=Cr.length,on=0;on<yn;on+=1){var Dn=(Ot+on*Kt+yn)%yn,ar=Cr[Dn]||{},Vt=ar.group,It=ar.data;if(!Vt&&!(It!=null&&It.disabled)&&(Er(It.value)||!Fr))return Dn}return-1},pr=de.useState(function(){return Tr(0)}),qn=(0,me.Z)(pr,2),jn=qn[0],Br=qn[1],Vr=function(Ot){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Br(Ot);var yn={source:Kt?"keyboard":"mouse"},on=Cr[Ot];if(!on){xn(null,-1,yn);return}xn(on.value,Ot,yn)};(0,de.useEffect)(function(){Vr(Wn!==!1?Tr(0):-1)},[Cr.length,_t]);var Jr=de.useCallback(function(Fn){return hn==="combobox"?String(Fn).toLowerCase()===_t.toLowerCase():Gt.has(Fn)},[hn,_t,(0,ft.Z)(Gt).toString(),Gt.size]);(0,de.useEffect)(function(){var Fn=setTimeout(function(){if(!tn&&Yt&&Gt.size===1){var Kt=Array.from(Gt)[0],yn=Cr.findIndex(function(on){var Dn=on.data;return _t?String(Dn.value).startsWith(_t):Dn.value===Kt});yn!==-1&&(Vr(yn),or(yn))}});if(Yt){var Ot;(Ot=ir.current)===null||Ot===void 0||Ot.scrollTo(void 0)}return function(){return clearTimeout(Fn)}},[Yt,_t]);var Dr=function(Ot){Ot!==void 0&&Yn(Ot,{selected:!Gt.has(Ot)}),tn||$t(!1)};if(de.useImperativeHandle(Pt,function(){return{onKeyDown:function(Ot){var Kt=Ot.which,yn=Ot.ctrlKey;switch(Kt){case rt.Z.N:case rt.Z.P:case rt.Z.UP:case rt.Z.DOWN:{var on=0;if(Kt===rt.Z.UP?on=-1:Kt===rt.Z.DOWN?on=1:$n()&&yn&&(Kt===rt.Z.N?on=1:Kt===rt.Z.P&&(on=-1)),on!==0){var Dn=Tr(jn+on,on);or(Dn),Vr(Dn,!0)}break}case rt.Z.TAB:case rt.Z.ENTER:{var ar,Vt=Cr[jn];Vt&&!(Vt!=null&&(ar=Vt.data)!==null&&ar!==void 0&&ar.disabled)&&!Fr?Dr(Vt.value):Dr(void 0),Yt&&Ot.preventDefault();break}case rt.Z.ESC:$t(!1),Yt&&Ot.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ot){or(Ot)}}}),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(Fn){return gn[Fn]}),Nr=function(Ot){return Ot.label};function _r(Fn,Ot){var Kt=Fn.group;return{role:Kt?"presentation":"option",id:"".concat(Dt,"_list_").concat(Ot)}}var ii=function(Ot){var Kt=Cr[Ot];if(!Kt)return null;var yn=Kt.data||{},on=yn.value,Dn=Kt.group,ar=(0,Oe.Z)(yn,!0),Vt=Nr(Kt);return Kt?de.createElement("div",(0,ae.Z)({"aria-label":typeof Vt=="string"&&!Dn?Vt:null},ar,{key:Ot},_r(Kt,Ot),{"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:gt,virtual:nn,direction:Hn,innerProps:nn?null:Or},function(Fn,Ot){var Kt=Fn.group,yn=Fn.groupOption,on=Fn.data,Dn=Fn.label,ar=Fn.value,Vt=on.key;if(Kt){var It,rn=(It=on.title)!==null&&It!==void 0?It:mr(Dn)?Dn.toString():void 0;return de.createElement("div",{className:ye()(Mr,"".concat(Mr,"-group"),on.className),title:rn},Dn!==void 0?Dn:Vt)}var ln=on.disabled,Mn=on.title,sr=on.children,Vn=on.style,yr=on.className,br=(0,Je.Z)(on,Zn),Sr=(0,cn.Z)(br,Hr),zr=Er(ar),Ar=ln||!zr&&Fr,Wr="".concat(Mr,"-option"),ei=ye()(Mr,Wr,yr,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(Wr,"-grouped"),yn),"".concat(Wr,"-active"),jn===Ot&&!Ar),"".concat(Wr,"-disabled"),Ar),"".concat(Wr,"-selected"),zr)),Li=Nr(Fn),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,Oe.Z)(Sr),nn?{}:_r(Fn,Ot),{"aria-selected":Jr(ar),className:ei,title:vi,onMouseMove:function(){jn===Ot||Ar||Vr(Ot)},onClick:function(){Ar||Dr(ar)},style:Vn}),de.createElement("div",{className:"".concat(Wr,"-content")},typeof Lr=="function"?Lr(Fn,{index:Ot}):xi),de.isValidElement(dn)||zr,Oi&&de.createElement(De,{className:"".concat(Mr,"-option-state"),customizeIcon:dn,customizeIconProps:{value:ar,disabled:Ar,isSelected:zr}},zr?"\u2713":null))}))},ur=de.forwardRef(er),nr=ur,In=function(Te,Be){var Pt=de.useRef({values:new Map,options:new Map}),Et=de.useMemo(function(){var Dt=Pt.current,Yt=Dt.values,tn=Dt.options,hn=Te.map(function(At){if(At.label===void 0){var gt;return(0,ze.Z)((0,ze.Z)({},At),{},{label:(gt=Yt.get(At.value))===null||gt===void 0?void 0:gt.label})}return At}),_t=new Map,$t=new Map;return hn.forEach(function(At){_t.set(At.value,At),$t.set(At.value,Be.get(At.value)||tn.get(At.value))}),Pt.current.values=_t,Pt.current.options=$t,hn},[Te,Be]),He=de.useCallback(function(Dt){return Be.get(Dt)||Pt.current.options.get(Dt)},[Be]);return[Et,He]};function rr(Te,Be){return St(Te).join("").toUpperCase().includes(Be)}var cr=function(Te,Be,Pt,Et,He){return de.useMemo(function(){if(!Pt||Et===!1)return Te;var Dt=Be.options,Yt=Be.label,tn=Be.value,hn=[],_t=typeof Et=="function",$t=Pt.toUpperCase(),At=_t?Et:function(en,vn){return He?rr(vn[He],$t):vn[Dt]?rr(vn[Yt!=="children"?Yt:"label"],$t):rr(vn[tn],$t)},gt=_t?function(en){return te(en)}:function(en){return en};return Te.forEach(function(en){if(en[Dt]){var vn=At(Pt,gt(en));if(vn)hn.push(en);else{var mn=en[Dt].filter(function(xn){return At(Pt,gt(xn))});mn.length&&hn.push((0,ze.Z)((0,ze.Z)({},en),{},(0,Ne.Z)({},Dt,mn)))}return}At(Pt,gt(en))&&hn.push(en)}),hn},[Te,Et,He,Pt,Be])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],xr=["children"];function Ut(Te){var Be=Te,Pt=Be.key,Et=Be.props,He=Et.children,Dt=Et.value,Yt=(0,Je.Z)(Et,Kn);return(0,ze.Z)({key:Pt,value:Dt!==void 0?Dt:Pt,children:He},Yt)}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 He=Pt,Dt=He.type.isSelectOptGroup,Yt=He.key,tn=He.props,hn=tn.children,_t=(0,Je.Z)(tn,xr);return Be||!Dt?Ut(Pt):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(Yt===null?Et:Yt,"__"),label:Yt},_t),{},{options:pn(hn)})}).filter(function(Pt){return Pt})}var En=function(Be,Pt,Et,He,Dt){return de.useMemo(function(){var Yt=Be,tn=!Be;tn&&(Yt=pn(Pt));var hn=new Map,_t=new Map,$t=function(en,vn,mn){mn&&typeof mn=="string"&&en.set(vn[mn],vn)},At=function gt(en){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn=0;mn<en.length;mn+=1){var xn=en[mn];!xn[Et.options]||vn?(hn.set(xn[Et.value],xn),$t(_t,xn,Et.label),$t(_t,xn,He),$t(_t,xn,Dt)):gt(xn[Et.options],!0)}};return At(Yt),{options:Yt,valueOptions:hn,labelOptions:_t}},[Be,Pt,Et,He,Dt])},Tn=En;function Jn(Te){var Be=de.useRef();Be.current=Te;var Pt=de.useCallback(function(){return Be.current.apply(Be,arguments)},[]);return Pt}function tr(Te){var Be=Te.mode,Pt=Te.options,Et=Te.children,He=Te.backfill,Dt=Te.allowClear,Yt=Te.placeholder,tn=Te.getInputElement,hn=Te.showSearch,_t=Te.onSearch,$t=Te.defaultOpen,At=Te.autoFocus,gt=Te.labelInValue,en=Te.value,vn=Te.inputValue,mn=Te.optionLabelProp,xn=isMultiple(Be),Wn=hn!==void 0?hn:xn||Be==="combobox",Yn=Pt||convertChildrenToData(Et);if(warning(Be!=="tags"||Yn.every(function(nn){return!nn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Be==="tags"||Be==="combobox"){var dn=Yn.some(function(nn){return nn.options?nn.options.some(function(Hn){return typeof("value"in Hn?Hn.value:Hn.key)=="number"}):typeof("value"in nn?nn.value:nn.key)=="number"});warning(!dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Be!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Be==="combobox"||!He,"`backfill` only works with `combobox` mode."),warning(Be==="combobox"||!tn,"`getInputElement` only work with `combobox` mode."),noteOnce(Be!=="combobox"||!tn||!Dt||!Yt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_t&&!Wn&&Be!=="combobox"&&Be!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!$t||At,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),en!=null){var Gt=toArray(en);warning(!gt||Gt.every(function(nn){return _typeof(nn)==="object"&&("key"in nn||"value"in nn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!xn||Array.isArray(en),"`value` should be array when `mode` is `multiple` or `tags`")}if(Et){var gn=null;toNodeArray(Et).some(function(nn){if(!React.isValidElement(nn)||!nn.type)return!1;var Hn=nn,wr=Hn.type;if(wr.isSelectOption)return!1;if(wr.isSelectOptGroup){var Qn=toNodeArray(nn.props.children).every(function(Lr){return!React.isValidElement(Lr)||!nn.type||Lr.type.isSelectOption?!0:(gn=Lr.type,!1)});return!Qn}return gn=wr,!0}),gn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(gn.displayName||gn.name||gn,"`.")),warning(vn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function dr(Te,Be){if(Te){var Pt=function Et(He){for(var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Yt=0;Yt<He.length;Yt++){var tn=He[Yt];if(tn[Be==null?void 0:Be.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Dt&&Array.isArray(tn[Be==null?void 0:Be.options])&&Et(tn[Be==null?void 0:Be.options],!0))break}};Pt(Te)}}var _n=null,Rn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],hr=["inputValue"];function jt(Te){return!Te||(0,Ae.Z)(Te)!=="object"}var it=de.forwardRef(function(Te,Be){var Pt=Te.id,Et=Te.mode,He=Te.prefixCls,Dt=He===void 0?"rc-select":He,Yt=Te.backfill,tn=Te.fieldNames,hn=Te.inputValue,_t=Te.searchValue,$t=Te.onSearch,At=Te.autoClearSearchValue,gt=At===void 0?!0:At,en=Te.onSelect,vn=Te.onDeselect,mn=Te.dropdownMatchSelectWidth,xn=mn===void 0?!0:mn,Wn=Te.filterOption,Yn=Te.filterSort,dn=Te.optionFilterProp,Gt=Te.optionLabelProp,gn=Te.options,nn=Te.optionRender,Hn=Te.children,wr=Te.defaultActiveFirstOption,Qn=Te.menuItemSelectedIcon,Lr=Te.virtual,Mr=Te.direction,Cr=Te.listHeight,ir=Cr===void 0?200:Cr,Fr=Te.listItemHeight,gr=Fr===void 0?20:Fr,or=Te.labelRender,Er=Te.value,Tr=Te.defaultValue,pr=Te.labelInValue,qn=Te.onChange,jn=Te.maxCount,Br=(0,Je.Z)(Te,Rn),Vr=(0,Bn.ZP)(Pt),Jr=vt(Et),Dr=!!(!gn&&Hn),Hr=de.useMemo(function(){return Wn===void 0&&Et==="combobox"?!1:Wn},[Wn,Et]),Nr=de.useMemo(function(){return Wt(tn,Dr)},[JSON.stringify(tn),Dr]),_r=(0,Qe.Z)("",{value:_t!==void 0?_t:hn,postState:function(On){return On||""}}),ii=(0,me.Z)(_r,2),Or=ii[0],Fn=ii[1],Ot=Tn(gn,Hn,Nr,dn,Gt),Kt=Ot.valueOptions,yn=Ot.labelOptions,on=Ot.options,Dn=de.useCallback(function(Ln){var On=St(Ln);return On.map(function(Pn){var Nn,vr,Ir,Gi,gi;if(jt(Pn))Nn=Pn;else{var ui;Ir=Pn.key,vr=Pn.label,Nn=(ui=Pn.value)!==null&&ui!==void 0?ui:Ir}var Kr=Kt.get(Nn);if(Kr){var Hi;if(vr===void 0&&(vr=Kr==null?void 0:Kr[Gt||Nr.label]),Ir===void 0&&(Ir=(Hi=Kr==null?void 0:Kr.key)!==null&&Hi!==void 0?Hi:Nn),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:vr,value:Nn,key:Ir,disabled:Gi,title:gi}})},[Nr,Gt,Kt]),ar=(0,Qe.Z)(Tr,{value:Er}),Vt=(0,me.Z)(ar,2),It=Vt[0],rn=Vt[1],ln=de.useMemo(function(){var Ln,On=Jr&&It===null?[]:It,Pn=Dn(On);return Et==="combobox"&&ue((Ln=Pn[0])===null||Ln===void 0?void 0:Ln.value)?[]:Pn},[It,Dn,Et,Jr]),Mn=In(ln,Kt),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1],br=de.useMemo(function(){if(!Et&&Vn.length===1){var Ln=Vn[0];if(Ln.value===null&&(Ln.label===null||Ln.label===void 0))return[]}return Vn.map(function(On){var Pn;return(0,ze.Z)((0,ze.Z)({},On),{},{label:(Pn=typeof or=="function"?or(On):On.label)!==null&&Pn!==void 0?Pn:On.value})})},[Et,Vn,or]),Sr=de.useMemo(function(){return new Set(Vn.map(function(Ln){return Ln.value}))},[Vn]);de.useEffect(function(){if(Et==="combobox"){var Ln,On=(Ln=Vn[0])===null||Ln===void 0?void 0:Ln.value;Fn(pe(On)?String(On):"")}},[Vn]);var zr=Jn(function(Ln,On){var Pn=On!=null?On:Ln;return(0,Ne.Z)((0,Ne.Z)({},Nr.value,Ln),Nr.label,Pn)}),Ar=de.useMemo(function(){if(Et!=="tags")return on;var Ln=(0,ft.Z)(on),On=function(Nn){return Kt.has(Nn)};return(0,ft.Z)(Vn).sort(function(Pn,Nn){return Pn.value<Nn.value?-1:1}).forEach(function(Pn){var Nn=Pn.value;On(Nn)||Ln.push(zr(Nn,Pn.label))}),Ln},[zr,on,Kt,Vn,Et]),Wr=cr(Ar,Nr,Or,Hr,dn),ei=de.useMemo(function(){return Et!=="tags"||!Or||Wr.some(function(Ln){return Ln[dn||"value"]===Or})||Wr.some(function(Ln){return Ln[Nr.value]===Or})?Wr:[zr(Or)].concat((0,ft.Z)(Wr))},[zr,dn,Et,Wr,Or,Nr]),Li=function Ln(On){var Pn=(0,ft.Z)(On).sort(function(Nn,vr){return Yn(Nn,vr,{searchValue:Or})});return Pn.map(function(Nn){return Array.isArray(Nn.options)?(0,ze.Z)((0,ze.Z)({},Nn),{},{options:Nn.options.length>0?Ln(Nn.options):Nn.options}):Nn})},Oi=de.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Or]),xi=de.useMemo(function(){return se(Oi,{fieldNames:Nr,childrenAsData:Dr})},[Oi,Nr,Dr]),vi=function(On){var Pn=Dn(On);if(rn(Pn),qn&&(Pn.length!==Vn.length||Pn.some(function(Ir,Gi){var gi;return((gi=Vn[Gi])===null||gi===void 0?void 0:gi.value)!==(Ir==null?void 0:Ir.value)}))){var Nn=pr?Pn:Pn.map(function(Ir){return Ir.value}),vr=Pn.map(function(Ir){return te(yr(Ir.value))});qn(Jr?Nn:Nn[0],Jr?vr:vr[0])}},Xi=de.useState(null),fr=(0,me.Z)(Xi,2),to=fr[0],ti=fr[1],Ni=de.useState(0),ao=(0,me.Z)(Ni,2),Ji=ao[0],mi=ao[1],Fi=wr!==void 0?wr:Et!=="combobox",Zr=de.useCallback(function(Ln,On){var Pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nn=Pn.source,vr=Nn===void 0?"keyboard":Nn;mi(On),Yt&&Et==="combobox"&&Ln!==null&&vr==="keyboard"&&ti(String(Ln))},[Yt,Et]),Wi=function(On,Pn,Nn){var vr=function(){var no,ji=yr(On);return[pr?{label:ji==null?void 0:ji[Nr.label],value:On,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:On}:On,te(ji)]};if(Pn&&en){var Ir=vr(),Gi=(0,me.Z)(Ir,2),gi=Gi[0],ui=Gi[1];en(gi,ui)}else if(!Pn&&vn&&Nn!=="clear"){var Kr=vr(),Hi=(0,me.Z)(Kr,2),Qi=Hi[0],Mi=Hi[1];vn(Qi,Mi)}},so=Jn(function(Ln,On){var Pn,Nn=Jr?On.selected:!0;Nn?Pn=Jr?[].concat((0,ft.Z)(Vn),[Ln]):[Ln]:Pn=Vn.filter(function(vr){return vr.value!==Ln}),vi(Pn),Wi(Ln,Nn),Et==="combobox"?ti(""):(!vt||gt)&&(Fn(""),ti(""))}),_i=function(On,Pn){vi(On);var Nn=Pn.type,vr=Pn.values;(Nn==="remove"||Nn==="clear")&&vr.forEach(function(Ir){Wi(Ir.value,!1,Nn)})},Qr=function(On,Pn){if(Fn(On),ti(null),Pn.source==="submit"){var Nn=(On||"").trim();if(Nn){var vr=Array.from(new Set([].concat((0,ft.Z)(Sr),[Nn])));vi(vr),Wi(Nn,!0),Fn("")}return}Pn.source!=="blur"&&(Et==="combobox"&&vi(On),$t==null||$t(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 Nn=Array.from(new Set([].concat((0,ft.Z)(Sr),(0,ft.Z)(Pn))));vi(Nn),Nn.forEach(function(vr){Wi(vr,!0)})},lo=de.useMemo(function(){var Ln=Lr!==!1&&xn!==!1;return(0,ze.Z)((0,ze.Z)({},Ot),{},{flattenOptions:xi,onActiveValue:Zr,defaultActiveFirstOption:Fi,onSelect:so,menuItemSelectedIcon:Qn,rawValues:Sr,fieldNames:Nr,virtual:Ln,direction:Mr,listHeight:ir,listItemHeight:gr,childrenAsData:Dr,maxCount:jn,optionRender:nn})},[jn,Ot,xi,Zr,Fi,so,Qn,Sr,Nr,Lr,xn,Mr,ir,gr,Dr,nn]);return de.createElement(ce.Provider,{value:lo},de.createElement(Fe,(0,ae.Z)({},Br,{id:Vr,prefixCls:Dt,ref:Be,omitDomProps:hr,mode:Et,displayValues:br,onDisplayValuesChange:_i,direction:Mr,searchValue:Or,onSearch:Qr,autoClearSearchValue:gt,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:nr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),qt=it;qt.Option=un,qt.OptGroup=Nt;var Cn=qt,Gn=Cn},63158:function(Rt,zt,fe){"use strict";var ae=fe(54476),ft=fe(20068),Ne=fe(42978),ze=fe(75931),me=fe(59301),Je=fe(92310),Ae=fe.n(Je),Qe=fe(18929),Se=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Me=me.forwardRef(function(ye,ht){var je,Ie=ye.prefixCls,Re=Ie===void 0?"rc-switch":Ie,De=ye.className,ot=ye.checked,lt=ye.defaultChecked,wt=ye.disabled,mt=ye.loadingIcon,pt=ye.checkedChildren,dt=ye.unCheckedChildren,rt=ye.onClick,Qt=ye.onChange,Oe=ye.onKeyDown,$e=(0,ze.Z)(ye,de),Lt=(0,Qe.Z)(!1,{value:ot,defaultValue:lt}),Pe=(0,Ne.Z)(Lt,2),Ze=Pe[0],ke=Pe[1];function Ue(at,pe){var ue=Ze;return wt||(ue=at,ke(ue),Qt==null||Qt(ue,pe)),ue}function Ht(at){at.which===Se.Z.LEFT?Ue(!1,at):at.which===Se.Z.RIGHT&&Ue(!0,at),Oe==null||Oe(at)}function St(at){var pe=Ue(!Ze,at);rt==null||rt(pe,at)}var Ct=Ae()(Re,De,(je={},(0,ft.Z)(je,"".concat(Re,"-checked"),Ze),(0,ft.Z)(je,"".concat(Re,"-disabled"),wt),je));return me.createElement("button",(0,ae.Z)({},$e,{type:"button",role:"switch","aria-checked":Ze,disabled:wt,className:Ct,ref:ht,onKeyDown:Ht,onClick:St}),mt,me.createElement("span",{className:"".concat(Re,"-inner")},me.createElement("span",{className:"".concat(Re,"-inner-checked")},pt),me.createElement("span",{className:"".concat(Re,"-inner-unchecked")},dt)))});Me.displayName="Switch",zt.Z=Me},22711:function(Rt,zt,fe){"use strict";fe.r(zt),fe.d(zt,{ResizableTextArea:function(){return Pe},default:function(){return Ht}});var ae=fe(54476),ft=fe(20068),Ne=fe(33885),ze=fe(94480),me=fe(42978),Je=fe(75931),Ae=fe(92310),Qe=fe.n(Ae),Se=fe(36901),de=fe(66003),Me=fe(30292),ye=fe(18929),ht=fe(59301),je=fe(76190),Ie=fe(29301),Re=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;
`,lt=["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"],wt={},mt;function pt(St){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,at=St.getAttribute("id")||St.getAttribute("data-reactid")||St.getAttribute("name");if(Ct&&wt[at])return wt[at];var pe=window.getComputedStyle(St),ue=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),_e=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),yt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),st=lt.map(function(Xe){return"".concat(Xe,":").concat(pe.getPropertyValue(Xe))}).join(";"),we={sizingStyle:st,paddingSize:_e,borderSize:yt,boxSizing:ue};return Ct&&at&&(wt[at]=we),we}function dt(St){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;mt||(mt=document.createElement("textarea"),mt.setAttribute("tab-index","-1"),mt.setAttribute("aria-hidden","true"),mt.setAttribute("name","hiddenTextarea"),document.body.appendChild(mt)),St.getAttribute("wrap")?mt.setAttribute("wrap",St.getAttribute("wrap")):mt.removeAttribute("wrap");var ue=pt(St,Ct),_e=ue.paddingSize,yt=ue.borderSize,st=ue.boxSizing,we=ue.sizingStyle;mt.setAttribute("style","".concat(we,";").concat(ot)),mt.value=St.value||St.placeholder||"";var Xe=void 0,Ge=void 0,Mt,ut=mt.scrollHeight;if(st==="border-box"?ut+=yt:st==="content-box"&&(ut-=_e),at!==null||pe!==null){mt.value=" ";var Ce=mt.scrollHeight-_e;at!==null&&(Xe=Ce*at,st==="border-box"&&(Xe=Xe+_e+yt),ut=Math.max(Xe,ut)),pe!==null&&(Ge=Ce*pe,st==="border-box"&&(Ge=Ge+_e+yt),Mt=ut>Ge?"":"hidden",ut=Math.min(Ge,ut))}var ve={height:ut,overflowY:Mt,resize:"none"};return Xe&&(ve.minHeight=Xe),Ge&&(ve.maxHeight=Ge),ve}var rt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Qt=0,Oe=1,$e=2,Lt=ht.forwardRef(function(St,Ct){var at=St,pe=at.prefixCls,ue=at.defaultValue,_e=at.value,yt=at.autoSize,st=at.onResize,we=at.className,Xe=at.style,Ge=at.disabled,Mt=at.onChange,ut=at.onInternalAutoSize,Ce=(0,Je.Z)(at,rt),ve=(0,ye.Z)(ue,{value:_e,postState:function(un){return un!=null?un:""}}),Le=(0,me.Z)(ve,2),Ve=Le[0],xe=Le[1],We=function(un){xe(un.target.value),Mt==null||Mt(un)},Ke=ht.useRef();ht.useImperativeHandle(Ct,function(){return{textArea:Ke.current}});var et=ht.useMemo(function(){return yt&&(0,je.Z)(yt)==="object"?[yt.minRows,yt.maxRows]:[]},[yt]),nt=(0,me.Z)(et,2),Ye=nt[0],bt=nt[1],kt=!!yt,Jt=function(){try{if(document.activeElement===Ke.current){var un=Ke.current,kn=un.selectionStart,cn=un.selectionEnd,wn=un.scrollTop;Ke.current.setSelectionRange(kn,cn),Ke.current.scrollTop=wn}}catch($n){}},Wt=ht.useState($e),se=(0,me.Z)(Wt,2),te=se[0],ee=se[1],ie=ht.useState(),ce=(0,me.Z)(ie,2),ne=ce[0],ge=ce[1],ct=function(){ee(Qt)};(0,Re.Z)(function(){kt&&ct()},[_e,Ye,bt,kt]),(0,Re.Z)(function(){if(te===Qt)ee(Oe);else if(te===Oe){var Ft=dt(Ke.current,!1,Ye,bt);ee($e),ge(Ft)}else Jt()},[te]);var vt=ht.useRef(),xt=function(){De.Z.cancel(vt.current)},Fe=function(un){te===$e&&(st==null||st(un),yt&&(xt(),vt.current=(0,De.Z)(function(){ct()})))};ht.useEffect(function(){return xt},[]);var Zt=kt?ne:null,Nt=(0,Ne.Z)((0,Ne.Z)({},Xe),Zt);return(te===Qt||te===Oe)&&(Nt.overflowY="hidden",Nt.overflowX="hidden"),ht.createElement(Ie.Z,{onResize:Fe,disabled:!(yt||st)},ht.createElement("textarea",(0,ae.Z)({},Ce,{ref:Ke,style:Nt,className:Qe()(pe,we,(0,ft.Z)({},"".concat(pe,"-disabled"),Ge)),disabled:Ge,value:Ve,onChange:We})))}),Pe=Lt,Ze=["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"],ke=ht.forwardRef(function(St,Ct){var at,pe=St.defaultValue,ue=St.value,_e=St.onFocus,yt=St.onBlur,st=St.onChange,we=St.allowClear,Xe=St.maxLength,Ge=St.onCompositionStart,Mt=St.onCompositionEnd,ut=St.suffix,Ce=St.prefixCls,ve=Ce===void 0?"rc-textarea":Ce,Le=St.showCount,Ve=St.count,xe=St.className,We=St.style,Ke=St.disabled,et=St.hidden,nt=St.classNames,Ye=St.styles,bt=St.onResize,kt=St.onClear,Jt=St.onPressEnter,Wt=St.readOnly,se=St.autoSize,te=St.onKeyDown,ee=(0,Je.Z)(St,Ze),ie=(0,ye.Z)(pe,{value:ue,defaultValue:pe}),ce=(0,me.Z)(ie,2),ne=ce[0],ge=ce[1],ct=ne==null?"":String(ne),vt=ht.useState(!1),xt=(0,me.Z)(vt,2),Fe=xt[0],Zt=xt[1],Nt=ht.useRef(!1),Ft=ht.useState(null),un=(0,me.Z)(Ft,2),kn=un[0],cn=un[1],wn=(0,ht.useRef)(null),$n=(0,ht.useRef)(null),Zn=function(){var qt;return(qt=$n.current)===null||qt===void 0?void 0:qt.textArea},mr=function(){Zn().focus()};(0,ht.useImperativeHandle)(Ct,function(){var it;return{resizableTextArea:$n.current,focus:mr,blur:function(){Zn().blur()},nativeElement:((it=wn.current)===null||it===void 0?void 0:it.nativeElement)||Zn()}}),(0,ht.useEffect)(function(){Zt(function(it){return!Ke&&it})},[Ke]);var er=ht.useState(null),ur=(0,me.Z)(er,2),nr=ur[0],In=ur[1];ht.useEffect(function(){if(nr){var it;(it=Zn()).setSelectionRange.apply(it,(0,ze.Z)(nr))}},[nr]);var rr=(0,de.Z)(Ve,Le),cr=(at=rr.max)!==null&&at!==void 0?at:Xe,Bn=Number(cr)>0,Xn=rr.strategy(ct),Kn=!!cr&&Xn>cr,xr=function(qt,Cn){var Gn=Cn;!Nt.current&&rr.exceedFormatter&&rr.max&&rr.strategy(Cn)>rr.max&&(Gn=rr.exceedFormatter(Cn,{max:rr.max}),Cn!==Gn&&In([Zn().selectionStart||0,Zn().selectionEnd||0])),ge(Gn),(0,Me.rJ)(qt.currentTarget,qt,st,Gn)},Ut=function(qt){Nt.current=!0,Ge==null||Ge(qt)},pn=function(qt){Nt.current=!1,xr(qt,qt.currentTarget.value),Mt==null||Mt(qt)},En=function(qt){xr(qt,qt.target.value)},Tn=function(qt){qt.key==="Enter"&&Jt&&Jt(qt),te==null||te(qt)},Jn=function(qt){Zt(!0),_e==null||_e(qt)},tr=function(qt){Zt(!1),yt==null||yt(qt)},dr=function(qt){ge(""),mr(),(0,Me.rJ)(Zn(),qt,st)},_n=ut,Rn;rr.show&&(rr.showFormatter?Rn=rr.showFormatter({value:ct,count:Xn,maxLength:cr}):Rn="".concat(Xn).concat(Bn?" / ".concat(cr):""),_n=ht.createElement(ht.Fragment,null,_n,ht.createElement("span",{className:Qe()("".concat(ve,"-data-count"),nt==null?void 0:nt.count),style:Ye==null?void 0:Ye.count},Rn)));var hr=function(qt){var Cn;bt==null||bt(qt),(Cn=Zn())!==null&&Cn!==void 0&&Cn.style.height&&cn(!0)},jt=!se&&!Le&&!we;return ht.createElement(Se.BaseInput,{ref:wn,value:ct,allowClear:we,handleReset:dr,suffix:_n,prefixCls:ve,classNames:(0,Ne.Z)((0,Ne.Z)({},nt),{},{affixWrapper:Qe()(nt==null?void 0:nt.affixWrapper,(0,ft.Z)((0,ft.Z)({},"".concat(ve,"-show-count"),Le),"".concat(ve,"-textarea-allow-clear"),we))}),disabled:Ke,focused:Fe,className:Qe()(xe,Kn&&"".concat(ve,"-out-of-range")),style:(0,Ne.Z)((0,Ne.Z)({},We),kn&&!jt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Rn=="string"?Rn:void 0}},hidden:et,readOnly:Wt,onClear:kt},ht.createElement(Pe,(0,ae.Z)({},ee,{autoSize:se,maxLength:Xe,onKeyDown:Tn,onChange:En,onFocus:Jn,onBlur:tr,onCompositionStart:Ut,onCompositionEnd:pn,className:Qe()(nt==null?void 0:nt.textarea),style:(0,Ne.Z)((0,Ne.Z)({},Ye==null?void 0:Ye.textarea),{},{resize:We==null?void 0:We.resize}),disabled:Ke,prefixCls:ve,onResize:hr,ref:$n,readOnly:Wt})))}),Ue=ke,Ht=Ue},90472:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return St}});var ae=fe(54476),ft=fe(67732),Ne=fe(83652),ze=fe(31226),me=fe(42403),Je=fe(158),Ae=fe(20068),Qe=fe(59301),Se=fe(33885),de=fe(75931),Me=fe(76190),ye=fe(75044),ht=fe(3202),je=fe(94480),Ie=fe(92310),Re=fe.n(Ie),De=fe(26112),ot=fe(48736),lt=function(Ct,at){if(Ct&&at){var pe=Array.isArray(at)?at:at.split(","),ue=Ct.name||"",_e=Ct.type||"",yt=_e.replace(/\/.*$/,"");return pe.some(function(st){var we=st.trim();if(/^\*(\/\*)?$/.test(st))return!0;if(we.charAt(0)==="."){var Xe=ue.toLowerCase(),Ge=we.toLowerCase(),Mt=[Ge];return(Ge===".jpg"||Ge===".jpeg")&&(Mt=[".jpg",".jpeg"]),Mt.some(function(ut){return Xe.endsWith(ut)})}return/\/\*$/.test(we)?yt===we.replace(/\/.*$/,""):_e===we?!0:/^\w+$/.test(we)?((0,ot.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(we,"'.Skip for check.")),!0):!1})}return!0};function wt(Ct,at){var pe="cannot ".concat(Ct.method," ").concat(Ct.action," ").concat(at.status,"'"),ue=new Error(pe);return ue.status=at.status,ue.method=Ct.method,ue.url=Ct.action,ue}function mt(Ct){var at=Ct.responseText||Ct.response;if(!at)return at;try{return JSON.parse(at)}catch(pe){return at}}function pt(Ct){var at=new XMLHttpRequest;Ct.onProgress&&at.upload&&(at.upload.onprogress=function(yt){yt.total>0&&(yt.percent=yt.loaded/yt.total*100),Ct.onProgress(yt)});var pe=new FormData;Ct.data&&Object.keys(Ct.data).forEach(function(_e){var yt=Ct.data[_e];if(Array.isArray(yt)){yt.forEach(function(st){pe.append("".concat(_e,"[]"),st)});return}pe.append(_e,yt)}),Ct.file instanceof Blob?pe.append(Ct.filename,Ct.file,Ct.file.name):pe.append(Ct.filename,Ct.file),at.onerror=function(yt){Ct.onError(yt)},at.onload=function(){return at.status<200||at.status>=300?Ct.onError(wt(Ct,at),mt(at)):Ct.onSuccess(mt(at),at)},at.open(Ct.method,Ct.action,!0),Ct.withCredentials&&"withCredentials"in at&&(at.withCredentials=!0);var ue=Ct.headers||{};return ue["X-Requested-With"]!==null&&at.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ue).forEach(function(_e){ue[_e]!==null&&at.setRequestHeader(_e,ue[_e])}),at.send(pe),{abort:function(){at.abort()}}}var dt=function(){var Ct=(0,ht.Z)((0,ye.Z)().mark(function at(pe,ue){var _e,yt,st,we,Xe,Ge,Mt,ut;return(0,ye.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Ge=function(){return Ge=(0,ht.Z)((0,ye.Z)().mark(function Ve(xe){return(0,ye.Z)().wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.abrupt("return",new Promise(function(et){xe.file(function(nt){ue(nt)?(xe.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=xe.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),et(nt)):et(null)})}));case 1:case"end":return Ke.stop()}},Ve)})),Ge.apply(this,arguments)},Xe=function(Ve){return Ge.apply(this,arguments)},we=function(){return we=(0,ht.Z)((0,ye.Z)().mark(function Ve(xe){var We,Ke,et,nt,Ye;return(0,ye.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:We=xe.createReader(),Ke=[];case 2:return kt.next=5,new Promise(function(Jt){We.readEntries(Jt,function(){return Jt([])})});case 5:if(et=kt.sent,nt=et.length,nt){kt.next=9;break}return kt.abrupt("break",12);case 9:for(Ye=0;Ye<nt;Ye++)Ke.push(et[Ye]);kt.next=2;break;case 12:return kt.abrupt("return",Ke);case 13:case"end":return kt.stop()}},Ve)})),we.apply(this,arguments)},st=function(Ve){return we.apply(this,arguments)},_e=[],yt=[],pe.forEach(function(Le){return yt.push(Le.webkitGetAsEntry())}),Mt=function(){var Le=(0,ht.Z)((0,ye.Z)().mark(function Ve(xe,We){var Ke,et;return(0,ye.Z)().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(xe){Ye.next=2;break}return Ye.abrupt("return");case 2:if(xe.path=We||"",!xe.isFile){Ye.next=10;break}return Ye.next=6,Xe(xe);case 6:Ke=Ye.sent,Ke&&_e.push(Ke),Ye.next=15;break;case 10:if(!xe.isDirectory){Ye.next=15;break}return Ye.next=13,st(xe);case 13:et=Ye.sent,yt.push.apply(yt,(0,je.Z)(et));case 15:case"end":return Ye.stop()}},Ve)}));return function(xe,We){return Le.apply(this,arguments)}}(),ut=0;case 9:if(!(ut<yt.length)){ve.next=15;break}return ve.next=12,Mt(yt[ut]);case 12:ut++,ve.next=9;break;case 15:return ve.abrupt("return",_e);case 16:case"end":return ve.stop()}},at)}));return function(pe,ue){return Ct.apply(this,arguments)}}(),rt=dt,Qt=+new Date,Oe=0;function $e(){return"rc-upload-".concat(Qt,"-").concat(++Oe)}var Lt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Pe=function(Ct){(0,me.Z)(pe,Ct);var at=(0,Je.Z)(pe);function pe(){var ue;(0,ft.Z)(this,pe);for(var _e=arguments.length,yt=new Array(_e),st=0;st<_e;st++)yt[st]=arguments[st];return ue=at.call.apply(at,[this].concat(yt)),(0,Ae.Z)((0,ze.Z)(ue),"state",{uid:$e()}),(0,Ae.Z)((0,ze.Z)(ue),"reqs",{}),(0,Ae.Z)((0,ze.Z)(ue),"fileInput",void 0),(0,Ae.Z)((0,ze.Z)(ue),"_isMounted",void 0),(0,Ae.Z)((0,ze.Z)(ue),"onChange",function(we){var Xe=ue.props,Ge=Xe.accept,Mt=Xe.directory,ut=we.target.files,Ce=(0,je.Z)(ut).filter(function(ve){return!Mt||lt(ve,Ge)});ue.uploadFiles(Ce),ue.reset()}),(0,Ae.Z)((0,ze.Z)(ue),"onClick",function(we){var Xe=ue.fileInput;if(Xe){var Ge=we.target,Mt=ue.props.onClick;if(Ge&&Ge.tagName==="BUTTON"){var ut=Xe.parentNode;ut.focus(),Ge.blur()}Xe.click(),Mt&&Mt(we)}}),(0,Ae.Z)((0,ze.Z)(ue),"onKeyDown",function(we){we.key==="Enter"&&ue.onClick(we)}),(0,Ae.Z)((0,ze.Z)(ue),"onFileDrop",function(){var we=(0,ht.Z)((0,ye.Z)().mark(function Xe(Ge){var Mt,ut,Ce;return(0,ye.Z)().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(Mt=ue.props.multiple,Ge.preventDefault(),Ge.type!=="dragover"){Le.next=4;break}return Le.abrupt("return");case 4:if(!ue.props.directory){Le.next=11;break}return Le.next=7,rt(Array.prototype.slice.call(Ge.dataTransfer.items),function(Ve){return lt(Ve,ue.props.accept)});case 7:ut=Le.sent,ue.uploadFiles(ut),Le.next=14;break;case 11:Ce=(0,je.Z)(Ge.dataTransfer.files).filter(function(Ve){return lt(Ve,ue.props.accept)}),Mt===!1&&(Ce=Ce.slice(0,1)),ue.uploadFiles(Ce);case 14:case"end":return Le.stop()}},Xe)}));return function(Xe){return we.apply(this,arguments)}}()),(0,Ae.Z)((0,ze.Z)(ue),"uploadFiles",function(we){var Xe=(0,je.Z)(we),Ge=Xe.map(function(Mt){return Mt.uid=$e(),ue.processFile(Mt,Xe)});Promise.all(Ge).then(function(Mt){var ut=ue.props.onBatchStart;ut==null||ut(Mt.map(function(Ce){var ve=Ce.origin,Le=Ce.parsedFile;return{file:ve,parsedFile:Le}})),Mt.filter(function(Ce){return Ce.parsedFile!==null}).forEach(function(Ce){ue.post(Ce)})})}),(0,Ae.Z)((0,ze.Z)(ue),"processFile",function(){var we=(0,ht.Z)((0,ye.Z)().mark(function Xe(Ge,Mt){var ut,Ce,ve,Le,Ve,xe,We,Ke,et;return(0,ye.Z)().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(ut=ue.props.beforeUpload,Ce=Ge,!ut){Ye.next=14;break}return Ye.prev=3,Ye.next=6,ut(Ge,Mt);case 6:Ce=Ye.sent,Ye.next=12;break;case 9:Ye.prev=9,Ye.t0=Ye.catch(3),Ce=!1;case 12:if(Ce!==!1){Ye.next=14;break}return Ye.abrupt("return",{origin:Ge,parsedFile:null,action:null,data:null});case 14:if(ve=ue.props.action,typeof ve!="function"){Ye.next=21;break}return Ye.next=18,ve(Ge);case 18:Le=Ye.sent,Ye.next=22;break;case 21:Le=ve;case 22:if(Ve=ue.props.data,typeof Ve!="function"){Ye.next=29;break}return Ye.next=26,Ve(Ge);case 26:xe=Ye.sent,Ye.next=30;break;case 29:xe=Ve;case 30:return We=((0,Me.Z)(Ce)==="object"||typeof Ce=="string")&&Ce?Ce:Ge,We instanceof File?Ke=We:Ke=new File([We],Ge.name,{type:Ge.type}),et=Ke,et.uid=Ge.uid,Ye.abrupt("return",{origin:Ge,data:xe,parsedFile:et,action:Le});case 35:case"end":return Ye.stop()}},Xe,null,[[3,9]])}));return function(Xe,Ge){return we.apply(this,arguments)}}()),(0,Ae.Z)((0,ze.Z)(ue),"saveFileInput",function(we){ue.fileInput=we}),ue}return(0,Ne.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(_e){var yt=this,st=_e.data,we=_e.origin,Xe=_e.action,Ge=_e.parsedFile;if(this._isMounted){var Mt=this.props,ut=Mt.onStart,Ce=Mt.customRequest,ve=Mt.name,Le=Mt.headers,Ve=Mt.withCredentials,xe=Mt.method,We=we.uid,Ke=Ce||pt,et={action:Xe,filename:ve,data:st,file:Ge,headers:Le,withCredentials:Ve,method:xe||"post",onProgress:function(Ye){var bt=yt.props.onProgress;bt==null||bt(Ye,Ge)},onSuccess:function(Ye,bt){var kt=yt.props.onSuccess;kt==null||kt(Ye,Ge,bt),delete yt.reqs[We]},onError:function(Ye,bt){var kt=yt.props.onError;kt==null||kt(Ye,bt,Ge),delete yt.reqs[We]}};ut(we),this.reqs[We]=Ke(et)}}},{key:"reset",value:function(){this.setState({uid:$e()})}},{key:"abort",value:function(_e){var yt=this.reqs;if(_e){var st=_e.uid?_e.uid:_e;yt[st]&&yt[st].abort&&yt[st].abort(),delete yt[st]}else Object.keys(yt).forEach(function(we){yt[we]&&yt[we].abort&&yt[we].abort(),delete yt[we]})}},{key:"render",value:function(){var _e=this.props,yt=_e.component,st=_e.prefixCls,we=_e.className,Xe=_e.classNames,Ge=Xe===void 0?{}:Xe,Mt=_e.disabled,ut=_e.id,Ce=_e.name,ve=_e.style,Le=_e.styles,Ve=Le===void 0?{}:Le,xe=_e.multiple,We=_e.accept,Ke=_e.capture,et=_e.children,nt=_e.directory,Ye=_e.openFileDialogOnClick,bt=_e.onMouseEnter,kt=_e.onMouseLeave,Jt=_e.hasControlInside,Wt=(0,de.Z)(_e,Lt),se=Re()((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},st,!0),"".concat(st,"-disabled"),Mt),we,we)),te=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},ee=Mt?{}:{onClick:Ye?this.onClick:function(){},onKeyDown:Ye?this.onKeyDown:function(){},onMouseEnter:bt,onMouseLeave:kt,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Jt?void 0:"0"};return Qe.createElement(yt,(0,ae.Z)({},ee,{className:se,role:Jt?void 0:"button",style:ve}),Qe.createElement("input",(0,ae.Z)({},(0,De.Z)(Wt,{aria:!0,data:!0}),{id:ut,name:Ce,disabled:Mt,type:"file",ref:this.saveFileInput,onClick:function(ce){return ce.stopPropagation()},key:this.state.uid,style:(0,Se.Z)({display:"none"},Ve.input),className:Ge.input,accept:We},te,{multiple:xe,onChange:this.onChange},Ke!=null?{capture:Ke}:{})),et)}}]),pe}(Qe.Component),Ze=Pe;function ke(){}var Ue=function(Ct){(0,me.Z)(pe,Ct);var at=(0,Je.Z)(pe);function pe(){var ue;(0,ft.Z)(this,pe);for(var _e=arguments.length,yt=new Array(_e),st=0;st<_e;st++)yt[st]=arguments[st];return ue=at.call.apply(at,[this].concat(yt)),(0,Ae.Z)((0,ze.Z)(ue),"uploader",void 0),(0,Ae.Z)((0,ze.Z)(ue),"saveUploader",function(we){ue.uploader=we}),ue}return(0,Ne.Z)(pe,[{key:"abort",value:function(_e){this.uploader.abort(_e)}},{key:"render",value:function(){return Qe.createElement(Ze,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(Qe.Component);(0,Ae.Z)(Ue,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:ke,onError:ke,onSuccess:ke,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Ht=Ue,St=Ht},48911:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ve}});var ae=fe(54476),ft=fe(76190),Ne=fe(33885),ze=fe(20068),me=fe(42978),Je=fe(75931),Ae=fe(92310),Qe=fe.n(Ae),Se=fe(29301),de=fe(70425),Me=fe(34280),ye=fe(59301),ht=fe(4676),je=ye.forwardRef(function(xe,We){var Ke=xe.height,et=xe.offsetY,nt=xe.offsetX,Ye=xe.children,bt=xe.prefixCls,kt=xe.onInnerResize,Jt=xe.innerProps,Wt=xe.rtl,se=xe.extra,te={},ee={display:"flex",flexDirection:"column"};return et!==void 0&&(te={height:Ke,position:"relative",overflow:"hidden"},ee=(0,Ne.Z)((0,Ne.Z)({},ee),{},(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({transform:"translateY(".concat(et,"px)")},Wt?"marginRight":"marginLeft",-nt),"position","absolute"),"left",0),"right",0),"top",0))),ye.createElement("div",{style:te},ye.createElement(Se.Z,{onResize:function(ce){var ne=ce.offsetHeight;ne&&kt&&kt()}},ye.createElement("div",(0,ae.Z)({style:ee,className:Qe()((0,ze.Z)({},"".concat(bt,"-holder-inner"),bt)),ref:We},Jt),Ye,se)))});je.displayName="Filler";var Ie=je;function Re(xe){var We=xe.children,Ke=xe.setRef,et=ye.useCallback(function(nt){Ke(nt)},[]);return ye.cloneElement(We,{ref:et})}function De(xe,We,Ke,et,nt,Ye,bt,kt){var Jt=kt.getKey;return xe.slice(We,Ke+1).map(function(Wt,se){var te=We+se,ee=bt(Wt,te,{style:{width:et},offsetX:nt}),ie=Jt(Wt);return ye.createElement(Re,{key:ie,setRef:function(ne){return Ye(Wt,ne)}},ee)})}function ot(xe,We,Ke,et){var nt=Ke-xe,Ye=We-Ke,bt=Math.min(nt,Ye)*2;if(et<=bt){var kt=Math.floor(et/2);return et%2?Ke+kt+1:Ke-kt}return nt>Ye?Ke-(et-Ye):Ke+(et-nt)}function lt(xe,We,Ke){var et=xe.length,nt=We.length,Ye,bt;if(et===0&&nt===0)return null;et<nt?(Ye=xe,bt=We):(Ye=We,bt=xe);var kt={__EMPTY_ITEM__:!0};function Jt(ce){return ce!==void 0?Ke(ce):kt}for(var Wt=null,se=Math.abs(et-nt)!==1,te=0;te<bt.length;te+=1){var ee=Jt(Ye[te]),ie=Jt(bt[te]);if(ee!==ie){Wt=te,se=se||ee!==Jt(bt[te+1]);break}}return Wt===null?null:{index:Wt,multiple:se}}function wt(xe,We,Ke){var et=ye.useState(xe),nt=(0,me.Z)(et,2),Ye=nt[0],bt=nt[1],kt=ye.useState(null),Jt=(0,me.Z)(kt,2),Wt=Jt[0],se=Jt[1];return ye.useEffect(function(){var te=lt(Ye||[],xe||[],We);(te==null?void 0:te.index)!==void 0&&(Ke==null||Ke(te.index),se(xe[te.index])),bt(xe)},[xe]),[Wt]}var mt=fe(16089),pt=(typeof navigator=="undefined"?"undefined":(0,ft.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),dt=pt,rt=function(xe,We,Ke,et){var nt=(0,ye.useRef)(!1),Ye=(0,ye.useRef)(null);function bt(){clearTimeout(Ye.current),nt.current=!0,Ye.current=setTimeout(function(){nt.current=!1},50)}var kt=(0,ye.useRef)({top:xe,bottom:We,left:Ke,right:et});return kt.current.top=xe,kt.current.bottom=We,kt.current.left=Ke,kt.current.right=et,function(Jt,Wt){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=Jt?Wt<0&&kt.current.left||Wt>0&&kt.current.right:Wt<0&&kt.current.top||Wt>0&&kt.current.bottom;return se&&te?(clearTimeout(Ye.current),nt.current=!1):(!te||nt.current)&&bt(),!nt.current&&te}};function Qt(xe,We,Ke,et,nt,Ye,bt){var kt=(0,ye.useRef)(0),Jt=(0,ye.useRef)(null),Wt=(0,ye.useRef)(null),se=(0,ye.useRef)(!1),te=rt(We,Ke,et,nt);function ee(vt,xt){if(mt.Z.cancel(Jt.current),!te(!1,xt)){var Fe=vt;if(!Fe._virtualHandled)Fe._virtualHandled=!0;else return;kt.current+=xt,Wt.current=xt,dt||Fe.preventDefault(),Jt.current=(0,mt.Z)(function(){var Zt=se.current?10:1;bt(kt.current*Zt,!1),kt.current=0})}}function ie(vt,xt){bt(xt,!0),dt||vt.preventDefault()}var ce=(0,ye.useRef)(null),ne=(0,ye.useRef)(null);function ge(vt){if(xe){mt.Z.cancel(ne.current),ne.current=(0,mt.Z)(function(){ce.current=null},2);var xt=vt.deltaX,Fe=vt.deltaY,Zt=vt.shiftKey,Nt=xt,Ft=Fe;(ce.current==="sx"||!ce.current&&Zt&&Fe&&!xt)&&(Nt=Fe,Ft=0,ce.current="sx");var un=Math.abs(Nt),kn=Math.abs(Ft);ce.current===null&&(ce.current=Ye&&un>kn?"x":"y"),ce.current==="y"?ee(vt,Ft):ie(vt,Nt)}}function ct(vt){xe&&(se.current=vt.detail===Wt.current)}return[ge,ct]}function Oe(xe,We,Ke,et){var nt=ye.useMemo(function(){return[new Map,[]]},[xe,Ke.id,et]),Ye=(0,me.Z)(nt,2),bt=Ye[0],kt=Ye[1],Jt=function(se){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se,ee=bt.get(se),ie=bt.get(te);if(ee===void 0||ie===void 0)for(var ce=xe.length,ne=kt.length;ne<ce;ne+=1){var ge,ct=xe[ne],vt=We(ct);bt.set(vt,ne);var xt=(ge=Ke.get(vt))!==null&&ge!==void 0?ge:et;if(kt[ne]=(kt[ne-1]||0)+xt,vt===se&&(ee=ne),vt===te&&(ie=ne),ee!==void 0&&ie!==void 0)break}return{top:kt[ee-1]||0,bottom:kt[ie]}};return Jt}var $e=fe(67732),Lt=fe(83652),Pe=function(){function xe(){(0,$e.Z)(this,xe),(0,ze.Z)(this,"maps",void 0),(0,ze.Z)(this,"id",0),(0,ze.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Lt.Z)(xe,[{key:"set",value:function(Ke,et){this.diffRecords.set(Ke,this.maps[Ke]),this.maps[Ke]=et,this.id+=1}},{key:"get",value:function(Ke){return this.maps[Ke]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),xe}(),Ze=Pe;function ke(xe){var We=parseFloat(xe);return isNaN(We)?0:We}function Ue(xe,We,Ke){var et=ye.useState(0),nt=(0,me.Z)(et,2),Ye=nt[0],bt=nt[1],kt=(0,ye.useRef)(new Map),Jt=(0,ye.useRef)(new Ze),Wt=(0,ye.useRef)(0);function se(){Wt.current+=1}function te(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;se();var ce=function(){var ct=!1;kt.current.forEach(function(vt,xt){if(vt&&vt.offsetParent){var Fe=vt.offsetHeight,Zt=getComputedStyle(vt),Nt=Zt.marginTop,Ft=Zt.marginBottom,un=ke(Nt),kn=ke(Ft),cn=Fe+un+kn;Jt.current.get(xt)!==cn&&(Jt.current.set(xt,cn),ct=!0)}}),ct&&bt(function(vt){return vt+1})};if(ie)ce();else{Wt.current+=1;var ne=Wt.current;Promise.resolve().then(function(){ne===Wt.current&&ce()})}}function ee(ie,ce){var ne=xe(ie),ge=kt.current.get(ne);ce?(kt.current.set(ne,ce),te()):kt.current.delete(ne),!ge!=!ce&&(ce?We==null||We(ie):Ke==null||Ke(ie))}return(0,ye.useEffect)(function(){return se},[]),[ee,te,Jt.current,Ye]}var Ht=14/15;function St(xe,We,Ke){var et=(0,ye.useRef)(!1),nt=(0,ye.useRef)(0),Ye=(0,ye.useRef)(0),bt=(0,ye.useRef)(null),kt=(0,ye.useRef)(null),Jt,Wt=function(ie){if(et.current){var ce=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),ge=nt.current-ce,ct=Ye.current-ne,vt=Math.abs(ge)>Math.abs(ct);vt?nt.current=ce:Ye.current=ne;var xt=Ke(vt,vt?ge:ct,!1,ie);xt&&ie.preventDefault(),clearInterval(kt.current),xt&&(kt.current=setInterval(function(){vt?ge*=Ht:ct*=Ht;var Fe=Math.floor(vt?ge:ct);(!Ke(vt,Fe,!0)||Math.abs(Fe)<=.1)&&clearInterval(kt.current)},16))}},se=function(){et.current=!1,Jt()},te=function(ie){Jt(),ie.touches.length===1&&!et.current&&(et.current=!0,nt.current=Math.ceil(ie.touches[0].pageX),Ye.current=Math.ceil(ie.touches[0].pageY),bt.current=ie.target,bt.current.addEventListener("touchmove",Wt,{passive:!1}),bt.current.addEventListener("touchend",se,{passive:!0}))};Jt=function(){bt.current&&(bt.current.removeEventListener("touchmove",Wt),bt.current.removeEventListener("touchend",se))},(0,Me.Z)(function(){return xe&&We.current.addEventListener("touchstart",te,{passive:!0}),function(){var ee;(ee=We.current)===null||ee===void 0||ee.removeEventListener("touchstart",te),Jt(),clearInterval(kt.current)}},[xe])}function Ct(xe){return Math.floor(Math.pow(xe,.5))}function at(xe,We){var Ke="touches"in xe?xe.touches[0]:xe;return Ke[We?"pageX":"pageY"]-window[We?"scrollX":"scrollY"]}function pe(xe,We,Ke){ye.useEffect(function(){var et=We.current;if(xe&&et){var nt=!1,Ye,bt,kt=function(){mt.Z.cancel(Ye)},Jt=function ee(){kt(),Ye=(0,mt.Z)(function(){Ke(bt),ee()})},Wt=function(){nt=!1,kt()},se=function(ie){if(!(ie.target.draggable||ie.button!==0)){var ce=ie;ce._virtualHandled||(ce._virtualHandled=!0,nt=!0)}},te=function(ie){if(nt){var ce=at(ie,!1),ne=et.getBoundingClientRect(),ge=ne.top,ct=ne.bottom;if(ce<=ge){var vt=ge-ce;bt=-Ct(vt),Jt()}else if(ce>=ct){var xt=ce-ct;bt=Ct(xt),Jt()}else kt()}};return et.addEventListener("mousedown",se),et.ownerDocument.addEventListener("mouseup",Wt),et.ownerDocument.addEventListener("mousemove",te),et.ownerDocument.addEventListener("dragend",Wt),function(){et.removeEventListener("mousedown",se),et.ownerDocument.removeEventListener("mouseup",Wt),et.ownerDocument.removeEventListener("mousemove",te),et.ownerDocument.removeEventListener("dragend",Wt),kt()}}},[xe])}var ue=10;function _e(xe,We,Ke,et,nt,Ye,bt,kt){var Jt=ye.useRef(),Wt=ye.useState(null),se=(0,me.Z)(Wt,2),te=se[0],ee=se[1];return(0,Me.Z)(function(){if(te&&te.times<ue){if(!xe.current){ee(function(rr){return(0,Ne.Z)({},rr)});return}Ye();var ie=te.targetAlign,ce=te.originAlign,ne=te.index,ge=te.offset,ct=xe.current.clientHeight,vt=!1,xt=ie,Fe=null;if(ct){for(var Zt=ie||ce,Nt=0,Ft=0,un=0,kn=Math.min(We.length-1,ne),cn=0;cn<=kn;cn+=1){var wn=nt(We[cn]);Ft=Nt;var $n=Ke.get(wn);un=Ft+($n===void 0?et:$n),Nt=un}for(var Zn=Zt==="top"?ge:ct-ge,mr=kn;mr>=0;mr-=1){var er=nt(We[mr]),ur=Ke.get(er);if(ur===void 0){vt=!0;break}if(Zn-=ur,Zn<=0)break}switch(Zt){case"top":Fe=Ft-ge;break;case"bottom":Fe=un-ct+ge;break;default:{var nr=xe.current.scrollTop,In=nr+ct;Ft<nr?xt="top":un>In&&(xt="bottom")}}Fe!==null&&bt(Fe),Fe!==te.lastTop&&(vt=!0)}vt&&ee((0,Ne.Z)((0,Ne.Z)({},te),{},{times:te.times+1,targetAlign:xt,lastTop:Fe}))}},[te,xe.current]),function(ie){if(ie==null){kt();return}if(mt.Z.cancel(Jt.current),typeof ie=="number")bt(ie);else if(ie&&(0,ft.Z)(ie)==="object"){var ce,ne=ie.align;"index"in ie?ce=ie.index:ce=We.findIndex(function(vt){return nt(vt)===ie.key});var ge=ie.offset,ct=ge===void 0?0:ge;ee({times:0,index:ce,offset:ct,originAlign:ne})}}}var yt=ye.forwardRef(function(xe,We){var Ke=xe.prefixCls,et=xe.rtl,nt=xe.scrollOffset,Ye=xe.scrollRange,bt=xe.onStartMove,kt=xe.onStopMove,Jt=xe.onScroll,Wt=xe.horizontal,se=xe.spinSize,te=xe.containerSize,ee=xe.style,ie=xe.thumbStyle,ce=xe.showScrollBar,ne=ye.useState(!1),ge=(0,me.Z)(ne,2),ct=ge[0],vt=ge[1],xt=ye.useState(null),Fe=(0,me.Z)(xt,2),Zt=Fe[0],Nt=Fe[1],Ft=ye.useState(null),un=(0,me.Z)(Ft,2),kn=un[0],cn=un[1],wn=!et,$n=ye.useRef(),Zn=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=Ye-te||0,Bn=te-se||0,Xn=ye.useMemo(function(){if(nt===0||cr===0)return 0;var dr=nt/cr;return dr*Bn},[nt,cr,Bn]),Kn=function(_n){_n.stopPropagation(),_n.preventDefault()},xr=ye.useRef({top:Xn,dragging:ct,pageY:Zt,startTop:kn});xr.current={top:Xn,dragging:ct,pageY:Zt,startTop:kn};var Ut=function(_n){vt(!0),Nt(at(_n,Wt)),cn(xr.current.top),bt(),_n.stopPropagation(),_n.preventDefault()};ye.useEffect(function(){var dr=function(jt){jt.preventDefault()},_n=$n.current,Rn=Zn.current;return _n.addEventListener("touchstart",dr,{passive:!1}),Rn.addEventListener("touchstart",Ut,{passive:!1}),function(){_n.removeEventListener("touchstart",dr),Rn.removeEventListener("touchstart",Ut)}},[]);var pn=ye.useRef();pn.current=cr;var En=ye.useRef();En.current=Bn,ye.useEffect(function(){if(ct){var dr,_n=function(jt){var it=xr.current,qt=it.dragging,Cn=it.pageY,Gn=it.startTop;mt.Z.cancel(dr);var Te=$n.current.getBoundingClientRect(),Be=te/(Wt?Te.width:Te.height);if(qt){var Pt=(at(jt,Wt)-Cn)*Be,Et=Gn;!wn&&Wt?Et-=Pt:Et+=Pt;var He=pn.current,Dt=En.current,Yt=Dt?Et/Dt:0,tn=Math.ceil(Yt*He);tn=Math.max(tn,0),tn=Math.min(tn,He),dr=(0,mt.Z)(function(){Jt(tn,Wt)})}},Rn=function(){vt(!1),kt()};return window.addEventListener("mousemove",_n,{passive:!0}),window.addEventListener("touchmove",_n,{passive:!0}),window.addEventListener("mouseup",Rn,{passive:!0}),window.addEventListener("touchend",Rn,{passive:!0}),function(){window.removeEventListener("mousemove",_n),window.removeEventListener("touchmove",_n),window.removeEventListener("mouseup",Rn),window.removeEventListener("touchend",Rn),mt.Z.cancel(dr)}}},[ct]),ye.useEffect(function(){return rr(),function(){clearTimeout(In.current)}},[nt]),ye.useImperativeHandle(We,function(){return{delayHidden:rr}});var Tn="".concat(Ke,"-scrollbar"),Jn={position:"absolute",visibility:ur?null:"hidden"},tr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Wt?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,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:Qe()(Tn,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(Tn,"-horizontal"),Wt),"".concat(Tn,"-vertical"),!Wt),"".concat(Tn,"-visible"),ur)),style:(0,Ne.Z)((0,Ne.Z)({},Jn),ee),onMouseDown:Kn,onMouseMove:rr},ye.createElement("div",{ref:Zn,className:Qe()("".concat(Tn,"-thumb"),(0,ze.Z)({},"".concat(Tn,"-thumb-moving"),ct)),style:(0,Ne.Z)((0,Ne.Z)({},tr),ie),onMouseDown:Ut}))}),st=yt,we=20;function Xe(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ke=xe/We*xe;return isNaN(Ke)&&(Ke=0),Ke=Math.max(Ke,we),Math.floor(Ke)}var Ge=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Mt=[],ut={overflowY:"auto",overflowAnchor:"none"};function Ce(xe,We){var Ke=xe.prefixCls,et=Ke===void 0?"rc-virtual-list":Ke,nt=xe.className,Ye=xe.height,bt=xe.itemHeight,kt=xe.fullHeight,Jt=kt===void 0?!0:kt,Wt=xe.style,se=xe.data,te=xe.children,ee=xe.itemKey,ie=xe.virtual,ce=xe.direction,ne=xe.scrollWidth,ge=xe.component,ct=ge===void 0?"div":ge,vt=xe.onScroll,xt=xe.onVirtualScroll,Fe=xe.onVisibleChange,Zt=xe.innerProps,Nt=xe.extraRender,Ft=xe.styles,un=xe.showScrollBar,kn=un===void 0?"optional":un,cn=(0,Je.Z)(xe,Ge),wn=ye.useCallback(function(Ot){return typeof ee=="function"?ee(Ot):Ot==null?void 0:Ot[ee]},[ee]),$n=Ue(wn,null,null),Zn=(0,me.Z)($n,4),mr=Zn[0],er=Zn[1],ur=Zn[2],nr=Zn[3],In=!!(ie!==!1&&Ye&&bt),rr=ye.useMemo(function(){return Object.values(ur.maps).reduce(function(Ot,Kt){return Ot+Kt},0)},[ur.id,ur.maps]),cr=In&&se&&(Math.max(bt*se.length,rr)>Ye||!!ne),Bn=ce==="rtl",Xn=Qe()(et,(0,ze.Z)({},"".concat(et,"-rtl"),Bn),nt),Kn=se||Mt,xr=(0,ye.useRef)(),Ut=(0,ye.useRef)(),pn=(0,ye.useRef)(),En=(0,ye.useState)(0),Tn=(0,me.Z)(En,2),Jn=Tn[0],tr=Tn[1],dr=(0,ye.useState)(0),_n=(0,me.Z)(dr,2),Rn=_n[0],hr=_n[1],jt=(0,ye.useState)(!1),it=(0,me.Z)(jt,2),qt=it[0],Cn=it[1],Gn=function(){Cn(!0)},Te=function(){Cn(!1)},Be={getKey:wn};function Pt(Ot){tr(function(Kt){var yn;typeof Ot=="function"?yn=Ot(Kt):yn=Ot;var on=wr(yn);return xr.current.scrollTop=on,on})}var Et=(0,ye.useRef)({start:0,end:Kn.length}),He=(0,ye.useRef)(),Dt=wt(Kn,wn),Yt=(0,me.Z)(Dt,1),tn=Yt[0];He.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 Ot;return{scrollHeight:((Ot=Ut.current)===null||Ot===void 0?void 0:Ot.offsetHeight)||0,start:0,end:Kn.length-1,offset:void 0}}for(var Kt=0,yn,on,Dn,ar=Kn.length,Vt=0;Vt<ar;Vt+=1){var It=Kn[Vt],rn=wn(It),ln=ur.get(rn),Mn=Kt+(ln===void 0?bt:ln);Mn>=Jn&&yn===void 0&&(yn=Vt,on=Kt),Mn>Jn+Ye&&Dn===void 0&&(Dn=Vt),Kt=Mn}return yn===void 0&&(yn=0,on=0,Dn=Math.ceil(Ye/bt)),Dn===void 0&&(Dn=Kn.length-1),Dn=Math.min(Dn+1,Kn.length-1),{scrollHeight:Kt,start:yn,end:Dn,offset:on}},[cr,In,Jn,Kn,nr,Ye]),_t=hn.scrollHeight,$t=hn.start,At=hn.end,gt=hn.offset;Et.current.start=$t,Et.current.end=At,ye.useLayoutEffect(function(){var Ot=ur.getRecord();if(Ot.size===1){var Kt=Array.from(Ot.keys())[0],yn=Ot.get(Kt),on=Kn[$t];if(on&&yn===void 0){var Dn=wn(on);if(Dn===Kt){var ar=ur.get(Kt),Vt=ar-bt;Pt(function(It){return It+Vt})}}}ur.resetRecord()},[_t]);var en=ye.useState({width:0,height:Ye}),vn=(0,me.Z)(en,2),mn=vn[0],xn=vn[1],Wn=function(Kt){xn({width:Kt.offsetWidth,height:Kt.offsetHeight})},Yn=(0,ye.useRef)(),dn=(0,ye.useRef)(),Gt=ye.useMemo(function(){return Xe(mn.width,ne)},[mn.width,ne]),gn=ye.useMemo(function(){return Xe(mn.height,_t)},[mn.height,_t]),nn=_t-Ye,Hn=(0,ye.useRef)(nn);Hn.current=nn;function wr(Ot){var Kt=Ot;return Number.isNaN(Hn.current)||(Kt=Math.min(Kt,Hn.current)),Kt=Math.max(Kt,0),Kt}var Qn=Jn<=0,Lr=Jn>=nn,Mr=Rn<=0,Cr=Rn>=ne,ir=rt(Qn,Lr,Mr,Cr),Fr=function(){return{x:Bn?-Rn:Rn,y:Jn}},gr=(0,ye.useRef)(Fr()),or=(0,de.zX)(function(Ot){if(xt){var Kt=(0,Ne.Z)((0,Ne.Z)({},Fr()),Ot);(gr.current.x!==Kt.x||gr.current.y!==Kt.y)&&(xt(Kt),gr.current=Kt)}});function Er(Ot,Kt){var yn=Ot;Kt?((0,ht.flushSync)(function(){hr(yn)}),or()):Pt(yn)}function Tr(Ot){var Kt=Ot.currentTarget.scrollTop;Kt!==Jn&&Pt(Kt),vt==null||vt(Ot),or()}var pr=function(Kt){var yn=Kt,on=ne?ne-mn.width:0;return yn=Math.max(yn,0),yn=Math.min(yn,on),yn},qn=(0,de.zX)(function(Ot,Kt){Kt?((0,ht.flushSync)(function(){hr(function(yn){var on=yn+(Bn?-Ot:Ot);return pr(on)})}),or()):Pt(function(yn){var on=yn+Ot;return on})}),jn=Qt(In,Qn,Lr,Mr,Cr,!!ne,qn),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1];St(In,xr,function(Ot,Kt,yn,on){var Dn=on;return ir(Ot,Kt,yn)?!1:!Dn||!Dn._virtualHandled?(Dn&&(Dn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Ot?Kt:0,deltaY:Ot?0:Kt}),!0):!1}),pe(cr,xr,function(Ot){Pt(function(Kt){return Kt+Ot})}),(0,Me.Z)(function(){function Ot(yn){var on=Qn&&yn.detail<0,Dn=Lr&&yn.detail>0;In&&!on&&!Dn&&yn.preventDefault()}var Kt=xr.current;return Kt.addEventListener("wheel",Vr,{passive:!1}),Kt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),Kt.addEventListener("MozMousePixelScroll",Ot,{passive:!1}),function(){Kt.removeEventListener("wheel",Vr),Kt.removeEventListener("DOMMouseScroll",Jr),Kt.removeEventListener("MozMousePixelScroll",Ot)}},[In,Qn,Lr]),(0,Me.Z)(function(){if(ne){var Ot=pr(Rn);hr(Ot),or({x:Ot})}},[mn.width,ne]);var Dr=function(){var Kt,yn;(Kt=Yn.current)===null||Kt===void 0||Kt.delayHidden(),(yn=dn.current)===null||yn===void 0||yn.delayHidden()},Hr=_e(xr,Kn,ur,bt,wn,function(){return er(!0)},Pt,Dr);ye.useImperativeHandle(We,function(){return{nativeElement:pn.current,getScrollInfo:Fr,scrollTo:function(Kt){function yn(on){return on&&(0,ft.Z)(on)==="object"&&("left"in on||"top"in on)}yn(Kt)?(Kt.left!==void 0&&hr(pr(Kt.left)),Hr(Kt.top)):Hr(Kt)}}}),(0,Me.Z)(function(){if(Fe){var Ot=Kn.slice($t,At+1);Fe(Ot,Kn)}},[$t,At,Kn]);var Nr=Oe(Kn,wn,ur,bt),_r=Nt==null?void 0:Nt({start:$t,end:At,virtual:cr,offsetX:Rn,offsetY:gt,rtl:Bn,getSize:Nr}),ii=De(Kn,$t,At,ne,Rn,mr,te,Be),Or=null;Ye&&(Or=(0,Ne.Z)((0,ze.Z)({},Jt?"height":"maxHeight",Ye),ut),In&&(Or.overflowY="hidden",ne&&(Or.overflowX="hidden"),qt&&(Or.pointerEvents="none")));var Fn={};return Bn&&(Fn.dir="rtl"),ye.createElement("div",(0,ae.Z)({ref:pn,style:(0,Ne.Z)((0,Ne.Z)({},Wt),{},{position:"relative"}),className:Xn},Fn,cn),ye.createElement(Se.Z,{onResize:Wn},ye.createElement(ct,{className:"".concat(et,"-holder"),style:Or,ref:xr,onScroll:Tr,onMouseEnter:Dr},ye.createElement(Ie,{prefixCls:et,height:_t,offsetX:Rn,offsetY:gt,scrollWidth:ne,onInnerResize:er,ref:Ut,innerProps:Zt,rtl:Bn,extra:_r},ii))),cr&&_t>Ye&&ye.createElement(st,{ref:Yn,prefixCls:et,scrollOffset:Jn,scrollRange:_t,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Te,spinSize:gn,containerSize:mn.height,style:Ft==null?void 0:Ft.verticalScrollBar,thumbStyle:Ft==null?void 0:Ft.verticalScrollBarThumb,showScrollBar:kn}),cr&&ne>mn.width&&ye.createElement(st,{ref:dn,prefixCls:et,scrollOffset:Rn,scrollRange:ne,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Te,spinSize:Gt,containerSize:mn.width,horizontal:!0,style:Ft==null?void 0:Ft.horizontalScrollBar,thumbStyle:Ft==null?void 0:Ft.horizontalScrollBarThumb,showScrollBar:kn}))}var ve=ye.forwardRef(Ce);ve.displayName="List";var Le=ve,Ve=Le},93314:function(Rt){"use strict";Rt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(Rt,zt,fe){"use strict";fe.d(zt,{Z:function(){return Qe}});const ae=Se=>typeof Se=="object"&&Se!=null&&Se.nodeType===1,ft=(Se,de)=>(!de||Se!=="hidden")&&Se!=="visible"&&Se!=="clip",Ne=(Se,de)=>{if(Se.clientHeight<Se.scrollHeight||Se.clientWidth<Se.scrollWidth){const Me=getComputedStyle(Se,null);return ft(Me.overflowY,de)||ft(Me.overflowX,de)||(ye=>{const ht=(je=>{if(!je.ownerDocument||!je.ownerDocument.defaultView)return null;try{return je.ownerDocument.defaultView.frameElement}catch(Ie){return null}})(ye);return!!ht&&(ht.clientHeight<ye.scrollHeight||ht.clientWidth<ye.scrollWidth)})(Se)}return!1},ze=(Se,de,Me,ye,ht,je,Ie,Re)=>je<Se&&Ie>de||je>Se&&Ie<de?0:je<=Se&&Re<=Me||Ie>=de&&Re>=Me?je-Se-ye:Ie>de&&Re<Me||je<Se&&Re>Me?Ie-de+ht:0,me=Se=>{const de=Se.parentElement;return de==null?Se.getRootNode().host||null:de},Je=(Se,de)=>{var Me,ye,ht,je;if(typeof document=="undefined")return[];const{scrollMode:Ie,block:Re,inline:De,boundary:ot,skipOverflowHiddenElements:lt}=de,wt=typeof ot=="function"?ot:st=>st!==ot;if(!ae(Se))throw new TypeError("Invalid target");const mt=document.scrollingElement||document.documentElement,pt=[];let dt=Se;for(;ae(dt)&&wt(dt);){if(dt=me(dt),dt===mt){pt.push(dt);break}dt!=null&&dt===document.body&&Ne(dt)&&!Ne(document.documentElement)||dt!=null&&Ne(dt,lt)&&pt.push(dt)}const rt=(ye=(Me=window.visualViewport)==null?void 0:Me.width)!=null?ye:innerWidth,Qt=(je=(ht=window.visualViewport)==null?void 0:ht.height)!=null?je:innerHeight,{scrollX:Oe,scrollY:$e}=window,{height:Lt,width:Pe,top:Ze,right:ke,bottom:Ue,left:Ht}=Se.getBoundingClientRect(),{top:St,right:Ct,bottom:at,left:pe}=(st=>{const we=window.getComputedStyle(st);return{top:parseFloat(we.scrollMarginTop)||0,right:parseFloat(we.scrollMarginRight)||0,bottom:parseFloat(we.scrollMarginBottom)||0,left:parseFloat(we.scrollMarginLeft)||0}})(Se);let ue=Re==="start"||Re==="nearest"?Ze-St:Re==="end"?Ue+at:Ze+Lt/2-St+at,_e=De==="center"?Ht+Pe/2-pe+Ct:De==="end"?ke+Ct:Ht-pe;const yt=[];for(let st=0;st<pt.length;st++){const we=pt[st],{height:Xe,width:Ge,top:Mt,right:ut,bottom:Ce,left:ve}=we.getBoundingClientRect();if(Ie==="if-needed"&&Ze>=0&&Ht>=0&&Ue<=Qt&&ke<=rt&&(we===mt&&!Ne(we)||Ze>=Mt&&Ue<=Ce&&Ht>=ve&&ke<=ut))return yt;const Le=getComputedStyle(we),Ve=parseInt(Le.borderLeftWidth,10),xe=parseInt(Le.borderTopWidth,10),We=parseInt(Le.borderRightWidth,10),Ke=parseInt(Le.borderBottomWidth,10);let et=0,nt=0;const Ye="offsetWidth"in we?we.offsetWidth-we.clientWidth-Ve-We:0,bt="offsetHeight"in we?we.offsetHeight-we.clientHeight-xe-Ke:0,kt="offsetWidth"in we?we.offsetWidth===0?0:Ge/we.offsetWidth:0,Jt="offsetHeight"in we?we.offsetHeight===0?0:Xe/we.offsetHeight:0;if(mt===we)et=Re==="start"?ue:Re==="end"?ue-Qt:Re==="nearest"?ze($e,$e+Qt,Qt,xe,Ke,$e+ue,$e+ue+Lt,Lt):ue-Qt/2,nt=De==="start"?_e:De==="center"?_e-rt/2:De==="end"?_e-rt:ze(Oe,Oe+rt,rt,Ve,We,Oe+_e,Oe+_e+Pe,Pe),et=Math.max(0,et+$e),nt=Math.max(0,nt+Oe);else{et=Re==="start"?ue-Mt-xe:Re==="end"?ue-Ce+Ke+bt:Re==="nearest"?ze(Mt,Ce,Xe,xe,Ke+bt,ue,ue+Lt,Lt):ue-(Mt+Xe/2)+bt/2,nt=De==="start"?_e-ve-Ve:De==="center"?_e-(ve+Ge/2)+Ye/2:De==="end"?_e-ut+We+Ye:ze(ve,ut,Ge,Ve,We+Ye,_e,_e+Pe,Pe);const{scrollLeft:Wt,scrollTop:se}=we;et=Jt===0?0:Math.max(0,Math.min(se+et/Jt,we.scrollHeight-Xe/Jt+bt)),nt=kt===0?0:Math.max(0,Math.min(Wt+nt/kt,we.scrollWidth-Ge/kt+Ye)),ue+=se-et,_e+=Wt-nt}yt.push({el:we,top:et,left:nt})}return yt},Ae=Se=>Se===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(Se)?Se:{block:"start",inline:"nearest"};function Qe(Se,de){if(!Se.isConnected||!(ht=>{let je=ht;for(;je&&je.parentNode;){if(je.parentNode===document)return!0;je=je.parentNode instanceof ShadowRoot?je.parentNode.host:je.parentNode}return!1})(Se))return;const Me=(ht=>{const je=window.getComputedStyle(ht);return{top:parseFloat(je.scrollMarginTop)||0,right:parseFloat(je.scrollMarginRight)||0,bottom:parseFloat(je.scrollMarginBottom)||0,left:parseFloat(je.scrollMarginLeft)||0}})(Se);if((ht=>typeof ht=="object"&&typeof ht.behavior=="function")(de))return de.behavior(Je(Se,de));const ye=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:ht,top:je,left:Ie}of Je(Se,Ae(de))){const Re=je-Me.top+Me.bottom,De=Ie-Me.left+Me.right;ht.scroll({top:Re,left:De,behavior:ye})}}}}]);