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__Ex...

1105 lines
676 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[7043],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(It,Wt){"use strict";Wt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11081: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 It={},Wt="5.0",he={},ne=null,Ue=!1,Ne=!1,qe=null,ve=!1,me=null,Re=null,Ge=0;Ge<arguments.length;Ge++){var we=arguments[Ge];if(we!==null)switch(typeof we){case"number":Wt=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?Wt=we:qe=we;break;case"object":typeof we.is3D!="undefined"?ne=we:he=we;break;case"boolean":Ue=we,Ne=!0;break}}ne===null&&(ne={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},he.material_id!==void 0&&!Ne&&(Ue=!0)),qe!==null&&he.id===void 0&&(he.id=qe);var fe="",Ke="",pe=!1,et=null,He=null,Ce=null,Ee=!1,Se=null,Xe=null,rt=null,Je=null,$e=null;he.height!==void 0&&(he.height=Math.round(he.height)),he.width!==void 0&&(he.width=Math.round(he.width));var Le=function(Ie){return parseFloat(Ie)>4?parseFloat(Ie):5};It.setHTML5Codebase=function(Ie,tt){Re=Ie,dt(Ie,tt)},It.setJavaCodebase=It.setJavaCodebaseVersion=It.isCompiledInstalled=It.setPreCompiledScriptPath=It.setPreCompiledResourcePath=function(){},It.setHTML5CodebaseVersion=function(Ie,tt){var at=parseFloat(Ie);if(at!==NaN&&at<5){console.log("The GeoGebra HTML5 codebase version "+at+" is deprecated. Using version latest instead.");return}me=Ie,de(Ie,tt)},It.getHTML5CodebaseVersion=function(){return He},It.getParameters=function(){return he},It.setFontsCSSURL=function(Ie){Je=Ie},It.setGiacJSURL=function(Ie){},It.setJNLPFile=function(Ie){fe=Ie},It.setJNLPBaseDir=function(Ie){},It.inject=function(){function Ie(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var tt="auto",at=he.id,dn,ht=!1,Dt=0;Dt<arguments.length;Dt++){var We=arguments[Dt];typeof We=="string"?(We=We.toLowerCase(),We.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?tt=We:at=arguments[Dt]):typeof We=="boolean"?ht=We:We instanceof HTMLElement&&(dn=We)}mt();function mt(){if(!ve){setTimeout(mt,200);return}tt=Lt(tt);var Et=dn||document.getElementById(at);if(!Et){console.log("possibly bug on ajax loading? ");return}if(It.removeExistingApplet(Et,!1),he.width===void 0&&Et.clientWidth&&(he.width=Et.clientWidth),he.height===void 0&&Et.clientHeight&&(he.height=Et.clientHeight),!(he.width&&he.height)&&tt==="html5"&&(delete he.width,delete he.height),et=tt,tt==="screenshot")Fe(Et,he);else{var ae=!1;he.hasOwnProperty("playButton")&&he.playButton||he.hasOwnProperty("clickToLoad")&&he.clickToLoad?ae=!0:he.hasOwnProperty("playButtonAutoDecide")&&he.playButtonAutoDecide&&(ae=(!ct()||Ie())&&lt()),ae?(et="screenshot",Kt(Et,he,ht,tt)):Qe(Et,he,ht)}}};function ct(){try{return window.self!==window.top}catch(Ie){return!0}}function lt(){return he.hasOwnProperty("screenshotGenerator")&&he.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}It.getViews=function(){return ne},It.isJavaInstalled=function(){return!1};var Ut=function(Ie){var tt=function(Dt){var We=JSON.parse(Dt),mt=function(te){return te.type=="G"||te.type=="E"},Et=We.elements?We.elements.filter(mt)[0]:We;if(!Et||!Et.url){at();return}he.fileName=Et.url,Me(Et.settings||{}),ne.is3D=!0;var ae="https://www.geogebra.org/images/";It.setPreviewImage(Se||Et.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),Ie()},at=function(){he.onError&&he.onError(),Jt("Error: Fetching material (id "+he.material_id+") failed.",he)},dn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",ht="/materials/"+he.material_id+"?scope=basic";Ze("https://"+dn+"/api/proxy.php?path="+encodeURIComponent(ht),tt,at)};function Me(Ie){var tt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(at){Ie[at]=!!Ie[at]}),tt.forEach(function(at){he[at]===void 0&&Ie[at]!==void 0&&(he[at]=Ie[at])}),he.showToolBarHelp===void 0&&(he.showToolBarHelp=he.showToolBar)}function Ze(Ie,tt,at){var dn=new XMLHttpRequest;dn.open("GET",Ie),dn.onload=function(){tt(dn.responseText)},dn.onerror=at,dn.send()}It.isHTML5Installed=function(){return!0},It.getLoadedAppletType=function(){return et},It.setPreviewImage=function(Ie,tt,at){Se=Ie,Xe=tt,rt=at},It.removeExistingApplet=function(Ie,tt){var at;typeof Ie=="string"&&(Ie=document.getElementById(Ie)),et=null;var dn=null;for(at=0;at<Ie.childNodes.length;at++){var ht=Ie.childNodes[at],Dt=ht.className;Dt==="applet_screenshot"?tt?(ht.style.display="block",et="screenshot"):ht.style.display="none":Dt!=="applet_scaler prerender"&&(Ie.removeChild(ht),dn=Dt&&Dt.indexOf("appletParameters")!=-1?ht.id:null,at--)}var We=he.id!==void 0?he.id:dn,mt=window[We];mt&&typeof mt.getBase64=="function"&&(mt.remove(),window[We]=null)},It.refreshHitPoints=function(){if(Le(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ie=It.getAppletObject();return Ie&&typeof Ie.recalculateEnvironments=="function"?(Ie.recalculateEnvironments(),!0):!1},It.startAnimation=function(){var Ie=It.getAppletObject();return Ie&&typeof Ie.startAnimation=="function"?(Ie.startAnimation(),!0):!1},It.stopAnimation=function(){var Ie=It.getAppletObject();return Ie&&typeof Ie.stopAnimation=="function"?(Ie.stopAnimation(),!0):!1},It.getAppletObject=function(){var Ie=he.id!==void 0?he.id:"ggbApplet";return window[Ie]},It.resize=function(){};var nt=function(Ie,tt,at){var dn=document.createElement("param");dn.setAttribute("name",tt),dn.setAttribute("value",at),Ie.appendChild(dn)},Pe=function(Ie){return Ie&&Ie!=="false"},Qe=function(Ie,tt,at){Le(He)<=4.2&&(at=!0);var dn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==He||ggbHTML5LoadedCodebaseIsWebSimple&&!Ee)&&(dn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var ht=document.createElement("div");ht.classList.add("appletParameters","notranslate");var Dt=tt.width,We=tt.height;if(tt.disableAutoScale=tt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():tt.disableAutoScale,tt.width!==void 0)if(Le(He)<=4.4)Pe(tt.showToolBar)&&(tt.height-=7),Pe(tt.showAlgebraInput)&&(tt.height-=37),tt.width<605&&Pe(tt.showToolBar)&&(tt.width=605,Dt=605);else{var mt=100;(Pe(tt.showToolBar)||Pe(tt.showMenuBar))&&(tt.hasOwnProperty("customToolBar")&&(tt.customToolbar=tt.customToolBar),mt=Pe(tt.showMenuBar)?245:155),Dt<mt&&(tt.width=mt,Dt=mt)}ht.style.border="none",ht.style.display="inline-block";for(var Et in tt)tt.hasOwnProperty(Et)&&Et!=="appletOnLoad"&&ht.setAttribute("data-param-"+Et,tt[Et]);Je&&ht.setAttribute("data-param-fontscssurl",Je),It.resize=function(){GGBAppletUtils.responsiveResize(Ie,tt)},window.addEventListener("resize",function($t){It.resize()});var ae=typeof tt.appletOnLoad=="function"?tt.appletOnLoad:function(){};if(!at&&tt.width!==void 0){tt.hasOwnProperty("showSplash")||ht.setAttribute("data-param-showSplash","false");var te=Ie.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var oe=te.querySelector(".ggb_preview");else{var oe=mn(Dt,We,tt.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=Dt+"px",te.style.height=We+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),Le(He)>=5?(tt.appletOnLoad=function($t){var Yt=Ie.querySelector(".ggb_preview");Yt&&Yt.parentNode.removeChild(Yt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),ae($t)},z||te.appendChild(oe)):ht.appendChild(oe),te.appendChild(ht),z||Ie.appendChild(te),setTimeout(function(){It.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(ht),Ie.appendChild(se),tt.appletOnLoad=function($t){It.resize(),ae($t)}}function ie($t,Yt){Yt&&typeof Yt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement($t,Yt.appletOnLoad):renderGGBElement($t),Jt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Yt)}function xe($t,Yt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:$t,params:Yt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ln){ie(ln.article,ln.params)}),html5AppletsToProcess=null)},Le(He)<5&&($t.className+=" geogebraweb")):ie($t,Yt)}if(dn){scriptLoadStarted=!0;for(var Ve=0;Ve<ht.childNodes.length;Ve++){var Mt=ht.childNodes[Ve].tagName;Mt==="TABLE"&&(ht.removeChild(ht.childNodes[Ve]),Ve--)}if(ggbHTML5LoadedScript!==null){var kt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');kt!=null&&kt.parentNode.removeChild(kt)}var pt=document.createElement("script"),St=function(){xe(ht,tt)};pt.src=Ke+Ce,ggbHTML5LoadedCodebaseIsWebSimple=Ee,ggbHTML5LoadedCodebaseVersion=He,ggbHTML5LoadedScript=pt.src,Jt("GeoGebra HTML5 codebase loaded: '"+Ke+"'.",tt),!Re&&(!me||me=="5.0")?(Ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),St()):Ke.requirejs?__webpack_require__.e(981).then(function(){var $t=[__webpack_require__(60981)];St.apply(null,$t)}.bind(this)).catch(__webpack_require__.oe):(pt.onload=St,Ie.appendChild(pt))}else xe(ht,tt);tt.height=We,tt.width=Dt},Fe=function(Ie,tt,at){var dn=mn(tt.width,tt.height,tt.borderColor,at),ht=document.createElement("div");ht.style.position="relative",ht.style.display="block",ht.style.width=tt.width+"px",ht.style.height=tt.height+"px",ht.className="applet_screenshot applet_scaler"+(at?" applet_screenshot_play":""),ht.appendChild(dn);var Dt=GGBAppletUtils.getScale(tt,Ie,at);at?(Ie.appendChild(xt()),window.GGBT_wsf_view||(Ie.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ht,"66%"),Ie.appendChild(ht),Dt!==1&&!isNaN(Dt)&&(GGBAppletUtils.scaleElement(ht,Dt),ht.style.width=tt.width+"px",ht.style.height=tt.height+"px",ht.parentNode.style.width=tt.width*Dt+"px",ht.parentNode.style.height=tt.height*Dt+"px"),It.resize=function(){it(Ie,dn,ht,at)},window.addEventListener("resize",function(We){It.resize()}),It.resize()};function it(Ie,tt,at,dn){if(Ie.contains(tt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ie.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ie)}var ht=GGBAppletUtils.getScale(he,Ie,dn);at.parentNode!==null&&(!isNaN(ht)&&ht!==1?(GGBAppletUtils.scaleElement(at,ht),at.parentNode.style.width=he.width*ht+"px",at.parentNode.style.height=he.height*ht+"px"):(GGBAppletUtils.scaleElement(at,1),at.parentNode.style.width=he.width+"px",at.parentNode.style.height=he.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ie),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}It.onExitFullscreen=function(Ie,tt){tt.appendChild(Ie)};var Kt=function(Ie,tt,at,dn){Fe(Ie,tt,!0);for(var ht=function(){var mt=[];for(We=0;We<Ie.childNodes.length;We++)mt.push(Ie.childNodes[We]);if(window.GGBT_wsf_view){var Et=window.GGBT_wsf_view.renderFullScreen(Ie,tt.id),ae=document.getElementById("fullscreencontainer"),te=jQuery(Ie).find(".fullscreencontent");te.length>0?(Et.remove(),te.attr("id","fullscreencontent").show(),jQuery(ae).append(te),window.dispatchEvent(new Event("resize"))):Qe(Et,tt,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else et=dn,Qe(Ie,tt,!1);if(!window.GGBT_wsf_view)for(We=0;We<mt.length;We++)Ie.removeChild(mt[We])},Dt=Ie.getElementsByClassName("ggb_preview_play"),We=0;We<Dt.length;We++)Dt[We].addEventListener("click",ht,!1),Dt[We].addEventListener("ontouchstart",ht,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ie),lt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},xt=function(){var Ie=document.createElement("div");if(Ie.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var tt='.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");}',at=document.createElement("style");at.styleSheet?at.styleSheet.cssText=tt:at.appendChild(document.createTextNode(tt)),document.getElementsByTagName("head")[0].appendChild(at)}return Ie},mn=function(Ie,tt,at,dn){var ht=document.createElement("div");ht.className="ggb_preview",ht.style.position="absolute",ht.style.zIndex="90",ht.style.width=Ie-2+"px",ht.style.height=tt-2+"px",ht.style.top="0px",ht.style.left="0px",ht.style.overflow="hidden",ht.style.backgroundColor="white";var Dt="lightgrey";at!==void 0&&(at==="none"?Dt="transparent":Dt=at),ht.style.border="1px solid "+Dt;var We=document.createElement("img");if(We.style.position="relative",We.style.zIndex="1000",We.style.top="-1px",We.style.left="-1px",Se!==null&&We.setAttribute("src",Se),We.style.opacity=.7,Xe!==null){var mt,Et,ae;if(!dn){mt=document.createElement("img"),mt.style.position="absolute",mt.style.zIndex="1001",mt.style.opacity=1,We.style.opacity=.3,Et=360,Et>Ie/4*3&&(Et=Ie/4*3),ae=Et/5.8,mt.setAttribute("src",Xe),mt.setAttribute("width",Et),mt.setAttribute("height",ae);var te=(Ie-Et)/2,z=(tt-ae)/2;mt.style.left=te+"px",mt.style.top=z+"px",ht.appendChild(mt)}}return ht.appendChild(We),ht},Lt=function(Ie){return Ie=Ie.toLowerCase(),Ie==="html5"||Ie==="screenshot"?Ie:"html5"},ge=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Ie,tt){if(He=Ie,tt){dt(He,!0);return}var at=!Ue;if(at){var dn=Le(He);!isNaN(dn)&&dn<4.4&&(at=!1)}var ht,Dt;window.location.protocol.substr(0,4)==="http"?ht=window.location.protocol:ht="http:";var We=He.indexOf("//");We>0?Dt=He:We===0?Dt=ht+He:Dt="https://www.geogebra.org/apps/5.2.814.0/";for(var mt in ge)if(He.slice(ge[mt].length*-1)===ge[mt]||He.slice((ge[mt].length+1)*-1)===ge[mt]+"/"){dt(Dt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&at&&!ne.is3D&&!ne.AV&&!ne.SV&&!ne.CV&&!ne.EV2&&!ne.CP&&!ne.PC&&!ne.DA&&!ne.FI&&!ne.PV&&!Pe(he.showToolBar)&&!Pe(he.showMenuBar)&&!Pe(he.showAlgebraInput)&&!Pe(he.enableRightClick)&&(!he.appName||he.appName=="classic")?Dt+="webSimple/":Dt+="web3d/",dt(Dt,!1)},dt=function(Ie,tt){if(Ie.requirejs){Ke=Ie;return}Ie.slice(-1)!=="/"&&(Ie+="/"),Ke=Ie,tt===null&&(tt=Ie.indexOf("http")===-1),pe=tt,Ce="web.nocache.js",Ee=!1;var at=Ke.split("/");at.length>1&&(!tt&&at[at.length-2]==="webSimple"?(Ce="webSimple.nocache.js",Ee=!0):ge.indexOf(at[at.length-2])>=0&&(Ce=at[at.length-2]+".nocache.js")),at=Ie.split("/"),He=at[at.length-3],He.substr(0,4)==="test"?He=He.substr(4,1)+"."+He.substr(5,1):(He.substr(0,3)==="war"||He.substr(0,4)==="beta")&&(He="5.0");var dn=parseFloat(He);dn!==NaN&&dn<5&&Ie.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+dn+" is deprecated. Using version latest instead."),de("5.0",tt))},Jt=function(Ie,tt){window.console&&window.console.log&&(!tt||typeof tt.showLogging=="undefined"||tt.showLogging&&tt.showLogging!=="false")&&console.log(Ie)};he.material_id!==void 0?Ut(yt):yt();function yt(){var Ie=Wt;me!==null?Ie=me:parseFloat(Ie)<5&&(Ie="5.0"),de(Ie,!1),Re!==null&&dt(Re,pe),ve=!0}return It},GGBAppletUtils=function(){"use strict";function It(){return window.GGBT_wsf_edit!==void 0}function Wt(ve,me){me!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+me+","+me+")",ve.style.webkitTransform="scale("+me+","+me+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function he(ve,me,Re,Ge,we,fe){var Ke=null;if(fe!=null&&fe!="")for(var pe=ve.parentNode;pe!=null;)if((" "+pe.className+" ").indexOf(" "+fe+" ")>-1){Ke=pe;break}else pe=pe.parentNode;var et=0,He=0,Ce=0,Ee=0,Se=0,Xe=0,rt=0;if(Ke)et=Ke.offsetWidth,He=Math.max(Ge?Ke.offsetWidth:0,Ke.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(et=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),Ce=et):(et=window.innerWidth,He=window.innerHeight,Ce=window.innerWidth),ve){var Je=ve.getBoundingClientRect();Je.left>0&&Je.left<=et&&(we===void 0||!we)&&(document.dir==="rtl"?(Se=et-Je.width-Je.left,Xe=Ce<=480?10:30):(Xe=Je.left,Se=Ce<=480?10:30),Ee=Xe+Se)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var $e=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee=40,rt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ee=0,rt=40)}}return ve&&((Re===void 0||!Re)&&me>0&&me+Ee<et?et=me:et-=Ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Re===void 0||!Re)&&(He-=rt)),{width:et,height:He}}function ne(ve,me,Re,Ge,we){if(ve.isScreenshoGenerator)return 1;var fe=Ge!==void 0&&Ge,Ke=ve.noScaleMargin!=null&&ve.noScaleMargin,pe=function($e){return $e&&$e!=="false"},et=pe(ve.autoHeight),He=he(me,ve.width,Re,et,fe&&window.GGBT_wsf_view||Ke,we),Ce=parseInt(He.width),Ee=ve.width,Se=ve.height;if(Ee===void 0){var Xe=me.querySelector(".appletParameters");Xe&&(Ee=Xe.offsetWidth,Se=Xe.offsetHeight)}var rt=Ce/Ee,Je=fe?1:He.height/Se;return Re!==void 0&&!Re&&(rt=Math.min(1,rt),Je=Math.min(1,Je)),Math.min(rt,Je)}function Ue(ve,me,Re){var Ge=1,we,fe=!1;if(ve.hasOwnProperty("allowUpscale")&&(fe=ve.allowUpscale),ve.hasOwnProperty("scale")&&(Ge=parseFloat(ve.scale),(isNaN(Ge)||Ge===null||Ge===0)&&(Ge=1),Ge>1&&(fe=!0)),me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))we=ne(ve,me,fe,Re,ve.scaleContainerClass);else return Ge;return fe&&(!ve.hasOwnProperty("scale")||Ge===1)?we:Math.min(Ge,we)}function Ne(ve){var me=Math.min(window.innerWidth,document.documentElement.clientWidth),Re=Math.min(window.innerHeight,document.documentElement.clientHeight),Ge=ve.getBoundingClientRect(),we=(me-Ge.width)/2,fe=(Re-Ge.height)/2;fe<0&&(fe=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?ve.style.left="40px":ve.style.left=we+"px",ve.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?ve.style.top="40px":ve.style.top=fe+"px",ve.style.left=we+"px")}function qe(ve,me){var Re=ve.querySelector(".appletParameters");if(Re){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(me.id!==Re.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(Re.parentElement&&/fullscreen/.test(Re.parentElement.className))return;var Ge=Ue(me,ve);It()&&Re.setAttribute("data-param-scale",Ge);for(var we=null,fe=0;fe<ve.childNodes.length;fe++)if(ve.childNodes[fe].className!==void 0&&ve.childNodes[fe].className.match(/^applet_scaler/)){we=ve.childNodes[fe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var Ke=me.id!==void 0?me.id:"ggbApplet",pe=window[Ke];(pe==null||!pe.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Ge)&&Ge!==1?(we.parentNode.style.width=me.width*Ge+"px",we.parentNode.style.height=me.height*Ge+"px",Wt(we,Ge)):(Wt(we,1),we.parentNode.style.width=me.width+"px",we.parentNode.style.height=me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ne(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Re).parents(".content-added-content"))}}return{responsiveResize:qe,isFlexibleWorksheetEditor:It,positionCenter:Ne,getScale:Ue,scaleElement:Wt}}();__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 It=n.location.search;return It.indexOf(J)!=-1||It.indexOf(K)!=-1}function q(It,Wt){}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(It){var Wt=s[L].bindings;s[L].bindings=function(){for(var he=Wt?Wt():{},ne=It[webModule.__softPermutationId],Ue=O;Ue<ne.length;Ue++){var Ne=ne[Ue];he[Ne[O]]=Ne[P]}return he}};var t;function u(){return v(),t}function v(){if(!t){var It=o.createElement(Q);if(It.id=L,It.style.cssText=R+S,It.tabIndex=-1,o.body.appendChild(It),t=It.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Wt=document.compatMode==U?V:W;t.write(Wt+X),t.close()}}}function w(It){function Wt(ne){function Ue(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ne=Ue();if(Ne){ne();return}function qe(){if(!Ne){if(!Ue())return;Ne=!0,ne(),o.removeEventListener&&o.removeEventListener(Z,qe,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,qe,!1);var ve=setInterval(function(){qe()},$)}function he(ne){var Ue=u(),Ne=Ue.body,qe=Ue.createElement(_);qe.language=ab,qe.crossOrigin=W,qe.src=ne,webModule.__errFn&&(qe.onerror=function(){webModule.__errFn(L,new Error(bb+ne))}),Ne.appendChild(qe)}Wt(function(){he(It)})}webModule.__startLoadingFragment=function(It){return C(It)},webModule.__installRunAsyncCode=function(It){var Wt=u(),he=Wt.body,ne=Wt.createElement(_);ne.language=ab,ne.text=It,he.appendChild(ne),he.removeChild(ne)};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(It){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(It){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(It){var Wt=c[It];return Wt==null?null:Wt},r=d,webModule.__errFn=e}function B(){function It(ve){var me=ve.lastIndexOf(rb);me==-1&&(me=ve.length);var Re=ve.indexOf(sb);Re==-1&&(Re=ve.length);var Ge=ve.lastIndexOf(tb,Math.min(Re,me));return Ge>=O?ve.substring(O,Ge+P):W}function Wt(ve){if(!ve.match(/^\w+:\/\//)){var me=o.createElement(ub);me.src=ve+vb,ve=It(me.src)}return ve}function he(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function ne(){for(var ve=o.getElementsByTagName(_),me=O;me<ve.length;++me)if(ve[me].src.indexOf(xb)!=-1)return It(ve[me].src);return W}function Ue(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Ne(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var qe=he();return qe==W&&(qe=ne()),qe==W&&(qe=Ue()),qe==W&&Ne()&&(qe=It(o.location.href)),qe=Wt(qe),qe}function C(It){return It.match(/^\//)||It.match(/^[a-zA-Z]+:\/\//)?It:webModule.__moduleBase+It}function D(){var It=[],Wt=O,he=[],ne=[];function Ue(ve){var me=ne[ve](),Re=he[ve];if(me in Re)return me;var Ge=[];for(var we in Re)Ge[Re[we]]=we;throw r&&r(ve,Ge,me),null}if(__gwt_isKnownPropertyValue=function(ve,me){return me in he[ve]},webModule.__getPropMap=function(){var ve={};for(var me in he)he.hasOwnProperty(me)&&(ve[me]=Ue(me));return ve},webModule.__computePropValue=Ue,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var qe=Ne.indexOf(Db);qe!=-1&&(Wt=parseInt(Ne.substring(qe+P),$),Ne=Ne.substring(O,qe))}catch(ve){}return webModule.__softPermutationId=Wt,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})()},67303:function(It,Wt,he){"use strict";he.d(Wt,{Ax:function(){return qe},Ds:function(){return ve},KI:function(){return Re},SI:function(){return Ne},f1:function(){return Ue}});var ne=he(90524);function Ue(Ge){let we=!0;if(Ge.length>0){for(let fe=0;fe<Ge.length;fe++)if(Ge[fe].compile_success==0||!Ge[fe].compile_success){we=!1;break}}else we=!1;return we}function Ne(Ge,we=""){let fe=[];for(let Ke=0;Ke<Ge.length;Ke++){let pe=Ge[Ke],et=we?`${we}/${pe.name}`:`${pe.name}`;fe.push({title:pe.name,type:pe.type,isLeaf:pe.type!=="tree",key:et})}return fe}function qe(Ge,we,fe){for(let Ke=0;Ke<Ge.length;Ke++){let pe=Ge[Ke];if(pe.key===we){pe.children=fe;break}pe.children&&qe(pe.children,we,fe)}return Ge}function ve(Ge,we,fe){let Ke;return function(){let pe=this,et=arguments,He=function(){Ke=null,fe||Ge.apply(pe,et)},Ce=fe&&!Ke;clearTimeout(Ke),Ke=setTimeout(He,we),Ce&&Ge.apply(pe,et)}}const me=!0,Re=ne.Z.API_SERVER},20927:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return we}});var ne=he(59301),Ue=he(37568),Ne=he(96599),qe=he(6767),ve={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},me=he(62772);const{TextArea:Re}=Ue.default;class Ge extends ne.Component{constructor(Ke){super(Ke),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Ke,onAnswerChange:pe,addChildAnswer:et,exerciseIsPublish:He,answers:Ce,activeOptionErrorIndex:Ee,flex:Se="0 0 1000px"}=this.props;console.log("----",Ce);let{inputVisible:Xe,EditInputIndex:rt}=this.state;return ne.createElement("div",{className:ve.flex},ne.createElement("div",{className:`${ve.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Ke+1,"):"),ne.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},Ce==null?void 0:Ce.map((Je,$e)=>ne.createElement(ne.Fragment,null,rt!==$e?(Je==null?void 0:Je.length)>0?ne.createElement(Ne.default,{className:"edit-tag",key:Je,closable:!((Ce==null?void 0:Ce.length)===1&&$e===0),onClose:Le=>{Le.preventDefault(),(Ce==null?void 0:Ce.length)===1&&$e===0?this.props.deleteChildAnswermain(Ke,$e):this.props.deleteChildAnswer(Ke,$e)}},ne.createElement("span",{onDoubleClick:Le=>{this.setState({EditInputIndex:$e}),Le.preventDefault()}},Je)):ne.createElement(Ue.default,{defaultValue:Je,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Le=>{if(Le.target.value.replaceAll(" ","").length<=0){qe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}pe(Ke,$e,Le.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):ne.createElement(Ue.default,{defaultValue:Je,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Le=>{if(Le.target.value.replaceAll(" ","").length<=0){qe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}pe(Ke,$e,Le.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!Xe&&ne.createElement(Ne.default,{className:"site-tag-plus",onClick:()=>{et(Ke),this.setState({inputVisible:!0})}},ne.createElement(me.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var we=Ge},48106:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return He}});var ne=he(59301),Ue=he(2978),Ne=Object.defineProperty,qe=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,we=(Ce,Ee,Se)=>Ee in Ce?Ne(Ce,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Ce[Ee]=Se,fe=(Ce,Ee)=>{for(var Se in Ee||(Ee={}))Re.call(Ee,Se)&&we(Ce,Se,Ee[Se]);if(me)for(var Se of me(Ee))Ge.call(Ee,Se)&&we(Ce,Se,Ee[Se]);return Ce},Ke=(Ce,Ee)=>qe(Ce,ve(Ee)),pe=(Ce,Ee,Se)=>we(Ce,typeof Ee!="symbol"?Ee+"":Ee,Se);const et="\u2581";class He extends ne.Component{constructor(){super(...arguments),pe(this,"getChCountBeforeCursor",(Ee,Se)=>{const Xe=Se.line;let rt=0;for(let $e=0;$e<Xe;$e++)rt+=Ee.getLine($e).split(et).length-1;const Je=Ee.getLine(Xe).substring(0,Se.ch);return rt+=Je.split(et).length-1,rt}),pe(this,"onCMBeforeChange",(Ee,Se)=>{const Xe=Ee.getRange(Se.from,Se.to);let rt=0;if(Se.text.forEach(Je=>{rt+=Je.split(et).length-1}),Xe&&Xe.indexOf(et)!=-1){const Je=Xe.split(et).length-1,$e=this.getChCountBeforeCursor(Ee,Se.from);console.log(`\u5220\u9664${Je}\u4E2A\uFF0C \u4E4B\u524D\u6709${$e}\u4E2A\uFF0C\u65B0\u589E${rt}\u4E2A`),this.props.deleteEmptyDisabled?Se.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange($e,Je,rt)}else if(rt){const Je=this.getChCountBeforeCursor(Ee,Se.from);console.log(`\u65B0\u589E${rt}\u4E2A\uFF0C\u4E4B\u524D\u6709${Je}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Je,0,rt)}})}render(){return ne.createElement(Ue.Z,Ke(fe({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},6077:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Ke}});var ne=he(59301),Ue={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=he(92310),qe=he.n(Ne),ve=he(29787),me=he(2859),Re=he(82093),Ge=he(49661),we=(pe,et,He)=>new Promise((Ce,Ee)=>{var Se=Je=>{try{rt(He.next(Je))}catch($e){Ee($e)}},Xe=Je=>{try{rt(He.throw(Je))}catch($e){Ee($e)}},rt=Je=>Je.done?Ce(Je.value):Promise.resolve(Je.value).then(Se,Xe);rt((He=He.apply(pe,et)).next())}),Ke=({data:pe,className:et,fullWidth:He,style:Ce={},onClose:Ee,onOk:Se,showFullTools:Xe,noAssociationId:rt})=>{const Je=(0,ne.useRef)(null),$e=(0,ne.useRef)(null),Le=(0,ne.useRef)(null),ct=(0,ne.useRef)(null),[lt,Ut]=(0,ne.useState)(!1),[Me,Ze]=(0,ne.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ne.useEffect)(()=>(Le.current||(Le.current=document.createElement("style"),document.head.appendChild(Le.current)),pe!=null&&pe.visible?(document.body.setAttribute("data-custom","y-hidden"),Le.current.innerHTML=" html { overflow-y: hidden; }",pe!=null&&pe.src&&nt()):(document.body.removeAttribute("data-custom"),Le.current&&(document.head.removeChild(Le.current),Le.current=null)),()=>{document.body.removeAttribute("data-custom"),Le.current&&(document.head.removeChild(Le.current),Le.current=null)}),[pe==null?void 0:pe.visible]);const nt=()=>we(void 0,null,function*(){Ut(!0),Ze("\u6B63\u5728\u52A0\u8F7D\u4E2D");const it=yield(0,Ge.ZJ)(pe==null?void 0:pe.src);Je.current.src="",Je.current.src=it,Je.current.onload=function(){Fe()},Ut(!1),Ze("")}),Pe=it=>we(void 0,null,function*(){Ut(!0),Ze("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Kt=yield(0,Re.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:pe.title,file:it.dataUrl}});Kt!=null&&Kt.id&&!rt?(yield(0,Re.ZP)(`/api/attachments/${pe.id}/add_subitem.json`,{method:"post",body:{subitem_id:Kt==null?void 0:Kt.id,settings:JSON.stringify(it.state)}})).status===0&&Se():Kt!=null&&Kt.id&&Se(Kt),Ut(!1),Ze("")}),Qe=()=>{const it=document.querySelector('a[href="https://markerjs.com/"]');it&&it.parentNode&&(it.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(xt=>{const mn=document.querySelector(xt.name);mn&&mn.setAttribute("title",xt.title)})},Fe=()=>{$e.current=new me.hP(Je.current),$e.current.targetRoot=ct.current,$e.current.addEventListener("render",Pe),$e.current.addEventListener("beforeclose",Ee),Xe&&($e.current.availableMarkerTypes=$e.current.ALL_MARKER_TYPES,$e.current.uiStyleSettings.redoButtonVisible=!0,$e.current.uiStyleSettings.notesButtonVisible=!0,$e.current.uiStyleSettings.zoomButtonVisible=!0,$e.current.uiStyleSettings.zoomOutButtonVisible=!0,$e.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=$e.current.uiStyleSettings,$e.current.show(),pe!=null&&pe.snapshotData&&$e.current.restoreState(pe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Qe()},300)};return ne.createElement(ne.Fragment,null,(pe==null?void 0:pe.visible)&&ne.createElement(ve.Z,{spinning:lt,tip:Me,style:{position:"absolute",width:"100vw"}},ne.createElement("div",{ref:ct,className:qe()(Ue.imageDimensions,et,He?Ue.fullWidth:""),style:Ce},ne.createElement("img",{className:Ue.img,ref:Je}))))}},88615:function(It,Wt,he){"use strict";var ne=he(59301),Ue=he(77019),Ne=he(5269),qe=he(20554),ve=he(99571),me=he(38394),Re=he(21697),Ge=he(48136),we=he(59301);const fe=(0,ne.forwardRef)(({callback:Ke,showSaveButton:pe,value:et=""},He)=>{const Ce=(0,ne.useRef)(),Ee=[{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 "}]}]}],Se=[{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}`}]}]}],Xe=$e=>{Ce.current.setValue(Ce.current.getValue()+" "+$e.value+" ")},rt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(Ue.Z,{className:Re.Z.lists,gutter:[10,10]},Ee.map(($e,Le)=>we.createElement(Ne.Z,{flex:"110px",className:Re.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:`$$${$e.value}$$`}),$e.name),we.createElement("div",{className:Re.Z.children},$e.children.map((ct,lt)=>we.createElement("div",{key:lt},we.createElement("h1",null,ct.name),we.createElement(Ue.Z,{gutter:[10,10]},ct.data.map((Ut,Me)=>we.createElement(Ne.Z,{key:Me,onClick:()=>Xe(Ut),className:Re.Z.diamond},we.createElement(me.Z,{value:"`$$"+Ut.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(Ue.Z,{className:Re.Z.lists,gutter:[10,10]},Se.map(($e,Le)=>we.createElement(Ne.Z,{flex:"110px",className:Re.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:"`$$"+$e.value+"$$`"}),$e.name),we.createElement("div",{className:Re.Z.children},$e.children.map((ct,lt)=>we.createElement("div",{key:lt},ct.name&&we.createElement("h1",null,ct.name),we.createElement(Ue.Z,{gutter:[10,10]},ct.data.map((Ut,Me)=>we.createElement(Ne.Z,{key:Me,onClick:()=>Xe(Ut),className:Re.Z.diamond},we.createElement(me.Z,{value:"`$$"+Ut.value+"$$`"}))))))))))}],Je=()=>{var $e=document.createElement("div");$e.innerHTML=Ce.current.getValue();var Le=$e.innerText;return Ke&&Ke(Le),Le};return(0,ne.useImperativeHandle)(He,()=>({getData:Je})),we.createElement("div",{className:Re.Z.mathWrap},we.createElement(qe.default,{defaultActiveKey:"1",items:rt}),we.createElement("math-field",{locale:"zh_cn",className:Re.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ce,style:{width:800,marginTop:30,fontSize:18}},et||""),pe&&we.createElement("div",{className:Re.Z.button},we.createElement(ve.ZP,{size:"large",onClick:Je,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Wt.Z=fe},57884:function(It,Wt,he){"use strict";var ne=he(59301),Ue=he(93314),Ne=he(99571),qe=Object.defineProperty,ve=Object.defineProperties,me=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,fe=(He,Ce,Ee)=>Ce in He?qe(He,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):He[Ce]=Ee,Ke=(He,Ce)=>{for(var Ee in Ce||(Ce={}))Ge.call(Ce,Ee)&&fe(He,Ee,Ce[Ee]);if(Re)for(var Ee of Re(Ce))we.call(Ce,Ee)&&fe(He,Ee,Ce[Ee]);return He},pe=(He,Ce)=>ve(He,me(Ce));const et=({img:He,buttonProps:Ce={},styles:Ee={},customText:Se,ButtonText:Xe,ButtonClick:rt,Buttonclass:Je,ButtonTwo:$e,imgStyles:Le,loading:ct=!1,className:lt=""})=>ne.createElement("section",{className:`tc animated fadeIn ${lt}`,style:Ke({color:"#999",margin:"100px auto",visibility:ct?"hidden":"visible"},Ee)},ne.createElement("img",{src:He||Ue,style:pe(Ke({},Le),{pointerEvents:"none",userSelect:"none"})}),ne.createElement("p",{className:"mt20 font14"},Se||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Xe&&ne.createElement(Ne.ZP,Ke({className:Je,onClick:rt},Ce),Xe),$e&&$e);Wt.Z=et},41550:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Je}});var ne=he(59301),Ue={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ne=he(99571),qe=he(70557),ve=he(51124),me=he(25399),Re=he(49661),Ge=he(72664),we=he(57884),fe=he(90524),Ke=he(14794),pe=he(59301),et=Object.defineProperty,He=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Se=($e,Le,ct)=>Le in $e?et($e,Le,{enumerable:!0,configurable:!0,writable:!0,value:ct}):$e[Le]=ct,Xe=($e,Le)=>{for(var ct in Le||(Le={}))Ce.call(Le,ct)&&Se($e,ct,Le[ct]);if(He)for(var ct of He(Le))Ee.call(Le,ct)&&Se($e,ct,Le[ct]);return $e},rt=($e,Le,ct)=>new Promise((lt,Ut)=>{var Me=Pe=>{try{nt(ct.next(Pe))}catch(Qe){Ut(Qe)}},Ze=Pe=>{try{nt(ct.throw(Pe))}catch(Qe){Ut(Qe)}},nt=Pe=>Pe.done?lt(Pe.value):Promise.resolve(Pe.value).then(Me,Ze);nt((ct=ct.apply($e,Le)).next())}),Je=({editOffice:$e="view",data:Le,issaver:ct,onSaver:lt,theme:Ut,type:Me,filename:Ze,monacoEditor:nt,className:Pe,style:Qe,close:Fe,onClose:it,hasMask:Kt,disabledDownload:xt,onImgDimensions:mn,showNodata:Lt,recordInfo:ge})=>{const[de,dt]=(0,ne.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Jt,yt]=(0,ne.useState)(""),[Ie,tt]=(0,ne.useState)(),at=window.ENV==="build"?"/react/build":"",dn=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,Dt=10*(1024*1024),We=(0,ne.useRef)();Le!=null&&Le.startsWith("/api")&&Me!=="txt"&&(Le=fe.Z.API_SERVER+Le);const mt=oe=>oe.substring(oe.lastIndexOf("/")+1).split(".").pop();Ze&&nt&&(nt.filename=Ze),(0,ne.useEffect)(()=>{var oe,se;const ie=(se=(oe=document.cookie)==null?void 0:oe.replace(/\s/g,""))==null?void 0:se.split(";");ie==null||ie.map(xe=>{let Ve=xe.split("=");Ve[0]==="_educoder_session"&&yt(Ve[1])})},[]),(0,ne.useEffect)(()=>{Me==="office"&&(Le.indexOf("bigfilescdn.")>-1||Le.indexOf("bigfiles1")>-1?tt({url:Le,fileType:mt(Le),model:Le.indexOf("model=edit")?"edit":"view"}):ae())},[Me,Le]);function Et(oe){return rt(this,null,function*(){oe.data.type==="pdfdata"&&(lt(oe.data.data),window.removeEventListener("message",Et,!1)),console.log("mess---:",oe.data)})}const ae=()=>rt(void 0,null,function*(){console.log("data:",Le);let oe=Le;Le.startsWith("http")||(oe=location.origin+oe);let se=new URL(oe).pathname.split("/").pop();const ie=yield(0,Ge.gJ)({attachment_id:se});ie.url=dn+ie.url,tt(ie)}),te=()=>{if(Le.startsWith("http")||Le.startsWith("blob:")){z();return}(0,Re.Sv)(Ze||"educoder",Le,Ze)},z=()=>{ge&&(0,Ke.fc)({id:ge==null?void 0:ge.id,watch_type:1,course_id:ge==null?void 0:ge.course_id}),(0,Re.Nd)(Ze||"educoder",decodeURIComponent(Le))};return pe.createElement("div",{style:Xe({},Qe||{}),className:`${Kt&&Ue.bgBlack} ${Me?Ue.wrp:"hide"}`},Fe&&pe.createElement("div",{className:Ue.close,ref:We},!!mn&&pe.createElement(me.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>We.current},pe.createElement("span",{onClick:()=>{it(),mn()}},pe.createElement("i",{className:"icon-yulanpizhu"}))),!xt&&pe.createElement(me.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>We.current},pe.createElement("span",{onClick:z},pe.createElement("i",{className:"icon-quxiaozhiding"}))),ct&&pe.createElement(me.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>We.current},pe.createElement("span",{className:"",onClick:()=>{const oe=document.getElementById("pdfiframe");window.addEventListener("message",Et,!1),setTimeout(()=>{oe.contentWindow.postMessage("getData","*")},300)}},pe.createElement("i",{className:"icon-baocun"}))),pe.createElement(me.Z,{title:"\u5173\u95ED",getPopupContainer:()=>We.current},pe.createElement("span",{className:"",onClick:()=>{it()}},pe.createElement("i",{className:"icon-guanbi1"})))),pe.createElement("div",{className:`${Ue[Pe]} ${Pe} ${Ue.monaco} ${Me==="txt"?"show":"hide"}`},Me==="txt"&&pe.createElement(pe.Fragment,null,pe.createElement(ve.ZP,Xe({},nt)))),Me==="audio"&&pe.createElement("audio",{src:`${(Le==null?void 0:Le.indexOf("http://"))>-1||(Le==null?void 0:Le.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Le}`,autoPlay:!0}),Me==="video"&&pe.createElement(pe.Fragment,null,(Le==null?void 0:Le.indexOf("http"))>-1?pe.createElement("video",{controls:!0,src:`${Le}`,autoPlay:!0}):pe.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Le}`,autoPlay:!0})),Me==="office"&&Ie&&pe.createElement("iframe",{src:`${at}/office.html?key=${Ie.key}&url=${btoa(Ie.url)}&callbackUrl=${dn+(Ie.callbackUrl||"")}&fileType=${Ie.fileType}&title=${Ie.title||""}&model=${$e}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!xt}`}),Me==="html"&&pe.createElement("iframe",{src:Le+"&disposition=inline"}),Me==="pdf"&&pe.createElement("iframe",{id:"pdfiframe",src:`${at}/js/pdfview/index.html?filename=${Ze||"educoder.pdf"}&url=${encodeURIComponent(Le)}&disabledDownload=${!!xt}&model=${$e}`}),Me==="image"&&pe.createElement("img",{src:`${(Le==null?void 0:Le.indexOf("http://"))>-1||(Le==null?void 0:Le.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Le}`}),(Me==="other"||Me==="download")&&pe.createElement(pe.Fragment,null,Lt?pe.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:pe.createElement(Ne.ZP,{icon:pe.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:xt},"\u4E0B\u8F7D")}):pe.createElement(Ne.ZP,{type:"primary",size:"middle",onClick:te,disabled:xt},pe.createElement(qe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Me==="flowChart"&&pe.createElement("div",{className:"embed"},pe.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Le||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(It,Wt,he){"use strict";he.d(Wt,{z:function(){return nt},Z:function(){return Pe}});var ne=he(59301),Ue=he(88831),Ne=he(90290),qe=he(64018),ve=he(68535),me=he(90524),Re=he(49661),Ge=he(15342),we=he(77736),fe=he(99571),Ke=he(1012),pe=he(41550),et=he(59301),Ce=({html:Qe})=>{const Fe=(0,ne.useRef)(null),it=(0,ne.useRef)(null),Kt=`.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,ne.useEffect)(()=>{const xt=Fe.current.attachShadow({mode:"open"});it.current=document.createElement("div"),it.current.className="markdown-body",it.current.innerHTML=Qe,xt.appendChild(it.current);const mn=document.createElement("style");return mn.textContent=Kt,xt.appendChild(mn),()=>{xt.innerHTML=""}},[]),(0,ne.useEffect)(()=>{it.current&&(it.current.innerHTML=Qe)},[Qe]),et.createElement("div",{ref:Fe})};function Ee(Qe){const Fe=["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"],it=new RegExp(`\\b(${Fe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Qe.replace(it,"").trim()}var Se={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},Xe=Object.defineProperty,rt=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Le=(Qe,Fe,it)=>Fe in Qe?Xe(Qe,Fe,{enumerable:!0,configurable:!0,writable:!0,value:it}):Qe[Fe]=it,ct=(Qe,Fe)=>{for(var it in Fe||(Fe={}))Je.call(Fe,it)&&Le(Qe,it,Fe[it]);if(rt)for(var it of rt(Fe))$e.call(Fe,it)&&Le(Qe,it,Fe[it]);return Qe};const lt="@\u2581\u2581@",Ut="@\u2581@",Me=/<pre[^>]*>/g;function Ze(Qe){let Fe=document.createElement("div");return Fe.innerHTML=Qe,Fe.childNodes.length===0?"":Fe.childNodes[0].nodeValue}const nt=(Qe,Fe)=>{Qe=Qe||"";const it=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Kt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,xt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Fe?Qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(it,(Lt,ge,de,dt,Jt,yt,Ie)=>{const tt=ge||dt||yt,at=de||Jt||Ie||"?";return me.Z.API_SERVER+"/api/attachments/"+tt+at+"&t="+(0,Re.Jn)(tt,Date.now())+(Lt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qe=Qe.replace(mn,(Lt,ge,de,dt,Jt,yt,Ie)=>{const tt=ge||dt||yt,at=de||Jt||Ie||"?";return me.Z.API_SERVER+"/attachments/download/"+tt+at+"&t="+(0,Re.Jn)(tt,Date.now())+(Lt.indexOf(")")>-1?")":"&")}).replace(it,(Lt,ge,de,dt,Jt,yt,Ie)=>{const tt=ge||dt||yt,at=de||Jt||Ie||"?";return me.Z.API_SERVER+"/api/attachments/"+tt+at+"&t="+(0,Re.Jn)(tt,Date.now())+(Lt.indexOf(")")>-1?")":"&")}).replace(Kt,(Lt,ge,de,dt,Jt)=>{const yt=ge||dt,Ie=de||Jt||"";return'"'+me.Z.API_SERVER+"/api/attachments/"+yt+Ie+yt+Ie+"&t="+(0,Re.Jn)(yt,Date.now())}).replace(xt,(Lt,ge,de,dt,Jt)=>{const yt=ge||dt,Ie=de||Jt||"";return"("+me.Z.API_SERVER+"/files/uploads/"+yt+Ie+yt+Ie+"&t="+(0,Re.Jn)(yt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Qe)};var Pe=({value:Qe="",edit:Fe=!1,className:it,showTextOnly:Kt,showLines:xt,style:mn={},stylesPrev:Lt={},highlightKeywords:ge,showProgramFill:de,isProgramFill:dt,disabledFill:Jt=!1,programFillValue:yt,openEditor:Ie=()=>{},onFillChange:tt=ht=>{},onFillBlur:at=()=>{},onFillFocus:dn=()=>{}})=>{let ht=Ee(String(Qe||""));const Dt=(0,ne.useRef)(),We=(0,ne.useRef)(),[mt,Et]=(0,ne.useState)(""),[ae,te]=(0,ne.useState)("office"),[z,oe]=(0,ne.useState)([]),se=(0,ne.useRef)("a"+(0,Ke.Z)()),ie={},xe=st=>/<style[\s\S]*?>/i.test(st||""),Ve=(st,En,Ot)=>{const an=document.createElement(st===Ut?"input":"textarea");an.style.width="100%",an.style.height=st===Ut?"40px":"151px",an.rows=5,an.spellcheck=!1,an.name="edu-program-fill",an.placeholder="\u8BF7\u8F93\u5165",an.dataset.id=En;const Cn=Object.keys(ie).length;return ie[Cn]=an,`<span class="edu-program-fill-wrap ${st===Ut?"":"show"}" style="width:${st===Ut?"600px":"100%"}" title=${Ot||""}><span>${an.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Mt(st){return st=st.replace(/!\[.*?\]\(.*?\)/g,""),st=st.replace(/\[.*?\]\(.*?\)/g,""),st=st.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),st=st.replace(/<embed.*?>/g,""),st=st.replace(/<img.*?>/g,""),st=st.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),st=st.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),st=st.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),st=st.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),st}const kt=st=>!Kt&&xe(ht)?st:st.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(En,Ot){let an=Ot.replace(/(\n|\r)/g,"").split("}"),Cn=[];return an.map($n=>{$n!=""&&Cn.push(`.${se.current} ${$n}`)}),`<style>${Cn.join("}")}</style>`}),pt=(0,ne.useMemo)(()=>{try{const an=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Cn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$n=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Rt=/\(\/attachments\/download\//g;ht=ht.replace(Rt,"("+me.Z.API_SERVER+"/attachments/download/").replace(an,"("+me.Z.API_SERVER+"/api/attachments/").replace(Cn,'"'+me.Z.API_SERVER+"/api/attachments/").replace($n,'"'+me.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,`
`),Dt.current.style.display="none"}catch(an){}if(de){let an=-1;return ht=ht.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Cn,$n,Rt){var zn;return++an,Ve(Cn,an,(zn=yt==null?void 0:yt[an])==null?void 0:zn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${kt(ht||"")}</pre>`}let st=kt(ht);st=(0,Ne.ZP)(st);const En=(0,Ne.ez)();ht.match(/\[TOC\]/)&&(st=st.replace("<p>[TOC]</p>",(0,Ne.Qv)()),(0,Ne.Iy)()),st=st.replace(/(__special_katext_id_\d+__)/g,(an,Cn)=>{const{type:$n,expression:Rt}=En[Cn];return(0,Ge.renderToString)(Ze(Rt)||"",{displayMode:$n==="block",throwOnError:!1,output:"html"})}),st=st.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ne.AL)();const Ot=document.createElement("div");if(Ot.innerHTML=st,Kt)return Ot.innerText;if(ge){const an=ge.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ln(Ot,an),Ot.innerHTML}return setTimeout(()=>Ln(),500),Ot.innerHTML},[ht,ge]);(0,ne.useEffect)(()=>{hn.current&&hn.current.querySelectorAll(["input","textarea"]).forEach(En=>{En.oninput=St,En.onblur=$t,En.onfocus=Yt})},[z]),(0,ne.useEffect)(()=>{var st,En,Ot,an,Cn;if(yt!=null&&yt.length)try{const $n=hn.current.querySelectorAll(".edu-program-fill-score"),Rt=hn.current.querySelectorAll('[name="edu-program-fill"]');for(const[zn,Ei]of Rt.entries())Ei.value=((st=yt==null?void 0:yt[zn])==null?void 0:st.value)||"",((En=yt==null?void 0:yt[zn])==null?void 0:En.type)==="warning"?Ei.className="program-fill-warning":((Ot=yt==null?void 0:yt[zn])==null?void 0:Ot.type)==="success"?Ei.className="program-fill-success":Ei.className="";for(const[zn,Ei]of $n.entries())Ei.innerHTML=(an=yt==null?void 0:yt[zn])!=null&&an.score?`${(Cn=yt==null?void 0:yt[zn])==null?void 0:Cn.score}\u5206`:"";oe(yt)}catch($n){console.log($n,"error")}},[yt]);const St=st=>{z[st.target.dataset.id]=z[st.target.dataset.id]||{},z[st.target.dataset.id].value=st.target.value,oe([...z]),tt(z,st.target.dataset.id)},$t=st=>{z[st.target.dataset.id]=z[st.target.dataset.id]||{},z[st.target.dataset.id].value=st.target.value,oe([...z]),at(z,st.target.dataset.id)},Yt=st=>{z[st.target.dataset.id]=z[st.target.dataset.id]||{},z[st.target.dataset.id].value=st.target.value,oe([...z]),dn(z,st.target.dataset.id)};function ln(st,En){return st.childNodes.forEach(Ot=>{var an;if(Ot.childNodes.length>0)ln(Ot,En);else if(Ot.nodeName!=="IMG")if(Ot.innerHTML)Ot.innerHTML=(an=Ot.innerHTML)==null?void 0:an.replace(new RegExp(En,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Cn=document.createElement("span");Cn.innerHTML=Ot.textContent.replace(new RegExp(En,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ot.replaceWith(Cn)}})}const hn=(0,ne.useRef)();Ne.jb.WebkitLineClamp=xt,xt&&(mn=ct(ct({},mn),Ne.jb));function Ft(st){let En=st.target;if(En.tagName.toUpperCase()==="A"){let Ot=En.getAttribute("href");if(Ot.indexOf("office")>-1)st.preventDefault(),Et(Ot),te("office");else if(Ot.indexOf("application/pdf")>-1)st.preventDefault(),Et(Ot),te("pdf");else if(Ot.indexOf("text/html")>-1)st.preventDefault(),Et(Ot),te("html");else if(Ot.startsWith("#")){st.preventDefault();let an=document.getElementById(Ot.replace("#",""));an&&an.scrollIntoView(!0)}}}const Ln=()=>{var st;const En=(st=hn.current)==null?void 0:st.querySelectorAll("video");En==null||En.forEach(Ot=>{if(Ot.oncontextmenu=()=>!1,Ot.src.indexOf(".m3u8")>-1&&!Ot.canPlayType("application/vnd.apple.mpegurl")){if(ve.ZP.isSupported()){var an=new ve.ZP;an.loadSource(Ot.src),an.attachMedia(Ot)}}})};(0,ne.useEffect)(()=>{if(hn.current&&pt&&pt.match(Me)&&window.PR.prettyPrint(),hn.current)return hn.current.addEventListener("click",Ft),()=>{var st;(st=hn.current)==null||st.removeEventListener("click",Ft),(0,Ne.AL)(),(0,Ne.Iy)()}},[pt,hn.current,Ft]);const sn=st=>{st.target.nodeName==="IMG"&&st.target.className.indexOf("draw-flowchart")>-1?(Dt.current.style.zIndex=1,Dt.current.style.display="flex",Dt.current.style.width=st.target.clientWidth+"px",Dt.current.style.height=st.target.clientHeight+"px",Dt.current.style.top=st.target.offsetTop+"px",Dt.current.style.left=st.target.offsetLeft+"px",st.target.id&&(We.current=st.target.id)):Dt.current.style.display="none"},yn=()=>{Dt.current.style.display="none"};return(0,ne.useEffect)(()=>{var st;const En=Ot=>{Ot.preventDefault(),Ot.clipboardData.setData("text",window.getSelection().toString())};return(st=hn.current)==null||st.addEventListener("copy",En),()=>{var Ot;(Ot=hn.current)==null||Ot.removeEventListener("copy",En)}},[hn.current]),ne.createElement("div",{style:{position:"relative"},onMouseLeave:yn},Kt&&ne.createElement("div",{ref:hn,className:`${Se.mdBody} `},pt),!Kt&&!xe(pt)&&ne.createElement("div",{ref:hn,style:ct({},mn),onMouseOver:sn,className:`${it||""} ${Jt?"disabled-fill":""} markdown-body ${Se.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:pt}}),!Kt&&xe(pt)&&ne.createElement(Ce,{html:pt}),ne.createElement("div",{ref:Dt,className:`${Se.button} ${Fe?"":Se.previewFlowChart}`},ne.createElement(we.Z,null,ne.createElement(fe.ZP,{onClick:()=>{Fe?Ie(We.current):(Et(We.current),te("flowChart"))}},Fe?"\u7F16\u8F91":"\u9884\u89C8"))),ne.createElement(pe.Z,{close:!0,data:mt,type:mt!=null&&mt.length?ae:"",style:ct({},Lt),onClose:()=>Et("")}))}},44905:function(It,Wt,he){"use strict";he.d(Wt,{h:function(){return $e}});var ne=he(59301),Ue=he(82326),Ne=he(28284),qe=he(99571),ve=he(89780),me=he.n(ve),Re=he(66543),Ge=he(59598),we=Object.defineProperty,fe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ce=(Le,ct,lt)=>ct in Le?we(Le,ct,{enumerable:!0,configurable:!0,writable:!0,value:lt}):Le[ct]=lt,Ee=(Le,ct)=>{for(var lt in ct||(ct={}))et.call(ct,lt)&&Ce(Le,lt,ct[lt]);if(pe)for(var lt of pe(ct))He.call(ct,lt)&&Ce(Le,lt,ct[lt]);return Le},Se=(Le,ct)=>fe(Le,Ke(ct));const Xe=Ue.default.Option,rt={labelCol:{span:4},wrapperCol:{span:20}},Je={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"]};Wt.Z=({callback:Le,onCancel:ct})=>{const[lt,Ut]=(0,ne.useState)("python");function Me(nt){Ut(Je[nt][1])}function Ze(nt){Le(nt)}return ne.createElement(Ne.default,Se(Ee({},rt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),ne.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ne.createElement(Ue.default,{getPopupContainer:nt=>nt.parentNode,onChange:Me},Object.keys(Je).map(nt=>ne.createElement(Xe,{key:nt,value:nt},Je[nt][0])))),ne.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ne.createElement($e,{mode:lt})),ne.createElement("div",{className:"flex-container flex-end"},ne.createElement(qe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(qe.ZP,{type:"ghost",onClick:ct},"\u53D6\u6D88")))};function $e({value:Le,onChange:ct,mode:lt,options:Ut={}}){const Me=(0,ne.useRef)(),[Ze,nt]=(0,ne.useState)();return(0,ne.useEffect)(()=>{if(Ze){let Pe=function(Qe){const Fe=Qe.getValue();ct&&ct(Fe)};return Ze.on("change",Pe),()=>{Ze.off("change",Pe)}}},[Ze,ct]),(0,ne.useEffect)(()=>{Ze&&Ze.setOption("mode",lt)},[Ze,lt]),(0,ne.useEffect)(()=>{Ze&&(Le!==Ze.getValue()||Le==="")&&setTimeout(()=>{Ze.setValue(Le||"")},300)},[Ze,Le]),(0,ne.useEffect)(()=>{if(Me.current&&!Ze){const Pe=me().fromTextArea(Me.current,Ee({mode:lt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ut));nt(Pe)}},[Me.current,Ze]),ne.createElement("div",{className:"my-codemirror-container"},ne.createElement("textarea",{ref:Me}))}},2978:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return _i}});var ne=he(59301),Ue=he(76560),Ne=he(89780),qe=he.n(Ne),ve=he(76374),me=he(66543),Re=he(6313),Ge=he(25717),we=he(99498),fe=he(25419),Ke=he(67549),pe=he(38394),et=({value:bn="",className:Dn,showTextOnly:Kn,showLines:Pn,style:mi={}})=>{const yi=(0,ne.useMemo)(()=>"",[bn]);return ne.createElement(ne.Fragment,null,ne.createElement("div",{dangerouslySetInnerHTML:{__html:yi}}))},He=Object.defineProperty,Ce=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Je=(bn,Dn,Kn)=>Dn in bn?He(bn,Dn,{enumerable:!0,configurable:!0,writable:!0,value:Kn}):bn[Dn]=Kn,$e=(bn,Dn)=>{for(var Kn in Dn||(Dn={}))Xe.call(Dn,Kn)&&Je(bn,Kn,Dn[Kn]);if(Se)for(var Kn of Se(Dn))rt.call(Dn,Kn)&&Je(bn,Kn,Dn[Kn]);return bn},Le=(bn,Dn)=>Ce(bn,Ee(Dn));let ct=[{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 lt({onActionCallback:bn,title:Dn,icon:Kn,actionName:Pn,className:mi="",children:yi}){function Pi(){bn(Pn)}return ne.createElement("a",{title:Dn,className:mi,onClick:Pi},ne.createElement("i",{className:`${Kn}`}),yi)}var Ut=({watch:bn,showNullButton:Dn,showNullProgramButton:Kn,onActionCallback:Pn,fullScreen:mi,insertTemp:yi,hidetoolBar:Pi,extraUse:hi})=>{const oi=[...ct,{title:`${bn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${bn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ne.createElement("ul",{className:"markdown-toolbar-container"},!Pi&&oi.map((ki,Zt)=>ne.createElement("li",{key:Zt},ki.actionName?ne.createElement(lt,Le($e({},ki),{onActionCallback:Pn})):ne.createElement("span",{className:"v-line"}))),Dn?ne.createElement("li",null,ne.createElement(lt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Pn},ne.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Kn?ne.createElement(ne.Fragment,null,ne.createElement("li",null,ne.createElement(lt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Pn},ne.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ne.createElement("li",null,ne.createElement(lt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Pn},ne.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,yi&&ne.createElement("li",null,ne.createElement(lt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${yi}`,onActionCallback:Pn},ne.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),hi&&ne.createElement("li",null,hi),ne.createElement("li",{className:"btn-full-screen"},ne.createElement(lt,{icon:`${mi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:mi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Pn})))},Me=he(75790),Ze=he(28284),nt=he(37568),Pe=he(99571),Qe=Object.defineProperty,Fe=Object.defineProperties,it=Object.getOwnPropertyDescriptors,Kt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Lt=(bn,Dn,Kn)=>Dn in bn?Qe(bn,Dn,{enumerable:!0,configurable:!0,writable:!0,value:Kn}):bn[Dn]=Kn,ge=(bn,Dn)=>{for(var Kn in Dn||(Dn={}))xt.call(Dn,Kn)&&Lt(bn,Kn,Dn[Kn]);if(Kt)for(var Kn of Kt(Dn))mn.call(Dn,Kn)&&Lt(bn,Kn,Dn[Kn]);return bn},de=(bn,Dn)=>Fe(bn,it(Dn));const dt={labelCol:{span:4},wrapperCol:{span:20}};var Jt=({callback:bn,onCancel:Dn})=>{function Kn(Pn){bn(Pn)}return ne.createElement(Ze.default,de(ge({},dt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Kn,style:{width:500}}),ne.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ne.createElement(nt.default,null)),ne.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ne.createElement(nt.default,null)),ne.createElement("div",{className:"flex-container flex-end"},ne.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(Pe.ZP,{type:"ghost",onClick:Dn},"\u53D6\u6D88")))},yt=he(44905),Ie=he(45596),tt=he(62957),at=he(77019),dn=he(6077),ht=he(59301),Dt=({callback:bn,onCancel:Dn})=>{const Kn=document.createElement("canvas"),Pn=Kn.getContext("2d");Kn.width=1e3,Kn.height=800,Pn.fillStyle="#ffffff",Pn.fillRect(0,0,Kn.width,Kn.height);const mi=Kn.toDataURL("image/png");return ht.createElement(tt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},ht.createElement(at.Z,{style:{height:"100vh"}},ht.createElement(dn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:mi,visible:!0,title:String(Date.now())},onOk:yi=>{bn({src:yi.url})},onClose:Dn})))},We=he(30641),mt=he(5269),Et=he(6767),ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},te=he(59301),oe=(0,ne.forwardRef)(({onCancel:bn,editImgId:Dn,callback:Kn},Pn)=>{let mi=(0,ne.useRef)(),yi=(0,ne.useRef)(),Pi=(0,ne.useRef)(),hi=(0,ne.useRef)(!1);const oi=(0,ne.useRef)(!1);console.log("ref:",Pn);const[ki,Zt]=(0,ne.useState)(0),[ot,un]=(0,ne.useState)("100vh");return(0,ne.useEffect)(()=>{Zt(1)},[]),(0,ne.useImperativeHandle)(Pn,()=>({setHeight:un})),te.createElement("div",{ref:oi,className:"body-overflow-initial"},te.createElement(We.Z,{width:"100vw",height:ot,footer:null,closable:!0,placement:"bottom",open:!!ki,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ae.drawerWrap}`,onClose:()=>{window.saveDrawData(Jn=>{Kn({src:`/api/attachments/${Jn}`,id:Jn})})},title:te.createElement(at.Z,{align:"middle"},te.createElement(mt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),te.createElement(mt.Z,{onClick:()=>{un(ot==="60px"?"100vh":"60px")}},te.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),te.createElement(mt.Z,{onClick:()=>{window.saveDrawData(Jn=>{if(Jn===null){Et.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Et.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Kn({src:`/api/attachments/${Jn}`,id:Jn,disabledClose:!0})})}},te.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},te.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Dn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:yi})))}),se=he(90524),ie=he(47889),xe=he(71051);const Ve=ie.ZP.Group,Mt={margin:"0 8px"};var kt=({callback:bn,onCancel:Dn})=>{function Kn(Pn){bn(Pn)}return ne.createElement(Ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Kn},ne.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ne.createElement("span",{style:Mt},"\u5355\u5143\u683C\u6570\uFF1A"),ne.createElement("span",{style:Mt},"\u884C\u6570"),ne.createElement(Ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ne.createElement(xe.Z,null)),ne.createElement("span",{style:Mt},"\u5217\u6570"),ne.createElement(Ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ne.createElement(xe.Z,null))),ne.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ne.createElement("span",{style:Mt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ne.createElement(Ze.default.Item,{name:"align"},ne.createElement(Ve,null,ne.createElement(ie.ZP,{value:"default"},ne.createElement("i",{className:"fa fa-align-justify"})),ne.createElement(ie.ZP,{value:"left"},ne.createElement("i",{className:"fa fa-align-left"})),ne.createElement(ie.ZP,{value:"center"},ne.createElement("i",{className:"fa fa-align-center"})),ne.createElement(ie.ZP,{value:"right"},ne.createElement("i",{className:"fa fa-align-right"}))))),ne.createElement("div",{className:"flex-container flex-end"},ne.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ne.createElement(Pe.ZP,{type:"ghost",onClick:Dn},"\u53D6\u6D88")))},pt=he(71411),St=he(11081),$t=he.n(St),ln=(0,ne.forwardRef)(({use3d:bn,width:Dn,height:Kn,callback:Pn,showSaveButton:mi},yi)=>{const Pi=(0,ne.useRef)(),hi=(0,ne.useRef)(),[oi,ki]=(0,ne.useState)(!1),Zt=(0,ne.useRef)({id:Pi,appName:"graphing",width:Dn||1e3,height:Kn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ne.useEffect)(()=>{hi.current=new($t())(Zt.current,!0),window.onload=function(){hi.current.inject("applet_container")}},[]);const ot=()=>{var un=window.ggbApplet.getPNGBase64(1,!0,72);return Pn&&Pn(un),un};return(0,ne.useEffect)(()=>{Zt.current.appName=oi?"3D":"graphing",hi.current.inject("applet_container")},[oi]),(0,ne.useEffect)(()=>{ki(bn)},[bn]),(0,ne.useImperativeHandle)(yi,()=>({getImgData:ot})),ne.createElement(ne.Fragment,null,ne.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Pi}),ne.createElement(at.Z,{align:"middle"},ne.createElement(mt.Z,{flex:1},ne.createElement(pt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:oi,onChange:un=>ki(un)})),ne.createElement(mt.Z,null,ne.createElement(Pe.ZP,{size:"large",onClick:ot,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),hn=he(88615);const Ft="link",Ln="upload-image",sn="add-flowchart",yn="draw-image",st="add-flowchart",En="code-block",Ot="add-table",an="------------",Cn={default:an,left:`:${an}`,center:`:${an}:`,right:`${an}:`};var $n=he(17904),Rt=he(49661);function zn(){}let Ei=0;const fi=1e4,Ri="\u2581",Wi="@\u2581\u2581@",Bi="@\u2581@",Li=`
**\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`,ai=["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 wi(bn){return/^\d+$/.test(bn)?`${bn}px`:bn}const li=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",xi={[li+"-B"]:"bold",[li+"-I"]:"italic"},gi={[Ft]:"\u6DFB\u52A0\u94FE\u63A5",[En]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ln]:"\u6DFB\u52A0\u56FE\u7247",[yn]:"\u6DFB\u52A0\u753B\u56FE",[sn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ot]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var _i=({defaultValue:bn="",onChange:Dn,width:Kn="100%",height:Pn=400,miniToolbar:mi=!1,isFocus:yi=!1,watch:Pi,insertTemp:hi,mode:oi="markdown",id:ki="markdown-editor-id",showResizeBar:Zt=!1,noStorage:ot=!1,showNullButton:un=!1,showNullProgramButton:Jn=!1,hidetoolBar:pi=!1,fullScreen:Ae=!1,onBlur:De,onCMBeforeChange:Bt,onFullScreen:ft,className:ze="",disablePaste:vt=!1,disabled:Qt=!1,disabledFill:Gt=!1,placeholder:nn="",values:zt="",extraUse:rn})=>{const[_e,Zn]=(0,ne.useState)(null),[on,Be]=(0,ne.useState)(bn),[Te,ye]=(0,ne.useState)(Pi),[ut,_n]=(0,ne.useState)(Ae),[kn,qt]=(0,ne.useState)(""),[Ct,Oe]=(0,ne.useState)(0),[cn,wn]=(0,ne.useState)(Pn),[Fn,On]=(0,ne.useState)(!1),[Xn,Xt]=(0,ne.useState)(0),[Tn,Gn]=(0,ne.useState)(0),Nn=(0,ne.useRef)(),jt=(0,ne.useRef)(),fn=(0,ne.useRef)(),Bn=(0,ne.useRef)(),Hn=(0,ne.useRef)(),Wn=(0,ne.useRef)(),In=(0,Ue.useDispatch)();(0,ne.useEffect)(()=>{const Tt=window.scrollY||window.pageYOffset;Be(zt),_e==null||_e.setValue(zt),window.scrollTo(0,Tt)},[zt]),(0,ne.useEffect)(()=>{ft==null||ft(ut)},[ut]),(0,ne.useEffect)(()=>{if(Nn.current){let Tt=function(Vt,en){var ii;if(vt){en.preventDefault();return}const si=en.clipboardData;if(si){const Fi=si.types.toString(),ci=si.items;if(Fi==="Files"||si.types.indexOf("Files")>-1){if(en.preventDefault(),oi=="stex")return;try{let Si=ci[1];((ii=ci[0])==null?void 0:ii.kind)==="file"&&(Si=ci[0]);const zi=Si.getAsFile(),Gi=zi.name.split(".").pop();(0,Ie.I)(zi,Ti=>{var Ui,Ii,rr;Ti.id?((Ui=zi==null?void 0:zi.type)==null?void 0:Ui.indexOf("image"))>-1?wt.replaceSelection(`<img width="100%" src="/api/attachments/${Ti.id}?type=${Ti.content_type})" alt="" />`):((Ii=zi==null?void 0:zi.type)==null?void 0:Ii.indexOf("video"))>-1?wt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ti.id}"></video>`):((rr=zi==null?void 0:zi.type)==null?void 0:rr.indexOf("pdf"))>-1?wt.replaceSelection(`<a href="/api/attachments/${Ti.id}?type=${zi.type}&disposition=inline" target="_blank">${zi.name}</a>`):ai.includes(Gi)?wt.replaceSelection(`<a href="/api/attachments/${Ti.id}?type=office&disposition=inline" target="_blank">${zi.name}</a>`):wt.replaceSelection(`[${zi.name}](/api/attachments/${Ti.id}?type=${Ti.content_type})`):(Ti==null?void 0:Ti.status)===401&&(document.location.href="/user/login")})}catch(Si){Et.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const wt=qe().fromTextArea(Nn.current,{mode:oi,lineNumbers:!mi,lineWrapping:!0,value:bn,autoCloseTags:!0,autoCloseBrackets:!0});return wt.on("keyup",function(Vt,en){en.keyCode===8&&(Vt.getValue()==""?wt.setOption("placeholder",nn):wt.setOption("placeholder",null))}),wt.on("keydown",function(Vt,en){if(en.keyCode===8){var ii=ni(Vt);ii&&en.preventDefault()}}),yi&&wt.focus(),wt.on("paste",Tt),Qt&&wt.on("beforeChange",function(Vt,en){(en.origin==="paste"||en.origin==="+input")&&en.cancel()}),Zn(wt),()=>{wt.off("paste",Tt)}}},[]);const Vn=(0,ne.useCallback)(()=>{if(jt.current)try{}catch(Tt){console.log(Tt,"---- to set md editor body height")}},[cn,jt,ut]);(0,ne.useEffect)(()=>{function Tt(){let wt=new ve.Z(Vt=>{for(let en of Vt)(en.target.offsetHeight>0||en.target.offsetWidth>0)&&(Vn(),_e.setSize("100%","100%"),_e.refresh())});return wt.observe(Nn.current.parentElement),wt}if(_e){const wt=Tt();return()=>{var Vt,en;(Vt=Nn.current)!=null&&Vt.parentElement&&wt.unobserve((en=Nn.current)==null?void 0:en.parentElement)}}},[_e,Vn]),(0,ne.useEffect)(()=>{if(_e){let Tt=[];for(const[wt,Vt]of Object.entries(xi)){let en={[wt]:()=>{Sn(Vt)}};Tt.push(en),_e.addKeyMap(en)}return()=>{for(let wt of Tt)_e.removeKeyMap(wt)}}},[_e]),(0,ne.useEffect)(()=>{Ae!==ut&&_n(Ae)},[Ae]),(0,$n.Z)(()=>{if(!ot&&Ct>0){let Tt=new Date().getTime(),wt=window.sessionStorage.getItem(ki);Tt>=Ct+fi&&(!wt||wt!==on)&&(window.sessionStorage.setItem(ki,on),On(!0))}},fi),(0,ne.useEffect)(()=>{ye(Pi)},[_e,Pi]),(0,ne.useEffect)(()=>{_e&&yi&&_e.focus()},[_e,yi]),(0,ne.useEffect)(()=>{if(Te&&_e){let Tt=function(Vt){let en=Vt.target;if(Bn.current){let ii=en.scrollTop/en.scrollHeight;Bn.current.scrollTop=Bn.current.scrollHeight*ii}};const wt=_e.getScrollerElement();return wt.addEventListener("scroll",Tt),()=>{wt.removeEventListener("scroll",Tt)}}},[_e,Te]),(0,ne.useEffect)(()=>{if(_e&&Bt){let Tt=function(wt,Vt){Bt(wt,Vt)};return _e.on("beforeChange",Tt),()=>{_e.off("beforeChange",Tt)}}},[_e,Bt]),(0,ne.useEffect)(()=>{if(_e&&De){let Tt=function(){De(_e.getValue())};return _e.on("blur",Tt),()=>{_e.off("blur",Tt)}}},[_e,De]);function ni(Tt,wt){var Vt=Tt.getDoc(),en=Vt.getCursor(),ii=Vt.getLine(en.line),si=ii.charAt(en.ch-1),Fi=ii.lastIndexOf("@\u2581@",en.ch),ci=ii.lastIndexOf("@\u2581\u2581@",en.ch),Si=Fi>ci?Fi:ci,zi=Fi>ci?3:4;if(Wi.indexOf(si)===-1)return null;if(console.log("change1:",wt,Tt,ii,en,Si,Fi,ci,si),Si>=0&&en.ch-Si<5){var Gi=Si+zi;return Vt.replaceRange("",{line:en.line,ch:Si},{line:en.line,ch:Gi}),{line:en.line,ch:Gi}}return null}(0,ne.useEffect)(()=>{if(_e){let Tt=function(wt,Vt){const en=wt.getValue();Be(en),Oe(new Date().getTime()),wt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Dn&&(Jn?Dn(en,gt(en)):Dn(en))};return _e.on("change",Tt),()=>{_e.off("change",Tt)}}},[_e,Dn]),(0,ne.useEffect)(()=>{if(_e)if(bn==null)_e.setValue(""),Be("");else{const Tt=window.scrollY||window.pageYOffset;bn!==_e.getValue()&&(_e.setValue(bn),Be(bn),_e.setCursor(Qt?1:_e.lineCount(),0),window.scrollTo(0,Tt))}},[_e,bn]);const Sn=(0,ne.useCallback)(Tt=>{const wt=_e.getCursor(),Vt=_e.getSelection();let en=Vt.split(`
`);switch(Tt){case"bold":return _e.replaceSelection("**"+Vt+"**"),Vt===""&&_e.setCursor(wt.line,wt.ch+2),_e.focus();case"italic":return _e.replaceSelection("*"+Vt+"*"),Vt===""&&_e.setCursor(wt.line,wt.ch+1),_e.focus();case"code":return _e.replaceSelection("`"+Vt+"`"),Vt===""&&_e.setCursor(wt.line,wt.ch+1),_e.focus();case"inline-latex":return(0,Rt.Ye)(In)?void 0:(qt("inline-latex"),_e.focus());case"latex":return _e.replaceSelection("```latex\n"+Vt+"\n```"),_e.setCursor(wt.line+1,Vt.length+1),_e.focus();case"line-break":return _e.replaceSelection(`<br/>
`),_e.focus();case"list-ul":return Vt===""?_e.replaceSelection("- "+Vt):_e.replaceSelection(en.map(ii=>ii===""?"":`- ${ii}`).join(`
`)),_e.focus();case"list-ol":return Vt===""?_e.replaceSelection("1. "+Vt):_e.replaceSelection(en.map((ii,si)=>ii===""?"":`${si+1}. ${ii}`).join(`
`)),_e.focus();case"add-null-ch":return Vt===""&&_e.setCursor(wt.line,wt.ch),_e.replaceSelection(Ri),_e.focus();case"add-signal":return Vt===""&&_e.setCursor(wt.line,wt.ch),_e.replaceSelection(Bi),_e.focus();case"add-multiple":return Vt===""&&_e.setCursor(wt.line,wt.ch),_e.replaceSelection(Wi),_e.focus();case"inster-template-1":return Vt===""&&_e.setCursor(wt.line,wt.ch),_e.replaceSelection(Li),_e.focus();case"eraser":return _e.setValue(""),_e.focus();case"trigger-watch":return ye(!Te),_e.focus();case"trigger-full-screen":return _n(!ut),_e.focus();case Ft:qt(Ft);return;case En:qt(En);return;case Ln:qt(Ln);return;case yn:qt(yn);return;case"maths-latex":if((0,Rt.Ye)(In))return;qt("maths-latex");return;case sn:Hn.current="",sessionStorage.removeItem("file_id"),qt(sn);return;case Ot:qt(Ot);return;default:throw new Error}},[_e,Te,ut]),ei=(0,ne.useCallback)((Tt,wt)=>{var Vt,en,ii,si,Fi,ci;Tt!=null&&Tt.disabledClose||qt("");const{src:Si,alt:zi,id:Gi}=Tt||{};switch(kn){case Ft:const{title:Mr,link:Er}=Tt;return _e.replaceSelection(`[${Mr}](${Er})`),_e.focus();case En:const{language:pr,content:lr}=Tt;return _e.replaceSelection(["```"+pr,lr,"```"].join(`
`)),_e.focus();case"maths-latex":for(var Ti=atob(Tt),Ui=new Uint8Array(Ti.length),Ii=0;Ii<Ti.length;Ii++)Ui[Ii]=Ti.charCodeAt(Ii);var rr=new Blob([Ui],{type:"image/png"});(0,Ie.I)(rr,Xi=>{Xi.id?_e.replaceSelection(`![,](/api/attachments/${Xi.id}?type=${Xi.content_type})`):(Xi==null?void 0:Xi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Rt.Ye)(In))return;_e.replaceSelection("`$$"+Tt+"$$`");break;case st:if(!Gi)return;_e.getValue().indexOf(Si)===-1?_e.replaceSelection(`<center><img id="${Gi}" width="80%" src="${Si}" class="draw-flowchart" alt="${zi||""}" /></center>`):document.getElementById(Gi).src=se.Z.API_SERVER+Si+"?t="+Date.now();break;case Ln:case yn:const Ni=wt,vr=(ii=(en=(Vt=Ni==null?void 0:Ni.name)==null?void 0:Vt.split("."))==null?void 0:en.pop)==null?void 0:ii.call(en);return((si=Ni==null?void 0:Ni.type)==null?void 0:si.indexOf("image"))>-1||!(Ni!=null&&Ni.type)?Ni!=null&&Ni.align||Ni!=null&&Ni.width?_e.replaceSelection(`<p style="text-align:${Ni.align||"initial"}"><img width="${Ni.width?Ni.width+"%":"initial"}" src="${Si}" alt="${zi||""}" /></p>`):_e.replaceSelection(`<img width="100%" src="${Si}" alt="${zi||""}" />`):((Fi=Ni==null?void 0:Ni.type)==null?void 0:Fi.indexOf("video"))>-1?_e.replaceSelection(`<video width="100%" controls src="${Si}"></video>`):((ci=Ni==null?void 0:Ni.type)==null?void 0:ci.indexOf("pdf"))>-1?_e.replaceSelection(`<a href="${Si}?type=${Ni.type}&disposition=inline" target="_blank">${Ni.name}</a>`):ai.includes(vr)?_e.replaceSelection(`<a href="${Si}?type=office&disposition=inline" target="_blank">${Ni.name}</a>`):_e.replaceSelection(`[${Ni.name}](${Si})`),_e.focus();case Ot:const{row:Gr,col:Ki,align:kr}=Tt;let Wr=`
`;for(let Xi=0;Xi<Gr;Xi++){let ro=[],sr=[];for(let Hi=0;Hi<Ki;Hi++)Xi===1&&sr.push(Cn[kr]),ro.push(" ");Xi===1&&(Wr+=`| ${sr.join(" | ")} |
`),Wr+=`| ${ro.join(Ki===1?"":" | ")} |
`}return _e.replaceSelection(Wr+`
`),_e.focus();default:throw new Error}},[_e,kn]),jn=(0,ne.useMemo)(()=>{switch(kn){case Ft:return ne.createElement(Jt,{callback:ei,onCancel:Ht});case En:return ne.createElement(yt.Z,{callback:ei,onCancel:Ht});case Ln:return ne.createElement(Ie.Z,{callback:ei,onCancel:Ht});case sn:return ne.createElement(oe,{editImgId:Hn.current,callback:ei,onCancel:Ht});case Ot:return ne.createElement(kt,{callback:ei,onCancel:Ht});case"maths-latex":return ne.createElement(ln,{showSaveButton:!0,callback:ei});case"inline-latex":return ne.createElement(hn.Z,{showSaveButton:!0,callback:ei});default:return null}},[kn]);function Ht(){qt("")}(0,ne.useEffect)(()=>{if(fn.current){let Tt=function(Fi){ii=!0,si=Fi.pageY},wt=function(){ii=!1},Vt=function(Fi){if(ii){let ci=Fi.pageY-si;ci<0&&(ci=0),ci>300&&(ci=300);let Si=Pn+ci+"px";wn(Si)}},en=fn.current,ii=!1,si=0;return en.addEventListener("mousedown",Tt),document.addEventListener("mousemove",Vt),document.addEventListener("mouseup",wt),()=>{en.removeEventListener("mousedown",Tt),document.removeEventListener("mousemove",Vt),document.removeEventListener("mouseup",wt)}}},[_e,fn]),(0,ne.useEffect)(()=>{wn(Pn)},[Pn]);const Qn=wi(Kn),Un=wi(cn),Ci={width:Qn,height:Un},Rn=(0,ne.useMemo)(()=>{if(Ct){let Tt=new Date(Ct),wt=Tt.getHours(),Vt=Tt.getMinutes(),en=Tt.getSeconds();return wt=wt<10?"0"+wt:wt,Vt=Vt<10?"0"+Vt:Vt,en=en<10?"0"+en:en,`${wt}:${Vt}:${en}`}return 0},[Ct]),gt=Tt=>{const wt=[];if(Jn){let Vt=-1;Tt=Tt.replace(/(@▁▁@|@▁@)/g,function(en,ii,si){wt.push({multiLine:en!==Bi})})}return wt};function Pt(){window.sessionStorage.removeItem(ki),On(!1),Oe(0)}function Nt(){On(!1),Oe(0),_e.setValue(window.sessionStorage.getItem(ki))}(0,ne.useEffect)(()=>{gi[kn]&&kn!==yn&&kn!==sn&&setTimeout(()=>{const Tt=document.getElementsByClassName("markdown-popup-form")[0],wt=window.innerWidth/2-Tt.offsetWidth/2,Vt=window.innerHeight/2-Tt.offsetHeight/2;Xt(wt),Gn(Vt)},0)},[kn]);const At=Tt=>{Tt.preventDefault();const wt=Tt.clientX-Xn,Vt=Tt.clientY-Tn;document.body.onmousemove=en=>{let ii=en.clientX-wt,si=en.clientY-Vt;const Fi=document.getElementsByClassName("markdown-popup-form")[0],ci=window.innerWidth-Fi.offsetWidth,Si=window.innerHeight-Fi.offsetHeight;ii=Math.max(0,Math.min(ii,ci)),si=Math.max(0,Math.min(si,Si)),gn(en.clientX,en.clientY,wt,Vt)&&(Xt(ii),Gn(si))},document.body.onmouseup=function(){document.body.onmousemove=null}},gn=(Tt,wt,Vt,en)=>{const ii=document.body.clientHeight,si=document.body.clientWidth;return Tt<20&&Vt>Tt||Tt>si-20&&Vt<Tt||wt<20&&en>wt||wt>ii-20&&en<wt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ne.createElement(ne.Fragment,null,ne.createElement("div",{className:"markdown-editor-wrapper",ref:jt},ne.createElement("div",{className:`markdown-editor-container ${ze} ${Te?"on-preview":""} ${mi?"mini":""} ${ut?"full-screen":""}`,style:Ci},ne.createElement(Ut,{insertTemp:hi,watch:Te,fullScreen:ut,showNullButton:un,showNullProgramButton:Jn,onActionCallback:Sn,hidetoolBar:pi,extraUse:rn}),ne.createElement("div",{className:"markdown-editor-body"},ne.createElement("div",{className:"codemirror-container"},ne.createElement("textarea",{ref:Nn,placeholder:nn})),Te?ne.createElement("div",{ref:Bn,className:"preview-container"},oi==="stex"&&ne.createElement(et,{value:on}),oi!=="stex"&&ne.createElement(pe.Z,{edit:!0,disabledFill:Gt,showProgramFill:Jn,value:on,openEditor:Tt=>{var wt;Hn.current=Tt,(wt=Wn.current)==null||wt.setHeight("100vh"),setTimeout(()=>{qt("add-flowchart")},150)}})):null))),Zt?ne.createElement("a",{ref:fn,className:"editor-resize"}):null,kn===yn&&ne.createElement(Dt,{callback:ei,onCancel:Ht}),kn===sn&&ne.createElement(oe,{ref:Wn,editImgId:Hn.current,callback:ei,onCancel:Ht}),ne.createElement(Me.Z,null,gi[kn]&&kn!==yn&&kn!==sn?ne.createElement(tt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Xn,top:Tn},title:ne.createElement("div",{style:{cursor:"move"},onMouseDown:At},gi[kn]),open:!0,onCancel:Ht,footer:null,destroyOnClose:!0,width:kn===sn?"1200px":null,height:kn===sn?"80vh":null,className:"markdown-popup-form"},jn):null))}},45596:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return ct},I:function(){return Ut}});var ne=he(28284),Ue=he(6767),Ne=he(37568),qe=he(77736),ve=he(71051),me=he(47889),Re=he(99571),Ge=he(67303),we=he(59301),fe=he(59301),Ke=Object.defineProperty,pe=Object.defineProperties,et=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Se=(Me,Ze,nt)=>Ze in Me?Ke(Me,Ze,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Me[Ze]=nt,Xe=(Me,Ze)=>{for(var nt in Ze||(Ze={}))Ce.call(Ze,nt)&&Se(Me,nt,Ze[nt]);if(He)for(var nt of He(Ze))Ee.call(Ze,nt)&&Se(Me,nt,Ze[nt]);return Me},rt=(Me,Ze)=>pe(Me,et(Ze));const{useForm:Je}=ne.default,$e={width:280,marginRight:10},Le={labelCol:{span:5},wrapperCol:{span:19}};var ct=({callback:Me,onCancel:Ze})=>{const[nt]=Je();let Pe=(0,we.useRef)();function Qe(Kt){Pe.current.width=nt.getFieldValue("width"),Pe.current.align=nt.getFieldValue("align"),Me(Kt,Pe.current)}function Fe(Kt,xt){if(Kt.status===-1){Ue.ZP.error(Kt.message);return}nt.setFieldsValue({src:`/api/attachments/${Kt.id}`,type:xt.type})}function it(Kt){let xt=Kt.target.files[0];Pe.current=xt,Ut(xt,Fe)}return fe.createElement(ne.default,rt(Xe({form:nt},Le),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),fe.createElement(ne.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(ne.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(Ne.default,{style:$e})),fe.createElement(lt,{onFileChange:it}))),fe.createElement(ne.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(Ne.default,{style:{width:264}})),fe.createElement(ne.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(qe.Z,null,fe.createElement(ne.default.Item,{name:"width",style:{margin:0}},fe.createElement(ve.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(ne.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(me.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"}]})),fe.createElement("aside",null,fe.createElement(ne.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Re.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function lt({onFileChange:Me}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Me}))}function Ut(Me,Ze){if(!Me)throw new String("\u6CA1\u6709\u6587\u4EF6");let nt=new FormData;nt.append("editormd-image-file",Me),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(Qe){Ze(JSON.parse(Qe.target.responseText),Me)},!1),Pe.addEventListener("error",function(Qe){console.error(Qe)},!1),Pe.open("POST",`${Ge.KI}/api/attachments.json`),Pe.send(nt)}},75790:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Ne}});var ne=he(59301),Ue=he(4676);class Ne extends ne.Component{constructor(ve){super(ve);const me=window.document;this.node=me.createElement("div"),me.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,Ue.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(It,Wt,he){"use strict";he.d(Wt,{SV:function(){return Dt},ZP:function(){return ht}});var ne=he(59301),Ue=he(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"]},qe={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"]},ve={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(`
`)}]},me={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(`
`)}]},Re={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 Ge=he(53184),we=he.n(Ge),fe=(We,mt,Et)=>new Promise((ae,te)=>{var z=ie=>{try{se(Et.next(ie))}catch(xe){te(xe)}},oe=ie=>{try{se(Et.throw(ie))}catch(xe){te(xe)}},se=ie=>ie.done?ae(ie.value):Promise.resolve(ie.value).then(z,oe);se((Et=Et.apply(We,mt)).next())});const Ke={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"]}},pe=(We,mt,Et,ae)=>{const te=mt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Et.lineNumber,endColumn:Et.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(oe=>({label:oe,kind:We.languages.CompletionItemKind.Text,insertText:oe,range:ae}))},et=(We,mt,Et,ae)=>{We.languages.registerCompletionItemProvider(mt,{provideCompletionItems(te,z){const oe=te.getWordUntilPosition(z),se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:oe.startColumn,endColumn:oe.endColumn},ie=te.getLineContent(z.lineNumber).substring(oe.startColumn-2,oe.endColumn);return{suggestions:[...pe(We,te,z,se),...Et.map(Ve=>({label:Ve,kind:We.languages.CompletionItemKind.Keyword,documentation:Ve,insertText:Ve,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...ae.map(Ve=>({label:Ve.label,kind:We.languages.CompletionItemKind.Snippet,documentation:Ve.content,insertText:ie.startsWith("#")?Ve.content.replace(/#/,""):Ve.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var He=We=>{Ke.languages.forEach(mt=>{We.languages.registerDocumentFormattingEditProvider(mt,{provideDocumentFormattingEdits(Et){return fe(this,null,function*(){const ae=we()(Et.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:Et.getFullModelRange(),text:ae}]})}})}),et(We,"java",qe.keywords,qe.quickKey),et(We,"cpp",ve.keywords,ve.quickKey),et(We,"c",Ne.keywords,[]),et(We,"python",me.keywords,me.quickKey),et(We,"scala",Re.keywords,Re.quickKey)};const Ce="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ee=Object.defineProperty,Se=(We,mt,Et)=>mt in We?Ee(We,mt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):We[mt]=Et,Xe=(We,mt,Et)=>Se(We,typeof mt!="symbol"?mt+"":mt,Et);const rt=class Rs{constructor(mt,Et,ae){this.placeholder=mt,this.editor=Et,this.monaco=ae,Et.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Rs.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)}};Xe(rt,"ID","editor.widget.placeholderHint");var $e=rt,Le=he(96236),ct=he(6767),lt=he(25399),Ut=he(89392),Me=he(33796),Ze=he(56102),nt=Object.defineProperty,Pe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,xt=(We,mt,Et)=>mt in We?nt(We,mt,{enumerable:!0,configurable:!0,writable:!0,value:Et}):We[mt]=Et,mn=(We,mt)=>{for(var Et in mt||(mt={}))it.call(mt,Et)&&xt(We,Et,mt[Et]);if(Fe)for(var Et of Fe(mt))Kt.call(mt,Et)&&xt(We,Et,mt[Et]);return We},Lt=(We,mt)=>Pe(We,Qe(mt)),ge=(We,mt)=>{var Et={};for(var ae in We)it.call(We,ae)&&mt.indexOf(ae)<0&&(Et[ae]=We[ae]);if(We!=null&&Fe)for(var ae of Fe(We))mt.indexOf(ae)<0&&Kt.call(We,ae)&&(Et[ae]=We[ae]);return Et},de=(We,mt,Et)=>new Promise((ae,te)=>{var z=ie=>{try{se(Et.next(ie))}catch(xe){te(xe)}},oe=ie=>{try{se(Et.throw(ie))}catch(xe){te(xe)}},se=ie=>ie.done?ae(ie.value):Promise.resolve(ie.value).then(z,oe);se((Et=Et.apply(We,mt)).next())});function dt(We){return/^\d+$/.test(We)?`${We}px`:We}function Jt(){}let yt=!1;const Ie={"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 tt(We=[]){let mt=We;if(Array.isArray(We)){for(let Et=0;Et<We.length;Et++){let ae=Ie[We[Et]];if(ae)return ae}return mt[0]}return Ie[mt]||mt}let at=null;const dn=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(We){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",We)}});var ht=We=>{var mt=We,{width:Et="100%",height:ae="100%",value:te,language:z="javascript",style:oe={},options:se={},overrideServices:ie={},theme:xe="vs-dark",onEditBlur:Ve,isCopy:Mt=!1,onSave:kt,autoHeight:pt=!1,forbidCopy:St=!1,onChange:$t=Jt,editorDidMount:Yt=Jt,onFocus:ln=Jt,onBreakPoint:hn=Jt,breakPointValue:Ft=[],filename:Ln="educoder.txt",errorLine:sn,errorContent:yn="",highlightLine:st,openBreakPoint:En=!1,placeholder:Ot="",showMiniMap:an=!0}=mt,Cn=ge(mt,["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 $n=(0,ne.useRef)(),Rt=(0,ne.useRef)({}),zn=(0,ne.useRef)(),Ei=(0,ne.useRef)(),fi=(0,ne.useRef)([]),Ri=(0,ne.useRef)(!1),Wi=(0,ne.useRef)(),Bi=(0,ne.useRef)(),Li=(0,ne.useRef)(!1),[ai,wi]=(0,ne.useState)(!1);function Di(){let Zt;return $n.current&&(Zt=new Ue.Z(ot=>{for(let un of ot)(un.target.offsetHeight>0||un.target.offsetWidth>0)&&Rt.current.instance.layout()}),Zt.observe($n.current)),Zt}function li(){ct.ZP.warning({content:decodeURIComponent(Ce),key:"monaco-editor-tip"})}const xi=()=>{let Zt=Rt.current.instance;if(te!=null&&Zt&&ai){const ot=Zt.getModel();ot&&te!==ot.getValue()&&(yt=!0,ot.setValue(te),Zt.layout(),yt=!1)}};(0,ne.useEffect)(()=>{const Zt=Me.Z.subscribe("formatDocument",ot=>{var un;let Jn=Rt.current.instance;(un=Jn==null?void 0:Jn.getAction)==null||un.call(Jn,"editor.action.formatDocument").run()});return window.updateMonacoValue=ot=>{$t(ot)},Zt},[]),(0,ne.useEffect)(()=>{var Zt;let ot=Rt.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{xi()},500),te&&(te!=null&&te.length)&&((Zt=ot==null?void 0:ot.updateOptions)==null||Zt.call(ot,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,ai,Rt.current]),(0,ne.useEffect)(()=>{if(sn&&Rt.current&&Rt.current.instance){let ot=Rt.current.instance;ot.changeViewZones(function(un){var Jn=document.createElement("div");Jn.style.padding="10px 20px",Jn.style.width="calc(100% - 20px)",Jn.className="my-error-line-wrp",Jn.innerHTML=yn,un.addZone({afterLineNumber:sn||11,heightInLines:3,domNode:Jn})});var Zt={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}};ot.addOverlayWidget(Zt),ot.revealPositionInCenter({lineNumber:20,column:1})}},[sn,Rt.current,ai]);const gi=(Zt="",ot)=>{if(!Zt||Zt.trim()==="")return!0;const Jn=Rt.current.instance.getModel().getLineTokens(ot);let pi=!1;for(let Ae=0;Ae<2;Ae++)Jn.getStandardTokenType(Ae)===1&&(pi=!0);return pi};(0,ne.useEffect)(()=>{var Zt;const ot=(Zt=Rt.current)==null?void 0:Zt.instance;if(ot&&ai&&St){const un=ot.onDidBlurEditorWidget(()=>{Li.current=!1}),Jn=ot.onDidFocusEditorText(()=>{Li.current=!0});return()=>{un.dispose(),Jn.dispose()}}},[Rt.current,ai,St]),(0,ne.useEffect)(()=>{var Zt;if((Zt=Rt.current)!=null&&Zt.instance&&ai&&En){let ot=Rt.current.instance,un=ot.getModel();if(!un)return;(()=>{var zt;let rn=[],_e=[];const Zn=un.getAllDecorations();for(let Be of Zn)Be.options.className==="highlighted-line"&&(rn.push((zt=Be==null?void 0:Be.range)==null?void 0:zt.startLineNumber),_e.push(Be==null?void 0:Be.id));if(st===rn[0])return;un.deltaDecorations(_e,[]);const on=un.getLineCount();st&&st<=on&&(ot.deltaDecorations([],[{range:new at.Range(st,1,st,un.getLineMaxColumn(st)),options:{isWholeLine:!0,className:"highlighted-line"}}]),ot.revealLineInCenter(st))})();const pi=(zt=!1)=>{var rn;let _e=[],Zn=[];const on=un.getAllDecorations();for(let Be of on)Be.options.linesDecorationsClassName==="breakpoints-select"&&(_e.push((rn=Be==null?void 0:Be.range)==null?void 0:rn.startLineNumber),Zn.push(Be==null?void 0:Be.id));if(zt)return{lines:_e,ids:Zn};hn(_e)},Ae=zt=>de(void 0,null,function*(){let rn={range:new at.Range(zt,1,zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield un.deltaDecorations([],[rn]),pi()}),De=zt=>de(void 0,null,function*(){let rn=[];const _e=ot.getLineDecorations(zt);for(let Zn of _e)Zn.options.linesDecorationsClassName==="breakpoints-select"&&rn.push(Zn.id);yield un.deltaDecorations(rn,[]),pi()}),Bt=zt=>{let rn=ot.getLineDecorations(zt);for(let _e of rn)if(_e.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ut.isEqual)(Ft,pi(!0).lines)){un.deltaDecorations(pi(!0).ids,[]);const zt=Ft.map(rn=>({range:new at.Range(rn,1,rn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));un.deltaDecorations([],zt)}const ft=ot.onDidChangeModelContent(zt=>{let rn=ot.getPosition();if(rn){let _e=rn.lineNumber;clearTimeout(Bi.current),Bi.current=setTimeout(()=>{gi(un.getLineContent(_e),_e)?De(_e):Bt(_e)?(De(_e),Ae(_e)):pi()},100)}}),ze=ot.onMouseDown(zt=>{var rn,_e,Zn;if(zt.target.detail&&((Zn=(_e=(rn=zt.target)==null?void 0:rn.element)==null?void 0:_e.className)!=null&&Zn.includes("line-numbers"))){let on=zt.target.position.lineNumber;if(gi(un.getLineContent(on),on))return;Bt(on)?De(on):Ae(on)}}),vt=zt=>{let rn={range:new at.Range(zt,1,zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};fi.current=ot.deltaDecorations(fi.current,[rn])},Qt=()=>{fi.current=ot.deltaDecorations(fi.current,[])},Gt=ot.onMouseMove(zt=>{var rn,_e,Zn;if(Qt(),zt.target.detail&&((Zn=(_e=(rn=zt.target)==null?void 0:rn.element)==null?void 0:_e.className)!=null&&Zn.includes("line-numbers"))){let on=zt.target.position.lineNumber;if(gi(un.getLineContent(on),on))return;vt(on)}}),nn=ot.onMouseLeave(()=>{Qt()});return()=>{ft.dispose(),ze.dispose(),Gt.dispose(),nn.dispose()}}},[Rt.current,ai,Ft,st,En,z]),(0,ne.useEffect)(()=>{var Zt;(Zt=Rt.current)!=null&&Zt.instance&&En&&Rt.current.instance.setPosition({lineNumber:0,column:0})},[st]);function _i(){let Zt=Rt.current.instance;if(Zt){const ot=Zt.getSelection(),un=Rt.current.pastePos||{},Jn=new at.Range(un.startLineNumber||ot.endLineNumber,un.startColumn||ot.endColumn,un.endLineNumber||ot.endLineNumber,un.endColumn||ot.endColumn);setTimeout(()=>{Zt.executeEdits("",[{range:Jn,text:""}])},300)}}function bn(Zt){(window.navigator.platform.match("Mac")?Zt.metaKey:Zt.ctrlKey)&&Zt.keyCode==83&&(Zt.preventDefault(),kt())}const Dn=()=>{if(pt&&Rt.current.instance){const Zt=Rt.current.instance.getContentHeight();oi(Zt<ae?ae:Zt)}else oi(ae)};function Kn(Zt){var ot=document.createEvent("MouseEvents");ot.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Zt.dispatchEvent(ot)}const Pn=Zt=>{if(!Li.current)return;const{keyCode:ot,ctrlKey:un,metaKey:Jn,target:pi,type:Ae}=Zt;return(Ae==="paste"||(ot===67||ot===86)&&(Jn||un))&&pi.nodeName==="TEXTAREA"&&(li(),Zt.preventDefault()),!1};function mi(Zt,ot){var un=window.URL||window.webkitURL||window,Jn=new Blob([ot]),pi=document.createElementNS("http://www.w3.org/1999/xhtml","a");pi.href=un.createObjectURL(Jn),pi.download=Zt,Kn(pi)}(0,ne.useEffect)(()=>{Dn()},[Dn]),(0,ne.useEffect)(()=>{$n.current&&!ai&&Promise.all([he.e(8909),he.e(5028)]).then(he.bind(he,71448)).then(Zt=>{try{at=Zt,Rt.current.instance=at.editor.create($n.current,{value:te,language:tt(z),theme:xe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:an||!1}},ie);const ot=Rt.current.instance;let pi=[...Le.BH._menuItems].find(ft=>ft[0]._debugName=="EditorContext")[1],Ae=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],De=(ft,ze)=>{var vt,Qt;let Gt=ft._first;do ze.includes((Qt=(vt=Gt.element)==null?void 0:vt.command)==null?void 0:Qt.id)&&ft._remove(Gt);while(Gt=Gt.next)};if(Yt(ot,at),setTimeout(()=>{Dn(),Rt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{mi(Ln||"educoder.txt",ot.getValue())}})},500),Rt.current.subscription=ot.onDidChangeModelContent(ft=>{Ri.current?clearTimeout(Wi.current):(Dn(),$t(ot.getValue(),ft)),Wi.current=setTimeout(()=>{Ri.current=!1},500)}),window.Monaco||He(at,tt(z)),St&&(De(pi,Ae),$n.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Pn),window.removeEventListener("paste",Pn),window.addEventListener("keydown",Pn),window.addEventListener("paste",Pn)),window.Monaco=at,Ve&&ot.onDidBlurEditorWidget(()=>{Ve(ot.getValue())}),ln&&ot.onDidFocusEditorText(()=>{St&&dn(),ln(ot.getValue())}),St){dn();try{ot.onDidPaste(ft=>{const ze=ot.getSelection(),vt=Rt.current.pastePos||{},Qt=new at.Range(vt.startLineNumber||ze.endLineNumber,vt.startColumn||ze.endColumn,vt.endLineNumber||ze.endLineNumber,vt.endColumn||ze.endColumn);ot.executeEdits("",[{range:ft.range,text:""}])})}catch(ft){}}let Bt=Di();return Ot&&typeof Ot=="string"&&new $e(Ot,ot,at),wi(!0),()=>{const ft=Rt.current.instance;ft.dispose();const ze=ft.getModel();ze&&ze.dispose(),Rt.current.subscription&&Rt.current.subscription.dispose(),Bt.unobserve($n.current)}}catch(ot){}})},[]),(0,ne.useEffect)(()=>{if(Rt.current.instance&&ai)return document.addEventListener("keydown",bn,!1),()=>{document.removeEventListener("keydown",bn)}},[kt,ai]),(0,ne.useEffect)(()=>{let Zt=Rt.current.instance;if(Zt&&ai){let ot=tt(z);at.editor.setModelLanguage(Zt.getModel(),ot)}},[z,ai]),(0,ne.useEffect)(()=>{Rt.current.instance&&ai&&at.editor.setTheme(xe)},[xe,ai]),(0,ne.useEffect)(()=>{let Zt=Rt.current.instance;zn.current=se,Zt&&ai&&(Zt.updateOptions(mn({},se)),setTimeout(()=>{Zt.getModel().updateOptions(mn({},se))},200))},[JSON.stringify(se),ai]),(0,ne.useEffect)(()=>{let Zt=Rt.current.instance;Zt&&ai&&Zt.layout()},[Et,ae,ai]);const[yi,Pi]=(0,ne.useState)(dt(Et)),[hi,oi]=(0,ne.useState)(dt(ae)),ki=Lt(mn({},oe),{width:yi,height:hi,position:"relative"});return ne.createElement("div",{className:"my-monaco-editor",ref:$n,style:ki},Mt&&ne.createElement(Ze.CopyToClipboard,{text:te,onCopy:()=>ct.ZP.success("\u590D\u5236\u6210\u529F")},ne.createElement(lt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ne.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ne.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Dt({width:We="100%",height:mt="100%",original:Et,modified:ae,language:te,options:z={}}){const oe=(0,ne.useRef)(),[se,ie]=(0,ne.useState)(null);function xe(pt){let St;return oe.current&&(St=new Ue.Z($t=>{for(let Yt of $t)(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&pt.layout()}),St.observe(oe.current)),St}(0,ne.useEffect)(()=>(oe.current&&Promise.all([he.e(8909),he.e(9404)]).then(he.bind(he,2550)).then(pt=>{at=pt;const St=at.editor.createDiffEditor(oe.current,Lt(mn({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},z),{wordWrap:!0}));ie(St);let $t=xe(St);return()=>{St.dispose();const Yt=St.getModel();Yt&&Yt.dispose(),$t.unobserve(oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ne.useEffect)(()=>{se&&se.setModel({original:at.editor.createModel(Et,te),modified:at.editor.createModel(ae,te)})},[Et,ae,te,se]);const Ve=dt(We),Mt=dt(mt),kt={width:Ve,height:Mt};return ne.createElement("div",{className:"my-diff-editor",ref:oe,style:kt})}},17904:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Ue}});var ne=he(59301);function Ue(Ne,qe){const ve=(0,ne.useRef)();(0,ne.useEffect)(()=>{ve.current=Ne}),(0,ne.useEffect)(()=>{function me(){ve.current()}if(qe!==null){let Re=setInterval(me,qe);return()=>clearInterval(Re)}},[qe])}},99667:function(It,Wt,he){"use strict";he.r(Wt),he.d(Wt,{default:function(){return on}});var ne=he(59301),Ue=he(76560),Ne=he(93041),qe=he(24404),ve=he(28284),me=he(6767),Re=he(37285),Ge=he(91882),we=he(77019),fe=he(5269),Ke=he(25399),pe=he(37568),et=he(99571),He=he(32134),Ce=he(79763),Ee=he(62957),Se=he(62673),Xe=he(71051),rt=he(72664),Je=he(2978),$e=he(38394),Le={flex_box_center:"flex_box_center___T9vjl",flex_space_between:"flex_space_between___zZP1J",flex_box_vertical_center:"flex_box_vertical_center___vbIhw",flex_box_center_end:"flex_box_center_end___SjRau",flex_box_column:"flex_box_column___Ic_zi",wrap:"wrap___GtXAk",modal:"modal___mDuC3",titleWrap:"titleWrap___EzCZh",required:"required___KgfdI",title:"title___TMgfc",colorGray:"colorGray___xNVTs",choiceWrap:"choiceWrap___Rv9ug",answer:"answer___hVpls",activeAnswer:"activeAnswer___oJoq9",deleteIcon:"deleteIcon___bkn4b",addIcon:"addIcon___S2pDY",editorWrap:"editorWrap___BOx_r",htmlWrap:"htmlWrap___ERVlQ",radio:"radio___lrt5b",color333:"color333___pz3OT",color999:"color999___jtQ7e",questionType:"questionType___qUnUb",questionChoices:"questionChoices___n36qp"},ct=Object.defineProperty,lt=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ze=(Be,Te,ye)=>Te in Be?ct(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,nt=(Be,Te)=>{for(var ye in Te||(Te={}))Ut.call(Te,ye)&&Ze(Be,ye,Te[ye]);if(lt)for(var ye of lt(Te))Me.call(Te,ye)&&Ze(Be,ye,Te[ye]);return Be},Pe=(Be,Te)=>{var ye={};for(var ut in Be)Ut.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&lt)for(var ut of lt(Be))Te.indexOf(ut)<0&&Me.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},Qe=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const Fe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],it=(Be,Te)=>{var ye=Be,{problemset:ut,globalSetting:_n,loading:kn,dispatch:qt,onRef:Ct=()=>{},editData:Oe}=ye,cn=Pe(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[wn,Fn]=(0,ne.useState)([]),[On,Xn]=(0,ne.useState)(),[Xt,Tn]=(0,ne.useState)([]),[Gn,Nn]=(0,ne.useState)(""),[jt,fn]=(0,ne.useState)(5),[Bn,Hn]=(0,ne.useState)(!1),Wn=(0,Ue.useParams)();(0,ne.useEffect)(()=>{Fn(["","","",""])},[]),(0,ne.useEffect)(()=>{if(!(Oe!=null&&Oe.question_choices)){Hn(!0);return}Nn(Oe==null?void 0:Oe.question_title),fn(parseInt(Oe==null?void 0:Oe.question_score)),Fn(Oe==null?void 0:Oe.question_choices.map(Ht=>Ht.choice_text));const jn=[];Oe==null||Oe.standard_answer.map((Ht,Qn)=>{jn.push(Ht-1)}),Tn(jn)},[Oe]),(0,ne.useImperativeHandle)(Te,()=>({onSave:In,isEdit:Bn}));const In=()=>Qe(void 0,null,function*(){if(!Gn)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const jn=wn.findIndex(Un=>!Un);if(jn>-1)return me.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Fe[jn]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Xt.length)return me.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Xt.length<1)return me.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const Ht=wn.map((Un,Ci)=>({choice_text:Un,is_answer:Xt.includes(Ci)?Ci+1:0}));let Qn;Oe.question_id?Qn=yield qt({type:"exercise/editExerciseQuestion",payload:{id:Oe.question_id,question_title:Gn,question_type:1,question_score:"5.0",question_choices:Ht.map(Un=>Un.choice_text),standard_answers:Ht.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}}):Qn=yield qt({type:"exercise/addExerciseQuestion",payload:{categoryId:Wn.categoryId,question_title:Gn,question_type:1,question_score:"5.0",question_choices:Ht.map(Un=>Un.choice_text),standard_answers:Ht.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}}),Qn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Hn(!1),qt({type:"exercise/editExercise",payload:nt({},Wn)}))}),Vn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],ni=jn=>Qe(void 0,null,function*(){switch(jn.id){case"del":let Ht;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Qe(this,null,function*(){yield(0,rt.Fl)({id:Oe.question_id}),qt({type:"exercise/editExercise",payload:nt({},Wn)})})}});break;case"up":case"down":yield qt({type:"exercise/exeriseMoveUpDown",payload:{id:Oe.question_id,opr:jn.id}}),qt({type:"exercise/editExercise",payload:nt({},Wn)});break;case"edit":Hn(!0);break}}),Sn=()=>{var jn;return ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},Oe.key,"\u3001\u591A\u9009\u9898"),"\uFF08",Oe.question_score,"\u5206\uFF09"),!Oe.hideAction&&Vn.map(function(Ht,Qn){return Ht.id==="up"&&Oe.key===1||Ht.id==="down"&&Oe.key===Oe.len?null:ne.createElement(Ke.Z,{key:Qn,placement:"bottom",title:Ht.name},ne.createElement("span",{onClick:()=>ni(Ht),className:Ht.icon}))})),ne.createElement("div",{className:"mt5"},ne.createElement($e.Z,{value:Oe.question_title})),ne.createElement("div",{className:Le.questionChoices},(jn=Oe==null?void 0:Oe.question_choices)==null?void 0:jn.map(function(Ht,Qn){return ne.createElement(we.Z,null,ne.createElement(fe.Z,null,ne.createElement(Se.default,{key:Qn,checked:Oe.standard_answer.includes(Qn+1),disabled:!0},Fe[Qn],".")),ne.createElement(fe.Z,{flex:"1"},ne.createElement("span",{className:"c-black font14"},ne.createElement($e.Z,{value:Ht.choice_text}))))})))},ei=()=>ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),ne.createElement("p",{className:Le.titleWrap},ne.createElement("span",{className:Le.required},"*"),ne.createElement("span",{className:Le.title},"\u9898\u5E72\uFF1A")),ne.createElement(Je.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Gn,onChange:jn=>Nn(jn)}),wn.map((jn,Ht)=>ne.createElement("div",{className:Le.choiceWrap,key:Ht},ne.createElement(Ke.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ne.createElement("div",{className:`${Le.answer} ${Xt.includes(Ht)?Le.activeAnswer:""}`,onClick:()=>{Xt.includes(Ht)?Tn(Xt.filter(Qn=>Qn!==Ht)):Tn([...Xt,Ht])}},Fe[Ht])),ne.createElement("div",{className:Le.editorWrap},On===Ht?ne.createElement(Je.Z,{id:`single-question-option-${Ht}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:jn,onChange:Qn=>{wn[Ht]=Qn,Fn(wn)}}):ne.createElement("div",{className:Le.htmlWrap,onClick:()=>Xn(Ht)},ne.createElement($e.Z,{value:jn}))),Ht>1&&ne.createElement(Ke.Z,{title:"\u5220\u9664"},ne.createElement("i",{className:`${Le.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>Fn(wn.filter((Qn,Un)=>Un!==Ht))})),Ht<7&&Ht===wn.length-1&&ne.createElement(Ke.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ne.createElement("i",{className:`${Le.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Fn([...wn,""])})))),ne.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),ne.createElement("p",{className:""},"\u5206\u503C\uFF1A",ne.createElement(Xe.Z,{value:jt,max:1e4,min:-1,onChange:jn=>{fn(jn)}})," \u5206"),ne.createElement("aside",{className:"tr"},Oe.question_id&&ne.createElement(et.ZP,{type:"default",onClick:()=>Hn(!1)},"\u53D6\u6D88"),ne.createElement(et.ZP,{className:"ml20",type:"primary",onClick:()=>In()},"\u4FDD\u5B58")));return ne.createElement("section",{className:Le.wrap},!Bn&&Sn(),Bn&&ei())};var Kt=(0,Ue.connect)(({problemset:Be,loading:Te,globalSetting:ye})=>({problemset:Be,globalSetting:ye,loading:Te.effects}),null,null,{forwardRef:!0})((0,ne.forwardRef)(it)),xt=he(47889),mn=Object.defineProperty,Lt=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,dt=(Be,Te,ye)=>Te in Be?mn(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,Jt=(Be,Te)=>{for(var ye in Te||(Te={}))ge.call(Te,ye)&&dt(Be,ye,Te[ye]);if(Lt)for(var ye of Lt(Te))de.call(Te,ye)&&dt(Be,ye,Te[ye]);return Be},yt=(Be,Te)=>{var ye={};for(var ut in Be)ge.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&Lt)for(var ut of Lt(Be))Te.indexOf(ut)<0&&de.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},Ie=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const tt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],at=(Be,Te)=>{var ye=Be,{problemset:ut,globalSetting:_n,loading:kn,dispatch:qt,onRef:Ct=()=>{},editData:Oe}=ye,cn=yt(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[wn,Fn]=(0,ne.useState)([]),[On,Xn]=(0,ne.useState)(),[Xt,Tn]=(0,ne.useState)([]),[Gn,Nn]=(0,ne.useState)(""),[jt,fn]=(0,ne.useState)(0),[Bn,Hn]=(0,ne.useState)(!1),Wn=(0,Ue.useParams)();(0,ne.useEffect)(()=>{Fn(["","","",""])},[]),(0,ne.useEffect)(()=>{if(!(Oe!=null&&Oe.question_choices)){Hn(!0);return}Nn(Oe==null?void 0:Oe.question_title),fn(parseInt(Oe==null?void 0:Oe.question_score)),Fn(Oe==null?void 0:Oe.question_choices.map(Ht=>Ht.choice_text));const jn=[];Oe==null||Oe.standard_answer.map((Ht,Qn)=>{jn.push(Ht-1)}),Tn(jn)},[Oe]),(0,ne.useImperativeHandle)(Te,()=>({onSave:In,isEdit:Bn}));const In=()=>Ie(void 0,null,function*(){if(!Gn)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const jn=wn.findIndex(Un=>!Un);if(jn>-1)return me.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${tt[jn]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Xt.length)return me.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Xt.length<1)return me.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const Ht=wn.map((Un,Ci)=>({choice_text:Un,is_answer:Xt.includes(Ci)?Ci+1:0}));let Qn;Oe.question_id?Qn=yield(0,Ce.Kc)({id:Oe.question_id,question_title:Gn,question_type:1,question_score:jt,question_choices:Ht.map(Un=>Un.choice_text),standard_answers:Ht.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}):Qn=yield(0,Ce.iV)({exercise_bank_id:Wn.topicId,question_title:Gn,question_type:1,question_score:"5.0",question_choices:Ht.map(Un=>Un.choice_text),standard_answers:Ht.filter(Un=>Un.is_answer).map(Un=>Un.is_answer)}),Qn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Hn(!1)),yield qt({type:"polls/getExerciseBanks",payload:Jt({},Wn)})}),Vn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],ni=jn=>Ie(void 0,null,function*(){switch(jn.id){case"del":let Ht;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Ie(this,null,function*(){yield(0,Ce.x$)({pollsId:Oe.question_id}),qt({type:"polls/getExerciseBanks",payload:Jt({},Wn)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Oe==null?void 0:Oe.question_id,opr:jn.id}),qt({type:"polls/getExerciseBanks",payload:Jt({},Wn)});break;case"edit":Hn(!0);break}}),Sn=()=>{var jn;return ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},Oe.key,"\u3001\u5355\u9009\u9898"),"\uFF08",Oe.question_score,"\u5206\uFF09"),!Oe.hideAction&&Vn.map(function(Ht,Qn){return Ht.id==="up"&&Oe.key===1||Ht.id==="down"&&Oe.key===Oe.len?null:ne.createElement(Ke.Z,{key:Qn,placement:"bottom",title:Ht.name},ne.createElement("span",{onClick:()=>ni(Ht),className:Ht.icon}))})),ne.createElement("div",{className:"mt5"},ne.createElement($e.Z,{value:Oe.question_title})),ne.createElement("div",{className:Le.questionChoices},(jn=Oe==null?void 0:Oe.question_choices)==null?void 0:jn.map(function(Ht,Qn){return ne.createElement(we.Z,null,ne.createElement(fe.Z,null,ne.createElement(xt.ZP,{key:Qn,checked:Oe.standard_answer.includes(Qn+1),disabled:!0},tt[Qn],".")),ne.createElement(fe.Z,{flex:"1"},ne.createElement("span",{className:"c-black font14"},ne.createElement($e.Z,{value:Ht.choice_text}))))})))},ei=()=>ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),ne.createElement("p",{className:Le.titleWrap},ne.createElement("span",{className:Le.required},"*"),ne.createElement("span",{className:Le.title},"\u9898\u5E72\uFF1A")),ne.createElement(Je.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Gn,onChange:jn=>Nn(jn)}),wn.map((jn,Ht)=>ne.createElement("div",{className:Le.choiceWrap,key:Ht},ne.createElement(Ke.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ne.createElement("div",{className:`${Le.answer} ${Xt.includes(Ht)?Le.activeAnswer:""}`,onClick:()=>{Xt.includes(Ht)?Tn(Xt.filter(Qn=>Qn!==Ht)):Tn([...Xt,Ht])}},tt[Ht])),ne.createElement("div",{className:Le.editorWrap},On===Ht?ne.createElement(Je.Z,{id:`single-question-option-${Ht}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:jn,onChange:Qn=>{wn[Ht]=Qn,Fn(wn)}}):ne.createElement("div",{className:Le.htmlWrap,onClick:()=>Xn(Ht)},ne.createElement($e.Z,{value:jn}))),Ht>1&&ne.createElement(Ke.Z,{title:"\u5220\u9664"},ne.createElement("i",{className:`${Le.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>Fn(wn.filter((Qn,Un)=>Un!==Ht))})),Ht<7&&Ht===wn.length-1&&ne.createElement(Ke.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ne.createElement("i",{className:`${Le.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Fn([...wn,""])})))),ne.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),ne.createElement("p",{className:""},"\u5206\u503C\uFF1A",ne.createElement(Xe.Z,{value:jt,max:1e4,min:-1,onChange:jn=>{fn(jn)}})," \u5206"),ne.createElement("aside",{className:"tr"},Oe.question_id&&ne.createElement(et.ZP,{type:"default",onClick:()=>Hn(!1)},"\u53D6\u6D88"),ne.createElement(et.ZP,{className:"ml20",type:"primary",onClick:()=>In()},"\u4FDD\u5B58")));return ne.createElement("section",{className:Le.wrap},!Bn&&Sn(),Bn&&ei())};var dn=(0,Ue.connect)(({problemset:Be,loading:Te,globalSetting:ye})=>({problemset:Be,globalSetting:ye,loading:Te.effects}),null,null,{forwardRef:!0})((0,ne.forwardRef)(at)),ht=Object.defineProperty,Dt=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Et=(Be,Te,ye)=>Te in Be?ht(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,ae=(Be,Te)=>{for(var ye in Te||(Te={}))We.call(Te,ye)&&Et(Be,ye,Te[ye]);if(Dt)for(var ye of Dt(Te))mt.call(Te,ye)&&Et(Be,ye,Te[ye]);return Be},te=(Be,Te)=>{var ye={};for(var ut in Be)We.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&Dt)for(var ut of Dt(Be))Te.indexOf(ut)<0&&mt.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},z=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const oe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],se=(Be,Te)=>{var ye=Be,{problemset:ut,globalSetting:_n,loading:kn,dispatch:qt,onRef:Ct=()=>{},editData:Oe}=ye,cn=te(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[wn,Fn]=(0,ne.useState)(),[On,Xn]=(0,ne.useState)(""),[Xt,Tn]=(0,ne.useState)(!1),[Gn,Nn]=(0,ne.useState)(5),jt=(0,Ue.useParams)();(0,ne.useEffect)(()=>{if(!(Oe!=null&&Oe.question_choices)){Tn(!0);return}Xn(Oe==null?void 0:Oe.question_title),Nn(Oe==null?void 0:Oe.question_score),Fn(Oe.standard_answer[0]+"")},[Oe]),(0,ne.useImperativeHandle)(Te,()=>({onSave:fn,isEdit:Xt}));const fn=()=>z(void 0,null,function*(){if(!On)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!wn)return me.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;const Vn=[{choice_text:"\u6B63\u786E",is_answer:wn==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:wn==="2"?2:0}];let ni;return Oe.question_id?ni=yield(0,Ce.Kc)({id:Oe.question_id,question_title:On,question_type:2,question_score:Gn,question_choices:Vn.map(Sn=>Sn.choice_text),standard_answers:Vn.filter(Sn=>Sn.is_answer).map(Sn=>Sn.is_answer)}):ni=yield(0,Ce.iV)({exercise_bank_id:jt.topicId,question_title:On,question_type:2,question_score:Gn,question_choices:Vn.map(Sn=>Sn.choice_text),standard_answers:Vn.filter(Sn=>Sn.is_answer).map(Sn=>Sn.is_answer)}),ni.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Tn(!1)),qt({type:"polls/getExerciseBanks",payload:ae({},jt)}),{name:On,choices:Vn}}),Bn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Hn=Vn=>z(void 0,null,function*(){switch(Vn.id){case"del":let ni;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return z(this,null,function*(){yield(0,Ce.x$)({pollsId:Oe.question_id}),qt({type:"polls/getExerciseBanks",payload:ae({},jt)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Oe==null?void 0:Oe.question_id,opr:Vn.id}),qt({type:"polls/getExerciseBanks",payload:ae({},jt)});break;case"edit":Tn(!0);break}}),Wn=()=>{var Vn;return ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},Oe.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",Oe.question_score,"\u5206\uFF09"),!Oe.hideAction&&Bn.map(function(ni,Sn){return ni.id==="up"&&Oe.key===1||ni.id==="down"&&Oe.key===Oe.len?null:ne.createElement(Ke.Z,{key:Sn,placement:"bottom",title:ni.name},ne.createElement("span",{onClick:()=>Hn(ni),className:ni.icon}))})),ne.createElement("div",{className:"mt5"},Oe.question_title),ne.createElement("div",{className:Le.questionChoices},(Vn=Oe==null?void 0:Oe.question_choices)==null?void 0:Vn.map(function(ni,Sn){return ne.createElement(xt.ZP,{key:Sn,checked:Oe.standard_answer.includes(Sn+1),disabled:!0},oe[Sn],". ",ne.createElement("span",{className:"c-black font14"},ni.choice_text))})))},In=()=>ne.createElement("aside",null,ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),ne.createElement("p",{className:Le.titleWrap},ne.createElement("span",{className:Le.required},"*"),ne.createElement("span",{className:Le.title},"\u9898\u5E72\uFF1A")),ne.createElement(Je.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:On,onChange:Vn=>Xn(Vn)}),ne.createElement("p",{className:Le.titleWrap},ne.createElement("span",{className:Le.required},"*"),ne.createElement("span",{className:Le.title},"\u7B54\u6848\u9009\u9879\uFF1A",ne.createElement("span",{className:Le.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),ne.createElement(xt.ZP.Group,{buttonStyle:"solid",value:wn,onChange:Vn=>Fn(Vn.target.value)},ne.createElement(xt.ZP.Button,{value:"1",className:`${Le.radio} mr40`},"\u6B63\u786E"),ne.createElement(xt.ZP.Button,{value:"2",className:Le.radio},"\u9519\u8BEF")),ne.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),ne.createElement("p",{className:""},"\u5206\u503C\uFF1A",ne.createElement(Xe.Z,{value:Gn,max:1e4,min:-1,onChange:Vn=>{Nn(Vn)}})," \u5206"),ne.createElement("aside",{className:"tr"},Oe.question_id&&ne.createElement(et.ZP,{type:"default",onClick:()=>Tn(!1)},"\u53D6\u6D88"),ne.createElement(et.ZP,{className:"ml20",type:"primary",onClick:()=>fn()},"\u4FDD\u5B58")));return ne.createElement("section",{className:Le.wrap},!Xt&&Wn(),Xt&&In())};var ie=(0,Ue.connect)(({problemset:Be,loading:Te,globalSetting:ye})=>({problemset:Be,globalSetting:ye,loading:Te.effects}),null,null,{forwardRef:!0})((0,ne.forwardRef)(se)),xe=he(48106),Ve=he(20927),Mt=he(49661),kt=Object.defineProperty,pt=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Yt=(Be,Te,ye)=>Te in Be?kt(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,ln=(Be,Te)=>{for(var ye in Te||(Te={}))St.call(Te,ye)&&Yt(Be,ye,Te[ye]);if(pt)for(var ye of pt(Te))$t.call(Te,ye)&&Yt(Be,ye,Te[ye]);return Be},hn=(Be,Te)=>{var ye={};for(var ut in Be)St.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&pt)for(var ut of pt(Be))Te.indexOf(ut)<0&&$t.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},Ft=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const Ln=null,sn=(Be,Te)=>{var ye=Be,{problemset:ut,globalSetting:_n,loading:kn,dispatch:qt,editData:Ct}=ye,Oe=hn(ye,["problemset","globalSetting","loading","dispatch","editData"]);const[cn,wn]=(0,ne.useState)(""),[Fn,On]=(0,ne.useState)(""),[Xn,Xt]=(0,ne.useState)([]),[Tn,Gn]=(0,ne.useState)(""),[Nn,jt]=(0,ne.useState)(),[fn,Bn]=(0,ne.useState)(!1),[Hn,Wn]=(0,ne.useState)(5),[In,Vn]=(0,ne.useState)(!1),ni=(0,Ue.useParams)();(0,ne.useEffect)(()=>{if(!(Ct!=null&&Ct.question_title)){Vn(!0);return}wn(Ct==null?void 0:Ct.question_title),jt(Ct==null?void 0:Ct.is_ordered),Wn(Ct==null?void 0:Ct.question_score);const Nt=Ct==null?void 0:Ct.standard_answer.map(At=>At.answer_text);Xt(Nt)},[ut.editData]),(0,ne.useEffect)(()=>{Bn(!1)},[In]),(0,ne.useImperativeHandle)(Te,()=>({onSave:Sn,isEdit:In}));const Sn=()=>Ft(void 0,null,function*(){let Nt=[],At=!1;if(Xn.forEach((Tt,wt)=>{Nt.push({choice_id:wt+1,answer_text:[]}),Tt.forEach((Vt,en)=>{Nt[wt].answer_text.push(Vt),(!Vt||!(0,Mt.eR)(Vt,1e4))&&(Gn(`${wt}-${en}`),me.ZP.info(Vt?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),At=!0)})}),At)return!1;let gn;return Ct.question_id?gn=yield(0,Ce.Kc)({id:Ct.question_id,question_title:cn,question_type:3,question_score:Hn,is_ordered:Nn,standard_answers:Nt}):gn=yield(0,Ce.iV)({exercise_bank_id:ni.topicId,question_title:cn,question_type:3,question_score:Hn,is_ordered:Nn,standard_answers:Nt}),gn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Vn(!1)),qt({type:"polls/getExerciseBanks",payload:ln({},ni)}),{name:cn,analysis:Fn,standard_answers:Nt,is_ordered:Nn}}),ei=(Nt,At,gn)=>{const Tt=Xn.slice();if(At&&Tt.splice(Nt,At),gn&&fn)for(let wt=0;wt<gn;wt++)Tt.splice(Nt+wt,0,[""]);Bn(!0),Xt(Tt)},jn=(Nt,At,gn)=>{Gn("");let Tt=Xn.slice();Tt[Nt][At]=gn,Xt(Tt)},Ht=Nt=>{let At=Xn.slice();At[Nt]=[...At[Nt],""],Xt(At)},Qn=(Nt,At)=>{let gn=Xn.slice();if(!gn[Nt][At]){gn[Nt]=gn[Nt].filter((Tt,wt)=>wt!==At),Xt(gn);return}Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Le.modal,onOk:()=>{gn[Nt]=gn[Nt].filter((Tt,wt)=>wt!==At),Xt(gn)}})},Un=Nt=>{Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Le.modal,onOk:()=>{let At=Xn.slice();At=Xn.filter((gn,Tt)=>Nt!==Tt),Xt(At)}})},Ci=()=>ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),ne.createElement("div",null,ne.createElement(xe.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:cn,onChange:Nt=>wn(Nt),showNullButton:!0,onPlaceholderChange:ei})),ne.createElement("div",{className:"mt20"},Xn.map((Nt,At)=>ne.createElement(Ve.Z,{key:At,answers:Nt,index:At,is_md:!0,activeOptionErrorIndex:Tn,onAnswerChange:jn,addChildAnswer:Ht,deleteChildAnswer:Qn,deleteChildAnswermain:Un}))),ne.createElement("div",{className:"mt20"},Xn.length>1&&ne.createElement("span",null,ne.createElement(Se.default,{checked:Nn,onChange:Nt=>jt(Nt.target.checked),className:`${Le.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),ne.createElement("span",{className:`${Le.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),ne.createElement("p",{className:""},"\u5206\u503C\uFF1A",ne.createElement(Xe.Z,{value:Hn,max:1e4,min:-1,onChange:Nt=>{Wn(Nt)}})," \u5206"),ne.createElement("aside",{className:"tr"},Ct.question_id&&ne.createElement(et.ZP,{type:"default",onClick:()=>Vn(!1)},"\u53D6\u6D88"),ne.createElement(et.ZP,{className:"ml20",type:"primary",onClick:()=>Sn()},"\u4FDD\u5B58"))),Rn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],gt=Nt=>Ft(void 0,null,function*(){switch(Nt.id){case"del":let At;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Ft(this,null,function*(){yield(0,Ce.x$)({pollsId:Ct.question_id}),qt({type:"polls/getExerciseBanks",payload:ln({},ni)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Ct==null?void 0:Ct.question_id,opr:Nt.id}),qt({type:"polls/getExerciseBanks",payload:ln({},ni)});break;case"edit":Vn(!0);break}}),Pt=()=>{var Nt;return ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},Ct.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",Ct.question_score,"\u5206\uFF09"),!Ct.hideAction&&Rn.map(function(At,gn){return At.id==="up"&&Ct.key===1||At.id==="down"&&Ct.key===Ct.len?null:ne.createElement(Ke.Z,{key:gn,placement:"bottom",title:At.name},ne.createElement("span",{onClick:()=>gt(At),className:At.icon}))})),ne.createElement("div",{className:"mt5"},Ct.question_title),ne.createElement("div",{className:Le.questionChoices},(Nt=Ct==null?void 0:Ct.standard_answer)==null?void 0:Nt.map(function(At,gn){return ne.createElement(we.Z,null,ne.createElement(fe.Z,null,"\u7B54\u6848\uFF08\u586B\u7A7A",At.choice_id,"\uFF09\uFF1A"),ne.createElement(fe.Z,{flex:"1"},ne.createElement(pe.default,{key:gn,checked:Ct.standard_answer.includes(gn),disabled:!0,value:At.answer_text})))})))};return ne.createElement("section",{className:Le.wrap},!In&&Pt(),In&&Ci())};var yn=(0,Ue.connect)(({problemset:Be,loading:Te,globalSetting:ye})=>({problemset:Be,globalSetting:ye,loading:Te.effects}),null,null,{forwardRef:!0})((0,ne.forwardRef)(sn)),st=Object.defineProperty,En=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,Cn=(Be,Te,ye)=>Te in Be?st(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,$n=(Be,Te)=>{for(var ye in Te||(Te={}))Ot.call(Te,ye)&&Cn(Be,ye,Te[ye]);if(En)for(var ye of En(Te))an.call(Te,ye)&&Cn(Be,ye,Te[ye]);return Be},Rt=(Be,Te)=>{var ye={};for(var ut in Be)Ot.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&En)for(var ut of En(Be))Te.indexOf(ut)<0&&an.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},zn=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const Ei=null,fi=(Be,Te)=>{var ye=Be,{problemset:ut,globalSetting:_n,loading:kn,dispatch:qt,onRef:Ct=()=>{},editData:Oe}=ye,cn=Rt(ye,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[wn,Fn]=(0,ne.useState)(""),[On,Xn]=(0,ne.useState)(""),[Xt,Tn]=(0,ne.useState)(""),[Gn,Nn]=(0,ne.useState)(5),[jt,fn]=(0,ne.useState)(!1),Bn=(0,Ue.useParams)();(0,ne.useEffect)(()=>{var Sn;if(!(Oe!=null&&Oe.question_title)){fn(!0);return}Fn(Oe==null?void 0:Oe.question_title),Tn((Sn=Oe==null?void 0:Oe.standard_answer)==null?void 0:Sn[0]),Nn(Oe==null?void 0:Oe.question_score)},[ut.editData]),(0,ne.useImperativeHandle)(Te,()=>({onSave:Hn,isEdit:jt}));const Hn=()=>zn(void 0,null,function*(){if(!wn)return me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;let Sn;return Oe.question_id?Sn=yield(0,Ce.Kc)({id:Oe.question_id,question_title:wn,question_type:4,question_score:Gn,standard_answers:[Xt]}):Sn=yield(0,Ce.iV)({exercise_bank_id:Bn.topicId,question_title:wn,question_type:4,question_score:Gn,standard_answers:[Xt]}),Sn.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),fn(!1),qt({type:"polls/getExerciseBanks",payload:$n({},Bn)})),{name:wn,answer_texts:[Xt],analysis:On}}),Wn=()=>ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),ne.createElement(Je.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wn,onChange:Sn=>Fn(Sn)}),ne.createElement("p",{className:Le.titleWrap},ne.createElement("span",{className:Le.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),ne.createElement(Je.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Xt,onChange:Sn=>Tn(Sn)}),ne.createElement("p",{className:""},"\u5206\u503C\uFF1A",ne.createElement(Xe.Z,{value:Gn,max:1e4,min:-1,onChange:Sn=>{Nn(Sn)}})," \u5206"),ne.createElement("aside",{className:"tr"},Oe.question_id&&ne.createElement(et.ZP,{type:"default",onClick:()=>fn(!1)},"\u53D6\u6D88"),ne.createElement(et.ZP,{className:"ml20",type:"primary",onClick:()=>Hn()},"\u4FDD\u5B58"))),In=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Vn=Sn=>zn(void 0,null,function*(){switch(Sn.id){case"del":let ei;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return zn(this,null,function*(){yield(0,Ce.x$)({pollsId:Oe.question_id}),qt({type:"polls/getExerciseBanks",payload:$n({},Bn)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Oe==null?void 0:Oe.question_id,opr:Sn.id}),qt({type:"polls/getExerciseBanks",payload:$n({},Bn)});break;case"edit":fn(!0);break}}),ni=()=>ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},Oe.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",Oe.question_score,"\u5206\uFF09"),!Oe.hideAction&&In.map(function(Sn,ei){return Sn.id==="up"&&Oe.key===1||Sn.id==="down"&&Oe.key===Oe.len?null:ne.createElement(Ke.Z,{key:ei,placement:"bottom",title:Sn.name},ne.createElement("span",{onClick:()=>Vn(Sn),className:Sn.icon}))})),ne.createElement("div",{className:"mt5"},Oe.question_title),ne.createElement("div",{className:Le.questionChoices},ne.createElement("p",null,ne.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),ne.createElement($e.Z,{value:Xt})));return ne.createElement("section",{className:Le.wrap},!jt&&ni(),jt&&Wn())};var Ri=(0,Ue.connect)(({problemset:Be,loading:Te,globalSetting:ye})=>({problemset:Be,globalSetting:ye,loading:Te.effects}),null,null,{forwardRef:!0})((0,ne.forwardRef)(fi)),Wi=Object.defineProperty,Bi=Object.getOwnPropertySymbols,Li=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,wi=(Be,Te,ye)=>Te in Be?Wi(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,Di=(Be,Te)=>{for(var ye in Te||(Te={}))Li.call(Te,ye)&&wi(Be,ye,Te[ye]);if(Bi)for(var ye of Bi(Te))ai.call(Te,ye)&&wi(Be,ye,Te[ye]);return Be},li=(Be,Te)=>{var ye={};for(var ut in Be)Li.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&Bi)for(var ut of Bi(Be))Te.indexOf(ut)<0&&ai.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},xi=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const gi=null,_i=(Be,Te)=>{var ye=Be,{problemset:ut,globalSetting:_n,loading:kn,dispatch:qt,editData:Ct}=ye,Oe=li(ye,["problemset","globalSetting","loading","dispatch","editData"]);const[cn,wn]=(0,ne.useState)(""),[Fn,On]=(0,ne.useState)(""),[Xn,Xt]=(0,ne.useState)(""),[Tn,Gn]=(0,ne.useState)([]),[Nn,jt]=(0,ne.useState)(""),[fn,Bn]=(0,ne.useState)(),[Hn,Wn]=(0,ne.useState)(!1),[In,Vn]=(0,ne.useState)([]),[ni,Sn]=(0,ne.useState)(!1),ei=(0,Ue.useParams)();(0,ne.useEffect)(()=>{var Rn;Ct.edit&&Sn(!0),wn(Ct.shixun_name),On(Ct.question_title);const gt=[];(Rn=Ct.shixun)==null||Rn.map(Pt=>{gt.push(Pt.challenge_score)}),Vn(gt)},[Ct]),(0,ne.useEffect)(()=>{Wn(!1)},[ni]),(0,ne.useImperativeHandle)(Te,()=>({onSave:jn,isEdit:ni}));const jn=()=>xi(void 0,null,function*(){let Rn=[];if(!1)return!1;let Pt;return Ct.question_id?Pt=yield(0,Ce.Kc)({id:Ct.question_id,question_title:Fn,shixun_name:cn,shixun_id:Ct.shixun_id,question_type:5,question_scores:In}):Pt=yield(0,Ce.iV)({exercise_bank_id:ei.topicId,question_title:Fn,shixun_name:cn,shixun_id:Ct.shixun_id,question_type:5,question_scores:In}),Pt.status===0&&(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),Sn(!1)),yield qt({type:"polls/getExerciseBanks",payload:Di({},ei)}),{name:Fn,analysis:Xn,standard_answers:Rn,is_ordered:fn}}),Ht=()=>{var Rn;return ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),ne.createElement("div",{className:"mt10"},ne.createElement(pe.default,{defaultValue:cn,onChange:gt=>{wn(gt.target.value)}})),ne.createElement("div",{className:"mt10"},ne.createElement(Je.Z,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:Fn,onChange:gt=>{On(gt)}})),ne.createElement("div",{className:"mt20"},(Rn=Ct.shixun)==null?void 0:Rn.map((gt,Pt)=>ne.createElement(we.Z,{gutter:[20,20]},ne.createElement(fe.Z,{flex:"1"},Pt+1,".",gt.challenge_name),ne.createElement(fe.Z,null,ne.createElement(Xe.Z,{defaultValue:In[Pt],onChange:Nt=>{In[Pt]=Nt,Vn(In),console.log("srore:L",In[Pt])}}))))),ne.createElement("div",{className:"mt20"},Tn.length>1&&ne.createElement("span",null,ne.createElement(Se.default,{checked:fn,onChange:gt=>Bn(gt.target.checked),className:`${Le.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),ne.createElement("span",{className:`${Le.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),ne.createElement("aside",{className:"tr"},!(Ct!=null&&Ct.edit)&&ne.createElement(et.ZP,{type:"default",onClick:()=>Sn(!1)},"\u53D6\u6D88"),ne.createElement(et.ZP,{className:"ml20",type:"primary",onClick:()=>jn()},"\u4FDD\u5B58")))},Qn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Un=Rn=>xi(void 0,null,function*(){switch(Rn.id){case"del":let gt;Ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return xi(this,null,function*(){yield(0,Ce.x$)({pollsId:Ct.question_id}),qt({type:"polls/getExerciseBanks",payload:Di({},ei)})})}});break;case"up":case"down":yield(0,Ce.W)({exerciseId:Ct==null?void 0:Ct.question_id,opr:Rn.id}),qt({type:"polls/getExerciseBanks",payload:Di({},ei)});break;case"edit":Sn(!0);break}}),Ci=()=>{var Rn;return ne.createElement("aside",null,ne.createElement("div",{className:Le.questionType},ne.createElement("div",null,ne.createElement("span",{className:"font16 c-blue"},Ct.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",Ct.question_score,"\u5206\uFF09"),ne.createElement("div",{className:"tr"},ne.createElement(Ue.Link,{target:"_blank",to:`/shixuns/${Ct.shixun_identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),!Ct.hideAction&&Qn.map(function(gt,Pt){return gt.id==="up"&&Ct.key===1||gt.id==="down"&&Ct.key===Ct.len?null:ne.createElement(Ke.Z,{key:Pt,placement:"bottom",title:gt.name},ne.createElement("span",{onClick:()=>Un(gt),className:gt.icon}))}))),ne.createElement("div",{className:"font16"},Ct.shixun_name),ne.createElement("div",{className:"mt30"}),(Rn=Ct.shixun)==null?void 0:Rn.map(function(gt,Pt){return ne.createElement("div",{key:Pt},"\u7B2C",Pt+1,"\u5173 ",ne.createElement("span",{className:"ml10"},gt.challenge_name)," ",ne.createElement("span",{className:"ml10"},gt.challenge_score))}))};return ne.createElement("section",{className:Le.wrap},!ni&&Ci(),ni&&Ht())};var bn=(0,Ue.connect)(({problemset:Be,loading:Te,globalSetting:ye})=>({problemset:Be,globalSetting:ye,loading:Te.effects}),null,null,{forwardRef:!0})((0,ne.forwardRef)(_i)),Dn=he(30641),Kn=he(13747),Pn={flex_box_center:"flex_box_center___hUmFx",flex_space_between:"flex_space_between___ZQWRF",flex_box_vertical_center:"flex_box_vertical_center___NvFWH",flex_box_center_end:"flex_box_center_end___VzfH9",flex_box_column:"flex_box_column___jzLHY",wrp:"wrp___tA5YW",drawer:"drawer___aMsAr",menu:"menu___EdF6h",actived:"actived___rUgO6",actived2:"actived2___ENpPA",listItem:"listItem___Ixzli",info:"info___KHkuz",title:"title___pDJPn",titleLeft:"titleLeft___UBBKz",titleRight:"titleRight___WrCz9",search:"search___AEwRm",description:"description___CYPQc",menuCourse:"menuCourse___gwZ0E"},mi=Object.defineProperty,yi=Object.getOwnPropertySymbols,Pi=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable,oi=(Be,Te,ye)=>Te in Be?mi(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,ki=(Be,Te)=>{for(var ye in Te||(Te={}))Pi.call(Te,ye)&&oi(Be,ye,Te[ye]);if(yi)for(var ye of yi(Te))hi.call(Te,ye)&&oi(Be,ye,Te[ye]);return Be},Zt=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const{Search:ot}=pe.default,un=[{id:"type",name:"\u7B5B\u9009",children:[{name:"\u5168\u90E8\u5B9E\u8BAD",id:"all",type:"type"},{name:"\u6211\u7684\u5B9E\u8BAD",id:"mine",type:"type"}]},{id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]}],Jn=({classroomList:Be,loading:Te,dispatch:ye,callback:ut})=>{var _n;const kn=(0,Ue.useParams)(),qt=(0,Ue.useLocation)(),{actionTabs:Ct}=Be,[Oe]=ve.default.useForm(),{shixunLists:cn}=Be,[wn,Fn]=(0,ne.useState)([]),[On,Xn]=(0,ne.useState)({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"publish_time",no_jupyter:1});return(0,ne.useEffect)(()=>{ye({type:"classroomList/getShixunLists",payload:ki({},On)})},[kn.categoryId]),(0,ne.useEffect)(()=>{Fn([])},[Be.actionTabs.key]),Be.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:ne.createElement(Dn.Z,{title:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",placement:"bottom",height:"100%",closable:!1,open:Be.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",rootClassName:Pn.drawer,footer:ne.createElement("div",{className:"tc"},ne.createElement(et.ZP,{size:"middle",onClick:()=>{ye({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8}},"\u53D6\u6D88"),ne.createElement(et.ZP,{size:"middle",onClick:()=>Zt(void 0,null,function*(){var Xt;wn.length>1?me.ZP.error("\u53EA\u80FD\u9009\u62E9\u4E00\u4E2A\u5B9E\u8DF5\u9879\u76EE"):wn.length===0?me.ZP.error("\u8BF7\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE"):(ut&&ut((Xt=cn==null?void 0:cn.shixun_list)==null?void 0:Xt.filter(Tn=>Tn.id===wn[0])[0]),ye({type:"classroomList/setActionTabs",payload:{key:""}}))}),type:"primary"},"\u786E\u5B9A"))},ne.createElement("section",{className:"tc"},ne.createElement(ot,{placeholder:"\u5B9E\u8BAD\u4FE1\u606F/\u9662\u6821\u540D\u79F0/\u521B\u5EFA\u8005",enterButton:"\u641C\u7D22",size:"middle",className:Pn.search,onSearch:Xt=>{On.keyword=Xt,ye({type:"classroomList/getShixunLists",payload:ki({},On)})}})),ne.createElement("section",{className:"edu-container"},un.map(function(Xt,Tn){var Gn;return ne.createElement("ul",{className:Pn.menu,key:Tn},ne.createElement("li",null,Xt.name),(Gn=Xt==null?void 0:Xt.children)==null?void 0:Gn.map(function(Nn,jt){return ne.createElement("li",{key:jt,className:On[Xt.id]==Nn.id?Pn.actived:"",onClick:()=>{On[Xt.id]=Nn.id,Xn(ki({},On)),ye({type:"classroomList/getShixunLists",payload:ki({},On)})}},ne.createElement("strong",null,Nn.name))}))}),(_n=cn==null?void 0:cn.shixun_list)==null?void 0:_n.map(function(Xt,Tn){return ne.createElement("div",{className:Pn.listItem,key:Tn},ne.createElement(Se.default,{checked:wn.includes(Xt.id),value:Xt.id,onChange:Gn=>{let Nn=wn.indexOf(Xt.id);wn.indexOf(Xt.id)>-1?Fn(wn.filter(jt=>jt!==Xt.id)):Fn(wn.concat(Xt.id))}}),ne.createElement("div",{className:Pn.info},ne.createElement("div",{className:Pn.title},ne.createElement("div",{className:Pn.titleLeft},ne.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:Xt.title}}))),ne.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},ne.createElement("span",{className:Pn.description,dangerouslySetInnerHTML:{__html:Xt.description}})),ne.createElement("div",{className:" mt15"},Xt.challenge_names.map(function(Gn,Nn){return ne.createElement("span",{key:Nn,className:"mr30"},"\u7B2C",Nn+1,"\u5173 ",Gn," ")})),ne.createElement(Re.Z,{dashed:!0}),ne.createElement("div",{className:"c-light-black mt20"},ne.createElement("span",null,Xt.author_name),ne.createElement("span",{className:"ml15 mr15"},"|"),ne.createElement("span",null,Xt.author_school_name),ne.createElement("span",{className:"ml15 mr15"},"|"),ne.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570:",Xt.level),ne.createElement("span",{className:"ml15 mr15"},"|"),ne.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570:"),ne.createElement("span",null,Xt.study_count))))}),ne.createElement("p",null)),ne.createElement("div",{className:"tc"},ne.createElement(Kn.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showQuickJumper:!0,total:cn==null?void 0:cn.shixuns_count,onChange:Xt=>{On.page=Xt,Fn([]),ye({type:"classroomList/getShixunLists",payload:ki({},On)})}})))};var pi=(0,Ue.connect)(({classroomList:Be,loading:Te})=>({classroomList:Be,loading:Te}))(Jn),Ae={flex_box_center:"flex_box_center___SQWFF",flex_space_between:"flex_space_between___CnFKV",flex_box_vertical_center:"flex_box_vertical_center___pIPP9",flex_box_center_end:"flex_box_center_end___wiYA8",flex_box_column:"flex_box_column___elCPc",bg:"bg___EaPuT",containerTitle:"containerTitle___ixpkx",containerDesc:"containerDesc___r2R0u",listItem:"listItem___jvD98",info:"info___dCwGz",title:"title___UW6TT",titleLeft:"titleLeft___MquHc",titleRight:"titleRight___aWhE3",acitons:"acitons___yle7y"},De=Object.defineProperty,Bt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,vt=(Be,Te,ye)=>Te in Be?De(Be,Te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Be[Te]=ye,Qt=(Be,Te)=>{for(var ye in Te||(Te={}))ft.call(Te,ye)&&vt(Be,ye,Te[ye]);if(Bt)for(var ye of Bt(Te))ze.call(Te,ye)&&vt(Be,ye,Te[ye]);return Be},Gt=(Be,Te)=>{var ye={};for(var ut in Be)ft.call(Be,ut)&&Te.indexOf(ut)<0&&(ye[ut]=Be[ut]);if(Be!=null&&Bt)for(var ut of Bt(Be))Te.indexOf(ut)<0&&ze.call(Be,ut)&&(ye[ut]=Be[ut]);return ye},nn=(Be,Te,ye)=>new Promise((ut,_n)=>{var kn=Oe=>{try{Ct(ye.next(Oe))}catch(cn){_n(cn)}},qt=Oe=>{try{Ct(ye.throw(Oe))}catch(cn){_n(cn)}},Ct=Oe=>Oe.done?ut(Oe.value):Promise.resolve(Oe.value).then(kn,qt);Ct((ye=ye.apply(Be,Te)).next())});const{SubMenu:zt}=Ne.default,{Content:rn,Sider:_e}=qe.default,Zn=Be=>{var Te=Be,{polls:ye,globalSetting:ut,loading:_n,user:kn,dispatch:qt}=Te,Ct=Gt(Te,["polls","globalSetting","loading","user","dispatch"]),Oe,cn,wn,Fn,On,Xn,Xt,Tn,Gn,Nn,jt,fn,Bn,Hn,Wn,In,Vn,ni,Sn,ei,jn,Ht,Qn,Un,Ci,Rn,gt,Pt,Nt,At,gn,Tt,wt,Vt,en,ii,si,Fi,ci,Si,zi,Gi,Ti,Ui,Ii,rr,Mr,Er,pr,lr,Ni,vr,Gr,Ki,kr,Wr;const Xi=(0,Ue.useParams)(),ro=(0,Ue.useLocation)(),{userInfo:sr}=kn,[Hi]=ve.default.useForm(),[yr,Vr]=(0,ne.useState)([]),[Fr,Yi]=(0,ne.useState)(!1),oo=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],_r=(0,ne.useRef)();(0,ne.useEffect)(()=>{var xn,di,Mi,Nr,ur,tr;(xn=ye.exerciseBanks)!=null&&xn.exercise_questions&&(Vr([...(di=ye.exerciseBanks)==null?void 0:di.exercise_questions]),Hi.setFieldsValue({exercise_name:(Nr=(Mi=ye.exerciseBanks)==null?void 0:Mi.exercise)==null?void 0:Nr.exercise_name,exercise_description:(tr=(ur=ye.exerciseBanks)==null?void 0:ur.exercise)==null?void 0:tr.exercise_description}))},[ye.exerciseBanks]),(0,ne.useEffect)(()=>{qt({type:"polls/getExerciseBanks",payload:Qt({},Xi)})},[Xi.categoryId]);const qn=()=>nn(void 0,null,function*(){var xn,di;yield Hi.validateFields();const Mi=Hi.getFieldValue();Mi.is_md=!0,Mi.topicId=(di=(xn=ye.exerciseBanks)==null?void 0:xn.exercise)==null?void 0:di.id,Yi(!1),yield(0,Ce.hO)(Qt({},Mi)),qt({type:"polls/getExerciseBanks",payload:Qt({},Xi)})}),ui=xn=>nn(void 0,null,function*(){const di=yield _r==null?void 0:_r.current;if(di!=null&&di.isEdit){me.ZP.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}xn===5?qt({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):Vr([...yr,{question_type:xn}])}),ri=function(){return yr==null?void 0:yr.map(function(xn,di){if(xn.key=di+1,xn.len=yr.length,xn.question_type===0)return ne.createElement("aside",null,ne.createElement(dn,{ref:_r,editData:xn}),ne.createElement(Re.Z,null));if(xn.question_type===1)return ne.createElement("aside",null,ne.createElement(Kt,{ref:_r,editData:xn}),ne.createElement(Re.Z,null));if(xn.question_type===2)return ne.createElement("aside",null,ne.createElement(ie,{ref:_r,editData:xn}),ne.createElement(Re.Z,null));if(xn.question_type===3)return ne.createElement("aside",null,ne.createElement(yn,{editData:xn}),ne.createElement(Re.Z,null));if(xn.question_type===4)return ne.createElement("aside",null,ne.createElement(Ri,{editData:xn}),ne.createElement(Re.Z,null));if(xn.question_type===5)return ne.createElement("aside",null,ne.createElement(bn,{editData:xn}),ne.createElement(Re.Z,null))})};return ne.createElement("section",{className:"edu-container"},ne.createElement("section",{className:"animated fadeIn"},ne.createElement("aside",{className:"mt10"},sr&&ne.createElement(Ge.Z,{separator:">"},ne.createElement(Ge.Z.Item,null,ne.createElement(Ue.Link,{to:`/users/${sr.login}/topics/personal`},"\u6211\u7684\u9898\u5E93")),ne.createElement(Ge.Z.Item,null,ne.createElement(Ue.Link,{to:`/users/${sr==null?void 0:sr.login}/topics/${Xi.topicId}/${Xi.topictype}/exercise/detail`},"\u8BE6\u60C5")),ne.createElement(Ge.Z.Item,null,"\u7F16\u8F91"))),ne.createElement("aside",{className:[Ae.title,"mt20"].join(" ")},ne.createElement(we.Z,{style:{width:"100%"},align:"middle"},ne.createElement(fe.Z,{flex:"1"},ne.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u8BD5\u5377"),ne.createElement(Mt.VV,{status:[(cn=(Oe=ye.exerciseBanks)==null?void 0:Oe.exercise)!=null&&cn.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),ne.createElement(fe.Z,null,ne.createElement(Ue.Link,{className:"font16 c-light-black",to:`/users/${sr.login}/topics/personal`},"\u8FD4\u56DE"))))),ne.createElement("section",{className:[Ae.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},!Fr&&ne.createElement("aside",null,ne.createElement("div",{className:Ae.containerDesc},ne.createElement("div",null,(Fn=(wn=ye.exerciseBanks)==null?void 0:wn.exercise)==null?void 0:Fn.exercise_name),ne.createElement("div",null,ne.createElement(Ke.Z,{title:"\u7F16\u8F91"},ne.createElement("span",{onClick:()=>Yi(!0),className:"iconfont c-green ml30 icon-bianjishijuan3x"})))),ne.createElement("div",{className:"c-light-black"},(Xn=(On=ye.exerciseBanks)==null?void 0:On.exercise)==null?void 0:Xn.exercise_description)),Fr&&ne.createElement(ve.default,{layout:"vertical",form:Hi},ne.createElement(ve.default.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},ne.createElement(pe.default,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),ne.createElement(ve.default.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},ne.createElement(pe.default.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),ne.createElement(ve.default.Item,{className:"tr"},ne.createElement(et.ZP,{type:"primary",onClick:()=>{qn()}},"\u4FDD\u5B58")))),ne.createElement("p",{className:"mt10",style:{display:"flex"}},ne.createElement("span",{className:"fl",style:{flex:"1"}},!!((Tn=(Xt=ye.exerciseBanks)==null?void 0:Xt.exercise_types)!=null&&Tn.q_singles)&&ne.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(Nn=(Gn=ye.exerciseBanks)==null?void 0:Gn.exercise_types)==null?void 0:Nn.q_singles,"\u9898\uFF0C\u5171",(fn=(jt=ye.exerciseBanks)==null?void 0:jt.exercise_types)==null?void 0:fn.q_singles_scores,"\u5206"),!!((Hn=(Bn=ye.exerciseBanks)==null?void 0:Bn.exercise_types)!=null&&Hn.q_doubles)&&ne.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(In=(Wn=ye.exerciseBanks)==null?void 0:Wn.exercise_types)==null?void 0:In.q_doubles,"\u9898\uFF0C\u5171",(ni=(Vn=ye.exerciseBanks)==null?void 0:Vn.exercise_types)==null?void 0:ni.q_doubles_scores,"\u5206"),!!((ei=(Sn=ye.exerciseBanks)==null?void 0:Sn.exercise_types)!=null&&ei.q_judges)&&ne.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(Ht=(jn=ye.exerciseBanks)==null?void 0:jn.exercise_types)==null?void 0:Ht.q_judges,"\u9898\uFF0C\u5171",(Un=(Qn=ye.exerciseBanks)==null?void 0:Qn.exercise_types)==null?void 0:Un.q_judges_scores,"\u5206"),!!((Rn=(Ci=ye.exerciseBanks)==null?void 0:Ci.exercise_types)!=null&&Rn.q_nulls)&&ne.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(Pt=(gt=ye.exerciseBanks)==null?void 0:gt.exercise_types)==null?void 0:Pt.q_nulls,"\u9898\uFF0C\u5171",(At=(Nt=ye.exerciseBanks)==null?void 0:Nt.exercise_types)==null?void 0:At.q_nulls_scores,"\u5206"),!!((Tt=(gn=ye.exerciseBanks)==null?void 0:gn.exercise_types)!=null&&Tt.q_mains)&&ne.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(Vt=(wt=ye.exerciseBanks)==null?void 0:wt.exercise_types)==null?void 0:Vt.q_mains,"\u9898\uFF0C\u5171",(ii=(en=ye.exerciseBanks)==null?void 0:en.exercise_types)==null?void 0:ii.q_mains_scores,"\u5206"),!!((Fi=(si=ye.exerciseBanks)==null?void 0:si.exercise_types)!=null&&Fi.q_shixuns)&&ne.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(Si=(ci=ye.exerciseBanks)==null?void 0:ci.exercise_types)==null?void 0:Si.q_shixuns,"\u9898\uFF0C\u5171",(Gi=(zi=ye.exerciseBanks)==null?void 0:zi.exercise_types)==null?void 0:Gi.q_shixuns_scores,"\u5206"),!!((Ui=(Ti=ye.exerciseBanks)==null?void 0:Ti.exercise_types)!=null&&Ui.q_pros)&&ne.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(rr=(Ii=ye.exerciseBanks)==null?void 0:Ii.exercise_types)==null?void 0:rr.q_pros,"\u9898\uFF0C\u5171",(Er=(Mr=ye.exerciseBanks)==null?void 0:Mr.exercise_types)==null?void 0:Er.q_pros_scores,"\u5206")),ne.createElement("span",{className:"fr"},!!((lr=(pr=ye.exerciseBanks)==null?void 0:pr.exercise_types)!=null&&lr.q_counts)&&ne.createElement("span",null,"\u5408\u8BA1 ",ne.createElement("span",{className:"color-blue"},(vr=(Ni=ye.exerciseBanks)==null?void 0:Ni.exercise_types)==null?void 0:vr.q_counts)," \u9898\uFF0C \u5171 ",ne.createElement("span",{className:`${((Ki=(Gr=ye.exerciseBanks)==null?void 0:Gr.exercise_types)==null?void 0:Ki.q_scores)>100?"color-red font-bd":"color-orange"}`},(Wr=(kr=ye.exerciseBanks)==null?void 0:kr.exercise_types)==null?void 0:Wr.q_scores)," \u5206"))),yr!=""&&ne.createElement("section",{className:[Ae.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},ri()),ne.createElement("section",{style:{display:"flex"},className:[Ae.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},ne.createElement("div",{style:{flex:"1"}},oo.map(function(xn,di){return ne.createElement(et.ZP,{className:"mr20",type:"primary",onClick:()=>ui(xn.id)},ne.createElement(He.Z,{className:"mr5"}),xn.name)}))),ne.createElement(pi,{callback:xn=>{yr.push({shixun:xn.challenge_names.map(di=>({challenge_name:di,challenge_score:5})),shixun_name:xn.title,shixun_id:xn.id,question_type:5,edit:!0}),Vr([...yr])}}))};var on=(0,Ue.connect)(({polls:Be,loading:Te,user:ye,globalSetting:ut})=>({polls:Be,globalSetting:ut,user:ye,loading:Te.effects}))(Zn)},90290:function(It,Wt,he){"use strict";he.d(Wt,{AL:function(){return $e},Iy:function(){return Ke},Qv:function(){return He},ez:function(){return Je},jb:function(){return pe}});var ne=he(32834),Ue=he.n(ne),Ne=he(11690),qe=he.n(Ne);let ve=1;function me(Me,Ze){const nt=Me.match(/^(\s+)(?:```)/);if(nt===null)return Ze;const Pe=nt[1];return Ze.split(`
`).map(Qe=>{const Fe=Qe.match(/^\s+/);if(Fe===null)return Qe;const[it]=Fe;return it.length>=Pe.length?Qe.slice(Pe.length):Qe}).join(`
`)}let Re=[],Ge=["<ul>"];const we=new(Ue()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ke(){Re.length=0,Ge=["<ul>"]}const pe={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function et(Me,Ze,nt,Pe){if(Ze>=Me.length||Me[Ze].level<=nt)return Ze;var Qe=Me[Ze];Pe.push("<li><a href='#"+ve+Qe.anchor+"'>"+Qe.text+"</a>"),Ze++;var Fe=[];return Ze=et(Me,Ze,Qe.level,Fe),Fe.length>0&&(Pe.push("<ul>"),Fe.forEach(function(it){Pe.push(it)}),Pe.push("</ul>")),Pe.push("</li>"),Ze=et(Me,Ze,nt,Pe),Ze}function He(){return et(Re,0,0,Ge),Ge.push("</ul>"),Ge.join("")}const Ce={heading(Me){const Ze=fe.exec(Me);if(ve+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(Me){const Ze=this.rules.block.fences.exec(Me);if(Ze){const nt=Ze[0];let Pe=me(nt,Ze[3]||"");const Qe=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(Qe)>=0){const Fe=Xe(),it=Pe;Pe=Fe,rt[Fe]={type:"block",expression:it}}return{type:"code",raw:nt,lang:Qe,text:Pe}}}},Ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Se=0;const Xe=()=>`__special_katext_id_${Se++}__`;let rt={};function Je(){return rt}function $e(){Se=0,rt={}}function Le(Me){return Me=Me.replace(Ee,(Ze,nt)=>{const Pe=Xe();return rt[Pe]={type:"inline",expression:nt},Pe}),Me}const ct=we.listitem;we.listitem=function(Me){return ct(Le(Me))};const lt=we.paragraph;we.paragraph=function(Me){return lt(Le(Me))};const Ut=we.tablecell;we.tablecell=function(Me,Ze){return Ut(Le(Me),Ze)},we.code=function(Me,Ze,nt){const Pe=(Ze||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${Me}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${nt?Me:(0,Ne.escape)(Me,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(nt?Me:(0,Ne.escape)(Me,!0))+"</code></pre>"},we.heading=function(Me,Ze,nt){let Pe=this.options.headerPrefix+nt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Re.push({anchor:Pe,level:Ze,text:Me}),"<h"+Ze+' id="'+ve+Pe+'">'+Me+"</h"+Ze+">"},Ue().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ue().use({tokenizer:Ce,renderer:we}),Wt.ZP=Ue()},99498:function(It,Wt,he){(function(ne){ne(he(89780))})(function(ne){ne.defineOption("placeholder","",function(Ge,we,fe){var Ke=fe&&fe!=ne.Init;if(we&&!Ke)Ge.on("blur",ve),Ge.on("change",me),Ge.on("swapDoc",me),ne.on(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose=function(){qe(Ge)}),me(Ge);else if(!we&&Ke){Ge.off("blur",ve),Ge.off("change",me),Ge.off("swapDoc",me),ne.off(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose),Ue(Ge);var pe=Ge.getWrapperElement();pe.className=pe.className.replace(" CodeMirror-empty","")}we&&!Ge.hasFocus()&&ve(Ge)});function Ue(Ge){Ge.state.placeholder&&(Ge.state.placeholder.parentNode.removeChild(Ge.state.placeholder),Ge.state.placeholder=null)}function Ne(Ge){Ue(Ge);var we=Ge.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Ge.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ge.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),we.appendChild(fe),Ge.display.lineSpace.insertBefore(we,Ge.display.lineSpace.firstChild)}function qe(Ge){setTimeout(function(){var we=!1,fe=Ge.getInputField();fe.nodeName=="TEXTAREA"?we=!fe.value:Ge.lineCount()==1&&(we=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),we?Ne(Ge):Ue(Ge)},20)}function ve(Ge){Re(Ge)&&Ne(Ge)}function me(Ge){var we=Ge.getWrapperElement(),fe=Re(Ge);we.className=we.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?Ne(Ge):Ue(Ge)}function Re(Ge){return Ge.lineCount()===1&&Ge.getLine(0)===""}})},25717:function(It,Wt,he){(function(ne){ne(he(89780))})(function(ne){var Ue={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=ne.Pos;ne.defineOption("autoCloseBrackets",!1,function(Ce,Ee,Se){Se&&Se!=ne.Init&&(Ce.removeKeyMap(ve),Ce.state.closeBrackets=null),Ee&&(me(qe(Ee,"pairs")),Ce.state.closeBrackets=Ee,Ce.addKeyMap(ve))});function qe(Ce,Ee){return Ee=="pairs"&&typeof Ce=="string"?Ce:typeof Ce=="object"&&Ce[Ee]!=null?Ce[Ee]:Ue[Ee]}var ve={Backspace:we,Enter:fe};function me(Ce){for(var Ee=0;Ee<Ce.length;Ee++){var Se=Ce.charAt(Ee),Xe="'"+Se+"'";ve[Xe]||(ve[Xe]=Re(Se))}}me(Ue.pairs+"`");function Re(Ce){return function(Ee){return pe(Ee,Ce)}}function Ge(Ce){var Ee=Ce.state.closeBrackets;if(!Ee||Ee.override)return Ee;var Se=Ce.getModeAt(Ce.getCursor());return Se.closeBrackets||Ee}function we(Ce){var Ee=Ge(Ce);if(!Ee||Ce.getOption("disableInput"))return ne.Pass;for(var Se=qe(Ee,"pairs"),Xe=Ce.listSelections(),rt=0;rt<Xe.length;rt++){if(!Xe[rt].empty())return ne.Pass;var Je=et(Ce,Xe[rt].head);if(!Je||Se.indexOf(Je)%2!=0)return ne.Pass}for(var rt=Xe.length-1;rt>=0;rt--){var $e=Xe[rt].head;Ce.replaceRange("",Ne($e.line,$e.ch-1),Ne($e.line,$e.ch+1),"+delete")}}function fe(Ce){var Ee=Ge(Ce),Se=Ee&&qe(Ee,"explode");if(!Se||Ce.getOption("disableInput"))return ne.Pass;for(var Xe=Ce.listSelections(),rt=0;rt<Xe.length;rt++){if(!Xe[rt].empty())return ne.Pass;var Je=et(Ce,Xe[rt].head);if(!Je||Se.indexOf(Je)%2!=0)return ne.Pass}Ce.operation(function(){var $e=Ce.lineSeparator()||`
`;Ce.replaceSelection($e+$e,null),Ce.execCommand("goCharLeft"),Xe=Ce.listSelections();for(var Le=0;Le<Xe.length;Le++){var ct=Xe[Le].head.line;Ce.indentLine(ct,null,!0),Ce.indentLine(ct+1,null,!0)}})}function Ke(Ce){var Ee=ne.cmpPos(Ce.anchor,Ce.head)>0;return{anchor:new Ne(Ce.anchor.line,Ce.anchor.ch+(Ee?-1:1)),head:new Ne(Ce.head.line,Ce.head.ch+(Ee?1:-1))}}function pe(Ce,Ee){var Se=Ge(Ce);if(!Se||Ce.getOption("disableInput"))return ne.Pass;var Xe=qe(Se,"pairs"),rt=Xe.indexOf(Ee);if(rt==-1)return ne.Pass;for(var Je=qe(Se,"closeBefore"),$e=qe(Se,"triples"),Le=Xe.charAt(rt+1)==Ee,ct=Ce.listSelections(),lt=rt%2==0,Ut,Me=0;Me<ct.length;Me++){var Ze=ct[Me],nt=Ze.head,Pe,Qe=Ce.getRange(nt,Ne(nt.line,nt.ch+1));if(lt&&!Ze.empty())Pe="surround";else if((Le||!lt)&&Qe==Ee)Le&&He(Ce,nt)?Pe="both":$e.indexOf(Ee)>=0&&Ce.getRange(nt,Ne(nt.line,nt.ch+3))==Ee+Ee+Ee?Pe="skipThree":Pe="skip";else if(Le&&nt.ch>1&&$e.indexOf(Ee)>=0&&Ce.getRange(Ne(nt.line,nt.ch-2),nt)==Ee+Ee){if(nt.ch>2&&/\bstring/.test(Ce.getTokenTypeAt(Ne(nt.line,nt.ch-2))))return ne.Pass;Pe="addFour"}else if(Le){var Fe=nt.ch==0?" ":Ce.getRange(Ne(nt.line,nt.ch-1),nt);if(!ne.isWordChar(Qe)&&Fe!=Ee&&!ne.isWordChar(Fe))Pe="both";else return ne.Pass}else if(lt&&(Qe.length===0||/\s/.test(Qe)||Je.indexOf(Qe)>-1))Pe="both";else return ne.Pass;if(!Ut)Ut=Pe;else if(Ut!=Pe)return ne.Pass}var it=rt%2?Xe.charAt(rt-1):Ee,Kt=rt%2?Ee:Xe.charAt(rt+1);Ce.operation(function(){if(Ut=="skip")Ce.execCommand("goCharRight");else if(Ut=="skipThree")for(var xt=0;xt<3;xt++)Ce.execCommand("goCharRight");else if(Ut=="surround"){for(var mn=Ce.getSelections(),xt=0;xt<mn.length;xt++)mn[xt]=it+mn[xt]+Kt;Ce.replaceSelections(mn,"around"),mn=Ce.listSelections().slice();for(var xt=0;xt<mn.length;xt++)mn[xt]=Ke(mn[xt]);Ce.setSelections(mn)}else Ut=="both"?(Ce.replaceSelection(it+Kt,null),Ce.triggerElectric(it+Kt),Ce.execCommand("goCharLeft")):Ut=="addFour"&&(Ce.replaceSelection(it+it+it+it,"before"),Ce.execCommand("goCharRight"))})}function et(Ce,Ee){var Se=Ce.getRange(Ne(Ee.line,Ee.ch-1),Ne(Ee.line,Ee.ch+1));return Se.length==2?Se:null}function He(Ce,Ee){var Se=Ce.getTokenAt(Ne(Ee.line,Ee.ch+1));return/\bstring/.test(Se.type)&&Se.start==Ee.ch&&(Ee.ch==0||!/\bstring/.test(Ce.getTokenTypeAt(Ee)))}})},6313:function(It,Wt,he){(function(ne){ne(he(89780),he(52730))})(function(ne){ne.defineOption("autoCloseTags",!1,function(we,fe,Ke){if(Ke!=ne.Init&&Ke&&we.removeKeyMap("autoCloseTags"),!!fe){var pe={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(pe["'/'"]=function(et){return me(et)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(pe["'>'"]=function(et){return qe(et)}),we.addKeyMap(pe)}});var Ue=["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 qe(we){if(we.getOption("disableInput"))return ne.Pass;for(var fe=we.listSelections(),Ke=[],pe=we.getOption("autoCloseTags"),et=0;et<fe.length;et++){if(!fe[et].empty())return ne.Pass;var He=fe[et].head,Ce=we.getTokenAt(He),Ee=ne.innerMode(we.getMode(),Ce.state),Se=Ee.state,Xe=Ee.mode.xmlCurrentTag&&Ee.mode.xmlCurrentTag(Se),rt=Xe&&Xe.name;if(!rt)return ne.Pass;var Je=Ee.mode.configuration=="html",$e=typeof pe=="object"&&pe.dontCloseTags||Je&&Ue,Le=typeof pe=="object"&&pe.indentTags||Je&&Ne;Ce.end>He.ch&&(rt=rt.slice(0,rt.length-Ce.end+He.ch));var ct=rt.toLowerCase();if(!rt||Ce.type=="string"&&(Ce.end!=He.ch||!/[\"\']/.test(Ce.string.charAt(Ce.string.length-1))||Ce.string.length==1)||Ce.type=="tag"&&Xe.close||Ce.string.indexOf("/")==He.ch-Ce.start-1||$e&&Re($e,ct)>-1||Ge(we,Ee.mode.xmlCurrentContext&&Ee.mode.xmlCurrentContext(Se)||[],rt,He,!0))return ne.Pass;var lt=typeof pe=="object"&&pe.emptyTags;if(lt&&Re(lt,rt)>-1){Ke[et]={text:"/>",newPos:ne.Pos(He.line,He.ch+2)};continue}var Ut=Le&&Re(Le,ct)>-1;Ke[et]={indent:Ut,text:">"+(Ut?`
`:"")+"</"+rt+">",newPos:Ut?ne.Pos(He.line+1,0):ne.Pos(He.line,He.ch+1)}}for(var Me=typeof pe=="object"&&pe.dontIndentOnAutoClose,et=fe.length-1;et>=0;et--){var Ze=Ke[et];we.replaceRange(Ze.text,fe[et].head,fe[et].anchor,"+insert");var nt=we.listSelections().slice(0);nt[et]={head:Ze.newPos,anchor:Ze.newPos},we.setSelections(nt),!Me&&Ze.indent&&(we.indentLine(Ze.newPos.line,null,!0),we.indentLine(Ze.newPos.line+1,null,!0))}}function ve(we,fe){for(var Ke=we.listSelections(),pe=[],et=fe?"/":"</",He=we.getOption("autoCloseTags"),Ce=typeof He=="object"&&He.dontIndentOnSlash,Ee=0;Ee<Ke.length;Ee++){if(!Ke[Ee].empty())return ne.Pass;var Se=Ke[Ee].head,Xe=we.getTokenAt(Se),rt=ne.innerMode(we.getMode(),Xe.state),Je=rt.state;if(fe&&(Xe.type=="string"||Xe.string.charAt(0)!="<"||Xe.start!=Se.ch-1))return ne.Pass;var $e,Le=rt.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(Le&&rt.mode.name=="javascript")$e=et+"script";else if(Le&&rt.mode.name=="css")$e=et+"style";else{var ct=rt.mode.xmlCurrentContext&&rt.mode.xmlCurrentContext(Je);if(!ct||ct.length&&Ge(we,ct,ct[ct.length-1],Se))return ne.Pass;$e=et+ct[ct.length-1]}we.getLine(Se.line).charAt(Xe.end)!=">"&&($e+=">"),pe[Ee]=$e}if(we.replaceSelections(pe),Ke=we.listSelections(),!Ce)for(var Ee=0;Ee<Ke.length;Ee++)(Ee==Ke.length-1||Ke[Ee].head.line<Ke[Ee+1].head.line)&&we.indentLine(Ke[Ee].head.line)}function me(we){return we.getOption("disableInput")?ne.Pass:ve(we,!0)}ne.commands.closeTag=function(we){return ve(we)};function Re(we,fe){if(we.indexOf)return we.indexOf(fe);for(var Ke=0,pe=we.length;Ke<pe;++Ke)if(we[Ke]==fe)return Ke;return-1}function Ge(we,fe,Ke,pe,et){if(!ne.scanForClosingTag)return!1;var He=Math.min(we.lastLine()+1,pe.line+500),Ce=ne.scanForClosingTag(we,pe,null,He);if(!Ce||Ce.tag!=Ke)return!1;for(var Ee=et?1:0,Se=fe.length-1;Se>=0&&fe[Se]==Ke;Se--)++Ee;pe=Ce.to;for(var Se=1;Se<Ee;Se++){var Xe=ne.scanForClosingTag(we,pe,null,He);if(!Xe||Xe.tag!=Ke)return!1;pe=Xe.to}return!0}})},52730:function(It,Wt,he){(function(ne){ne(he(89780))})(function(ne){"use strict";var Ue=ne.Pos;function Ne(Se,Xe){return Se.line-Xe.line||Se.ch-Xe.ch}var qe="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",ve=qe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",me=new RegExp("<(/?)(["+qe+"]["+ve+"]*)","g");function Re(Se,Xe,rt,Je){this.line=Xe,this.ch=rt,this.cm=Se,this.text=Se.getLine(Xe),this.min=Je?Math.max(Je.from,Se.firstLine()):Se.firstLine(),this.max=Je?Math.min(Je.to-1,Se.lastLine()):Se.lastLine()}function Ge(Se,Xe){var rt=Se.cm.getTokenTypeAt(Ue(Se.line,Xe));return rt&&/\btag\b/.test(rt)}function we(Se){if(!(Se.line>=Se.max))return Se.ch=0,Se.text=Se.cm.getLine(++Se.line),!0}function fe(Se){if(!(Se.line<=Se.min))return Se.text=Se.cm.getLine(--Se.line),Se.ch=Se.text.length,!0}function Ke(Se){for(;;){var Xe=Se.text.indexOf(">",Se.ch);if(Xe==-1){if(we(Se))continue;return}if(!Ge(Se,Xe+1)){Se.ch=Xe+1;continue}var rt=Se.text.lastIndexOf("/",Xe),Je=rt>-1&&!/\S/.test(Se.text.slice(rt+1,Xe));return Se.ch=Xe+1,Je?"selfClose":"regular"}}function pe(Se){for(;;){var Xe=Se.ch?Se.text.lastIndexOf("<",Se.ch-1):-1;if(Xe==-1){if(fe(Se))continue;return}if(!Ge(Se,Xe+1)){Se.ch=Xe;continue}me.lastIndex=Xe,Se.ch=Xe;var rt=me.exec(Se.text);if(rt&&rt.index==Xe)return rt}}function et(Se){for(;;){me.lastIndex=Se.ch;var Xe=me.exec(Se.text);if(!Xe){if(we(Se))continue;return}if(!Ge(Se,Xe.index+1)){Se.ch=Xe.index+1;continue}return Se.ch=Xe.index+Xe[0].length,Xe}}function He(Se){for(;;){var Xe=Se.ch?Se.text.lastIndexOf(">",Se.ch-1):-1;if(Xe==-1){if(fe(Se))continue;return}if(!Ge(Se,Xe+1)){Se.ch=Xe;continue}var rt=Se.text.lastIndexOf("/",Xe),Je=rt>-1&&!/\S/.test(Se.text.slice(rt+1,Xe));return Se.ch=Xe+1,Je?"selfClose":"regular"}}function Ce(Se,Xe){for(var rt=[];;){var Je=et(Se),$e,Le=Se.line,ct=Se.ch-(Je?Je[0].length:0);if(!Je||!($e=Ke(Se)))return;if($e!="selfClose")if(Je[1]){for(var lt=rt.length-1;lt>=0;--lt)if(rt[lt]==Je[2]){rt.length=lt;break}if(lt<0&&(!Xe||Xe==Je[2]))return{tag:Je[2],from:Ue(Le,ct),to:Ue(Se.line,Se.ch)}}else rt.push(Je[2])}}function Ee(Se,Xe){for(var rt=[];;){var Je=He(Se);if(!Je)return;if(Je=="selfClose"){pe(Se);continue}var $e=Se.line,Le=Se.ch,ct=pe(Se);if(!ct)return;if(ct[1])rt.push(ct[2]);else{for(var lt=rt.length-1;lt>=0;--lt)if(rt[lt]==ct[2]){rt.length=lt;break}if(lt<0&&(!Xe||Xe==ct[2]))return{tag:ct[2],from:Ue(Se.line,Se.ch),to:Ue($e,Le)}}}}ne.registerHelper("fold","xml",function(Se,Xe){for(var rt=new Re(Se,Xe.line,0);;){var Je=et(rt);if(!Je||rt.line!=Xe.line)return;var $e=Ke(rt);if(!$e)return;if(!Je[1]&&$e!="selfClose"){var Le=Ue(rt.line,rt.ch),ct=Ce(rt,Je[2]);return ct&&Ne(ct.from,Le)>0?{from:Le,to:ct.from}:null}}}),ne.findMatchingTag=function(Se,Xe,rt){var Je=new Re(Se,Xe.line,Xe.ch,rt);if(!(Je.text.indexOf(">")==-1&&Je.text.indexOf("<")==-1)){var $e=Ke(Je),Le=$e&&Ue(Je.line,Je.ch),ct=$e&&pe(Je);if(!(!$e||!ct||Ne(Je,Xe)>0)){var lt={from:Ue(Je.line,Je.ch),to:Le,tag:ct[2]};return $e=="selfClose"?{open:lt,close:null,at:"open"}:ct[1]?{open:Ee(Je,ct[2]),close:lt,at:"close"}:(Je=new Re(Se,Le.line,Le.ch,rt),{open:lt,close:Ce(Je,ct[2]),at:"open"})}}},ne.findEnclosingTag=function(Se,Xe,rt,Je){for(var $e=new Re(Se,Xe.line,Xe.ch,rt);;){var Le=Ee($e,Je);if(!Le)break;var ct=new Re(Se,Xe.line,Xe.ch,rt),lt=Ce(ct,Le.tag);if(lt)return{open:Le,close:lt}}},ne.scanForClosingTag=function(Se,Xe,rt,Je){var $e=new Re(Se,Xe.line,Xe.ch,Je?{from:0,to:Je}:null);return Ce($e,rt)}})},89780:function(It){(function(Wt,he){It.exports=he()})(this,function(){"use strict";var Wt=navigator.userAgent,he=navigator.platform,ne=/gecko\/\d/i.test(Wt),Ue=/MSIE \d/.test(Wt),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt),qe=/Edge\/(\d+)/.exec(Wt),ve=Ue||Ne||qe,me=ve&&(Ue?document.documentMode||6:+(qe||Ne)[1]),Re=!qe&&/WebKit\//.test(Wt),Ge=Re&&/Qt\/\d+\.\d+/.test(Wt),we=!qe&&/Chrome\//.test(Wt),fe=/Opera\//.test(Wt),Ke=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Wt),et=/PhantomJS/.test(Wt),He=!qe&&/AppleWebKit/.test(Wt)&&/Mobile\/\w+/.test(Wt),Ce=/Android/.test(Wt),Ee=He||Ce||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Wt),Se=He||/Mac/.test(he),Xe=/\bCrOS\b/.test(Wt),rt=/win/i.test(he),Je=fe&&Wt.match(/Version\/(\d*\.\d*)/);Je&&(Je=Number(Je[1])),Je&&Je>=15&&(fe=!1,Re=!0);var $e=Se&&(Ge||fe&&(Je==null||Je<12.11)),Le=ne||ve&&me>=9;function ct(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var lt=function(a,y){var x=a.className,b=ct(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 Ut(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Me(a,y){return Ut(a).appendChild(y)}function Ze(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee<y.length;++ee)E.appendChild(y[ee]);return E}function nt(a,y,x,b){var E=Ze(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 Qe(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 Fe(){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 it(a,y){var x=a.className;ct(y).test(x)||(a.className+=(x?" ":"")+y)}function Kt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!ct(x[b]).test(y)&&(y+=" "+x[b]);return y}var xt=function(a){a.select()};He?xt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:ve&&(xt=function(a){try{a.select()}catch(y){}});function mn(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Lt(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 ge(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ee=b||0,re=E||0;;){var le=a.indexOf(" ",ee);if(le<0||le>=y)return re+(y-ee);re+=le-ee,re+=x-re%x,ee=le+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=mn(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.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 dt(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var Jt=50,yt={toString:function(){return"CodeMirror.Pass"}},Ie={scroll:!1},tt={origin:"*mouse"},at={origin:"+move"};function dn(a,y,x){for(var b=0,E=0;;){var ee=a.indexOf(" ",b);ee==-1&&(ee=a.length);var re=ee-b;if(ee==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var ht=[""];function Dt(a){for(;ht.length<=a;)ht.push(We(ht)+" ");return ht[a]}function We(a){return a[a.length-1]}function mt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function Et(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function ae(){}function te(a,y){var x;return Object.create?x=Object.create(a):(ae.prototype=a,x=new ae),y&&Lt(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function se(a,y){return y?y.source.indexOf("\\w")>-1&&oe(a)?!0:y.test(a):oe(a)}function ie(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var xe=/[\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 Ve(a){return a.charCodeAt(0)>=768&&xe.test(a)}function Mt(a,y,x){for(;(x<0?y>0:y<a.length)&&Ve(a.charAt(y));)y+=x;return y}function kt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function pt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var re=a[ee];(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",ee),E=!0)}E||b(y,x,"ltr")}var St=null;function $t(a,y,x){var b;St=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:St=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:St=E)}return b!=null?b:St}var Yt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ce){return ce<=247?a.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?y.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ue(ce,be,ke){this.level=ce,this.from=be,this.to=ke}return function(ce,be){var ke=be=="ltr"?"L":"R";if(ce.length==0||be=="ltr"&&!b.test(ce))return!1;for(var Ye=ce.length,je=[],bt=0;bt<Ye;++bt)je.push(x(ce.charCodeAt(bt)));for(var _t=0,tn=ke;_t<Ye;++_t){var pn=je[_t];pn=="m"?je[_t]=tn:tn=pn}for(var An=0,vn=ke;An<Ye;++An){var Mn=je[An];Mn=="1"&&vn=="r"?je[An]="n":ee.test(Mn)&&(vn=Mn,Mn=="r"&&(je[An]="R"))}for(var ti=1,Yn=je[0];ti<Ye-1;++ti){var bi=je[ti];bi=="+"&&Yn=="1"&&je[ti+1]=="1"?je[ti]="1":bi==","&&Yn==je[ti+1]&&(Yn=="1"||Yn=="n")&&(je[ti]=Yn),Yn=bi}for(var ji=0;ji<Ye;++ji){var hr=je[ji];if(hr==",")je[ji]="N";else if(hr=="%"){var qi=void 0;for(qi=ji+1;qi<Ye&&je[qi]=="%";++qi);for(var Hr=ji&&je[ji-1]=="!"||qi<Ye&&je[qi]=="1"?"1":"N",Pr=ji;Pr<qi;++Pr)je[Pr]=Hr;ji=qi-1}}for(var nr=0,Lr=ke;nr<Ye;++nr){var gr=je[nr];Lr=="L"&&gr=="1"?je[nr]="L":ee.test(gr)&&(Lr=gr)}for(var ar=0;ar<Ye;++ar)if(E.test(je[ar])){var ir=void 0;for(ir=ar+1;ir<Ye&&E.test(je[ir]);++ir);for(var Ji=(ar?je[ar-1]:ke)=="L",Tr=(ir<Ye?je[ir]:ke)=="L",Vo=Ji==Tr?Ji?"L":"R":ke,xo=ar;xo<ir;++xo)je[xo]=Vo;ar=ir-1}for(var wr=[],io,fr=0;fr<Ye;)if(re.test(je[fr])){var bl=fr;for(++fr;fr<Ye&&re.test(je[fr]);++fr);wr.push(new ue(0,bl,fr))}else{var uo=fr,Do=wr.length,Po=be=="rtl"?1:0;for(++fr;fr<Ye&&je[fr]!="L";++fr);for(var Sr=uo;Sr<fr;)if(le.test(je[Sr])){uo<Sr&&(wr.splice(Do,0,new ue(1,uo,Sr)),Do+=Po);var Uo=Sr;for(++Sr;Sr<fr&&le.test(je[Sr]);++Sr);wr.splice(Do,0,new ue(2,Uo,Sr)),Do+=Po,uo=Sr}else++Sr;uo<fr&&wr.splice(Do,0,new ue(1,uo,fr))}return be=="ltr"&&(wr[0].level==1&&(io=ce.match(/^\s+/))&&(wr[0].from=io[0].length,wr.unshift(new ue(0,0,io[0].length))),We(wr).level==1&&(io=ce.match(/\s+$/))&&(We(wr).to-=io[0].length,wr.push(new ue(0,Ye-io[0].length,Ye)))),be=="rtl"?wr.reverse():wr}}();function ln(a,y){var x=a.order;return x==null&&(x=a.order=Yt(a.text,y)),x}var hn=[],Ft=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]||hn).concat(x)}};function Ln(a,y){return a._handlers&&a._handlers[y]||hn}function sn(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 ee=dt(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function yn(a,y){var x=Ln(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 st(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),yn(a,x||y.type,a,y),Rt(y)||y.codemirrorIgnore}function En(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)dt(x,y[b])==-1&&x.push(y[b])}function Ot(a,y){return Ln(a,y).length>0}function an(a){a.prototype.on=function(y,x){Ft(this,y,x)},a.prototype.off=function(y,x){sn(this,y,x)}}function Cn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function $n(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Rt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function zn(a){Cn(a),$n(a)}function Ei(a){return a.target||a.srcElement}function fi(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Se&&a.ctrlKey&&y==1&&(y=3),y}var Ri=function(){if(ve&&me<9)return!1;var a=Ze("div");return"draggable"in a||"dragDrop"in a}(),Wi;function Bi(a){if(Wi==null){var y=Ze("span","\u200B");Me(a,Ze("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Wi=y.offsetWidth<=1&&y.offsetHeight>2&&!(ve&&me<8))}var x=Wi?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Li;function ai(a){if(Li!=null)return Li;var y=Me(a,document.createTextNode("A\u062EA")),x=Pe(y,0,1).getBoundingClientRect(),b=Pe(y,1,2).getBoundingClientRect();return Ut(a),!x||x.left==x.right?!1:Li=b.right-x.right<3}var wi=`
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
`,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=ee.indexOf("\r");re!=-1?(x.push(ee.slice(0,re)),y+=re+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Di=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},li=function(){var a=Ze("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),xi=null;function gi(a){if(xi!=null)return xi;var y=Me(a,Ze("span","x")),x=y.getBoundingClientRect(),b=Pe(y,0,1).getBoundingClientRect();return xi=Math.abs(x.left-b.left)>1}var _i={},bn={};function Dn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),_i[a]=y}function Kn(a,y){bn[a]=y}function Pn(a){if(typeof a=="string"&&bn.hasOwnProperty(a))a=bn[a];else if(a&&typeof a.name=="string"&&bn.hasOwnProperty(a.name)){var y=bn[a.name];typeof y=="string"&&(y={name:y}),a=te(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Pn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Pn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function mi(a,y){y=Pn(y);var x=_i[y.name];if(!x)return mi(a,"text/plain");var b=x(a,y);if(yi.hasOwnProperty(y.name)){var E=yi[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var yi={};function Pi(a,y){var x=yi.hasOwnProperty(a)?yi[a]:yi[a]={};Lt(y,x)}function hi(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 oi(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 ki(a,y,x){return a.startState?a.startState(y,x):!0}var Zt=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};Zt.prototype.eol=function(){return this.pos>=this.string.length},Zt.prototype.sol=function(){return this.pos==this.lineStart},Zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Zt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Zt.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},Zt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Zt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Zt.prototype.skipToEnd=function(){this.pos=this.string.length},Zt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Zt.prototype.backUp=function(a){this.pos-=a},Zt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.indentation=function(){return ge(this.string,null,this.tabSize)-(this.lineStart?ge(this.string,this.lineStart,this.tabSize):0)},Zt.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 ee=this.string.slice(this.pos).match(a);return ee&&ee.index>0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},Zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Zt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Zt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Zt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function ot(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],ee=E.chunkSize();if(y<ee){x=E;break}y-=ee}return x.lines[y]}function un(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ee){var re=ee.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function Jn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function pi(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ae(a){if(a.parent==null)return null;for(var y=a.parent,x=dt(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 De(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ee=E.height;if(y<ee){a=E;continue e}y-=ee,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var le=a.lines[re],ue=le.height;if(y<ue)break;y-=ue}return x+re}function Bt(a,y){return y>=a.first&&y<a.first+a.size}function ft(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function ze(a,y,x){if(x===void 0&&(x=null),!(this instanceof ze))return new ze(a,y,x);this.line=a,this.ch=y,this.sticky=x}function vt(a,y){return a.line-y.line||a.ch-y.ch}function Qt(a,y){return a.sticky==y.sticky&&vt(a,y)==0}function Gt(a){return ze(a.line,a.ch)}function nn(a,y){return vt(a,y)<0?y:a}function zt(a,y){return vt(a,y)<0?a:y}function rn(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function _e(a,y){if(y.line<a.first)return ze(a.first,0);var x=a.first+a.size-1;return y.line>x?ze(x,ot(a,x).text.length):Zn(y,ot(a,y.line).text.length)}function Zn(a,y){var x=a.ch;return x==null||x>y?ze(a.line,y):x<0?ze(a.line,0):a}function on(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=_e(a,y[b]);return x}var Be=function(a,y){this.state=a,this.lookAhead=y},Te=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};Te.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Te.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}},Te.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Te.fromSaved=function(a,y,x){return y instanceof Be?new Te(a,hi(a.mode,y.state),x,y.lookAhead):new Te(a,hi(a.mode,y),x)},Te.prototype.save=function(a){var y=a!==!1?hi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Be(y,this.maxLookAhead):y};function ye(a,y,x,b){var E=[a.state.modeGen],ee={};Fn(a,y.text,a.doc.mode,x,function(ce,be){return E.push(ce,be)},ee,b);for(var re=x.state,le=function(ce){x.baseTokens=E;var be=a.state.overlays[ce],ke=1,Ye=0;x.state=!0,Fn(a,y.text,be.mode,x,function(je,bt){for(var _t=ke;Ye<je;){var tn=E[ke];tn>je&&E.splice(ke,1,je,E[ke+1],tn),ke+=2,Ye=Math.min(je,tn)}if(bt)if(be.opaque)E.splice(_t,ke-_t,je,"overlay "+bt),ke=_t+2;else for(;_t<ke;_t+=2){var pn=E[_t+1];E[_t+1]=(pn?pn+" ":"")+"overlay "+bt}},ee),x.state=re,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)le(ue);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function ut(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=_n(a,Ae(y)),E=y.text.length>a.options.maxHighlightLength&&hi(a.doc.mode,b.state),ee=ye(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function _n(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new Te(b,!0,y);var ee=On(a,y,x),re=ee>b.first&&ot(b,ee-1).stateAfter,le=re?Te.fromSaved(b,re,ee):new Te(b,ki(b.mode),ee);return b.iter(ee,y,function(ue){kn(a,ue.text,le);var ce=le.line;ue.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?le.save():null,le.nextLine()}),x&&(b.modeFrontier=le.line),le}function kn(a,y,x,b){var E=a.doc.mode,ee=new Zt(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&qt(E,x.state);!ee.eol();)Ct(E,ee,x.state),ee.start=ee.pos}function qt(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=oi(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function Ct(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=oi(a,x).mode);var ee=a.token(y,x);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var Oe=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function cn(a,y,x,b){var E=a.doc,ee=E.mode,re;y=_e(E,y);var le=ot(E,y.line),ue=_n(a,y.line,x),ce=new Zt(le.text,a.options.tabSize,ue),be;for(b&&(be=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=Ct(ee,ce,ue.state),b&&be.push(new Oe(ce,re,hi(E.mode,ue.state)));return b?be:new Oe(ce,re,ue.state)}function wn(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 Fn(a,y,x,b,E,ee,re){var le=x.flattenSpans;le==null&&(le=a.options.flattenSpans);var ue=0,ce=null,be=new Zt(y,a.options.tabSize,b),ke,Ye=a.options.addModeClass&&[null];for(y==""&&wn(qt(x,b.state),ee);!be.eol();){if(be.pos>a.options.maxHighlightLength?(le=!1,re&&kn(a,y,b,be.pos),be.pos=y.length,ke=null):ke=wn(Ct(x,be,b.state,Ye),ee),Ye){var je=Ye[0].name;je&&(ke="m-"+(ke?je+" "+ke:je))}if(!le||ce!=ke){for(;ue<be.start;)ue=Math.min(be.start,ue+5e3),E(ue,ce);ce=ke}be.start=be.pos}for(;ue<be.pos;){var bt=Math.min(be.pos,ue+5e3);E(bt,ce),ue=bt}}function On(a,y,x){for(var b,E,ee=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),le=y;le>re;--le){if(le<=ee.first)return ee.first;var ue=ot(ee,le-1),ce=ue.stateAfter;if(ce&&(!x||le+(ce instanceof Be?ce.lookAhead:0)<=ee.modeFrontier))return le;var be=ge(ue.text,null,a.options.tabSize);(E==null||b>be)&&(E=le-1,b=be)}return E}function Xn(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=ot(a,b).stateAfter;if(E&&(!(E instanceof Be)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var Xt=!1,Tn=!1;function Gn(){Xt=!0}function Nn(){Tn=!0}function jt(a,y,x){this.marker=a,this.from=y,this.to=x}function fn(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Bn(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function Hn(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Wn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,le=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);if(le||ee.from==y&&re.type=="bookmark"&&(!x||!ee.marker.insertLeft)){var ue=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new jt(re,ee.from,ue?null:ee.to))}}return b}function In(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],re=ee.marker,le=ee.to==null||(re.inclusiveRight?ee.to>=y:ee.to>y);if(le||ee.from==y&&re.type=="bookmark"&&(!x||ee.marker.insertLeft)){var ue=ee.from==null||(re.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new jt(re,ue?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function Vn(a,y){if(y.full)return null;var x=Bt(a,y.from.line)&&ot(a,y.from.line).markedSpans,b=Bt(a,y.to.line)&&ot(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,re=vt(y.from,y.to)==0,le=Wn(x,E,re),ue=In(b,ee,re),ce=y.text.length==1,be=We(y.text).length+(ce?E:0);if(le)for(var ke=0;ke<le.length;++ke){var Ye=le[ke];if(Ye.to==null){var je=fn(ue,Ye.marker);je?ce&&(Ye.to=je.to==null?null:je.to+be):Ye.to=E}}if(ue)for(var bt=0;bt<ue.length;++bt){var _t=ue[bt];if(_t.to!=null&&(_t.to+=be),_t.from==null){var tn=fn(le,_t.marker);tn||(_t.from=be,ce&&(le||(le=[])).push(_t))}else _t.from+=be,ce&&(le||(le=[])).push(_t)}le&&(le=ni(le)),ue&&ue!=le&&(ue=ni(ue));var pn=[le];if(!ce){var An=y.text.length-2,vn;if(An>0&&le)for(var Mn=0;Mn<le.length;++Mn)le[Mn].to==null&&(vn||(vn=[])).push(new jt(le[Mn].marker,null,null));for(var ti=0;ti<An;++ti)pn.push(vn);pn.push(ue)}return pn}function ni(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 Sn(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(je){if(je.markedSpans)for(var bt=0;bt<je.markedSpans.length;++bt){var _t=je.markedSpans[bt].marker;_t.readOnly&&(!b||dt(b,_t)==-1)&&(b||(b=[])).push(_t)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var re=b[ee],le=re.find(0),ue=0;ue<E.length;++ue){var ce=E[ue];if(!(vt(ce.to,le.from)<0||vt(ce.from,le.to)>0)){var be=[ue,1],ke=vt(ce.from,le.from),Ye=vt(ce.to,le.to);(ke<0||!re.inclusiveLeft&&!ke)&&be.push({from:ce.from,to:le.from}),(Ye>0||!re.inclusiveRight&&!Ye)&&be.push({from:le.to,to:ce.to}),E.splice.apply(E,be),ue+=be.length-3}}return E}function ei(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function jn(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Ht(a){return a.inclusiveLeft?-1:0}function Qn(a){return a.inclusiveRight?1:0}function Un(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=vt(b.from,E.from)||Ht(a)-Ht(y);if(ee)return-ee;var re=vt(b.to,E.to)||Qn(a)-Qn(y);return re||y.id-a.id}function Ci(a,y){var x=Tn&&a.markedSpans,b;if(x)for(var E=void 0,ee=0;ee<x.length;++ee)E=x[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||Un(b,E.marker)<0)&&(b=E.marker);return b}function Rn(a){return Ci(a,!0)}function gt(a){return Ci(a,!1)}function Pt(a,y){var x=Tn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ee=x[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!b||Un(b,ee.marker)<0)&&(b=ee.marker)}return b}function Nt(a,y,x,b,E){var ee=ot(a,y),re=Tn&&ee.markedSpans;if(re)for(var le=0;le<re.length;++le){var ue=re[le];if(ue.marker.collapsed){var ce=ue.marker.find(0),be=vt(ce.from,x)||Ht(ue.marker)-Ht(E),ke=vt(ce.to,b)||Qn(ue.marker)-Qn(E);if(!(be>=0&&ke<=0||be<=0&&ke>=0)&&(be<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?vt(ce.to,x)>=0:vt(ce.to,x)>0)||be>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?vt(ce.from,b)<=0:vt(ce.from,b)<0)))return!0}}}function At(a){for(var y;y=Rn(a);)a=y.find(-1,!0).line;return a}function gn(a){for(var y;y=gt(a);)a=y.find(1,!0).line;return a}function Tt(a){for(var y,x;y=gt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function wt(a,y){var x=ot(a,y),b=At(x);return x==b?y:Ae(b)}function Vt(a,y){if(y>a.lastLine())return y;var x=ot(a,y),b;if(!en(a,x))return y;for(;b=gt(x);)x=b.find(1,!0).line;return Ae(x)+1}function en(a,y){var x=Tn&&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&&ii(a,y,b))return!0}}}function ii(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return ii(a,b.line,fn(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,ee=0;ee<y.markedSpans.length;++ee)if(E=y.markedSpans[ee],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&ii(a,y,E))return!0}function si(a){a=At(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 ee=x.parent;ee;x=ee,ee=x.parent)for(var re=0;re<ee.children.length;++re){var le=ee.children[re];if(le==x)break;y+=le.height}return y}function Fi(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Rn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=gt(b);){var ee=x.find(0,!0);y-=b.text.length-ee.from.ch,b=ee.to.line,y+=b.text.length-ee.to.ch}return y}function ci(a){var y=a.display,x=a.doc;y.maxLine=ot(x,x.first),y.maxLineLength=Fi(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Fi(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Si=function(a,y,x){this.text=a,jn(this,y),this.height=x?x(this):1};Si.prototype.lineNo=function(){return Ae(this)},an(Si);function zi(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),ei(a),jn(a,x);var E=b?b(a):1;E!=a.height&&pi(a,E)}function Gi(a){a.parent=null,ei(a)}var Ti={},Ui={};function Ii(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Ui:Ti;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function rr(a,y){var x=nt("span",null,null,Re?"padding-right: .1px":null),b={pre:nt("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ee=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Er,ai(a.display.measure)&&(re=ln(ee,a.doc.direction))&&(b.addToken=lr(b.addToken,re)),b.map=[];var le=y!=a.display.externalMeasured&&Ae(ee);vr(ee,b,ut(a,ee,le)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=Kt(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=Kt(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(Bi(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(Re){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return yn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Kt(b.pre.className,b.textClass||"")),b}function Mr(a){var y=Ze("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Er(a,y,x,b,E,ee,re){if(y){var le=a.splitSpaces?pr(y,a.trailingSpace):y,ue=a.cm.state.specialChars,ce=!1,be;if(!ue.test(y))a.col+=y.length,be=document.createTextNode(le),a.map.push(a.pos,a.pos+y.length,be),ve&&me<9&&(ce=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var ke=0;;){ue.lastIndex=ke;var Ye=ue.exec(y),je=Ye?Ye.index-ke:y.length-ke;if(je){var bt=document.createTextNode(le.slice(ke,ke+je));ve&&me<9?be.appendChild(Ze("span",[bt])):be.appendChild(bt),a.map.push(a.pos,a.pos+je,bt),a.col+=je,a.pos+=je}if(!Ye)break;ke+=je+1;var _t=void 0;if(Ye[0]==" "){var tn=a.cm.options.tabSize,pn=tn-a.col%tn;_t=be.appendChild(Ze("span",Dt(pn),"cm-tab")),_t.setAttribute("role","presentation"),_t.setAttribute("cm-text"," "),a.col+=pn}else Ye[0]=="\r"||Ye[0]==`
`?(_t=be.appendChild(Ze("span",Ye[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_t.setAttribute("cm-text",Ye[0]),a.col+=1):(_t=a.cm.options.specialCharPlaceholder(Ye[0]),_t.setAttribute("cm-text",Ye[0]),ve&&me<9?be.appendChild(Ze("span",[_t])):be.appendChild(_t),a.col+=1);a.map.push(a.pos,a.pos+1,_t),a.pos++}}if(a.trailingSpace=le.charCodeAt(y.length-1)==32,x||b||E||ce||ee||re){var An=x||"";b&&(An+=b),E&&(An+=E);var vn=Ze("span",[be],An,ee);if(re)for(var Mn in re)re.hasOwnProperty(Mn)&&Mn!="style"&&Mn!="class"&&vn.setAttribute(Mn,re[Mn]);return a.content.appendChild(vn)}a.content.appendChild(be)}}function pr(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),b+=ee,x=ee==" "}return b}function lr(a,y){return function(x,b,E,ee,re,le,ue){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,be=ce+b.length;;){for(var ke=void 0,Ye=0;Ye<y.length&&(ke=y[Ye],!(ke.to>ce&&ke.from<=ce));Ye++);if(ke.to>=be)return a(x,b,E,ee,re,le,ue);a(x,b.slice(0,ke.to-ce),E,ee,null,le,ue),ee=null,b=b.slice(ke.to-ce),ce=ke.to}}}function Ni(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 vr(a,y,x){var b=a.markedSpans,E=a.text,ee=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(ee,ee=x[re]),Ii(x[re+1],y.cm.options));return}for(var le=E.length,ue=0,ce=1,be="",ke,Ye,je=0,bt,_t,tn,pn,An;;){if(je==ue){bt=_t=tn=Ye="",An=null,pn=null,je=1/0;for(var vn=[],Mn=void 0,ti=0;ti<b.length;++ti){var Yn=b[ti],bi=Yn.marker;if(bi.type=="bookmark"&&Yn.from==ue&&bi.widgetNode)vn.push(bi);else if(Yn.from<=ue&&(Yn.to==null||Yn.to>ue||bi.collapsed&&Yn.to==ue&&Yn.from==ue)){if(Yn.to!=null&&Yn.to!=ue&&je>Yn.to&&(je=Yn.to,_t=""),bi.className&&(bt+=" "+bi.className),bi.css&&(Ye=(Ye?Ye+";":"")+bi.css),bi.startStyle&&Yn.from==ue&&(tn+=" "+bi.startStyle),bi.endStyle&&Yn.to==je&&(Mn||(Mn=[])).push(bi.endStyle,Yn.to),bi.title&&((An||(An={})).title=bi.title),bi.attributes)for(var ji in bi.attributes)(An||(An={}))[ji]=bi.attributes[ji];bi.collapsed&&(!pn||Un(pn.marker,bi)<0)&&(pn=Yn)}else Yn.from>ue&&je>Yn.from&&(je=Yn.from)}if(Mn)for(var hr=0;hr<Mn.length;hr+=2)Mn[hr+1]==je&&(_t+=" "+Mn[hr]);if(!pn||pn.from==ue)for(var qi=0;qi<vn.length;++qi)Ni(y,0,vn[qi]);if(pn&&(pn.from||0)==ue){if(Ni(y,(pn.to==null?le+1:pn.to)-ue,pn.marker,pn.from==null),pn.to==null)return;pn.to==ue&&(pn=!1)}}if(ue>=le)break;for(var Hr=Math.min(le,je);;){if(be){var Pr=ue+be.length;if(!pn){var nr=Pr>Hr?be.slice(0,Hr-ue):be;y.addToken(y,nr,ke?ke+bt:bt,tn,ue+nr.length==je?_t:"",Ye,An)}if(Pr>=Hr){be=be.slice(Hr-ue),ue=Hr;break}ue=Pr,tn=""}be=E.slice(ee,ee=x[ce++]),ke=Ii(x[ce++],y.cm.options)}}}function Gr(a,y,x){this.line=y,this.rest=Tt(y),this.size=this.rest?Ae(We(this.rest))-x+1:1,this.node=this.text=null,this.hidden=en(a,y)}function Ki(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var re=new Gr(a.doc,ot(a.doc,ee),ee);E=ee+re.size,b.push(re)}return b}var kr=null;function Wr(a){kr?kr.ops.push(a):a.ownsGroup=kr={ops:[a],delayedCallbacks:[]}}function Xi(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 ro(a,y){var x=a.ownsGroup;if(x)try{Xi(x)}finally{kr=null,y(x)}}var sr=null;function Hi(a,y){var x=Ln(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;kr?E=kr.delayedCallbacks:sr?E=sr:(E=sr=[],setTimeout(yr,0));for(var ee=function(le){E.push(function(){return x[le].apply(null,b)})},re=0;re<x.length;++re)ee(re)}}function yr(){var a=sr;sr=null;for(var y=0;y<a.length;++y)a[y]()}function Vr(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?_r(a,y):ee=="gutter"?ui(a,y,x,b):ee=="class"?qn(a,y):ee=="widget"&&ri(a,y,b)}y.changes=null}function Fr(a){return a.node==a.text&&(a.node=Ze("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),ve&&me<8&&(a.node.style.zIndex=2)),a.node}function Yi(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=Fr(y);y.background=b.insertBefore(Ze("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function oo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):rr(a,y)}function _r(a,y){var x=y.text.className,b=oo(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,qn(a,y)):x&&(y.text.className=x)}function qn(a,y){Yi(a,y),y.line.wrapClass?Fr(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 ui(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=Fr(y);y.gutterBackground=Ze("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 ee=y.line.gutterMarkers;if(a.options.lineNumbers||ee){var re=Fr(y),le=y.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(le),re.insertBefore(le,y.text),y.line.gutterClass&&(le.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=le.appendChild(Ze("div",ft(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var ce=a.display.gutterSpecs[ue].className,be=ee.hasOwnProperty(ce)&&ee[ce];be&&le.appendChild(Ze("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function ri(a,y,x){y.alignable&&(y.alignable=null);for(var b=ct("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);di(a,y,x)}function xn(a,y,x,b){var E=oo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),qn(a,y),ui(a,y,x,b),di(a,y,b),y.node}function di(a,y,x){if(Mi(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Mi(a,y.rest[b],y,x,!1)}function Mi(a,y,x,b,E){if(y.widgets)for(var ee=Fr(x),re=0,le=y.widgets;re<le.length;++re){var ue=le[re],ce=Ze("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Nr(ue,ce,x,b),a.display.input.setUneditable(ce),E&&ue.above?ee.insertBefore(ce,x.gutter||x.text):ee.appendChild(ce),Hi(ue,"redraw")}}function Nr(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 ur(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Qe(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;"),Me(y.display.measure,Ze("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function tr(a,y){for(var x=Ei(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 Qi(a){return a.lineSpace.offsetTop}function Ur(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function eo(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Me(a.measure,Ze("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 Ir(a){return Jt-a.display.nativeBarWidth}function to(a){return a.display.scroller.clientWidth-Ir(a)-a.display.barWidth}function ao(a){return a.display.scroller.clientHeight-Ir(a)-a.display.barHeight}function qr(a,y,x){var b=a.options.lineWrapping,E=b&&to(a);if(!y.measure.heights||b&&y.measure.width!=E){var ee=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),le=0;le<re.length-1;le++){var ue=re[le],ce=re[le+1];Math.abs(ue.bottom-ce.bottom)>2&&ee.push((ue.bottom+ce.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function Lo(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(Ae(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=At(y);var x=Ae(y),b=a.display.externalMeasured=new Gr(a.doc,y,x);b.lineN=x;var E=b.built=rr(a,b);return b.text=E.pre,Me(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Kr(a,co(a,y),x,b)}function no(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 co(a,y){var x=Ae(y),b=no(a,x);b&&!b.text?b=null:b&&b.changes&&(Vr(a,b,x,ho(a)),a.curOp.forceUpdate=!0),b||(b=Ga(a,y));var E=Lo(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Kr(a,y,x,b,E){y.before&&(x=-1);var ee=x+(b||""),re;return y.cache.hasOwnProperty(ee)?re=y.cache[ee]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(qr(a,y.view,y.rect),y.hasHeights=!0),re=wa(a,y,x,b),re.bogus||(y.cache[ee]=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,ee,re,le,ue,ce=0;ce<a.length;ce+=3)if(le=a[ce],ue=a[ce+1],y<le?(E=0,ee=1,re="left"):y<ue?(E=y-le,ee=E+1):(ce==a.length-3||y==ue&&a[ce+3]>y)&&(ee=ue-le,E=ee-1,y>=ue&&(re="right")),E!=null){if(b=a[ce+2],le==ue&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;ce&&a[ce-2]==a[ce-3]&&a[ce-1].insertLeft;)b=a[(ce-=3)+2],re="left";if(x=="right"&&E==ue-le)for(;ce<a.length-3&&a[ce+3]==a[ce+4]&&!a[ce+5].insertLeft;)b=a[(ce+=3)+2],re="right";break}return{node:b,start:E,end:ee,collapse:re,coverStart:le,coverEnd:ue}}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),ee=E.node,re=E.start,le=E.end,ue=E.collapse,ce;if(ee.nodeType==3){for(var be=0;be<4;be++){for(;re&&Ve(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+le<E.coverEnd&&Ve(y.line.text.charAt(E.coverStart+le));)++le;if(ve&&me<9&&re==0&&le==E.coverEnd-E.coverStart?ce=ee.parentNode.getBoundingClientRect():ce=Va(Pe(ee,re,le).getClientRects(),b),ce.left||ce.right||re==0)break;le=re,re=re-1,ue="right"}ve&&me<11&&(ce=Ua(a.display.measure,ce))}else{re>0&&(ue=b="right");var ke;a.options.lineWrapping&&(ke=ee.getClientRects()).length>1?ce=ke[b=="right"?ke.length-1:0]:ce=ee.getBoundingClientRect()}if(ve&&me<9&&!re&&(!ce||!ce.left&&!ce.right)){var Ye=ee.parentNode.getClientRects()[0];Ye?ce={left:Ye.left,right:Ye.left+Jr(a.display),top:Ye.top,bottom:Ye.bottom}:ce=ba}for(var je=ce.top-y.rect.top,bt=ce.bottom-y.rect.top,_t=(je+bt)/2,tn=y.view.measure.heights,pn=0;pn<tn.length-1&&!(_t<tn[pn]);pn++);var An=pn?tn[pn-1]:0,vn=tn[pn],Mn={left:(ue=="right"?ce.right:ce.left)-y.rect.left,right:(ue=="left"?ce.left:ce.right)-y.rect.left,top:An,bottom:vn};return!ce.left&&!ce.right&&(Mn.bogus=!0),a.options.singleCursorHeightPerLine||(Mn.rtop=je,Mn.rbottom=bt),Mn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gi(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,Ut(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 qo(){return we&&Ce?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return we&&Ce?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=ur(a.widgets[x]));return y}function To(a,y,x,b,E){if(!E){var ee=Xo(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var re=si(y);if(b=="local"?re+=Qi(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var le=a.display.lineSpace.getBoundingClientRect();re+=le.top+(b=="window"?0:Ca());var ue=le.left+(b=="window"?0:qo());x.left+=ue,x.right+=ue}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-=qo(),E-=Ca();else if(x=="local"||!x){var ee=a.display.sizer.getBoundingClientRect();b+=ee.left,E+=ee.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function Mo(a,y,x,b,E){return b||(b=ot(a.doc,y.line)),To(a,b,ya(a,b,y.ch,E),x)}function Ar(a,y,x,b,E,ee){b=b||ot(a.doc,y.line),E||(E=co(a,b));function re(bt,_t){var tn=Kr(a,E,bt,_t?"right":"left",ee);return _t?tn.left=tn.right:tn.right=tn.left,To(a,b,tn,x)}var le=ln(b,a.doc.direction),ue=y.ch,ce=y.sticky;if(ue>=b.text.length?(ue=b.text.length,ce="before"):ue<=0&&(ue=0,ce="after"),!le)return re(ce=="before"?ue-1:ue,ce=="before");function be(bt,_t,tn){var pn=le[_t],An=pn.level==1;return re(tn?bt-1:bt,An!=tn)}var ke=$t(le,ue,ce),Ye=St,je=be(ue,ke,ce=="before");return Ye!=null&&(je.other=be(ue,Ye,ce!="before")),je}function Ai(a,y){var x=0;y=_e(a.doc,y),a.options.lineWrapping||(x=Jr(a.display)*y.ch);var b=ot(a.doc,y.line),E=si(b)+Qi(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function vi(a,y,x,b,E){var ee=ze(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function mr(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return vi(b.first,0,null,-1,-1);var E=De(b,x),ee=b.first+b.size-1;if(E>ee)return vi(b.first+b.size-1,ot(b,ee).text.length,null,1,1);y<0&&(y=0);for(var re=ot(b,E);;){var le=Xr(a,re,E,y,x),ue=Pt(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ce=ue.find(1);if(ce.line==E)return ce;re=ot(b,E=ce.line)}}function br(a,y,x,b){b-=Xo(y);var E=y.text.length,ee=kt(function(re){return Kr(a,x,re-1).bottom<=b},E,0);return E=kt(function(re){return Kr(a,x,re).top>b},ee,E),{begin:ee,end:E}}function $i(a,y,x,b){x||(x=co(a,y));var E=To(a,y,Kr(a,x,b),"line").top;return br(a,y,x,E)}function or(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Xr(a,y,x,b,E){E-=si(y);var ee=co(a,y),re=Xo(y),le=0,ue=y.text.length,ce=!0,be=ln(y,a.doc.direction);if(be){var ke=(a.options.lineWrapping?lo:Yr)(a,y,x,ee,be,b,E);ce=ke.level!=1,le=ce?ke.from:ke.to-1,ue=ce?ke.to:ke.from-1}var Ye=null,je=null,bt=kt(function(ti){var Yn=Kr(a,ee,ti);return Yn.top+=re,Yn.bottom+=re,or(Yn,b,E,!1)?(Yn.top<=E&&Yn.left<=b&&(Ye=ti,je=Yn),!0):!1},le,ue),_t,tn,pn=!1;if(je){var An=b-je.left<je.right-b,vn=An==ce;bt=Ye+(vn?0:1),tn=vn?"after":"before",_t=An?je.left:je.right}else{!ce&&(bt==ue||bt==le)&&bt++,tn=bt==0?"after":bt==y.text.length?"before":Kr(a,ee,bt-(ce?1:0)).bottom+re<=E==ce?"after":"before";var Mn=Ar(a,ze(x,bt,tn),"line",y,ee);_t=Mn.left,pn=E<Mn.top?-1:E>=Mn.bottom?1:0}return bt=Mt(y.text,bt,1),vi(x,bt,tn,pn,b-_t)}function Yr(a,y,x,b,E,ee,re){var le=kt(function(ke){var Ye=E[ke],je=Ye.level!=1;return or(Ar(a,ze(x,je?Ye.to:Ye.from,je?"before":"after"),"line",y,b),ee,re,!0)},0,E.length-1),ue=E[le];if(le>0){var ce=ue.level!=1,be=Ar(a,ze(x,ce?ue.from:ue.to,ce?"after":"before"),"line",y,b);or(be,ee,re,!0)&&be.top>re&&(ue=E[le-1])}return ue}function lo(a,y,x,b,E,ee,re){var le=br(a,y,b,re),ue=le.begin,ce=le.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var be=null,ke=null,Ye=0;Ye<E.length;Ye++){var je=E[Ye];if(!(je.from>=ce||je.to<=ue)){var bt=je.level!=1,_t=Kr(a,b,bt?Math.min(ce,je.to)-1:Math.max(ue,je.from)).right,tn=_t<ee?ee-_t+1e9:_t-ee;(!be||ke>tn)&&(be=je,ke=tn)}}return be||(be=E[E.length-1]),be.from<ue&&(be={from:ue,to:be.to,level:be.level}),be.to>ce&&(be={from:be.from,to:ce,level:be.level}),be}var Or;function Rr(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Or==null){Or=Ze("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Or.appendChild(document.createTextNode("x")),Or.appendChild(Ze("br"));Or.appendChild(document.createTextNode("x"))}Me(a.measure,Or);var x=Or.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Ut(a.measure),x||1}function Jr(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ze("span","xxxxxxxxxx"),x=Ze("pre",[y],"CodeMirror-line-like");Me(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function ho(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,re=0;ee;ee=ee.nextSibling,++re){var le=a.display.gutterSpecs[re].className;x[le]=ee.offsetLeft+ee.clientLeft+E,b[le]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function wl(a){var y=Rr(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Jr(a.display)-3);return function(E){if(en(a.doc,E))return 0;var ee=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(ee+=E.widgets[re].height);return x?ee+(Math.ceil(E.text.length/b)||1)*y:ee+y}}function Ya(a){var y=a.doc,x=wl(a);y.iter(function(b){var E=x(b);E!=b.height&&pi(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&Ei(y).getAttribute("cm-not-content")=="true")return null;var ee,re,le=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-le.left,re=y.clientY-le.top}catch(ke){return null}var ue=mr(a,ee,re),ce;if(b&&ue.xRel>0&&(ce=ot(a.doc,ue.line).text).length==ue.ch){var be=ge(ce,ce.length,a.options.tabSize)-ce.length;ue=ze(ue.line,Math.max(0,Math.round((ee-eo(a.display).left)/Jr(a.display))-be))}return ue}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 Br(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)Tn&&wt(a.doc,y)<E.viewTo&&po(a);else if(x<=E.viewFrom)Tn&&Vt(a.doc,x+b)>E.viewFrom?po(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)po(a);else if(y<=E.viewFrom){var ee=Ea(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):po(a)}else if(x>=E.viewTo){var re=Ea(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):po(a)}else{var le=Ea(a,y,y,-1),ue=Ea(a,x,x+b,1);le&&ue?(E.view=E.view.slice(0,le.index).concat(Ki(a,le.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):po(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function fo(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 ee=b.view[So(a,y)];if(ee.node!=null){var re=ee.changes||(ee.changes=[]);dt(re,x)==-1&&re.push(x)}}}function po(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Ea(a,y,x,b){var E=So(a,y),ee,re=a.display.view;if(!Tn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var le=a.display.viewFrom,ue=0;ue<E;ue++)le+=re[ue].size;if(le!=y){if(b>0){if(E==re.length-1)return null;ee=le+re[E].size-y,E++}else ee=le-y;y+=ee,x+=ee}for(;wt(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 zs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Ki(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Ki(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(Ki(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function Cl(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 Jo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Sl(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ee=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var le=x.sel.ranges[re];if(!(le.from().line>=a.display.viewTo||le.to().line<a.display.viewFrom)){var ue=le.empty();(ue||a.options.showCursorWhenSelecting)&&El(a,le.head,E),ue||Hs(a,le,ee)}}return b}function El(a,y,x){var b=Ar(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ze("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 ee=x.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=b.other.left+"px",ee.style.top=b.other.top+"px",ee.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ka(a,y){return a.top-y.top||a.left-y.left}function Hs(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),re=eo(a.display),le=re.left,ue=Math.max(b.sizerWidth,to(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function be(vn,Mn,ti,Yn){Mn<0&&(Mn=0),Mn=Math.round(Mn),Yn=Math.round(Yn),ee.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+vn+`px;
top: `+Mn+"px; width: "+(ti==null?ue-vn:ti)+`px;
height: `+(Yn-Mn)+"px"))}function ke(vn,Mn,ti){var Yn=ot(E,vn),bi=Yn.text.length,ji,hr;function qi(nr,Lr){return Mo(a,ze(vn,nr),"div",Yn,Lr)}function Hr(nr,Lr,gr){var ar=$i(a,Yn,null,nr),ir=Lr=="ltr"==(gr=="after")?"left":"right",Ji=gr=="after"?ar.begin:ar.end-(/\s/.test(Yn.text.charAt(ar.end-1))?2:1);return qi(Ji,ir)[ir]}var Pr=ln(Yn,E.direction);return pt(Pr,Mn||0,ti==null?bi:ti,function(nr,Lr,gr,ar){var ir=gr=="ltr",Ji=qi(nr,ir?"left":"right"),Tr=qi(Lr-1,ir?"right":"left"),Vo=Mn==null&&nr==0,xo=ti==null&&Lr==bi,wr=ar==0,io=!Pr||ar==Pr.length-1;if(Tr.top-Ji.top<=3){var fr=(ce?Vo:xo)&&wr,bl=(ce?xo:Vo)&&io,uo=fr?le:(ir?Ji:Tr).left,Do=bl?ue:(ir?Tr:Ji).right;be(uo,Ji.top,Do-uo,Ji.bottom)}else{var Po,Sr,Uo,xl;ir?(Po=ce&&Vo&&wr?le:Ji.left,Sr=ce?ue:Hr(nr,gr,"before"),Uo=ce?le:Hr(Lr,gr,"after"),xl=ce&&xo&&io?ue:Tr.right):(Po=ce?Hr(nr,gr,"before"):le,Sr=!ce&&Vo&&wr?ue:Ji.right,Uo=!ce&&xo&&io?le:Tr.left,xl=ce?Hr(Lr,gr,"after"):ue),be(Po,Ji.top,Sr-Po,Ji.bottom),Ji.bottom<Tr.top&&be(le,Ji.bottom,null,Tr.top),be(Uo,Tr.top,xl-Uo,Tr.bottom)}(!ji||ka(Ji,ji)<0)&&(ji=Ji),ka(Tr,ji)<0&&(ji=Tr),(!hr||ka(Ji,hr)<0)&&(hr=Ji),ka(Tr,hr)<0&&(hr=Tr)}),{start:ji,end:hr}}var Ye=y.from(),je=y.to();if(Ye.line==je.line)ke(Ye.line,Ye.ch,je.ch);else{var bt=ot(E,Ye.line),_t=ot(E,je.line),tn=At(bt)==At(_t),pn=ke(Ye.line,Ye.ch,tn?bt.text.length+1:null).end,An=ke(je.line,tn?0:null,je.ch).start;tn&&(pn.top<An.top-2?(be(pn.right,pn.top,null,pn.bottom),be(le,An.top,An.left,An.bottom)):be(pn.right,pn.top,An.left-pn.right,pn.bottom)),pn.bottom<An.top&&be(le,pn.bottom,null,An.top)}x.appendChild(ee)}function qa(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()||Fo(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function kl(a){a.state.focused||(a.display.input.focus(),Xa(a))}function Al(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Fo(a))},100)}function Xa(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(yn(a,"focus",a,y),a.state.focused=!0,it(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Re&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),qa(a))}function Fo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(yn(a,"blur",a,y),a.state.focused=!1,lt(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Aa(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],ee=a.options.lineWrapping,re=void 0,le=0;if(!E.hidden){if(ve&&me<8){var ue=E.node.offsetTop+E.node.offsetHeight;re=ue-x,x=ue}else{var ce=E.node.getBoundingClientRect();re=ce.bottom-ce.top,!ee&&E.text.firstChild&&(le=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var be=E.line.height-re;if((be>.005||be<-.005)&&(pi(E.line,re),Bl(E.line),E.rest))for(var ke=0;ke<E.rest.length;ke++)Bl(E.rest[ke]);if(le>a.display.sizerWidth){var Ye=Math.ceil(le/Jr(a.display));Ye>a.display.maxLineLength&&(a.display.maxLineLength=Ye,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Bl(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 Ba(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Qi(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ee=De(y,b),re=De(y,E);if(x&&x.ensure){var le=x.ensure.from.line,ue=x.ensure.to.line;le<ee?(ee=le,re=De(y,si(ot(y,le))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=re&&(ee=De(y,si(ot(y,ue))-a.wrapper.clientHeight),re=ue)}return{from:ee,to:Math.max(re,ee+1)}}function Ws(a,y){if(!st(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&&!et){var ee=Ze("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Qi(a.display))+`px;
height: `+(y.bottom-y.top+Ir(a)+x.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?ze(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?ze(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var re=!1,le=Ar(a,y),ue=!x||x==y?le:Ar(a,x);E={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-b,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+b};var ce=Ja(a,E),be=a.doc.scrollTop,ke=a.doc.scrollLeft;if(ce.scrollTop!=null&&($o(a,ce.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(re=!0)),ce.scrollLeft!=null&&(Eo(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-ke)>1&&(re=!0)),!re)break}return E}function js(a,y){var x=Ja(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&Eo(a,x.scrollLeft)}function Ja(a,y){var x=a.display,b=Rr(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=ao(a),re={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var le=a.doc.height+Ur(x),ue=y.top<b,ce=y.bottom>le-b;if(y.top<E)re.scrollTop=ue?0:y.top;else if(y.bottom>E+ee){var be=Math.min(y.top,(ce?le:y.bottom)-ee);be!=E&&(re.scrollTop=be)}var ke=a.options.fixedGutter?0:x.gutters.offsetWidth,Ye=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-ke,je=to(a)-x.gutters.offsetWidth,bt=y.right-y.left>je;return bt&&(y.right=y.left+je),y.left<10?re.scrollLeft=0:y.left<Ye?re.scrollLeft=Math.max(0,y.left+ke-(bt?0:10)):y.right>je+Ye-3&&(re.scrollLeft=y.right+(bt?0:10)-je),re}function Qa(a,y){y!=null&&(Da(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function _o(a){Da(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)&&Da(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Gs(a,y){Da(a),a.curOp.scrollToPos=y}function Da(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=Ai(a,y.from),b=Ai(a,y.to);Dl(a,x,b,y.margin)}}function Dl(a,y,x,b){var E=Ja(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||(ne||el(a,{top:y}),Pl(a,y,!0),ne&&el(a),na(a,100))}function Pl(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 Eo(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,_l(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+Ur(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+Ir(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Ft(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Ft(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&me<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=Se&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.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 No(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Ll(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Aa(a),Ll(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ll(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 Tl={native:ko,null:ta};function Ml(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&lt(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Tl[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Ft(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"?Eo(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&it(a.display.wrapper,a.display.scrollbars.addClass)}var Vs=0;function Ao(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:++Vs},Wr(a.curOp)}function Bo(a){var y=a.curOp;y&&ro(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Us(x)})}function Us(a){for(var y=a.ops,x=0;x<y.length;x++)Ks(y[x]);for(var b=0;b<y.length;b++)Ys(y[b]);for(var E=0;E<y.length;E++)qs(y[E]);for(var ee=0;ee<y.length;ee++)Xs(y[ee]);for(var re=0;re<y.length;re++)Js(y[re])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&ci(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 Pa(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function qs(a){var y=a.cm,x=y.display;a.updatedDisplay&&Aa(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+Ir(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-to(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Xs(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Eo(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Fe();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&No(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&qa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Js(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Fl(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Pl(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Eo(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,_e(b,a.scrollToPos.from),_e(b,a.scrollToPos.to),a.scrollToPos.margin);Ws(y,E)}var ee=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(ee)for(var le=0;le<ee.length;++le)ee[le].lines.length||yn(ee[le],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&yn(re[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&yn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function zr(a,y){if(a.curOp)return y();Ao(a);try{return y()}finally{Bo(a)}}function cr(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Ao(a);try{return y.apply(a,arguments)}finally{Bo(a)}}}function Cr(a){return function(){if(this.curOp)return a.apply(this,arguments);Ao(this);try{return a.apply(this,arguments)}finally{Bo(this)}}}function dr(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Ao(y);try{return a.apply(this,arguments)}finally{Bo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,mn(Qs,a))}function Qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=_n(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var re=ee.styles,le=ee.text.length>a.options.maxHighlightLength?hi(y.mode,b.state):null,ue=ye(a,ee,b,!0);le&&(b.state=le),ee.styles=ue.styles;var ce=ee.styleClasses,be=ue.classes;be?ee.styleClasses=be:ce&&(ee.styleClasses=null);for(var ke=!re||re.length!=ee.styles.length||ce!=be&&(!ce||!be||ce.bgClass!=be.bgClass||ce.textClass!=be.textClass),Ye=0;!ke&&Ye<re.length;++Ye)ke=re[Ye]!=ee.styles[Ye];ke&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&kn(a,ee.text,b),ee.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&&zr(a,function(){for(var ee=0;ee<E.length;ee++)fo(a,E[ee],"text")})}}var Pa=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Ba(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=to(a),this.force=x,this.dims=ho(a),this.events=[]};Pa.prototype.signal=function(a,y){Ot(a,y)&&this.events.push(arguments)},Pa.prototype.finish=function(){for(var a=0;a<this.events.length;a++)yn.apply(null,this.events[a])};function $s(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Ir(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Ir(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Fe();if(!y||!Qe(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Qe(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==Fe())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Qe(document.body,a.anchorNode)&&Qe(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 po(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&&Cl(a)==0)return!1;Nl(a)&&(po(a),y.dims=ho(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ee&&ee-x.viewFrom<20&&(ee=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),Tn&&(ee=wt(a.doc,ee),re=Vt(a.doc,re));var le=ee!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;zs(a,ee,re),x.viewOffset=si(ot(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cl(a);if(!le&&ue==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return ue>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),Ut(x.cursorDiv),Ut(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,le&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Fl(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==to(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Ur(a.display)-ao(a),x.top)}),y.visible=Ba(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Ba(a.display,a.doc,x));if(!$a(a,y))break;Aa(a);var E=ea(a);Jo(a),No(a,E),nl(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 el(a,y){var x=new Pa(a,y);if($a(a,x)){Aa(a),Fl(a,x);var b=ea(a);Jo(a),No(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,re=ee.firstChild;function le(bt){var _t=bt.nextSibling;return Re&&Se&&a.display.currentWheelTarget==bt?bt.style.display="none":bt.parentNode.removeChild(bt),_t}for(var ue=b.view,ce=b.viewFrom,be=0;be<ue.length;be++){var ke=ue[be];if(!ke.hidden)if(!ke.node||ke.node.parentNode!=ee){var Ye=xn(a,ke,ce,x);ee.insertBefore(Ye,re)}else{for(;re!=ke.node;)re=le(re);var je=E&&y!=null&&y<=ce&&ke.lineNumber;ke.changes&&(dt(ke.changes,"gutter")>-1&&(je=!1),Vr(a,ke,ce,x)),je&&(Ut(ke.lineNumber),ke.lineNumber.appendChild(document.createTextNode(ft(a.options,ce)))),re=ke.node.nextSibling}ce+=ke.size}for(;re;)re=le(re)}function tl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function nl(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+Ir(a)+"px"}function _l(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=ee),x[re].gutterBackground&&(x[re].gutterBackground.style.left=ee));var le=x[re].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Nl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=ft(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ze("div",[Ze("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,re=E.offsetWidth-ee;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ee,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function il(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ee=a[E],re=null;if(typeof ee!="string"&&(re=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ee,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Il(a){var y=a.gutters,x=a.gutterSpecs;Ut(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,re=E.style,le=y.appendChild(Ze("div",null,"CodeMirror-gutter "+ee));re&&(le.style.cssText=re),ee=="CodeMirror-linenumbers"&&(a.lineGutter=le,le.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ia(a){Il(a.display),Br(a),_l(a)}function iu(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=nt("div",null,"CodeMirror-code"),E.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ze("div",null,"CodeMirror-cursors"),E.measure=Ze("div",null,"CodeMirror-measure"),E.lineMeasure=Ze("div",null,"CodeMirror-measure"),E.lineSpace=nt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=nt("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ze("div",[ee],null,"position: relative"),E.sizer=Ze("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ze("div",null,null,"position: absolute; height: "+Jt+"px; width: 1px;"),E.gutters=Ze("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ze("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ze("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),ve&&me<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Re&&!(ne&&Ee)&&(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=il(b.gutters,b.lineNumbers),Il(E),x.init(E)}var La=0,Zr=null;ve?Zr=-.53:ne?Zr=15:we?Zr=-.7:Ke&&(Zr=-1/3);function Ol(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 ru(a){var y=Ol(a);return y.x*=Zr,y.y*=Zr,y}function Rl(a,y){var x=Ol(y),b=x.x,E=x.y,ee=a.display,re=ee.scroller,le=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(b&&le||E&&ue){if(E&&Se&&Re){e:for(var ce=y.target,be=ee.view;ce!=re;ce=ce.parentNode)for(var ke=0;ke<be.length;ke++)if(be[ke].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!ne&&!fe&&Zr!=null){E&&ue&&$o(a,Math.max(0,re.scrollTop+E*Zr)),Eo(a,Math.max(0,re.scrollLeft+b*Zr)),(!E||E&&ue)&&Cn(y),ee.wheelStartX=null;return}if(E&&Zr!=null){var Ye=E*Zr,je=a.doc.scrollTop,bt=je+ee.wrapper.clientHeight;Ye<0?je=Math.max(0,je+Ye-50):bt=Math.min(a.doc.height,bt+Ye+50),el(a,{top:je,bottom:bt})}La<20&&(ee.wheelStartX==null?(ee.wheelStartX=re.scrollLeft,ee.wheelStartY=re.scrollTop,ee.wheelDX=b,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var _t=re.scrollLeft-ee.wheelStartX,tn=re.scrollTop-ee.wheelStartY,pn=tn&&ee.wheelDY&&tn/ee.wheelDY||_t&&ee.wheelDX&&_t/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,pn&&(Zr=(Zr*La+pn)/(La+1),++La)}},200)):(ee.wheelDX+=b,ee.wheelDY+=E))}}var jr=function(a,y){this.ranges=a,this.primIndex=y};jr.prototype.primary=function(){return this.ranges[this.primIndex]},jr.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(!Qt(x.anchor,b.anchor)||!Qt(x.head,b.head))return!1}return!0},jr.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Oi(Gt(this.ranges[y].anchor),Gt(this.ranges[y].head));return new jr(a,this.primIndex)},jr.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},jr.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(vt(y,b.from())>=0&&vt(a,b.to())<=0)return x}return-1};var Oi=function(a,y){this.anchor=a,this.head=y};Oi.prototype.from=function(){return zt(this.anchor,this.head)},Oi.prototype.to=function(){return nn(this.anchor,this.head)},Oi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Qr(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Ye,je){return vt(Ye.from(),je.from())}),x=dt(y,E);for(var ee=1;ee<y.length;ee++){var re=y[ee],le=y[ee-1],ue=vt(le.to(),re.from());if(b&&!re.empty()?ue>0:ue>=0){var ce=zt(le.from(),re.from()),be=nn(le.to(),re.to()),ke=le.empty()?re.from()==re.head:le.from()==le.head;ee<=x&&--x,y.splice(--ee,2,new Oi(ke?be:ce,ke?ce:be))}}return new jr(y,x)}function vo(a,y){return new jr([new Oi(a,y||a)],0)}function mo(a){return a.text?ze(a.from.line+a.text.length-1,We(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function zl(a,y){if(vt(a,y.from)<0)return a;if(vt(a,y.to)<=0)return mo(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+=mo(y).ch-y.to.ch),ze(x,b)}function rl(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Oi(zl(E.anchor,y),zl(E.head,y)))}return Qr(a.cm,x,a.sel.primIndex)}function Hl(a,y,x){return a.line==y.line?ze(x.line,a.ch-y.ch+x.ch):ze(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=ze(a.first,0),ee=E,re=0;re<y.length;re++){var le=y[re],ue=Hl(le.from,E,ee),ce=Hl(mo(le),E,ee);if(E=le.to,ee=ce,x=="around"){var be=a.sel.ranges[re],ke=vt(be.head,be.anchor)<0;b[re]=new Oi(ke?ce:ue,ke?ue:ce)}else b[re]=new Oi(ue,ue)}return new jr(b,a.sel.primIndex)}function ol(a){a.doc.mode=mi(a.options,a.doc.modeOption),ra(a)}function ra(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&&Br(a)}function Wl(a,y){return y.from.ch==0&&y.to.ch==0&&We(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(An){return x?x[An]:null}function ee(An,vn,Mn){zi(An,vn,Mn,b),Hi(An,"change",An,y)}function re(An,vn){for(var Mn=[],ti=An;ti<vn;++ti)Mn.push(new Si(ce[ti],E(ti),b));return Mn}var le=y.from,ue=y.to,ce=y.text,be=ot(a,le.line),ke=ot(a,ue.line),Ye=We(ce),je=E(ce.length-1),bt=ue.line-le.line;if(y.full)a.insert(0,re(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(Wl(a,y)){var _t=re(0,ce.length-1);ee(ke,ke.text,je),bt&&a.remove(le.line,bt),_t.length&&a.insert(le.line,_t)}else if(be==ke)if(ce.length==1)ee(be,be.text.slice(0,le.ch)+Ye+be.text.slice(ue.ch),je);else{var tn=re(1,ce.length-1);tn.push(new Si(Ye+be.text.slice(ue.ch),je,b)),ee(be,be.text.slice(0,le.ch)+ce[0],E(0)),a.insert(le.line+1,tn)}else if(ce.length==1)ee(be,be.text.slice(0,le.ch)+ce[0]+ke.text.slice(ue.ch),E(0)),a.remove(le.line+1,bt);else{ee(be,be.text.slice(0,le.ch)+ce[0],E(0)),ee(ke,Ye+ke.text.slice(ue.ch),je);var pn=re(1,ce.length-1);bt>1&&a.remove(le.line+1,bt-1),a.insert(le.line+1,pn)}Hi(a,"change",a,y)}function go(a,y,x){function b(E,ee,re){if(E.linked)for(var le=0;le<E.linked.length;++le){var ue=E.linked[le];if(ue.doc!=ee){var ce=re&&ue.sharedHist;x&&!ce||(y(ue.doc,ce),b(ue.doc,E,ce))}}}b(a,null,!0)}function Zl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),ol(a),jl(a),a.options.lineWrapping||ci(a),a.options.mode=y.modeOption,Br(a)}function jl(a){(a.doc.direction=="rtl"?it:lt)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){zr(a,function(){jl(a),Br(a)})}function Ta(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 ll(a,y){var x={from:Gt(y.from),to:mo(y),text:un(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),go(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function Gl(a){for(;a.length;){var y=We(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Gl(a.done),We(a.done);if(a.done.length&&!We(a.done).ranges)return We(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),We(a.done)}function Vl(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,re,le;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=lu(E,E.lastOp==b)))le=We(re.changes),vt(y.from,y.to)==0&&vt(y.from,le.to)==0?le.to=mo(y):re.changes.push(ll(a,y));else{var ue=We(E.done);for((!ue||!ue.ranges)&&Ma(a.sel,E.done),re={changes:[ll(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,le||yn(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||su(a,ee,We(E.done),y))?E.done[E.done.length-1]=y:Ma(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gl(E.undone)}function Ma(a,y){var x=We(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=re.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x<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 du(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 Kl(a,y){var x=du(a,y),b=Vn(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ee=x[E],re=b[E];if(ee&&re)e:for(var le=0;le<re.length;++le){for(var ue=re[le],ce=0;ce<ee.length;++ce)if(ee[ce].marker==ue.marker)continue e;ee.push(ue)}else re&&(x[E]=re)}return x}function Io(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?jr.prototype.deepCopy.call(ee):ee);continue}var re=ee.changes,le=[];b.push({changes:le});for(var ue=0;ue<re.length;++ue){var ce=re[ue],be=void 0;if(le.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var ke in ce)(be=ke.match(/^spans_(\d+)$/))&&dt(y,Number(be[1]))>-1&&(We(le)[ke]=ce[ke],delete ce[ke])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=vt(y,E)<0;ee!=vt(x,E)<0?(E=y,y=x):ee!=vt(y,x)<0&&(y=x)}return new Oi(E,y)}else return new Oi(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),xr(a,new jr([sl(a.sel.primary(),y,x,E)],0),b)}function Yl(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee<a.sel.ranges.length;ee++)b[ee]=sl(a.sel.ranges[ee],y[ee],null,E);var re=Qr(a.cm,b,a.sel.primIndex);xr(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,xr(a,Qr(a.cm,E,a.sel.primIndex),b)}function ql(a,y,x,b){xr(a,vo(y,x),b)}function hu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new Oi(_e(a,E[ee].anchor),_e(a,E[ee].head))},origin:x&&x.origin};return yn(a,"beforeSelectionChange",a,b),a.cm&&yn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Qr(a.cm,b.ranges,b.ranges.length-1):y}function Xl(a,y,x){var b=a.history.done,E=We(b);E&&E.ranges?(b[b.length-1]=y,_a(a,y,x)):xr(a,y,x)}function xr(a,y,x){_a(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function _a(a,y,x){(Ot(a,"beforeSelectionChange")||a.cm&&Ot(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(vt(y.primary().head,a.sel.primary().head)<0?-1:1);Jl(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&_o(a.cm)}function Jl(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,En(a.cm)),Hi(a,"cursorActivity",a))}function Ql(a){Jl(a,$l(a,a.sel,null,!1))}function $l(a,y,x,b){for(var E,ee=0;ee<y.ranges.length;ee++){var re=y.ranges[ee],le=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],ue=Na(a,re.anchor,le&&le.anchor,x,b),ce=Na(a,re.head,le&&le.head,x,b);(E||ue!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new Oi(ue,ce))}return E?Qr(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var ee=ot(a,y.line);if(ee.markedSpans)for(var re=0;re<ee.markedSpans.length;++re){var le=ee.markedSpans[re],ue=le.marker,ce="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,be="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ce?le.from<=y.ch:le.from<y.ch))&&(le.to==null||(be?le.to>=y.ch:le.to>y.ch))){if(E&&(yn(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(ee.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(x){var ke=ue.find(b<0?1:-1),Ye=void 0;if((b<0?be:ce)&&(ke=es(a,ke,-b,ke&&ke.line==y.line?ee:null)),ke&&ke.line==y.line&&(Ye=vt(ke,x))&&(b<0?Ye<0:Ye>0))return Oo(a,ke,y,b,E)}var je=ue.find(b<0?-1:1);return(b<0?ce:be)&&(je=es(a,je,b,je.line==y.line?ee:null)),je?Oo(a,je,y,b,E):null}}return y}function Na(a,y,x,b,E){var ee=b||1,re=Oo(a,y,x,ee,E)||!E&&Oo(a,y,x,ee,!0)||Oo(a,y,x,-ee,E)||!E&&Oo(a,y,x,-ee,!0);return re||(a.cantEdit=!0,ze(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?_e(a,ze(y.line-1)):null:x>0&&y.ch==(b||ot(a,y.line)).text.length?y.line<a.first+a.size-1?ze(y.line+1,0):null:new ze(y.line,y.ch+x)}function ts(a){a.setSelection(ze(a.firstLine(),0),ze(a.lastLine()),Ie)}function ns(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,ee,re,le){E&&(b.from=_e(a,E)),ee&&(b.to=_e(a,ee)),re&&(b.text=re),le!==void 0&&(b.origin=le)}),yn(a,"beforeChange",a,b),a.cm&&yn(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 Ro(a,y,x){if(a.cm){if(!a.cm.curOp)return cr(a.cm,Ro)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Ot(a,"beforeChange")||a.cm&&Ot(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=Xt&&!x&&Sn(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)is(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else is(a,y)}}function is(a,y){if(!(y.text.length==1&&y.text[0]==""&&vt(y.from,y.to)==0)){var x=rl(a,y);Vl(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Vn(a,y));var b=[];go(a,function(E,ee){!ee&&dt(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,Vn(E,y))})}}function Ia(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,re=a.sel,le=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,ce=0;ce<le.length&&(ee=le[ce],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));ce++);if(ce!=le.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=le.pop(),ee.ranges){if(Ma(ee,ue),x&&!ee.equals(a.sel)){xr(a,ee,{clearRedo:!1});return}re=ee}else if(b){le.push(ee);return}else break;var be=[];Ma(re,ue),ue.push({changes:be,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var ke=Ot(a,"beforeChange")||a.cm&&Ot(a.cm,"beforeChange"),Ye=function(_t){var tn=ee.changes[_t];if(tn.origin=y,ke&&!ns(a,tn,!1))return le.length=0,{};be.push(ll(a,tn));var pn=_t?rl(a,tn):We(le);oa(a,tn,pn,Kl(a,tn)),!_t&&a.cm&&a.cm.scrollIntoView({from:tn.from,to:mo(tn)});var An=[];go(a,function(vn,Mn){!Mn&&dt(An,vn.history)==-1&&(ls(vn.history,tn),An.push(vn.history)),oa(vn,tn,null,Kl(vn,tn))})},je=ee.changes.length-1;je>=0;--je){var bt=Ye(je);if(bt)return bt.v}}}}function rs(a,y){if(y!=0&&(a.first+=y,a.sel=new jr(mt(a.sel.ranges,function(E){return new Oi(ze(E.anchor.line+y,E.anchor.ch),ze(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Br(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)fo(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return cr(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){rs(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);rs(a,E),y={from:ze(a.first,0),to:ze(y.to.line+E,y.to.ch),text:[We(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:ze(ee,ot(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=un(a,y.from,y.to),x||(x=rl(a,y)),a.cm?fu(a.cm,y,b):al(a,y,b),_a(a,x,Ie),a.cantEdit&&Na(a,ze(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,ee=y.from,re=y.to,le=!1,ue=ee.line;a.options.lineWrapping||(ue=Ae(At(ot(b,ee.line))),b.iter(ue,re.line+1,function(je){if(je==E.maxLine)return le=!0,!0})),b.sel.contains(y.from,y.to)>-1&&En(a),al(b,y,x,wl(a)),a.options.lineWrapping||(b.iter(ue,ee.line+y.text.length,function(je){var bt=Fi(je);bt>E.maxLineLength&&(E.maxLine=je,E.maxLineLength=bt,E.maxLineChanged=!0,le=!1)}),le&&(a.curOp.updateMaxLine=!0)),Xn(b,ee.line),na(a,400);var ce=y.text.length-(re.line-ee.line)-1;y.full?Br(a):ee.line==re.line&&y.text.length==1&&!Wl(a.doc,y)?fo(a,ee.line,"text"):Br(a,ee.line,re.line+1,ce);var be=Ot(a,"changes"),ke=Ot(a,"change");if(ke||be){var Ye={from:ee,to:re,text:y.text,removed:y.removed,origin:y.origin};ke&&Hi(a,"change",a,Ye),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Ye)}a.display.selForContextMenu=null}function zo(a,y,x,b,E){var ee;b||(b=x),vt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Ro(a,{from:x,to:b,text:y,origin:E})}function os(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function as(a,y,x,b){for(var E=0;E<a.length;++E){var ee=a[E],re=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var le=0;le<ee.ranges.length;le++)os(ee.ranges[le].anchor,y,x,b),os(ee.ranges[le].head,y,x,b);continue}for(var ue=0;ue<ee.changes.length;++ue){var ce=ee.changes[ue];if(x<ce.from.line)ce.from=ze(ce.from.line+b,ce.from.ch),ce.to=ze(ce.to.line+b,ce.to.ch);else if(y<=ce.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;as(a.done,x,b,E),as(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=ot(a,rn(a,y)):E=Ae(y),E==null?null:(b(ee,E)&&a.cm&&fo(a.cm,E,x),ee)}function la(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}la.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,Gi(E),Hi(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 sa(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}sa.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 ee=Math.min(y,E-a),re=b.height;if(b.removeInner(a,ee),this.height-=re-b.height,E==ee&&(this.children.splice(x--,1),b.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof la))){var le=[];this.collapse(le),this.children=[new la(le)],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],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,le=re;le<E.lines.length;){var ue=new la(E.lines.slice(le,le+=25));E.height-=ue.height,this.children.splice(++b,0,ue),ue.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=ee}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new sa(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=dt(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new sa(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],ee=E.chunkSize();if(a<ee){var re=Math.min(y,ee-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=ee}}};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=Ae(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 ee=ur(this);pi(x,Math.max(0,x.height-ee)),a&&(zr(a,function(){ss(a,x,-ee),fo(a,b,"widget")}),Hi(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=ur(this)-y;E&&(en(this.doc,b)||pi(b,b.height+E),x&&zr(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Hi(x,"lineWidgetChanged",x,a,Ae(b))}))},an(ua);function ss(a,y,x){si(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),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),aa(a,y,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(E.insertAt==null?le.push(E):le.splice(Math.min(le.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,ee&&!en(a,re)){var ue=si(re)<a.scrollTop;pi(re,re.height+ur(E)),ue&&Qa(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Hi(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Ae(y)),E}var us=0,yo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};yo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Ao(a),Ot(this,"clear")){var x=this.find();x&&Hi(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var re=this.lines[ee],le=fn(re.markedSpans,this);a&&!this.collapsed?fo(a,Ae(re),"text"):a&&(le.to!=null&&(E=Ae(re)),le.from!=null&&(b=Ae(re))),re.markedSpans=Bn(re.markedSpans,le),le.from==null&&this.collapsed&&!en(this.doc,re)&&a&&pi(re,Rr(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ce=At(this.lines[ue]),be=Fi(ce);be>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Br(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ql(a.doc)),a&&Hi(a,"markerCleared",a,this,b,E),y&&Bo(a),this.parent&&this.parent.clear()}},yo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ee=this.lines[E],re=fn(ee.markedSpans,this);if(re.from!=null&&(x=ze(y?ee:Ae(ee),re.from),a==-1))return x;if(re.to!=null&&(b=ze(y?ee:Ae(ee),re.to),a==1))return b}return x&&{from:x,to:b}},yo.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||zr(b,function(){var E=y.line,ee=Ae(y.line),re=no(b,ee);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!en(x.doc,E)&&x.height!=null){var le=x.height;x.height=null;var ue=ur(x)-le;ue&&pi(E,E.height+ue)}Hi(b,"markerChanged",b,a)})},yo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||dt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},yo.prototype.detachLine=function(a){if(this.lines.splice(dt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},an(yo);function Ho(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return cr(a.cm,Ho)(a,y,x,b,E);var ee=new yo(a,E),re=vt(y,x);if(b&&Lt(b,ee,!1),re>0||re==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=nt("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(Nt(a,y.line,y,x,ee)||y.line!=x.line&&Nt(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nn()}ee.addToHistory&&Vl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var le=y.line,ue=a.cm,ce;if(a.iter(le,x.line+1,function(ke){ue&&ee.collapsed&&!ue.options.lineWrapping&&At(ke)==ue.display.maxLine&&(ce=!0),ee.collapsed&&le!=y.line&&pi(ke,0),Hn(ke,new jt(ee,le==y.line?y.ch:null,le==x.line?x.ch:null)),++le}),ee.collapsed&&a.iter(y.line,x.line+1,function(ke){en(a,ke)&&pi(ke,0)}),ee.clearOnEnter&&Ft(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Gn(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++us,ee.atomic=!0),ue){if(ce&&(ue.curOp.updateMaxLine=!0),ee.collapsed)Br(ue,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var be=y.line;be<=x.line;be++)fo(ue,be,"text");ee.atomic&&Ql(ue.doc),Hi(ue,"markerAdded",ue,ee)}return ee}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();Hi(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},an(ca);function vu(a,y,x,b,E){b=Lt(b),b.shared=!1;var ee=[Ho(a,y,x,b,E)],re=ee[0],le=b.widgetNode;return go(a,function(ue){le&&(b.widgetNode=le.cloneNode(!0)),ee.push(Ho(ue,_e(ue,y),_e(ue,x),b,E));for(var ce=0;ce<ue.linked.length;++ce)if(ue.linked[ce].isParent)return;re=We(ee)}),new ca(ee,re)}function cs(a){return a.findMarks(ze(a.first,0),a.clipPos(ze(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(),ee=a.clipPos(E.from),re=a.clipPos(E.to);if(vt(ee,re)){var le=Ho(a,ee,re,b.primary,b.primary.type);b.markers.push(le),le.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];go(E.primary.doc,function(ue){return ee.push(ue)});for(var re=0;re<E.markers.length;re++){var le=E.markers[re];dt(ee,le.doc)==-1&&(le.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Dr=function(a,y,x,b,E){if(!(this instanceof Dr))return new Dr(a,y,x,b,E);x==null&&(x=0),sa.call(this,[new la([new Si("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=ze(x,0);this.sel=vo(ee),this.history=new Ta(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)),al(this,{from:ee,to:ee,text:a}),xr(this,vo(ee),Ie)};Dr.prototype=te(sa.prototype,{constructor:Dr,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=Jn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:dr(function(a){var y=ze(this.first,0),x=this.first+this.size-1;Ro(this,{from:y,to:ze(x,ot(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qo(this.cm,0,0),xr(this,vo(y),Ie)}),replaceRange:function(a,y,x,b){y=_e(this,y),x=x?_e(this,x):y,zo(this,a,y,x,b)},getRange:function(a,y,x){var b=un(this,_e(this,a),_e(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(Bt(this,a))return ot(this,a)},getLineNumber:function(a){return Ae(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=ot(this,a)),At(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return _e(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:dr(function(a,y,x){ql(this,_e(this,typeof a=="number"?ze(a,y||0):a),null,x)}),setSelection:dr(function(a,y,x){ql(this,_e(this,a),_e(this,y||a),x)}),extendSelection:dr(function(a,y,x){Fa(this,_e(this,a),y&&_e(this,y),x)}),extendSelections:dr(function(a,y){Yl(this,on(this,a),y)}),extendSelectionsBy:dr(function(a,y){var x=mt(this.sel.ranges,a);Yl(this,on(this,x),y)}),setSelections:dr(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Oi(_e(this,a[E].anchor),_e(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),xr(this,Qr(this.cm,b,y),x)}}),addSelection:dr(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Oi(_e(this,a),_e(this,y||a))),xr(this,Qr(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=un(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=un(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:dr(function(a,y,x){for(var b=[],E=this.sel,ee=0;ee<E.ranges.length;ee++){var re=E.ranges[ee];b[ee]={from:re.from(),to:re.to(),text:this.splitLines(a[ee]),origin:x}}for(var le=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)Ro(this,b[ue]);le?Xl(this,le):this.cm&&_o(this.cm)}),undo:dr(function(){Ia(this,"undo")}),redo:dr(function(){Ia(this,"redo")}),undoSelection:dr(function(){Ia(this,"undo",!0)}),redoSelection:dr(function(){Ia(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 Ta(this.history.maxGeneration),go(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:Io(this.history.done),undone:Io(this.history.undone)}},setHistory:function(a){var y=this.history=new Ta(this.history.maxGeneration);y.done=Io(a.done.slice(0),null,!0),y.undone=Io(a.undone.slice(0),null,!0)},setGutterMarker:dr(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&ie(E)&&(b.gutterMarkers=null),!0})}),clearGutter:dr(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ie(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Bt(this,a)||(y=a,a=ot(this,a),!a))return null}else if(y=Ae(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:dr(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(ct(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:dr(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",ee=b[E];if(ee)if(x==null)b[E]=null;else{var re=ee.match(ct(x));if(!re)return!1;var le=re.index+re[0].length;b[E]=ee.slice(0,re.index)+(!re.index||le==ee.length?"":" ")+ee.slice(le)||null}else return!1;return!0})}),addLineWidget:dr(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ho(this,_e(this,a),_e(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=_e(this,a),Ho(this,a,a,x,"bookmark")},findMarksAt:function(a){a=_e(this,a);var y=[],x=ot(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=_e(this,a),y=_e(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var re=ee.markedSpans;if(re)for(var le=0;le<re.length;le++){var ue=re[le];!(ue.to!=null&&E==a.line&&a.ch>=ue.to||ue.from==null&&E!=a.line||ue.from!=null&&E==y.line&&ue.from>=y.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.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 ee=E.text.length+b;if(ee>a)return y=a,!0;a-=ee,++x}),_e(this,ze(x,y))},indexFromPos:function(a){a=_e(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 Dr(Jn(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 Dr(Jn(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,cs(this)),b},unlinkDoc:function(a){if(a instanceof Vi&&(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(cs(this));break}}if(a.history==this.history){var b=[a.id];go(a,function(E){return b.push(E.id)},!0),a.history=new Ta(null),a.history.done=Io(this.history.done,b),a.history.undone=Io(this.history.undone,b)}},iterLinkedDocs:function(a){go(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):wi(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:dr(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))})}),Dr.prototype.eachLine=Dr.prototype.iter;var ds=0;function bu(a){var y=this;if(hs(y),!(st(y,a)||tr(y.display,a))){Cn(a),ve&&(ds=+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,ee=Array(E),re=0,le=function(){++re==E&&cr(y,function(){x=_e(y.doc,x);var je={from:x,to:x,text:y.doc.splitLines(ee.filter(function(bt){return bt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Ro(y.doc,je),Xl(y.doc,vo(_e(y.doc,x),_e(y.doc,mo(je))))})()},ue=function(je,bt){if(y.options.allowDropFileTypes&&dt(y.options.allowDropFileTypes,je.type)==-1){le();return}var _t=new FileReader;_t.onerror=function(){return le()},_t.onload=function(){var tn=_t.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(tn)){le();return}ee[bt]=tn,le()},_t.readAsText(je)},ce=0;ce<b.length;ce++)ue(b[ce],ce);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 ke;if(y.state.draggingText&&!y.state.draggingText.copy&&(ke=y.listSelections()),_a(y.doc,vo(x,x)),ke)for(var Ye=0;Ye<ke.length;++Ye)zo(y.doc,"",ke[Ye].anchor,ke[Ye].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(je){}}}}function xu(a,y){if(ve&&(!a.state.draggingText||+new Date-ds<100)){zn(y);return}if(!(st(a,y)||tr(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ke)){var x=Ze("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Me(a.display.dragCursor,b)}}function hs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fs(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 ee=0;ee<x.length;ee++)a(x[ee])})}}var ps=!1;function Cu(){ps||(Su(),ps=!0)}function Su(){var a;Ft(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fs(Eu)},100))}),Ft(window,"blur",function(){return fs(Fo)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var bo={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"},da=0;da<10;da++)bo[da+48]=bo[da+96]=String(da);for(var Oa=65;Oa<=90;Oa++)bo[Oa]=String.fromCharCode(Oa);for(var ha=1;ha<=12;ha++)bo[ha+111]=bo[ha+63235]="F"+ha;var so={};so.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"},so.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"},so.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"},so.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"]},so.default=Se?so.macDefault:so.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ee,re=0;re<y.length-1;re++){var le=y[re];if(/^(cmd|meta|m)$/i.test(le))ee=!0;else if(/^a(lt)?$/i.test(le))x=!0;else if(/^(c|ctrl|control)$/i.test(le))b=!0;else if(/^s(hift)?$/i.test(le))E=!0;else throw new Error("Unrecognized modifier name: "+le)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Au(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=mt(x.split(" "),ku),ee=0;ee<E.length;ee++){var re=void 0,le=void 0;ee==E.length-1?(le=E.join(" "),re=b):(le=E.slice(0,ee+1).join(" "),re="...");var ue=y[le];if(!ue)y[le]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+le)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Wo(a,y,x,b){y=Ra(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 Wo(a,y.fallthrough,x,b);for(var ee=0;ee<y.fallthrough.length;ee++){var re=Wo(a,y.fallthrough[ee],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:bo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ms(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),($e?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),($e?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(fe&&a.keyCode==34&&a.char)return!1;var x=bo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function Ra(a){return typeof a=="string"?so[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&vt(ee.from,We(b).to)<=0;){var re=b.pop();if(vt(re.from,ee.from)<0){ee.from=re.from;break}}b.push(ee)}zr(a,function(){for(var le=b.length-1;le>=0;le--)zo(a.doc,"",b[le].from,b[le].to,"+delete");_o(a)})}function cl(a,y,x){var b=Mt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function dl(a,y,x){var b=cl(a,y.ch,x);return b==null?null:new ze(y.line,b,x<0?"after":"before")}function hl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=ln(x,y.doc.direction);if(ee){var re=E<0?We(ee):ee[0],le=E<0==(re.level==1),ue=le?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var be=co(y,x);ce=E<0?x.text.length-1:0;var ke=Kr(y,be,ce).top;ce=kt(function(Ye){return Kr(y,be,Ye).top==ke},E<0==(re.level==1)?re.from:re.to-1,ce),ue=="before"&&(ce=cl(x,ce,1))}else ce=E<0?re.to:re.from;return new ze(b,ce,ue)}}return new ze(b,E<0?x.text.length:0,E<0?"before":"after")}function Bu(a,y,x,b){var E=ln(y,a.doc.direction);if(!E)return dl(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ee=$t(E,x.ch,x.sticky),re=E[ee];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return dl(y,x,b);var le=function(pn,An){return cl(y,pn instanceof ze?pn.ch:pn,An)},ue,ce=function(pn){return a.options.lineWrapping?(ue=ue||co(a,y),$i(a,y,ue,pn)):{begin:0,end:y.text.length}},be=ce(x.sticky=="before"?le(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var ke=re.level==1==b<0,Ye=le(x,ke?1:-1);if(Ye!=null&&(ke?Ye<=re.to&&Ye<=be.end:Ye>=re.from&&Ye>=be.begin)){var je=ke?"before":"after";return new ze(x.line,Ye,je)}}var bt=function(pn,An,vn){for(var Mn=function(ji,hr){return hr?new ze(x.line,le(ji,1),"before"):new ze(x.line,ji,"after")};pn>=0&&pn<E.length;pn+=An){var ti=E[pn],Yn=An>0==(ti.level!=1),bi=Yn?vn.begin:le(vn.end,-1);if(ti.from<=bi&&bi<ti.to||(bi=Yn?ti.from:le(ti.to,-1),vn.begin<=bi&&bi<vn.end))return Mn(bi,Yn)}},_t=bt(ee+b,b,be);if(_t)return _t;var tn=b>0?be.end:le(be.begin,-1);return tn!=null&&!(b>0&&tn==y.text.length)&&(_t=bt(b>0?0:E.length-1,b,ce(tn)),_t)?_t:null}var fa={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ie)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=ot(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:ze(y.head.line+1,0)}:{from:y.head,to:ze(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:ze(y.from().line,0),to:_e(a.doc,ze(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:ze(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Zo(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 Zo(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(ze(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(ze(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return ys(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bs(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Du(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")},at)},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")},at)},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/)?bs(a,y.head):b},at)},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 ee=x[E].from(),re=ge(a.getLine(ee.line),ee.ch,b);y.push(Dt(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return zr(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=ot(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new ze(E.line,E.ch-1)),E.ch>0)E=new ze(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),ze(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=ot(a.doc,E.line-1).text;re&&(E=new ze(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),ze(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Oi(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return zr(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);_o(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=ot(a.doc,y),b=At(x);return b!=x&&(y=Ae(b)),hl(!0,a,b,y,1)}function Du(a,y){var x=ot(a.doc,y),b=gn(x);return b!=x&&(y=Ae(b)),hl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=ot(a.doc,x.line),E=ln(b,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=ee&&y.ch;return ze(x.line,re?0:ee,x.sticky)}return x}function za(a,y,x){if(typeof y=="string"&&(y=fa[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)!=yt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Pu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Wo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Wo(y,a.options.extraKeys,x,a)||Wo(y,a.options.keyMap,x,a)}var Lu=new de;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Lu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xs(a,E+" "+y,x,b))return!0}return xs(a,y,x,b)}function xs(a,y,x,b){var E=Pu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Hi(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(Cn(x),qa(a)),!!E}function ws(a,y){var x=gs(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return za(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return za(a,b)}):pa(a,x,y,function(b){return za(a,b)}):!1}function Tu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return za(a,b,!0)})}var fl=null;function Cs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Fe(),!st(y,a))){ve&&me<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=ws(y,a);fe&&(fl=b?x:null,!b&&x==88&&!li&&(Se?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ne&&!Se&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Mu(y)}}function Mu(a){var y=a.display.lineDiv;it(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(lt(y,"CodeMirror-crosshair"),sn(document,"keyup",x),sn(document,"mouseover",x))}Ft(document,"keyup",x),Ft(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),st(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(tr(y.display,a)||st(y,a)||a.ctrlKey&&!a.altKey||Se&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fl){fl=null,Cn(a);return}if(!(fe&&(!a.which||a.which<10)&&ws(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Tu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=400,pl=function(a,y,x){this.time=a,this.pos=y,this.button=x};pl.prototype.compare=function(a,y,x){return this.time+Fu>a&&vt(y,this.pos)==0&&x==this.button};var va,ma;function _u(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 pl(x,a,y),va=null,"double"):(va=new pl(x,a,y),ma=null,"single")}function ks(a){var y=this,x=y.display;if(!(st(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,tr(x,a)){Re||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=Co(y,a),E=fi(a),ee=b?_u(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,ee,a))&&(E==1?b?Ou(y,b,ee,a):Ei(a)==x.scroller&&Cn(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Le?y.display.input.onContextMenu(a):Al(y)))}}}function Nu(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ms(ee,E),E,function(re){if(typeof re=="string"&&(re=fa[re]),!re)return!1;var le=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),le=re(a,x)!=yt}finally{a.state.suppressEdits=!1}return le})}function Iu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=Xe?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Se?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Se?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){ve?setTimeout(mn(kl,a),0):a.curOp.focus=Fe();var E=Iu(a,x,b),ee=a.doc.sel,re;a.options.dragDrop&&Ri&&!a.isReadOnly()&&x=="single"&&(re=ee.contains(y))>-1&&(vt((re=ee.ranges[re]).from(),y)<0||y.xRel>0)&&(vt(re.to(),y)>0||y.xRel<0)?Ru(a,b,y,E):zu(a,b,y,E)}function Ru(a,y,x,b){var E=a.display,ee=!1,re=cr(a,function(ce){Re&&(E.scroller.draggable=!1),a.state.draggingText=!1,sn(E.wrapper.ownerDocument,"mouseup",re),sn(E.wrapper.ownerDocument,"mousemove",le),sn(E.scroller,"dragstart",ue),sn(E.scroller,"drop",re),ee||(Cn(ce),b.addNew||Fa(a.doc,x,null,null,b.extend),Re&&!Ke||ve&&me==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),le=function(ce){ee=ee||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},ue=function(){return ee=!0};Re&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Ft(E.wrapper.ownerDocument,"mouseup",re),Ft(E.wrapper.ownerDocument,"mousemove",le),Ft(E.scroller,"dragstart",ue),Ft(E.scroller,"drop",re),Al(a),setTimeout(function(){return E.input.focus()},20)}function As(a,y,x){if(x=="char")return new Oi(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Oi(ze(y.line,0),_e(a.doc,ze(y.line+1,0)));var b=x(a,y);return new Oi(b.from,b.to)}function zu(a,y,x,b){var E=a.display,ee=a.doc;Cn(y);var re,le,ue=ee.sel,ce=ue.ranges;if(b.addNew&&!b.extend?(le=ee.sel.contains(x),le>-1?re=ce[le]:re=new Oi(x,x)):(re=ee.sel.primary(),le=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Oi(x,x)),x=Co(a,y,!0,!0),le=-1;else{var be=As(a,x,b.unit);b.extend?re=sl(re,be.anchor,be.head,b.extend):re=be}b.addNew?le==-1?(le=ce.length,xr(ee,Qr(a,ce.concat([re]),le),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[le].empty()&&b.unit=="char"&&!b.extend?(xr(ee,Qr(a,ce.slice(0,le).concat(ce.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=ee.sel):ul(ee,le,re,tt):(le=0,xr(ee,new jr([re],0),tt),ue=ee.sel);var ke=x;function Ye(vn){if(vt(ke,vn)!=0)if(ke=vn,b.unit=="rectangle"){for(var Mn=[],ti=a.options.tabSize,Yn=ge(ot(ee,x.line).text,x.ch,ti),bi=ge(ot(ee,vn.line).text,vn.ch,ti),ji=Math.min(Yn,bi),hr=Math.max(Yn,bi),qi=Math.min(x.line,vn.line),Hr=Math.min(a.lastLine(),Math.max(x.line,vn.line));qi<=Hr;qi++){var Pr=ot(ee,qi).text,nr=dn(Pr,ji,ti);ji==hr?Mn.push(new Oi(ze(qi,nr),ze(qi,nr))):Pr.length>nr&&Mn.push(new Oi(ze(qi,nr),ze(qi,dn(Pr,hr,ti))))}Mn.length||Mn.push(new Oi(x,x)),xr(ee,Qr(a,ue.ranges.slice(0,le).concat(Mn),le),{origin:"*mouse",scroll:!1}),a.scrollIntoView(vn)}else{var Lr=re,gr=As(a,vn,b.unit),ar=Lr.anchor,ir;vt(gr.anchor,ar)>0?(ir=gr.head,ar=zt(Lr.from(),gr.anchor)):(ir=gr.anchor,ar=nn(Lr.to(),gr.head));var Ji=ue.ranges.slice(0);Ji[le]=Hu(a,new Oi(_e(ee,ar),ir)),xr(ee,Qr(a,Ji,le),tt)}}var je=E.wrapper.getBoundingClientRect(),bt=0;function _t(vn){var Mn=++bt,ti=Co(a,vn,!0,b.unit=="rectangle");if(ti)if(vt(ti,ke)!=0){a.curOp.focus=Fe(),Ye(ti);var Yn=Ba(E,ee);(ti.line>=Yn.to||ti.line<Yn.from)&&setTimeout(cr(a,function(){bt==Mn&&_t(vn)}),150)}else{var bi=vn.clientY<je.top?-20:vn.clientY>je.bottom?20:0;bi&&setTimeout(cr(a,function(){bt==Mn&&(E.scroller.scrollTop+=bi,_t(vn))}),50)}}function tn(vn){a.state.selectingText=!1,bt=1/0,vn&&(Cn(vn),E.input.focus()),sn(E.wrapper.ownerDocument,"mousemove",pn),sn(E.wrapper.ownerDocument,"mouseup",An),ee.history.lastSelOrigin=null}var pn=cr(a,function(vn){vn.buttons===0||!fi(vn)?tn(vn):_t(vn)}),An=cr(a,tn);a.state.selectingText=An,Ft(E.wrapper.ownerDocument,"mousemove",pn),Ft(E.wrapper.ownerDocument,"mouseup",An)}function Hu(a,y){var x=y.anchor,b=y.head,E=ot(a.doc,x.line);if(vt(x,b)==0&&x.sticky==b.sticky)return y;var ee=ln(E);if(!ee)return y;var re=$t(ee,x.ch,x.sticky),le=ee[re];if(le.from!=x.ch&&le.to!=x.ch)return y;var ue=re+(le.from==x.ch==(le.level!=1)?0:1);if(ue==0||ue==ee.length)return y;var ce;if(b.line!=x.line)ce=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=$t(ee,b.ch,b.sticky),ke=be-re||(b.ch-x.ch)*(le.level==1?-1:1);be==ue-1||be==ue?ce=ke<0:ce=ke>0}var Ye=ee[ue+(ce?-1:0)],je=ce==(Ye.level==1),bt=je?Ye.from:Ye.to,_t=je?"after":"before";return x.ch==bt&&x.sticky==_t?y:new Oi(new ze(x.line,bt,_t),b)}function Bs(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(Ye){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&Cn(y);var re=a.display,le=re.lineDiv.getBoundingClientRect();if(ee>le.bottom||!Ot(a,x))return Rt(y);ee-=le.top-re.viewOffset;for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var ce=re.gutters.childNodes[ue];if(ce&&ce.getBoundingClientRect().right>=E){var be=De(a.doc,ee),ke=a.display.gutterSpecs[ue];return yn(a,x,a,be,ke.className,y),Rt(y)}}}function vl(a,y){return Bs(a,y,"gutterClick",!0)}function Ds(a,y){tr(a.display,y)||Wu(a,y)||st(a,y,"contextmenu")||Le||a.display.input.onContextMenu(y)}function Wu(a,y){return Ot(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function Ps(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 jo={toString:function(){return"CodeMirror.Init"}},Ls={},Ha={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,re){a.defaults[b]=E,ee&&(y[b]=re?function(le,ue,ce){ce!=jo&&ee(le,ue,ce)}:ee)}a.defineOption=x,a.Init=jo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,ol(b)},!0),x("indentUnit",2,ol,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ra(b),wo(b),Br(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],re=b.doc.first;b.doc.iter(function(ue){for(var ce=0;;){var be=ue.text.indexOf(E,ce);if(be==-1)break;ce=be+E.length,ee.push(ze(re,be))}re++});for(var le=ee.length-1;le>=0;le--)zo(b.doc,E,ee[le],ze(ee[le].line,ee[le].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=jo&&b.refresh()}),x("specialCharPlaceholder",Mr,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Ee?"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",!rt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Ps(b),ia(b)},!0),x("keyMap","default",function(b,E,ee){var re=Ra(E),le=ee!=jo&&Ra(ee);le&&le.detach&&le.detach(b,re),re.attach&&re.attach(b,le||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=il(E,b.options.lineNumbers),ia(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 No(b)},!0),x("scrollbarStyle","native",function(b){Ml(b),No(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=il(b.options.gutters,E),ia(b)},!0),x("firstLineNumber",1,ia,!0),x("lineNumberFormatter",function(b){return b},ia,!0),x("showCursorWhenSelecting",!1,Jo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Fo(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,ju),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Jo,!0),x("singleCursorHeightPerLine",!0,Jo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ra,!0),x("addModeClass",!1,ra,!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,ra,!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 ju(a,y,x){var b=x&&x!=jo;if(!y!=!b){var E=a.display.dragFunctions,ee=y?Ft:sn;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(it(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(lt(a.display.wrapper,"CodeMirror-wrap"),ci(a)),Ya(a),Br(a),wo(a),setTimeout(function(){return No(a)},100)}function Vi(a,y){var x=this;if(!(this instanceof Vi))return new Vi(a,y);this.options=y=y?Lt(y):{},Lt(Ls,y,!1);var b=y.value;typeof b=="string"?b=new Dr(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Vi.inputStyles[y.inputStyle](this),ee=this.display=new iu(a,b,E,y);ee.wrapper.CodeMirror=this,Ps(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ml(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 de,keySeq:null,specialChars:null},y.autofocus&&!Ee&&ee.input.focus(),ve&&me<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Ao(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Ee||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Xa(x)},20):Fo(this);for(var re in Ha)Ha.hasOwnProperty(re)&&Ha[re](this,y[re],jo);Nl(this),y.finishInit&&y.finishInit(this);for(var le=0;le<ml.length;++le)ml[le](this);Bo(this),Re&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Vi.defaults=Ls,Vi.optionHandlers=Ha;function Vu(a){var y=a.display;Ft(y.scroller,"mousedown",cr(a,ks)),ve&&me<11?Ft(y.scroller,"dblclick",cr(a,function(ue){if(!st(a,ue)){var ce=Co(a,ue);if(!(!ce||vl(a,ue)||tr(a.display,ue))){Cn(ue);var be=a.findWordAt(ce);Fa(a.doc,be.anchor,be.head)}}})):Ft(y.scroller,"dblclick",function(ue){return st(a,ue)||Cn(ue)}),Ft(y.scroller,"contextmenu",function(ue){return Ds(a,ue)}),Ft(y.input.getField(),"contextmenu",function(ue){y.scroller.contains(ue.target)||Ds(a,ue)});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 ee(ue){if(ue.touches.length!=1)return!1;var ce=ue.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function re(ue,ce){if(ce.left==null)return!0;var be=ce.left-ue.left,ke=ce.top-ue.top;return be*be+ke*ke>20*20}Ft(y.scroller,"touchstart",function(ue){if(!st(a,ue)&&!ee(ue)&&!vl(a,ue)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),Ft(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Ft(y.scroller,"touchend",function(ue){var ce=y.activeTouch;if(ce&&!tr(y,ue)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var be=a.coordsChar(y.activeTouch,"page"),ke;!ce.prev||re(ce,ce.prev)?ke=new Oi(be,be):!ce.prev.prev||re(ce,ce.prev.prev)?ke=a.findWordAt(be):ke=new Oi(ze(be.line,0),_e(a.doc,ze(be.line+1,0))),a.setSelection(ke.anchor,ke.head),a.focus(),Cn(ue)}E()}),Ft(y.scroller,"touchcancel",E),Ft(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),Eo(a,y.scroller.scrollLeft,!0),yn(a,"scroll",a))}),Ft(y.scroller,"mousewheel",function(ue){return Rl(a,ue)}),Ft(y.scroller,"DOMMouseScroll",function(ue){return Rl(a,ue)}),Ft(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){st(a,ue)||zn(ue)},over:function(ue){st(a,ue)||(wu(a,ue),zn(ue))},start:function(ue){return xu(a,ue)},drop:cr(a,bu),leave:function(ue){st(a,ue)||hs(a)}};var le=y.input.getField();Ft(le,"keyup",function(ue){return Ss.call(a,ue)}),Ft(le,"keydown",cr(a,Cs)),Ft(le,"keypress",cr(a,Es)),Ft(le,"focus",function(ue){return Xa(a,ue)}),Ft(le,"blur",function(ue){return Fo(a,ue)})}var ml=[];Vi.defineInitHook=function(a){return ml.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=_n(a,y).state:x="prev");var re=a.options.tabSize,le=ot(E,y),ue=ge(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ce=le.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(le.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(ee,le.text.slice(ce.length),le.text),be==yt||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=ge(ot(E,y-1).text,null,re):be=0:x=="add"?be=ue+a.options.indentUnit:x=="subtract"?be=ue-a.options.indentUnit:typeof x=="number"&&(be=ue+x),be=Math.max(0,be);var ke="",Ye=0;if(a.options.indentWithTabs)for(var je=Math.floor(be/re);je;--je)Ye+=re,ke+=" ";if(Ye<be&&(ke+=Dt(be-Ye)),ke!=ce)return zo(E,ke,ze(y,0),ze(y,ce.length),"+input"),le.stateAfter=null,!0;for(var bt=0;bt<E.sel.ranges.length;bt++){var _t=E.sel.ranges[bt];if(_t.head.line==y&&_t.head.ch<ce.length){var tn=ze(y,ce.length);ul(E,bt,new Oi(tn,tn));break}}}var $r=null;function Wa(a){$r=a}function gl(a,y,x,b,E){var ee=a.doc;a.display.shift=!1,b||(b=ee.sel);var re=+new Date-200,le=E=="paste"||a.state.pasteIncoming>re,ue=wi(y),ce=null;if(le&&b.ranges.length>1)if($r&&$r.text.join(`
`)==y){if(b.ranges.length%$r.text.length==0){ce=[];for(var be=0;be<$r.text.length;be++)ce.push(ee.splitLines($r.text[be]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=mt(ue,function(pn){return[pn]}));for(var ke=a.curOp.updateInput,Ye=b.ranges.length-1;Ye>=0;Ye--){var je=b.ranges[Ye],bt=je.from(),_t=je.to();je.empty()&&(x&&x>0?bt=ze(bt.line,bt.ch-x):a.state.overwrite&&!le?_t=ze(_t.line,Math.min(ot(ee,_t.line).text.length,_t.ch+We(ue).length)):le&&$r&&$r.lineWise&&$r.text.join(`
`)==ue.join(`
`)&&(bt=_t=ze(bt.line,0)));var tn={from:bt,to:_t,text:ce?ce[Ye%ce.length]:ue,origin:E||(le?"paste":a.state.cutIncoming>re?"cut":"+input")};Ro(a.doc,tn),Hi(a,"inputRead",a,tn)}y&&!le&&Ms(a,y),_o(a),a.curOp.updateInput<2&&(a.curOp.updateInput=ke),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ts(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&zr(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ms(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),re=!1;if(ee.electricChars){for(var le=0;le<ee.electricChars.length;le++)if(y.indexOf(ee.electricChars.charAt(le))>-1){re=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(ot(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Hi(a,"electricInput",a,E.head.line)}}}function Fs(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ee={anchor:ze(E,0),head:ze(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function _s(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ns(){var a=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ze("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Re?a.style.width="1000px":a.setAttribute("wrap","off"),He&&(a.style.border="1px solid black"),_s(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 ee=this.options,re=ee[b];ee[b]==E&&b!="mode"||(ee[b]=E,y.hasOwnProperty(b)&&cr(this,y[b])(this,E,re),yn(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"](Ra(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==b||E[ee].name==b)return E.splice(ee,1),!0},addOverlay:Cr(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");Et(this.state.overlays,{mode:ee,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Br(this)}),removeOverlay:Cr(function(b){for(var E=this.state.overlays,ee=0;ee<E.length;++ee){var re=E[ee].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(ee,1),this.state.modeGen++,Br(this);return}}}),indentLine:Cr(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Bt(this.doc,b)&&ga(this,b,E,ee)}),indentSelection:Cr(function(b){for(var E=this.doc.sel.ranges,ee=-1,re=0;re<E.length;re++){var le=E[re];if(le.empty())le.head.line>ee&&(ga(this,le.head.line,b,!0),ee=le.head.line,re==this.doc.sel.primIndex&&_o(this));else{var ue=le.from(),ce=le.to(),be=Math.max(ee,ue.line);ee=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var ke=be;ke<ee;++ke)ga(this,ke,b);var Ye=this.doc.sel.ranges;ue.ch==0&&E.length==Ye.length&&Ye[re].from().ch>0&&ul(this.doc,re,new Oi(ue,Ye[re].to()),Ie)}}}),getTokenAt:function(b,E){return cn(this,b,E)},getLineTokens:function(b,E){return cn(this,ze(b),E,!0)},getTokenTypeAt:function(b){b=_e(this.doc,b);var E=ut(this,ot(this.doc,b.line)),ee=0,re=(E.length-1)/2,le=b.ch,ue;if(le==0)ue=E[2];else for(;;){var ce=ee+re>>1;if((ce?E[ce*2-1]:0)>=le)re=ce;else if(E[ce*2+1]<le)ee=ce+1;else{ue=E[ce*2+2];break}}var be=ue?ue.indexOf("overlay "):-1;return be<0?ue:be==0?null:ue.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 ee=[];if(!x.hasOwnProperty(E))return ee;var re=x[E],le=this.getModeAt(b);if(typeof le[E]=="string")re[le[E]]&&ee.push(re[le[E]]);else if(le[E])for(var ue=0;ue<le[E].length;ue++){var ce=re[le[E][ue]];ce&&ee.push(ce)}else le.helperType&&re[le.helperType]?ee.push(re[le.helperType]):re[le.name]&&ee.push(re[le.name]);for(var be=0;be<re._global.length;be++){var ke=re._global[be];ke.pred(le,this)&&dt(ee,ke.val)==-1&&ee.push(ke.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=rn(ee,b==null?ee.first+ee.size-1:b),_n(this,b+1,E).state},cursorCoords:function(b,E){var ee,re=this.doc.sel.primary();return b==null?ee=re.head:typeof b=="object"?ee=_e(this.doc,b):ee=b?re.from():re.to(),Ar(this,ee,E||"page")},charCoords:function(b,E){return Mo(this,_e(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),mr(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,De(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ee){var re=!1,le;if(typeof b=="number"){var ue=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ue&&(b=ue,re=!0),le=ot(this.doc,b)}else le=b;return To(this,le,{top:0,left:0},E||"page",ee||re).top+(re?this.doc.height-si(le):0)},defaultTextHeight:function(){return Rr(this.display)},defaultCharWidth:function(){return Jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,re,le){var ue=this.display;b=Ar(this,_e(this.doc,b));var ce=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),re=="over")ce=b.top;else if(re=="above"||re=="near"){var ke=Math.max(ue.wrapper.clientHeight,this.doc.height),Ye=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>ke)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=ke&&(ce=b.bottom),be+E.offsetWidth>Ye&&(be=Ye-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",le=="right"?(be=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(le=="left"?be=0:le=="middle"&&(be=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),ee&&js(this,{left:be,top:ce,right:be+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:Cr(Cs),triggerOnKeyPress:Cr(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:Cr(ks),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:Cr(function(b){Ms(this,b)}),findPosH:function(b,E,ee,re){var le=1;E<0&&(le=-1,E=-E);for(var ue=_e(this.doc,b),ce=0;ce<E&&(ue=yl(this.doc,ue,le,ee,re),!ue.hitSide);++ce);return ue},moveH:Cr(function(b,E){var ee=this;this.extendSelectionsBy(function(re){return ee.display.shift||ee.doc.extend||re.empty()?yl(ee.doc,re.head,b,E,ee.options.rtlMoveVisually):b<0?re.from():re.to()},at)}),deleteH:Cr(function(b,E){var ee=this.doc.sel,re=this.doc;ee.somethingSelected()?re.replaceSelection("",null,"+delete"):Zo(this,function(le){var ue=yl(re,le.head,b,E,!1);return b<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(b,E,ee,re){var le=1,ue=re;E<0&&(le=-1,E=-E);for(var ce=_e(this.doc,b),be=0;be<E;++be){var ke=Ar(this,ce,"div");if(ue==null?ue=ke.left:ke.left=ue,ce=Is(this,ke,le,ee),ce.hitSide)break}return ce},moveV:Cr(function(b,E){var ee=this,re=this.doc,le=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(be){if(ue)return b<0?be.from():be.to();var ke=Ar(ee,be.head,"div");be.goalColumn!=null&&(ke.left=be.goalColumn),le.push(ke.left);var Ye=Is(ee,ke,b,E);return E=="page"&&be==re.sel.primary()&&Qa(ee,Mo(ee,Ye,"div").top-ke.top),Ye},at),le.length)for(var ce=0;ce<re.sel.ranges.length;ce++)re.sel.ranges[ce].goalColumn=le[ce]}),findWordAt:function(b){var E=this.doc,ee=ot(E,b.line).text,re=b.ch,le=b.ch;if(ee){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||le==ee.length)&&re?--re:++le;for(var ce=ee.charAt(re),be=se(ce,ue)?function(ke){return se(ke,ue)}:/\s/.test(ce)?function(ke){return/\s/.test(ke)}:function(ke){return!/\s/.test(ke)&&!se(ke)};re>0&&be(ee.charAt(re-1));)--re;for(;le<ee.length&&be(ee.charAt(le));)++le}return new Oi(ze(b.line,re),ze(b.line,le))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?it(this.display.cursorDiv,"CodeMirror-overwrite"):lt(this.display.cursorDiv,"CodeMirror-overwrite"),yn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Fe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Cr(function(b,E){Qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Ir(this)-this.display.barHeight,width:b.scrollWidth-Ir(this)-this.display.barWidth,clientHeight:ao(this),clientWidth:to(this)}},scrollIntoView:Cr(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:ze(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?Gs(this,b):Dl(this,b.from,b.to,b.margin)}),setSize:Cr(function(b,E){var ee=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ce=0;ce<ue.widgets.length;ce++)if(ue.widgets[ce].noHScroll){fo(ee,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,yn(this,"refresh",this)}),operation:function(b){return zr(this,b)},startOperation:function(){return Ao(this)},endOperation:function(){return Bo(this)},refresh:Cr(function(){var b=this.display.cachedTextHeight;Br(this),this.curOp.forceUpdate=!0,wo(this),Qo(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Rr(this.display))>.5||this.options.lineWrapping)&&Ya(this),yn(this,"refresh",this)}),swapDoc:Cr(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),wo(this),this.display.input.reset(),Qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Hi(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}},an(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,re){a.registerHelper(b,E,re),x[b]._global.push({pred:ee,val:re})}}function yl(a,y,x,b,E){var ee=y,re=x,le=ot(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function ce(){var An=y.line+ue;return An<a.first||An>=a.first+a.size?!1:(y=new ze(An,y.ch,y.sticky),le=ot(a,An))}function be(An){var vn;if(b=="codepoint"){var Mn=le.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Mn)?vn=null:vn=new ze(y.line,Math.max(0,Math.min(le.text.length,y.ch+x*(Mn>=55296&&Mn<56320?2:1))),-x)}else E?vn=Bu(a.cm,le,y,x):vn=dl(le,y,x);if(vn==null)if(!An&&ce())y=hl(E,a.cm,le,y.line,ue);else return!1;else y=vn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var ke=null,Ye=b=="group",je=a.cm&&a.cm.getHelper(y,"wordChars"),bt=!0;!(x<0&&!be(!bt));bt=!1){var _t=le.text.charAt(y.ch)||`
`,tn=se(_t,je)?"w":Ye&&_t==`
`?"n":!Ye||/\s/.test(_t)?null:"p";if(Ye&&!bt&&!tn&&(tn="s"),ke&&ke!=tn){x<0&&(x=1,be(),y.sticky="after");break}if(tn&&(ke=tn),x>0&&!be(!bt))break}var pn=Na(a,y,ee,re,!0);return Qt(ee,pn)&&(pn.hitSide=!0),pn}function Is(a,y,x,b){var E=a.doc,ee=y.left,re;if(b=="page"){var le=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*Rr(a.display),3);re=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var ce;ce=mr(a,ee,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Zi=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Zi.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;_s(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Ft(E,"paste",function(le){!ee(le)||st(b,le)||Ts(le,b)||me<=11&&setTimeout(cr(b,function(){return y.updateFromDOM()}),20)}),Ft(E,"compositionstart",function(le){y.composing={data:le.data,done:!1}}),Ft(E,"compositionupdate",function(le){y.composing||(y.composing={data:le.data,done:!1})}),Ft(E,"compositionend",function(le){y.composing&&(le.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Ft(E,"touchstart",function(){return x.forceCompositionEnd()}),Ft(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(le){if(!(!ee(le)||st(b,le))){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()}),le.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Fs(b);Wa({lineWise:!0,text:ue.text}),le.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,Ie),b.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ce=$r.text.join(`
`);if(le.clipboardData.setData("Text",ce),le.clipboardData.getData("Text")==ce){le.preventDefault();return}}var be=Ns(),ke=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),ke.value=$r.text.join(`
`);var Ye=document.activeElement;xt(ke),setTimeout(function(){b.display.lineSpace.removeChild(be),Ye.focus(),Ye==E&&x.showPrimarySelection()},50)}}Ft(E,"copy",re),Ft(E,"cut",re)},Zi.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Zi.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Zi.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Zi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Zi.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 ee=Za(y,a.anchorNode,a.anchorOffset),re=Za(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&re&&!re.bad&&vt(zt(ee,re),b)==0&&vt(nn(ee,re),E)==0)){var le=y.display.view,ue=b.line>=y.display.viewFrom&&Os(y,b)||{node:le[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Os(y,E);if(!ce){var be=le[le.length-1].measure,ke=be.maps?be.maps[be.maps.length-1]:be.map;ce={node:ke[ke.length-1],offset:ke[ke.length-2]-ke[ke.length-3]}}if(!ue||!ce){a.removeAllRanges();return}var Ye=a.rangeCount&&a.getRangeAt(0),je;try{je=Pe(ue.node,ue.offset,ce.offset,ce.node)}catch(bt){}je&&(!ne&&y.state.focused?(a.collapse(ue.node,ue.offset),je.collapsed||(a.removeAllRanges(),a.addRange(je))):(a.removeAllRanges(),a.addRange(je)),Ye&&a.anchorNode==null?a.addRange(Ye):ne&&this.startGracePeriod()),this.rememberSelection()}},Zi.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)},Zi.prototype.showMultipleSelections=function(a){Me(this.cm.display.cursorDiv,a.cursors),Me(this.cm.display.selectionDiv,a.selection)},Zi.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Zi.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Qe(this.div,y)},Zi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Zi.prototype.blur=function(){this.div.blur()},Zi.prototype.getField=function(){return this.div},Zi.prototype.supportsTouch=function(){return!0},Zi.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():zr(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)},Zi.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Zi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ce&&we&&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=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&zr(y,function(){xr(y.doc,vo(x,b),Ie),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Zi.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=ze(b.line-1,ot(a.doc,b.line-1).length)),E.ch==ot(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=ze(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,re,le;b.line==y.viewFrom||(ee=So(a,b.line))==0?(re=Ae(y.view[0].line),le=y.view[0].node):(re=Ae(y.view[ee].line),le=y.view[ee-1].node.nextSibling);var ue=So(a,E.line),ce,be;if(ue==y.view.length-1?(ce=y.viewTo-1,be=y.lineDiv.lastChild):(ce=Ae(y.view[ue+1].line)-1,be=y.view[ue+1].node.previousSibling),!le)return!1;for(var ke=a.doc.splitLines(Yu(a,le,be,re,ce)),Ye=un(a.doc,ze(re,0),ze(ce,ot(a.doc,ce).text.length));ke.length>1&&Ye.length>1;)if(We(ke)==We(Ye))ke.pop(),Ye.pop(),ce--;else if(ke[0]==Ye[0])ke.shift(),Ye.shift(),re++;else break;for(var je=0,bt=0,_t=ke[0],tn=Ye[0],pn=Math.min(_t.length,tn.length);je<pn&&_t.charCodeAt(je)==tn.charCodeAt(je);)++je;for(var An=We(ke),vn=We(Ye),Mn=Math.min(An.length-(ke.length==1?je:0),vn.length-(Ye.length==1?je:0));bt<Mn&&An.charCodeAt(An.length-bt-1)==vn.charCodeAt(vn.length-bt-1);)++bt;if(ke.length==1&&Ye.length==1&&re==b.line)for(;je&&je>b.ch&&An.charCodeAt(An.length-bt-1)==vn.charCodeAt(vn.length-bt-1);)je--,bt++;ke[ke.length-1]=An.slice(0,An.length-bt).replace(/^\u200b+/,""),ke[0]=ke[0].slice(je).replace(/\u200b+$/,"");var ti=ze(re,je),Yn=ze(ce,Ye.length?We(Ye).length-bt:0);if(ke.length>1||ke[0]||vt(ti,Yn))return zo(a.doc,ke,ti,Yn,"+input"),!0},Zi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zi.prototype.reset=function(){this.forceCompositionEnd()},Zi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zi.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))},Zi.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&zr(this.cm,function(){return Br(a.cm)})},Zi.prototype.setUneditable=function(a){a.contentEditable="false"},Zi.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||cr(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Zi.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Zi.prototype.onContextMenu=function(){},Zi.prototype.resetPosition=function(){},Zi.prototype.needsContentAttribute=!0;function Os(a,y){var x=no(a,y.line);if(!x||x.hidden)return null;var b=ot(a.doc,y.line),E=Lo(x,b,y.line),ee=ln(b,a.doc.direction),re="left";if(ee){var le=$t(ee,y.ch);re=le%2?"right":"left"}var ue=xa(E.map,y.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Go(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",re=!1,le=a.doc.lineSeparator(),ue=!1;function ce(je){return function(bt){return bt.id==je}}function be(){re&&(ee+=le,ue&&(ee+=le),re=ue=!1)}function ke(je){je&&(be(),ee+=je)}function Ye(je){if(je.nodeType==1){var bt=je.getAttribute("cm-text");if(bt){ke(bt);return}var _t=je.getAttribute("cm-marker"),tn;if(_t){var pn=a.findMarks(ze(b,0),ze(E+1,0),ce(+_t));pn.length&&(tn=pn[0].find(0))&&ke(un(a.doc,tn.from,tn.to).join(le));return}if(je.getAttribute("contenteditable")=="false")return;var An=/^(pre|div|p|li|table|br)$/i.test(je.nodeName);if(!/^br$/i.test(je.nodeName)&&je.textContent.length==0)return;An&&be();for(var vn=0;vn<je.childNodes.length;vn++)Ye(je.childNodes[vn]);/^(pre|p)$/i.test(je.nodeName)&&(ue=!0),An&&(re=!0)}else je.nodeType==3&&ke(je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ye(y),y!=x;)y=y.nextSibling,ue=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Go(a.clipPos(ze(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==b)return qu(ee,y,x)}}function qu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Qe(b,y))return Go(ze(Ae(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?We(a.rest):a.line;return Go(ze(Ae(ee),ee.text.length),E)}var re=y.nodeType==3?y:null,le=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));le.parentNode!=b;)le=le.parentNode;var ue=a.measure,ce=ue.maps;function be(tn,pn,An){for(var vn=-1;vn<(ce?ce.length:0);vn++)for(var Mn=vn<0?ue.map:ce[vn],ti=0;ti<Mn.length;ti+=3){var Yn=Mn[ti+2];if(Yn==tn||Yn==pn){var bi=Ae(vn<0?a.line:a.rest[vn]),ji=Mn[ti]+An;return(An<0||Yn!=tn)&&(ji=Mn[ti+(An?1:0)]),ze(bi,ji)}}}var ke=be(re,le,x);if(ke)return Go(ke,E);for(var Ye=le.nextSibling,je=re?re.nodeValue.length-x:0;Ye;Ye=Ye.nextSibling){if(ke=be(Ye,Ye.firstChild,0),ke)return Go(ze(ke.line,ke.ch-je),E);je+=Ye.textContent.length}for(var bt=le.previousSibling,_t=x;bt;bt=bt.previousSibling){if(ke=be(bt,bt.firstChild,-1),ke)return Go(ze(ke.line,ke.ch+_t),E);_t+=bt.textContent.length}}var er=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};er.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),He&&(E.style.width="0px"),Ft(E,"input",function(){ve&&me>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Ft(E,"paste",function(re){st(b,re)||Ts(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(re){if(!st(b,re)){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var le=Fs(b);Wa({lineWise:!0,text:le.text}),re.type=="cut"?b.setSelections(le.ranges,null,Ie):(x.prevInput="",E.value=le.text.join(`
`),xt(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}Ft(E,"cut",ee),Ft(E,"copy",ee),Ft(a.scroller,"paste",function(re){if(!(tr(a,re)||st(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,E.dispatchEvent(le)}}),Ft(a.lineSpace,"selectstart",function(re){tr(a,re)||Cn(re)}),Ft(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"})}}),Ft(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},er.prototype.createField=function(a){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},er.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},er.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=Ar(a,x.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-ee.left))}return b},er.prototype.showSelection=function(a){var y=this.cm,x=y.display;Me(x.cursorDiv,a.cursors),Me(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},er.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&&xt(this.textarea),ve&&me>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",ve&&me>=9&&(this.hasSelection=null))}},er.prototype.getField=function(){return this.textarea},er.prototype.supportsTouch=function(){return!1},er.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ee||Fe()!=this.textarea))try{this.textarea.focus()}catch(a){}},er.prototype.blur=function(){this.textarea.blur()},er.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},er.prototype.receivedFocus=function(){this.slowPoll()},er.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},er.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)},er.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Di(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(ve&&me>=9&&this.hasSelection===E||Se&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(b.length,E.length);re<le&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return zr(y,function(){gl(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},er.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},er.prototype.onKeyPress=function(){ve&&me>=9&&(this.hasSelection=null),this.fastPoll()},er.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=Co(x,a),re=b.scroller.scrollTop;if(!ee||fe)return;var le=x.options.resetSelectionOnContextMenu;le&&x.doc.sel.contains(ee)==-1&&cr(x,xr)(x.doc,vo(ee),Ie);var ue=E.style.cssText,ce=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: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ke;Re&&(ke=window.scrollY),b.input.focus(),Re&&window.scrollTo(null,ke),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=je,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Ye(){if(E.selectionStart!=null){var _t=x.somethingSelected(),tn="\u200B"+(_t?E.value:"");E.value="\u21DA",E.value=tn,y.prevInput=_t?"":"\u200B",E.selectionStart=1,E.selectionEnd=tn.length,b.selForContextMenu=x.doc.sel}}function je(){if(y.contextMenuPending==je&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=ue,ve&&me<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!ve||ve&&me<9)&&Ye();var _t=0,tn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?cr(x,ts)(x):_t++<10?b.detectingSelectAll=setTimeout(tn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(tn,200)}}if(ve&&me>=9&&Ye(),Le){zn(a);var bt=function(){sn(window,"mouseup",bt),setTimeout(je,20)};Ft(window,"mouseup",bt)}else setTimeout(je,50)},er.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},er.prototype.setUneditable=function(){},er.prototype.needsContentAttribute=!1;function Xu(a,y){if(y=y?Lt(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=Fe();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=le.getValue()}var E;if(a.form&&(Ft(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var re=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=re}}catch(ue){}}y.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return a},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),a.parentNode.removeChild(ue.getWrapperElement()),a.style.display="",a.form&&(sn(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var le=Vi(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return le}function Ju(a){a.off=sn,a.on=Ft,a.wheelEventPixels=ru,a.Doc=Dr,a.splitLines=wi,a.countColumn=ge,a.findColumn=dn,a.isWordChar=oe,a.Pass=yt,a.signal=yn,a.Line=Si,a.changeEnd=mo,a.scrollbarModel=Tl,a.Pos=ze,a.cmpPos=vt,a.modes=_i,a.mimeModes=bn,a.resolveMode=Pn,a.getMode=mi,a.modeExtensions=yi,a.extendMode=Pi,a.copyState=hi,a.startState=ki,a.innerMode=oi,a.commands=fa,a.keyMap=so,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wo,a.normalizeKeyMap=Au,a.StringStream=Zt,a.SharedTextMarker=ca,a.TextMarker=yo,a.LineWidget=ua,a.e_preventDefault=Cn,a.e_stopPropagation=$n,a.e_stop=zn,a.addClass=it,a.contains=Qe,a.rmClass=lt,a.keyNames=bo}Zu(Vi),Uu(Vi);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Dr.prototype)Dr.prototype.hasOwnProperty(ja)&&dt(Qu,ja)<0&&(Vi.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Dr.prototype[ja]));return an(Dr),Vi.inputStyles={textarea:er,contenteditable:Zi},Vi.defineMode=function(a){!Vi.defaults.mode&&a!="null"&&(Vi.defaults.mode=a),Dn.apply(this,arguments)},Vi.defineMIME=Kn,Vi.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Vi.defineMIME("text/plain","null"),Vi.defineExtension=function(a,y){Vi.prototype[a]=y},Vi.defineDocExtension=function(a,y){Dr.prototype[a]=y},Vi.fromTextArea=Xu,Ju(Vi),Vi.version="5.58.2",Vi})},25419:function(It,Wt,he){(function(ne){ne(he(89780),he(15525),he(98101))})(function(ne){"use strict";ne.defineMode("markdown",function(Ue,Ne){var qe=ne.getMode(Ue,"text/html"),ve=qe.name=="null";function me(ge){if(ne.findModeByName){var de=ne.findModeByName(ge);de&&(ge=de.mime||de.mimes[0])}var dt=ne.getMode(Ue,ge);return dt.name=="null"?null:dt}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 Re={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 Ge in Re)Re.hasOwnProperty(Ge)&&Ne.tokenTypeOverrides[Ge]&&(Re[Ge]=Ne.tokenTypeOverrides[Ge]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ke=/^\[(x| )\](?=\s)/i,pe=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,et=/^ {0,3}(?:\={1,}|-{2,})\s*$/,He=/^[^#!\[\]*_\\<>` "'(~:]+/,Ce=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ee=/^\s*\[[^\]]+?\]:.*$/,Se=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Xe=" ";function rt(ge,de,dt){return de.f=de.inline=dt,dt(ge,de)}function Je(ge,de,dt){return de.f=de.block=dt,dt(ge,de)}function $e(ge){return!ge||!/\S/.test(ge.string)}function Le(ge){if(ge.linkTitle=!1,ge.linkHref=!1,ge.linkText=!1,ge.em=!1,ge.strong=!1,ge.strikethrough=!1,ge.quote=0,ge.indentedCode=!1,ge.f==lt){var de=ve;if(!de){var dt=ne.innerMode(qe,ge.htmlState);de=dt.mode.name=="xml"&&dt.state.tagStart===null&&!dt.state.context&&dt.state.tokenize.isInText}de&&(ge.f=nt,ge.block=ct,ge.htmlState=null)}return ge.trailingSpace=0,ge.trailingSpaceNewLine=!1,ge.prevLine=ge.thisLine,ge.thisLine={stream:null},null}function ct(ge,de){var dt=ge.column()===de.indentation,Jt=$e(de.prevLine.stream),yt=de.indentedCode,Ie=de.prevLine.hr,tt=de.list!==!1,at=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var dn=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,tt)){for(de.list=null;dn<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=dn-de.listStack[de.listStack.length-1])}var ht=!Jt&&!Ie&&!de.prevLine.header&&(!tt||!yt)&&!de.prevLine.fencedCodeEnd,Dt=(de.list===!1||Ie||Jt)&&de.indentation<=at&&ge.match(we),We=null;if(de.indentationDiff>=4&&(yt||de.prevLine.fencedCodeEnd||de.prevLine.header||Jt))return ge.skipToEnd(),de.indentedCode=!0,Re.code;if(ge.eatSpace())return null;if(dt&&de.indentation<=at&&(We=ge.match(pe))&&We[1].length<=6)return de.quote=0,de.header=We[1].length,de.thisLine.header=!0,Ne.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Me(de);if(de.indentation<=at&&ge.eat(">"))return de.quote=dt?1:de.quote+1,Ne.highlightFormatting&&(de.formatting="quote"),ge.eatSpace(),Me(de);if(!Dt&&!de.setext&&dt&&de.indentation<=at&&(We=ge.match(fe))){var mt=We[1]?"ol":"ul";return de.indentation=dn+ge.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,Ne.taskLists&&ge.match(Ke,!1)&&(de.taskList=!0),de.f=de.inline,Ne.highlightFormatting&&(de.formatting=["list","list-"+mt]),Me(de)}else{if(dt&&de.indentation<=at&&(We=ge.match(Ce,!0)))return de.quote=0,de.fencedEndRE=new RegExp(We[1]+"+ *$"),de.localMode=Ne.fencedCodeBlockHighlighting&&me(We[2]||Ne.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=ne.startState(de.localMode)),de.f=de.block=Ut,Ne.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Me(de);if(de.setext||(!ht||!tt)&&!de.quote&&de.list===!1&&!de.code&&!Dt&&!Ee.test(ge.string)&&(We=ge.lookAhead(1))&&(We=We.match(et)))return de.setext?(de.header=de.setext,de.setext=0,ge.skipToEnd(),Ne.highlightFormatting&&(de.formatting="header")):(de.header=We[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Me(de);if(Dt)return ge.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,Re.hr;if(ge.peek()==="[")return rt(ge,de,Kt)}return rt(ge,de,de.inline)}function lt(ge,de){var dt=qe.token(ge,de.htmlState);if(!ve){var Jt=ne.innerMode(qe,de.htmlState);(Jt.mode.name=="xml"&&Jt.state.tagStart===null&&!Jt.state.context&&Jt.state.tokenize.isInText||de.md_inside&&ge.current().indexOf(">")>-1)&&(de.f=nt,de.block=ct,de.htmlState=null)}return dt}function Ut(ge,de){var dt=de.listStack[de.listStack.length-1]||0,Jt=de.indentation<dt,yt=dt+3;if(de.fencedEndRE&&de.indentation<=yt&&(Jt||ge.match(de.fencedEndRE))){Ne.highlightFormatting&&(de.formatting="code-block");var Ie;return Jt||(Ie=Me(de)),de.localMode=de.localState=null,de.block=ct,de.f=nt,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,Jt?Je(ge,de,de.block):Ie}else return de.localMode?de.localMode.token(ge,de.localState):(ge.skipToEnd(),Re.code)}function Me(ge){var de=[];if(ge.formatting){de.push(Re.formatting),typeof ge.formatting=="string"&&(ge.formatting=[ge.formatting]);for(var dt=0;dt<ge.formatting.length;dt++)de.push(Re.formatting+"-"+ge.formatting[dt]),ge.formatting[dt]==="header"&&de.push(Re.formatting+"-"+ge.formatting[dt]+"-"+ge.header),ge.formatting[dt]==="quote"&&(!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=ge.quote?de.push(Re.formatting+"-"+ge.formatting[dt]+"-"+ge.quote):de.push("error"))}if(ge.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(ge.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(ge.linkHref?de.push(Re.linkHref,"url"):(ge.strong&&de.push(Re.strong),ge.em&&de.push(Re.em),ge.strikethrough&&de.push(Re.strikethrough),ge.emoji&&de.push(Re.emoji),ge.linkText&&de.push(Re.linkText),ge.code&&de.push(Re.code),ge.image&&de.push(Re.image),ge.imageAltText&&de.push(Re.imageAltText,"link"),ge.imageMarker&&de.push(Re.imageMarker)),ge.header&&de.push(Re.header,Re.header+"-"+ge.header),ge.quote&&(de.push(Re.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=ge.quote?de.push(Re.quote+"-"+ge.quote):de.push(Re.quote+"-"+Ne.maxBlockquoteDepth)),ge.list!==!1){var Jt=(ge.listStack.length-1)%3;Jt?Jt===1?de.push(Re.list2):de.push(Re.list3):de.push(Re.list1)}return ge.trailingSpaceNewLine?de.push("trailing-space-new-line"):ge.trailingSpace&&de.push("trailing-space-"+(ge.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function Ze(ge,de){if(ge.match(He,!0))return Me(de)}function nt(ge,de){var dt=de.text(ge,de);if(typeof dt!="undefined")return dt;if(de.list)return de.list=null,Me(de);if(de.taskList){var Jt=ge.match(Ke,!0)[1]===" ";return Jt?de.taskOpen=!0:de.taskClosed=!0,Ne.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Me(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&ge.match(/^#+$/,!0))return Ne.highlightFormatting&&(de.formatting="header"),Me(de);var yt=ge.next();if(de.linkTitle){de.linkTitle=!1;var Ie=yt;yt==="("&&(Ie=")"),Ie=(Ie+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var tt="^\\s*(?:[^"+Ie+"\\\\]+|\\\\\\\\|\\\\.)"+Ie;if(ge.match(new RegExp(tt),!0))return Re.linkHref}if(yt==="`"){var at=de.formatting;Ne.highlightFormatting&&(de.formatting="code"),ge.eatWhile("`");var dn=ge.current().length;if(de.code==0&&(!de.quote||dn==1))return de.code=dn,Me(de);if(dn==de.code){var ht=Me(de);return de.code=0,ht}else return de.formatting=at,Me(de)}else if(de.code)return Me(de);if(yt==="\\"&&(ge.next(),Ne.highlightFormatting)){var Dt=Me(de),We=Re.formatting+"-escape";return Dt?Dt+" "+We:We}if(yt==="!"&&ge.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,Ne.highlightFormatting&&(de.formatting="image"),Me(de);if(yt==="["&&de.imageMarker&&ge.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,Ne.highlightFormatting&&(de.formatting="image"),Me(de);if(yt==="]"&&de.imageAltText){Ne.highlightFormatting&&(de.formatting="image");var Dt=Me(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=Qe,Dt}if(yt==="["&&!de.image)return de.linkText&&ge.match(/^.*?\]/)||(de.linkText=!0,Ne.highlightFormatting&&(de.formatting="link")),Me(de);if(yt==="]"&&de.linkText){Ne.highlightFormatting&&(de.formatting="link");var Dt=Me(de);return de.linkText=!1,de.inline=de.f=ge.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:nt,Dt}if(yt==="<"&&ge.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Pe,Ne.highlightFormatting&&(de.formatting="link");var Dt=Me(de);return Dt?Dt+=" ":Dt="",Dt+Re.linkInline}if(yt==="<"&&ge.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Pe,Ne.highlightFormatting&&(de.formatting="link");var Dt=Me(de);return Dt?Dt+=" ":Dt="",Dt+Re.linkEmail}if(Ne.xml&&yt==="<"&&ge.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var mt=ge.string.indexOf(">",ge.pos);if(mt!=-1){var Et=ge.string.substring(ge.start,mt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Et)&&(de.md_inside=!0)}return ge.backUp(1),de.htmlState=ne.startState(qe),Je(ge,de,lt)}if(Ne.xml&&yt==="<"&&ge.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(yt==="*"||yt==="_"){for(var ae=1,te=ge.pos==1?" ":ge.string.charAt(ge.pos-2);ae<3&&ge.eat(yt);)ae++;var z=ge.peek()||" ",oe=!/\s/.test(z)&&(!Se.test(z)||/\s/.test(te)||Se.test(te)),se=!/\s/.test(te)&&(!Se.test(te)||/\s/.test(z)||Se.test(z)),ie=null,xe=null;if(ae%2&&(!de.em&&oe&&(yt==="*"||!se||Se.test(te))?ie=!0:de.em==yt&&se&&(yt==="*"||!oe||Se.test(z))&&(ie=!1)),ae>1&&(!de.strong&&oe&&(yt==="*"||!se||Se.test(te))?xe=!0:de.strong==yt&&se&&(yt==="*"||!oe||Se.test(z))&&(xe=!1)),xe!=null||ie!=null){Ne.highlightFormatting&&(de.formatting=ie==null?"strong":xe==null?"em":"strong em"),ie===!0&&(de.em=yt),xe===!0&&(de.strong=yt);var ht=Me(de);return ie===!1&&(de.em=!1),xe===!1&&(de.strong=!1),ht}}else if(yt===" "&&(ge.eat("*")||ge.eat("_"))){if(ge.peek()===" ")return Me(de);ge.backUp(1)}if(Ne.strikethrough){if(yt==="~"&&ge.eatWhile(yt)){if(de.strikethrough){Ne.highlightFormatting&&(de.formatting="strikethrough");var ht=Me(de);return de.strikethrough=!1,ht}else if(ge.match(/^[^\s]/,!1))return de.strikethrough=!0,Ne.highlightFormatting&&(de.formatting="strikethrough"),Me(de)}else if(yt===" "&&ge.match(/^~~/,!0)){if(ge.peek()===" ")return Me(de);ge.backUp(2)}}if(Ne.emoji&&yt===":"&&ge.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,Ne.highlightFormatting&&(de.formatting="emoji");var Ve=Me(de);return de.emoji=!1,Ve}return yt===" "&&(ge.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Me(de)}function Pe(ge,de){var dt=ge.next();if(dt===">"){de.f=de.inline=nt,Ne.highlightFormatting&&(de.formatting="link");var Jt=Me(de);return Jt?Jt+=" ":Jt="",Jt+Re.linkInline}return ge.match(/^[^>]+/,!0),Re.linkInline}function Qe(ge,de){if(ge.eatSpace())return null;var dt=ge.next();return dt==="("||dt==="["?(de.f=de.inline=it(dt==="("?")":"]"),Ne.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Me(de)):"error"}var Fe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function it(ge){return function(de,dt){var Jt=de.next();if(Jt===ge){dt.f=dt.inline=nt,Ne.highlightFormatting&&(dt.formatting="link-string");var yt=Me(dt);return dt.linkHref=!1,yt}return de.match(Fe[ge]),dt.linkHref=!0,Me(dt)}}function Kt(ge,de){return ge.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=xt,ge.next(),Ne.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Me(de)):rt(ge,de,nt)}function xt(ge,de){if(ge.match(/^\]:/,!0)){de.f=de.inline=mn,Ne.highlightFormatting&&(de.formatting="link");var dt=Me(de);return de.linkText=!1,dt}return ge.match(/^([^\]\\]|\\.)+/,!0),Re.linkText}function mn(ge,de){return ge.eatSpace()?null:(ge.match(/^[^\s]+/,!0),ge.peek()===void 0?de.linkTitle=!0:ge.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=nt,Re.linkHref+" url")}var Lt={startState:function(){return{f:ct,prevLine:{stream:null},thisLine:{stream:null},block:ct,htmlState:null,indentation:0,inline:nt,text:Ze,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(ge){return{f:ge.f,prevLine:ge.prevLine,thisLine:ge.thisLine,block:ge.block,htmlState:ge.htmlState&&ne.copyState(qe,ge.htmlState),indentation:ge.indentation,localMode:ge.localMode,localState:ge.localMode?ne.copyState(ge.localMode,ge.localState):null,inline:ge.inline,text:ge.text,formatting:!1,linkText:ge.linkText,linkTitle:ge.linkTitle,linkHref:ge.linkHref,code:ge.code,em:ge.em,strong:ge.strong,strikethrough:ge.strikethrough,emoji:ge.emoji,header:ge.header,setext:ge.setext,hr:ge.hr,taskList:ge.taskList,list:ge.list,listStack:ge.listStack.slice(0),quote:ge.quote,indentedCode:ge.indentedCode,trailingSpace:ge.trailingSpace,trailingSpaceNewLine:ge.trailingSpaceNewLine,md_inside:ge.md_inside,fencedEndRE:ge.fencedEndRE}},token:function(ge,de){if(de.formatting=!1,ge!=de.thisLine.stream){if(de.header=0,de.hr=!1,ge.match(/^\s*$/,!0))return Le(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:ge},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=lt)){var dt=ge.match(/^\s*/,!0)[0].replace(/\t/g,Xe).length;if(de.indentation=dt,de.indentationDiff=null,dt>0)return null}}return de.f(ge,de)},innerMode:function(ge){return ge.block==lt?{state:ge.htmlState,mode:qe}:ge.localState?{state:ge.localState,mode:ge.localMode}:{state:ge,mode:Lt}},indent:function(ge,de,dt){return ge.block==lt&&qe.indent?qe.indent(ge.htmlState,de,dt):ge.localState&&ge.localMode.indent?ge.localMode.indent(ge.localState,de,dt):ne.Pass},blankLine:Le,getType:Me,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Lt},"xml"),ne.defineMIME("text/markdown","markdown"),ne.defineMIME("text/x-markdown","markdown")})},98101:function(It,Wt,he){(function(ne){ne(he(89780))})(function(ne){"use strict";ne.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 Ue=0;Ue<ne.modeInfo.length;Ue++){var Ne=ne.modeInfo[Ue];Ne.mimes&&(Ne.mime=Ne.mimes[0])}ne.findModeByMIME=function(qe){qe=qe.toLowerCase();for(var ve=0;ve<ne.modeInfo.length;ve++){var me=ne.modeInfo[ve];if(me.mime==qe)return me;if(me.mimes){for(var Re=0;Re<me.mimes.length;Re++)if(me.mimes[Re]==qe)return me}}if(/\+xml$/.test(qe))return ne.findModeByMIME("application/xml");if(/\+json$/.test(qe))return ne.findModeByMIME("application/json")},ne.findModeByExtension=function(qe){qe=qe.toLowerCase();for(var ve=0;ve<ne.modeInfo.length;ve++){var me=ne.modeInfo[ve];if(me.ext){for(var Re=0;Re<me.ext.length;Re++)if(me.ext[Re]==qe)return me}}},ne.findModeByFileName=function(qe){for(var ve=0;ve<ne.modeInfo.length;ve++){var me=ne.modeInfo[ve];if(me.file&&me.file.test(qe))return me}var Re=qe.lastIndexOf("."),Ge=Re>-1&&qe.substring(Re+1,qe.length);if(Ge)return ne.findModeByExtension(Ge)},ne.findModeByName=function(qe){qe=qe.toLowerCase();for(var ve=0;ve<ne.modeInfo.length;ve++){var me=ne.modeInfo[ve];if(me.name.toLowerCase()==qe)return me;if(me.alias){for(var Re=0;Re<me.alias.length;Re++)if(me.alias[Re].toLowerCase()==qe)return me}}}})},67549:function(It,Wt,he){(function(ne){ne(he(89780))})(function(ne){"use strict";ne.defineMode("stex",function(Ue,Ne){"use strict";function qe(He,Ce){He.cmdState.push(Ce)}function ve(He){return He.cmdState.length>0?He.cmdState[He.cmdState.length-1]:null}function me(He){var Ce=He.cmdState.pop();Ce&&Ce.closeBracket()}function Re(He){for(var Ce=He.cmdState,Ee=Ce.length-1;Ee>=0;Ee--){var Se=Ce[Ee];if(Se.name!="DEFAULT")return Se}return{styleIdentifier:function(){return null}}}function Ge(He,Ce,Ee){return function(){this.name=He,this.bracketNo=0,this.style=Ce,this.styles=Ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=Ge("importmodule","tag",["string","builtin"]),we.documentclass=Ge("documentclass","tag",["","atom"]),we.usepackage=Ge("usepackage","tag",["atom"]),we.begin=Ge("begin","tag",["atom"]),we.end=Ge("end","tag",["atom"]),we.label=Ge("label","tag",["atom"]),we.ref=Ge("ref","tag",["atom"]),we.eqref=Ge("eqref","tag",["atom"]),we.cite=Ge("cite","tag",["atom"]),we.bibitem=Ge("bibitem","tag",["atom"]),we.Bibitem=Ge("Bibitem","tag",["atom"]),we.RBibitem=Ge("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(He,Ce){He.f=Ce}function Ke(He,Ce){var Ee;if(He.match(/^\\[a-zA-Z@]+/)){var Se=He.current().slice(1);return Ee=we.hasOwnProperty(Se)?we[Se]:we.DEFAULT,Ee=new Ee,qe(Ce,Ee),fe(Ce,et),Ee.style}if(He.match(/^\\[$&%#{}_]/)||He.match(/^\\[,;!\/\\]/))return"tag";if(He.match("\\["))return fe(Ce,function(rt,Je){return pe(rt,Je,"\\]")}),"keyword";if(He.match("\\("))return fe(Ce,function(rt,Je){return pe(rt,Je,"\\)")}),"keyword";if(He.match("$$"))return fe(Ce,function(rt,Je){return pe(rt,Je,"$$")}),"keyword";if(He.match("$"))return fe(Ce,function(rt,Je){return pe(rt,Je,"$")}),"keyword";var Xe=He.next();if(Xe=="%")return He.skipToEnd(),"comment";if(Xe=="}"||Xe=="]"){if(Ee=ve(Ce),Ee)Ee.closeBracket(Xe),fe(Ce,et);else return"error";return"bracket"}else return Xe=="{"||Xe=="["?(Ee=we.DEFAULT,Ee=new Ee,qe(Ce,Ee),"bracket"):/\d/.test(Xe)?(He.eatWhile(/[\w.%]/),"atom"):(He.eatWhile(/[\w\-_]/),Ee=Re(Ce),Ee.name=="begin"&&(Ee.argument=He.current()),Ee.styleIdentifier())}function pe(He,Ce,Ee){if(He.eatSpace())return null;if(Ee&&He.match(Ee))return fe(Ce,Ke),"keyword";if(He.match(/^\\[a-zA-Z@]+/))return"tag";if(He.match(/^[a-zA-Z]+/))return"variable-2";if(He.match(/^\\[$&%#{}_]/)||He.match(/^\\[,;!\/]/)||He.match(/^[\^_&]/))return"tag";if(He.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(He.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Se=He.next();return Se=="{"||Se=="}"||Se=="["||Se=="]"||Se=="("||Se==")"?"bracket":Se=="%"?(He.skipToEnd(),"comment"):"error"}function et(He,Ce){var Ee=He.peek(),Se;return Ee=="{"||Ee=="["?(Se=ve(Ce),Se.openBracket(Ee),He.eat(Ee),fe(Ce,Ke),"bracket"):/[ \t\r]/.test(Ee)?(He.eat(Ee),null):(fe(Ce,Ke),me(Ce),Ke(He,Ce))}return{startState:function(){var He=Ne.inMathMode?function(Ce,Ee){return pe(Ce,Ee)}:Ke;return{cmdState:[],f:He}},copyState:function(He){return{cmdState:He.cmdState.slice(),f:He.f}},token:function(He,Ce){return Ce.f(He,Ce)},blankLine:function(He){He.f=Ke,He.cmdState.length=0},lineComment:"%"}}),ne.defineMIME("text/x-stex","stex"),ne.defineMIME("text/x-latex","stex")})},15525:function(It,Wt,he){(function(ne){ne(he(89780))})(function(ne){"use strict";var Ue={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};ne.defineMode("xml",function(qe,ve){var me=qe.indentUnit,Re={},Ge=ve.htmlMode?Ue:Ne;for(var we in Ge)Re[we]=Ge[we];for(var we in ve)Re[we]=ve[we];var fe,Ke;function pe(Pe,Qe){function Fe(xt){return Qe.tokenize=xt,xt(Pe,Qe)}var it=Pe.next();if(it=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Fe(Ce("atom","]]>")):null:Pe.match("--")?Fe(Ce("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Fe(Ee(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),Qe.tokenize=Ce("meta","?>"),"meta"):(fe=Pe.eat("/")?"closeTag":"openTag",Qe.tokenize=et,"tag bracket");if(it=="&"){var Kt;return Pe.eat("#")?Pe.eat("x")?Kt=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):Kt=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):Kt=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),Kt?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}pe.isInText=!0;function et(Pe,Qe){var Fe=Pe.next();if(Fe==">"||Fe=="/"&&Pe.eat(">"))return Qe.tokenize=pe,fe=Fe==">"?"endTag":"selfcloseTag","tag bracket";if(Fe=="=")return fe="equals",null;if(Fe=="<"){Qe.tokenize=pe,Qe.state=Je,Qe.tagName=Qe.tagStart=null;var it=Qe.tokenize(Pe,Qe);return it?it+" tag error":"tag error"}else return/[\'\"]/.test(Fe)?(Qe.tokenize=He(Fe),Qe.stringStartCol=Pe.column(),Qe.tokenize(Pe,Qe)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function He(Pe){var Qe=function(Fe,it){for(;!Fe.eol();)if(Fe.next()==Pe){it.tokenize=et;break}return"string"};return Qe.isInAttribute=!0,Qe}function Ce(Pe,Qe){return function(Fe,it){for(;!Fe.eol();){if(Fe.match(Qe)){it.tokenize=pe;break}Fe.next()}return Pe}}function Ee(Pe){return function(Qe,Fe){for(var it;(it=Qe.next())!=null;){if(it=="<")return Fe.tokenize=Ee(Pe+1),Fe.tokenize(Qe,Fe);if(it==">")if(Pe==1){Fe.tokenize=pe;break}else return Fe.tokenize=Ee(Pe-1),Fe.tokenize(Qe,Fe)}return"meta"}}function Se(Pe,Qe,Fe){this.prev=Pe.context,this.tagName=Qe,this.indent=Pe.indented,this.startOfLine=Fe,(Re.doNotIndent.hasOwnProperty(Qe)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function Xe(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function rt(Pe,Qe){for(var Fe;;){if(!Pe.context||(Fe=Pe.context.tagName,!Re.contextGrabbers.hasOwnProperty(Fe)||!Re.contextGrabbers[Fe].hasOwnProperty(Qe)))return;Xe(Pe)}}function Je(Pe,Qe,Fe){return Pe=="openTag"?(Fe.tagStart=Qe.column(),$e):Pe=="closeTag"?Le:Je}function $e(Pe,Qe,Fe){return Pe=="word"?(Fe.tagName=Qe.current(),Ke="tag",Ut):Re.allowMissingTagName&&Pe=="endTag"?(Ke="tag bracket",Ut(Pe,Qe,Fe)):(Ke="error",$e)}function Le(Pe,Qe,Fe){if(Pe=="word"){var it=Qe.current();return Fe.context&&Fe.context.tagName!=it&&Re.implicitlyClosed.hasOwnProperty(Fe.context.tagName)&&Xe(Fe),Fe.context&&Fe.context.tagName==it||Re.matchClosing===!1?(Ke="tag",ct):(Ke="tag error",lt)}else return Re.allowMissingTagName&&Pe=="endTag"?(Ke="tag bracket",ct(Pe,Qe,Fe)):(Ke="error",lt)}function ct(Pe,Qe,Fe){return Pe!="endTag"?(Ke="error",ct):(Xe(Fe),Je)}function lt(Pe,Qe,Fe){return Ke="error",ct(Pe,Qe,Fe)}function Ut(Pe,Qe,Fe){if(Pe=="word")return Ke="attribute",Me;if(Pe=="endTag"||Pe=="selfcloseTag"){var it=Fe.tagName,Kt=Fe.tagStart;return Fe.tagName=Fe.tagStart=null,Pe=="selfcloseTag"||Re.autoSelfClosers.hasOwnProperty(it)?rt(Fe,it):(rt(Fe,it),Fe.context=new Se(Fe,it,Kt==Fe.indented)),Je}return Ke="error",Ut}function Me(Pe,Qe,Fe){return Pe=="equals"?Ze:(Re.allowMissing||(Ke="error"),Ut(Pe,Qe,Fe))}function Ze(Pe,Qe,Fe){return Pe=="string"?nt:Pe=="word"&&Re.allowUnquoted?(Ke="string",Ut):(Ke="error",Ut(Pe,Qe,Fe))}function nt(Pe,Qe,Fe){return Pe=="string"?nt:Ut(Pe,Qe,Fe)}return{startState:function(Pe){var Qe={tokenize:pe,state:Je,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(Qe.baseIndent=Pe),Qe},token:function(Pe,Qe){if(!Qe.tagName&&Pe.sol()&&(Qe.indented=Pe.indentation()),Pe.eatSpace())return null;fe=null;var Fe=Qe.tokenize(Pe,Qe);return(Fe||fe)&&Fe!="comment"&&(Ke=null,Qe.state=Qe.state(fe||Fe,Pe,Qe),Ke&&(Fe=Ke=="error"?Fe+" error":Ke)),Fe},indent:function(Pe,Qe,Fe){var it=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+me;if(it&&it.noIndent)return ne.Pass;if(Pe.tokenize!=et&&Pe.tokenize!=pe)return Fe?Fe.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return Re.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+me*(Re.multilineTagIndentFactor||1);if(Re.alignCDATA&&/<!\[CDATA\[/.test(Qe))return 0;var Kt=Qe&&/^<(\/)?([\w_:\.-]*)/.exec(Qe);if(Kt&&Kt[1])for(;it;)if(it.tagName==Kt[2]){it=it.prev;break}else if(Re.implicitlyClosed.hasOwnProperty(it.tagName))it=it.prev;else break;else if(Kt)for(;it;){var xt=Re.contextGrabbers[it.tagName];if(xt&&xt.hasOwnProperty(Kt[2]))it=it.prev;else break}for(;it&&it.prev&&!it.startOfLine;)it=it.prev;return it?it.indent+me:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Re.htmlMode?"html":"xml",helperType:Re.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Ze&&(Pe.state=Ut)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var Qe=[],Fe=Pe.context;Fe;Fe=Fe.prev)Fe.tagName&&Qe.push(Fe.tagName);return Qe.reverse()}}}),ne.defineMIME("text/xml","xml"),ne.defineMIME("application/xml","xml"),ne.mimeModes.hasOwnProperty("text/html")||ne.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(It,Wt,he){"use strict";he.d(Wt,{hP:function(){return Et}});var ne=function(ae,te){return(ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var se in oe)Object.prototype.hasOwnProperty.call(oe,se)&&(z[se]=oe[se])})(ae,te)};function Ue(ae,te){function z(){this.constructor=ae}ne(ae,te),ae.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Ne(ae,te,z,oe){return new(z||(z=Promise))(function(se,ie){function xe(kt){try{Mt(oe.next(kt))}catch(pt){ie(pt)}}function Ve(kt){try{Mt(oe.throw(kt))}catch(pt){ie(pt)}}function Mt(kt){var pt;kt.done?se(kt.value):(pt=kt.value,pt instanceof z?pt:new z(function(St){St(pt)})).then(xe,Ve)}Mt((oe=oe.apply(ae,te||[])).next())})}function qe(ae,te){var z,oe,se,ie,xe={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return ie={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function Ve(Mt){return function(kt){return function(pt){if(z)throw new TypeError("Generator is already executing.");for(;xe;)try{if(z=1,oe&&(se=2&pt[0]?oe.return:pt[0]?oe.throw||((se=oe.return)&&se.call(oe),0):oe.next)&&!(se=se.call(oe,pt[1])).done)return se;switch(oe=0,se&&(pt=[2&pt[0],se.value]),pt[0]){case 0:case 1:se=pt;break;case 4:return xe.label++,{value:pt[1],done:!1};case 5:xe.label++,oe=pt[1],pt=[0];continue;case 7:pt=xe.ops.pop(),xe.trys.pop();continue;default:if(se=xe.trys,!((se=se.length>0&&se[se.length-1])||pt[0]!==6&&pt[0]!==2)){xe=0;continue}if(pt[0]===3&&(!se||pt[1]>se[0]&&pt[1]<se[3])){xe.label=pt[1];break}if(pt[0]===6&&xe.label<se[1]){xe.label=se[1],se=pt;break}if(se&&xe.label<se[2]){xe.label=se[2],xe.ops.push(pt);break}se[2]&&xe.ops.pop(),xe.trys.pop();continue}pt=te.call(ae,xe)}catch(St){pt=[6,St],oe=0}finally{z=se=0}if(5&pt[0])throw pt[1];return{value:pt[0]?pt[1]:void 0,done:!0}}([Mt,kt])}}}function ve(){for(var ae=0,te=0,z=arguments.length;te<z;te++)ae+=arguments[te].length;var oe=Array(ae),se=0;for(te=0;te<z;te++)for(var ie=arguments[te],xe=0,Ve=ie.length;xe<Ve;xe++,se++)oe[se]=ie[xe];return oe}var me=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(te,z){for(var oe=0,se=z;oe<se.length;oe++){var ie=se[oe],xe=ie[0],Ve=ie[1];te.setAttribute(xe,Ve)}},ae.createRect=function(te,z,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",te.toString()),se.setAttribute("height",z.toString()),oe&&ae.setAttributes(se,oe),se},ae.createLine=function(te,z,oe,se,ie){var xe=document.createElementNS("http://www.w3.org/2000/svg","line");return xe.setAttribute("x1",te.toString()),xe.setAttribute("y1",z.toString()),xe.setAttribute("x2",oe.toString()),xe.setAttribute("y2",se.toString()),ie&&ae.setAttributes(xe,ie),xe},ae.createPolygon=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",te),z&&ae.setAttributes(oe,z),oe},ae.createCircle=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(te/2).toString()),oe.setAttribute("cy",(te/2).toString()),oe.setAttribute("r",te.toString()),z&&ae.setAttributes(oe,z),oe},ae.createEllipse=function(te,z,oe){var se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(te/2).toString()),se.setAttribute("cy",(z/2).toString()),se.setAttribute("rx",(te/2).toString()),se.setAttribute("ry",(z/2).toString()),oe&&ae.setAttributes(se,oe),se},ae.createGroup=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&ae.setAttributes(z,te),z},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(te,z,oe,se,ie,xe,Ve){var Mt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Mt,[["id",te],["orient",z],["markerWidth",oe.toString()],["markerHeight",se.toString()],["refX",ie.toString()],["refY",xe.toString()]]),Mt.appendChild(Ve),Mt},ae.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&ae.setAttributes(z,te),z},ae.createTSpan=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=te,z&&ae.setAttributes(oe,z),oe},ae.createImage=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&ae.setAttributes(z,te),z},ae.createPoint=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=te,oe.y=z,oe},ae.createPath=function(te,z){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",te),z&&ae.setAttributes(oe,z),oe},ae}(),Re=function(){function ae(){}return ae.addKey=function(te){ae.key=te},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),Ge=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,z,oe){var se=this;return new Promise(function(ie){var xe=oe!==void 0?oe:document.createElement("canvas");te===null&&(se.markersOnly=!0,se.naturalSize=!1);var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("width",z.width.baseVal.valueAsString),Ve.setAttribute("height",z.height.baseVal.valueAsString),Ve.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Ve.innerHTML=z.innerHTML,se.naturalSize===!0?(Ve.width.baseVal.value=te.naturalWidth,Ve.height.baseVal.value=te.naturalHeight):se.width!==void 0&&se.height!==void 0&&(Ve.width.baseVal.value=se.width,Ve.height.baseVal.value=se.height),xe.width=Ve.width.baseVal.value,xe.height=Ve.height.baseVal.value;var Mt=Ve.outerHTML,kt=xe.getContext("2d");se.markersOnly!==!0&&kt.drawImage(te,0,0,xe.width,xe.height);var pt=window.URL,St=new Image(xe.width,xe.height);St.setAttribute("crossOrigin","anonymous");var $t=new Blob([Mt],{type:"image/svg+xml"}),Yt=pt.createObjectURL($t);St.onload=function(){kt.drawImage(St,0,0),pt.revokeObjectURL(Yt);var ln=xe.toDataURL(se.imageType,se.imageQuality);ie(ln)},St.src=Yt})},ae}(),we=function(){},fe=function(){function ae(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.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(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.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},ae.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)},ae.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 Ke("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ke("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ke("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new pe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new pe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},ae.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),Ke=function(ae,te){this.selector=ae,this.style=te},pe=function(ae,te){this.localName=ae,this.style=te},et=function(){function ae(te,z,oe,se,ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=oe,this.uiStyleSettings=se,this.styles=ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ae.prototype.show=function(te){var z=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 oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(ie){var xe=document.createElement("div");xe.className=""+z.toolbarButtonStyleClass.name,xe.setAttribute("data-type-name",ie.typeName),xe.innerHTML=ie.icon,xe.addEventListener("click",function(){z.markerToolbarButtonClicked(xe,ie)}),z.buttons.push(xe),z.markerButtons.push(xe)}),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 se=document.createElement("div");se.className=this.toolbarBlockStyleClass.name,se.style.whiteSpace="nowrap",se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(se),this.addActionButton(se,'<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(se,'<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()},ae.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ae.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<te||z===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},ae.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")},ae.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(z){z.className=z.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(te,z,oe){var se=this,ie=document.createElement("div");switch(ie.className=""+this.toolbarButtonStyleClass.name,ie.innerHTML=z,ie.setAttribute("data-action",oe),ie.addEventListener("click",function(){se.actionToolbarButtonClicked(ie,oe)}),oe){case"select":ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ie.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ie),this.buttons.push(ie)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new pe("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 pe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new pe("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 pe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("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 pe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ke("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ke("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},ae.prototype.markerToolbarButtonClicked=function(te,z){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){z.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},ae}(),He=function(){function ae(te,z,oe,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=oe,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new pe("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 pe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new pe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new pe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new pe("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 pe("toolbox-panel-row_colors",`
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new pe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
padding: `+z+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ae.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(te){var z,oe,se=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ie){var xe;ie.uiStyleSettings=se.uiStyleSettings;var Ve=document.createElement("div");Ve.className=se.toolboxButtonStyleClass.name+" "+((xe=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xe!==void 0?xe:se.toolboxButtonStyleColorsClass.name),Ve.innerHTML=ie.icon,Ve.title=ie.title,Ve.addEventListener("click",function(){se.panelButtonClick(ie)}),se.panelButtons.push(Ve),se.buttonRow.appendChild(Ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(te){var z=this,oe=-1;if(te!==this.activePanel){oe=this.panels.indexOf(te),this.panelRow.innerHTML="";var se=te.getUi();se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(se),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ie,xe){var Ve,Mt;ie.className=z.toolboxButtonStyleClass.name+" "+(xe===oe?""+((Ve=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:z.toolboxActiveButtonStyleColorsClass.name):""+((Mt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Mt!==void 0?Mt:z.toolboxButtonStyleColorsClass.name))})},ae}(),Ce=function(ae,te){this.title=ae,this.icon=te},Ee=function(ae){function te(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.colors=[],xe.addTransparent=!1,xe.colorBoxes=[],xe.colors=oe,xe.currentColor=se,xe.setCurrentColor=xe.setCurrentColor.bind(xe),xe.getColorBox=xe.getColorBox.bind(xe),xe}return Ue(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(se){var ie=z.getColorBox(se);oe.appendChild(ie),z.colorBoxes.push(ie)}),oe},te.prototype.getColorBox=function(z){var oe=this,se=this.uiStyleSettings.toolbarHeight/4,ie=this.uiStyleSettings.toolbarHeight-se,xe=document.createElement("div");xe.style.display="inline-block",xe.style.boxSizing="content-box",xe.style.width=ie-2+"px",xe.style.height=ie-2+"px",xe.style.padding="1px",xe.style.marginRight="2px",xe.style.marginBottom="2px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderRadius=(ie+2)/2+"px",xe.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){oe.setCurrentColor(z,xe)});var Ve=document.createElement("div");return Ve.style.display="inline-block",Ve.style.width=ie-2+"px",Ve.style.height=ie-2+"px",Ve.style.backgroundColor=z,Ve.style.borderRadius=ie/2+"px",z==="transparent"&&(Ve.style.fill=this.uiStyleSettings.toolboxAccentColor,Ve.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>`),xe.appendChild(Ve),xe},te.prototype.setCurrentColor=function(z,oe){var se=this;this.currentColor=z,this.colorBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Ce),Se=function(){function ae(te,z,oe){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(te,z){},ae.prototype.dblClick=function(te,z){},ae.prototype.manipulate=function(te){},ae.prototype.pointerUp=function(te){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ae.prototype.scale=function(te,z){},ae.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ae.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),Xe=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},ae}(),rt=function(){function ae(){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 ae.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ae}(),Je=function(){function ae(){}return ae.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ae.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},ae}(),$e=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.left=0,ie.top=0,ie.width=0,ie.height=0,ie.defaultSize={x:50,y:20},ie.offsetX=0,ie.offsetY=0,ie.rotationAngle=0,ie.CB_DISTANCE=10,ie._suppressMarkerCreateEvent=!1,ie.container.transform.baseVal.appendItem(me.createTransform()),ie.setupControlBox(),ie}return Ue(te,ae),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var oe=me.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var se=this.unrotatePoint(z);if(this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.offsetX=se.x-this.left,this.offsetY=se.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ie.x-this.width/2,this.top=ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var xe=this.container.transform.baseVal.getItem(0);xe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var oe=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var oe=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var oe=this.manipulationStartLeft,se=this.manipulationStartWidth,ie=this.manipulationStartTop,xe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+z.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:se=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ie=this.manipulationStartTop+z.y-this.manipulationStartY,xe=this.manipulationStartHeight+this.manipulationStartTop-ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:xe=this.manipulationStartHeight+z.y-this.manipulationStartY}se>=0?(this.left=oe,this.width=se):(this.left=oe+se,this.width=-se),xe>=0?(this.top=ie,this.height=xe):(this.top=ie+xe,this.height=-xe),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var oe=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM(),se=me.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var oe=this.container.getCTM();oe=oe.inverse();var se=me.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(oe)).x,y:se.y}},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var z=me.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),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 Xe,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var z=new rt;return z.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,oe=-z/2,se=oe,ie=(this.width+this.CB_DISTANCE)/2-z/2,xe=(this.height+this.CB_DISTANCE)/2-z/2,Ve=this.height+this.CB_DISTANCE-z/2,Mt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,se),this.positionGrip(this.controlGrips.topCenter.visual,ie,se),this.positionGrip(this.controlGrips.topRight.visual,Mt,se),this.positionGrip(this.controlGrips.centerLeft.visual,oe,xe),this.positionGrip(this.controlGrips.centerRight.visual,Mt,xe),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,ie,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,Mt,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ie,se-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,oe,se){var ie=z.transform.baseVal.getItem(0);ie.setTranslate(oe,se),z.transform.baseVal.replaceItem(ie,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:Je.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Je.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Je.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Je.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe);var se=this.rotatePoint({x:this.left,y:this.top}),ie=this.unrotatePoint({x:se.x*z,y:se.y*oe});this.left=ie.x,this.top=ie.y,this.width=this.width*z,this.height=this.height*oe,this.adjustControlBox()},te}(Se),Le=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==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(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,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},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.setSize()},te.title="Rectangle marker",te}($e),ct=function(ae){function te(z,oe,se,ie){var xe=ae.call(this,z,ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return xe.widths=[],xe.widthBoxes=[],xe.widths=oe,xe.currentWidth=se,xe.setCurrentWidth=xe.setCurrentWidth.bind(xe),xe}return Ue(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(se){var ie=document.createElement("div");ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=se===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentWidth(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.innerText=se.toString(),xe.style.marginRight="5px",ie.appendChild(xe);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var Mt=document.createElement("hr");Mt.style.minWidth="20px",Mt.style.border="0px",Mt.style.borderTop=se+"px solid "+z.uiStyleSettings.toolboxColor,Mt.style.flexGrow="2",Ve.appendChild(Mt),ie.appendChild(Ve),z.widthBoxes.push(ie)}),oe},te.prototype.setCurrentWidth=function(z,oe){var se=this;this.currentWidth=z,this.widthBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Ce),lt=function(ae){function te(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.styles=[],xe.styleBoxes=[],xe.styles=oe,xe.currentStyle=se,xe.setCurrentStyle=xe.setCurrentStyle.bind(xe),xe}return Ue(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(se){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/z.styles.length-5+"%",ie.style.borderColor=se===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentStyle(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.overflow="hidden";var Ve=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(se!==""?'stroke-dasharray="'+se+'"':"")+` />
</svg>`;xe.innerHTML=Ve,ie.appendChild(xe),z.styleBoxes.push(ie)}),oe},te.prototype.setCurrentStyle=function(z,oe){var se=this;this.currentStyle=z,this.styleBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Ce),Ut=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.strokePanel=new Ee("Line color",se.defaultColorSet,se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new lt("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Ue(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(Le),Me=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ze=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.x1=0,ie.y1=0,ie.x2=0,ie.y2=0,ie.defaultLength=50,ie.manipulationStartX=0,ie.manipulationStartY=0,ie.manipulationStartX1=0,ie.manipulationStartY1=0,ie.manipulationStartX2=0,ie.manipulationStartY2=0,ie.setupControlBox(),ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var oe=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=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 z=new rt;return z.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,oe,se){var ie=z.transform.baseVal.getItem(0);ie.setTranslate(oe,se),z.transform.baseVal.replaceItem(ie,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.x1=this.x1*z,this.y1=this.y1*oe,this.x2=this.x2*z,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},te}(Se),nt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.strokePanel=new Ee("Line color",se.defaultColorSet,se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new lt("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==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(z,oe){ae.prototype.pointerDown.call(this,z,oe),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(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.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}(Ze),Pe=function(ae){function te(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.fonts=[],xe.fontBoxes=[],xe.fonts=oe,xe.currentFont=se,xe.setCurrentFont=xe.setCurrentFont.bind(xe),xe}return Ue(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(se){var ie=document.createElement("div");ie.style.display="inline-block",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/z.fonts.length-5+"%",ie.style.borderColor=se===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentFont(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.style.display="flex",xe.style.minHeight="20px",xe.style.flexGrow="2",xe.style.fontFamily=se,xe.style.overflow="hidden";var Ve=document.createElement("div");Ve.style.whiteSpace="nowrap",Ve.style.overflow="hidden",Ve.style.textOverflow="ellipsis",Ve.innerHTML="The quick brown fox jumps over the lazy dog",xe.appendChild(Ve),ie.appendChild(xe),z.fontBoxes.push(ie)}),oe},te.prototype.setCurrentFont=function(z,oe){var se=this;this.currentFont=z,this.fontBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Ce),Qe=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.color="transparent",ie.padding=5,ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ie.text=ie.DEFAULT_TEXT,ie.isMoved=!1,ie.color=se.defaultColor,ie.fontFamily=se.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setColor=ie.setColor.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.renderText=ie.renderText.bind(ie),ie.sizeText=ie.sizeText.bind(ie),ie.textEditDivClicked=ie.textEditDivClicked.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.setSize=ie.setSize.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.colorPanel=new Ee("Color",se.defaultColorSet,se.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.fontFamilyPanel=new Pe("Font",se.defaultFontFamilies,se.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){if(ae.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(se){se===z&&(oe=!0)}),oe},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(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(oe){z.textElement.appendChild(me.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),oe=1;if(z.width>0&&z.height>0){var se=(1*this.width-this.width*this.padding*2/100)/z.width,ie=(1*this.height-this.height*this.padding*2/100)/z.height;oe=Math.min(se,ie)}return oe},te.prototype.getTextPosition=function(z){var oe=this.textElement.getBBox(),se=0,ie=0;return oe.width>0&&oe.height>0&&(se=(this.width-oe.width*z)/2,ie=this.height/2-oe.height*z/2),{x:se,y:ie}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),oe=this.getTextScale(),se=this.getTextPosition(oe);se.y-=z.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ae.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(z){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,z.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var se=oe.clipboardData.getData("text"),ie=window.getSelection();if(!ie.rangeCount)return!1;ie.deleteFromDocument(),ie.getRangeAt(0).insertNode(document.createTextNode(se)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),ie={x:se.width*z,y:se.height*z};oe.x-=ie.x/2,oe.y-=ie.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},te.prototype.dblClick=function(z,oe){ae.prototype.dblClick.call(this,z,oe),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&me.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&me.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),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}($e),Fe=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.color="transparent",ie.lineWidth=3,ie.drawing=!1,ie.pixelRatio=1,ie.color=se.defaultColor,ie.lineWidth=se.defaultStrokeWidth,ie.pixelRatio=se.freehandPixelRatio,ie.setColor=ie.setColor.bind(ie),ie.addCanvas=ie.addCanvas.bind(ie),ie.finishCreation=ie.finishCreation.bind(ie),ie.setLineWidth=ie.setLineWidth.bind(ie),ie.colorPanel=new Ee("Color",se.defaultColorSet,se.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.lineWidthPanel=new ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.lineWidthPanel.onWidthChanged=ie.setLineWidth,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var z=me.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):ae.prototype.pointerDown.call(this,z,oe)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),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(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,z)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=oe[0],ie=oe[1],xe=oe[2],Ve=oe[3],Mt=!1,kt=0;kt<this.canvasElement.height;kt++)for(var pt=0;pt<this.canvasElement.width;pt++)z.data[kt*this.canvasElement.width*4+4*pt+3]>0&&(Mt=!0,kt<ie&&(ie=kt),pt<se&&(se=pt),kt>Ve&&(Ve=kt),pt>xe&&(xe=pt));if(Mt){this.left=se/this.pixelRatio,this.top=ie/this.pixelRatio,this.width=(xe-se)/this.pixelRatio,this.height=(Ve-ie)/this.pixelRatio;var St=document.createElement("canvas");St.width=xe-se,St.height=Ve-ie,St.getContext("2d").putImageData(this.canvasContext.getImageData(se,ie,xe-se,Ve-ie),0,0),this.drawingImgUrl=St.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(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),ae.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),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}($e),it=function(ae){function te(z,oe,se){var ie=ae.call(this,z,se||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ie.typeBoxes=[],ie.currentType=oe,ie.setCurrentType=ie.setCurrentType.bind(ie),ie}return Ue(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var se=function(Ve){var Mt="both";switch(Ve){case 0:Mt="both";break;case 1:Mt="start";break;case 2:Mt="end";break;case 3:Mt="none"}var kt=document.createElement("div");if(kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Mt===ie.currentType?ie.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){z.setCurrentType(Mt,kt)}),oe.appendChild(kt),Mt==="both"||Mt==="start"){var pt=document.createElement("div");pt.style.display="flex",pt.style.alignItems="center",pt.style.minHeight="20px",pt.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="`+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,pt.style.marginLeft="5px",kt.appendChild(pt)}var St=document.createElement("div");St.style.display="flex",St.style.alignItems="center",St.style.minHeight="20px",St.style.flexGrow="2";var $t=document.createElement("hr");if($t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop="3px solid "+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee"),$t.style.flexGrow="2",St.appendChild($t),kt.appendChild(St),Mt==="both"||Mt==="end"){var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.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="`+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Yt.style.marginRight="5px",kt.appendChild(Yt)}ie.typeBoxes.push(kt)},ie=this,xe=0;xe<4;xe++)se(xe);return oe},te.prototype.setCurrentType=function(z,oe){var se=this;this.currentType=z,this.typeBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Ce),Kt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.arrowType="end",ie.arrowBaseHeight=10,ie.arrowBaseWidth=10,ie.getArrowPoints=ie.getArrowPoints.bind(ie),ie.setArrowType=ie.setArrowType.bind(ie),ie.arrowTypePanel=new it("Arrow type","end"),ie.arrowTypePanel.onArrowTypeChanged=ie.setArrowType,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,oe){var se=this.arrowBaseWidth+2*this.strokeWidth,ie=this.arrowBaseHeight+2*this.strokeWidth;return z-se/2+","+(oe+ie/2)+" "+z+","+(oe-ie/2)+" "+(z+se/2)+","+(oe+ie/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(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",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 z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.arrowType=oe.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}(nt),xt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor=se.defaultFillColor,ie.strokeWidth=0,ie.fillPanel=new Ee("Color",se.defaultColorSet,se.defaultFillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie}return Ue(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(Le),mn=function(ae){function te(z,oe,se,ie){var xe=ae.call(this,z,ie||'<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 xe.opacities=[],xe.opacityBoxes=[],xe.opacities=oe,xe.currentOpacity=se,xe.setCurrentOpacity=xe.setCurrentOpacity.bind(xe),xe}return Ue(te,ae),te.prototype.getUi=function(){var z=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(se){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="center",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=se===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){z.setCurrentOpacity(se,ie)}),oe.appendChild(ie);var xe=document.createElement("div");xe.innerText=100*se+"%",ie.appendChild(xe),z.opacityBoxes.push(ie)}),oe},te.prototype.setCurrentOpacity=function(z,oe){var se=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Ce),Lt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.setOpacity=ie.setOpacity.bind(ie),ie.fillColor=se.defaultHighlightColor,ie.strokeWidth=0,ie.opacity=se.defaultHighlightOpacity,ie.fillPanel=new Ee("Color",se.defaultColorSet,ie.fillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie.opacityPanel=new mn("Opacity",se.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return Ue(te,ae),te.prototype.setOpacity=function(z){this.opacity=z,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 z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},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}(xt),ge='<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>',de='<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>',dt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.bgColor="transparent",ie.tipPosition={x:0,y:0},ie.tipBase1Position={x:0,y:0},ie.tipBase2Position={x:0,y:0},ie.tipMoving=!1,ie.color=se.defaultStrokeColor,ie.bgColor=se.defaultFillColor,ie.fontFamily=se.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setBgColor=ie.setBgColor.bind(ie),ie.getTipPoints=ie.getTipPoints.bind(ie),ie.positionTip=ie.positionTip.bind(ie),ie.setTipPoints=ie.setTipPoints.bind(ie),ie.colorPanel=new Ee("Text color",se.defaultColorSet,ie.color,ge),ie.colorPanel.onColorChanged=ie.setColor,ie.bgColorPanel=new Ee("Fill color",se.defaultColorSet,ie.bgColor,de),ie.bgColorPanel.onColorChanged=ie.setBgColor,ie.fontFamilyPanel=new Pe("Font",se.defaultFontFamilies,se.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.tipGrip=new rt,ie.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),ie.controlBox.appendChild(ie.tipGrip.visual),ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return ae.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},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(z,oe){this.state==="new"&&ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,oe)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var oe=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(oe),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var oe=this.unrotatePoint(z);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",z]]),me.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var oe=Math.min(this.height/2,15),se=this.height/5;z&&(this.tipPosition={x:oe+se/2,y:this.height+20});var ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+se,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-se,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-se,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-se},this.tipBase2Position={x:this.width,y:this.height-oe}):ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(se=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-se})},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){me.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,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(),ae.prototype.select.call(this)},te.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*oe},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}(Qe),Jt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.fillColor=se.defaultFillColor,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.setOpacity=ie.setOpacity.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.strokePanel=new Ee("Line color",ve(se.defaultColorSet,["transparent"]),se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new Ee("Fill color",ve(se.defaultColorSet,["transparent"]),ie.fillColor,de),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new lt("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.opacityPanel=new mn("Opacity",se.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==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(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.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(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,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 z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),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}($e),yt=function(ae){function te(z,oe,se){return ae.call(this,z,oe,se)||this}return Ue(te,ae),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==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(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.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 z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var se=this.tip2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(se,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z),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}(nt),Ie=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokePanel.colors=se.defaultColorSet,ie.fillColor="transparent",ie}return Ue(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},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}(Jt),tt=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),at=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.curveX=0,ie.curveY=0,ie.manipulationStartCurveX=0,ie.manipulationStartCurveY=0,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.positionGrips=ie.positionGrips.bind(ie),ie.addControlGrips=ie.addControlGrips.bind(ie),ie.adjustVisual=ie.adjustVisual.bind(ie),ie.setupControlBox=ie.setupControlBox.bind(ie),ie.resize=ie.resize.bind(ie),ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.strokePanel=new Ee("Line color",se.defaultColorSet,se.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new lt("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=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(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(oe)&&(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(){ae.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,ae.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),ae.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,oe){this.curveX=this.curveX*z,this.curveY=this.curveY*oe,ae.prototype.scale.call(this,z,oe)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var oe=z;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.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}(Ze),dn=function(ae){function te(z,oe,se){var ie=ae.call(this,z,oe,se)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.textColor="transparent",ie.fontSize="1rem",ie.isMoved=!1,ie.captionText="Caption",ie.PADDING=5,ie.captionBoxWidth=0,ie.captionBoxHeight=0,ie.strokeColor=se.defaultColor,ie.strokeWidth=se.defaultStrokeWidth,ie.strokeDasharray=se.defaultStrokeDasharray,ie.fillColor=se.defaultFillColor,ie.textColor=se.defaultStrokeColor,ie.fontFamily=se.defaultFontFamily,ie.fontSize=se.defaultCaptionFontSize,ie.captionText=se.defaultCaptionText,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.sizeCaption=ie.sizeCaption.bind(ie),ie.setCaptionText=ie.setCaptionText.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.finishTextEditing=ie.finishTextEditing.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.setTextColor=ie.setTextColor.bind(ie),ie.strokePanel=new Ee("Line color",ve(se.defaultColorSet,["transparent"]),ie.strokeColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new Ee("Fill color",ve(se.defaultColorSet,["transparent"]),ie.fillColor,de),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new ct("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new lt("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.fontFamilyPanel=new Pe("Font",se.defaultFontFamilies,se.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.textColorPanel=new Ee("Text color",se.defaultColorSet,ie.textColor,ge),ie.textColorPanel.onColorChanged=ie.setTextColor,ie}return Ue(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==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(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,oe){ae.prototype.pointerDown.call(this,z,oe),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),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 z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&me.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&me.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),me.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,oe){ae.prototype.dblClick.call(this,z,oe),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&me.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&me.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&me.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,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 z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ae.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var oe=z;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,oe){ae.prototype.scale.call(this,z,oe),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}($e),ht=function(){function ae(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),Dt=function(ae){function te(z,oe,se){var ie=ae.call(this,z,!1)||this;return ie.dataUrl=oe,ie.state=se,ie}return Ue(te,ae),te}(ht),We=function(ae){function te(z,oe,se){se===void 0&&(se=!1);var ie=ae.call(this,z,se)||this;return ie.marker=oe,ie}return Ue(te,ae),te}(ht),mt=function(){function ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ae.prototype.addEventListener=function(te,z){this[te].push(z)},ae.prototype.removeEventListener=function(te,z){var oe=this[te].indexOf(z);oe>-1&&this[te].splice(oe,1)},ae}(),Et=function(){function ae(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Me,this._isOpen=!1,this.undoRedoManager=new tt,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 mt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ut,Fe,Kt,Qe,Ie,Jt,Lt,dt,yt,xt,nt,at,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ut,Fe,Kt,Qe,Jt,Lt,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ut,Fe,Kt,Qe,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(oe){if(typeof oe=="string"){var se=z.ALL_MARKER_TYPES.find(function(ie){return ie.typeName===oe});se!==void 0&&z._availableMarkerTypes.push(se)}else z._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new ht(te))})},ae.prototype.render=function(){return Ne(this,void 0,void 0,function(){var te;return qe(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Ge).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ae.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var oe=!1;te||this.eventListeners.beforeclose.forEach(function(se){var ie=new ht(z,!0);se(ie),ie.defaultPrevented&&(oe=!0)}),oe||(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(se){return se(new ht(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];(te=this._availableMarkerTypes).push.apply(te,z)},ae.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(z){te(z.dataUrl,z.state)})},ae.prototype.removeRenderEventListener=function(te){},ae.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},ae.prototype.removeCloseEventListener=function(te){},ae.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))},ae.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,oe=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,oe)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(te,z){this._isResizing=!0;var oe=te/this.imageWidth,se=z/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(z),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(oe,se),this._isResizing=!1},ae.prototype.scaleMarkers=function(te,z){var oe,se=this;this._currentMarker&&this._currentMarker instanceof Qe?this._currentMarker.scale(te,z):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ie){ie!==se._currentMarker&&ie.scale(te,z)}),oe!==void 0&&this.setCurrentMarker(oe)},ae.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"},ae.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=te.left-z.left,this.top=te.top-z.top},ae.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)},ae.prototype.addDefs=function(){for(var te,z=[],oe=0;oe<arguments.length;oe++)z[oe]=arguments[oe];this.defs=me.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,z)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.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)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.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)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.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)},ae.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()},ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var te=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new et(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 He(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ae.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ae.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var ie=new We(te,te._currentMarker,!0);se(ie),ie.defaultPrevented&&(z=!0)}),!z){var oe=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(se){return se(new We(te,oe))})}}},ae.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(xe){var Ve=new We(te,void 0,!0);xe(Ve),Ve.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var oe=function(xe){var Ve=se.markers[xe];se.setCurrentMarker(se.markers[xe]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Mt){return Mt(new We(te,Ve))})},se=this,ie=this.markers.length-1;ie>=0;ie--)oe(ie);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var te;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===z.width&&oe.height===z.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ie){return ie(new ht(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ie){return ie(new ht(te))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var te=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new ht(te))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var te=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new ht(te))}))},ae.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},ae.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},ae.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var te,z,oe=this;return qe(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return te=se.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ie){return ie(new Dt(oe,te,z))}),this.close(!0),[2]}})})},ae.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return z.markers.push(oe.getState())}),z},ae.prototype.restoreState=function(te){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(oe){var se=z._availableMarkerTypes.find(function(xe){return xe.typeName===oe.typeName});if(se!==void 0){var ie=z.addNewMarker(se);ie.restoreState(oe),z.markers.push(ie)}}),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(oe){return oe(new ht(z))})},ae.prototype.addNewMarker=function(te){var z=me.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(te){var z,oe=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(se){return se.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),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(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(se){return se(new We(oe,oe._currentMarker))}))},ae.prototype.markerCreated=function(te){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Fe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Fe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new We(z,z._currentMarker))})},ae.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},ae.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},ae.prototype.markerStateChanged=function(te){var z=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new We(z,te))})},ae.prototype.setCurrentMarker=function(te){var z=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(oe){return oe(new We(z,z._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(oe){return oe(new We(z,z._currentMarker))}))},ae.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 z=this.markers.find(function(oe){return oe.ownsTarget(te.target)});z!==void 0?(this.setCurrentMarker(z),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))},ae.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(oe){return oe.ownsTarget(te.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},ae.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}))},ae.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(te,z){var oe=this.markerImage.getBoundingClientRect();return{x:(te-oe.left)/this.zoomLevel,y:(z-oe.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ae.prototype.addLicenseKey=function(te){Re.addKey(te)},ae.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},ae.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},ae.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new ht(te))}))},ae.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new ht(te))}))},ae.instanceCounter=0,ae}()},66042:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Qe}});var ne=he(27247),Ue=he(11913),Ne=he(43403),qe=he(34280),ve=he(59301),me=ve.createContext(null),Re=ve.createContext({}),Ge=me,we=he(74430),fe=he(32855),Ke=he(92310),pe=he.n(Ke),et=he(77900),He=he(10228),Ce=he(26112),Ee=he(43079),Se=he(8654),Xe=["prefixCls","className","containerRef"],rt=function(it){var Kt=it.prefixCls,xt=it.className,mn=it.containerRef,Lt=(0,Ee.Z)(it,Xe),ge=ve.useContext(Re),de=ge.panel,dt=(0,Se.x1)(de,mn);return ve.createElement("div",(0,fe.Z)({className:pe()("".concat(Kt,"-content"),xt),role:"dialog",ref:dt},(0,Ce.Z)(it,{aria:!0}),{"aria-modal":"true"},Lt))},Je=rt,$e=he(48736);function Le(Fe){return typeof Fe=="string"&&String(Number(Fe))===Fe?((0,$e.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Fe)):Fe}function ct(Fe){warning(!("wrapperClassName"in Fe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Fe.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var lt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ut(Fe,it){var Kt,xt,mn,Lt=Fe.prefixCls,ge=Fe.open,de=Fe.placement,dt=Fe.inline,Jt=Fe.push,yt=Fe.forceRender,Ie=Fe.autoFocus,tt=Fe.keyboard,at=Fe.classNames,dn=Fe.rootClassName,ht=Fe.rootStyle,Dt=Fe.zIndex,We=Fe.className,mt=Fe.id,Et=Fe.style,ae=Fe.motion,te=Fe.width,z=Fe.height,oe=Fe.children,se=Fe.mask,ie=Fe.maskClosable,xe=Fe.maskMotion,Ve=Fe.maskClassName,Mt=Fe.maskStyle,kt=Fe.afterOpenChange,pt=Fe.onClose,St=Fe.onMouseEnter,$t=Fe.onMouseOver,Yt=Fe.onMouseLeave,ln=Fe.onClick,hn=Fe.onKeyDown,Ft=Fe.onKeyUp,Ln=Fe.styles,sn=Fe.drawerRender,yn=ve.useRef(),st=ve.useRef(),En=ve.useRef();ve.useImperativeHandle(it,function(){return yn.current});var Ot=function(xi){var gi=xi.keyCode,_i=xi.shiftKey;switch(gi){case He.Z.TAB:{if(gi===He.Z.TAB){if(!_i&&document.activeElement===En.current){var bn;(bn=st.current)===null||bn===void 0||bn.focus({preventScroll:!0})}else if(_i&&document.activeElement===st.current){var Dn;(Dn=En.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}}break}case He.Z.ESC:{pt&&tt&&(xi.stopPropagation(),pt(xi));break}}};ve.useEffect(function(){if(ge&&Ie){var li;(li=yn.current)===null||li===void 0||li.focus({preventScroll:!0})}},[ge]);var an=ve.useState(!1),Cn=(0,Ue.Z)(an,2),$n=Cn[0],Rt=Cn[1],zn=ve.useContext(Ge),Ei;typeof Jt=="boolean"?Ei=Jt?{}:{distance:0}:Ei=Jt||{};var fi=(Kt=(xt=(mn=Ei)===null||mn===void 0?void 0:mn.distance)!==null&&xt!==void 0?xt:zn==null?void 0:zn.pushDistance)!==null&&Kt!==void 0?Kt:180,Ri=ve.useMemo(function(){return{pushDistance:fi,push:function(){Rt(!0)},pull:function(){Rt(!1)}}},[fi]);ve.useEffect(function(){if(ge){var li;zn==null||(li=zn.push)===null||li===void 0||li.call(zn)}else{var xi;zn==null||(xi=zn.pull)===null||xi===void 0||xi.call(zn)}},[ge]),ve.useEffect(function(){return function(){var li;zn==null||(li=zn.pull)===null||li===void 0||li.call(zn)}},[]);var Wi=se&&ve.createElement(et.default,(0,fe.Z)({key:"mask"},xe,{visible:ge}),function(li,xi){var gi=li.className,_i=li.style;return ve.createElement("div",{className:pe()("".concat(Lt,"-mask"),gi,at==null?void 0:at.mask,Ve),style:(0,ne.Z)((0,ne.Z)((0,ne.Z)({},_i),Mt),Ln==null?void 0:Ln.mask),onClick:ie&&ge?pt:void 0,ref:xi})}),Bi=typeof ae=="function"?ae(de):ae,Li={};if($n&&fi)switch(de){case"top":Li.transform="translateY(".concat(fi,"px)");break;case"bottom":Li.transform="translateY(".concat(-fi,"px)");break;case"left":Li.transform="translateX(".concat(fi,"px)");break;default:Li.transform="translateX(".concat(-fi,"px)");break}de==="left"||de==="right"?Li.width=Le(te):Li.height=Le(z);var ai={onMouseEnter:St,onMouseOver:$t,onMouseLeave:Yt,onClick:ln,onKeyDown:hn,onKeyUp:Ft},wi=ve.createElement(et.default,(0,fe.Z)({key:"panel"},Bi,{visible:ge,forceRender:yt,onVisibleChanged:function(xi){kt==null||kt(xi)},removeOnLeave:!1,leavedClassName:"".concat(Lt,"-content-wrapper-hidden")}),function(li,xi){var gi=li.className,_i=li.style,bn=ve.createElement(Je,(0,fe.Z)({id:mt,containerRef:xi,prefixCls:Lt,className:pe()(We,at==null?void 0:at.content),style:(0,ne.Z)((0,ne.Z)({},Et),Ln==null?void 0:Ln.content)},(0,Ce.Z)(Fe,{aria:!0}),ai),oe);return ve.createElement("div",(0,fe.Z)({className:pe()("".concat(Lt,"-content-wrapper"),at==null?void 0:at.wrapper,gi),style:(0,ne.Z)((0,ne.Z)((0,ne.Z)({},Li),_i),Ln==null?void 0:Ln.wrapper)},(0,Ce.Z)(Fe,{data:!0})),sn?sn(bn):bn)}),Di=(0,ne.Z)({},ht);return Dt&&(Di.zIndex=Dt),ve.createElement(Ge.Provider,{value:Ri},ve.createElement("div",{className:pe()(Lt,"".concat(Lt,"-").concat(de),dn,(0,we.Z)((0,we.Z)({},"".concat(Lt,"-open"),ge),"".concat(Lt,"-inline"),dt)),style:Di,tabIndex:-1,ref:yn,onKeyDown:Ot},Wi,ve.createElement("div",{tabIndex:0,ref:st,style:lt,"aria-hidden":"true","data-sentinel":"start"}),wi,ve.createElement("div",{tabIndex:0,ref:En,style:lt,"aria-hidden":"true","data-sentinel":"end"})))}var Me=ve.forwardRef(Ut),Ze=Me,nt=function(it){var Kt=it.open,xt=Kt===void 0?!1:Kt,mn=it.prefixCls,Lt=mn===void 0?"rc-drawer":mn,ge=it.placement,de=ge===void 0?"right":ge,dt=it.autoFocus,Jt=dt===void 0?!0:dt,yt=it.keyboard,Ie=yt===void 0?!0:yt,tt=it.width,at=tt===void 0?378:tt,dn=it.mask,ht=dn===void 0?!0:dn,Dt=it.maskClosable,We=Dt===void 0?!0:Dt,mt=it.getContainer,Et=it.forceRender,ae=it.afterOpenChange,te=it.destroyOnClose,z=it.onMouseEnter,oe=it.onMouseOver,se=it.onMouseLeave,ie=it.onClick,xe=it.onKeyDown,Ve=it.onKeyUp,Mt=it.panelRef,kt=ve.useState(!1),pt=(0,Ue.Z)(kt,2),St=pt[0],$t=pt[1],Yt=ve.useState(!1),ln=(0,Ue.Z)(Yt,2),hn=ln[0],Ft=ln[1];(0,qe.Z)(function(){Ft(!0)},[]);var Ln=hn?xt:!1,sn=ve.useRef(),yn=ve.useRef();(0,qe.Z)(function(){Ln&&(yn.current=document.activeElement)},[Ln]);var st=function($n){var Rt;if($t($n),ae==null||ae($n),!$n&&yn.current&&!((Rt=sn.current)!==null&&Rt!==void 0&&Rt.contains(yn.current))){var zn;(zn=yn.current)===null||zn===void 0||zn.focus({preventScroll:!0})}},En=ve.useMemo(function(){return{panel:Mt}},[Mt]);if(!Et&&!St&&!Ln&&te)return null;var Ot={onMouseEnter:z,onMouseOver:oe,onMouseLeave:se,onClick:ie,onKeyDown:xe,onKeyUp:Ve},an=(0,ne.Z)((0,ne.Z)({},it),{},{open:Ln,prefixCls:Lt,placement:de,autoFocus:Jt,keyboard:Ie,width:at,mask:ht,maskClosable:We,inline:mt===!1,afterOpenChange:st,ref:sn},Ot);return ve.createElement(Re.Provider,{value:En},ve.createElement(Ne.Z,{open:Ln||Et||St,autoDestroy:!1,getContainer:mt,autoLock:ht&&(Ln||St)},ve.createElement(Ze,an)))},Pe=nt,Qe=Pe},23425:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return lt}});var ne=he(74430),Ue=he(32855),Ne=he(34666),qe=he(27247),ve=he(11913),me=he(92310),Re=he.n(me),Ge=he(18929),we=he(10228),fe=he(26112),Ke=he(48736),pe=he(59301),et=he(17119),He=[10,20,50,100],Ce=function(Me){var Ze=Me.pageSizeOptions,nt=Ze===void 0?He:Ze,Pe=Me.locale,Qe=Me.changeSize,Fe=Me.pageSize,it=Me.goButton,Kt=Me.quickGo,xt=Me.rootPrefixCls,mn=Me.disabled,Lt=Me.buildOptionText,ge=Me.showSizeChanger,de=Me.sizeChangerRender,dt=pe.useState(""),Jt=(0,ve.Z)(dt,2),yt=Jt[0],Ie=Jt[1],tt=function(){return!yt||Number.isNaN(yt)?void 0:Number(yt)},at=typeof Lt=="function"?Lt:function(z){return"".concat(z," ").concat(Pe.items_per_page)},dn=function(oe){Ie(oe.target.value)},ht=function(oe){it||yt===""||(Ie(""),!(oe.relatedTarget&&(oe.relatedTarget.className.indexOf("".concat(xt,"-item-link"))>=0||oe.relatedTarget.className.indexOf("".concat(xt,"-item"))>=0))&&(Kt==null||Kt(tt())))},Dt=function(oe){yt!==""&&(oe.keyCode===we.Z.ENTER||oe.type==="click")&&(Ie(""),Kt==null||Kt(tt()))},We=function(){return nt.some(function(oe){return oe.toString()===Fe.toString()})?nt:nt.concat([Fe]).sort(function(oe,se){var ie=Number.isNaN(Number(oe))?0:Number(oe),xe=Number.isNaN(Number(se))?0:Number(se);return ie-xe})},mt="".concat(xt,"-options");if(!ge&&!Kt)return null;var Et=null,ae=null,te=null;return ge&&de&&(Et=de({disabled:mn,size:Fe,onSizeChange:function(oe){Qe==null||Qe(Number(oe))},"aria-label":Pe.page_size,className:"".concat(mt,"-size-changer"),options:We().map(function(z){return{label:at(z),value:z}})})),Kt&&(it&&(te=typeof it=="boolean"?pe.createElement("button",{type:"button",onClick:Dt,onKeyUp:Dt,disabled:mn,className:"".concat(mt,"-quick-jumper-button")},Pe.jump_to_confirm):pe.createElement("span",{onClick:Dt,onKeyUp:Dt},it)),ae=pe.createElement("div",{className:"".concat(mt,"-quick-jumper")},Pe.jump_to,pe.createElement("input",{disabled:mn,type:"text",value:yt,onChange:dn,onKeyUp:Dt,onBlur:ht,"aria-label":Pe.page}),Pe.page,te)),pe.createElement("li",{className:mt},Et,ae)},Ee=Ce,Se=function(Me){var Ze=Me.rootPrefixCls,nt=Me.page,Pe=Me.active,Qe=Me.className,Fe=Me.showTitle,it=Me.onClick,Kt=Me.onKeyPress,xt=Me.itemRender,mn="".concat(Ze,"-item"),Lt=Re()(mn,"".concat(mn,"-").concat(nt),(0,ne.Z)((0,ne.Z)({},"".concat(mn,"-active"),Pe),"".concat(mn,"-disabled"),!nt),Qe),ge=function(){it(nt)},de=function(yt){Kt(yt,it,nt)},dt=xt(nt,"page",pe.createElement("a",{rel:"nofollow"},nt));return dt?pe.createElement("li",{title:Fe?String(nt):null,className:Lt,onClick:ge,onKeyDown:de,tabIndex:0},dt):null},Xe=Se,rt=function(Me,Ze,nt){return nt};function Je(){}function $e(Ut){var Me=Number(Ut);return typeof Me=="number"&&!Number.isNaN(Me)&&isFinite(Me)&&Math.floor(Me)===Me}function Le(Ut,Me,Ze){var nt=typeof Ut=="undefined"?Me:Ut;return Math.floor((Ze-1)/nt)+1}var ct=function(Me){var Ze=Me.prefixCls,nt=Ze===void 0?"rc-pagination":Ze,Pe=Me.selectPrefixCls,Qe=Pe===void 0?"rc-select":Pe,Fe=Me.className,it=Me.current,Kt=Me.defaultCurrent,xt=Kt===void 0?1:Kt,mn=Me.total,Lt=mn===void 0?0:mn,ge=Me.pageSize,de=Me.defaultPageSize,dt=de===void 0?10:de,Jt=Me.onChange,yt=Jt===void 0?Je:Jt,Ie=Me.hideOnSinglePage,tt=Me.align,at=Me.showPrevNextJumpers,dn=at===void 0?!0:at,ht=Me.showQuickJumper,Dt=Me.showLessItems,We=Me.showTitle,mt=We===void 0?!0:We,Et=Me.onShowSizeChange,ae=Et===void 0?Je:Et,te=Me.locale,z=te===void 0?et.Z:te,oe=Me.style,se=Me.totalBoundaryShowSizeChanger,ie=se===void 0?50:se,xe=Me.disabled,Ve=Me.simple,Mt=Me.showTotal,kt=Me.showSizeChanger,pt=kt===void 0?Lt>ie:kt,St=Me.sizeChangerRender,$t=Me.pageSizeOptions,Yt=Me.itemRender,ln=Yt===void 0?rt:Yt,hn=Me.jumpPrevIcon,Ft=Me.jumpNextIcon,Ln=Me.prevIcon,sn=Me.nextIcon,yn=pe.useRef(null),st=(0,Ge.Z)(10,{value:ge,defaultValue:dt}),En=(0,ve.Z)(st,2),Ot=En[0],an=En[1],Cn=(0,Ge.Z)(1,{value:it,defaultValue:xt,postState:function(fn){return Math.max(1,Math.min(fn,Le(void 0,Ot,Lt)))}}),$n=(0,ve.Z)(Cn,2),Rt=$n[0],zn=$n[1],Ei=pe.useState(Rt),fi=(0,ve.Z)(Ei,2),Ri=fi[0],Wi=fi[1];(0,pe.useEffect)(function(){Wi(Rt)},[Rt]);var Bi=yt!==Je,Li="current"in Me,ai=Math.max(1,Rt-(Dt?3:5)),wi=Math.min(Le(void 0,Ot,Lt),Rt+(Dt?3:5));function Di(jt,fn){var Bn=jt||pe.createElement("button",{type:"button","aria-label":fn,className:"".concat(nt,"-item-link")});return typeof jt=="function"&&(Bn=pe.createElement(jt,(0,qe.Z)({},Me))),Bn}function li(jt){var fn=jt.target.value,Bn=Le(void 0,Ot,Lt),Hn;return fn===""?Hn=fn:Number.isNaN(Number(fn))?Hn=Ri:fn>=Bn?Hn=Bn:Hn=Number(fn),Hn}function xi(jt){return $e(jt)&&jt!==Rt&&$e(Lt)&&Lt>0}var gi=Lt>Ot?ht:!1;function _i(jt){(jt.keyCode===we.Z.UP||jt.keyCode===we.Z.DOWN)&&jt.preventDefault()}function bn(jt){var fn=li(jt);switch(fn!==Ri&&Wi(fn),jt.keyCode){case we.Z.ENTER:Pn(fn);break;case we.Z.UP:Pn(fn-1);break;case we.Z.DOWN:Pn(fn+1);break;default:break}}function Dn(jt){Pn(li(jt))}function Kn(jt){var fn=Le(jt,Ot,Lt),Bn=Rt>fn&&fn!==0?fn:Rt;an(jt),Wi(Bn),ae==null||ae(Rt,jt),zn(Bn),yt==null||yt(Bn,jt)}function Pn(jt){if(xi(jt)&&!xe){var fn=Le(void 0,Ot,Lt),Bn=jt;return jt>fn?Bn=fn:jt<1&&(Bn=1),Bn!==Ri&&Wi(Bn),zn(Bn),yt==null||yt(Bn,Ot),Bn}return Rt}var mi=Rt>1,yi=Rt<Le(void 0,Ot,Lt);function Pi(){mi&&Pn(Rt-1)}function hi(){yi&&Pn(Rt+1)}function oi(){Pn(ai)}function ki(){Pn(wi)}function Zt(jt,fn){if(jt.key==="Enter"||jt.charCode===we.Z.ENTER||jt.keyCode===we.Z.ENTER){for(var Bn=arguments.length,Hn=new Array(Bn>2?Bn-2:0),Wn=2;Wn<Bn;Wn++)Hn[Wn-2]=arguments[Wn];fn.apply(void 0,Hn)}}function ot(jt){Zt(jt,Pi)}function un(jt){Zt(jt,hi)}function Jn(jt){Zt(jt,oi)}function pi(jt){Zt(jt,ki)}function Ae(jt){var fn=ln(jt,"prev",Di(Ln,"prev page"));return pe.isValidElement(fn)?pe.cloneElement(fn,{disabled:!mi}):fn}function De(jt){var fn=ln(jt,"next",Di(sn,"next page"));return pe.isValidElement(fn)?pe.cloneElement(fn,{disabled:!yi}):fn}function Bt(jt){(jt.type==="click"||jt.keyCode===we.Z.ENTER)&&Pn(Ri)}var ft=null,ze=(0,fe.Z)(Me,{aria:!0,data:!0}),vt=Mt&&pe.createElement("li",{className:"".concat(nt,"-total-text")},Mt(Lt,[Lt===0?0:(Rt-1)*Ot+1,Rt*Ot>Lt?Lt:Rt*Ot])),Qt=null,Gt=Le(void 0,Ot,Lt);if(Ie&&Lt<=Ot)return null;var nn=[],zt={rootPrefixCls:nt,onClick:Pn,onKeyPress:Zt,showTitle:mt,itemRender:ln,page:-1},rn=Rt-1>0?Rt-1:0,_e=Rt+1<Gt?Rt+1:Gt,Zn=ht&&ht.goButton,on=(0,Ne.Z)(Ve)==="object"?Ve.readOnly:!Ve,Be=Zn,Te=null;Ve&&(Zn&&(typeof Zn=="boolean"?Be=pe.createElement("button",{type:"button",onClick:Bt,onKeyUp:Bt},z.jump_to_confirm):Be=pe.createElement("span",{onClick:Bt,onKeyUp:Bt},Zn),Be=pe.createElement("li",{title:mt?"".concat(z.jump_to).concat(Rt,"/").concat(Gt):null,className:"".concat(nt,"-simple-pager")},Be)),Te=pe.createElement("li",{title:mt?"".concat(Rt,"/").concat(Gt):null,className:"".concat(nt,"-simple-pager")},on?Ri:pe.createElement("input",{type:"text","aria-label":z.jump_to,value:Ri,disabled:xe,onKeyDown:_i,onKeyUp:bn,onChange:bn,onBlur:Dn,size:3}),pe.createElement("span",{className:"".concat(nt,"-slash")},"/"),Gt));var ye=Dt?1:2;if(Gt<=3+ye*2){Gt||nn.push(pe.createElement(Xe,(0,Ue.Z)({},zt,{key:"noPager",page:1,className:"".concat(nt,"-item-disabled")})));for(var ut=1;ut<=Gt;ut+=1)nn.push(pe.createElement(Xe,(0,Ue.Z)({},zt,{key:ut,page:ut,active:Rt===ut})))}else{var _n=Dt?z.prev_3:z.prev_5,kn=Dt?z.next_3:z.next_5,qt=ln(ai,"jump-prev",Di(hn,"prev page")),Ct=ln(wi,"jump-next",Di(Ft,"next page"));dn&&(ft=qt?pe.createElement("li",{title:mt?_n:null,key:"prev",onClick:oi,tabIndex:0,onKeyDown:Jn,className:Re()("".concat(nt,"-jump-prev"),(0,ne.Z)({},"".concat(nt,"-jump-prev-custom-icon"),!!hn))},qt):null,Qt=Ct?pe.createElement("li",{title:mt?kn:null,key:"next",onClick:ki,tabIndex:0,onKeyDown:pi,className:Re()("".concat(nt,"-jump-next"),(0,ne.Z)({},"".concat(nt,"-jump-next-custom-icon"),!!Ft))},Ct):null);var Oe=Math.max(1,Rt-ye),cn=Math.min(Rt+ye,Gt);Rt-1<=ye&&(cn=1+ye*2),Gt-Rt<=ye&&(Oe=Gt-ye*2);for(var wn=Oe;wn<=cn;wn+=1)nn.push(pe.createElement(Xe,(0,Ue.Z)({},zt,{key:wn,page:wn,active:Rt===wn})));if(Rt-1>=ye*2&&Rt!==3&&(nn[0]=pe.cloneElement(nn[0],{className:Re()("".concat(nt,"-item-after-jump-prev"),nn[0].props.className)}),nn.unshift(ft)),Gt-Rt>=ye*2&&Rt!==Gt-2){var Fn=nn[nn.length-1];nn[nn.length-1]=pe.cloneElement(Fn,{className:Re()("".concat(nt,"-item-before-jump-next"),Fn.props.className)}),nn.push(Qt)}Oe!==1&&nn.unshift(pe.createElement(Xe,(0,Ue.Z)({},zt,{key:1,page:1}))),cn!==Gt&&nn.push(pe.createElement(Xe,(0,Ue.Z)({},zt,{key:Gt,page:Gt})))}var On=Ae(rn);if(On){var Xn=!mi||!Gt;On=pe.createElement("li",{title:mt?z.prev_page:null,onClick:Pi,tabIndex:Xn?null:0,onKeyDown:ot,className:Re()("".concat(nt,"-prev"),(0,ne.Z)({},"".concat(nt,"-disabled"),Xn)),"aria-disabled":Xn},On)}var Xt=De(_e);if(Xt){var Tn,Gn;Ve?(Tn=!yi,Gn=mi?0:null):(Tn=!yi||!Gt,Gn=Tn?null:0),Xt=pe.createElement("li",{title:mt?z.next_page:null,onClick:hi,tabIndex:Gn,onKeyDown:un,className:Re()("".concat(nt,"-next"),(0,ne.Z)({},"".concat(nt,"-disabled"),Tn)),"aria-disabled":Tn},Xt)}var Nn=Re()(nt,Fe,(0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)((0,ne.Z)({},"".concat(nt,"-start"),tt==="start"),"".concat(nt,"-center"),tt==="center"),"".concat(nt,"-end"),tt==="end"),"".concat(nt,"-simple"),Ve),"".concat(nt,"-disabled"),xe));return pe.createElement("ul",(0,Ue.Z)({className:Nn,style:oe,ref:yn},ze),vt,On,Ve?Te:nn,Xt,pe.createElement(Ee,{locale:z,rootPrefixCls:nt,disabled:xe,selectPrefixCls:Qe,changeSize:Kn,pageSize:Ot,pageSizeOptions:$t,quickGo:gi?Pn:null,goButton:Be,showSizeChanger:pt,sizeChangerRender:St}))},lt=ct},6551:function(It,Wt,he){"use strict";he.d(Wt,{ZP:function(){return Re}});var ne=he(11913),Ue=he(59301),Ne=he(47273),qe=0,ve=(0,Ne.Z)();function me(){var Ge;return ve?(Ge=qe,qe+=1):Ge="TEST_OR_SSR",Ge}function Re(Ge){var we=Ue.useState(),fe=(0,ne.Z)(we,2),Ke=fe[0],pe=fe[1];return Ue.useEffect(function(){pe("rc_select_".concat(me()))},[]),Ge||Ke}},37463:function(It,Wt,he){"use strict";he.d(Wt,{Ac:function(){return st},Xo:function(){return Ot},Wx:function(){return Cn},ZP:function(){return pi},lk:function(){return Je}});var ne=he(32855),Ue=he(3300),Ne=he(74430),qe=he(27247),ve=he(11913),me=he(43079),Re=he(34666),Ge=he(18929),we=he(48736),fe=he(59301),Ke=he(92310),pe=he.n(Ke),et=he(34280),He=he(49658),Ce=he(8654),Ee=function(De){var Bt=De.className,ft=De.customizeIcon,ze=De.customizeIconProps,vt=De.children,Qt=De.onMouseDown,Gt=De.onClick,nn=typeof ft=="function"?ft(ze):ft;return fe.createElement("span",{className:Bt,onMouseDown:function(rn){rn.preventDefault(),Qt==null||Qt(rn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Gt,"aria-hidden":!0},nn!==void 0?nn:fe.createElement("span",{className:pe()(Bt.split(/\s+/).map(function(zt){return"".concat(zt,"-icon")}))},vt))},Se=Ee,Xe=function(De,Bt,ft,ze,vt){var Qt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Gt=arguments.length>6?arguments[6]:void 0,nn=arguments.length>7?arguments[7]:void 0,zt=fe.useMemo(function(){if((0,Re.Z)(ze)==="object")return ze.clearIcon;if(vt)return vt},[ze,vt]),rn=fe.useMemo(function(){return!!(!Qt&&ze&&(ft.length||Gt)&&!(nn==="combobox"&&Gt===""))},[ze,Qt,ft.length,Gt,nn]);return{allowClear:rn,clearIcon:fe.createElement(Se,{className:"".concat(De,"-clear"),onMouseDown:Bt,customizeIcon:zt},"\xD7")}},rt=fe.createContext(null);function Je(){return fe.useContext(rt)}function $e(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,De=fe.useState(!1),Bt=(0,ve.Z)(De,2),ft=Bt[0],ze=Bt[1],vt=fe.useRef(null),Qt=function(){window.clearTimeout(vt.current)};fe.useEffect(function(){return Qt},[]);var Gt=function(zt,rn){Qt(),vt.current=window.setTimeout(function(){ze(zt),rn&&rn()},Ae)};return[ft,Gt,Qt]}function Le(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,De=fe.useRef(null),Bt=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Bt.current)}},[]);function ft(ze){(ze||De.current===null)&&(De.current=ze),window.clearTimeout(Bt.current),Bt.current=window.setTimeout(function(){De.current=null},Ae)}return[function(){return De.current},ft]}function ct(Ae,De,Bt,ft){var ze=fe.useRef(null);ze.current={open:De,triggerOpen:Bt,customizedTrigger:ft},fe.useEffect(function(){function vt(Qt){var Gt;if(!((Gt=ze.current)!==null&&Gt!==void 0&&Gt.customizedTrigger)){var nn=Qt.target;nn.shadowRoot&&Qt.composed&&(nn=Qt.composedPath()[0]||nn),ze.current.open&&Ae().filter(function(zt){return zt}).every(function(zt){return!zt.contains(nn)&&zt!==nn})&&ze.current.triggerOpen(!1)}}return window.addEventListener("mousedown",vt),function(){return window.removeEventListener("mousedown",vt)}},[])}var lt=he(10228);function Ut(Ae){return Ae&&![lt.Z.ESC,lt.Z.SHIFT,lt.Z.BACKSPACE,lt.Z.TAB,lt.Z.WIN_KEY,lt.Z.ALT,lt.Z.META,lt.Z.WIN_KEY_RIGHT,lt.Z.CTRL,lt.Z.SEMICOLON,lt.Z.EQUALS,lt.Z.CAPS_LOCK,lt.Z.CONTEXT_MENU,lt.Z.F1,lt.Z.F2,lt.Z.F3,lt.Z.F4,lt.Z.F5,lt.Z.F6,lt.Z.F7,lt.Z.F8,lt.Z.F9,lt.Z.F10,lt.Z.F11,lt.Z.F12].includes(Ae)}var Me=he(26112),Ze=he(11780);function nt(Ae,De,Bt){var ft=(0,qe.Z)((0,qe.Z)({},Ae),Bt?De:{});return Object.keys(De).forEach(function(ze){var vt=De[ze];typeof vt=="function"&&(ft[ze]=function(){for(var Qt,Gt=arguments.length,nn=new Array(Gt),zt=0;zt<Gt;zt++)nn[zt]=arguments[zt];return vt.apply(void 0,nn),(Qt=Ae[ze])===null||Qt===void 0?void 0:Qt.call.apply(Qt,[Ae].concat(nn))})}),ft}var Pe=nt,Qe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Fe=function(De,Bt){var ft=De.prefixCls,ze=De.id,vt=De.inputElement,Qt=De.autoFocus,Gt=De.autoComplete,nn=De.editable,zt=De.activeDescendantId,rn=De.value,_e=De.open,Zn=De.attrs,on=(0,me.Z)(De,Qe),Be=vt||fe.createElement("input",null),Te=Be,ye=Te.ref,ut=Te.props;return(0,we.Kp)(!("maxLength"in Be.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Be=fe.cloneElement(Be,(0,qe.Z)((0,qe.Z)((0,qe.Z)({type:"search"},Pe(on,ut,!0)),{},{id:ze,ref:(0,Ce.sQ)(Bt,ye),autoComplete:Gt||"off",autoFocus:Qt,className:pe()("".concat(ft,"-selection-search-input"),ut==null?void 0:ut.className),role:"combobox","aria-expanded":_e||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ze,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ze,"_list"),"aria-activedescendant":_e?zt:void 0},Zn),{},{value:nn?rn:"",readOnly:!nn,unselectable:nn?null:"on",style:(0,qe.Z)((0,qe.Z)({},ut.style),{},{opacity:nn?null:0})})),Be},it=fe.forwardRef(Fe),Kt=it;function xt(Ae){return Array.isArray(Ae)?Ae:Ae!==void 0?[Ae]:[]}var mn=typeof window!="undefined"&&window.document&&window.document.documentElement,Lt=mn;function ge(Ae){return Ae!=null}function de(Ae){return!Ae&&Ae!==0}function dt(Ae){return["string","number"].includes((0,Re.Z)(Ae))}function Jt(Ae){var De=void 0;return Ae&&(dt(Ae.title)?De=Ae.title.toString():dt(Ae.label)&&(De=Ae.label.toString())),De}function yt(Ae,De){Lt?fe.useLayoutEffect(Ae,De):fe.useEffect(Ae,De)}function Ie(Ae){var De;return(De=Ae.key)!==null&&De!==void 0?De:Ae.value}var tt=function(De){De.preventDefault(),De.stopPropagation()},at=function(De){var Bt=De.id,ft=De.prefixCls,ze=De.values,vt=De.open,Qt=De.searchValue,Gt=De.autoClearSearchValue,nn=De.inputRef,zt=De.placeholder,rn=De.disabled,_e=De.mode,Zn=De.showSearch,on=De.autoFocus,Be=De.autoComplete,Te=De.activeDescendantId,ye=De.tabIndex,ut=De.removeIcon,_n=De.maxTagCount,kn=De.maxTagTextLength,qt=De.maxTagPlaceholder,Ct=qt===void 0?function(Nt){return"+ ".concat(Nt.length," ...")}:qt,Oe=De.tagRender,cn=De.onToggleOpen,wn=De.onRemove,Fn=De.onInputChange,On=De.onInputPaste,Xn=De.onInputKeyDown,Xt=De.onInputMouseDown,Tn=De.onInputCompositionStart,Gn=De.onInputCompositionEnd,Nn=De.onInputBlur,jt=fe.useRef(null),fn=(0,fe.useState)(0),Bn=(0,ve.Z)(fn,2),Hn=Bn[0],Wn=Bn[1],In=(0,fe.useState)(!1),Vn=(0,ve.Z)(In,2),ni=Vn[0],Sn=Vn[1],ei="".concat(ft,"-selection"),jn=vt||_e==="multiple"&&Gt===!1||_e==="tags"?Qt:"",Ht=_e==="tags"||_e==="multiple"&&Gt===!1||Zn&&(vt||ni);yt(function(){Wn(jt.current.scrollWidth)},[jn]);var Qn=function(At,gn,Tt,wt,Vt){return fe.createElement("span",{title:Jt(At),className:pe()("".concat(ei,"-item"),(0,Ne.Z)({},"".concat(ei,"-item-disabled"),Tt))},fe.createElement("span",{className:"".concat(ei,"-item-content")},gn),wt&&fe.createElement(Se,{className:"".concat(ei,"-item-remove"),onMouseDown:tt,onClick:Vt,customizeIcon:ut},"\xD7"))},Un=function(At,gn,Tt,wt,Vt,en){var ii=function(Fi){tt(Fi),cn(!vt)};return fe.createElement("span",{onMouseDown:ii},Oe({label:gn,value:At,disabled:Tt,closable:wt,onClose:Vt,isMaxTag:!!en}))},Ci=function(At){var gn=At.disabled,Tt=At.label,wt=At.value,Vt=!rn&&!gn,en=Tt;if(typeof kn=="number"&&(typeof Tt=="string"||typeof Tt=="number")){var ii=String(en);ii.length>kn&&(en="".concat(ii.slice(0,kn),"..."))}var si=function(ci){ci&&ci.stopPropagation(),wn(At)};return typeof Oe=="function"?Un(wt,en,gn,Vt,si):Qn(At,en,gn,Vt,si)},Rn=function(At){if(!ze.length)return null;var gn=typeof Ct=="function"?Ct(At):Ct;return typeof Oe=="function"?Un(void 0,gn,!1,!1,void 0,!0):Qn({title:gn},gn,!1)},gt=fe.createElement("div",{className:"".concat(ei,"-search"),style:{width:Hn},onFocus:function(){Sn(!0)},onBlur:function(){Sn(!1)}},fe.createElement(Kt,{ref:nn,open:vt,prefixCls:ft,id:Bt,inputElement:null,disabled:rn,autoFocus:on,autoComplete:Be,editable:Ht,activeDescendantId:Te,value:jn,onKeyDown:Xn,onMouseDown:Xt,onChange:Fn,onPaste:On,onCompositionStart:Tn,onCompositionEnd:Gn,onBlur:Nn,tabIndex:ye,attrs:(0,Me.Z)(De,!0)}),fe.createElement("span",{ref:jt,className:"".concat(ei,"-search-mirror"),"aria-hidden":!0},jn,"\xA0")),Pt=fe.createElement(Ze.Z,{prefixCls:"".concat(ei,"-overflow"),data:ze,renderItem:Ci,renderRest:Rn,suffix:gt,itemKey:Ie,maxCount:_n});return fe.createElement("span",{className:"".concat(ei,"-wrap")},Pt,!ze.length&&!jn&&fe.createElement("span",{className:"".concat(ei,"-placeholder")},zt))},dn=at,ht=function(De){var Bt=De.inputElement,ft=De.prefixCls,ze=De.id,vt=De.inputRef,Qt=De.disabled,Gt=De.autoFocus,nn=De.autoComplete,zt=De.activeDescendantId,rn=De.mode,_e=De.open,Zn=De.values,on=De.placeholder,Be=De.tabIndex,Te=De.showSearch,ye=De.searchValue,ut=De.activeValue,_n=De.maxLength,kn=De.onInputKeyDown,qt=De.onInputMouseDown,Ct=De.onInputChange,Oe=De.onInputPaste,cn=De.onInputCompositionStart,wn=De.onInputCompositionEnd,Fn=De.onInputBlur,On=De.title,Xn=fe.useState(!1),Xt=(0,ve.Z)(Xn,2),Tn=Xt[0],Gn=Xt[1],Nn=rn==="combobox",jt=Nn||Te,fn=Zn[0],Bn=ye||"";Nn&&ut&&!Tn&&(Bn=ut),fe.useEffect(function(){Nn&&Gn(!1)},[Nn,ut]);var Hn=rn!=="combobox"&&!_e&&!Te?!1:!!Bn,Wn=On===void 0?Jt(fn):On,In=fe.useMemo(function(){return fn?null:fe.createElement("span",{className:"".concat(ft,"-selection-placeholder"),style:Hn?{visibility:"hidden"}:void 0},on)},[fn,Hn,on,ft]);return fe.createElement("span",{className:"".concat(ft,"-selection-wrap")},fe.createElement("span",{className:"".concat(ft,"-selection-search")},fe.createElement(Kt,{ref:vt,prefixCls:ft,id:ze,open:_e,inputElement:Bt,disabled:Qt,autoFocus:Gt,autoComplete:nn,editable:jt,activeDescendantId:zt,value:Bn,onKeyDown:kn,onMouseDown:qt,onChange:function(ni){Gn(!0),Ct(ni)},onPaste:Oe,onCompositionStart:cn,onCompositionEnd:wn,onBlur:Fn,tabIndex:Be,attrs:(0,Me.Z)(De,!0),maxLength:Nn?_n:void 0})),!Nn&&fn?fe.createElement("span",{className:"".concat(ft,"-selection-item"),title:Wn,style:Hn?{visibility:"hidden"}:void 0},fn.label):null,In)},Dt=ht,We=function(De,Bt){var ft=(0,fe.useRef)(null),ze=(0,fe.useRef)(!1),vt=De.prefixCls,Qt=De.open,Gt=De.mode,nn=De.showSearch,zt=De.tokenWithEnter,rn=De.disabled,_e=De.prefix,Zn=De.autoClearSearchValue,on=De.onSearch,Be=De.onSearchSubmit,Te=De.onToggleOpen,ye=De.onInputKeyDown,ut=De.onInputBlur,_n=De.domRef;fe.useImperativeHandle(Bt,function(){return{focus:function(Wn){ft.current.focus(Wn)},blur:function(){ft.current.blur()}}});var kn=Le(0),qt=(0,ve.Z)(kn,2),Ct=qt[0],Oe=qt[1],cn=function(Wn){var In=Wn.which,Vn=ft.current instanceof HTMLTextAreaElement;!Vn&&Qt&&(In===lt.Z.UP||In===lt.Z.DOWN)&&Wn.preventDefault(),ye&&ye(Wn),In===lt.Z.ENTER&&Gt==="tags"&&!ze.current&&!Qt&&(Be==null||Be(Wn.target.value)),!(Vn&&!Qt&&~[lt.Z.UP,lt.Z.DOWN,lt.Z.LEFT,lt.Z.RIGHT].indexOf(In))&&Ut(In)&&Te(!0)},wn=function(){Oe(!0)},Fn=(0,fe.useRef)(null),On=function(Wn){on(Wn,!0,ze.current)!==!1&&Te(!0)},Xn=function(){ze.current=!0},Xt=function(Wn){ze.current=!1,Gt!=="combobox"&&On(Wn.target.value)},Tn=function(Wn){var In=Wn.target.value;if(zt&&Fn.current&&/[\r\n]/.test(Fn.current)){var Vn=Fn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");In=In.replace(Vn,Fn.current)}Fn.current=null,On(In)},Gn=function(Wn){var In=Wn.clipboardData,Vn=In==null?void 0:In.getData("text");Fn.current=Vn||""},Nn=function(Wn){var In=Wn.target;if(In!==ft.current){var Vn=document.body.style.msTouchAction!==void 0;Vn?setTimeout(function(){ft.current.focus()}):ft.current.focus()}},jt=function(Wn){var In=Ct();Wn.target!==ft.current&&!In&&!(Gt==="combobox"&&rn)&&Wn.preventDefault(),(Gt!=="combobox"&&(!nn||!In)||!Qt)&&(Qt&&Zn!==!1&&on("",!0,!1),Te())},fn={inputRef:ft,onInputKeyDown:cn,onInputMouseDown:wn,onInputChange:Tn,onInputPaste:Gn,onInputCompositionStart:Xn,onInputCompositionEnd:Xt,onInputBlur:ut},Bn=Gt==="multiple"||Gt==="tags"?fe.createElement(dn,(0,ne.Z)({},De,fn)):fe.createElement(Dt,(0,ne.Z)({},De,fn));return fe.createElement("div",{ref:_n,className:"".concat(vt,"-selector"),onClick:Nn,onMouseDown:jt},_e&&fe.createElement("div",{className:"".concat(vt,"-prefix")},_e),Bn)},mt=fe.forwardRef(We),Et=mt,ae=he(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(De){var Bt=De===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"}}},oe=function(De,Bt){var ft=De.prefixCls,ze=De.disabled,vt=De.visible,Qt=De.children,Gt=De.popupElement,nn=De.animation,zt=De.transitionName,rn=De.dropdownStyle,_e=De.dropdownClassName,Zn=De.direction,on=Zn===void 0?"ltr":Zn,Be=De.placement,Te=De.builtinPlacements,ye=De.dropdownMatchSelectWidth,ut=De.dropdownRender,_n=De.dropdownAlign,kn=De.getPopupContainer,qt=De.empty,Ct=De.getTriggerDOMNode,Oe=De.onPopupVisibleChange,cn=De.onPopupMouseEnter,wn=(0,me.Z)(De,te),Fn="".concat(ft,"-dropdown"),On=Gt;ut&&(On=ut(Gt));var Xn=fe.useMemo(function(){return Te||z(ye)},[Te,ye]),Xt=nn?"".concat(Fn,"-").concat(nn):zt,Tn=typeof ye=="number",Gn=fe.useMemo(function(){return Tn?null:ye===!1?"minWidth":"width"},[ye,Tn]),Nn=rn;Tn&&(Nn=(0,qe.Z)((0,qe.Z)({},Nn),{},{width:ye}));var jt=fe.useRef(null);return fe.useImperativeHandle(Bt,function(){return{getPopupElement:function(){var Bn;return(Bn=jt.current)===null||Bn===void 0?void 0:Bn.popupElement}}}),fe.createElement(ae.Z,(0,ne.Z)({},wn,{showAction:Oe?["click"]:[],hideAction:Oe?["click"]:[],popupPlacement:Be||(on==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Xn,prefixCls:Fn,popupTransitionName:Xt,popup:fe.createElement("div",{onMouseEnter:cn},On),ref:jt,stretch:Gn,popupAlign:_n,popupVisible:vt,getPopupContainer:kn,popupClassName:pe()(_e,(0,Ne.Z)({},"".concat(Fn,"-empty"),qt)),popupStyle:Nn,getTriggerDOMNode:Ct,onPopupVisibleChange:Oe}),Qt)},se=fe.forwardRef(oe),ie=se,xe=he(40954);function Ve(Ae,De){var Bt=Ae.key,ft;return"value"in Ae&&(ft=Ae.value),Bt!=null?Bt:ft!==void 0?ft:"rc-index-key-".concat(De)}function Mt(Ae){return typeof Ae!="undefined"&&!Number.isNaN(Ae)}function kt(Ae,De){var Bt=Ae||{},ft=Bt.label,ze=Bt.value,vt=Bt.options,Qt=Bt.groupLabel,Gt=ft||(De?"children":"label");return{label:Gt,value:ze||"value",options:vt||"options",groupLabel:Qt||Gt}}function pt(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=De.fieldNames,ft=De.childrenAsData,ze=[],vt=kt(Bt,!1),Qt=vt.label,Gt=vt.value,nn=vt.options,zt=vt.groupLabel;function rn(_e,Zn){Array.isArray(_e)&&_e.forEach(function(on){if(Zn||!(nn in on)){var Be=on[Gt];ze.push({key:Ve(on,ze.length),groupOption:Zn,data:on,label:on[Qt],value:Be})}else{var Te=on[zt];Te===void 0&&ft&&(Te=on.label),ze.push({key:Ve(on,ze.length),group:!0,data:on,label:Te}),rn(on[nn],!0)}})}return rn(Ae,!1),ze}function St(Ae){var De=(0,qe.Z)({},Ae);return"props"in De||Object.defineProperty(De,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),De}}),De}var $t=function(De,Bt,ft){if(!Bt||!Bt.length)return null;var ze=!1,vt=function Gt(nn,zt){var rn=(0,xe.Z)(zt),_e=rn[0],Zn=rn.slice(1);if(!_e)return[nn];var on=nn.split(_e);return ze=ze||on.length>1,on.reduce(function(Be,Te){return[].concat((0,Ue.Z)(Be),(0,Ue.Z)(Gt(Te,Zn)))},[]).filter(Boolean)},Qt=vt(De,Bt);return ze?typeof ft!="undefined"?Qt.slice(0,ft):Qt:null},Yt=fe.createContext(null),ln=Yt;function hn(Ae){var De=Ae.visible,Bt=Ae.values;if(!De)return null;var ft=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Bt.slice(0,ft).map(function(ze){var vt=ze.label,Qt=ze.value;return["number","string"].includes((0,Re.Z)(vt))?vt:Qt}).join(", ")),Bt.length>ft?", ...":null)}var Ft=["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"],Ln=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],sn=function(De){return De==="tags"||De==="multiple"},yn=fe.forwardRef(function(Ae,De){var Bt,ft=Ae.id,ze=Ae.prefixCls,vt=Ae.className,Qt=Ae.showSearch,Gt=Ae.tagRender,nn=Ae.direction,zt=Ae.omitDomProps,rn=Ae.displayValues,_e=Ae.onDisplayValuesChange,Zn=Ae.emptyOptions,on=Ae.notFoundContent,Be=on===void 0?"Not Found":on,Te=Ae.onClear,ye=Ae.mode,ut=Ae.disabled,_n=Ae.loading,kn=Ae.getInputElement,qt=Ae.getRawInputElement,Ct=Ae.open,Oe=Ae.defaultOpen,cn=Ae.onDropdownVisibleChange,wn=Ae.activeValue,Fn=Ae.onActiveValueChange,On=Ae.activeDescendantId,Xn=Ae.searchValue,Xt=Ae.autoClearSearchValue,Tn=Ae.onSearch,Gn=Ae.onSearchSplit,Nn=Ae.tokenSeparators,jt=Ae.allowClear,fn=Ae.prefix,Bn=Ae.suffixIcon,Hn=Ae.clearIcon,Wn=Ae.OptionList,In=Ae.animation,Vn=Ae.transitionName,ni=Ae.dropdownStyle,Sn=Ae.dropdownClassName,ei=Ae.dropdownMatchSelectWidth,jn=Ae.dropdownRender,Ht=Ae.dropdownAlign,Qn=Ae.placement,Un=Ae.builtinPlacements,Ci=Ae.getPopupContainer,Rn=Ae.showAction,gt=Rn===void 0?[]:Rn,Pt=Ae.onFocus,Nt=Ae.onBlur,At=Ae.onKeyUp,gn=Ae.onKeyDown,Tt=Ae.onMouseDown,wt=(0,me.Z)(Ae,Ft),Vt=sn(ye),en=(Qt!==void 0?Qt:Vt)||ye==="combobox",ii=(0,qe.Z)({},wt);Ln.forEach(function(Ai){delete ii[Ai]}),zt==null||zt.forEach(function(Ai){delete ii[Ai]});var si=fe.useState(!1),Fi=(0,ve.Z)(si,2),ci=Fi[0],Si=Fi[1];fe.useEffect(function(){Si((0,He.Z)())},[]);var zi=fe.useRef(null),Gi=fe.useRef(null),Ti=fe.useRef(null),Ui=fe.useRef(null),Ii=fe.useRef(null),rr=fe.useRef(!1),Mr=$e(),Er=(0,ve.Z)(Mr,3),pr=Er[0],lr=Er[1],Ni=Er[2];fe.useImperativeHandle(De,function(){var Ai,vi;return{focus:(Ai=Ui.current)===null||Ai===void 0?void 0:Ai.focus,blur:(vi=Ui.current)===null||vi===void 0?void 0:vi.blur,scrollTo:function(br){var $i;return($i=Ii.current)===null||$i===void 0?void 0:$i.scrollTo(br)},nativeElement:zi.current||Gi.current}});var vr=fe.useMemo(function(){var Ai;if(ye!=="combobox")return Xn;var vi=(Ai=rn[0])===null||Ai===void 0?void 0:Ai.value;return typeof vi=="string"||typeof vi=="number"?String(vi):""},[Xn,ye,rn]),Gr=ye==="combobox"&&typeof kn=="function"&&kn()||null,Ki=typeof qt=="function"&&qt(),kr=(0,Ce.x1)(Gi,Ki==null||(Bt=Ki.props)===null||Bt===void 0?void 0:Bt.ref),Wr=fe.useState(!1),Xi=(0,ve.Z)(Wr,2),ro=Xi[0],sr=Xi[1];(0,et.Z)(function(){sr(!0)},[]);var Hi=(0,Ge.Z)(!1,{defaultValue:Oe,value:Ct}),yr=(0,ve.Z)(Hi,2),Vr=yr[0],Fr=yr[1],Yi=ro?Vr:!1,oo=!Be&&Zn;(ut||oo&&Yi&&ye==="combobox")&&(Yi=!1);var _r=oo?!1:Yi,qn=fe.useCallback(function(Ai){var vi=Ai!==void 0?Ai:!Yi;ut||(Fr(vi),Yi!==vi&&(cn==null||cn(vi)))},[ut,Yi,Fr,cn]),ui=fe.useMemo(function(){return(Nn||[]).some(function(Ai){return[`
`,`\r
`].includes(Ai)})},[Nn]),ri=fe.useContext(ln)||{},xn=ri.maxCount,di=ri.rawValues,Mi=function(vi,mr,br){if(!(Vt&&Mt(xn)&&(di==null?void 0:di.size)>=xn)){var $i=!0,or=vi;Fn==null||Fn(null);var Xr=$t(vi,Nn,Mt(xn)?xn-di.size:void 0),Yr=br?null:Xr;return ye!=="combobox"&&Yr&&(or="",Gn==null||Gn(Yr),qn(!1),$i=!1),Tn&&vr!==or&&Tn(or,{source:mr?"typing":"effect"}),$i}},Nr=function(vi){!vi||!vi.trim()||Tn(vi,{source:"submit"})};fe.useEffect(function(){!Yi&&!Vt&&ye!=="combobox"&&Mi("",!1,!1)},[Yi]),fe.useEffect(function(){Vr&&ut&&Fr(!1),ut&&!rr.current&&lr(!1)},[ut]);var ur=Le(),tr=(0,ve.Z)(ur,2),Qi=tr[0],Ur=tr[1],eo=fe.useRef(!1),Ir=function(vi){var mr=Qi(),br=vi.key,$i=br==="Enter";if($i&&(ye!=="combobox"&&vi.preventDefault(),Yi||qn(!0)),Ur(!!vr),br==="Backspace"&&!mr&&Vt&&!vr&&rn.length){for(var or=(0,Ue.Z)(rn),Xr=null,Yr=or.length-1;Yr>=0;Yr-=1){var lo=or[Yr];if(!lo.disabled){or.splice(Yr,1),Xr=lo;break}}Xr&&_e(or,{type:"remove",values:[Xr]})}for(var Or=arguments.length,Rr=new Array(Or>1?Or-1:0),Jr=1;Jr<Or;Jr++)Rr[Jr-1]=arguments[Jr];if(Yi&&(!$i||!eo.current)){var ho;$i&&(eo.current=!0),(ho=Ii.current)===null||ho===void 0||ho.onKeyDown.apply(ho,[vi].concat(Rr))}gn==null||gn.apply(void 0,[vi].concat(Rr))},to=function(vi){for(var mr=arguments.length,br=new Array(mr>1?mr-1:0),$i=1;$i<mr;$i++)br[$i-1]=arguments[$i];if(Yi){var or;(or=Ii.current)===null||or===void 0||or.onKeyUp.apply(or,[vi].concat(br))}vi.key==="Enter"&&(eo.current=!1),At==null||At.apply(void 0,[vi].concat(br))},ao=function(vi){var mr=rn.filter(function(br){return br!==vi});_e(mr,{type:"remove",values:[vi]})},qr=function(){eo.current=!1},Lo=fe.useRef(!1),Ga=function(){lr(!0),ut||(Pt&&!Lo.current&&Pt.apply(void 0,arguments),gt.includes("focus")&&qn(!0)),Lo.current=!0},ya=function(){rr.current=!0,lr(!1,function(){Lo.current=!1,rr.current=!1,qn(!1)}),!ut&&(vr&&(ye==="tags"?Tn(vr,{source:"submit"}):ye==="multiple"&&Tn("",{source:"blur"})),Nt&&Nt.apply(void 0,arguments))},no=[];fe.useEffect(function(){return function(){no.forEach(function(Ai){return clearTimeout(Ai)}),no.splice(0,no.length)}},[]);var co=function(vi){var mr,br=vi.target,$i=(mr=Ti.current)===null||mr===void 0?void 0:mr.getPopupElement();if($i&&$i.contains(br)){var or=setTimeout(function(){var Or=no.indexOf(or);if(Or!==-1&&no.splice(Or,1),Ni(),!ci&&!$i.contains(document.activeElement)){var Rr;(Rr=Ui.current)===null||Rr===void 0||Rr.focus()}});no.push(or)}for(var Xr=arguments.length,Yr=new Array(Xr>1?Xr-1:0),lo=1;lo<Xr;lo++)Yr[lo-1]=arguments[lo];Tt==null||Tt.apply(void 0,[vi].concat(Yr))},Kr=fe.useState({}),ba=(0,ve.Z)(Kr,2),xa=ba[1];function Va(){xa({})}var wa;Ki&&(wa=function(vi){qn(vi)}),ct(function(){var Ai;return[zi.current,(Ai=Ti.current)===null||Ai===void 0?void 0:Ai.getPopupElement()]},_r,qn,!!Ki);var Ua=fe.useMemo(function(){return(0,qe.Z)((0,qe.Z)({},Ae),{},{notFoundContent:Be,open:Yi,triggerOpen:_r,id:ft,showSearch:en,multiple:Vt,toggleOpen:qn})},[Ae,Be,_r,Yi,ft,en,Vt,qn]),Ko=!!Bn||_n,Yo;Ko&&(Yo=fe.createElement(Se,{className:pe()("".concat(ze,"-arrow"),(0,Ne.Z)({},"".concat(ze,"-arrow-loading"),_n)),customizeIcon:Bn,customizeIconProps:{loading:_n,searchValue:vr,open:Yi,focused:pr,showSearch:en}}));var wo=function(){var vi;Te==null||Te(),(vi=Ui.current)===null||vi===void 0||vi.focus(),_e([],{type:"clear",values:rn}),Mi("",!1,!1)},qo=Xe(ze,wo,rn,jt,Hn,ut,vr,ye),Ca=qo.allowClear,Xo=qo.clearIcon,To=fe.createElement(Wn,{ref:Ii}),Sa=pe()(ze,vt,(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(ze,"-focused"),pr),"".concat(ze,"-multiple"),Vt),"".concat(ze,"-single"),!Vt),"".concat(ze,"-allow-clear"),jt),"".concat(ze,"-show-arrow"),Ko),"".concat(ze,"-disabled"),ut),"".concat(ze,"-loading"),_n),"".concat(ze,"-open"),Yi),"".concat(ze,"-customize-input"),Gr),"".concat(ze,"-show-search"),en)),Mo=fe.createElement(ie,{ref:Ti,disabled:ut,prefixCls:ze,visible:_r,popupElement:To,animation:In,transitionName:Vn,dropdownStyle:ni,dropdownClassName:Sn,direction:nn,dropdownMatchSelectWidth:ei,dropdownRender:jn,dropdownAlign:Ht,placement:Qn,builtinPlacements:Un,getPopupContainer:Ci,empty:Zn,getTriggerDOMNode:function(vi){return Gi.current||vi},onPopupVisibleChange:wa,onPopupMouseEnter:Va},Ki?fe.cloneElement(Ki,{ref:kr}):fe.createElement(Et,(0,ne.Z)({},Ae,{domRef:Gi,prefixCls:ze,inputElement:Gr,ref:Ui,id:ft,prefix:fn,showSearch:en,autoClearSearchValue:Xt,mode:ye,activeDescendantId:On,tagRender:Gt,values:rn,open:Yi,onToggleOpen:qn,activeValue:wn,searchValue:vr,onSearch:Mi,onSearchSubmit:Nr,onRemove:ao,tokenWithEnter:ui,onInputBlur:qr}))),Ar;return Ki?Ar=Mo:Ar=fe.createElement("div",(0,ne.Z)({className:Sa},ii,{ref:zi,onMouseDown:co,onKeyDown:Ir,onKeyUp:to,onFocus:Ga,onBlur:ya}),fe.createElement(hn,{visible:pr&&!Yi,values:rn}),Mo,Yo,Ca&&Xo),fe.createElement(rt.Provider,{value:Ua},Ar)}),st=yn,En=function(){return null};En.isSelectOptGroup=!0;var Ot=En,an=function(){return null};an.isSelectOption=!0;var Cn=an,$n=he(80547),Rt=he(2738),zn=he(6790);function Ei(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var fi=["disabled","title","children","style","className"];function Ri(Ae){return typeof Ae=="string"||typeof Ae=="number"}var Wi=function(De,Bt){var ft=Je(),ze=ft.prefixCls,vt=ft.id,Qt=ft.open,Gt=ft.multiple,nn=ft.mode,zt=ft.searchValue,rn=ft.toggleOpen,_e=ft.notFoundContent,Zn=ft.onPopupScroll,on=fe.useContext(ln),Be=on.maxCount,Te=on.flattenOptions,ye=on.onActiveValue,ut=on.defaultActiveFirstOption,_n=on.onSelect,kn=on.menuItemSelectedIcon,qt=on.rawValues,Ct=on.fieldNames,Oe=on.virtual,cn=on.direction,wn=on.listHeight,Fn=on.listItemHeight,On=on.optionRender,Xn="".concat(ze,"-item"),Xt=(0,$n.Z)(function(){return Te},[Qt,Te],function(Rn,gt){return gt[0]&&Rn[1]!==gt[1]}),Tn=fe.useRef(null),Gn=fe.useMemo(function(){return Gt&&Mt(Be)&&(qt==null?void 0:qt.size)>=Be},[Gt,Be,qt==null?void 0:qt.size]),Nn=function(gt){gt.preventDefault()},jt=function(gt){var Pt;(Pt=Tn.current)===null||Pt===void 0||Pt.scrollTo(typeof gt=="number"?{index:gt}:gt)},fn=fe.useCallback(function(Rn){return nn==="combobox"?!1:qt.has(Rn)},[nn,(0,Ue.Z)(qt).toString(),qt.size]),Bn=function(gt){for(var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Nt=Xt.length,At=0;At<Nt;At+=1){var gn=(gt+At*Pt+Nt)%Nt,Tt=Xt[gn]||{},wt=Tt.group,Vt=Tt.data;if(!wt&&!(Vt!=null&&Vt.disabled)&&(fn(Vt.value)||!Gn))return gn}return-1},Hn=fe.useState(function(){return Bn(0)}),Wn=(0,ve.Z)(Hn,2),In=Wn[0],Vn=Wn[1],ni=function(gt){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Vn(gt);var Nt={source:Pt?"keyboard":"mouse"},At=Xt[gt];if(!At){ye(null,-1,Nt);return}ye(At.value,gt,Nt)};(0,fe.useEffect)(function(){ni(ut!==!1?Bn(0):-1)},[Xt.length,zt]);var Sn=fe.useCallback(function(Rn){return nn==="combobox"?String(Rn).toLowerCase()===zt.toLowerCase():qt.has(Rn)},[nn,zt,(0,Ue.Z)(qt).toString(),qt.size]);(0,fe.useEffect)(function(){var Rn=setTimeout(function(){if(!Gt&&Qt&&qt.size===1){var Pt=Array.from(qt)[0],Nt=Xt.findIndex(function(At){var gn=At.data;return zt?String(gn.value).startsWith(zt):gn.value===Pt});Nt!==-1&&(ni(Nt),jt(Nt))}});if(Qt){var gt;(gt=Tn.current)===null||gt===void 0||gt.scrollTo(void 0)}return function(){return clearTimeout(Rn)}},[Qt,zt]);var ei=function(gt){gt!==void 0&&_n(gt,{selected:!qt.has(gt)}),Gt||rn(!1)};if(fe.useImperativeHandle(Bt,function(){return{onKeyDown:function(gt){var Pt=gt.which,Nt=gt.ctrlKey;switch(Pt){case lt.Z.N:case lt.Z.P:case lt.Z.UP:case lt.Z.DOWN:{var At=0;if(Pt===lt.Z.UP?At=-1:Pt===lt.Z.DOWN?At=1:Ei()&&Nt&&(Pt===lt.Z.N?At=1:Pt===lt.Z.P&&(At=-1)),At!==0){var gn=Bn(In+At,At);jt(gn),ni(gn,!0)}break}case lt.Z.TAB:case lt.Z.ENTER:{var Tt,wt=Xt[In];wt&&!(wt!=null&&(Tt=wt.data)!==null&&Tt!==void 0&&Tt.disabled)&&!Gn?ei(wt.value):ei(void 0),Qt&&gt.preventDefault();break}case lt.Z.ESC:rn(!1),Qt&&gt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(gt){jt(gt)}}}),Xt.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(vt,"_list"),className:"".concat(Xn,"-empty"),onMouseDown:Nn},_e);var jn=Object.keys(Ct).map(function(Rn){return Ct[Rn]}),Ht=function(gt){return gt.label};function Qn(Rn,gt){var Pt=Rn.group;return{role:Pt?"presentation":"option",id:"".concat(vt,"_list_").concat(gt)}}var Un=function(gt){var Pt=Xt[gt];if(!Pt)return null;var Nt=Pt.data||{},At=Nt.value,gn=Pt.group,Tt=(0,Me.Z)(Nt,!0),wt=Ht(Pt);return Pt?fe.createElement("div",(0,ne.Z)({"aria-label":typeof wt=="string"&&!gn?wt:null},Tt,{key:gt},Qn(Pt,gt),{"aria-selected":Sn(At)}),At):null},Ci={role:"listbox",id:"".concat(vt,"_list")};return fe.createElement(fe.Fragment,null,Oe&&fe.createElement("div",(0,ne.Z)({},Ci,{style:{height:0,width:0,overflow:"hidden"}}),Un(In-1),Un(In),Un(In+1)),fe.createElement(zn.Z,{itemKey:"key",ref:Tn,data:Xt,height:wn,itemHeight:Fn,fullHeight:!1,onMouseDown:Nn,onScroll:Zn,virtual:Oe,direction:cn,innerProps:Oe?null:Ci},function(Rn,gt){var Pt=Rn.group,Nt=Rn.groupOption,At=Rn.data,gn=Rn.label,Tt=Rn.value,wt=At.key;if(Pt){var Vt,en=(Vt=At.title)!==null&&Vt!==void 0?Vt:Ri(gn)?gn.toString():void 0;return fe.createElement("div",{className:pe()(Xn,"".concat(Xn,"-group"),At.className),title:en},gn!==void 0?gn:wt)}var ii=At.disabled,si=At.title,Fi=At.children,ci=At.style,Si=At.className,zi=(0,me.Z)(At,fi),Gi=(0,Rt.Z)(zi,jn),Ti=fn(Tt),Ui=ii||!Ti&&Gn,Ii="".concat(Xn,"-option"),rr=pe()(Xn,Ii,Si,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(Ii,"-grouped"),Nt),"".concat(Ii,"-active"),In===gt&&!Ui),"".concat(Ii,"-disabled"),Ui),"".concat(Ii,"-selected"),Ti)),Mr=Ht(Rn),Er=!kn||typeof kn=="function"||Ti,pr=typeof Mr=="number"?Mr:Mr||Tt,lr=Ri(pr)?pr.toString():void 0;return si!==void 0&&(lr=si),fe.createElement("div",(0,ne.Z)({},(0,Me.Z)(Gi),Oe?{}:Qn(Rn,gt),{"aria-selected":Sn(Tt),className:rr,title:lr,onMouseMove:function(){In===gt||Ui||ni(gt)},onClick:function(){Ui||ei(Tt)},style:ci}),fe.createElement("div",{className:"".concat(Ii,"-content")},typeof On=="function"?On(Rn,{index:gt}):pr),fe.isValidElement(kn)||Ti,Er&&fe.createElement(Se,{className:"".concat(Xn,"-option-state"),customizeIcon:kn,customizeIconProps:{value:Tt,disabled:Ui,isSelected:Ti}},Ti?"\u2713":null))}))},Bi=fe.forwardRef(Wi),Li=Bi,ai=function(Ae,De){var Bt=fe.useRef({values:new Map,options:new Map}),ft=fe.useMemo(function(){var vt=Bt.current,Qt=vt.values,Gt=vt.options,nn=Ae.map(function(_e){if(_e.label===void 0){var Zn;return(0,qe.Z)((0,qe.Z)({},_e),{},{label:(Zn=Qt.get(_e.value))===null||Zn===void 0?void 0:Zn.label})}return _e}),zt=new Map,rn=new Map;return nn.forEach(function(_e){zt.set(_e.value,_e),rn.set(_e.value,De.get(_e.value)||Gt.get(_e.value))}),Bt.current.values=zt,Bt.current.options=rn,nn},[Ae,De]),ze=fe.useCallback(function(vt){return De.get(vt)||Bt.current.options.get(vt)},[De]);return[ft,ze]};function wi(Ae,De){return xt(Ae).join("").toUpperCase().includes(De)}var Di=function(Ae,De,Bt,ft,ze){return fe.useMemo(function(){if(!Bt||ft===!1)return Ae;var vt=De.options,Qt=De.label,Gt=De.value,nn=[],zt=typeof ft=="function",rn=Bt.toUpperCase(),_e=zt?ft:function(on,Be){return ze?wi(Be[ze],rn):Be[vt]?wi(Be[Qt!=="children"?Qt:"label"],rn):wi(Be[Gt],rn)},Zn=zt?function(on){return St(on)}:function(on){return on};return Ae.forEach(function(on){if(on[vt]){var Be=_e(Bt,Zn(on));if(Be)nn.push(on);else{var Te=on[vt].filter(function(ye){return _e(Bt,Zn(ye))});Te.length&&nn.push((0,qe.Z)((0,qe.Z)({},on),{},(0,Ne.Z)({},vt,Te)))}return}_e(Bt,Zn(on))&&nn.push(on)}),nn},[Ae,ft,ze,Bt,De])},li=he(6551),xi=he(11592),gi=["children","value"],_i=["children"];function bn(Ae){var De=Ae,Bt=De.key,ft=De.props,ze=ft.children,vt=ft.value,Qt=(0,me.Z)(ft,gi);return(0,qe.Z)({key:Bt,value:vt!==void 0?vt:Bt,children:ze},Qt)}function Dn(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,xi.Z)(Ae).map(function(Bt,ft){if(!fe.isValidElement(Bt)||!Bt.type)return null;var ze=Bt,vt=ze.type.isSelectOptGroup,Qt=ze.key,Gt=ze.props,nn=Gt.children,zt=(0,me.Z)(Gt,_i);return De||!vt?bn(Bt):(0,qe.Z)((0,qe.Z)({key:"__RC_SELECT_GRP__".concat(Qt===null?ft:Qt,"__"),label:Qt},zt),{},{options:Dn(nn)})}).filter(function(Bt){return Bt})}var Kn=function(De,Bt,ft,ze,vt){return fe.useMemo(function(){var Qt=De,Gt=!De;Gt&&(Qt=Dn(Bt));var nn=new Map,zt=new Map,rn=function(on,Be,Te){Te&&typeof Te=="string"&&on.set(Be[Te],Be)},_e=function Zn(on){for(var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=0;Te<on.length;Te+=1){var ye=on[Te];!ye[ft.options]||Be?(nn.set(ye[ft.value],ye),rn(zt,ye,ft.label),rn(zt,ye,ze),rn(zt,ye,vt)):Zn(ye[ft.options],!0)}};return _e(Qt),{options:Qt,valueOptions:nn,labelOptions:zt}},[De,Bt,ft,ze,vt])},Pn=Kn;function mi(Ae){var De=fe.useRef();De.current=Ae;var Bt=fe.useCallback(function(){return De.current.apply(De,arguments)},[]);return Bt}function yi(Ae){var De=Ae.mode,Bt=Ae.options,ft=Ae.children,ze=Ae.backfill,vt=Ae.allowClear,Qt=Ae.placeholder,Gt=Ae.getInputElement,nn=Ae.showSearch,zt=Ae.onSearch,rn=Ae.defaultOpen,_e=Ae.autoFocus,Zn=Ae.labelInValue,on=Ae.value,Be=Ae.inputValue,Te=Ae.optionLabelProp,ye=isMultiple(De),ut=nn!==void 0?nn:ye||De==="combobox",_n=Bt||convertChildrenToData(ft);if(warning(De!=="tags"||_n.every(function(Oe){return!Oe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),De==="tags"||De==="combobox"){var kn=_n.some(function(Oe){return Oe.options?Oe.options.some(function(cn){return typeof("value"in cn?cn.value:cn.key)=="number"}):typeof("value"in Oe?Oe.value:Oe.key)=="number"});warning(!kn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(De!=="combobox"||!Te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(De==="combobox"||!ze,"`backfill` only works with `combobox` mode."),warning(De==="combobox"||!Gt,"`getInputElement` only work with `combobox` mode."),noteOnce(De!=="combobox"||!Gt||!vt||!Qt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),zt&&!ut&&De!=="combobox"&&De!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!rn||_e,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),on!=null){var qt=toArray(on);warning(!Zn||qt.every(function(Oe){return _typeof(Oe)==="object"&&("key"in Oe||"value"in Oe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ye||Array.isArray(on),"`value` should be array when `mode` is `multiple` or `tags`")}if(ft){var Ct=null;toNodeArray(ft).some(function(Oe){if(!React.isValidElement(Oe)||!Oe.type)return!1;var cn=Oe,wn=cn.type;if(wn.isSelectOption)return!1;if(wn.isSelectOptGroup){var Fn=toNodeArray(Oe.props.children).every(function(On){return!React.isValidElement(On)||!Oe.type||On.type.isSelectOption?!0:(Ct=On.type,!1)});return!Fn}return Ct=wn,!0}),Ct&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ct.displayName||Ct.name||Ct,"`.")),warning(Be===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Pi(Ae,De){if(Ae){var Bt=function ft(ze){for(var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qt=0;Qt<ze.length;Qt++){var Gt=ze[Qt];if(Gt[De==null?void 0:De.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!vt&&Array.isArray(Gt[De==null?void 0:De.options])&&ft(Gt[De==null?void 0:De.options],!0))break}};Bt(Ae)}}var hi=null,oi=["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"],ki=["inputValue"];function Zt(Ae){return!Ae||(0,Re.Z)(Ae)!=="object"}var ot=fe.forwardRef(function(Ae,De){var Bt=Ae.id,ft=Ae.mode,ze=Ae.prefixCls,vt=ze===void 0?"rc-select":ze,Qt=Ae.backfill,Gt=Ae.fieldNames,nn=Ae.inputValue,zt=Ae.searchValue,rn=Ae.onSearch,_e=Ae.autoClearSearchValue,Zn=_e===void 0?!0:_e,on=Ae.onSelect,Be=Ae.onDeselect,Te=Ae.dropdownMatchSelectWidth,ye=Te===void 0?!0:Te,ut=Ae.filterOption,_n=Ae.filterSort,kn=Ae.optionFilterProp,qt=Ae.optionLabelProp,Ct=Ae.options,Oe=Ae.optionRender,cn=Ae.children,wn=Ae.defaultActiveFirstOption,Fn=Ae.menuItemSelectedIcon,On=Ae.virtual,Xn=Ae.direction,Xt=Ae.listHeight,Tn=Xt===void 0?200:Xt,Gn=Ae.listItemHeight,Nn=Gn===void 0?20:Gn,jt=Ae.labelRender,fn=Ae.value,Bn=Ae.defaultValue,Hn=Ae.labelInValue,Wn=Ae.onChange,In=Ae.maxCount,Vn=(0,me.Z)(Ae,oi),ni=(0,li.ZP)(Bt),Sn=sn(ft),ei=!!(!Ct&&cn),jn=fe.useMemo(function(){return ut===void 0&&ft==="combobox"?!1:ut},[ut,ft]),Ht=fe.useMemo(function(){return kt(Gt,ei)},[JSON.stringify(Gt),ei]),Qn=(0,Ge.Z)("",{value:zt!==void 0?zt:nn,postState:function(ui){return ui||""}}),Un=(0,ve.Z)(Qn,2),Ci=Un[0],Rn=Un[1],gt=Pn(Ct,cn,Ht,kn,qt),Pt=gt.valueOptions,Nt=gt.labelOptions,At=gt.options,gn=fe.useCallback(function(qn){var ui=xt(qn);return ui.map(function(ri){var xn,di,Mi,Nr,ur;if(Zt(ri))xn=ri;else{var tr;Mi=ri.key,di=ri.label,xn=(tr=ri.value)!==null&&tr!==void 0?tr:Mi}var Qi=Pt.get(xn);if(Qi){var Ur;if(di===void 0&&(di=Qi==null?void 0:Qi[qt||Ht.label]),Mi===void 0&&(Mi=(Ur=Qi==null?void 0:Qi.key)!==null&&Ur!==void 0?Ur:xn),Nr=Qi==null?void 0:Qi.disabled,ur=Qi==null?void 0:Qi.title,0)var eo}return{label:di,value:xn,key:Mi,disabled:Nr,title:ur}})},[Ht,qt,Pt]),Tt=(0,Ge.Z)(Bn,{value:fn}),wt=(0,ve.Z)(Tt,2),Vt=wt[0],en=wt[1],ii=fe.useMemo(function(){var qn,ui=Sn&&Vt===null?[]:Vt,ri=gn(ui);return ft==="combobox"&&de((qn=ri[0])===null||qn===void 0?void 0:qn.value)?[]:ri},[Vt,gn,ft,Sn]),si=ai(ii,Pt),Fi=(0,ve.Z)(si,2),ci=Fi[0],Si=Fi[1],zi=fe.useMemo(function(){if(!ft&&ci.length===1){var qn=ci[0];if(qn.value===null&&(qn.label===null||qn.label===void 0))return[]}return ci.map(function(ui){var ri;return(0,qe.Z)((0,qe.Z)({},ui),{},{label:(ri=typeof jt=="function"?jt(ui):ui.label)!==null&&ri!==void 0?ri:ui.value})})},[ft,ci,jt]),Gi=fe.useMemo(function(){return new Set(ci.map(function(qn){return qn.value}))},[ci]);fe.useEffect(function(){if(ft==="combobox"){var qn,ui=(qn=ci[0])===null||qn===void 0?void 0:qn.value;Rn(ge(ui)?String(ui):"")}},[ci]);var Ti=mi(function(qn,ui){var ri=ui!=null?ui:qn;return(0,Ne.Z)((0,Ne.Z)({},Ht.value,qn),Ht.label,ri)}),Ui=fe.useMemo(function(){if(ft!=="tags")return At;var qn=(0,Ue.Z)(At),ui=function(xn){return Pt.has(xn)};return(0,Ue.Z)(ci).sort(function(ri,xn){return ri.value<xn.value?-1:1}).forEach(function(ri){var xn=ri.value;ui(xn)||qn.push(Ti(xn,ri.label))}),qn},[Ti,At,Pt,ci,ft]),Ii=Di(Ui,Ht,Ci,jn,kn),rr=fe.useMemo(function(){return ft!=="tags"||!Ci||Ii.some(function(qn){return qn[kn||"value"]===Ci})||Ii.some(function(qn){return qn[Ht.value]===Ci})?Ii:[Ti(Ci)].concat((0,Ue.Z)(Ii))},[Ti,kn,ft,Ii,Ci,Ht]),Mr=function qn(ui){var ri=(0,Ue.Z)(ui).sort(function(xn,di){return _n(xn,di,{searchValue:Ci})});return ri.map(function(xn){return Array.isArray(xn.options)?(0,qe.Z)((0,qe.Z)({},xn),{},{options:xn.options.length>0?qn(xn.options):xn.options}):xn})},Er=fe.useMemo(function(){return _n?Mr(rr):rr},[rr,_n,Ci]),pr=fe.useMemo(function(){return pt(Er,{fieldNames:Ht,childrenAsData:ei})},[Er,Ht,ei]),lr=function(ui){var ri=gn(ui);if(en(ri),Wn&&(ri.length!==ci.length||ri.some(function(Mi,Nr){var ur;return((ur=ci[Nr])===null||ur===void 0?void 0:ur.value)!==(Mi==null?void 0:Mi.value)}))){var xn=Hn?ri:ri.map(function(Mi){return Mi.value}),di=ri.map(function(Mi){return St(Si(Mi.value))});Wn(Sn?xn:xn[0],Sn?di:di[0])}},Ni=fe.useState(null),vr=(0,ve.Z)(Ni,2),Gr=vr[0],Ki=vr[1],kr=fe.useState(0),Wr=(0,ve.Z)(kr,2),Xi=Wr[0],ro=Wr[1],sr=wn!==void 0?wn:ft!=="combobox",Hi=fe.useCallback(function(qn,ui){var ri=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},xn=ri.source,di=xn===void 0?"keyboard":xn;ro(ui),Qt&&ft==="combobox"&&qn!==null&&di==="keyboard"&&Ki(String(qn))},[Qt,ft]),yr=function(ui,ri,xn){var di=function(){var ao,qr=Si(ui);return[Hn?{label:qr==null?void 0:qr[Ht.label],value:ui,key:(ao=qr==null?void 0:qr.key)!==null&&ao!==void 0?ao:ui}:ui,St(qr)]};if(ri&&on){var Mi=di(),Nr=(0,ve.Z)(Mi,2),ur=Nr[0],tr=Nr[1];on(ur,tr)}else if(!ri&&Be&&xn!=="clear"){var Qi=di(),Ur=(0,ve.Z)(Qi,2),eo=Ur[0],Ir=Ur[1];Be(eo,Ir)}},Vr=mi(function(qn,ui){var ri,xn=Sn?ui.selected:!0;xn?ri=Sn?[].concat((0,Ue.Z)(ci),[qn]):[qn]:ri=ci.filter(function(di){return di.value!==qn}),lr(ri),yr(qn,xn),ft==="combobox"?Ki(""):(!sn||Zn)&&(Rn(""),Ki(""))}),Fr=function(ui,ri){lr(ui);var xn=ri.type,di=ri.values;(xn==="remove"||xn==="clear")&&di.forEach(function(Mi){yr(Mi.value,!1,xn)})},Yi=function(ui,ri){if(Rn(ui),Ki(null),ri.source==="submit"){var xn=(ui||"").trim();if(xn){var di=Array.from(new Set([].concat((0,Ue.Z)(Gi),[xn])));lr(di),yr(xn,!0),Rn("")}return}ri.source!=="blur"&&(ft==="combobox"&&lr(ui),rn==null||rn(ui))},oo=function(ui){var ri=ui;ft!=="tags"&&(ri=ui.map(function(di){var Mi=Nt.get(di);return Mi==null?void 0:Mi.value}).filter(function(di){return di!==void 0}));var xn=Array.from(new Set([].concat((0,Ue.Z)(Gi),(0,Ue.Z)(ri))));lr(xn),xn.forEach(function(di){yr(di,!0)})},_r=fe.useMemo(function(){var qn=On!==!1&&ye!==!1;return(0,qe.Z)((0,qe.Z)({},gt),{},{flattenOptions:pr,onActiveValue:Hi,defaultActiveFirstOption:sr,onSelect:Vr,menuItemSelectedIcon:Fn,rawValues:Gi,fieldNames:Ht,virtual:qn,direction:Xn,listHeight:Tn,listItemHeight:Nn,childrenAsData:ei,maxCount:In,optionRender:Oe})},[In,gt,pr,Hi,sr,Vr,Fn,Gi,Ht,On,ye,Xn,Tn,Nn,ei,Oe]);return fe.createElement(ln.Provider,{value:_r},fe.createElement(st,(0,ne.Z)({},Vn,{id:ni,prefixCls:vt,ref:De,omitDomProps:ki,mode:ft,displayValues:zi,onDisplayValuesChange:Fr,direction:Xn,searchValue:Ci,onSearch:Yi,autoClearSearchValue:Zn,onSearchSplit:oo,dropdownMatchSelectWidth:ye,OptionList:Li,emptyOptions:!pr.length,activeValue:Gr,activeDescendantId:"".concat(ni,"_list_").concat(Xi)})))}),un=ot;un.Option=Cn,un.OptGroup=Ot;var Jn=un,pi=Jn},63158:function(It,Wt,he){"use strict";var ne=he(32855),Ue=he(74430),Ne=he(11913),qe=he(43079),ve=he(59301),me=he(92310),Re=he.n(me),Ge=he(18929),we=he(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ke=ve.forwardRef(function(pe,et){var He,Ce=pe.prefixCls,Ee=Ce===void 0?"rc-switch":Ce,Se=pe.className,Xe=pe.checked,rt=pe.defaultChecked,Je=pe.disabled,$e=pe.loadingIcon,Le=pe.checkedChildren,ct=pe.unCheckedChildren,lt=pe.onClick,Ut=pe.onChange,Me=pe.onKeyDown,Ze=(0,qe.Z)(pe,fe),nt=(0,Ge.Z)(!1,{value:Xe,defaultValue:rt}),Pe=(0,Ne.Z)(nt,2),Qe=Pe[0],Fe=Pe[1];function it(Lt,ge){var de=Qe;return Je||(de=Lt,Fe(de),Ut==null||Ut(de,ge)),de}function Kt(Lt){Lt.which===we.Z.LEFT?it(!1,Lt):Lt.which===we.Z.RIGHT&&it(!0,Lt),Me==null||Me(Lt)}function xt(Lt){var ge=it(!Qe,Lt);lt==null||lt(ge,Lt)}var mn=Re()(Ee,Se,(He={},(0,Ue.Z)(He,"".concat(Ee,"-checked"),Qe),(0,Ue.Z)(He,"".concat(Ee,"-disabled"),Je),He));return ve.createElement("button",(0,ne.Z)({},Ze,{type:"button",role:"switch","aria-checked":Qe,disabled:Je,className:mn,ref:et,onKeyDown:Kt,onClick:xt}),$e,ve.createElement("span",{className:"".concat(Ee,"-inner")},ve.createElement("span",{className:"".concat(Ee,"-inner-checked")},Le),ve.createElement("span",{className:"".concat(Ee,"-inner-unchecked")},ct)))});Ke.displayName="Switch",Wt.Z=Ke},22711:function(It,Wt,he){"use strict";he.r(Wt),he.d(Wt,{ResizableTextArea:function(){return Pe},default:function(){return Kt}});var ne=he(32855),Ue=he(74430),Ne=he(27247),qe=he(3300),ve=he(11913),me=he(43079),Re=he(92310),Ge=he.n(Re),we=he(36901),fe=he(66003),Ke=he(30292),pe=he(18929),et=he(59301),He=he(34666),Ce=he(29301),Ee=he(34280),Se=he(16089),Xe=`
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;
`,rt=["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"],Je={},$e;function Le(xt){var mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Lt=xt.getAttribute("id")||xt.getAttribute("data-reactid")||xt.getAttribute("name");if(mn&&Je[Lt])return Je[Lt];var ge=window.getComputedStyle(xt),de=ge.getPropertyValue("box-sizing")||ge.getPropertyValue("-moz-box-sizing")||ge.getPropertyValue("-webkit-box-sizing"),dt=parseFloat(ge.getPropertyValue("padding-bottom"))+parseFloat(ge.getPropertyValue("padding-top")),Jt=parseFloat(ge.getPropertyValue("border-bottom-width"))+parseFloat(ge.getPropertyValue("border-top-width")),yt=rt.map(function(tt){return"".concat(tt,":").concat(ge.getPropertyValue(tt))}).join(";"),Ie={sizingStyle:yt,paddingSize:dt,borderSize:Jt,boxSizing:de};return mn&&Lt&&(Je[Lt]=Ie),Ie}function ct(xt){var mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;$e||($e=document.createElement("textarea"),$e.setAttribute("tab-index","-1"),$e.setAttribute("aria-hidden","true"),$e.setAttribute("name","hiddenTextarea"),document.body.appendChild($e)),xt.getAttribute("wrap")?$e.setAttribute("wrap",xt.getAttribute("wrap")):$e.removeAttribute("wrap");var de=Le(xt,mn),dt=de.paddingSize,Jt=de.borderSize,yt=de.boxSizing,Ie=de.sizingStyle;$e.setAttribute("style","".concat(Ie,";").concat(Xe)),$e.value=xt.value||xt.placeholder||"";var tt=void 0,at=void 0,dn,ht=$e.scrollHeight;if(yt==="border-box"?ht+=Jt:yt==="content-box"&&(ht-=dt),Lt!==null||ge!==null){$e.value=" ";var Dt=$e.scrollHeight-dt;Lt!==null&&(tt=Dt*Lt,yt==="border-box"&&(tt=tt+dt+Jt),ht=Math.max(tt,ht)),ge!==null&&(at=Dt*ge,yt==="border-box"&&(at=at+dt+Jt),dn=ht>at?"":"hidden",ht=Math.min(at,ht))}var We={height:ht,overflowY:dn,resize:"none"};return tt&&(We.minHeight=tt),at&&(We.maxHeight=at),We}var lt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ut=0,Me=1,Ze=2,nt=et.forwardRef(function(xt,mn){var Lt=xt,ge=Lt.prefixCls,de=Lt.defaultValue,dt=Lt.value,Jt=Lt.autoSize,yt=Lt.onResize,Ie=Lt.className,tt=Lt.style,at=Lt.disabled,dn=Lt.onChange,ht=Lt.onInternalAutoSize,Dt=(0,me.Z)(Lt,lt),We=(0,pe.Z)(de,{value:dt,postState:function(Cn){return Cn!=null?Cn:""}}),mt=(0,ve.Z)(We,2),Et=mt[0],ae=mt[1],te=function(Cn){ae(Cn.target.value),dn==null||dn(Cn)},z=et.useRef();et.useImperativeHandle(mn,function(){return{textArea:z.current}});var oe=et.useMemo(function(){return Jt&&(0,He.Z)(Jt)==="object"?[Jt.minRows,Jt.maxRows]:[]},[Jt]),se=(0,ve.Z)(oe,2),ie=se[0],xe=se[1],Ve=!!Jt,Mt=function(){try{if(document.activeElement===z.current){var Cn=z.current,$n=Cn.selectionStart,Rt=Cn.selectionEnd,zn=Cn.scrollTop;z.current.setSelectionRange($n,Rt),z.current.scrollTop=zn}}catch(Ei){}},kt=et.useState(Ze),pt=(0,ve.Z)(kt,2),St=pt[0],$t=pt[1],Yt=et.useState(),ln=(0,ve.Z)(Yt,2),hn=ln[0],Ft=ln[1],Ln=function(){$t(Ut)};(0,Ee.Z)(function(){Ve&&Ln()},[dt,ie,xe,Ve]),(0,Ee.Z)(function(){if(St===Ut)$t(Me);else if(St===Me){var an=ct(z.current,!1,ie,xe);$t(Ze),Ft(an)}else Mt()},[St]);var sn=et.useRef(),yn=function(){Se.Z.cancel(sn.current)},st=function(Cn){St===Ze&&(yt==null||yt(Cn),Jt&&(yn(),sn.current=(0,Se.Z)(function(){Ln()})))};et.useEffect(function(){return yn},[]);var En=Ve?hn:null,Ot=(0,Ne.Z)((0,Ne.Z)({},tt),En);return(St===Ut||St===Me)&&(Ot.overflowY="hidden",Ot.overflowX="hidden"),et.createElement(Ce.Z,{onResize:st,disabled:!(Jt||yt)},et.createElement("textarea",(0,ne.Z)({},Dt,{ref:z,style:Ot,className:Ge()(ge,Ie,(0,Ue.Z)({},"".concat(ge,"-disabled"),at)),disabled:at,value:Et,onChange:te})))}),Pe=nt,Qe=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Fe=et.forwardRef(function(xt,mn){var Lt,ge=xt.defaultValue,de=xt.value,dt=xt.onFocus,Jt=xt.onBlur,yt=xt.onChange,Ie=xt.allowClear,tt=xt.maxLength,at=xt.onCompositionStart,dn=xt.onCompositionEnd,ht=xt.suffix,Dt=xt.prefixCls,We=Dt===void 0?"rc-textarea":Dt,mt=xt.showCount,Et=xt.count,ae=xt.className,te=xt.style,z=xt.disabled,oe=xt.hidden,se=xt.classNames,ie=xt.styles,xe=xt.onResize,Ve=xt.onClear,Mt=xt.onPressEnter,kt=xt.readOnly,pt=xt.autoSize,St=xt.onKeyDown,$t=(0,me.Z)(xt,Qe),Yt=(0,pe.Z)(ge,{value:de,defaultValue:ge}),ln=(0,ve.Z)(Yt,2),hn=ln[0],Ft=ln[1],Ln=hn==null?"":String(hn),sn=et.useState(!1),yn=(0,ve.Z)(sn,2),st=yn[0],En=yn[1],Ot=et.useRef(!1),an=et.useState(null),Cn=(0,ve.Z)(an,2),$n=Cn[0],Rt=Cn[1],zn=(0,et.useRef)(null),Ei=(0,et.useRef)(null),fi=function(){var un;return(un=Ei.current)===null||un===void 0?void 0:un.textArea},Ri=function(){fi().focus()};(0,et.useImperativeHandle)(mn,function(){var ot;return{resizableTextArea:Ei.current,focus:Ri,blur:function(){fi().blur()},nativeElement:((ot=zn.current)===null||ot===void 0?void 0:ot.nativeElement)||fi()}}),(0,et.useEffect)(function(){En(function(ot){return!z&&ot})},[z]);var Wi=et.useState(null),Bi=(0,ve.Z)(Wi,2),Li=Bi[0],ai=Bi[1];et.useEffect(function(){if(Li){var ot;(ot=fi()).setSelectionRange.apply(ot,(0,qe.Z)(Li))}},[Li]);var wi=(0,fe.Z)(Et,mt),Di=(Lt=wi.max)!==null&&Lt!==void 0?Lt:tt,li=Number(Di)>0,xi=wi.strategy(Ln),gi=!!Di&&xi>Di,_i=function(un,Jn){var pi=Jn;!Ot.current&&wi.exceedFormatter&&wi.max&&wi.strategy(Jn)>wi.max&&(pi=wi.exceedFormatter(Jn,{max:wi.max}),Jn!==pi&&ai([fi().selectionStart||0,fi().selectionEnd||0])),Ft(pi),(0,Ke.rJ)(un.currentTarget,un,yt,pi)},bn=function(un){Ot.current=!0,at==null||at(un)},Dn=function(un){Ot.current=!1,_i(un,un.currentTarget.value),dn==null||dn(un)},Kn=function(un){_i(un,un.target.value)},Pn=function(un){un.key==="Enter"&&Mt&&Mt(un),St==null||St(un)},mi=function(un){En(!0),dt==null||dt(un)},yi=function(un){En(!1),Jt==null||Jt(un)},Pi=function(un){Ft(""),Ri(),(0,Ke.rJ)(fi(),un,yt)},hi=ht,oi;wi.show&&(wi.showFormatter?oi=wi.showFormatter({value:Ln,count:xi,maxLength:Di}):oi="".concat(xi).concat(li?" / ".concat(Di):""),hi=et.createElement(et.Fragment,null,hi,et.createElement("span",{className:Ge()("".concat(We,"-data-count"),se==null?void 0:se.count),style:ie==null?void 0:ie.count},oi)));var ki=function(un){var Jn;xe==null||xe(un),(Jn=fi())!==null&&Jn!==void 0&&Jn.style.height&&Rt(!0)},Zt=!pt&&!mt&&!Ie;return et.createElement(we.BaseInput,{ref:zn,value:Ln,allowClear:Ie,handleReset:Pi,suffix:hi,prefixCls:We,classNames:(0,Ne.Z)((0,Ne.Z)({},se),{},{affixWrapper:Ge()(se==null?void 0:se.affixWrapper,(0,Ue.Z)((0,Ue.Z)({},"".concat(We,"-show-count"),mt),"".concat(We,"-textarea-allow-clear"),Ie))}),disabled:z,focused:st,className:Ge()(ae,gi&&"".concat(We,"-out-of-range")),style:(0,Ne.Z)((0,Ne.Z)({},te),$n&&!Zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof oi=="string"?oi:void 0}},hidden:oe,readOnly:kt,onClear:Ve},et.createElement(Pe,(0,ne.Z)({},$t,{autoSize:pt,maxLength:tt,onKeyDown:Pn,onChange:Kn,onFocus:mi,onBlur:yi,onCompositionStart:bn,onCompositionEnd:Dn,className:Ge()(se==null?void 0:se.textarea),style:(0,Ne.Z)((0,Ne.Z)({},ie==null?void 0:ie.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:We,onResize:ki,ref:Ei,readOnly:kt})))}),it=Fe,Kt=it},6790:function(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Et}});var ne=he(32855),Ue=he(34666),Ne=he(27247),qe=he(74430),ve=he(11913),me=he(43079),Re=he(92310),Ge=he.n(Re),we=he(29301),fe=he(70425),Ke=he(34280),pe=he(59301),et=he(4676),He=pe.forwardRef(function(ae,te){var z=ae.height,oe=ae.offsetY,se=ae.offsetX,ie=ae.children,xe=ae.prefixCls,Ve=ae.onInnerResize,Mt=ae.innerProps,kt=ae.rtl,pt=ae.extra,St={},$t={display:"flex",flexDirection:"column"};return oe!==void 0&&(St={height:z,position:"relative",overflow:"hidden"},$t=(0,Ne.Z)((0,Ne.Z)({},$t),{},(0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)({transform:"translateY(".concat(oe,"px)")},kt?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),pe.createElement("div",{style:St},pe.createElement(we.Z,{onResize:function(ln){var hn=ln.offsetHeight;hn&&Ve&&Ve()}},pe.createElement("div",(0,ne.Z)({style:$t,className:Ge()((0,qe.Z)({},"".concat(xe,"-holder-inner"),xe)),ref:te},Mt),ie,pt)))});He.displayName="Filler";var Ce=He;function Ee(ae){var te=ae.children,z=ae.setRef,oe=pe.useCallback(function(se){z(se)},[]);return pe.cloneElement(te,{ref:oe})}function Se(ae,te,z,oe,se,ie,xe,Ve){var Mt=Ve.getKey;return ae.slice(te,z+1).map(function(kt,pt){var St=te+pt,$t=xe(kt,St,{style:{width:oe},offsetX:se}),Yt=Mt(kt);return pe.createElement(Ee,{key:Yt,setRef:function(hn){return ie(kt,hn)}},$t)})}function Xe(ae,te,z,oe){var se=z-ae,ie=te-z,xe=Math.min(se,ie)*2;if(oe<=xe){var Ve=Math.floor(oe/2);return oe%2?z+Ve+1:z-Ve}return se>ie?z-(oe-ie):z+(oe-se)}function rt(ae,te,z){var oe=ae.length,se=te.length,ie,xe;if(oe===0&&se===0)return null;oe<se?(ie=ae,xe=te):(ie=te,xe=ae);var Ve={__EMPTY_ITEM__:!0};function Mt(ln){return ln!==void 0?z(ln):Ve}for(var kt=null,pt=Math.abs(oe-se)!==1,St=0;St<xe.length;St+=1){var $t=Mt(ie[St]),Yt=Mt(xe[St]);if($t!==Yt){kt=St,pt=pt||$t!==Mt(xe[St+1]);break}}return kt===null?null:{index:kt,multiple:pt}}function Je(ae,te,z){var oe=pe.useState(ae),se=(0,ve.Z)(oe,2),ie=se[0],xe=se[1],Ve=pe.useState(null),Mt=(0,ve.Z)(Ve,2),kt=Mt[0],pt=Mt[1];return pe.useEffect(function(){var St=rt(ie||[],ae||[],te);(St==null?void 0:St.index)!==void 0&&(z==null||z(St.index),pt(ae[St.index])),xe(ae)},[ae]),[kt]}var $e=he(16089),Le=(typeof navigator=="undefined"?"undefined":(0,Ue.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ct=Le,lt=function(ae,te,z,oe){var se=(0,pe.useRef)(!1),ie=(0,pe.useRef)(null);function xe(){clearTimeout(ie.current),se.current=!0,ie.current=setTimeout(function(){se.current=!1},50)}var Ve=(0,pe.useRef)({top:ae,bottom:te,left:z,right:oe});return Ve.current.top=ae,Ve.current.bottom=te,Ve.current.left=z,Ve.current.right=oe,function(Mt,kt){var pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,St=Mt?kt<0&&Ve.current.left||kt>0&&Ve.current.right:kt<0&&Ve.current.top||kt>0&&Ve.current.bottom;return pt&&St?(clearTimeout(ie.current),se.current=!1):(!St||se.current)&&xe(),!se.current&&St}};function Ut(ae,te,z,oe,se,ie,xe){var Ve=(0,pe.useRef)(0),Mt=(0,pe.useRef)(null),kt=(0,pe.useRef)(null),pt=(0,pe.useRef)(!1),St=lt(te,z,oe,se);function $t(sn,yn){if($e.Z.cancel(Mt.current),!St(!1,yn)){var st=sn;if(!st._virtualHandled)st._virtualHandled=!0;else return;Ve.current+=yn,kt.current=yn,ct||st.preventDefault(),Mt.current=(0,$e.Z)(function(){var En=pt.current?10:1;xe(Ve.current*En,!1),Ve.current=0})}}function Yt(sn,yn){xe(yn,!0),ct||sn.preventDefault()}var ln=(0,pe.useRef)(null),hn=(0,pe.useRef)(null);function Ft(sn){if(ae){$e.Z.cancel(hn.current),hn.current=(0,$e.Z)(function(){ln.current=null},2);var yn=sn.deltaX,st=sn.deltaY,En=sn.shiftKey,Ot=yn,an=st;(ln.current==="sx"||!ln.current&&En&&st&&!yn)&&(Ot=st,an=0,ln.current="sx");var Cn=Math.abs(Ot),$n=Math.abs(an);ln.current===null&&(ln.current=ie&&Cn>$n?"x":"y"),ln.current==="y"?$t(sn,an):Yt(sn,Ot)}}function Ln(sn){ae&&(pt.current=sn.detail===kt.current)}return[Ft,Ln]}function Me(ae,te,z,oe){var se=pe.useMemo(function(){return[new Map,[]]},[ae,z.id,oe]),ie=(0,ve.Z)(se,2),xe=ie[0],Ve=ie[1],Mt=function(pt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt,$t=xe.get(pt),Yt=xe.get(St);if($t===void 0||Yt===void 0)for(var ln=ae.length,hn=Ve.length;hn<ln;hn+=1){var Ft,Ln=ae[hn],sn=te(Ln);xe.set(sn,hn);var yn=(Ft=z.get(sn))!==null&&Ft!==void 0?Ft:oe;if(Ve[hn]=(Ve[hn-1]||0)+yn,sn===pt&&($t=hn),sn===St&&(Yt=hn),$t!==void 0&&Yt!==void 0)break}return{top:Ve[$t-1]||0,bottom:Ve[Yt]}};return Mt}var Ze=he(33377),nt=he(93912),Pe=function(){function ae(){(0,Ze.Z)(this,ae),(0,qe.Z)(this,"maps",void 0),(0,qe.Z)(this,"id",0),(0,qe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,nt.Z)(ae,[{key:"set",value:function(z,oe){this.diffRecords.set(z,this.maps[z]),this.maps[z]=oe,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ae}(),Qe=Pe;function Fe(ae){var te=parseFloat(ae);return isNaN(te)?0:te}function it(ae,te,z){var oe=pe.useState(0),se=(0,ve.Z)(oe,2),ie=se[0],xe=se[1],Ve=(0,pe.useRef)(new Map),Mt=(0,pe.useRef)(new Qe),kt=(0,pe.useRef)(0);function pt(){kt.current+=1}function St(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;pt();var ln=function(){var Ln=!1;Ve.current.forEach(function(sn,yn){if(sn&&sn.offsetParent){var st=sn.offsetHeight,En=getComputedStyle(sn),Ot=En.marginTop,an=En.marginBottom,Cn=Fe(Ot),$n=Fe(an),Rt=st+Cn+$n;Mt.current.get(yn)!==Rt&&(Mt.current.set(yn,Rt),Ln=!0)}}),Ln&&xe(function(sn){return sn+1})};if(Yt)ln();else{kt.current+=1;var hn=kt.current;Promise.resolve().then(function(){hn===kt.current&&ln()})}}function $t(Yt,ln){var hn=ae(Yt),Ft=Ve.current.get(hn);ln?(Ve.current.set(hn,ln),St()):Ve.current.delete(hn),!Ft!=!ln&&(ln?te==null||te(Yt):z==null||z(Yt))}return(0,pe.useEffect)(function(){return pt},[]),[$t,St,Mt.current,ie]}var Kt=14/15;function xt(ae,te,z){var oe=(0,pe.useRef)(!1),se=(0,pe.useRef)(0),ie=(0,pe.useRef)(0),xe=(0,pe.useRef)(null),Ve=(0,pe.useRef)(null),Mt,kt=function(Yt){if(oe.current){var ln=Math.ceil(Yt.touches[0].pageX),hn=Math.ceil(Yt.touches[0].pageY),Ft=se.current-ln,Ln=ie.current-hn,sn=Math.abs(Ft)>Math.abs(Ln);sn?se.current=ln:ie.current=hn;var yn=z(sn,sn?Ft:Ln,!1,Yt);yn&&Yt.preventDefault(),clearInterval(Ve.current),yn&&(Ve.current=setInterval(function(){sn?Ft*=Kt:Ln*=Kt;var st=Math.floor(sn?Ft:Ln);(!z(sn,st,!0)||Math.abs(st)<=.1)&&clearInterval(Ve.current)},16))}},pt=function(){oe.current=!1,Mt()},St=function(Yt){Mt(),Yt.touches.length===1&&!oe.current&&(oe.current=!0,se.current=Math.ceil(Yt.touches[0].pageX),ie.current=Math.ceil(Yt.touches[0].pageY),xe.current=Yt.target,xe.current.addEventListener("touchmove",kt,{passive:!1}),xe.current.addEventListener("touchend",pt,{passive:!0}))};Mt=function(){xe.current&&(xe.current.removeEventListener("touchmove",kt),xe.current.removeEventListener("touchend",pt))},(0,Ke.Z)(function(){return ae&&te.current.addEventListener("touchstart",St,{passive:!0}),function(){var $t;($t=te.current)===null||$t===void 0||$t.removeEventListener("touchstart",St),Mt(),clearInterval(Ve.current)}},[ae])}function mn(ae){return Math.floor(Math.pow(ae,.5))}function Lt(ae,te){var z="touches"in ae?ae.touches[0]:ae;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function ge(ae,te,z){pe.useEffect(function(){var oe=te.current;if(ae&&oe){var se=!1,ie,xe,Ve=function(){$e.Z.cancel(ie)},Mt=function $t(){Ve(),ie=(0,$e.Z)(function(){z(xe),$t()})},kt=function(Yt){if(!(Yt.target.draggable||Yt.button!==0)){var ln=Yt;ln._virtualHandled||(ln._virtualHandled=!0,se=!0)}},pt=function(){se=!1,Ve()},St=function(Yt){if(se){var ln=Lt(Yt,!1),hn=oe.getBoundingClientRect(),Ft=hn.top,Ln=hn.bottom;if(ln<=Ft){var sn=Ft-ln;xe=-mn(sn),Mt()}else if(ln>=Ln){var yn=ln-Ln;xe=mn(yn),Mt()}else Ve()}};return oe.addEventListener("mousedown",kt),oe.ownerDocument.addEventListener("mouseup",pt),oe.ownerDocument.addEventListener("mousemove",St),function(){oe.removeEventListener("mousedown",kt),oe.ownerDocument.removeEventListener("mouseup",pt),oe.ownerDocument.removeEventListener("mousemove",St),Ve()}}},[ae])}var de=10;function dt(ae,te,z,oe,se,ie,xe,Ve){var Mt=pe.useRef(),kt=pe.useState(null),pt=(0,ve.Z)(kt,2),St=pt[0],$t=pt[1];return(0,Ke.Z)(function(){if(St&&St.times<de){if(!ae.current){$t(function(wi){return(0,Ne.Z)({},wi)});return}ie();var Yt=St.targetAlign,ln=St.originAlign,hn=St.index,Ft=St.offset,Ln=ae.current.clientHeight,sn=!1,yn=Yt,st=null;if(Ln){for(var En=Yt||ln,Ot=0,an=0,Cn=0,$n=Math.min(te.length-1,hn),Rt=0;Rt<=$n;Rt+=1){var zn=se(te[Rt]);an=Ot;var Ei=z.get(zn);Cn=an+(Ei===void 0?oe:Ei),Ot=Cn}for(var fi=En==="top"?Ft:Ln-Ft,Ri=$n;Ri>=0;Ri-=1){var Wi=se(te[Ri]),Bi=z.get(Wi);if(Bi===void 0){sn=!0;break}if(fi-=Bi,fi<=0)break}switch(En){case"top":st=an-Ft;break;case"bottom":st=Cn-Ln+Ft;break;default:{var Li=ae.current.scrollTop,ai=Li+Ln;an<Li?yn="top":Cn>ai&&(yn="bottom")}}st!==null&&xe(st),st!==St.lastTop&&(sn=!0)}sn&&$t((0,Ne.Z)((0,Ne.Z)({},St),{},{times:St.times+1,targetAlign:yn,lastTop:st}))}},[St,ae.current]),function(Yt){if(Yt==null){Ve();return}if($e.Z.cancel(Mt.current),typeof Yt=="number")xe(Yt);else if(Yt&&(0,Ue.Z)(Yt)==="object"){var ln,hn=Yt.align;"index"in Yt?ln=Yt.index:ln=te.findIndex(function(sn){return se(sn)===Yt.key});var Ft=Yt.offset,Ln=Ft===void 0?0:Ft;$t({times:0,index:ln,offset:Ln,originAlign:hn})}}}var Jt=pe.forwardRef(function(ae,te){var z=ae.prefixCls,oe=ae.rtl,se=ae.scrollOffset,ie=ae.scrollRange,xe=ae.onStartMove,Ve=ae.onStopMove,Mt=ae.onScroll,kt=ae.horizontal,pt=ae.spinSize,St=ae.containerSize,$t=ae.style,Yt=ae.thumbStyle,ln=ae.showScrollBar,hn=pe.useState(!1),Ft=(0,ve.Z)(hn,2),Ln=Ft[0],sn=Ft[1],yn=pe.useState(null),st=(0,ve.Z)(yn,2),En=st[0],Ot=st[1],an=pe.useState(null),Cn=(0,ve.Z)(an,2),$n=Cn[0],Rt=Cn[1],zn=!oe,Ei=pe.useRef(),fi=pe.useRef(),Ri=pe.useState(ln),Wi=(0,ve.Z)(Ri,2),Bi=Wi[0],Li=Wi[1],ai=pe.useRef(),wi=function(){ln===!0||ln===!1||(clearTimeout(ai.current),Li(!0),ai.current=setTimeout(function(){Li(!1)},3e3))},Di=ie-St||0,li=St-pt||0,xi=pe.useMemo(function(){if(se===0||Di===0)return 0;var Pi=se/Di;return Pi*li},[se,Di,li]),gi=function(hi){hi.stopPropagation(),hi.preventDefault()},_i=pe.useRef({top:xi,dragging:Ln,pageY:En,startTop:$n});_i.current={top:xi,dragging:Ln,pageY:En,startTop:$n};var bn=function(hi){sn(!0),Ot(Lt(hi,kt)),Rt(_i.current.top),xe(),hi.stopPropagation(),hi.preventDefault()};pe.useEffect(function(){var Pi=function(Zt){Zt.preventDefault()},hi=Ei.current,oi=fi.current;return hi.addEventListener("touchstart",Pi,{passive:!1}),oi.addEventListener("touchstart",bn,{passive:!1}),function(){hi.removeEventListener("touchstart",Pi),oi.removeEventListener("touchstart",bn)}},[]);var Dn=pe.useRef();Dn.current=Di;var Kn=pe.useRef();Kn.current=li,pe.useEffect(function(){if(Ln){var Pi,hi=function(Zt){var ot=_i.current,un=ot.dragging,Jn=ot.pageY,pi=ot.startTop;$e.Z.cancel(Pi);var Ae=Ei.current.getBoundingClientRect(),De=St/(kt?Ae.width:Ae.height);if(un){var Bt=(Lt(Zt,kt)-Jn)*De,ft=pi;!zn&&kt?ft-=Bt:ft+=Bt;var ze=Dn.current,vt=Kn.current,Qt=vt?ft/vt:0,Gt=Math.ceil(Qt*ze);Gt=Math.max(Gt,0),Gt=Math.min(Gt,ze),Pi=(0,$e.Z)(function(){Mt(Gt,kt)})}},oi=function(){sn(!1),Ve()};return window.addEventListener("mousemove",hi,{passive:!0}),window.addEventListener("touchmove",hi,{passive:!0}),window.addEventListener("mouseup",oi,{passive:!0}),window.addEventListener("touchend",oi,{passive:!0}),function(){window.removeEventListener("mousemove",hi),window.removeEventListener("touchmove",hi),window.removeEventListener("mouseup",oi),window.removeEventListener("touchend",oi),$e.Z.cancel(Pi)}}},[Ln]),pe.useEffect(function(){return wi(),function(){clearTimeout(ai.current)}},[se]),pe.useImperativeHandle(te,function(){return{delayHidden:wi}});var Pn="".concat(z,"-scrollbar"),mi={position:"absolute",visibility:Bi?null:"hidden"},yi={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return kt?(Object.assign(mi,{height:8,left:0,right:0,bottom:0}),Object.assign(yi,(0,qe.Z)({height:"100%",width:pt},zn?"left":"right",xi))):(Object.assign(mi,(0,qe.Z)({width:8,top:0,bottom:0},zn?"right":"left",0)),Object.assign(yi,{width:"100%",height:pt,top:xi})),pe.createElement("div",{ref:Ei,className:Ge()(Pn,(0,qe.Z)((0,qe.Z)((0,qe.Z)({},"".concat(Pn,"-horizontal"),kt),"".concat(Pn,"-vertical"),!kt),"".concat(Pn,"-visible"),Bi)),style:(0,Ne.Z)((0,Ne.Z)({},mi),$t),onMouseDown:gi,onMouseMove:wi},pe.createElement("div",{ref:fi,className:Ge()("".concat(Pn,"-thumb"),(0,qe.Z)({},"".concat(Pn,"-thumb-moving"),Ln)),style:(0,Ne.Z)((0,Ne.Z)({},yi),Yt),onMouseDown:bn}))}),yt=Jt,Ie=20;function tt(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ae/te*ae;return isNaN(z)&&(z=0),z=Math.max(z,Ie),Math.floor(z)}var at=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],dn=[],ht={overflowY:"auto",overflowAnchor:"none"};function Dt(ae,te){var z=ae.prefixCls,oe=z===void 0?"rc-virtual-list":z,se=ae.className,ie=ae.height,xe=ae.itemHeight,Ve=ae.fullHeight,Mt=Ve===void 0?!0:Ve,kt=ae.style,pt=ae.data,St=ae.children,$t=ae.itemKey,Yt=ae.virtual,ln=ae.direction,hn=ae.scrollWidth,Ft=ae.component,Ln=Ft===void 0?"div":Ft,sn=ae.onScroll,yn=ae.onVirtualScroll,st=ae.onVisibleChange,En=ae.innerProps,Ot=ae.extraRender,an=ae.styles,Cn=ae.showScrollBar,$n=Cn===void 0?"optional":Cn,Rt=(0,me.Z)(ae,at),zn=pe.useCallback(function(gt){return typeof $t=="function"?$t(gt):gt==null?void 0:gt[$t]},[$t]),Ei=it(zn,null,null),fi=(0,ve.Z)(Ei,4),Ri=fi[0],Wi=fi[1],Bi=fi[2],Li=fi[3],ai=!!(Yt!==!1&&ie&&xe),wi=pe.useMemo(function(){return Object.values(Bi.maps).reduce(function(gt,Pt){return gt+Pt},0)},[Bi.id,Bi.maps]),Di=ai&&pt&&(Math.max(xe*pt.length,wi)>ie||!!hn),li=ln==="rtl",xi=Ge()(oe,(0,qe.Z)({},"".concat(oe,"-rtl"),li),se),gi=pt||dn,_i=(0,pe.useRef)(),bn=(0,pe.useRef)(),Dn=(0,pe.useRef)(),Kn=(0,pe.useState)(0),Pn=(0,ve.Z)(Kn,2),mi=Pn[0],yi=Pn[1],Pi=(0,pe.useState)(0),hi=(0,ve.Z)(Pi,2),oi=hi[0],ki=hi[1],Zt=(0,pe.useState)(!1),ot=(0,ve.Z)(Zt,2),un=ot[0],Jn=ot[1],pi=function(){Jn(!0)},Ae=function(){Jn(!1)},De={getKey:zn};function Bt(gt){yi(function(Pt){var Nt;typeof gt=="function"?Nt=gt(Pt):Nt=gt;var At=wn(Nt);return _i.current.scrollTop=At,At})}var ft=(0,pe.useRef)({start:0,end:gi.length}),ze=(0,pe.useRef)(),vt=Je(gi,zn),Qt=(0,ve.Z)(vt,1),Gt=Qt[0];ze.current=Gt;var nn=pe.useMemo(function(){if(!ai)return{scrollHeight:void 0,start:0,end:gi.length-1,offset:void 0};if(!Di){var gt;return{scrollHeight:((gt=bn.current)===null||gt===void 0?void 0:gt.offsetHeight)||0,start:0,end:gi.length-1,offset:void 0}}for(var Pt=0,Nt,At,gn,Tt=gi.length,wt=0;wt<Tt;wt+=1){var Vt=gi[wt],en=zn(Vt),ii=Bi.get(en),si=Pt+(ii===void 0?xe:ii);si>=mi&&Nt===void 0&&(Nt=wt,At=Pt),si>mi+ie&&gn===void 0&&(gn=wt),Pt=si}return Nt===void 0&&(Nt=0,At=0,gn=Math.ceil(ie/xe)),gn===void 0&&(gn=gi.length-1),gn=Math.min(gn+1,gi.length-1),{scrollHeight:Pt,start:Nt,end:gn,offset:At}},[Di,ai,mi,gi,Li,ie]),zt=nn.scrollHeight,rn=nn.start,_e=nn.end,Zn=nn.offset;ft.current.start=rn,ft.current.end=_e,pe.useLayoutEffect(function(){var gt=Bi.getRecord();if(gt.size===1){var Pt=Array.from(gt.keys())[0],Nt=gt.get(Pt),At=gi[rn];if(At&&Nt===void 0){var gn=zn(At);if(gn===Pt){var Tt=Bi.get(Pt),wt=Tt-xe;Bt(function(Vt){return Vt+wt})}}}Bi.resetRecord()},[zt]);var on=pe.useState({width:0,height:ie}),Be=(0,ve.Z)(on,2),Te=Be[0],ye=Be[1],ut=function(Pt){ye({width:Pt.offsetWidth,height:Pt.offsetHeight})},_n=(0,pe.useRef)(),kn=(0,pe.useRef)(),qt=pe.useMemo(function(){return tt(Te.width,hn)},[Te.width,hn]),Ct=pe.useMemo(function(){return tt(Te.height,zt)},[Te.height,zt]),Oe=zt-ie,cn=(0,pe.useRef)(Oe);cn.current=Oe;function wn(gt){var Pt=gt;return Number.isNaN(cn.current)||(Pt=Math.min(Pt,cn.current)),Pt=Math.max(Pt,0),Pt}var Fn=mi<=0,On=mi>=Oe,Xn=oi<=0,Xt=oi>=hn,Tn=lt(Fn,On,Xn,Xt),Gn=function(){return{x:li?-oi:oi,y:mi}},Nn=(0,pe.useRef)(Gn()),jt=(0,fe.zX)(function(gt){if(yn){var Pt=(0,Ne.Z)((0,Ne.Z)({},Gn()),gt);(Nn.current.x!==Pt.x||Nn.current.y!==Pt.y)&&(yn(Pt),Nn.current=Pt)}});function fn(gt,Pt){var Nt=gt;Pt?((0,et.flushSync)(function(){ki(Nt)}),jt()):Bt(Nt)}function Bn(gt){var Pt=gt.currentTarget.scrollTop;Pt!==mi&&Bt(Pt),sn==null||sn(gt),jt()}var Hn=function(Pt){var Nt=Pt,At=hn?hn-Te.width:0;return Nt=Math.max(Nt,0),Nt=Math.min(Nt,At),Nt},Wn=(0,fe.zX)(function(gt,Pt){Pt?((0,et.flushSync)(function(){ki(function(Nt){var At=Nt+(li?-gt:gt);return Hn(At)})}),jt()):Bt(function(Nt){var At=Nt+gt;return At})}),In=Ut(ai,Fn,On,Xn,Xt,!!hn,Wn),Vn=(0,ve.Z)(In,2),ni=Vn[0],Sn=Vn[1];xt(ai,_i,function(gt,Pt,Nt,At){var gn=At;return Tn(gt,Pt,Nt)?!1:!gn||!gn._virtualHandled?(gn&&(gn._virtualHandled=!0),ni({preventDefault:function(){},deltaX:gt?Pt:0,deltaY:gt?0:Pt}),!0):!1}),ge(Di,_i,function(gt){Bt(function(Pt){return Pt+gt})}),(0,Ke.Z)(function(){function gt(Nt){var At=Fn&&Nt.detail<0,gn=On&&Nt.detail>0;ai&&!At&&!gn&&Nt.preventDefault()}var Pt=_i.current;return Pt.addEventListener("wheel",ni,{passive:!1}),Pt.addEventListener("DOMMouseScroll",Sn,{passive:!0}),Pt.addEventListener("MozMousePixelScroll",gt,{passive:!1}),function(){Pt.removeEventListener("wheel",ni),Pt.removeEventListener("DOMMouseScroll",Sn),Pt.removeEventListener("MozMousePixelScroll",gt)}},[ai,Fn,On]),(0,Ke.Z)(function(){if(hn){var gt=Hn(oi);ki(gt),jt({x:gt})}},[Te.width,hn]);var ei=function(){var Pt,Nt;(Pt=_n.current)===null||Pt===void 0||Pt.delayHidden(),(Nt=kn.current)===null||Nt===void 0||Nt.delayHidden()},jn=dt(_i,gi,Bi,xe,zn,function(){return Wi(!0)},Bt,ei);pe.useImperativeHandle(te,function(){return{nativeElement:Dn.current,getScrollInfo:Gn,scrollTo:function(Pt){function Nt(At){return At&&(0,Ue.Z)(At)==="object"&&("left"in At||"top"in At)}Nt(Pt)?(Pt.left!==void 0&&ki(Hn(Pt.left)),jn(Pt.top)):jn(Pt)}}}),(0,Ke.Z)(function(){if(st){var gt=gi.slice(rn,_e+1);st(gt,gi)}},[rn,_e,gi]);var Ht=Me(gi,zn,Bi,xe),Qn=Ot==null?void 0:Ot({start:rn,end:_e,virtual:Di,offsetX:oi,offsetY:Zn,rtl:li,getSize:Ht}),Un=Se(gi,rn,_e,hn,oi,Ri,St,De),Ci=null;ie&&(Ci=(0,Ne.Z)((0,qe.Z)({},Mt?"height":"maxHeight",ie),ht),ai&&(Ci.overflowY="hidden",hn&&(Ci.overflowX="hidden"),un&&(Ci.pointerEvents="none")));var Rn={};return li&&(Rn.dir="rtl"),pe.createElement("div",(0,ne.Z)({ref:Dn,style:(0,Ne.Z)((0,Ne.Z)({},kt),{},{position:"relative"}),className:xi},Rn,Rt),pe.createElement(we.Z,{onResize:ut},pe.createElement(Ln,{className:"".concat(oe,"-holder"),style:Ci,ref:_i,onScroll:Bn,onMouseEnter:ei},pe.createElement(Ce,{prefixCls:oe,height:zt,offsetX:oi,offsetY:Zn,scrollWidth:hn,onInnerResize:Wi,ref:bn,innerProps:En,rtl:li,extra:Qn},Un))),Di&&zt>ie&&pe.createElement(yt,{ref:_n,prefixCls:oe,scrollOffset:mi,scrollRange:zt,rtl:li,onScroll:fn,onStartMove:pi,onStopMove:Ae,spinSize:Ct,containerSize:Te.height,style:an==null?void 0:an.verticalScrollBar,thumbStyle:an==null?void 0:an.verticalScrollBarThumb,showScrollBar:$n}),Di&&hn>Te.width&&pe.createElement(yt,{ref:kn,prefixCls:oe,scrollOffset:oi,scrollRange:hn,rtl:li,onScroll:fn,onStartMove:pi,onStopMove:Ae,spinSize:qt,containerSize:Te.width,horizontal:!0,style:an==null?void 0:an.horizontalScrollBar,thumbStyle:an==null?void 0:an.horizontalScrollBarThumb,showScrollBar:$n}))}var We=pe.forwardRef(Dt);We.displayName="List";var mt=We,Et=mt},93314:function(It){"use strict";It.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(It,Wt,he){"use strict";he.d(Wt,{Z:function(){return Ge}});const ne=we=>typeof we=="object"&&we!=null&&we.nodeType===1,Ue=(we,fe)=>(!fe||we!=="hidden")&&we!=="visible"&&we!=="clip",Ne=(we,fe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const Ke=getComputedStyle(we,null);return Ue(Ke.overflowY,fe)||Ue(Ke.overflowX,fe)||(pe=>{const et=(He=>{if(!He.ownerDocument||!He.ownerDocument.defaultView)return null;try{return He.ownerDocument.defaultView.frameElement}catch(Ce){return null}})(pe);return!!et&&(et.clientHeight<pe.scrollHeight||et.clientWidth<pe.scrollWidth)})(we)}return!1},qe=(we,fe,Ke,pe,et,He,Ce,Ee)=>He<we&&Ce>fe||He>we&&Ce<fe?0:He<=we&&Ee<=Ke||Ce>=fe&&Ee>=Ke?He-we-pe:Ce>fe&&Ee<Ke||He<we&&Ee>Ke?Ce-fe+et:0,ve=we=>{const fe=we.parentElement;return fe==null?we.getRootNode().host||null:fe},me=(we,fe)=>{var Ke,pe,et,He;if(typeof document=="undefined")return[];const{scrollMode:Ce,block:Ee,inline:Se,boundary:Xe,skipOverflowHiddenElements:rt}=fe,Je=typeof Xe=="function"?Xe:yt=>yt!==Xe;if(!ne(we))throw new TypeError("Invalid target");const $e=document.scrollingElement||document.documentElement,Le=[];let ct=we;for(;ne(ct)&&Je(ct);){if(ct=ve(ct),ct===$e){Le.push(ct);break}ct!=null&&ct===document.body&&Ne(ct)&&!Ne(document.documentElement)||ct!=null&&Ne(ct,rt)&&Le.push(ct)}const lt=(pe=(Ke=window.visualViewport)==null?void 0:Ke.width)!=null?pe:innerWidth,Ut=(He=(et=window.visualViewport)==null?void 0:et.height)!=null?He:innerHeight,{scrollX:Me,scrollY:Ze}=window,{height:nt,width:Pe,top:Qe,right:Fe,bottom:it,left:Kt}=we.getBoundingClientRect(),{top:xt,right:mn,bottom:Lt,left:ge}=(yt=>{const Ie=window.getComputedStyle(yt);return{top:parseFloat(Ie.scrollMarginTop)||0,right:parseFloat(Ie.scrollMarginRight)||0,bottom:parseFloat(Ie.scrollMarginBottom)||0,left:parseFloat(Ie.scrollMarginLeft)||0}})(we);let de=Ee==="start"||Ee==="nearest"?Qe-xt:Ee==="end"?it+Lt:Qe+nt/2-xt+Lt,dt=Se==="center"?Kt+Pe/2-ge+mn:Se==="end"?Fe+mn:Kt-ge;const Jt=[];for(let yt=0;yt<Le.length;yt++){const Ie=Le[yt],{height:tt,width:at,top:dn,right:ht,bottom:Dt,left:We}=Ie.getBoundingClientRect();if(Ce==="if-needed"&&Qe>=0&&Kt>=0&&it<=Ut&&Fe<=lt&&(Ie===$e&&!Ne(Ie)||Qe>=dn&&it<=Dt&&Kt>=We&&Fe<=ht))return Jt;const mt=getComputedStyle(Ie),Et=parseInt(mt.borderLeftWidth,10),ae=parseInt(mt.borderTopWidth,10),te=parseInt(mt.borderRightWidth,10),z=parseInt(mt.borderBottomWidth,10);let oe=0,se=0;const ie="offsetWidth"in Ie?Ie.offsetWidth-Ie.clientWidth-Et-te:0,xe="offsetHeight"in Ie?Ie.offsetHeight-Ie.clientHeight-ae-z:0,Ve="offsetWidth"in Ie?Ie.offsetWidth===0?0:at/Ie.offsetWidth:0,Mt="offsetHeight"in Ie?Ie.offsetHeight===0?0:tt/Ie.offsetHeight:0;if($e===Ie)oe=Ee==="start"?de:Ee==="end"?de-Ut:Ee==="nearest"?qe(Ze,Ze+Ut,Ut,ae,z,Ze+de,Ze+de+nt,nt):de-Ut/2,se=Se==="start"?dt:Se==="center"?dt-lt/2:Se==="end"?dt-lt:qe(Me,Me+lt,lt,Et,te,Me+dt,Me+dt+Pe,Pe),oe=Math.max(0,oe+Ze),se=Math.max(0,se+Me);else{oe=Ee==="start"?de-dn-ae:Ee==="end"?de-Dt+z+xe:Ee==="nearest"?qe(dn,Dt,tt,ae,z+xe,de,de+nt,nt):de-(dn+tt/2)+xe/2,se=Se==="start"?dt-We-Et:Se==="center"?dt-(We+at/2)+ie/2:Se==="end"?dt-ht+te+ie:qe(We,ht,at,Et,te+ie,dt,dt+Pe,Pe);const{scrollLeft:kt,scrollTop:pt}=Ie;oe=Mt===0?0:Math.max(0,Math.min(pt+oe/Mt,Ie.scrollHeight-tt/Mt+xe)),se=Ve===0?0:Math.max(0,Math.min(kt+se/Ve,Ie.scrollWidth-at/Ve+ie)),de+=pt-oe,dt+=kt-se}Jt.push({el:Ie,top:oe,left:se})}return Jt},Re=we=>we===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(we)?we:{block:"start",inline:"nearest"};function Ge(we,fe){if(!we.isConnected||!(et=>{let He=et;for(;He&&He.parentNode;){if(He.parentNode===document)return!0;He=He.parentNode instanceof ShadowRoot?He.parentNode.host:He.parentNode}return!1})(we))return;const Ke=(et=>{const He=window.getComputedStyle(et);return{top:parseFloat(He.scrollMarginTop)||0,right:parseFloat(He.scrollMarginRight)||0,bottom:parseFloat(He.scrollMarginBottom)||0,left:parseFloat(He.scrollMarginLeft)||0}})(we);if((et=>typeof et=="object"&&typeof et.behavior=="function")(fe))return fe.behavior(me(we,fe));const pe=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:et,top:He,left:Ce}of me(we,Re(fe))){const Ee=He-Ke.top+Ke.bottom,Se=Ce-Ke.left+Ke.right;et.scroll({top:Ee,left:Se,behavior:pe})}}}}]);